diff --git a/.mock/accounting_v3.yml b/.mock/accounting_v3.yml new file mode 100644 index 000000000..455d27ce6 --- /dev/null +++ b/.mock/accounting_v3.yml @@ -0,0 +1,32829 @@ +openapi: 3.0.3 +info: + title: Merge Accounting API + version: '1.0' + description: The unified API for building rich integrations with multiple Accounting + & Finance platforms. + contact: + name: Merge Team + url: https://www.merge.dev/ + email: hello@merge.dev +paths: + /accounting/v1/account-details: + get: + operationId: account_details_retrieve + description: Get details for a linked account. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - account-details + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AccountDetails' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/account-token/{public_token}: + get: + operationId: account_token_retrieve + description: Returns the account token for the end user with the provided public + token. + parameters: + - in: path + name: public_token + schema: + type: string + required: true + tags: + - account-token + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AccountToken' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/accounting-periods: + get: + operationId: accounting_periods_list + description: Returns a list of `AccountingPeriod` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - accounting-periods + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedAccountingPeriodList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/accounting-periods/{id}: + get: + operationId: accounting_periods_retrieve + description: Returns an `AccountingPeriod` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - accounting-periods + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AccountingPeriod' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/accounts: + get: + operationId: accounts_list + description: Returns a list of `Account` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: account_type + schema: + type: string + description: If provided, will only return accounts with the passed in enum. + - in: query + name: classification + schema: + type: string + nullable: true + enum: + - '' + - ASSET + - EQUITY + - EXPENSE + - LIABILITY + - + - REVENUE + description: If provided, will only return accounts with this classification. + - in: query + name: company_id + schema: + type: string + description: If provided, will only return accounts for this company. + examples: + CompanyId: + summary: company_id + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - company + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandCompany: + value: company + summary: Expand Company + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - in: query + name: name + schema: + type: string + nullable: true + description: If provided, will only return Accounts with this name. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_fields + schema: + type: string + enum: + - classification + - classification,status + - status + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesClassification,Status: + value: classification,status + summary: Original Enum Values Classification, Status + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + - in: query + name: show_enum_origins + schema: + type: string + enum: + - classification + - classification,status + - status + description: 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) + examples: + OriginalEnumValuesClassification,Status: + value: classification,status + summary: Original Enum Values Classification, Status + - in: query + name: status + schema: + type: string + nullable: true + enum: + - '' + - ACTIVE + - INACTIVE + - + - PENDING + description: If provided, will only return accounts with this status. + tags: + - accounts + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedAccountList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + post: + operationId: accounts_create + description: Creates an `Account` object with the given values. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: is_debug_mode + schema: + type: boolean + description: Whether to include debug fields (such as log file links) in the + response. + - in: query + name: run_async + schema: + type: boolean + description: Whether or not third-party updates should be run asynchronously. + tags: + - accounts + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AccountEndpointRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/AccountEndpointRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/AccountEndpointRequest' + required: true + security: + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/AccountResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /accounting/v1/accounts/{id}: + get: + operationId: accounts_retrieve + description: Returns an `Account` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - company + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandCompany: + value: company + summary: Expand Company + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: remote_fields + schema: + type: string + enum: + - classification + - classification,status + - status + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesClassification,Status: + value: classification,status + summary: Original Enum Values Classification, Status + - in: query + name: show_enum_origins + schema: + type: string + enum: + - classification + - classification,status + - status + description: 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) + examples: + OriginalEnumValuesClassification,Status: + value: classification,status + summary: Original Enum Values Classification, Status + tags: + - accounts + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Account' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/accounts/meta/post: + get: + operationId: accounts_meta_post_retrieve + description: Returns metadata for `Account` POSTs. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - accounts + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetaResponse' + description: '' + x-merge-meta-post: META_POST + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/addresses/{id}: + get: + operationId: addresses_retrieve + description: Returns an `Address` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: remote_fields + schema: + type: string + enum: + - type + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesType: + value: type + summary: Original Enum Values Type + - in: query + name: show_enum_origins + schema: + type: string + enum: + - type + description: 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) + examples: + OriginalEnumValuesType: + value: type + summary: Original Enum Values Type + tags: + - addresses + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Address' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/async-passthrough: + post: + operationId: async_passthrough_create + description: Asynchronously pull data from an endpoint not currently supported + by Merge. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - async-passthrough + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DataPassthroughRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/DataPassthroughRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/DataPassthroughRequest' + required: true + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AsyncPassthroughReciept' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/async-passthrough/{async_passthrough_receipt_id}: + get: + operationId: async_passthrough_retrieve + description: Retrieves data from earlier async-passthrough POST request + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: async_passthrough_receipt_id + schema: + type: string + format: uuid + required: true + tags: + - async-passthrough + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/RemoteResponse' + - type: string + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/async-tasks/{id}: + get: + operationId: async_tasks_retrieve + description: Returns an `AsyncPostTask` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + required: true + tags: + - async-tasks + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AsyncPostTask' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/attachments: + get: + operationId: attachments_list + description: Returns a list of `AccountingAttachment` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: company_id + schema: + type: string + description: If provided, will only return accounting attachments for this + company. + examples: + CompanyId: + summary: company_id + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + tags: + - attachments + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedAccountingAttachmentList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + post: + operationId: attachments_create + description: Creates an `AccountingAttachment` object with the given values. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: is_debug_mode + schema: + type: boolean + description: Whether to include debug fields (such as log file links) in the + response. + - in: query + name: run_async + schema: + type: boolean + description: Whether or not third-party updates should be run asynchronously. + tags: + - attachments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AccountingAttachmentEndpointRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/AccountingAttachmentEndpointRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/AccountingAttachmentEndpointRequest' + required: true + security: + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/AccountingAttachmentResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/attachments/{id}: + get: + operationId: attachments_retrieve + description: Returns an `AccountingAttachment` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - attachments + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AccountingAttachment' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/attachments/meta/post: + get: + operationId: attachments_meta_post_retrieve + description: Returns metadata for `AccountingAttachment` POSTs. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - attachments + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetaResponse' + description: '' + x-merge-meta-post: META_POST + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/audit-trail: + get: + operationId: audit_trail_list + description: Gets a list of audit trail events. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: end_date + schema: + type: string + description: If included, will only include audit trail events that occurred + before this time + - in: query + name: event_type + schema: + type: string + description: '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`' + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: start_date + schema: + type: string + description: If included, will only include audit trail events that occurred + after this time + - in: query + name: user_email + schema: + type: string + description: 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. + tags: + - audit-trail + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedAuditLogEventList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/available-actions: + get: + operationId: available_actions_retrieve + description: Returns a list of models and actions available for an account. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - available-actions + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AvailableActions' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/balance-sheets: + get: + operationId: balance_sheets_list + description: Returns a list of `BalanceSheet` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: company_id + schema: + type: string + description: If provided, will only return balance sheets for this company. + examples: + CompanyId: + summary: company_id + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - company + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandCompany: + value: company + summary: Expand Company + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + tags: + - balance-sheets + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedBalanceSheetList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/balance-sheets/{id}: + get: + operationId: balance_sheets_retrieve + description: Returns a `BalanceSheet` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - company + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandCompany: + value: company + summary: Expand Company + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - balance-sheets + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/BalanceSheet' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/bank-feed-accounts: + get: + operationId: bank_feed_accounts_list + description: Returns a list of `BankFeedAccount` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - bank-feed-accounts + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedBankFeedAccountList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + post: + operationId: bank_feed_accounts_create + description: Creates a `BankFeedAccount` object with the given values. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: is_debug_mode + schema: + type: boolean + description: Whether to include debug fields (such as log file links) in the + response. + - in: query + name: run_async + schema: + type: boolean + description: Whether or not third-party updates should be run asynchronously. + tags: + - bank-feed-accounts + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BankFeedAccountEndpointRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/BankFeedAccountEndpointRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/BankFeedAccountEndpointRequest' + required: true + security: + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/BankFeedAccountResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /accounting/v1/bank-feed-accounts/{id}: + get: + operationId: bank_feed_accounts_retrieve + description: Returns a `BankFeedAccount` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - bank-feed-accounts + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/BankFeedAccount' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /accounting/v1/bank-feed-accounts/meta/post: + get: + operationId: bank_feed_accounts_meta_post_retrieve + description: Returns metadata for `BankFeedAccount` POSTs. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - bank-feed-accounts + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetaResponse' + description: '' + x-merge-meta-post: META_POST + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /accounting/v1/bank-feed-transactions: + get: + operationId: bank_feed_transactions_list + description: Returns a list of `BankFeedTransaction` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - bank_feed_account + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandBankFeedAccount: + value: bank_feed_account + summary: Expand Bank_feed_account + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: is_processed + schema: + type: boolean + description: If provided, will only return bank feed transactions with this + is_processed value + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + tags: + - bank-feed-transactions + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedBankFeedTransactionList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + post: + operationId: bank_feed_transactions_create + description: Creates a `BankFeedTransaction` object with the given values. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: is_debug_mode + schema: + type: boolean + description: Whether to include debug fields (such as log file links) in the + response. + - in: query + name: run_async + schema: + type: boolean + description: Whether or not third-party updates should be run asynchronously. + tags: + - bank-feed-transactions + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BankFeedTransactionEndpointRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/BankFeedTransactionEndpointRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/BankFeedTransactionEndpointRequest' + required: true + security: + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/BankFeedTransactionResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /accounting/v1/bank-feed-transactions/{id}: + get: + operationId: bank_feed_transactions_retrieve + description: Returns a `BankFeedTransaction` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - bank_feed_account + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandBankFeedAccount: + value: bank_feed_account + summary: Expand Bank_feed_account + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - bank-feed-transactions + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/BankFeedTransaction' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /accounting/v1/bank-feed-transactions/meta/post: + get: + operationId: bank_feed_transactions_meta_post_retrieve + description: Returns metadata for `BankFeedTransaction` POSTs. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - bank-feed-transactions + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetaResponse' + description: '' + x-merge-meta-post: META_POST + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /accounting/v1/cash-flow-statements: + get: + operationId: cash_flow_statements_list + description: Returns a list of `CashFlowStatement` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: company_id + schema: + type: string + description: If provided, will only return cash flow statements for this company. + examples: + CompanyId: + summary: company_id + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - company + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandCompany: + value: company + summary: Expand Company + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + tags: + - cash-flow-statements + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedCashFlowStatementList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/cash-flow-statements/{id}: + get: + operationId: cash_flow_statements_retrieve + description: Returns a `CashFlowStatement` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - company + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandCompany: + value: company + summary: Expand Company + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - cash-flow-statements + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CashFlowStatement' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/company-info: + get: + operationId: company_info_list + description: Returns a list of `CompanyInfo` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - addresses + - phone_numbers + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandAddresses,PhoneNumbers: + value: addresses,phone_numbers + summary: Expand Addresses, Phone_numbers + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + tags: + - company-info + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedCompanyInfoList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/company-info/{id}: + get: + operationId: company_info_retrieve + description: Returns a `CompanyInfo` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - addresses + - phone_numbers + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandAddresses,PhoneNumbers: + value: addresses,phone_numbers + summary: Expand Addresses, Phone_numbers + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - company-info + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CompanyInfo' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/contacts: + get: + operationId: contacts_list + description: Returns a list of `Contact` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: company_id + schema: + type: string + description: If provided, will only return contacts for this company. + examples: + CompanyId: + summary: company_id + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: email_address + schema: + type: string + nullable: true + description: If provided, will only return Contacts that match this email. + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - addresses + - company + - phone_numbers + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandAddresses,PhoneNumbers,Company: + value: addresses,phone_numbers,company + summary: Expand Addresses, Phone_numbers, Company + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_remote_fields + schema: + type: boolean + description: Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: is_customer + schema: + type: string + description: If provided, will only return Contacts that are denoted as customers. + - in: query + name: is_supplier + schema: + type: string + description: If provided, will only return Contacts that are denoted as suppliers. + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - in: query + name: name + schema: + type: string + nullable: true + description: If provided, will only return Contacts that match this name. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_fields + schema: + type: string + enum: + - status + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesStatus: + value: status + summary: Original Enum Values Status + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + - in: query + name: show_enum_origins + schema: + type: string + enum: + - status + description: 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) + examples: + OriginalEnumValuesStatus: + value: status + summary: Original Enum Values Status + - in: query + name: status + schema: + type: string + nullable: true + enum: + - '' + - ACTIVE + - ARCHIVED + - + description: If provided, will only return Contacts that match this status. + tags: + - contacts + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedContactList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + post: + operationId: contacts_create + description: Creates a `Contact` object with the given values. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: is_debug_mode + schema: + type: boolean + description: Whether to include debug fields (such as log file links) in the + response. + - in: query + name: run_async + schema: + type: boolean + description: Whether or not third-party updates should be run asynchronously. + tags: + - contacts + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ContactEndpointRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ContactEndpointRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/ContactEndpointRequest' + required: true + security: + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/ContactResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/contacts/{id}: + get: + operationId: contacts_retrieve + description: Returns a `Contact` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - addresses + - company + - phone_numbers + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandAddresses,PhoneNumbers,Company: + value: addresses,phone_numbers,company + summary: Expand Addresses, Phone_numbers, Company + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_remote_fields + schema: + type: boolean + description: Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: remote_fields + schema: + type: string + enum: + - status + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesStatus: + value: status + summary: Original Enum Values Status + - in: query + name: show_enum_origins + schema: + type: string + enum: + - status + description: 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) + examples: + OriginalEnumValuesStatus: + value: status + summary: Original Enum Values Status + tags: + - contacts + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Contact' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/contacts/meta/post: + get: + operationId: contacts_meta_post_retrieve + description: Returns metadata for `Contact` POSTs. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - contacts + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetaResponse' + description: '' + x-merge-meta-post: META_POST + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/contacts/remote-field-classes: + get: + operationId: contacts_remote_field_classes_list + description: Returns a list of `RemoteFieldClass` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: is_common_model_field + schema: + type: boolean + nullable: true + description: If provided, will only return remote field classes with this + is_common_model_field value + - in: query + name: is_custom + schema: + type: boolean + nullable: true + description: If provided, will only return remote fields classes with this + is_custom value + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - contacts + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedRemoteFieldClassList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /accounting/v1/credit-notes: + get: + operationId: credit_notes_list + description: Returns a list of `CreditNote` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: company_id + schema: + type: string + description: If provided, will only return credit notes for this company. + examples: + CompanyId: + summary: company_id + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - accounting_period + - applied_payments + - company + - contact + - line_items + - payments + - tracking_categories + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandPayments,AppliedPayments,LineItems,TrackingCategories,Contact,Company,AccountingPeriod: + value: + payments,applied_payments,line_items,tracking_categories,contact,company,accounting_period + summary: Expand Payments, Applied_payments, Line_items, Tracking_categories, + Contact, Company, Accounting_period + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_fields + schema: + type: string + enum: + - status + - status,type + - type + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesStatus,Type: + value: status,type + summary: Original Enum Values Status, Type + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + - in: query + name: show_enum_origins + schema: + type: string + enum: + - status + - status,type + - type + description: 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) + examples: + OriginalEnumValuesStatus,Type: + value: status,type + summary: Original Enum Values Status, Type + - in: query + name: transaction_date_after + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return objects created after this datetime. + - in: query + name: transaction_date_before + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return objects created before this datetime. + tags: + - credit-notes + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedCreditNoteList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + post: + operationId: credit_notes_create + description: Creates a `CreditNote` object with the given values. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: is_debug_mode + schema: + type: boolean + description: Whether to include debug fields (such as log file links) in the + response. + - in: query + name: run_async + schema: + type: boolean + description: Whether or not third-party updates should be run asynchronously. + tags: + - credit-notes + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreditNoteEndpointRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/CreditNoteEndpointRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/CreditNoteEndpointRequest' + required: true + security: + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/CreditNoteResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/credit-notes/{id}: + get: + operationId: credit_notes_retrieve + description: Returns a `CreditNote` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - accounting_period + - applied_payments + - company + - contact + - line_items + - payments + - tracking_categories + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandPayments,AppliedPayments,LineItems,TrackingCategories,Contact,Company,AccountingPeriod: + value: + payments,applied_payments,line_items,tracking_categories,contact,company,accounting_period + summary: Expand Payments, Applied_payments, Line_items, Tracking_categories, + Contact, Company, Accounting_period + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: remote_fields + schema: + type: string + enum: + - status + - status,type + - type + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesStatus,Type: + value: status,type + summary: Original Enum Values Status, Type + - in: query + name: show_enum_origins + schema: + type: string + enum: + - status + - status,type + - type + description: 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) + examples: + OriginalEnumValuesStatus,Type: + value: status,type + summary: Original Enum Values Status, Type + tags: + - credit-notes + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CreditNote' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/credit-notes/meta/post: + get: + operationId: credit_notes_meta_post_retrieve + description: Returns metadata for `CreditNote` POSTs. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - credit-notes + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetaResponse' + description: '' + x-merge-meta-post: META_POST + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/default-scopes: + get: + operationId: default_scopes_retrieve + description: Get the default permissions for Merge Common Models and fields + across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). + tags: + - scopes + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CommonModelScopeAPI' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/delete-account: + post: + operationId: delete_account_delete + description: Delete a linked account. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - delete-account + security: + - tokenAuth: [] + responses: + '200': + description: No response body + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/employees: + get: + operationId: employees_list + description: Returns a list of `Employee` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - company + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandCompany: + value: company + summary: Expand Company + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - employees + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedEmployeeList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /accounting/v1/employees/{id}: + get: + operationId: employees_retrieve + description: Returns an `Employee` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - company + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandCompany: + value: company + summary: Expand Company + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - employees + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Employee' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /accounting/v1/expenses: + get: + operationId: expenses_list + description: Returns a list of `Expense` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: company_id + schema: + type: string + description: If provided, will only return expenses for this company. + examples: + CompanyId: + summary: company_id + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - account + - accounting_period + - company + - contact + - employee + - tracking_categories + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandTrackingCategories,Account,Contact,Company,Employee,AccountingPeriod: + value: tracking_categories,account,contact,company,employee,accounting_period + summary: Expand Tracking_categories, Account, Contact, Company, Employee, + Accounting_period + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_remote_fields + schema: + type: boolean + description: Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + - in: query + name: transaction_date_after + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return objects created after this datetime. + - in: query + name: transaction_date_before + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return objects created before this datetime. + tags: + - expenses + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedExpenseList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + post: + operationId: expenses_create + description: Creates an `Expense` object with the given values. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: is_debug_mode + schema: + type: boolean + description: Whether to include debug fields (such as log file links) in the + response. + - in: query + name: run_async + schema: + type: boolean + description: Whether or not third-party updates should be run asynchronously. + tags: + - expenses + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ExpenseEndpointRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ExpenseEndpointRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/ExpenseEndpointRequest' + required: true + security: + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/ExpenseResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/expenses/{id}: + get: + operationId: expenses_retrieve + description: Returns an `Expense` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - account + - accounting_period + - company + - contact + - employee + - tracking_categories + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandTrackingCategories,Account,Contact,Company,Employee,AccountingPeriod: + value: tracking_categories,account,contact,company,employee,accounting_period + summary: Expand Tracking_categories, Account, Contact, Company, Employee, + Accounting_period + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_remote_fields + schema: + type: boolean + description: Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - expenses + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Expense' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/expenses/lines/remote-field-classes: + get: + operationId: expenses_lines_remote_field_classes_list + description: Returns a list of `RemoteFieldClass` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: is_common_model_field + schema: + type: boolean + nullable: true + description: If provided, will only return remote field classes with this + is_common_model_field value + - in: query + name: is_custom + schema: + type: boolean + nullable: true + description: If provided, will only return remote fields classes with this + is_custom value + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - expenses + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedRemoteFieldClassList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /accounting/v1/expenses/meta/post: + get: + operationId: expenses_meta_post_retrieve + description: Returns metadata for `Expense` POSTs. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - expenses + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetaResponse' + description: '' + x-merge-meta-post: META_POST + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/expenses/remote-field-classes: + get: + operationId: expenses_remote_field_classes_list + description: Returns a list of `RemoteFieldClass` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: is_common_model_field + schema: + type: boolean + nullable: true + description: If provided, will only return remote field classes with this + is_common_model_field value + - in: query + name: is_custom + schema: + type: boolean + nullable: true + description: If provided, will only return remote fields classes with this + is_custom value + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - expenses + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedRemoteFieldClassList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /accounting/v1/field-mappings: + get: + operationId: field_mappings_retrieve + description: Get all Field Mappings for this Linked Account. Field Mappings + are mappings between third-party Remote Fields and user defined Merge fields. + [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: exclude_remote_field_metadata + schema: + type: boolean + description: 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. + tags: + - field-mapping + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/FieldMappingApiInstanceResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + post: + operationId: field_mappings_create + description: Create new Field Mappings that will be available after the next + scheduled sync. This will cause the next sync for this Linked Account to sync + **ALL** data from start. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: exclude_remote_field_metadata + schema: + type: boolean + description: 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. + tags: + - field-mapping + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateFieldMappingRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/CreateFieldMappingRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/CreateFieldMappingRequest' + required: true + security: + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/FieldMappingInstanceResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/field-mappings/{field_mapping_id}: + patch: + operationId: field_mappings_partial_update + description: Create or update existing Field Mappings for a Linked Account. + Changes will be reflected after the next scheduled sync. This will cause the + next sync for this Linked Account to sync **ALL** data from start. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: field_mapping_id + schema: + type: string + format: uuid + required: true + tags: + - field-mapping + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedEditFieldMappingRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedEditFieldMappingRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedEditFieldMappingRequest' + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/FieldMappingInstanceResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + delete: + operationId: field_mappings_destroy + description: Deletes Field Mappings for a Linked Account. All data related to + this Field Mapping will be deleted and these changes will be reflected after + the next scheduled sync. This will cause the next sync for this Linked Account + to sync **ALL** data from start. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: field_mapping_id + schema: + type: string + format: uuid + required: true + tags: + - field-mapping + security: + - tokenAuth: [] + responses: + '204': + content: + application/json: + schema: + $ref: '#/components/schemas/FieldMappingInstanceResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/general-ledger-transactions: + get: + operationId: general_ledger_transactions_list + description: Returns a list of `GeneralLedgerTransaction` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: company_id + schema: + type: string + description: If provided, will only return general ledger transactions for + this company. + examples: + CompanyId: + summary: company_id + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - accounting_period + - company + - general_ledger_transaction_lines + - tracking_categories + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandTrackingCategories,GeneralLedgerTransactionLines,Company,AccountingPeriod: + value: tracking_categories,general_ledger_transaction_lines,company,accounting_period + summary: Expand Tracking_categories, General_ledger_transaction_lines, + Company, Accounting_period + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: posted_date_after + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return objects posted after this datetime. + - in: query + name: posted_date_before + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return objects posted before this datetime. + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + tags: + - general-ledger-transactions + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGeneralLedgerTransactionList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/general-ledger-transactions/{id}: + get: + operationId: general_ledger_transactions_retrieve + description: Returns a `GeneralLedgerTransaction` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - accounting_period + - company + - general_ledger_transaction_lines + - tracking_categories + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandTrackingCategories,GeneralLedgerTransactionLines,Company,AccountingPeriod: + value: tracking_categories,general_ledger_transaction_lines,company,accounting_period + summary: Expand Tracking_categories, General_ledger_transaction_lines, + Company, Accounting_period + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - general-ledger-transactions + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/GeneralLedgerTransaction' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/generate-key: + post: + operationId: generate_key_create + description: Create a remote key. + tags: + - generate-key + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GenerateRemoteKeyRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/GenerateRemoteKeyRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/GenerateRemoteKeyRequest' + required: true + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RemoteKey' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/income-statements: + get: + operationId: income_statements_list + description: Returns a list of `IncomeStatement` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: company_id + schema: + type: string + description: If provided, will only return income statements for this company. + examples: + CompanyId: + summary: company_id + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - company + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandCompany: + value: company + summary: Expand Company + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + tags: + - income-statements + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedIncomeStatementList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/income-statements/{id}: + get: + operationId: income_statements_retrieve + description: Returns an `IncomeStatement` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - company + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandCompany: + value: company + summary: Expand Company + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - income-statements + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/IncomeStatement' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/invoices: + get: + operationId: invoices_list + description: Returns a list of `Invoice` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: company_id + schema: + type: string + description: If provided, will only return invoices for this company. + examples: + CompanyId: + summary: company_id + - in: query + name: contact_id + schema: + type: string + description: If provided, will only return invoices for this contact. + examples: + ContactId: + summary: contact_id + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - accounting_period + - applied_credit_notes + - applied_payments + - applied_vendor_credits + - company + - contact + - employee + - line_items + - payment_term + - payments + - purchase_orders + - tracking_categories + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ? ExpandPayments,AppliedPayments,LineItems,TrackingCategories,PurchaseOrders,AppliedCreditNotes,AppliedVendorCredits,Contact,Company,Employee,AccountingPeriod,PaymentTerm + : value: + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + summary: Expand Payments, Applied_payments, Line_items, Tracking_categories, + Purchase_orders, Applied_credit_notes, Applied_vendor_credits, Contact, + Company, Employee, Accounting_period, Payment_term + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_remote_fields + schema: + type: boolean + description: Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: issue_date_after + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return objects created after this datetime. + - in: query + name: issue_date_before + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return objects created before this datetime. + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - in: query + name: number + schema: + type: string + nullable: true + description: If provided, will only return Invoices with this number. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_fields + schema: + type: string + enum: + - type + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesType: + value: type + summary: Original Enum Values Type + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + - in: query + name: show_enum_origins + schema: + type: string + enum: + - type + description: 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) + examples: + OriginalEnumValuesType: + value: type + summary: Original Enum Values Type + - in: query + name: status + schema: + type: string + nullable: true + enum: + - DRAFT + - OPEN + - PAID + - PARTIALLY_PAID + - SUBMITTED + - VOID + description: |- + If provided, will only return Invoices with this status. + + * `PAID` - PAID + * `DRAFT` - DRAFT + * `SUBMITTED` - SUBMITTED + * `PARTIALLY_PAID` - PARTIALLY_PAID + * `OPEN` - OPEN + * `VOID` - VOID + - in: query + name: type + schema: + type: string + nullable: true + enum: + - ACCOUNTS_PAYABLE + - ACCOUNTS_RECEIVABLE + description: |- + If provided, will only return Invoices with this type. + + * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE + * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE + tags: + - invoices + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedInvoiceList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + post: + operationId: invoices_create + description: "Creates an `Invoice` object with the given values.\n \ + \ Including a `PurchaseOrder` id in the `purchase_orders` property will + generate an Accounts Payable Invoice from the specified Purchase Order(s).\n\ + \ " + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: is_debug_mode + schema: + type: boolean + description: Whether to include debug fields (such as log file links) in the + response. + - in: query + name: run_async + schema: + type: boolean + description: Whether or not third-party updates should be run asynchronously. + tags: + - invoices + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/InvoiceEndpointRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/InvoiceEndpointRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/InvoiceEndpointRequest' + required: true + security: + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/InvoiceResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /accounting/v1/invoices/{id}: + get: + operationId: invoices_retrieve + description: Returns an `Invoice` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - accounting_period + - applied_credit_notes + - applied_payments + - applied_vendor_credits + - company + - contact + - employee + - line_items + - payment_term + - payments + - purchase_orders + - tracking_categories + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ? ExpandPayments,AppliedPayments,LineItems,TrackingCategories,PurchaseOrders,AppliedCreditNotes,AppliedVendorCredits,Contact,Company,Employee,AccountingPeriod,PaymentTerm + : value: + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + summary: Expand Payments, Applied_payments, Line_items, Tracking_categories, + Purchase_orders, Applied_credit_notes, Applied_vendor_credits, Contact, + Company, Employee, Accounting_period, Payment_term + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_remote_fields + schema: + type: boolean + description: Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: remote_fields + schema: + type: string + enum: + - type + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesType: + value: type + summary: Original Enum Values Type + - in: query + name: show_enum_origins + schema: + type: string + enum: + - type + description: 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) + examples: + OriginalEnumValuesType: + value: type + summary: Original Enum Values Type + tags: + - invoices + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Invoice' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + patch: + operationId: invoices_partial_update + description: Updates an `Invoice` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: is_debug_mode + schema: + type: boolean + description: Whether to include debug fields (such as log file links) in the + response. + - in: query + name: run_async + schema: + type: boolean + description: Whether or not third-party updates should be run asynchronously. + tags: + - invoices + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedInvoiceEndpointRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedInvoiceEndpointRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedInvoiceEndpointRequest' + required: true + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/InvoiceResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /accounting/v1/invoices/line-items/remote-field-classes: + get: + operationId: invoices_line_items_remote_field_classes_list + description: Returns a list of `RemoteFieldClass` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: is_common_model_field + schema: + type: boolean + nullable: true + description: If provided, will only return remote field classes with this + is_common_model_field value + - in: query + name: is_custom + schema: + type: boolean + nullable: true + description: If provided, will only return remote fields classes with this + is_custom value + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - invoices + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedRemoteFieldClassList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /accounting/v1/invoices/meta/patch/{id}: + get: + operationId: invoices_meta_patch_retrieve + description: Returns metadata for `Invoice` PATCHs. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + tags: + - invoices + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetaResponse' + description: '' + x-merge-meta-patch: META_PATCH + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/invoices/meta/post: + get: + operationId: invoices_meta_post_retrieve + description: Returns metadata for `Invoice` POSTs. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - invoices + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetaResponse' + description: '' + x-merge-meta-post: META_POST + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/invoices/remote-field-classes: + get: + operationId: invoices_remote_field_classes_list + description: Returns a list of `RemoteFieldClass` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: is_common_model_field + schema: + type: boolean + nullable: true + description: If provided, will only return remote field classes with this + is_common_model_field value + - in: query + name: is_custom + schema: + type: boolean + nullable: true + description: If provided, will only return remote fields classes with this + is_custom value + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - invoices + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedRemoteFieldClassList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /accounting/v1/issues: + get: + operationId: issues_list + description: Gets all issues for Organization. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: query + name: account_token + schema: + type: string + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: end_date + schema: + type: string + description: If included, will only include issues whose most recent action + occurred before this time + - in: query + name: end_user_organization_name + schema: + type: string + - in: query + name: first_incident_time_after + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return issues whose first incident time + was after this datetime. + - in: query + name: first_incident_time_before + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return issues whose first incident time + was before this datetime. + - in: query + name: include_muted + schema: + type: string + description: If true, will include muted issues + - in: query + name: integration_name + schema: + type: string + - in: query + name: last_incident_time_after + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return issues whose last incident time + was after this datetime. + - in: query + name: last_incident_time_before + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return issues whose last incident time + was before this datetime. + - in: query + name: linked_account_id + schema: + type: string + description: If provided, will only include issues pertaining to the linked + account passed in. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: start_date + schema: + type: string + description: If included, will only include issues whose most recent action + occurred after this time + - in: query + name: status + schema: + type: string + enum: + - ONGOING + - RESOLVED + description: |- + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + tags: + - issues + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedIssueList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/issues/{id}: + get: + operationId: issues_retrieve + description: Get a specific issue. + parameters: + - in: path + name: id + schema: + type: string + format: uuid + required: true + tags: + - issues + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Issue' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/items: + get: + operationId: items_list + description: Returns a list of `Item` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: company_id + schema: + type: string + description: If provided, will only return items for this company. + examples: + CompanyId: + summary: company_id + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - company + - purchase_account + - purchase_tax_rate + - sales_account + - sales_tax_rate + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandPurchaseAccount,SalesAccount,Company,SalesTaxRate,PurchaseTaxRate: + value: purchase_account,sales_account,company,sales_tax_rate,purchase_tax_rate + summary: Expand Purchase_account, Sales_account, Company, Sales_tax_rate, + Purchase_tax_rate + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_fields + schema: + type: string + enum: + - status + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesStatus: + value: status + summary: Original Enum Values Status + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + - in: query + name: show_enum_origins + schema: + type: string + enum: + - status + description: 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) + examples: + OriginalEnumValuesStatus: + value: status + summary: Original Enum Values Status + tags: + - items + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedItemList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + post: + operationId: items_create + description: Creates an `Item` object with the given values. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: is_debug_mode + schema: + type: boolean + description: Whether to include debug fields (such as log file links) in the + response. + - in: query + name: run_async + schema: + type: boolean + description: Whether or not third-party updates should be run asynchronously. + tags: + - items + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ItemEndpointRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ItemEndpointRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/ItemEndpointRequest' + required: true + security: + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/ItemResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /accounting/v1/items/{id}: + get: + operationId: items_retrieve + description: Returns an `Item` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - company + - purchase_account + - purchase_tax_rate + - sales_account + - sales_tax_rate + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandPurchaseAccount,SalesAccount,Company,SalesTaxRate,PurchaseTaxRate: + value: purchase_account,sales_account,company,sales_tax_rate,purchase_tax_rate + summary: Expand Purchase_account, Sales_account, Company, Sales_tax_rate, + Purchase_tax_rate + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: remote_fields + schema: + type: string + enum: + - status + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesStatus: + value: status + summary: Original Enum Values Status + - in: query + name: show_enum_origins + schema: + type: string + enum: + - status + description: 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) + examples: + OriginalEnumValuesStatus: + value: status + summary: Original Enum Values Status + tags: + - items + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Item' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + patch: + operationId: items_partial_update + description: Updates an `Item` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: is_debug_mode + schema: + type: boolean + description: Whether to include debug fields (such as log file links) in the + response. + - in: query + name: run_async + schema: + type: boolean + description: Whether or not third-party updates should be run asynchronously. + tags: + - items + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedItemEndpointRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedItemEndpointRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedItemEndpointRequest' + required: true + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ItemResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /accounting/v1/items/meta/patch/{id}: + get: + operationId: items_meta_patch_retrieve + description: Returns metadata for `Item` PATCHs. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + tags: + - items + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetaResponse' + description: '' + x-merge-meta-patch: META_PATCH + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/items/meta/post: + get: + operationId: items_meta_post_retrieve + description: Returns metadata for `Item` POSTs. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - items + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetaResponse' + description: '' + x-merge-meta-post: META_POST + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/journal-entries: + get: + operationId: journal_entries_list + description: Returns a list of `JournalEntry` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: company_id + schema: + type: string + description: If provided, will only return journal entries for this company. + examples: + CompanyId: + summary: company_id + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - accounting_period + - applied_payments + - company + - lines + - payments + - tracking_categories + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandLines,Payments,AppliedPayments,TrackingCategories,Company,AccountingPeriod: + value: lines,payments,applied_payments,tracking_categories,company,accounting_period + summary: Expand Lines, Payments, Applied_payments, Tracking_categories, + Company, Accounting_period + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_remote_fields + schema: + type: boolean + description: Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + - in: query + name: transaction_date_after + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return objects created after this datetime. + - in: query + name: transaction_date_before + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return objects created before this datetime. + tags: + - journal-entries + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedJournalEntryList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + post: + operationId: journal_entries_create + description: Creates a `JournalEntry` object with the given values. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: is_debug_mode + schema: + type: boolean + description: Whether to include debug fields (such as log file links) in the + response. + - in: query + name: run_async + schema: + type: boolean + description: Whether or not third-party updates should be run asynchronously. + tags: + - journal-entries + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/JournalEntryEndpointRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/JournalEntryEndpointRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/JournalEntryEndpointRequest' + required: true + security: + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/JournalEntryResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/journal-entries/{id}: + get: + operationId: journal_entries_retrieve + description: Returns a `JournalEntry` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - accounting_period + - applied_payments + - company + - lines + - payments + - tracking_categories + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandLines,Payments,AppliedPayments,TrackingCategories,Company,AccountingPeriod: + value: lines,payments,applied_payments,tracking_categories,company,accounting_period + summary: Expand Lines, Payments, Applied_payments, Tracking_categories, + Company, Accounting_period + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_remote_fields + schema: + type: boolean + description: Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - journal-entries + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/JournalEntry' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/journal-entries/lines/remote-field-classes: + get: + operationId: journal_entries_lines_remote_field_classes_list + description: Returns a list of `RemoteFieldClass` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: is_common_model_field + schema: + type: boolean + nullable: true + description: If provided, will only return remote field classes with this + is_common_model_field value + - in: query + name: is_custom + schema: + type: boolean + nullable: true + description: If provided, will only return remote fields classes with this + is_custom value + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - journal-entries + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedRemoteFieldClassList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /accounting/v1/journal-entries/meta/post: + get: + operationId: journal_entries_meta_post_retrieve + description: Returns metadata for `JournalEntry` POSTs. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - journal-entries + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetaResponse' + description: '' + x-merge-meta-post: META_POST + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/journal-entries/remote-field-classes: + get: + operationId: journal_entries_remote_field_classes_list + description: Returns a list of `RemoteFieldClass` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: is_common_model_field + schema: + type: boolean + nullable: true + description: If provided, will only return remote field classes with this + is_common_model_field value + - in: query + name: is_custom + schema: + type: boolean + nullable: true + description: If provided, will only return remote fields classes with this + is_custom value + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - journal-entries + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedRemoteFieldClassList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /accounting/v1/link-token: + post: + operationId: link_token_create + description: Creates a link token to be used when linking a new end user. + tags: + - link-token + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EndUserDetailsRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/EndUserDetailsRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/EndUserDetailsRequest' + required: true + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/LinkToken' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/linked-account-scopes: + get: + operationId: linked_account_scopes_retrieve + description: Get all available permissions for Merge Common Models and fields + for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - scopes + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CommonModelScopeAPI' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + post: + operationId: linked_account_scopes_create + description: Update permissions for any Common Model or field for a single Linked + Account. Any Scopes not set in this POST request will inherit the default + Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes) + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - scopes + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LinkedAccountCommonModelScopeDeserializerRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/LinkedAccountCommonModelScopeDeserializerRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/LinkedAccountCommonModelScopeDeserializerRequest' + required: true + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CommonModelScopeAPI' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/linked-accounts: + get: + operationId: linked_accounts_list + description: List linked accounts for your organization. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: query + name: category + schema: + type: string + nullable: true + enum: + - accounting + - ats + - crm + - filestorage + - hris + - mktg + - ticketing + description: |- + Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing` + + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: end_user_email_address + schema: + type: string + description: If provided, will only return linked accounts associated with + the given email address. + - in: query + name: end_user_organization_name + schema: + type: string + description: If provided, will only return linked accounts associated with + the given organization name. + - in: query + name: end_user_origin_id + schema: + type: string + description: If provided, will only return linked accounts associated with + the given origin ID. + - in: query + name: end_user_origin_ids + schema: + type: string + description: Comma-separated list of EndUser origin IDs, making it possible + to specify multiple EndUsers at once. + - in: query + name: id + schema: + type: string + format: uuid + - in: query + name: ids + schema: + type: string + description: Comma-separated list of LinkedAccount IDs, making it possible + to specify multiple LinkedAccounts at once. + - in: query + name: include_duplicates + schema: + type: boolean + description: 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. + - in: query + name: integration_name + schema: + type: string + description: If provided, will only return linked accounts associated with + the given integration name. + - in: query + name: is_test_account + schema: + type: string + description: If included, will only include test linked accounts. If not included, + will only include non-test linked accounts. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: status + schema: + type: string + description: 'Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, + `RELINK_NEEDED`' + tags: + - linked-accounts + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedAccountDetailsAndActionsList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/passthrough: + post: + operationId: passthrough_create + description: Pull data from an endpoint not currently supported by Merge. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - passthrough + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DataPassthroughRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/DataPassthroughRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/DataPassthroughRequest' + required: true + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RemoteResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/payment-methods: + get: + operationId: payment_methods_list + description: Returns a list of `PaymentMethod` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - payment-methods + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedPaymentMethodList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /accounting/v1/payment-methods/{id}: + get: + operationId: payment_methods_retrieve + description: Returns a `PaymentMethod` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - payment-methods + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentMethod' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /accounting/v1/payment-terms: + get: + operationId: payment_terms_list + description: Returns a list of `PaymentTerm` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - company + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandCompany: + value: company + summary: Expand Company + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - payment-terms + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedPaymentTermList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /accounting/v1/payment-terms/{id}: + get: + operationId: payment_terms_retrieve + description: Returns a `PaymentTerm` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - company + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandCompany: + value: company + summary: Expand Company + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - payment-terms + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentTerm' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /accounting/v1/payments: + get: + operationId: payments_list + description: Returns a list of `Payment` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: account_id + schema: + type: string + description: If provided, will only return payments for this account. + examples: + AccountId: + summary: account_id + - in: query + name: company_id + schema: + type: string + description: If provided, will only return payments for this company. + examples: + CompanyId: + summary: company_id + - in: query + name: contact_id + schema: + type: string + description: If provided, will only return payments for this contact. + examples: + ContactId: + summary: contact_id + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - account + - accounting_period + - applied_to_lines + - company + - contact + - payment_method + - tracking_categories + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandTrackingCategories,AppliedToLines,Contact,Account,Company,AccountingPeriod,PaymentMethod: + value: + tracking_categories,applied_to_lines,contact,account,company,accounting_period,payment_method + summary: Expand Tracking_categories, Applied_to_lines, Contact, Account, + Company, Accounting_period, Payment_method + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_remote_fields + schema: + type: boolean + description: Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + - in: query + name: transaction_date_after + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return objects created after this datetime. + - in: query + name: transaction_date_before + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return objects created before this datetime. + tags: + - payments + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedPaymentList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + post: + operationId: payments_create + description: Creates a `Payment` object with the given values. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: is_debug_mode + schema: + type: boolean + description: Whether to include debug fields (such as log file links) in the + response. + - in: query + name: run_async + schema: + type: boolean + description: Whether or not third-party updates should be run asynchronously. + tags: + - payments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentEndpointRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PaymentEndpointRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/PaymentEndpointRequest' + required: true + security: + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/payments/{id}: + get: + operationId: payments_retrieve + description: Returns a `Payment` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - account + - accounting_period + - applied_to_lines + - company + - contact + - payment_method + - tracking_categories + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandTrackingCategories,AppliedToLines,Contact,Account,Company,AccountingPeriod,PaymentMethod: + value: + tracking_categories,applied_to_lines,contact,account,company,accounting_period,payment_method + summary: Expand Tracking_categories, Applied_to_lines, Contact, Account, + Company, Accounting_period, Payment_method + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_remote_fields + schema: + type: boolean + description: Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - payments + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Payment' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + patch: + operationId: payments_partial_update + description: Updates a `Payment` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: is_debug_mode + schema: + type: boolean + description: Whether to include debug fields (such as log file links) in the + response. + - in: query + name: run_async + schema: + type: boolean + description: Whether or not third-party updates should be run asynchronously. + tags: + - payments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedPaymentEndpointRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedPaymentEndpointRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedPaymentEndpointRequest' + required: true + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /accounting/v1/payments/line-items/remote-field-classes: + get: + operationId: payments_line_items_remote_field_classes_list + description: Returns a list of `RemoteFieldClass` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: is_common_model_field + schema: + type: boolean + nullable: true + description: If provided, will only return remote field classes with this + is_common_model_field value + - in: query + name: is_custom + schema: + type: boolean + nullable: true + description: If provided, will only return remote fields classes with this + is_custom value + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - payments + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedRemoteFieldClassList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /accounting/v1/payments/meta/patch/{id}: + get: + operationId: payments_meta_patch_retrieve + description: Returns metadata for `Payment` PATCHs. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + tags: + - payments + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetaResponse' + description: '' + x-merge-meta-patch: META_PATCH + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/payments/meta/post: + get: + operationId: payments_meta_post_retrieve + description: Returns metadata for `Payment` POSTs. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - payments + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetaResponse' + description: '' + x-merge-meta-post: META_POST + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/payments/remote-field-classes: + get: + operationId: payments_remote_field_classes_list + description: Returns a list of `RemoteFieldClass` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: is_common_model_field + schema: + type: boolean + nullable: true + description: If provided, will only return remote field classes with this + is_common_model_field value + - in: query + name: is_custom + schema: + type: boolean + nullable: true + description: If provided, will only return remote fields classes with this + is_custom value + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - payments + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedRemoteFieldClassList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /accounting/v1/phone-numbers/{id}: + get: + operationId: phone_numbers_retrieve + description: Returns an `AccountingPhoneNumber` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - phone-numbers + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AccountingPhoneNumber' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/projects: + get: + operationId: projects_list + description: Returns a list of `Project` objects. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - company + - contact + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandCompany,Contact: + value: company,contact + summary: Expand Company, Contact + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - projects + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedProjectList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /accounting/v1/projects/{id}: + get: + operationId: projects_retrieve + description: Returns a `Project` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - company + - contact + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandCompany,Contact: + value: company,contact + summary: Expand Company, Contact + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - projects + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Project' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /accounting/v1/purchase-orders: + get: + operationId: purchase_orders_list + description: Returns a list of `PurchaseOrder` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: company_id + schema: + type: string + description: If provided, will only return purchase orders for this company. + examples: + CompanyId: + summary: company_id + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - accounting_period + - company + - delivery_address + - line_items + - payment_term + - tracking_categories + - vendor + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandLineItems,TrackingCategories,DeliveryAddress,Vendor,Company,AccountingPeriod,PaymentTerm: + value: + line_items,tracking_categories,delivery_address,vendor,company,accounting_period,payment_term + summary: Expand Line_items, Tracking_categories, Delivery_address, Vendor, + Company, Accounting_period, Payment_term + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_remote_fields + schema: + type: boolean + description: Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: issue_date_after + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return objects created after this datetime. + - in: query + name: issue_date_before + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return objects created before this datetime. + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_fields + schema: + type: string + enum: + - status + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesStatus: + value: status + summary: Original Enum Values Status + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + - in: query + name: show_enum_origins + schema: + type: string + enum: + - status + description: 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) + examples: + OriginalEnumValuesStatus: + value: status + summary: Original Enum Values Status + tags: + - purchase-orders + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedPurchaseOrderList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + post: + operationId: purchase_orders_create + description: Creates a `PurchaseOrder` object with the given values. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: is_debug_mode + schema: + type: boolean + description: Whether to include debug fields (such as log file links) in the + response. + - in: query + name: run_async + schema: + type: boolean + description: Whether or not third-party updates should be run asynchronously. + tags: + - purchase-orders + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PurchaseOrderEndpointRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PurchaseOrderEndpointRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/PurchaseOrderEndpointRequest' + required: true + security: + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/PurchaseOrderResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/purchase-orders/{id}: + get: + operationId: purchase_orders_retrieve + description: Returns a `PurchaseOrder` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - accounting_period + - company + - delivery_address + - line_items + - payment_term + - tracking_categories + - vendor + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandLineItems,TrackingCategories,DeliveryAddress,Vendor,Company,AccountingPeriod,PaymentTerm: + value: + line_items,tracking_categories,delivery_address,vendor,company,accounting_period,payment_term + summary: Expand Line_items, Tracking_categories, Delivery_address, Vendor, + Company, Accounting_period, Payment_term + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_remote_fields + schema: + type: boolean + description: Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: remote_fields + schema: + type: string + enum: + - status + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesStatus: + value: status + summary: Original Enum Values Status + - in: query + name: show_enum_origins + schema: + type: string + enum: + - status + description: 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) + examples: + OriginalEnumValuesStatus: + value: status + summary: Original Enum Values Status + tags: + - purchase-orders + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PurchaseOrder' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/purchase-orders/line-items/remote-field-classes: + get: + operationId: purchase_orders_line_items_remote_field_classes_list + description: Returns a list of `RemoteFieldClass` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: is_common_model_field + schema: + type: boolean + nullable: true + description: If provided, will only return remote field classes with this + is_common_model_field value + - in: query + name: is_custom + schema: + type: boolean + nullable: true + description: If provided, will only return remote fields classes with this + is_custom value + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - purchase-orders + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedRemoteFieldClassList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /accounting/v1/purchase-orders/meta/post: + get: + operationId: purchase_orders_meta_post_retrieve + description: Returns metadata for `PurchaseOrder` POSTs. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - purchase-orders + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetaResponse' + description: '' + x-merge-meta-post: META_POST + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/purchase-orders/remote-field-classes: + get: + operationId: purchase_orders_remote_field_classes_list + description: Returns a list of `RemoteFieldClass` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: is_common_model_field + schema: + type: boolean + nullable: true + description: If provided, will only return remote field classes with this + is_common_model_field value + - in: query + name: is_custom + schema: + type: boolean + nullable: true + description: If provided, will only return remote fields classes with this + is_custom value + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - purchase-orders + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedRemoteFieldClassList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /accounting/v1/regenerate-key: + post: + operationId: regenerate_key_create + description: Exchange remote keys. + tags: + - regenerate-key + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RemoteKeyForRegenerationRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/RemoteKeyForRegenerationRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/RemoteKeyForRegenerationRequest' + required: true + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RemoteKey' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/remote-fields: + get: + operationId: remote_fields_retrieve + description: Get all remote fields for a Linked Account. Remote fields are third-party + fields that are accessible after initial sync if remote_data is enabled. You + can use remote fields to override existing Merge fields or map a new Merge + field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: common_models + schema: + type: string + description: A comma seperated list of Common Model names. If included, will + only return Remote Fields for those Common Models. + - in: query + name: include_example_values + schema: + type: string + description: 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. + tags: + - field-mapping + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RemoteFieldAPIResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/sync-status: + get: + operationId: sync_status_list + description: 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). + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - sync-status + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedSyncStatusList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/sync-status/resync: + post: + operationId: 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. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - force-resync + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SyncStatus' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/target-fields: + get: + operationId: target_fields_retrieve + description: Get all organization-wide Target Fields, this will not include + any Linked Account specific Target Fields. Organization-wide Target Fields + are additional fields appended to the Merge Common Model for all Linked Accounts + in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - field-mapping + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ExternalTargetFieldAPIResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/tax-rates: + get: + operationId: tax_rates_list + description: Returns a list of `TaxRate` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: company_id + schema: + type: string + description: If provided, will only return tax rates for this company. + examples: + CompanyId: + summary: company_id + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - company + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandCompany: + value: company + summary: Expand Company + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - in: query + name: name + schema: + type: string + nullable: true + description: If provided, will only return TaxRates with this name. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + tags: + - tax-rates + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedTaxRateList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /accounting/v1/tax-rates/{id}: + get: + operationId: tax_rates_retrieve + description: Returns a `TaxRate` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - company + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandCompany: + value: company + summary: Expand Company + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - tax-rates + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/TaxRate' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /accounting/v1/tracking-categories: + get: + operationId: tracking_categories_list + description: Returns a list of `TrackingCategory` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: category_type + schema: + type: string + nullable: true + enum: + - '' + - CLASS + - DEPARTMENT + - + description: If provided, will only return tracking categories with this type. + - in: query + name: company_id + schema: + type: string + description: If provided, will only return tracking categories for this company. + examples: + CompanyId: + summary: company_id + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - company + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandCompany: + value: company + summary: Expand Company + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - in: query + name: name + schema: + type: string + nullable: true + description: If provided, will only return tracking categories with this name. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_fields + schema: + type: string + enum: + - status + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesStatus: + value: status + summary: Original Enum Values Status + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + - in: query + name: show_enum_origins + schema: + type: string + enum: + - status + description: 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) + examples: + OriginalEnumValuesStatus: + value: status + summary: Original Enum Values Status + - in: query + name: status + schema: + type: string + nullable: true + enum: + - '' + - ACTIVE + - ARCHIVED + - + description: If provided, will only return tracking categories with this status. + tags: + - tracking-categories + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedTrackingCategoryList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/tracking-categories/{id}: + get: + operationId: tracking_categories_retrieve + description: Returns a `TrackingCategory` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - company + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandCompany: + value: company + summary: Expand Company + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: remote_fields + schema: + type: string + enum: + - status + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesStatus: + value: status + summary: Original Enum Values Status + - in: query + name: show_enum_origins + schema: + type: string + enum: + - status + description: 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) + examples: + OriginalEnumValuesStatus: + value: status + summary: Original Enum Values Status + tags: + - tracking-categories + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/TrackingCategory' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/transactions: + get: + operationId: transactions_list + description: Returns a list of `Transaction` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: company_id + schema: + type: string + description: If provided, will only return accounting transactions for this + company. + examples: + CompanyId: + summary: company_id + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - account + - accounting_period + - contact + - line_items + - tracking_categories + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandLineItems,TrackingCategories,Contact,Account,AccountingPeriod: + value: line_items,tracking_categories,contact,account,accounting_period + summary: Expand Line_items, Tracking_categories, Contact, Account, Accounting_period + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + - in: query + name: transaction_date_after + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return objects created after this datetime. + - in: query + name: transaction_date_before + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return objects created before this datetime. + tags: + - transactions + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedTransactionList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/transactions/{id}: + get: + operationId: transactions_retrieve + description: Returns a `Transaction` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - account + - accounting_period + - contact + - line_items + - tracking_categories + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandLineItems,TrackingCategories,Contact,Account,AccountingPeriod: + value: line_items,tracking_categories,contact,account,accounting_period + summary: Expand Line_items, Tracking_categories, Contact, Account, Accounting_period + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - transactions + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Transaction' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/vendor-credits: + get: + operationId: vendor_credits_list + description: Returns a list of `VendorCredit` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: company_id + schema: + type: string + description: If provided, will only return vendor credits for this company. + examples: + CompanyId: + summary: company_id + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - accounting_period + - company + - lines + - tracking_categories + - vendor + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandLines,TrackingCategories,Vendor,Company,AccountingPeriod: + value: lines,tracking_categories,vendor,company,accounting_period + summary: Expand Lines, Tracking_categories, Vendor, Company, Accounting_period + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + - in: query + name: transaction_date_after + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return objects created after this datetime. + - in: query + name: transaction_date_before + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return objects created before this datetime. + tags: + - vendor-credits + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedVendorCreditList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + post: + operationId: vendor_credits_create + description: Creates a `VendorCredit` object with the given values. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: is_debug_mode + schema: + type: boolean + description: Whether to include debug fields (such as log file links) in the + response. + - in: query + name: run_async + schema: + type: boolean + description: Whether or not third-party updates should be run asynchronously. + tags: + - vendor-credits + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/VendorCreditEndpointRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/VendorCreditEndpointRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/VendorCreditEndpointRequest' + required: true + security: + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/VendorCreditResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/vendor-credits/{id}: + get: + operationId: vendor_credits_retrieve + description: Returns a `VendorCredit` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - accounting_period + - company + - lines + - tracking_categories + - vendor + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandLines,TrackingCategories,Vendor,Company,AccountingPeriod: + value: lines,tracking_categories,vendor,company,accounting_period + summary: Expand Lines, Tracking_categories, Vendor, Company, Accounting_period + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - vendor-credits + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/VendorCredit' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/vendor-credits/meta/post: + get: + operationId: vendor_credits_meta_post_retrieve + description: Returns metadata for `VendorCredit` POSTs. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - vendor-credits + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetaResponse' + description: '' + x-merge-meta-post: META_POST + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /accounting/v1/webhook-receivers: + get: + operationId: webhook_receivers_list + description: Returns a list of `WebhookReceiver` objects. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - webhook-receivers + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/WebhookReceiver' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + post: + operationId: webhook_receivers_create + description: Creates a `WebhookReceiver` object with the given values. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - webhook-receivers + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/WebhookReceiverRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/WebhookReceiverRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/WebhookReceiverRequest' + required: true + security: + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/WebhookReceiver' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC +components: + schemas: + Account: + type: object + description: |- + # The Account Object + ### Description + An `Account` represents a category in a company’s ledger in which a financial transaction is recorded against. The aggregation of each `Account` object is often referred to as the **Chart of Accounts**. + + An `Account` can be classified into one of the following categories, determined through the `classification` field: + * __Asset:__ Accounts Receivable and Bank Accounts + * __Liability:__ Accounts Payable and Credit Card Accounts + * __Equity:__ Treasury Accounts and Retained Earnings + * __Revenue:__ Income and Other Income + * __Expense:__ Cost of Goods Sold and Office Expenses + + ### Usage Example + Fetch from the `LIST Accounts` endpoint and view a company's accounts. + properties: + id: + type: string + format: uuid + readOnly: true + example: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '21' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + name: + type: string + nullable: true + description: The account's name. + example: Cash + description: + type: string + nullable: true + description: The account's description. + example: Cash + classification: + oneOf: + - $ref: '#/components/schemas/ClassificationEnum' + - type: string + nullable: true + description: |- + The account's broadest grouping. + + * `ASSET` - ASSET + * `EQUITY` - EQUITY + * `EXPENSE` - EXPENSE + * `LIABILITY` - LIABILITY + * `REVENUE` - REVENUE + example: ASSET + type: + type: string + nullable: true + description: The account's type is a narrower and more specific grouping + within the account's classification. + example: Asset + account_type: + oneOf: + - $ref: '#/components/schemas/AccountAccountTypeEnum' + - type: string + nullable: true + description: |- + Normalized account type- which is a narrower and more specific grouping within the account's classification. + + * `BANK` - BANK + * `CREDIT_CARD` - CREDIT_CARD + * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE + * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE + * `FIXED_ASSET` - FIXED_ASSET + * `OTHER_ASSET` - OTHER_ASSET + * `OTHER_CURRENT_ASSET` - OTHER_CURRENT_ASSET + * `OTHER_EXPENSE` - OTHER_EXPENSE + * `OTHER_INCOME` - OTHER_INCOME + * `COST_OF_GOODS_SOLD` - COST_OF_GOODS_SOLD + * `OTHER_CURRENT_LIABILITY` - OTHER_CURRENT_LIABILITY + * `LONG_TERM_LIABILITY` - LONG_TERM_LIABILITY + * `NON_POSTING` - NON_POSTING + example: FIXED_ASSET + status: + oneOf: + - $ref: '#/components/schemas/AccountStatusEnum' + - type: string + nullable: true + description: |- + The account's status. + + * `ACTIVE` - ACTIVE + * `PENDING` - PENDING + * `INACTIVE` - INACTIVE + example: ACTIVE + current_balance: + type: number + format: double + nullable: true + description: The account's current balance. + currency: + oneOf: + - $ref: '#/components/schemas/TransactionCurrencyEnum' + - type: string + nullable: true + description: |- + The account's currency. + + * `XUA` - ADB Unit of Account + * `AFN` - Afghan Afghani + * `AFA` - Afghan Afghani (1927–2002) + * `ALL` - Albanian Lek + * `ALK` - Albanian Lek (1946–1965) + * `DZD` - Algerian Dinar + * `ADP` - Andorran Peseta + * `AOA` - Angolan Kwanza + * `AOK` - Angolan Kwanza (1977–1991) + * `AON` - Angolan New Kwanza (1990–2000) + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + * `ARA` - Argentine Austral + * `ARS` - Argentine Peso + * `ARM` - Argentine Peso (1881–1970) + * `ARP` - Argentine Peso (1983–1985) + * `ARL` - Argentine Peso Ley (1970–1983) + * `AMD` - Armenian Dram + * `AWG` - Aruban Florin + * `AUD` - Australian Dollar + * `ATS` - Austrian Schilling + * `AZN` - Azerbaijani Manat + * `AZM` - Azerbaijani Manat (1993–2006) + * `BSD` - Bahamian Dollar + * `BHD` - Bahraini Dinar + * `BDT` - Bangladeshi Taka + * `BBD` - Barbadian Dollar + * `BYN` - Belarusian Ruble + * `BYB` - Belarusian Ruble (1994–1999) + * `BYR` - Belarusian Ruble (2000–2016) + * `BEF` - Belgian Franc + * `BEC` - Belgian Franc (convertible) + * `BEL` - Belgian Franc (financial) + * `BZD` - Belize Dollar + * `BMD` - Bermudan Dollar + * `BTN` - Bhutanese Ngultrum + * `BOB` - Bolivian Boliviano + * `BOL` - Bolivian Boliviano (1863–1963) + * `BOV` - Bolivian Mvdol + * `BOP` - Bolivian Peso + * `BAM` - Bosnia-Herzegovina Convertible Mark + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + * `BWP` - Botswanan Pula + * `BRC` - Brazilian Cruzado (1986–1989) + * `BRZ` - Brazilian Cruzeiro (1942–1967) + * `BRE` - Brazilian Cruzeiro (1990–1993) + * `BRR` - Brazilian Cruzeiro (1993–1994) + * `BRN` - Brazilian New Cruzado (1989–1990) + * `BRB` - Brazilian New Cruzeiro (1967–1986) + * `BRL` - Brazilian Real + * `GBP` - British Pound + * `BND` - Brunei Dollar + * `BGL` - Bulgarian Hard Lev + * `BGN` - Bulgarian Lev + * `BGO` - Bulgarian Lev (1879–1952) + * `BGM` - Bulgarian Socialist Lev + * `BUK` - Burmese Kyat + * `BIF` - Burundian Franc + * `XPF` - CFP Franc + * `KHR` - Cambodian Riel + * `CAD` - Canadian Dollar + * `CVE` - Cape Verdean Escudo + * `KYD` - Cayman Islands Dollar + * `XAF` - Central African CFA Franc + * `CLE` - Chilean Escudo + * `CLP` - Chilean Peso + * `CLF` - Chilean Unit of Account (UF) + * `CNX` - Chinese People’s Bank Dollar + * `CNY` - Chinese Yuan + * `CNH` - Chinese Yuan (offshore) + * `COP` - Colombian Peso + * `COU` - Colombian Real Value Unit + * `KMF` - Comorian Franc + * `CDF` - Congolese Franc + * `CRC` - Costa Rican Colón + * `HRD` - Croatian Dinar + * `HRK` - Croatian Kuna + * `CUC` - Cuban Convertible Peso + * `CUP` - Cuban Peso + * `CYP` - Cypriot Pound + * `CZK` - Czech Koruna + * `CSK` - Czechoslovak Hard Koruna + * `DKK` - Danish Krone + * `DJF` - Djiboutian Franc + * `DOP` - Dominican Peso + * `NLG` - Dutch Guilder + * `XCD` - East Caribbean Dollar + * `DDM` - East German Mark + * `ECS` - Ecuadorian Sucre + * `ECV` - Ecuadorian Unit of Constant Value + * `EGP` - Egyptian Pound + * `GQE` - Equatorial Guinean Ekwele + * `ERN` - Eritrean Nakfa + * `EEK` - Estonian Kroon + * `ETB` - Ethiopian Birr + * `EUR` - Euro + * `XBA` - European Composite Unit + * `XEU` - European Currency Unit + * `XBB` - European Monetary Unit + * `XBC` - European Unit of Account (XBC) + * `XBD` - European Unit of Account (XBD) + * `FKP` - Falkland Islands Pound + * `FJD` - Fijian Dollar + * `FIM` - Finnish Markka + * `FRF` - French Franc + * `XFO` - French Gold Franc + * `XFU` - French UIC-Franc + * `GMD` - Gambian Dalasi + * `GEK` - Georgian Kupon Larit + * `GEL` - Georgian Lari + * `DEM` - German Mark + * `GHS` - Ghanaian Cedi + * `GHC` - Ghanaian Cedi (1979–2007) + * `GIP` - Gibraltar Pound + * `XAU` - Gold + * `GRD` - Greek Drachma + * `GTQ` - Guatemalan Quetzal + * `GWP` - Guinea-Bissau Peso + * `GNF` - Guinean Franc + * `GNS` - Guinean Syli + * `GYD` - Guyanaese Dollar + * `HTG` - Haitian Gourde + * `HNL` - Honduran Lempira + * `HKD` - Hong Kong Dollar + * `HUF` - Hungarian Forint + * `IMP` - IMP + * `ISK` - Icelandic Króna + * `ISJ` - Icelandic Króna (1918–1981) + * `INR` - Indian Rupee + * `IDR` - Indonesian Rupiah + * `IRR` - Iranian Rial + * `IQD` - Iraqi Dinar + * `IEP` - Irish Pound + * `ILS` - Israeli New Shekel + * `ILP` - Israeli Pound + * `ILR` - Israeli Shekel (1980–1985) + * `ITL` - Italian Lira + * `JMD` - Jamaican Dollar + * `JPY` - Japanese Yen + * `JOD` - Jordanian Dinar + * `KZT` - Kazakhstani Tenge + * `KES` - Kenyan Shilling + * `KWD` - Kuwaiti Dinar + * `KGS` - Kyrgystani Som + * `LAK` - Laotian Kip + * `LVL` - Latvian Lats + * `LVR` - Latvian Ruble + * `LBP` - Lebanese Pound + * `LSL` - Lesotho Loti + * `LRD` - Liberian Dollar + * `LYD` - Libyan Dinar + * `LTL` - Lithuanian Litas + * `LTT` - Lithuanian Talonas + * `LUL` - Luxembourg Financial Franc + * `LUC` - Luxembourgian Convertible Franc + * `LUF` - Luxembourgian Franc + * `MOP` - Macanese Pataca + * `MKD` - Macedonian Denar + * `MKN` - Macedonian Denar (1992–1993) + * `MGA` - Malagasy Ariary + * `MGF` - Malagasy Franc + * `MWK` - Malawian Kwacha + * `MYR` - Malaysian Ringgit + * `MVR` - Maldivian Rufiyaa + * `MVP` - Maldivian Rupee (1947–1981) + * `MLF` - Malian Franc + * `MTL` - Maltese Lira + * `MTP` - Maltese Pound + * `MRU` - Mauritanian Ouguiya + * `MRO` - Mauritanian Ouguiya (1973–2017) + * `MUR` - Mauritian Rupee + * `MXV` - Mexican Investment Unit + * `MXN` - Mexican Peso + * `MXP` - Mexican Silver Peso (1861–1992) + * `MDC` - Moldovan Cupon + * `MDL` - Moldovan Leu + * `MCF` - Monegasque Franc + * `MNT` - Mongolian Tugrik + * `MAD` - Moroccan Dirham + * `MAF` - Moroccan Franc + * `MZE` - Mozambican Escudo + * `MZN` - Mozambican Metical + * `MZM` - Mozambican Metical (1980–2006) + * `MMK` - Myanmar Kyat + * `NAD` - Namibian Dollar + * `NPR` - Nepalese Rupee + * `ANG` - Netherlands Antillean Guilder + * `TWD` - New Taiwan Dollar + * `NZD` - New Zealand Dollar + * `NIO` - Nicaraguan Córdoba + * `NIC` - Nicaraguan Córdoba (1988–1991) + * `NGN` - Nigerian Naira + * `KPW` - North Korean Won + * `NOK` - Norwegian Krone + * `OMR` - Omani Rial + * `PKR` - Pakistani Rupee + * `XPD` - Palladium + * `PAB` - Panamanian Balboa + * `PGK` - Papua New Guinean Kina + * `PYG` - Paraguayan Guarani + * `PEI` - Peruvian Inti + * `PEN` - Peruvian Sol + * `PES` - Peruvian Sol (1863–1965) + * `PHP` - Philippine Peso + * `XPT` - Platinum + * `PLN` - Polish Zloty + * `PLZ` - Polish Zloty (1950–1995) + * `PTE` - Portuguese Escudo + * `GWE` - Portuguese Guinea Escudo + * `QAR` - Qatari Rial + * `XRE` - RINET Funds + * `RHD` - Rhodesian Dollar + * `RON` - Romanian Leu + * `ROL` - Romanian Leu (1952–2006) + * `RUB` - Russian Ruble + * `RUR` - Russian Ruble (1991–1998) + * `RWF` - Rwandan Franc + * `SVC` - Salvadoran Colón + * `WST` - Samoan Tala + * `SAR` - Saudi Riyal + * `RSD` - Serbian Dinar + * `CSD` - Serbian Dinar (2002–2006) + * `SCR` - Seychellois Rupee + * `SLL` - Sierra Leonean Leone + * `XAG` - Silver + * `SGD` - Singapore Dollar + * `SKK` - Slovak Koruna + * `SIT` - Slovenian Tolar + * `SBD` - Solomon Islands Dollar + * `SOS` - Somali Shilling + * `ZAR` - South African Rand + * `ZAL` - South African Rand (financial) + * `KRH` - South Korean Hwan (1953–1962) + * `KRW` - South Korean Won + * `KRO` - South Korean Won (1945–1953) + * `SSP` - South Sudanese Pound + * `SUR` - Soviet Rouble + * `ESP` - Spanish Peseta + * `ESA` - Spanish Peseta (A account) + * `ESB` - Spanish Peseta (convertible account) + * `XDR` - Special Drawing Rights + * `LKR` - Sri Lankan Rupee + * `SHP` - St. Helena Pound + * `XSU` - Sucre + * `SDD` - Sudanese Dinar (1992–2007) + * `SDG` - Sudanese Pound + * `SDP` - Sudanese Pound (1957–1998) + * `SRD` - Surinamese Dollar + * `SRG` - Surinamese Guilder + * `SZL` - Swazi Lilangeni + * `SEK` - Swedish Krona + * `CHF` - Swiss Franc + * `SYP` - Syrian Pound + * `STN` - São Tomé & Príncipe Dobra + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + * `TVD` - TVD + * `TJR` - Tajikistani Ruble + * `TJS` - Tajikistani Somoni + * `TZS` - Tanzanian Shilling + * `XTS` - Testing Currency Code + * `THB` - Thai Baht + * `XXX` - The codes assigned for transactions where no currency is involved + * `TPE` - Timorese Escudo + * `TOP` - Tongan Paʻanga + * `TTD` - Trinidad & Tobago Dollar + * `TND` - Tunisian Dinar + * `TRY` - Turkish Lira + * `TRL` - Turkish Lira (1922–2005) + * `TMT` - Turkmenistani Manat + * `TMM` - Turkmenistani Manat (1993–2009) + * `USD` - US Dollar + * `USN` - US Dollar (Next day) + * `USS` - US Dollar (Same day) + * `UGX` - Ugandan Shilling + * `UGS` - Ugandan Shilling (1966–1987) + * `UAH` - Ukrainian Hryvnia + * `UAK` - Ukrainian Karbovanets + * `AED` - United Arab Emirates Dirham + * `UYW` - Uruguayan Nominal Wage Index Unit + * `UYU` - Uruguayan Peso + * `UYP` - Uruguayan Peso (1975–1993) + * `UYI` - Uruguayan Peso (Indexed Units) + * `UZS` - Uzbekistani Som + * `VUV` - Vanuatu Vatu + * `VES` - Venezuelan Bolívar + * `VEB` - Venezuelan Bolívar (1871–2008) + * `VEF` - Venezuelan Bolívar (2008–2018) + * `VND` - Vietnamese Dong + * `VNN` - Vietnamese Dong (1978–1985) + * `CHE` - WIR Euro + * `CHW` - WIR Franc + * `XOF` - West African CFA Franc + * `YDD` - Yemeni Dinar + * `YER` - Yemeni Rial + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + * `YUM` - Yugoslavian New Dinar (1994–2002) + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + * `ZWN` - ZWN + * `ZRN` - Zairean New Zaire (1993–1998) + * `ZRZ` - Zairean Zaire (1971–1993) + * `ZMW` - Zambian Kwacha + * `ZMK` - Zambian Kwacha (1968–2012) + * `ZWD` - Zimbabwean Dollar (1980–2008) + * `ZWR` - Zimbabwean Dollar (2008) + * `ZWL` - Zimbabwean Dollar (2009) + example: USD + account_number: + type: string + nullable: true + description: The account's number. + example: X12Y9AB + parent_account: + type: string + format: uuid + nullable: true + description: ID of the parent account. + example: 22d92d6c-22f9-11ed-861d-0242ac120002 + company: + type: string + format: uuid + nullable: true + description: The company the account belongs to. + example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /actions + data: + - Varies by platform + x-merge-model-tooltip: + title: Looking for __Bank Accounts__? + content: Bank Accounts are represented as an __Account__ with a `classification` + of __ASSET__. + x-merge-expands: '{"owner": "User"}' + x-merge-category: accounting + AccountAccountTypeEnum: + enum: + - BANK + - CREDIT_CARD + - ACCOUNTS_PAYABLE + - ACCOUNTS_RECEIVABLE + - FIXED_ASSET + - OTHER_ASSET + - OTHER_CURRENT_ASSET + - OTHER_EXPENSE + - OTHER_INCOME + - COST_OF_GOODS_SOLD + - OTHER_CURRENT_LIABILITY + - LONG_TERM_LIABILITY + - NON_POSTING + type: string + description: |- + * `BANK` - BANK + * `CREDIT_CARD` - CREDIT_CARD + * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE + * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE + * `FIXED_ASSET` - FIXED_ASSET + * `OTHER_ASSET` - OTHER_ASSET + * `OTHER_CURRENT_ASSET` - OTHER_CURRENT_ASSET + * `OTHER_EXPENSE` - OTHER_EXPENSE + * `OTHER_INCOME` - OTHER_INCOME + * `COST_OF_GOODS_SOLD` - COST_OF_GOODS_SOLD + * `OTHER_CURRENT_LIABILITY` - OTHER_CURRENT_LIABILITY + * `LONG_TERM_LIABILITY` - LONG_TERM_LIABILITY + * `NON_POSTING` - NON_POSTING + x-merge-category: accounting + AccountDetails: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + example: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd + integration: + type: string + readOnly: true + example: BambooHR + integration_slug: + type: string + readOnly: true + example: bamboohr + category: + allOf: + - $ref: '#/components/schemas/CategoryEnum' + nullable: true + example: hris + end_user_origin_id: + type: string + readOnly: true + example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + end_user_organization_name: + type: string + readOnly: true + example: Waystar Royco + end_user_email_address: + type: string + format: email + readOnly: true + example: kendall.roy@waystar-royco.com + status: + type: string + readOnly: true + example: COMPLETE + webhook_listener_url: + type: string + format: uri + readOnly: true + example: https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 + is_duplicate: + type: boolean + nullable: true + readOnly: true + description: Whether a Production Linked Account's credentials match another + existing Production Linked Account. This field is `null` for Test Linked + Accounts, incomplete Production Linked Accounts, and ignored duplicate + Production Linked Account sets. + example: true + account_type: + type: string + readOnly: true + example: PRODUCTION + completed_at: + type: string + format: date-time + nullable: true + description: The time at which account completes the linking flow. + example: '2024-08-26T20:11:19.277118Z' + x-merge-category: accounting + AccountDetailsAndActions: + type: object + description: |- + # The LinkedAccount Object + ### Description + The `LinkedAccount` object is used to represent an end user's link with a specific integration. + + ### Usage Example + View a list of your organization's `LinkedAccount` objects. + properties: + id: + type: string + example: e59b1821-f85c-4e28-a6b3-1804156f3563 + category: + oneOf: + - $ref: '#/components/schemas/CategoryEnum' + - type: string + example: hris + status: + oneOf: + - $ref: '#/components/schemas/AccountDetailsAndActionsStatusEnum' + - type: string + example: INCOMPLETE + status_detail: + type: string + example: Invalid login credentials + end_user_origin_id: + type: string + example: 3ac95cde-6c7f-4eef-afec-be710b42308d + end_user_organization_name: + type: string + example: Foo Bar, LLC + end_user_email_address: + type: string + example: hradmin@foobar.dev + subdomain: + type: string + description: The tenant or domain the customer has provided access to. + example: foobar + webhook_listener_url: + type: string + example: https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 + is_duplicate: + type: boolean + nullable: true + description: Whether a Production Linked Account's credentials match another + existing Production Linked Account. This field is `null` for Test Linked + Accounts, incomplete Production Linked Accounts, and ignored duplicate + Production Linked Account sets. + example: true + integration: + $ref: '#/components/schemas/AccountDetailsAndActionsIntegration' + example: + name: SAP SuccessFactors + categories: + - hris + - ats + image: https://cdn.merge.dev/SuccessFactors_Logo.png + square_image: https://cdn.merge.dev/SuccessFactors_Square_Logo.jpg + color: '#F6A704' + slug: sap-successfactors + passthrough_available: true + available_model_operations: + - model_name: Candidate + available_operations: + - FETCH + - CREATE + required_post_parameters: + - remote_user_id + supported_fields: + - first_name + - last_name + - company + - title + account_type: + type: string + example: PRODUCTION + completed_at: + type: string + format: date-time + example: '2024-08-26T20:11:19.277118Z' + required: + - account_type + - completed_at + - end_user_email_address + - end_user_organization_name + - id + - status + - webhook_listener_url + x-merge-sample-json: '{"id": "e59b1821-f85c-4e28-a6b3-1804156f3563", "category": + "hris", "status": "INCOMPLETE", "status_detail": "Invalid login credentials", + "end_user_origin_id": "3ac95cde-6c7f-4eef-afec-be710b42308d", "end_user_organization_name": + "Foo Bar, LLC", "end_user_email_address": "hradmin@foobar.dev", "webhook_listener_url": + "https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4", + "is_duplicate": true, "integration": {"name": "SAP SuccessFactors", "categories": + ["hris", "ats"], "image": "https://cdn.merge.dev/SuccessFactors_Logo.png", + "square_image": "https://cdn.merge.dev/SuccessFactors_Square_Logo.jpg", "color": + "#F6A704", "slug": "sap-successfactors", "passthrough_available": true, "available_model_operations": + [{"model_name": "Candidate", "available_operations": ["FETCH", "CREATE"], + "required_post_parameters": ["remote_user_id"], "supported_fields": ["first_name", + "last_name", "company", "title"]}]}}' + x-merge-category: accounting + AccountDetailsAndActionsIntegration: + type: object + properties: + name: + type: string + categories: + type: array + items: + $ref: '#/components/schemas/CategoriesEnum' + image: + type: string + square_image: + type: string + color: + type: string + slug: + type: string + passthrough_available: + type: boolean + available_model_operations: + type: array + items: + $ref: '#/components/schemas/ModelOperation' + required: + - categories + - color + - name + - passthrough_available + - slug + x-merge-category: accounting + AccountDetailsAndActionsStatusEnum: + enum: + - COMPLETE + - INCOMPLETE + - RELINK_NEEDED + - IDLE + type: string + description: |- + * `COMPLETE` - COMPLETE + * `INCOMPLETE` - INCOMPLETE + * `RELINK_NEEDED` - RELINK_NEEDED + * `IDLE` - IDLE + x-merge-category: accounting + AccountEndpointRequest: + type: object + properties: + model: + $ref: '#/components/schemas/AccountRequest' + required: + - model + x-merge-category: accounting + AccountIntegration: + type: object + properties: + name: + type: string + description: Company name. + abbreviated_name: + type: string + nullable: true + description: "Optional. This shortened name appears in places with limited + space, usually in conjunction with the platform's logo (e.g., Merge Link + menu).

Example: Workforce Now (in lieu of ADP Workforce Now), + SuccessFactors (in lieu of SAP SuccessFactors)" + categories: + type: array + items: + $ref: '#/components/schemas/CategoriesEnum' + description: Category or categories this integration belongs to. Multiple + categories should be comma separated, i.e. [ats, hris]. + readOnly: true + image: + type: string + format: uri + nullable: true + description: Company logo in rectangular shape. + square_image: + type: string + format: uri + nullable: true + description: Company logo in square shape. + color: + type: string + description: The color of this integration used for buttons and text throughout + the app and landing pages. Choose a darker, saturated color. + pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ + maxLength: 18 + slug: + type: string + readOnly: true + api_endpoints_to_documentation_urls: + type: object + additionalProperties: {} + description: "Mapping of API endpoints to documentation urls for support. + Example: {'GET': [['/common-model-scopes', 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', + 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], + 'POST': []}" + webhook_setup_guide_url: + type: string + nullable: true + description: Setup guide URL for third party webhook creation. Exposed in + Merge Docs. + category_beta_status: + type: object + description: Category or categories this integration is in beta status for. + readOnly: true + required: + - name + x-merge-category: accounting + AccountRequest: + type: object + description: |- + # The Account Object + ### Description + An `Account` represents a category in a company’s ledger in which a financial transaction is recorded against. The aggregation of each `Account` object is often referred to as the **Chart of Accounts**. + + An `Account` can be classified into one of the following categories, determined through the `classification` field: + * __Asset:__ Accounts Receivable and Bank Accounts + * __Liability:__ Accounts Payable and Credit Card Accounts + * __Equity:__ Treasury Accounts and Retained Earnings + * __Revenue:__ Income and Other Income + * __Expense:__ Cost of Goods Sold and Office Expenses + + ### Usage Example + Fetch from the `LIST Accounts` endpoint and view a company's accounts. + properties: + name: + type: string + nullable: true + description: The account's name. + example: Cash + description: + type: string + nullable: true + description: The account's description. + example: Cash + classification: + oneOf: + - $ref: '#/components/schemas/ClassificationEnum' + - type: string + nullable: true + description: |- + The account's broadest grouping. + + * `ASSET` - ASSET + * `EQUITY` - EQUITY + * `EXPENSE` - EXPENSE + * `LIABILITY` - LIABILITY + * `REVENUE` - REVENUE + example: ASSET + type: + type: string + nullable: true + description: The account's type is a narrower and more specific grouping + within the account's classification. + example: Asset + account_type: + oneOf: + - $ref: '#/components/schemas/AccountAccountTypeEnum' + - type: string + nullable: true + description: |- + Normalized account type- which is a narrower and more specific grouping within the account's classification. + + * `BANK` - BANK + * `CREDIT_CARD` - CREDIT_CARD + * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE + * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE + * `FIXED_ASSET` - FIXED_ASSET + * `OTHER_ASSET` - OTHER_ASSET + * `OTHER_CURRENT_ASSET` - OTHER_CURRENT_ASSET + * `OTHER_EXPENSE` - OTHER_EXPENSE + * `OTHER_INCOME` - OTHER_INCOME + * `COST_OF_GOODS_SOLD` - COST_OF_GOODS_SOLD + * `OTHER_CURRENT_LIABILITY` - OTHER_CURRENT_LIABILITY + * `LONG_TERM_LIABILITY` - LONG_TERM_LIABILITY + * `NON_POSTING` - NON_POSTING + example: FIXED_ASSET + status: + oneOf: + - $ref: '#/components/schemas/AccountStatusEnum' + - type: string + nullable: true + description: |- + The account's status. + + * `ACTIVE` - ACTIVE + * `PENDING` - PENDING + * `INACTIVE` - INACTIVE + example: ACTIVE + current_balance: + type: number + format: double + nullable: true + description: The account's current balance. + currency: + oneOf: + - $ref: '#/components/schemas/TransactionCurrencyEnum' + - type: string + nullable: true + description: |- + The account's currency. + + * `XUA` - ADB Unit of Account + * `AFN` - Afghan Afghani + * `AFA` - Afghan Afghani (1927–2002) + * `ALL` - Albanian Lek + * `ALK` - Albanian Lek (1946–1965) + * `DZD` - Algerian Dinar + * `ADP` - Andorran Peseta + * `AOA` - Angolan Kwanza + * `AOK` - Angolan Kwanza (1977–1991) + * `AON` - Angolan New Kwanza (1990–2000) + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + * `ARA` - Argentine Austral + * `ARS` - Argentine Peso + * `ARM` - Argentine Peso (1881–1970) + * `ARP` - Argentine Peso (1983–1985) + * `ARL` - Argentine Peso Ley (1970–1983) + * `AMD` - Armenian Dram + * `AWG` - Aruban Florin + * `AUD` - Australian Dollar + * `ATS` - Austrian Schilling + * `AZN` - Azerbaijani Manat + * `AZM` - Azerbaijani Manat (1993–2006) + * `BSD` - Bahamian Dollar + * `BHD` - Bahraini Dinar + * `BDT` - Bangladeshi Taka + * `BBD` - Barbadian Dollar + * `BYN` - Belarusian Ruble + * `BYB` - Belarusian Ruble (1994–1999) + * `BYR` - Belarusian Ruble (2000–2016) + * `BEF` - Belgian Franc + * `BEC` - Belgian Franc (convertible) + * `BEL` - Belgian Franc (financial) + * `BZD` - Belize Dollar + * `BMD` - Bermudan Dollar + * `BTN` - Bhutanese Ngultrum + * `BOB` - Bolivian Boliviano + * `BOL` - Bolivian Boliviano (1863–1963) + * `BOV` - Bolivian Mvdol + * `BOP` - Bolivian Peso + * `BAM` - Bosnia-Herzegovina Convertible Mark + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + * `BWP` - Botswanan Pula + * `BRC` - Brazilian Cruzado (1986–1989) + * `BRZ` - Brazilian Cruzeiro (1942–1967) + * `BRE` - Brazilian Cruzeiro (1990–1993) + * `BRR` - Brazilian Cruzeiro (1993–1994) + * `BRN` - Brazilian New Cruzado (1989–1990) + * `BRB` - Brazilian New Cruzeiro (1967–1986) + * `BRL` - Brazilian Real + * `GBP` - British Pound + * `BND` - Brunei Dollar + * `BGL` - Bulgarian Hard Lev + * `BGN` - Bulgarian Lev + * `BGO` - Bulgarian Lev (1879–1952) + * `BGM` - Bulgarian Socialist Lev + * `BUK` - Burmese Kyat + * `BIF` - Burundian Franc + * `XPF` - CFP Franc + * `KHR` - Cambodian Riel + * `CAD` - Canadian Dollar + * `CVE` - Cape Verdean Escudo + * `KYD` - Cayman Islands Dollar + * `XAF` - Central African CFA Franc + * `CLE` - Chilean Escudo + * `CLP` - Chilean Peso + * `CLF` - Chilean Unit of Account (UF) + * `CNX` - Chinese People’s Bank Dollar + * `CNY` - Chinese Yuan + * `CNH` - Chinese Yuan (offshore) + * `COP` - Colombian Peso + * `COU` - Colombian Real Value Unit + * `KMF` - Comorian Franc + * `CDF` - Congolese Franc + * `CRC` - Costa Rican Colón + * `HRD` - Croatian Dinar + * `HRK` - Croatian Kuna + * `CUC` - Cuban Convertible Peso + * `CUP` - Cuban Peso + * `CYP` - Cypriot Pound + * `CZK` - Czech Koruna + * `CSK` - Czechoslovak Hard Koruna + * `DKK` - Danish Krone + * `DJF` - Djiboutian Franc + * `DOP` - Dominican Peso + * `NLG` - Dutch Guilder + * `XCD` - East Caribbean Dollar + * `DDM` - East German Mark + * `ECS` - Ecuadorian Sucre + * `ECV` - Ecuadorian Unit of Constant Value + * `EGP` - Egyptian Pound + * `GQE` - Equatorial Guinean Ekwele + * `ERN` - Eritrean Nakfa + * `EEK` - Estonian Kroon + * `ETB` - Ethiopian Birr + * `EUR` - Euro + * `XBA` - European Composite Unit + * `XEU` - European Currency Unit + * `XBB` - European Monetary Unit + * `XBC` - European Unit of Account (XBC) + * `XBD` - European Unit of Account (XBD) + * `FKP` - Falkland Islands Pound + * `FJD` - Fijian Dollar + * `FIM` - Finnish Markka + * `FRF` - French Franc + * `XFO` - French Gold Franc + * `XFU` - French UIC-Franc + * `GMD` - Gambian Dalasi + * `GEK` - Georgian Kupon Larit + * `GEL` - Georgian Lari + * `DEM` - German Mark + * `GHS` - Ghanaian Cedi + * `GHC` - Ghanaian Cedi (1979–2007) + * `GIP` - Gibraltar Pound + * `XAU` - Gold + * `GRD` - Greek Drachma + * `GTQ` - Guatemalan Quetzal + * `GWP` - Guinea-Bissau Peso + * `GNF` - Guinean Franc + * `GNS` - Guinean Syli + * `GYD` - Guyanaese Dollar + * `HTG` - Haitian Gourde + * `HNL` - Honduran Lempira + * `HKD` - Hong Kong Dollar + * `HUF` - Hungarian Forint + * `IMP` - IMP + * `ISK` - Icelandic Króna + * `ISJ` - Icelandic Króna (1918–1981) + * `INR` - Indian Rupee + * `IDR` - Indonesian Rupiah + * `IRR` - Iranian Rial + * `IQD` - Iraqi Dinar + * `IEP` - Irish Pound + * `ILS` - Israeli New Shekel + * `ILP` - Israeli Pound + * `ILR` - Israeli Shekel (1980–1985) + * `ITL` - Italian Lira + * `JMD` - Jamaican Dollar + * `JPY` - Japanese Yen + * `JOD` - Jordanian Dinar + * `KZT` - Kazakhstani Tenge + * `KES` - Kenyan Shilling + * `KWD` - Kuwaiti Dinar + * `KGS` - Kyrgystani Som + * `LAK` - Laotian Kip + * `LVL` - Latvian Lats + * `LVR` - Latvian Ruble + * `LBP` - Lebanese Pound + * `LSL` - Lesotho Loti + * `LRD` - Liberian Dollar + * `LYD` - Libyan Dinar + * `LTL` - Lithuanian Litas + * `LTT` - Lithuanian Talonas + * `LUL` - Luxembourg Financial Franc + * `LUC` - Luxembourgian Convertible Franc + * `LUF` - Luxembourgian Franc + * `MOP` - Macanese Pataca + * `MKD` - Macedonian Denar + * `MKN` - Macedonian Denar (1992–1993) + * `MGA` - Malagasy Ariary + * `MGF` - Malagasy Franc + * `MWK` - Malawian Kwacha + * `MYR` - Malaysian Ringgit + * `MVR` - Maldivian Rufiyaa + * `MVP` - Maldivian Rupee (1947–1981) + * `MLF` - Malian Franc + * `MTL` - Maltese Lira + * `MTP` - Maltese Pound + * `MRU` - Mauritanian Ouguiya + * `MRO` - Mauritanian Ouguiya (1973–2017) + * `MUR` - Mauritian Rupee + * `MXV` - Mexican Investment Unit + * `MXN` - Mexican Peso + * `MXP` - Mexican Silver Peso (1861–1992) + * `MDC` - Moldovan Cupon + * `MDL` - Moldovan Leu + * `MCF` - Monegasque Franc + * `MNT` - Mongolian Tugrik + * `MAD` - Moroccan Dirham + * `MAF` - Moroccan Franc + * `MZE` - Mozambican Escudo + * `MZN` - Mozambican Metical + * `MZM` - Mozambican Metical (1980–2006) + * `MMK` - Myanmar Kyat + * `NAD` - Namibian Dollar + * `NPR` - Nepalese Rupee + * `ANG` - Netherlands Antillean Guilder + * `TWD` - New Taiwan Dollar + * `NZD` - New Zealand Dollar + * `NIO` - Nicaraguan Córdoba + * `NIC` - Nicaraguan Córdoba (1988–1991) + * `NGN` - Nigerian Naira + * `KPW` - North Korean Won + * `NOK` - Norwegian Krone + * `OMR` - Omani Rial + * `PKR` - Pakistani Rupee + * `XPD` - Palladium + * `PAB` - Panamanian Balboa + * `PGK` - Papua New Guinean Kina + * `PYG` - Paraguayan Guarani + * `PEI` - Peruvian Inti + * `PEN` - Peruvian Sol + * `PES` - Peruvian Sol (1863–1965) + * `PHP` - Philippine Peso + * `XPT` - Platinum + * `PLN` - Polish Zloty + * `PLZ` - Polish Zloty (1950–1995) + * `PTE` - Portuguese Escudo + * `GWE` - Portuguese Guinea Escudo + * `QAR` - Qatari Rial + * `XRE` - RINET Funds + * `RHD` - Rhodesian Dollar + * `RON` - Romanian Leu + * `ROL` - Romanian Leu (1952–2006) + * `RUB` - Russian Ruble + * `RUR` - Russian Ruble (1991–1998) + * `RWF` - Rwandan Franc + * `SVC` - Salvadoran Colón + * `WST` - Samoan Tala + * `SAR` - Saudi Riyal + * `RSD` - Serbian Dinar + * `CSD` - Serbian Dinar (2002–2006) + * `SCR` - Seychellois Rupee + * `SLL` - Sierra Leonean Leone + * `XAG` - Silver + * `SGD` - Singapore Dollar + * `SKK` - Slovak Koruna + * `SIT` - Slovenian Tolar + * `SBD` - Solomon Islands Dollar + * `SOS` - Somali Shilling + * `ZAR` - South African Rand + * `ZAL` - South African Rand (financial) + * `KRH` - South Korean Hwan (1953–1962) + * `KRW` - South Korean Won + * `KRO` - South Korean Won (1945–1953) + * `SSP` - South Sudanese Pound + * `SUR` - Soviet Rouble + * `ESP` - Spanish Peseta + * `ESA` - Spanish Peseta (A account) + * `ESB` - Spanish Peseta (convertible account) + * `XDR` - Special Drawing Rights + * `LKR` - Sri Lankan Rupee + * `SHP` - St. Helena Pound + * `XSU` - Sucre + * `SDD` - Sudanese Dinar (1992–2007) + * `SDG` - Sudanese Pound + * `SDP` - Sudanese Pound (1957–1998) + * `SRD` - Surinamese Dollar + * `SRG` - Surinamese Guilder + * `SZL` - Swazi Lilangeni + * `SEK` - Swedish Krona + * `CHF` - Swiss Franc + * `SYP` - Syrian Pound + * `STN` - São Tomé & Príncipe Dobra + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + * `TVD` - TVD + * `TJR` - Tajikistani Ruble + * `TJS` - Tajikistani Somoni + * `TZS` - Tanzanian Shilling + * `XTS` - Testing Currency Code + * `THB` - Thai Baht + * `XXX` - The codes assigned for transactions where no currency is involved + * `TPE` - Timorese Escudo + * `TOP` - Tongan Paʻanga + * `TTD` - Trinidad & Tobago Dollar + * `TND` - Tunisian Dinar + * `TRY` - Turkish Lira + * `TRL` - Turkish Lira (1922–2005) + * `TMT` - Turkmenistani Manat + * `TMM` - Turkmenistani Manat (1993–2009) + * `USD` - US Dollar + * `USN` - US Dollar (Next day) + * `USS` - US Dollar (Same day) + * `UGX` - Ugandan Shilling + * `UGS` - Ugandan Shilling (1966–1987) + * `UAH` - Ukrainian Hryvnia + * `UAK` - Ukrainian Karbovanets + * `AED` - United Arab Emirates Dirham + * `UYW` - Uruguayan Nominal Wage Index Unit + * `UYU` - Uruguayan Peso + * `UYP` - Uruguayan Peso (1975–1993) + * `UYI` - Uruguayan Peso (Indexed Units) + * `UZS` - Uzbekistani Som + * `VUV` - Vanuatu Vatu + * `VES` - Venezuelan Bolívar + * `VEB` - Venezuelan Bolívar (1871–2008) + * `VEF` - Venezuelan Bolívar (2008–2018) + * `VND` - Vietnamese Dong + * `VNN` - Vietnamese Dong (1978–1985) + * `CHE` - WIR Euro + * `CHW` - WIR Franc + * `XOF` - West African CFA Franc + * `YDD` - Yemeni Dinar + * `YER` - Yemeni Rial + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + * `YUM` - Yugoslavian New Dinar (1994–2002) + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + * `ZWN` - ZWN + * `ZRN` - Zairean New Zaire (1993–1998) + * `ZRZ` - Zairean Zaire (1971–1993) + * `ZMW` - Zambian Kwacha + * `ZMK` - Zambian Kwacha (1968–2012) + * `ZWD` - Zimbabwean Dollar (1980–2008) + * `ZWR` - Zimbabwean Dollar (2008) + * `ZWL` - Zimbabwean Dollar (2009) + example: USD + account_number: + type: string + nullable: true + description: The account's number. + example: X12Y9AB + parent_account: + type: string + format: uuid + nullable: true + description: ID of the parent account. + example: 22d92d6c-22f9-11ed-861d-0242ac120002 + company: + type: string + format: uuid + nullable: true + description: The company the account belongs to. + example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + x-merge-model-tooltip: + title: Looking for __Bank Accounts__? + content: Bank Accounts are represented as an __Account__ with a `classification` + of __ASSET__. + x-merge-expands: '{"owner": "User"}' + x-merge-category: accounting + AccountResponse: + type: object + properties: + model: + $ref: '#/components/schemas/Account' + warnings: + type: array + items: + $ref: '#/components/schemas/WarningValidationProblem' + errors: + type: array + items: + $ref: '#/components/schemas/ErrorValidationProblem' + logs: + type: array + items: + $ref: '#/components/schemas/DebugModeLog' + required: + - errors + - model + - warnings + x-merge-category: accounting + AccountStatusEnum: + enum: + - ACTIVE + - PENDING + - INACTIVE + type: string + description: |- + * `ACTIVE` - ACTIVE + * `PENDING` - PENDING + * `INACTIVE` - INACTIVE + x-merge-category: accounting + AccountToken: + type: object + properties: + account_token: + type: string + example: T9klMDQrcHdm9jrtHuOS2Nf06BIHwMNjpPXPMB + integration: + $ref: '#/components/schemas/AccountIntegration' + example: + name: SAP SuccessFactors + categories: + - hris + - ats + image: https://cdn.merge.dev/SuccessFactors_Logo.png + square_image: https://cdn.merge.dev/SuccessFactors_Square_Logo.jpg + color: '#F6A704' + slug: sap-successfactors + id: + type: string + example: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd + required: + - account_token + - id + - integration + x-merge-category: accounting + AccountingAttachment: + type: object + description: |- + # The Accounting Attachment Object + ### Description + The `AccountingAttachment` object is used to represent a company's attachments. + + ### Usage Example + Fetch from the `LIST AccountingAttachments` endpoint and view a company's attachments. + properties: + id: + type: string + format: uuid + readOnly: true + example: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '1018270' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + file_name: + type: string + nullable: true + description: The attachment's name. + example: invoice.png + file_url: + type: string + format: uri + nullable: true + maxLength: 2000 + example: https://merge-brand.s3.amazonaws.com/20210315/rect-logo-270x80%402x.png + description: The attachment's url. + company: + type: string + format: uuid + nullable: true + description: The company the accounting attachment belongs to. + example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /actions + data: + - Varies by platform + x-merge-category: accounting + AccountingAttachmentEndpointRequest: + type: object + properties: + model: + $ref: '#/components/schemas/AccountingAttachmentRequest' + required: + - model + x-merge-category: accounting + AccountingAttachmentRequest: + type: object + description: |- + # The Accounting Attachment Object + ### Description + The `AccountingAttachment` object is used to represent a company's attachments. + + ### Usage Example + Fetch from the `LIST AccountingAttachments` endpoint and view a company's attachments. + properties: + file_name: + type: string + nullable: true + description: The attachment's name. + example: invoice.png + file_url: + type: string + format: uri + nullable: true + maxLength: 2000 + example: https://merge-brand.s3.amazonaws.com/20210315/rect-logo-270x80%402x.png + description: The attachment's url. + company: + type: string + format: uuid + nullable: true + description: The company the accounting attachment belongs to. + example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + x-merge-category: accounting + AccountingAttachmentResponse: + type: object + properties: + model: + $ref: '#/components/schemas/AccountingAttachment' + warnings: + type: array + items: + $ref: '#/components/schemas/WarningValidationProblem' + errors: + type: array + items: + $ref: '#/components/schemas/ErrorValidationProblem' + logs: + type: array + items: + $ref: '#/components/schemas/DebugModeLog' + required: + - errors + - model + - warnings + x-merge-category: accounting + AccountingPeriod: + type: object + description: |- + # The AccountingPeriod Object + ### Description + The `AccountingPeriod` object is used to define a period of time in which events occurred. + + ### Usage Example + Common models like `Invoice` and `Transaction` will have `AccountingPeriod` objects which will denote when they occurred. + properties: + id: + type: string + format: uuid + readOnly: true + example: 3015f7b1-4d01-460d-bfab-02a52d16cbd0 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '2804580' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + name: + type: string + nullable: true + description: Name of the accounting period. + maxLength: 100 + example: April 2020 Financials + status: + oneOf: + - $ref: '#/components/schemas/Status895Enum' + - type: string + nullable: true + example: ACTIVE + start_date: + type: string + format: date-time + nullable: true + description: Beginning date of the period + example: '2020-03-31T00:00:00Z' + end_date: + type: string + format: date-time + nullable: true + description: End date of the period + example: '2020-04-31T00:00:00Z' + field_mappings: + type: object + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /actions + data: + - Varies by platform + x-merge-category: accounting + AccountingPhoneNumber: + type: object + description: |- + # The AccountingPhoneNumber Object + ### Description + The `AccountingPhoneNumber` object is used to represent a contact's or company's phone number. + + ### Usage Example + Fetch from the `GET CompanyInfo` endpoint and view the company's phone numbers. + properties: + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + number: + type: string + nullable: true + description: The phone number. + example: '+3198675309' + type: + type: string + nullable: true + description: The phone number's type. + example: Mobile + x-merge-category: accounting + AccountingPhoneNumberRequest: + type: object + description: |- + # The AccountingPhoneNumber Object + ### Description + The `AccountingPhoneNumber` object is used to represent a contact's or company's phone number. + + ### Usage Example + Fetch from the `GET CompanyInfo` endpoint and view the company's phone numbers. + properties: + number: + type: string + nullable: true + description: The phone number. + example: '+3198675309' + type: + type: string + nullable: true + description: The phone number's type. + example: Mobile + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + x-merge-category: accounting + Address: + type: object + description: |- + # The Address Object + ### Description + The `Address` object is used to represent a contact's or company's address. + + ### Usage Example + Fetch from the `GET CompanyInfo` endpoint and view the company's addresses. + properties: + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + type: + oneOf: + - $ref: '#/components/schemas/AddressTypeEnum' + - type: string + nullable: true + description: |- + The address type. + + * `BILLING` - BILLING + * `SHIPPING` - SHIPPING + example: SHIPPING + street_1: + type: string + nullable: true + description: Line 1 of the address's street. + example: 2920 Broadway + street_2: + type: string + nullable: true + description: Line 2 of the address's street. + example: 2nd Floor + city: + type: string + nullable: true + description: The address's city. + example: New York + state: + nullable: true + description: The address's state or region. + readOnly: true + example: NY + country_subdivision: + type: string + nullable: true + description: The address's state or region. + example: NY + country: + oneOf: + - $ref: '#/components/schemas/CountryEnum' + - type: string + nullable: true + description: |- + The address's country. + + * `AF` - Afghanistan + * `AX` - Åland Islands + * `AL` - Albania + * `DZ` - Algeria + * `AS` - American Samoa + * `AD` - Andorra + * `AO` - Angola + * `AI` - Anguilla + * `AQ` - Antarctica + * `AG` - Antigua and Barbuda + * `AR` - Argentina + * `AM` - Armenia + * `AW` - Aruba + * `AU` - Australia + * `AT` - Austria + * `AZ` - Azerbaijan + * `BS` - Bahamas + * `BH` - Bahrain + * `BD` - Bangladesh + * `BB` - Barbados + * `BY` - Belarus + * `BE` - Belgium + * `BZ` - Belize + * `BJ` - Benin + * `BM` - Bermuda + * `BT` - Bhutan + * `BO` - Bolivia + * `BQ` - Bonaire, Sint Eustatius and Saba + * `BA` - Bosnia and Herzegovina + * `BW` - Botswana + * `BV` - Bouvet Island + * `BR` - Brazil + * `IO` - British Indian Ocean Territory + * `BN` - Brunei + * `BG` - Bulgaria + * `BF` - Burkina Faso + * `BI` - Burundi + * `CV` - Cabo Verde + * `KH` - Cambodia + * `CM` - Cameroon + * `CA` - Canada + * `KY` - Cayman Islands + * `CF` - Central African Republic + * `TD` - Chad + * `CL` - Chile + * `CN` - China + * `CX` - Christmas Island + * `CC` - Cocos (Keeling) Islands + * `CO` - Colombia + * `KM` - Comoros + * `CG` - Congo + * `CD` - Congo (the Democratic Republic of the) + * `CK` - Cook Islands + * `CR` - Costa Rica + * `CI` - Côte d'Ivoire + * `HR` - Croatia + * `CU` - Cuba + * `CW` - Curaçao + * `CY` - Cyprus + * `CZ` - Czechia + * `DK` - Denmark + * `DJ` - Djibouti + * `DM` - Dominica + * `DO` - Dominican Republic + * `EC` - Ecuador + * `EG` - Egypt + * `SV` - El Salvador + * `GQ` - Equatorial Guinea + * `ER` - Eritrea + * `EE` - Estonia + * `SZ` - Eswatini + * `ET` - Ethiopia + * `FK` - Falkland Islands (Malvinas) + * `FO` - Faroe Islands + * `FJ` - Fiji + * `FI` - Finland + * `FR` - France + * `GF` - French Guiana + * `PF` - French Polynesia + * `TF` - French Southern Territories + * `GA` - Gabon + * `GM` - Gambia + * `GE` - Georgia + * `DE` - Germany + * `GH` - Ghana + * `GI` - Gibraltar + * `GR` - Greece + * `GL` - Greenland + * `GD` - Grenada + * `GP` - Guadeloupe + * `GU` - Guam + * `GT` - Guatemala + * `GG` - Guernsey + * `GN` - Guinea + * `GW` - Guinea-Bissau + * `GY` - Guyana + * `HT` - Haiti + * `HM` - Heard Island and McDonald Islands + * `VA` - Holy See + * `HN` - Honduras + * `HK` - Hong Kong + * `HU` - Hungary + * `IS` - Iceland + * `IN` - India + * `ID` - Indonesia + * `IR` - Iran + * `IQ` - Iraq + * `IE` - Ireland + * `IM` - Isle of Man + * `IL` - Israel + * `IT` - Italy + * `JM` - Jamaica + * `JP` - Japan + * `JE` - Jersey + * `JO` - Jordan + * `KZ` - Kazakhstan + * `KE` - Kenya + * `KI` - Kiribati + * `KW` - Kuwait + * `KG` - Kyrgyzstan + * `LA` - Laos + * `LV` - Latvia + * `LB` - Lebanon + * `LS` - Lesotho + * `LR` - Liberia + * `LY` - Libya + * `LI` - Liechtenstein + * `LT` - Lithuania + * `LU` - Luxembourg + * `MO` - Macao + * `MG` - Madagascar + * `MW` - Malawi + * `MY` - Malaysia + * `MV` - Maldives + * `ML` - Mali + * `MT` - Malta + * `MH` - Marshall Islands + * `MQ` - Martinique + * `MR` - Mauritania + * `MU` - Mauritius + * `YT` - Mayotte + * `MX` - Mexico + * `FM` - Micronesia (Federated States of) + * `MD` - Moldova + * `MC` - Monaco + * `MN` - Mongolia + * `ME` - Montenegro + * `MS` - Montserrat + * `MA` - Morocco + * `MZ` - Mozambique + * `MM` - Myanmar + * `NA` - Namibia + * `NR` - Nauru + * `NP` - Nepal + * `NL` - Netherlands + * `NC` - New Caledonia + * `NZ` - New Zealand + * `NI` - Nicaragua + * `NE` - Niger + * `NG` - Nigeria + * `NU` - Niue + * `NF` - Norfolk Island + * `KP` - North Korea + * `MK` - North Macedonia + * `MP` - Northern Mariana Islands + * `NO` - Norway + * `OM` - Oman + * `PK` - Pakistan + * `PW` - Palau + * `PS` - Palestine, State of + * `PA` - Panama + * `PG` - Papua New Guinea + * `PY` - Paraguay + * `PE` - Peru + * `PH` - Philippines + * `PN` - Pitcairn + * `PL` - Poland + * `PT` - Portugal + * `PR` - Puerto Rico + * `QA` - Qatar + * `RE` - Réunion + * `RO` - Romania + * `RU` - Russia + * `RW` - Rwanda + * `BL` - Saint Barthélemy + * `SH` - Saint Helena, Ascension and Tristan da Cunha + * `KN` - Saint Kitts and Nevis + * `LC` - Saint Lucia + * `MF` - Saint Martin (French part) + * `PM` - Saint Pierre and Miquelon + * `VC` - Saint Vincent and the Grenadines + * `WS` - Samoa + * `SM` - San Marino + * `ST` - Sao Tome and Principe + * `SA` - Saudi Arabia + * `SN` - Senegal + * `RS` - Serbia + * `SC` - Seychelles + * `SL` - Sierra Leone + * `SG` - Singapore + * `SX` - Sint Maarten (Dutch part) + * `SK` - Slovakia + * `SI` - Slovenia + * `SB` - Solomon Islands + * `SO` - Somalia + * `ZA` - South Africa + * `GS` - South Georgia and the South Sandwich Islands + * `KR` - South Korea + * `SS` - South Sudan + * `ES` - Spain + * `LK` - Sri Lanka + * `SD` - Sudan + * `SR` - Suriname + * `SJ` - Svalbard and Jan Mayen + * `SE` - Sweden + * `CH` - Switzerland + * `SY` - Syria + * `TW` - Taiwan + * `TJ` - Tajikistan + * `TZ` - Tanzania + * `TH` - Thailand + * `TL` - Timor-Leste + * `TG` - Togo + * `TK` - Tokelau + * `TO` - Tonga + * `TT` - Trinidad and Tobago + * `TN` - Tunisia + * `TR` - Turkey + * `TM` - Turkmenistan + * `TC` - Turks and Caicos Islands + * `TV` - Tuvalu + * `UG` - Uganda + * `UA` - Ukraine + * `AE` - United Arab Emirates + * `GB` - United Kingdom + * `UM` - United States Minor Outlying Islands + * `US` - United States of America + * `UY` - Uruguay + * `UZ` - Uzbekistan + * `VU` - Vanuatu + * `VE` - Venezuela + * `VN` - Vietnam + * `VG` - Virgin Islands (British) + * `VI` - Virgin Islands (U.S.) + * `WF` - Wallis and Futuna + * `EH` - Western Sahara + * `YE` - Yemen + * `ZM` - Zambia + * `ZW` - Zimbabwe + example: US + zip_code: + type: string + nullable: true + description: The address's zip code. + example: '10027' + x-merge-nested-write-allowed: true + x-merge-category: accounting + AddressRequest: + type: object + description: |- + # The Address Object + ### Description + The `Address` object is used to represent a contact's or company's address. + + ### Usage Example + Fetch from the `GET CompanyInfo` endpoint and view the company's addresses. + properties: + type: + oneOf: + - $ref: '#/components/schemas/AddressTypeEnum' + - type: string + nullable: true + description: |- + The address type. + + * `BILLING` - BILLING + * `SHIPPING` - SHIPPING + example: SHIPPING + street_1: + type: string + nullable: true + description: Line 1 of the address's street. + example: 2920 Broadway + street_2: + type: string + nullable: true + description: Line 2 of the address's street. + example: 2nd Floor + city: + type: string + nullable: true + description: The address's city. + example: New York + country_subdivision: + type: string + nullable: true + description: The address's state or region. + example: NY + country: + oneOf: + - $ref: '#/components/schemas/CountryEnum' + - type: string + nullable: true + description: |- + The address's country. + + * `AF` - Afghanistan + * `AX` - Åland Islands + * `AL` - Albania + * `DZ` - Algeria + * `AS` - American Samoa + * `AD` - Andorra + * `AO` - Angola + * `AI` - Anguilla + * `AQ` - Antarctica + * `AG` - Antigua and Barbuda + * `AR` - Argentina + * `AM` - Armenia + * `AW` - Aruba + * `AU` - Australia + * `AT` - Austria + * `AZ` - Azerbaijan + * `BS` - Bahamas + * `BH` - Bahrain + * `BD` - Bangladesh + * `BB` - Barbados + * `BY` - Belarus + * `BE` - Belgium + * `BZ` - Belize + * `BJ` - Benin + * `BM` - Bermuda + * `BT` - Bhutan + * `BO` - Bolivia + * `BQ` - Bonaire, Sint Eustatius and Saba + * `BA` - Bosnia and Herzegovina + * `BW` - Botswana + * `BV` - Bouvet Island + * `BR` - Brazil + * `IO` - British Indian Ocean Territory + * `BN` - Brunei + * `BG` - Bulgaria + * `BF` - Burkina Faso + * `BI` - Burundi + * `CV` - Cabo Verde + * `KH` - Cambodia + * `CM` - Cameroon + * `CA` - Canada + * `KY` - Cayman Islands + * `CF` - Central African Republic + * `TD` - Chad + * `CL` - Chile + * `CN` - China + * `CX` - Christmas Island + * `CC` - Cocos (Keeling) Islands + * `CO` - Colombia + * `KM` - Comoros + * `CG` - Congo + * `CD` - Congo (the Democratic Republic of the) + * `CK` - Cook Islands + * `CR` - Costa Rica + * `CI` - Côte d'Ivoire + * `HR` - Croatia + * `CU` - Cuba + * `CW` - Curaçao + * `CY` - Cyprus + * `CZ` - Czechia + * `DK` - Denmark + * `DJ` - Djibouti + * `DM` - Dominica + * `DO` - Dominican Republic + * `EC` - Ecuador + * `EG` - Egypt + * `SV` - El Salvador + * `GQ` - Equatorial Guinea + * `ER` - Eritrea + * `EE` - Estonia + * `SZ` - Eswatini + * `ET` - Ethiopia + * `FK` - Falkland Islands (Malvinas) + * `FO` - Faroe Islands + * `FJ` - Fiji + * `FI` - Finland + * `FR` - France + * `GF` - French Guiana + * `PF` - French Polynesia + * `TF` - French Southern Territories + * `GA` - Gabon + * `GM` - Gambia + * `GE` - Georgia + * `DE` - Germany + * `GH` - Ghana + * `GI` - Gibraltar + * `GR` - Greece + * `GL` - Greenland + * `GD` - Grenada + * `GP` - Guadeloupe + * `GU` - Guam + * `GT` - Guatemala + * `GG` - Guernsey + * `GN` - Guinea + * `GW` - Guinea-Bissau + * `GY` - Guyana + * `HT` - Haiti + * `HM` - Heard Island and McDonald Islands + * `VA` - Holy See + * `HN` - Honduras + * `HK` - Hong Kong + * `HU` - Hungary + * `IS` - Iceland + * `IN` - India + * `ID` - Indonesia + * `IR` - Iran + * `IQ` - Iraq + * `IE` - Ireland + * `IM` - Isle of Man + * `IL` - Israel + * `IT` - Italy + * `JM` - Jamaica + * `JP` - Japan + * `JE` - Jersey + * `JO` - Jordan + * `KZ` - Kazakhstan + * `KE` - Kenya + * `KI` - Kiribati + * `KW` - Kuwait + * `KG` - Kyrgyzstan + * `LA` - Laos + * `LV` - Latvia + * `LB` - Lebanon + * `LS` - Lesotho + * `LR` - Liberia + * `LY` - Libya + * `LI` - Liechtenstein + * `LT` - Lithuania + * `LU` - Luxembourg + * `MO` - Macao + * `MG` - Madagascar + * `MW` - Malawi + * `MY` - Malaysia + * `MV` - Maldives + * `ML` - Mali + * `MT` - Malta + * `MH` - Marshall Islands + * `MQ` - Martinique + * `MR` - Mauritania + * `MU` - Mauritius + * `YT` - Mayotte + * `MX` - Mexico + * `FM` - Micronesia (Federated States of) + * `MD` - Moldova + * `MC` - Monaco + * `MN` - Mongolia + * `ME` - Montenegro + * `MS` - Montserrat + * `MA` - Morocco + * `MZ` - Mozambique + * `MM` - Myanmar + * `NA` - Namibia + * `NR` - Nauru + * `NP` - Nepal + * `NL` - Netherlands + * `NC` - New Caledonia + * `NZ` - New Zealand + * `NI` - Nicaragua + * `NE` - Niger + * `NG` - Nigeria + * `NU` - Niue + * `NF` - Norfolk Island + * `KP` - North Korea + * `MK` - North Macedonia + * `MP` - Northern Mariana Islands + * `NO` - Norway + * `OM` - Oman + * `PK` - Pakistan + * `PW` - Palau + * `PS` - Palestine, State of + * `PA` - Panama + * `PG` - Papua New Guinea + * `PY` - Paraguay + * `PE` - Peru + * `PH` - Philippines + * `PN` - Pitcairn + * `PL` - Poland + * `PT` - Portugal + * `PR` - Puerto Rico + * `QA` - Qatar + * `RE` - Réunion + * `RO` - Romania + * `RU` - Russia + * `RW` - Rwanda + * `BL` - Saint Barthélemy + * `SH` - Saint Helena, Ascension and Tristan da Cunha + * `KN` - Saint Kitts and Nevis + * `LC` - Saint Lucia + * `MF` - Saint Martin (French part) + * `PM` - Saint Pierre and Miquelon + * `VC` - Saint Vincent and the Grenadines + * `WS` - Samoa + * `SM` - San Marino + * `ST` - Sao Tome and Principe + * `SA` - Saudi Arabia + * `SN` - Senegal + * `RS` - Serbia + * `SC` - Seychelles + * `SL` - Sierra Leone + * `SG` - Singapore + * `SX` - Sint Maarten (Dutch part) + * `SK` - Slovakia + * `SI` - Slovenia + * `SB` - Solomon Islands + * `SO` - Somalia + * `ZA` - South Africa + * `GS` - South Georgia and the South Sandwich Islands + * `KR` - South Korea + * `SS` - South Sudan + * `ES` - Spain + * `LK` - Sri Lanka + * `SD` - Sudan + * `SR` - Suriname + * `SJ` - Svalbard and Jan Mayen + * `SE` - Sweden + * `CH` - Switzerland + * `SY` - Syria + * `TW` - Taiwan + * `TJ` - Tajikistan + * `TZ` - Tanzania + * `TH` - Thailand + * `TL` - Timor-Leste + * `TG` - Togo + * `TK` - Tokelau + * `TO` - Tonga + * `TT` - Trinidad and Tobago + * `TN` - Tunisia + * `TR` - Turkey + * `TM` - Turkmenistan + * `TC` - Turks and Caicos Islands + * `TV` - Tuvalu + * `UG` - Uganda + * `UA` - Ukraine + * `AE` - United Arab Emirates + * `GB` - United Kingdom + * `UM` - United States Minor Outlying Islands + * `US` - United States of America + * `UY` - Uruguay + * `UZ` - Uzbekistan + * `VU` - Vanuatu + * `VE` - Venezuela + * `VN` - Vietnam + * `VG` - Virgin Islands (British) + * `VI` - Virgin Islands (U.S.) + * `WF` - Wallis and Futuna + * `EH` - Western Sahara + * `YE` - Yemen + * `ZM` - Zambia + * `ZW` - Zimbabwe + example: US + zip_code: + type: string + nullable: true + description: The address's zip code. + example: '10027' + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + x-merge-category: accounting + AddressTypeEnum: + enum: + - BILLING + - SHIPPING + type: string + description: |- + * `BILLING` - BILLING + * `SHIPPING` - SHIPPING + x-merge-category: accounting + AdvancedMetadata: + type: object + properties: + id: + type: string + format: uuid + display_name: + type: string + description: + type: string + is_required: + type: boolean + is_custom: + type: boolean + field_choices: + type: array + items: {} + required: + - id + x-merge-category: accounting + AsyncPassthroughReciept: + type: object + properties: + async_passthrough_receipt_id: + type: string + format: uuid + example: fd29020f-2695-445e-922e-dcd5e81903fd + required: + - async_passthrough_receipt_id + x-merge-category: accounting + AsyncPostTask: + type: object + properties: + status: + oneOf: + - $ref: '#/components/schemas/AsyncPostTaskStatusEnum' + - type: string + example: COMPLETED + result: + $ref: '#/components/schemas/AsyncPostTaskResult' + required: + - result + - status + x-merge-category: accounting + AsyncPostTaskResult: + type: object + properties: + status_code: + type: integer + example: 201 + response: + type: object + additionalProperties: {} + example: + model: + id: 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 + remote_id: '990110' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + integration_params: + unique_integration_field: unique_integration_field_value + linked_account_params: + unique_linked_account_field: unique_linked_account_field_value + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + type: ACCOUNTS_RECEIVABLE + contact: 022a2bef-57e5-4def-8ed2-7c41bd9a5ed8 + number: AIQ12546 + issue_date: '2020-03-31T00:00:00Z' + due_date: '2020-04-15T00:00:00Z' + memo: Weekly Payment + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + employee: 7442f0d5-722d-45bd-b807-6e38489d37fe + paid_on_date: '2020-04-01T00:00:00Z' + currency: USD + exchange_rate: '2.9' + status: DRAFT + total_discount: 0 + sub_total: 100 + total_tax_amount: 5 + total_amount: 105 + balance: 105 + inclusive_of_tax: false + remote_updated_at: '2020-04-01T00:00:00Z' + tracking_categories: + - 7dc5ca17-d311-44cd-9ce0-333080367a18 + - 6aa0700c-48e1-4c4a-8162-02e6a582df05 + - 8c933d61-8f5b-4360-ac0c-c9dc87bee763 + purchase_orders: + - e7378d8f-3992-4c2a-8417-ebdc4f2bfeb7 + - dd70ca2f-b120-46fa-889a-9604037f45fd + - 889b281d-739c-4759-95b8-0aedb3947131 + accounting_period: 7dc5ca17-d311-44cd-9ce0-333080367a18 + payments: + - b26fd49a-cbae-470a-a8f8-bcbc119e0390 + applied_payments: + - 9017594e-dc33-4113-a5d2-b0f928e34fdd + line_items: [] + applied_credit_notes: [] + applied_vendor_credits: [] + remote_data: + - path: /actions + data: + - Varies by platform + x-merge-category: accounting + AsyncPostTaskStatusEnum: + enum: + - QUEUED + - IN_PROGRESS + - COMPLETED + - FAILURE + type: string + description: |- + * `QUEUED` - QUEUED + * `IN_PROGRESS` - IN_PROGRESS + * `COMPLETED` - COMPLETED + * `FAILURE` - FAILURE + x-merge-category: accounting + AuditLogEvent: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + example: b5ceea2a-7171-47ce-8090-165cfce5572c + user_name: + type: string + nullable: true + description: The User's full name at the time of this Event occurring. + maxLength: 200 + example: Gil Feig + user_email: + type: string + format: email + nullable: true + description: The User's email at the time of this Event occurring. + maxLength: 254 + example: hello@merge.dev + role: + oneOf: + - $ref: '#/components/schemas/RoleEnum' + - type: string + description: |- + Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. + + * `ADMIN` - ADMIN + * `DEVELOPER` - DEVELOPER + * `MEMBER` - MEMBER + * `API` - API + * `SYSTEM` - SYSTEM + * `MERGE_TEAM` - MERGE_TEAM + example: ADMIN + ip_address: + type: string + maxLength: 45 + example: 192.0.2.123 + event_type: + oneOf: + - $ref: '#/components/schemas/EventTypeEnum' + - type: string + description: |- + Designates the type of event that occurred. + + * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + * `INVITED_USER` - INVITED_USER + * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + * `CREATED_DESTINATION` - CREATED_DESTINATION + * `DELETED_DESTINATION` - DELETED_DESTINATION + * `CHANGED_DESTINATION` - CHANGED_DESTINATION + * `CHANGED_SCOPES` - CHANGED_SCOPES + * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + * `ENABLED_CATEGORY` - ENABLED_CATEGORY + * `DISABLED_CATEGORY` - DISABLED_CATEGORY + * `CHANGED_PASSWORD` - CHANGED_PASSWORD + * `RESET_PASSWORD` - RESET_PASSWORD + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING + * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING + * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING + * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING + * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + * `MUTED_ISSUE` - MUTED_ISSUE + * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + example: CHANGED_SCOPES + event_description: + type: string + example: Organization-wide Scopes for model hris.Employee updated from Read + to Read+Write + created_at: + type: string + format: date-time + readOnly: true + required: + - event_description + - event_type + - ip_address + - role + x-merge-category: accounting + AvailableActions: + type: object + description: |- + # The AvailableActions Object + ### Description + The `Activity` object is used to see all available model/operation combinations for an integration. + + ### Usage Example + Fetch all the actions available for the `Zenefits` integration. + properties: + integration: + $ref: '#/components/schemas/AccountIntegration' + example: + name: Lever + categories: + - ats + image: https://merge-api-production.s3.amazonaws.com/media/Lever_Logo.png + square_image: https://merge-api-production.s3.amazonaws.com/media/Lever_Square_Logo.png + color: '#262A34' + is_in_beta: 'true' + api_endpoints_to_documentation_urls: "{'GET': [('/common-model-scopes', + 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve')], + 'POST': []}" + passthrough_available: + type: boolean + example: true + available_model_operations: + type: array + items: + $ref: '#/components/schemas/ModelOperation' + example: + - model_name: Candidate + available_operations: + - FETCH + - CREATE + required_post_parameters: + - remote_user_id + supported_fields: + - first_name + - last_name + - company + - title + required: + - integration + - passthrough_available + x-merge-category: accounting + BalanceSheet: + type: object + description: |- + # The BalanceSheet Object + ### Description + The `BalanceSheet` object shows a company’s assets, liabilities, and equity. Assets should be equal to liability and equity combined. This shows the company’s financial health at a specific point in time. + + ### Usage Example + Fetch from the `LIST BalanceSheets` endpoint and view a company's balance sheets. + properties: + id: + type: string + format: uuid + readOnly: true + example: 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '8937018' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + name: + type: string + nullable: true + description: The balance sheet's name. + example: BalanceSheet + currency: + oneOf: + - $ref: '#/components/schemas/TransactionCurrencyEnum' + - type: string + nullable: true + description: |- + The balance sheet's currency. + + * `XUA` - ADB Unit of Account + * `AFN` - Afghan Afghani + * `AFA` - Afghan Afghani (1927–2002) + * `ALL` - Albanian Lek + * `ALK` - Albanian Lek (1946–1965) + * `DZD` - Algerian Dinar + * `ADP` - Andorran Peseta + * `AOA` - Angolan Kwanza + * `AOK` - Angolan Kwanza (1977–1991) + * `AON` - Angolan New Kwanza (1990–2000) + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + * `ARA` - Argentine Austral + * `ARS` - Argentine Peso + * `ARM` - Argentine Peso (1881–1970) + * `ARP` - Argentine Peso (1983–1985) + * `ARL` - Argentine Peso Ley (1970–1983) + * `AMD` - Armenian Dram + * `AWG` - Aruban Florin + * `AUD` - Australian Dollar + * `ATS` - Austrian Schilling + * `AZN` - Azerbaijani Manat + * `AZM` - Azerbaijani Manat (1993–2006) + * `BSD` - Bahamian Dollar + * `BHD` - Bahraini Dinar + * `BDT` - Bangladeshi Taka + * `BBD` - Barbadian Dollar + * `BYN` - Belarusian Ruble + * `BYB` - Belarusian Ruble (1994–1999) + * `BYR` - Belarusian Ruble (2000–2016) + * `BEF` - Belgian Franc + * `BEC` - Belgian Franc (convertible) + * `BEL` - Belgian Franc (financial) + * `BZD` - Belize Dollar + * `BMD` - Bermudan Dollar + * `BTN` - Bhutanese Ngultrum + * `BOB` - Bolivian Boliviano + * `BOL` - Bolivian Boliviano (1863–1963) + * `BOV` - Bolivian Mvdol + * `BOP` - Bolivian Peso + * `BAM` - Bosnia-Herzegovina Convertible Mark + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + * `BWP` - Botswanan Pula + * `BRC` - Brazilian Cruzado (1986–1989) + * `BRZ` - Brazilian Cruzeiro (1942–1967) + * `BRE` - Brazilian Cruzeiro (1990–1993) + * `BRR` - Brazilian Cruzeiro (1993–1994) + * `BRN` - Brazilian New Cruzado (1989–1990) + * `BRB` - Brazilian New Cruzeiro (1967–1986) + * `BRL` - Brazilian Real + * `GBP` - British Pound + * `BND` - Brunei Dollar + * `BGL` - Bulgarian Hard Lev + * `BGN` - Bulgarian Lev + * `BGO` - Bulgarian Lev (1879–1952) + * `BGM` - Bulgarian Socialist Lev + * `BUK` - Burmese Kyat + * `BIF` - Burundian Franc + * `XPF` - CFP Franc + * `KHR` - Cambodian Riel + * `CAD` - Canadian Dollar + * `CVE` - Cape Verdean Escudo + * `KYD` - Cayman Islands Dollar + * `XAF` - Central African CFA Franc + * `CLE` - Chilean Escudo + * `CLP` - Chilean Peso + * `CLF` - Chilean Unit of Account (UF) + * `CNX` - Chinese People’s Bank Dollar + * `CNY` - Chinese Yuan + * `CNH` - Chinese Yuan (offshore) + * `COP` - Colombian Peso + * `COU` - Colombian Real Value Unit + * `KMF` - Comorian Franc + * `CDF` - Congolese Franc + * `CRC` - Costa Rican Colón + * `HRD` - Croatian Dinar + * `HRK` - Croatian Kuna + * `CUC` - Cuban Convertible Peso + * `CUP` - Cuban Peso + * `CYP` - Cypriot Pound + * `CZK` - Czech Koruna + * `CSK` - Czechoslovak Hard Koruna + * `DKK` - Danish Krone + * `DJF` - Djiboutian Franc + * `DOP` - Dominican Peso + * `NLG` - Dutch Guilder + * `XCD` - East Caribbean Dollar + * `DDM` - East German Mark + * `ECS` - Ecuadorian Sucre + * `ECV` - Ecuadorian Unit of Constant Value + * `EGP` - Egyptian Pound + * `GQE` - Equatorial Guinean Ekwele + * `ERN` - Eritrean Nakfa + * `EEK` - Estonian Kroon + * `ETB` - Ethiopian Birr + * `EUR` - Euro + * `XBA` - European Composite Unit + * `XEU` - European Currency Unit + * `XBB` - European Monetary Unit + * `XBC` - European Unit of Account (XBC) + * `XBD` - European Unit of Account (XBD) + * `FKP` - Falkland Islands Pound + * `FJD` - Fijian Dollar + * `FIM` - Finnish Markka + * `FRF` - French Franc + * `XFO` - French Gold Franc + * `XFU` - French UIC-Franc + * `GMD` - Gambian Dalasi + * `GEK` - Georgian Kupon Larit + * `GEL` - Georgian Lari + * `DEM` - German Mark + * `GHS` - Ghanaian Cedi + * `GHC` - Ghanaian Cedi (1979–2007) + * `GIP` - Gibraltar Pound + * `XAU` - Gold + * `GRD` - Greek Drachma + * `GTQ` - Guatemalan Quetzal + * `GWP` - Guinea-Bissau Peso + * `GNF` - Guinean Franc + * `GNS` - Guinean Syli + * `GYD` - Guyanaese Dollar + * `HTG` - Haitian Gourde + * `HNL` - Honduran Lempira + * `HKD` - Hong Kong Dollar + * `HUF` - Hungarian Forint + * `IMP` - IMP + * `ISK` - Icelandic Króna + * `ISJ` - Icelandic Króna (1918–1981) + * `INR` - Indian Rupee + * `IDR` - Indonesian Rupiah + * `IRR` - Iranian Rial + * `IQD` - Iraqi Dinar + * `IEP` - Irish Pound + * `ILS` - Israeli New Shekel + * `ILP` - Israeli Pound + * `ILR` - Israeli Shekel (1980–1985) + * `ITL` - Italian Lira + * `JMD` - Jamaican Dollar + * `JPY` - Japanese Yen + * `JOD` - Jordanian Dinar + * `KZT` - Kazakhstani Tenge + * `KES` - Kenyan Shilling + * `KWD` - Kuwaiti Dinar + * `KGS` - Kyrgystani Som + * `LAK` - Laotian Kip + * `LVL` - Latvian Lats + * `LVR` - Latvian Ruble + * `LBP` - Lebanese Pound + * `LSL` - Lesotho Loti + * `LRD` - Liberian Dollar + * `LYD` - Libyan Dinar + * `LTL` - Lithuanian Litas + * `LTT` - Lithuanian Talonas + * `LUL` - Luxembourg Financial Franc + * `LUC` - Luxembourgian Convertible Franc + * `LUF` - Luxembourgian Franc + * `MOP` - Macanese Pataca + * `MKD` - Macedonian Denar + * `MKN` - Macedonian Denar (1992–1993) + * `MGA` - Malagasy Ariary + * `MGF` - Malagasy Franc + * `MWK` - Malawian Kwacha + * `MYR` - Malaysian Ringgit + * `MVR` - Maldivian Rufiyaa + * `MVP` - Maldivian Rupee (1947–1981) + * `MLF` - Malian Franc + * `MTL` - Maltese Lira + * `MTP` - Maltese Pound + * `MRU` - Mauritanian Ouguiya + * `MRO` - Mauritanian Ouguiya (1973–2017) + * `MUR` - Mauritian Rupee + * `MXV` - Mexican Investment Unit + * `MXN` - Mexican Peso + * `MXP` - Mexican Silver Peso (1861–1992) + * `MDC` - Moldovan Cupon + * `MDL` - Moldovan Leu + * `MCF` - Monegasque Franc + * `MNT` - Mongolian Tugrik + * `MAD` - Moroccan Dirham + * `MAF` - Moroccan Franc + * `MZE` - Mozambican Escudo + * `MZN` - Mozambican Metical + * `MZM` - Mozambican Metical (1980–2006) + * `MMK` - Myanmar Kyat + * `NAD` - Namibian Dollar + * `NPR` - Nepalese Rupee + * `ANG` - Netherlands Antillean Guilder + * `TWD` - New Taiwan Dollar + * `NZD` - New Zealand Dollar + * `NIO` - Nicaraguan Córdoba + * `NIC` - Nicaraguan Córdoba (1988–1991) + * `NGN` - Nigerian Naira + * `KPW` - North Korean Won + * `NOK` - Norwegian Krone + * `OMR` - Omani Rial + * `PKR` - Pakistani Rupee + * `XPD` - Palladium + * `PAB` - Panamanian Balboa + * `PGK` - Papua New Guinean Kina + * `PYG` - Paraguayan Guarani + * `PEI` - Peruvian Inti + * `PEN` - Peruvian Sol + * `PES` - Peruvian Sol (1863–1965) + * `PHP` - Philippine Peso + * `XPT` - Platinum + * `PLN` - Polish Zloty + * `PLZ` - Polish Zloty (1950–1995) + * `PTE` - Portuguese Escudo + * `GWE` - Portuguese Guinea Escudo + * `QAR` - Qatari Rial + * `XRE` - RINET Funds + * `RHD` - Rhodesian Dollar + * `RON` - Romanian Leu + * `ROL` - Romanian Leu (1952–2006) + * `RUB` - Russian Ruble + * `RUR` - Russian Ruble (1991–1998) + * `RWF` - Rwandan Franc + * `SVC` - Salvadoran Colón + * `WST` - Samoan Tala + * `SAR` - Saudi Riyal + * `RSD` - Serbian Dinar + * `CSD` - Serbian Dinar (2002–2006) + * `SCR` - Seychellois Rupee + * `SLL` - Sierra Leonean Leone + * `XAG` - Silver + * `SGD` - Singapore Dollar + * `SKK` - Slovak Koruna + * `SIT` - Slovenian Tolar + * `SBD` - Solomon Islands Dollar + * `SOS` - Somali Shilling + * `ZAR` - South African Rand + * `ZAL` - South African Rand (financial) + * `KRH` - South Korean Hwan (1953–1962) + * `KRW` - South Korean Won + * `KRO` - South Korean Won (1945–1953) + * `SSP` - South Sudanese Pound + * `SUR` - Soviet Rouble + * `ESP` - Spanish Peseta + * `ESA` - Spanish Peseta (A account) + * `ESB` - Spanish Peseta (convertible account) + * `XDR` - Special Drawing Rights + * `LKR` - Sri Lankan Rupee + * `SHP` - St. Helena Pound + * `XSU` - Sucre + * `SDD` - Sudanese Dinar (1992–2007) + * `SDG` - Sudanese Pound + * `SDP` - Sudanese Pound (1957–1998) + * `SRD` - Surinamese Dollar + * `SRG` - Surinamese Guilder + * `SZL` - Swazi Lilangeni + * `SEK` - Swedish Krona + * `CHF` - Swiss Franc + * `SYP` - Syrian Pound + * `STN` - São Tomé & Príncipe Dobra + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + * `TVD` - TVD + * `TJR` - Tajikistani Ruble + * `TJS` - Tajikistani Somoni + * `TZS` - Tanzanian Shilling + * `XTS` - Testing Currency Code + * `THB` - Thai Baht + * `XXX` - The codes assigned for transactions where no currency is involved + * `TPE` - Timorese Escudo + * `TOP` - Tongan Paʻanga + * `TTD` - Trinidad & Tobago Dollar + * `TND` - Tunisian Dinar + * `TRY` - Turkish Lira + * `TRL` - Turkish Lira (1922–2005) + * `TMT` - Turkmenistani Manat + * `TMM` - Turkmenistani Manat (1993–2009) + * `USD` - US Dollar + * `USN` - US Dollar (Next day) + * `USS` - US Dollar (Same day) + * `UGX` - Ugandan Shilling + * `UGS` - Ugandan Shilling (1966–1987) + * `UAH` - Ukrainian Hryvnia + * `UAK` - Ukrainian Karbovanets + * `AED` - United Arab Emirates Dirham + * `UYW` - Uruguayan Nominal Wage Index Unit + * `UYU` - Uruguayan Peso + * `UYP` - Uruguayan Peso (1975–1993) + * `UYI` - Uruguayan Peso (Indexed Units) + * `UZS` - Uzbekistani Som + * `VUV` - Vanuatu Vatu + * `VES` - Venezuelan Bolívar + * `VEB` - Venezuelan Bolívar (1871–2008) + * `VEF` - Venezuelan Bolívar (2008–2018) + * `VND` - Vietnamese Dong + * `VNN` - Vietnamese Dong (1978–1985) + * `CHE` - WIR Euro + * `CHW` - WIR Franc + * `XOF` - West African CFA Franc + * `YDD` - Yemeni Dinar + * `YER` - Yemeni Rial + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + * `YUM` - Yugoslavian New Dinar (1994–2002) + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + * `ZWN` - ZWN + * `ZRN` - Zairean New Zaire (1993–1998) + * `ZRZ` - Zairean Zaire (1971–1993) + * `ZMW` - Zambian Kwacha + * `ZMK` - Zambian Kwacha (1968–2012) + * `ZWD` - Zimbabwean Dollar (1980–2008) + * `ZWR` - Zimbabwean Dollar (2008) + * `ZWL` - Zimbabwean Dollar (2009) + example: USD + company: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/CompanyInfo' + nullable: true + description: '`Company` object for the given `BalanceSheet` object.' + example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + x-merge-expands-to: CompanyInfo + date: + type: string + format: date-time + nullable: true + description: The balance sheet's date. The balance sheet data will reflect + the company's financial position this point in time. + example: '2021-09-31T00:00:00Z' + net_assets: + type: number + format: double + nullable: true + description: The balance sheet's net assets. + example: 1000 + assets: + type: array + items: + $ref: '#/components/schemas/ReportItem' + readOnly: true + example: + - remote_id: '10010' + name: Assets + value: 1000 + sub_items: [] + liabilities: + type: array + items: + $ref: '#/components/schemas/ReportItem' + readOnly: true + example: + - remote_id: '10011' + name: Liabilities + value: 500 + sub_items: [] + equity: + type: array + items: + $ref: '#/components/schemas/ReportItem' + readOnly: true + example: + - remote_id: '10012' + name: Equity + value: 500 + sub_items: [] + remote_generated_at: + type: string + format: date-time + nullable: true + description: The time that balance sheet was generated by the accounting + system. + example: '2021-10-01T00:00:00Z' + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + x-merge-expands: '{"company": "CompanyInfo"}' + x-merge-category: accounting + BankFeedAccount: + type: object + description: |- + # The BankFeedAccount Object + ### Description + The `BankFeedAccount` object represents a bank feed account, detailing various attributes including account identifiers, names, currency, and balance information. This object is central to managing and tracking bank feed accounts within the system. + + ### Usage Example + Fetch from the `GET BankFeedAccount` endpoint to view details of a bank feed account. + properties: + id: + type: string + format: uuid + readOnly: true + example: b26fd49a-cbae-470a-a8f8-bcbc119e0390 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '987300' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + source_account_id: + type: string + nullable: true + description: The unique identifier of the source account from our customer’s + platform. + maxLength: 1024 + example: '123566909' + target_account_id: + type: string + nullable: true + description: The unique identifier of the target account from the third + party software. + maxLength: 1024 + example: 49cd5a42-b311-4750-9361-52e2ed1d4653 + source_account_name: + type: string + nullable: true + description: The name of the source account as stored in our customer’s + platform. + maxLength: 1024 + example: Travel Bank Account + source_account_number: + type: string + nullable: true + description: The human-readable account number of the source account as + stored in our customer’s platform. + maxLength: 1024 + example: '12567' + target_account_name: + type: string + nullable: true + description: The name of the target account from the third party software. + maxLength: 1024 + example: Netsuite Travel Bank Account + currency: + oneOf: + - $ref: '#/components/schemas/TransactionCurrencyEnum' + - type: string + nullable: true + description: |- + The currency code of the bank feed. + + * `XUA` - ADB Unit of Account + * `AFN` - Afghan Afghani + * `AFA` - Afghan Afghani (1927–2002) + * `ALL` - Albanian Lek + * `ALK` - Albanian Lek (1946–1965) + * `DZD` - Algerian Dinar + * `ADP` - Andorran Peseta + * `AOA` - Angolan Kwanza + * `AOK` - Angolan Kwanza (1977–1991) + * `AON` - Angolan New Kwanza (1990–2000) + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + * `ARA` - Argentine Austral + * `ARS` - Argentine Peso + * `ARM` - Argentine Peso (1881–1970) + * `ARP` - Argentine Peso (1983–1985) + * `ARL` - Argentine Peso Ley (1970–1983) + * `AMD` - Armenian Dram + * `AWG` - Aruban Florin + * `AUD` - Australian Dollar + * `ATS` - Austrian Schilling + * `AZN` - Azerbaijani Manat + * `AZM` - Azerbaijani Manat (1993–2006) + * `BSD` - Bahamian Dollar + * `BHD` - Bahraini Dinar + * `BDT` - Bangladeshi Taka + * `BBD` - Barbadian Dollar + * `BYN` - Belarusian Ruble + * `BYB` - Belarusian Ruble (1994–1999) + * `BYR` - Belarusian Ruble (2000–2016) + * `BEF` - Belgian Franc + * `BEC` - Belgian Franc (convertible) + * `BEL` - Belgian Franc (financial) + * `BZD` - Belize Dollar + * `BMD` - Bermudan Dollar + * `BTN` - Bhutanese Ngultrum + * `BOB` - Bolivian Boliviano + * `BOL` - Bolivian Boliviano (1863–1963) + * `BOV` - Bolivian Mvdol + * `BOP` - Bolivian Peso + * `BAM` - Bosnia-Herzegovina Convertible Mark + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + * `BWP` - Botswanan Pula + * `BRC` - Brazilian Cruzado (1986–1989) + * `BRZ` - Brazilian Cruzeiro (1942–1967) + * `BRE` - Brazilian Cruzeiro (1990–1993) + * `BRR` - Brazilian Cruzeiro (1993–1994) + * `BRN` - Brazilian New Cruzado (1989–1990) + * `BRB` - Brazilian New Cruzeiro (1967–1986) + * `BRL` - Brazilian Real + * `GBP` - British Pound + * `BND` - Brunei Dollar + * `BGL` - Bulgarian Hard Lev + * `BGN` - Bulgarian Lev + * `BGO` - Bulgarian Lev (1879–1952) + * `BGM` - Bulgarian Socialist Lev + * `BUK` - Burmese Kyat + * `BIF` - Burundian Franc + * `XPF` - CFP Franc + * `KHR` - Cambodian Riel + * `CAD` - Canadian Dollar + * `CVE` - Cape Verdean Escudo + * `KYD` - Cayman Islands Dollar + * `XAF` - Central African CFA Franc + * `CLE` - Chilean Escudo + * `CLP` - Chilean Peso + * `CLF` - Chilean Unit of Account (UF) + * `CNX` - Chinese People’s Bank Dollar + * `CNY` - Chinese Yuan + * `CNH` - Chinese Yuan (offshore) + * `COP` - Colombian Peso + * `COU` - Colombian Real Value Unit + * `KMF` - Comorian Franc + * `CDF` - Congolese Franc + * `CRC` - Costa Rican Colón + * `HRD` - Croatian Dinar + * `HRK` - Croatian Kuna + * `CUC` - Cuban Convertible Peso + * `CUP` - Cuban Peso + * `CYP` - Cypriot Pound + * `CZK` - Czech Koruna + * `CSK` - Czechoslovak Hard Koruna + * `DKK` - Danish Krone + * `DJF` - Djiboutian Franc + * `DOP` - Dominican Peso + * `NLG` - Dutch Guilder + * `XCD` - East Caribbean Dollar + * `DDM` - East German Mark + * `ECS` - Ecuadorian Sucre + * `ECV` - Ecuadorian Unit of Constant Value + * `EGP` - Egyptian Pound + * `GQE` - Equatorial Guinean Ekwele + * `ERN` - Eritrean Nakfa + * `EEK` - Estonian Kroon + * `ETB` - Ethiopian Birr + * `EUR` - Euro + * `XBA` - European Composite Unit + * `XEU` - European Currency Unit + * `XBB` - European Monetary Unit + * `XBC` - European Unit of Account (XBC) + * `XBD` - European Unit of Account (XBD) + * `FKP` - Falkland Islands Pound + * `FJD` - Fijian Dollar + * `FIM` - Finnish Markka + * `FRF` - French Franc + * `XFO` - French Gold Franc + * `XFU` - French UIC-Franc + * `GMD` - Gambian Dalasi + * `GEK` - Georgian Kupon Larit + * `GEL` - Georgian Lari + * `DEM` - German Mark + * `GHS` - Ghanaian Cedi + * `GHC` - Ghanaian Cedi (1979–2007) + * `GIP` - Gibraltar Pound + * `XAU` - Gold + * `GRD` - Greek Drachma + * `GTQ` - Guatemalan Quetzal + * `GWP` - Guinea-Bissau Peso + * `GNF` - Guinean Franc + * `GNS` - Guinean Syli + * `GYD` - Guyanaese Dollar + * `HTG` - Haitian Gourde + * `HNL` - Honduran Lempira + * `HKD` - Hong Kong Dollar + * `HUF` - Hungarian Forint + * `IMP` - IMP + * `ISK` - Icelandic Króna + * `ISJ` - Icelandic Króna (1918–1981) + * `INR` - Indian Rupee + * `IDR` - Indonesian Rupiah + * `IRR` - Iranian Rial + * `IQD` - Iraqi Dinar + * `IEP` - Irish Pound + * `ILS` - Israeli New Shekel + * `ILP` - Israeli Pound + * `ILR` - Israeli Shekel (1980–1985) + * `ITL` - Italian Lira + * `JMD` - Jamaican Dollar + * `JPY` - Japanese Yen + * `JOD` - Jordanian Dinar + * `KZT` - Kazakhstani Tenge + * `KES` - Kenyan Shilling + * `KWD` - Kuwaiti Dinar + * `KGS` - Kyrgystani Som + * `LAK` - Laotian Kip + * `LVL` - Latvian Lats + * `LVR` - Latvian Ruble + * `LBP` - Lebanese Pound + * `LSL` - Lesotho Loti + * `LRD` - Liberian Dollar + * `LYD` - Libyan Dinar + * `LTL` - Lithuanian Litas + * `LTT` - Lithuanian Talonas + * `LUL` - Luxembourg Financial Franc + * `LUC` - Luxembourgian Convertible Franc + * `LUF` - Luxembourgian Franc + * `MOP` - Macanese Pataca + * `MKD` - Macedonian Denar + * `MKN` - Macedonian Denar (1992–1993) + * `MGA` - Malagasy Ariary + * `MGF` - Malagasy Franc + * `MWK` - Malawian Kwacha + * `MYR` - Malaysian Ringgit + * `MVR` - Maldivian Rufiyaa + * `MVP` - Maldivian Rupee (1947–1981) + * `MLF` - Malian Franc + * `MTL` - Maltese Lira + * `MTP` - Maltese Pound + * `MRU` - Mauritanian Ouguiya + * `MRO` - Mauritanian Ouguiya (1973–2017) + * `MUR` - Mauritian Rupee + * `MXV` - Mexican Investment Unit + * `MXN` - Mexican Peso + * `MXP` - Mexican Silver Peso (1861–1992) + * `MDC` - Moldovan Cupon + * `MDL` - Moldovan Leu + * `MCF` - Monegasque Franc + * `MNT` - Mongolian Tugrik + * `MAD` - Moroccan Dirham + * `MAF` - Moroccan Franc + * `MZE` - Mozambican Escudo + * `MZN` - Mozambican Metical + * `MZM` - Mozambican Metical (1980–2006) + * `MMK` - Myanmar Kyat + * `NAD` - Namibian Dollar + * `NPR` - Nepalese Rupee + * `ANG` - Netherlands Antillean Guilder + * `TWD` - New Taiwan Dollar + * `NZD` - New Zealand Dollar + * `NIO` - Nicaraguan Córdoba + * `NIC` - Nicaraguan Córdoba (1988–1991) + * `NGN` - Nigerian Naira + * `KPW` - North Korean Won + * `NOK` - Norwegian Krone + * `OMR` - Omani Rial + * `PKR` - Pakistani Rupee + * `XPD` - Palladium + * `PAB` - Panamanian Balboa + * `PGK` - Papua New Guinean Kina + * `PYG` - Paraguayan Guarani + * `PEI` - Peruvian Inti + * `PEN` - Peruvian Sol + * `PES` - Peruvian Sol (1863–1965) + * `PHP` - Philippine Peso + * `XPT` - Platinum + * `PLN` - Polish Zloty + * `PLZ` - Polish Zloty (1950–1995) + * `PTE` - Portuguese Escudo + * `GWE` - Portuguese Guinea Escudo + * `QAR` - Qatari Rial + * `XRE` - RINET Funds + * `RHD` - Rhodesian Dollar + * `RON` - Romanian Leu + * `ROL` - Romanian Leu (1952–2006) + * `RUB` - Russian Ruble + * `RUR` - Russian Ruble (1991–1998) + * `RWF` - Rwandan Franc + * `SVC` - Salvadoran Colón + * `WST` - Samoan Tala + * `SAR` - Saudi Riyal + * `RSD` - Serbian Dinar + * `CSD` - Serbian Dinar (2002–2006) + * `SCR` - Seychellois Rupee + * `SLL` - Sierra Leonean Leone + * `XAG` - Silver + * `SGD` - Singapore Dollar + * `SKK` - Slovak Koruna + * `SIT` - Slovenian Tolar + * `SBD` - Solomon Islands Dollar + * `SOS` - Somali Shilling + * `ZAR` - South African Rand + * `ZAL` - South African Rand (financial) + * `KRH` - South Korean Hwan (1953–1962) + * `KRW` - South Korean Won + * `KRO` - South Korean Won (1945–1953) + * `SSP` - South Sudanese Pound + * `SUR` - Soviet Rouble + * `ESP` - Spanish Peseta + * `ESA` - Spanish Peseta (A account) + * `ESB` - Spanish Peseta (convertible account) + * `XDR` - Special Drawing Rights + * `LKR` - Sri Lankan Rupee + * `SHP` - St. Helena Pound + * `XSU` - Sucre + * `SDD` - Sudanese Dinar (1992–2007) + * `SDG` - Sudanese Pound + * `SDP` - Sudanese Pound (1957–1998) + * `SRD` - Surinamese Dollar + * `SRG` - Surinamese Guilder + * `SZL` - Swazi Lilangeni + * `SEK` - Swedish Krona + * `CHF` - Swiss Franc + * `SYP` - Syrian Pound + * `STN` - São Tomé & Príncipe Dobra + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + * `TVD` - TVD + * `TJR` - Tajikistani Ruble + * `TJS` - Tajikistani Somoni + * `TZS` - Tanzanian Shilling + * `XTS` - Testing Currency Code + * `THB` - Thai Baht + * `XXX` - The codes assigned for transactions where no currency is involved + * `TPE` - Timorese Escudo + * `TOP` - Tongan Paʻanga + * `TTD` - Trinidad & Tobago Dollar + * `TND` - Tunisian Dinar + * `TRY` - Turkish Lira + * `TRL` - Turkish Lira (1922–2005) + * `TMT` - Turkmenistani Manat + * `TMM` - Turkmenistani Manat (1993–2009) + * `USD` - US Dollar + * `USN` - US Dollar (Next day) + * `USS` - US Dollar (Same day) + * `UGX` - Ugandan Shilling + * `UGS` - Ugandan Shilling (1966–1987) + * `UAH` - Ukrainian Hryvnia + * `UAK` - Ukrainian Karbovanets + * `AED` - United Arab Emirates Dirham + * `UYW` - Uruguayan Nominal Wage Index Unit + * `UYU` - Uruguayan Peso + * `UYP` - Uruguayan Peso (1975–1993) + * `UYI` - Uruguayan Peso (Indexed Units) + * `UZS` - Uzbekistani Som + * `VUV` - Vanuatu Vatu + * `VES` - Venezuelan Bolívar + * `VEB` - Venezuelan Bolívar (1871–2008) + * `VEF` - Venezuelan Bolívar (2008–2018) + * `VND` - Vietnamese Dong + * `VNN` - Vietnamese Dong (1978–1985) + * `CHE` - WIR Euro + * `CHW` - WIR Franc + * `XOF` - West African CFA Franc + * `YDD` - Yemeni Dinar + * `YER` - Yemeni Rial + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + * `YUM` - Yugoslavian New Dinar (1994–2002) + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + * `ZWN` - ZWN + * `ZRN` - Zairean New Zaire (1993–1998) + * `ZRZ` - Zairean Zaire (1971–1993) + * `ZMW` - Zambian Kwacha + * `ZMK` - Zambian Kwacha (1968–2012) + * `ZWD` - Zimbabwean Dollar (1980–2008) + * `ZWR` - Zimbabwean Dollar (2008) + * `ZWL` - Zimbabwean Dollar (2009) + example: USD + feed_status: + oneOf: + - $ref: '#/components/schemas/FeedStatusEnum' + - type: string + nullable: true + description: |- + The status of the bank feed. + + * `ACTIVE` - ACTIVE + * `INACTIVE` - INACTIVE + example: ACTIVE + feed_start_date: + type: string + format: date-time + nullable: true + description: The start date of the bank feed’s transactions. + example: '2024-02-02T00:00:00.000Z' + source_account_balance: + type: number + format: double + nullable: true + description: The current balance of funds in the source account. + example: 123.94 + account_type: + oneOf: + - $ref: '#/components/schemas/BankFeedAccountAccountTypeEnum' + - type: string + nullable: true + description: |- + The type of the account. + + * `BANK` - BANK + * `CREDIT_CARD` - CREDIT_CARD + example: BANK + remote_was_deleted: + type: boolean + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + type: object + additionalProperties: {} + nullable: true + description: The full data pulled from the third-party API for an object. + nullable: true + x-merge-category: accounting + BankFeedAccountAccountTypeEnum: + enum: + - BANK + - CREDIT_CARD + type: string + description: |- + * `BANK` - BANK + * `CREDIT_CARD` - CREDIT_CARD + x-merge-category: accounting + BankFeedAccountEndpointRequest: + type: object + properties: + model: + $ref: '#/components/schemas/BankFeedAccountRequest' + required: + - model + x-merge-category: accounting + BankFeedAccountRequest: + type: object + description: |- + # The BankFeedAccount Object + ### Description + The `BankFeedAccount` object represents a bank feed account, detailing various attributes including account identifiers, names, currency, and balance information. This object is central to managing and tracking bank feed accounts within the system. + + ### Usage Example + Fetch from the `GET BankFeedAccount` endpoint to view details of a bank feed account. + properties: + source_account_id: + type: string + nullable: true + description: The unique identifier of the source account from our customer’s + platform. + maxLength: 1024 + example: '123566909' + target_account_id: + type: string + nullable: true + description: The unique identifier of the target account from the third + party software. + maxLength: 1024 + example: 49cd5a42-b311-4750-9361-52e2ed1d4653 + source_account_name: + type: string + nullable: true + description: The name of the source account as stored in our customer’s + platform. + maxLength: 1024 + example: Travel Bank Account + source_account_number: + type: string + nullable: true + description: The human-readable account number of the source account as + stored in our customer’s platform. + maxLength: 1024 + example: '12567' + target_account_name: + type: string + nullable: true + description: The name of the target account from the third party software. + maxLength: 1024 + example: Netsuite Travel Bank Account + currency: + oneOf: + - $ref: '#/components/schemas/TransactionCurrencyEnum' + - type: string + nullable: true + description: |- + The currency code of the bank feed. + + * `XUA` - ADB Unit of Account + * `AFN` - Afghan Afghani + * `AFA` - Afghan Afghani (1927–2002) + * `ALL` - Albanian Lek + * `ALK` - Albanian Lek (1946–1965) + * `DZD` - Algerian Dinar + * `ADP` - Andorran Peseta + * `AOA` - Angolan Kwanza + * `AOK` - Angolan Kwanza (1977–1991) + * `AON` - Angolan New Kwanza (1990–2000) + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + * `ARA` - Argentine Austral + * `ARS` - Argentine Peso + * `ARM` - Argentine Peso (1881–1970) + * `ARP` - Argentine Peso (1983–1985) + * `ARL` - Argentine Peso Ley (1970–1983) + * `AMD` - Armenian Dram + * `AWG` - Aruban Florin + * `AUD` - Australian Dollar + * `ATS` - Austrian Schilling + * `AZN` - Azerbaijani Manat + * `AZM` - Azerbaijani Manat (1993–2006) + * `BSD` - Bahamian Dollar + * `BHD` - Bahraini Dinar + * `BDT` - Bangladeshi Taka + * `BBD` - Barbadian Dollar + * `BYN` - Belarusian Ruble + * `BYB` - Belarusian Ruble (1994–1999) + * `BYR` - Belarusian Ruble (2000–2016) + * `BEF` - Belgian Franc + * `BEC` - Belgian Franc (convertible) + * `BEL` - Belgian Franc (financial) + * `BZD` - Belize Dollar + * `BMD` - Bermudan Dollar + * `BTN` - Bhutanese Ngultrum + * `BOB` - Bolivian Boliviano + * `BOL` - Bolivian Boliviano (1863–1963) + * `BOV` - Bolivian Mvdol + * `BOP` - Bolivian Peso + * `BAM` - Bosnia-Herzegovina Convertible Mark + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + * `BWP` - Botswanan Pula + * `BRC` - Brazilian Cruzado (1986–1989) + * `BRZ` - Brazilian Cruzeiro (1942–1967) + * `BRE` - Brazilian Cruzeiro (1990–1993) + * `BRR` - Brazilian Cruzeiro (1993–1994) + * `BRN` - Brazilian New Cruzado (1989–1990) + * `BRB` - Brazilian New Cruzeiro (1967–1986) + * `BRL` - Brazilian Real + * `GBP` - British Pound + * `BND` - Brunei Dollar + * `BGL` - Bulgarian Hard Lev + * `BGN` - Bulgarian Lev + * `BGO` - Bulgarian Lev (1879–1952) + * `BGM` - Bulgarian Socialist Lev + * `BUK` - Burmese Kyat + * `BIF` - Burundian Franc + * `XPF` - CFP Franc + * `KHR` - Cambodian Riel + * `CAD` - Canadian Dollar + * `CVE` - Cape Verdean Escudo + * `KYD` - Cayman Islands Dollar + * `XAF` - Central African CFA Franc + * `CLE` - Chilean Escudo + * `CLP` - Chilean Peso + * `CLF` - Chilean Unit of Account (UF) + * `CNX` - Chinese People’s Bank Dollar + * `CNY` - Chinese Yuan + * `CNH` - Chinese Yuan (offshore) + * `COP` - Colombian Peso + * `COU` - Colombian Real Value Unit + * `KMF` - Comorian Franc + * `CDF` - Congolese Franc + * `CRC` - Costa Rican Colón + * `HRD` - Croatian Dinar + * `HRK` - Croatian Kuna + * `CUC` - Cuban Convertible Peso + * `CUP` - Cuban Peso + * `CYP` - Cypriot Pound + * `CZK` - Czech Koruna + * `CSK` - Czechoslovak Hard Koruna + * `DKK` - Danish Krone + * `DJF` - Djiboutian Franc + * `DOP` - Dominican Peso + * `NLG` - Dutch Guilder + * `XCD` - East Caribbean Dollar + * `DDM` - East German Mark + * `ECS` - Ecuadorian Sucre + * `ECV` - Ecuadorian Unit of Constant Value + * `EGP` - Egyptian Pound + * `GQE` - Equatorial Guinean Ekwele + * `ERN` - Eritrean Nakfa + * `EEK` - Estonian Kroon + * `ETB` - Ethiopian Birr + * `EUR` - Euro + * `XBA` - European Composite Unit + * `XEU` - European Currency Unit + * `XBB` - European Monetary Unit + * `XBC` - European Unit of Account (XBC) + * `XBD` - European Unit of Account (XBD) + * `FKP` - Falkland Islands Pound + * `FJD` - Fijian Dollar + * `FIM` - Finnish Markka + * `FRF` - French Franc + * `XFO` - French Gold Franc + * `XFU` - French UIC-Franc + * `GMD` - Gambian Dalasi + * `GEK` - Georgian Kupon Larit + * `GEL` - Georgian Lari + * `DEM` - German Mark + * `GHS` - Ghanaian Cedi + * `GHC` - Ghanaian Cedi (1979–2007) + * `GIP` - Gibraltar Pound + * `XAU` - Gold + * `GRD` - Greek Drachma + * `GTQ` - Guatemalan Quetzal + * `GWP` - Guinea-Bissau Peso + * `GNF` - Guinean Franc + * `GNS` - Guinean Syli + * `GYD` - Guyanaese Dollar + * `HTG` - Haitian Gourde + * `HNL` - Honduran Lempira + * `HKD` - Hong Kong Dollar + * `HUF` - Hungarian Forint + * `IMP` - IMP + * `ISK` - Icelandic Króna + * `ISJ` - Icelandic Króna (1918–1981) + * `INR` - Indian Rupee + * `IDR` - Indonesian Rupiah + * `IRR` - Iranian Rial + * `IQD` - Iraqi Dinar + * `IEP` - Irish Pound + * `ILS` - Israeli New Shekel + * `ILP` - Israeli Pound + * `ILR` - Israeli Shekel (1980–1985) + * `ITL` - Italian Lira + * `JMD` - Jamaican Dollar + * `JPY` - Japanese Yen + * `JOD` - Jordanian Dinar + * `KZT` - Kazakhstani Tenge + * `KES` - Kenyan Shilling + * `KWD` - Kuwaiti Dinar + * `KGS` - Kyrgystani Som + * `LAK` - Laotian Kip + * `LVL` - Latvian Lats + * `LVR` - Latvian Ruble + * `LBP` - Lebanese Pound + * `LSL` - Lesotho Loti + * `LRD` - Liberian Dollar + * `LYD` - Libyan Dinar + * `LTL` - Lithuanian Litas + * `LTT` - Lithuanian Talonas + * `LUL` - Luxembourg Financial Franc + * `LUC` - Luxembourgian Convertible Franc + * `LUF` - Luxembourgian Franc + * `MOP` - Macanese Pataca + * `MKD` - Macedonian Denar + * `MKN` - Macedonian Denar (1992–1993) + * `MGA` - Malagasy Ariary + * `MGF` - Malagasy Franc + * `MWK` - Malawian Kwacha + * `MYR` - Malaysian Ringgit + * `MVR` - Maldivian Rufiyaa + * `MVP` - Maldivian Rupee (1947–1981) + * `MLF` - Malian Franc + * `MTL` - Maltese Lira + * `MTP` - Maltese Pound + * `MRU` - Mauritanian Ouguiya + * `MRO` - Mauritanian Ouguiya (1973–2017) + * `MUR` - Mauritian Rupee + * `MXV` - Mexican Investment Unit + * `MXN` - Mexican Peso + * `MXP` - Mexican Silver Peso (1861–1992) + * `MDC` - Moldovan Cupon + * `MDL` - Moldovan Leu + * `MCF` - Monegasque Franc + * `MNT` - Mongolian Tugrik + * `MAD` - Moroccan Dirham + * `MAF` - Moroccan Franc + * `MZE` - Mozambican Escudo + * `MZN` - Mozambican Metical + * `MZM` - Mozambican Metical (1980–2006) + * `MMK` - Myanmar Kyat + * `NAD` - Namibian Dollar + * `NPR` - Nepalese Rupee + * `ANG` - Netherlands Antillean Guilder + * `TWD` - New Taiwan Dollar + * `NZD` - New Zealand Dollar + * `NIO` - Nicaraguan Córdoba + * `NIC` - Nicaraguan Córdoba (1988–1991) + * `NGN` - Nigerian Naira + * `KPW` - North Korean Won + * `NOK` - Norwegian Krone + * `OMR` - Omani Rial + * `PKR` - Pakistani Rupee + * `XPD` - Palladium + * `PAB` - Panamanian Balboa + * `PGK` - Papua New Guinean Kina + * `PYG` - Paraguayan Guarani + * `PEI` - Peruvian Inti + * `PEN` - Peruvian Sol + * `PES` - Peruvian Sol (1863–1965) + * `PHP` - Philippine Peso + * `XPT` - Platinum + * `PLN` - Polish Zloty + * `PLZ` - Polish Zloty (1950–1995) + * `PTE` - Portuguese Escudo + * `GWE` - Portuguese Guinea Escudo + * `QAR` - Qatari Rial + * `XRE` - RINET Funds + * `RHD` - Rhodesian Dollar + * `RON` - Romanian Leu + * `ROL` - Romanian Leu (1952–2006) + * `RUB` - Russian Ruble + * `RUR` - Russian Ruble (1991–1998) + * `RWF` - Rwandan Franc + * `SVC` - Salvadoran Colón + * `WST` - Samoan Tala + * `SAR` - Saudi Riyal + * `RSD` - Serbian Dinar + * `CSD` - Serbian Dinar (2002–2006) + * `SCR` - Seychellois Rupee + * `SLL` - Sierra Leonean Leone + * `XAG` - Silver + * `SGD` - Singapore Dollar + * `SKK` - Slovak Koruna + * `SIT` - Slovenian Tolar + * `SBD` - Solomon Islands Dollar + * `SOS` - Somali Shilling + * `ZAR` - South African Rand + * `ZAL` - South African Rand (financial) + * `KRH` - South Korean Hwan (1953–1962) + * `KRW` - South Korean Won + * `KRO` - South Korean Won (1945–1953) + * `SSP` - South Sudanese Pound + * `SUR` - Soviet Rouble + * `ESP` - Spanish Peseta + * `ESA` - Spanish Peseta (A account) + * `ESB` - Spanish Peseta (convertible account) + * `XDR` - Special Drawing Rights + * `LKR` - Sri Lankan Rupee + * `SHP` - St. Helena Pound + * `XSU` - Sucre + * `SDD` - Sudanese Dinar (1992–2007) + * `SDG` - Sudanese Pound + * `SDP` - Sudanese Pound (1957–1998) + * `SRD` - Surinamese Dollar + * `SRG` - Surinamese Guilder + * `SZL` - Swazi Lilangeni + * `SEK` - Swedish Krona + * `CHF` - Swiss Franc + * `SYP` - Syrian Pound + * `STN` - São Tomé & Príncipe Dobra + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + * `TVD` - TVD + * `TJR` - Tajikistani Ruble + * `TJS` - Tajikistani Somoni + * `TZS` - Tanzanian Shilling + * `XTS` - Testing Currency Code + * `THB` - Thai Baht + * `XXX` - The codes assigned for transactions where no currency is involved + * `TPE` - Timorese Escudo + * `TOP` - Tongan Paʻanga + * `TTD` - Trinidad & Tobago Dollar + * `TND` - Tunisian Dinar + * `TRY` - Turkish Lira + * `TRL` - Turkish Lira (1922–2005) + * `TMT` - Turkmenistani Manat + * `TMM` - Turkmenistani Manat (1993–2009) + * `USD` - US Dollar + * `USN` - US Dollar (Next day) + * `USS` - US Dollar (Same day) + * `UGX` - Ugandan Shilling + * `UGS` - Ugandan Shilling (1966–1987) + * `UAH` - Ukrainian Hryvnia + * `UAK` - Ukrainian Karbovanets + * `AED` - United Arab Emirates Dirham + * `UYW` - Uruguayan Nominal Wage Index Unit + * `UYU` - Uruguayan Peso + * `UYP` - Uruguayan Peso (1975–1993) + * `UYI` - Uruguayan Peso (Indexed Units) + * `UZS` - Uzbekistani Som + * `VUV` - Vanuatu Vatu + * `VES` - Venezuelan Bolívar + * `VEB` - Venezuelan Bolívar (1871–2008) + * `VEF` - Venezuelan Bolívar (2008–2018) + * `VND` - Vietnamese Dong + * `VNN` - Vietnamese Dong (1978–1985) + * `CHE` - WIR Euro + * `CHW` - WIR Franc + * `XOF` - West African CFA Franc + * `YDD` - Yemeni Dinar + * `YER` - Yemeni Rial + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + * `YUM` - Yugoslavian New Dinar (1994–2002) + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + * `ZWN` - ZWN + * `ZRN` - Zairean New Zaire (1993–1998) + * `ZRZ` - Zairean Zaire (1971–1993) + * `ZMW` - Zambian Kwacha + * `ZMK` - Zambian Kwacha (1968–2012) + * `ZWD` - Zimbabwean Dollar (1980–2008) + * `ZWR` - Zimbabwean Dollar (2008) + * `ZWL` - Zimbabwean Dollar (2009) + example: USD + feed_status: + oneOf: + - $ref: '#/components/schemas/FeedStatusEnum' + - type: string + nullable: true + description: |- + The status of the bank feed. + + * `ACTIVE` - ACTIVE + * `INACTIVE` - INACTIVE + example: ACTIVE + feed_start_date: + type: string + format: date-time + nullable: true + description: The start date of the bank feed’s transactions. + example: '2024-02-02T00:00:00.000Z' + source_account_balance: + type: number + format: double + nullable: true + description: The current balance of funds in the source account. + example: 123.94 + account_type: + oneOf: + - $ref: '#/components/schemas/BankFeedAccountAccountTypeEnum' + - type: string + nullable: true + description: |- + The type of the account. + + * `BANK` - BANK + * `CREDIT_CARD` - CREDIT_CARD + example: BANK + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + x-merge-category: accounting + BankFeedAccountResponse: + type: object + properties: + model: + $ref: '#/components/schemas/BankFeedAccount' + warnings: + type: array + items: + $ref: '#/components/schemas/WarningValidationProblem' + errors: + type: array + items: + $ref: '#/components/schemas/ErrorValidationProblem' + logs: + type: array + items: + $ref: '#/components/schemas/DebugModeLog' + required: + - errors + - model + - warnings + x-merge-category: accounting + BankFeedTransaction: + type: object + description: |- + # The BankFeedTransaction Object + ### Description + The `BankFeedTransaction` object is used to represent transactions linked to a bank feed account. This includes details about the transaction such as the date, amount, description, and type. + + ### Usage Example + Fetch from the `GET BankFeedTransaction` endpoint to view details of a transaction associated with a bank feed account. + properties: + id: + type: string + format: uuid + readOnly: true + example: b26fd49a-cbae-470a-a8f8-bcbc119e0390 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '987300' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + bank_feed_account: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/BankFeedAccount' + nullable: true + description: The bank feed account associated with the transaction. + example: 49cd5a42-b311-4750-9361-52e2ed1d4653 + x-merge-expands-to: BankFeedAccount + transaction_date: + type: string + format: date-time + nullable: true + description: The date that the transaction occurred. + example: '2024-02-02T00:00:00.000Z' + posted_date: + type: string + format: date-time + nullable: true + description: The date the transaction was posted to the bank account. + example: '2024-02-03T00:00:00.000Z' + amount: + type: number + format: double + nullable: true + description: The amount of the transaction. + example: 100.1 + description: + type: string + nullable: true + description: The description of the transaction. + maxLength: 1024 + example: Lunch expense + transaction_type: + type: string + nullable: true + description: The underlying type of the transaction. + maxLength: 1024 + example: payment + payee: + type: string + nullable: true + description: The person or merchant who initiated the transaction, or alternatively, + to whom the transaction was paid. + maxLength: 1024 + example: Elmo's diner + credit_or_debit: + oneOf: + - $ref: '#/components/schemas/CreditOrDebitEnum' + - type: string + nullable: true + description: |- + If the transaction is of type debit or credit. + + * `CREDIT` - CREDIT + * `DEBIT` - DEBIT + example: CREDIT + source_transaction_id: + type: string + nullable: true + description: The customer’s identifier for the transaction. + maxLength: 1024 + example: '124569' + remote_was_deleted: + type: boolean + readOnly: true + description: 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/). + is_processed: + type: boolean + readOnly: true + description: Whether or not this transaction has been processed by the external + system. For example, NetSuite writes this field as True when the SuiteApp + has processed the transaction. + x-merge-expands: '{"bank_feed_account": "BankFeedAccount"}' + x-merge-category: accounting + BankFeedTransactionEndpointRequest: + type: object + properties: + model: + $ref: '#/components/schemas/BankFeedTransactionRequestRequest' + required: + - model + x-merge-category: accounting + BankFeedTransactionRequestRequest: + type: object + description: |- + # The BankFeedTransaction Object + ### Description + The `BankFeedTransaction` object is used to represent transactions linked to a bank feed account. This includes details about the transaction such as the date, amount, description, and type. + + ### Usage Example + Fetch from the `GET BankFeedTransaction` endpoint to view details of a transaction associated with a bank feed account. + properties: + bank_feed_account: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/BankFeedAccount' + nullable: true + description: The bank feed account associated with the transaction. + example: 49cd5a42-b311-4750-9361-52e2ed1d4653 + x-merge-expands-to: BankFeedAccount + transaction_date: + type: string + format: date-time + nullable: true + description: The date that the transaction occurred. + example: '2024-02-02T00:00:00.000Z' + posted_date: + type: string + format: date-time + nullable: true + description: The date the transaction was posted to the bank account. + example: '2024-02-03T00:00:00.000Z' + amount: + type: number + format: double + nullable: true + description: The amount of the transaction. + example: 100.1 + description: + type: string + nullable: true + description: The description of the transaction. + maxLength: 1024 + example: Lunch expense + transaction_type: + type: string + nullable: true + description: The underlying type of the transaction. + maxLength: 1024 + example: payment + payee: + type: string + nullable: true + description: The person or merchant who initiated the transaction, or alternatively, + to whom the transaction was paid. + maxLength: 1024 + example: Elmo's diner + credit_or_debit: + oneOf: + - $ref: '#/components/schemas/CreditOrDebitEnum' + - type: string + nullable: true + description: |- + If the transaction is of type debit or credit. + + * `CREDIT` - CREDIT + * `DEBIT` - DEBIT + example: CREDIT + source_transaction_id: + type: string + nullable: true + description: The customer’s identifier for the transaction. + maxLength: 1024 + example: '124569' + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + required: + - bank_feed_account + x-merge-expands: '{"bank_feed_account": "BankFeedAccount"}' + x-merge-category: accounting + BankFeedTransactionResponse: + type: object + properties: + model: + $ref: '#/components/schemas/BankFeedTransaction' + warnings: + type: array + items: + $ref: '#/components/schemas/WarningValidationProblem' + errors: + type: array + items: + $ref: '#/components/schemas/ErrorValidationProblem' + logs: + type: array + items: + $ref: '#/components/schemas/DebugModeLog' + required: + - errors + - model + - warnings + x-merge-category: accounting + CashFlowStatement: + type: object + description: |- + # The CashFlowStatement Object + ### Description + The `CashFlowStatement` object shows operating activities, investing activities, and financing activities over a period of time (month, quarter, or year). + + ### Usage Example + Fetch from the `LIST CashFlowStatements` endpoint and view a company's cash flow statements. + properties: + id: + type: string + format: uuid + readOnly: true + example: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '8211088' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + name: + type: string + nullable: true + description: The cash flow statement's name. + example: CashFlow + currency: + oneOf: + - $ref: '#/components/schemas/TransactionCurrencyEnum' + - type: string + nullable: true + description: |- + The cash flow statement's currency. + + * `XUA` - ADB Unit of Account + * `AFN` - Afghan Afghani + * `AFA` - Afghan Afghani (1927–2002) + * `ALL` - Albanian Lek + * `ALK` - Albanian Lek (1946–1965) + * `DZD` - Algerian Dinar + * `ADP` - Andorran Peseta + * `AOA` - Angolan Kwanza + * `AOK` - Angolan Kwanza (1977–1991) + * `AON` - Angolan New Kwanza (1990–2000) + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + * `ARA` - Argentine Austral + * `ARS` - Argentine Peso + * `ARM` - Argentine Peso (1881–1970) + * `ARP` - Argentine Peso (1983–1985) + * `ARL` - Argentine Peso Ley (1970–1983) + * `AMD` - Armenian Dram + * `AWG` - Aruban Florin + * `AUD` - Australian Dollar + * `ATS` - Austrian Schilling + * `AZN` - Azerbaijani Manat + * `AZM` - Azerbaijani Manat (1993–2006) + * `BSD` - Bahamian Dollar + * `BHD` - Bahraini Dinar + * `BDT` - Bangladeshi Taka + * `BBD` - Barbadian Dollar + * `BYN` - Belarusian Ruble + * `BYB` - Belarusian Ruble (1994–1999) + * `BYR` - Belarusian Ruble (2000–2016) + * `BEF` - Belgian Franc + * `BEC` - Belgian Franc (convertible) + * `BEL` - Belgian Franc (financial) + * `BZD` - Belize Dollar + * `BMD` - Bermudan Dollar + * `BTN` - Bhutanese Ngultrum + * `BOB` - Bolivian Boliviano + * `BOL` - Bolivian Boliviano (1863–1963) + * `BOV` - Bolivian Mvdol + * `BOP` - Bolivian Peso + * `BAM` - Bosnia-Herzegovina Convertible Mark + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + * `BWP` - Botswanan Pula + * `BRC` - Brazilian Cruzado (1986–1989) + * `BRZ` - Brazilian Cruzeiro (1942–1967) + * `BRE` - Brazilian Cruzeiro (1990–1993) + * `BRR` - Brazilian Cruzeiro (1993–1994) + * `BRN` - Brazilian New Cruzado (1989–1990) + * `BRB` - Brazilian New Cruzeiro (1967–1986) + * `BRL` - Brazilian Real + * `GBP` - British Pound + * `BND` - Brunei Dollar + * `BGL` - Bulgarian Hard Lev + * `BGN` - Bulgarian Lev + * `BGO` - Bulgarian Lev (1879–1952) + * `BGM` - Bulgarian Socialist Lev + * `BUK` - Burmese Kyat + * `BIF` - Burundian Franc + * `XPF` - CFP Franc + * `KHR` - Cambodian Riel + * `CAD` - Canadian Dollar + * `CVE` - Cape Verdean Escudo + * `KYD` - Cayman Islands Dollar + * `XAF` - Central African CFA Franc + * `CLE` - Chilean Escudo + * `CLP` - Chilean Peso + * `CLF` - Chilean Unit of Account (UF) + * `CNX` - Chinese People’s Bank Dollar + * `CNY` - Chinese Yuan + * `CNH` - Chinese Yuan (offshore) + * `COP` - Colombian Peso + * `COU` - Colombian Real Value Unit + * `KMF` - Comorian Franc + * `CDF` - Congolese Franc + * `CRC` - Costa Rican Colón + * `HRD` - Croatian Dinar + * `HRK` - Croatian Kuna + * `CUC` - Cuban Convertible Peso + * `CUP` - Cuban Peso + * `CYP` - Cypriot Pound + * `CZK` - Czech Koruna + * `CSK` - Czechoslovak Hard Koruna + * `DKK` - Danish Krone + * `DJF` - Djiboutian Franc + * `DOP` - Dominican Peso + * `NLG` - Dutch Guilder + * `XCD` - East Caribbean Dollar + * `DDM` - East German Mark + * `ECS` - Ecuadorian Sucre + * `ECV` - Ecuadorian Unit of Constant Value + * `EGP` - Egyptian Pound + * `GQE` - Equatorial Guinean Ekwele + * `ERN` - Eritrean Nakfa + * `EEK` - Estonian Kroon + * `ETB` - Ethiopian Birr + * `EUR` - Euro + * `XBA` - European Composite Unit + * `XEU` - European Currency Unit + * `XBB` - European Monetary Unit + * `XBC` - European Unit of Account (XBC) + * `XBD` - European Unit of Account (XBD) + * `FKP` - Falkland Islands Pound + * `FJD` - Fijian Dollar + * `FIM` - Finnish Markka + * `FRF` - French Franc + * `XFO` - French Gold Franc + * `XFU` - French UIC-Franc + * `GMD` - Gambian Dalasi + * `GEK` - Georgian Kupon Larit + * `GEL` - Georgian Lari + * `DEM` - German Mark + * `GHS` - Ghanaian Cedi + * `GHC` - Ghanaian Cedi (1979–2007) + * `GIP` - Gibraltar Pound + * `XAU` - Gold + * `GRD` - Greek Drachma + * `GTQ` - Guatemalan Quetzal + * `GWP` - Guinea-Bissau Peso + * `GNF` - Guinean Franc + * `GNS` - Guinean Syli + * `GYD` - Guyanaese Dollar + * `HTG` - Haitian Gourde + * `HNL` - Honduran Lempira + * `HKD` - Hong Kong Dollar + * `HUF` - Hungarian Forint + * `IMP` - IMP + * `ISK` - Icelandic Króna + * `ISJ` - Icelandic Króna (1918–1981) + * `INR` - Indian Rupee + * `IDR` - Indonesian Rupiah + * `IRR` - Iranian Rial + * `IQD` - Iraqi Dinar + * `IEP` - Irish Pound + * `ILS` - Israeli New Shekel + * `ILP` - Israeli Pound + * `ILR` - Israeli Shekel (1980–1985) + * `ITL` - Italian Lira + * `JMD` - Jamaican Dollar + * `JPY` - Japanese Yen + * `JOD` - Jordanian Dinar + * `KZT` - Kazakhstani Tenge + * `KES` - Kenyan Shilling + * `KWD` - Kuwaiti Dinar + * `KGS` - Kyrgystani Som + * `LAK` - Laotian Kip + * `LVL` - Latvian Lats + * `LVR` - Latvian Ruble + * `LBP` - Lebanese Pound + * `LSL` - Lesotho Loti + * `LRD` - Liberian Dollar + * `LYD` - Libyan Dinar + * `LTL` - Lithuanian Litas + * `LTT` - Lithuanian Talonas + * `LUL` - Luxembourg Financial Franc + * `LUC` - Luxembourgian Convertible Franc + * `LUF` - Luxembourgian Franc + * `MOP` - Macanese Pataca + * `MKD` - Macedonian Denar + * `MKN` - Macedonian Denar (1992–1993) + * `MGA` - Malagasy Ariary + * `MGF` - Malagasy Franc + * `MWK` - Malawian Kwacha + * `MYR` - Malaysian Ringgit + * `MVR` - Maldivian Rufiyaa + * `MVP` - Maldivian Rupee (1947–1981) + * `MLF` - Malian Franc + * `MTL` - Maltese Lira + * `MTP` - Maltese Pound + * `MRU` - Mauritanian Ouguiya + * `MRO` - Mauritanian Ouguiya (1973–2017) + * `MUR` - Mauritian Rupee + * `MXV` - Mexican Investment Unit + * `MXN` - Mexican Peso + * `MXP` - Mexican Silver Peso (1861–1992) + * `MDC` - Moldovan Cupon + * `MDL` - Moldovan Leu + * `MCF` - Monegasque Franc + * `MNT` - Mongolian Tugrik + * `MAD` - Moroccan Dirham + * `MAF` - Moroccan Franc + * `MZE` - Mozambican Escudo + * `MZN` - Mozambican Metical + * `MZM` - Mozambican Metical (1980–2006) + * `MMK` - Myanmar Kyat + * `NAD` - Namibian Dollar + * `NPR` - Nepalese Rupee + * `ANG` - Netherlands Antillean Guilder + * `TWD` - New Taiwan Dollar + * `NZD` - New Zealand Dollar + * `NIO` - Nicaraguan Córdoba + * `NIC` - Nicaraguan Córdoba (1988–1991) + * `NGN` - Nigerian Naira + * `KPW` - North Korean Won + * `NOK` - Norwegian Krone + * `OMR` - Omani Rial + * `PKR` - Pakistani Rupee + * `XPD` - Palladium + * `PAB` - Panamanian Balboa + * `PGK` - Papua New Guinean Kina + * `PYG` - Paraguayan Guarani + * `PEI` - Peruvian Inti + * `PEN` - Peruvian Sol + * `PES` - Peruvian Sol (1863–1965) + * `PHP` - Philippine Peso + * `XPT` - Platinum + * `PLN` - Polish Zloty + * `PLZ` - Polish Zloty (1950–1995) + * `PTE` - Portuguese Escudo + * `GWE` - Portuguese Guinea Escudo + * `QAR` - Qatari Rial + * `XRE` - RINET Funds + * `RHD` - Rhodesian Dollar + * `RON` - Romanian Leu + * `ROL` - Romanian Leu (1952–2006) + * `RUB` - Russian Ruble + * `RUR` - Russian Ruble (1991–1998) + * `RWF` - Rwandan Franc + * `SVC` - Salvadoran Colón + * `WST` - Samoan Tala + * `SAR` - Saudi Riyal + * `RSD` - Serbian Dinar + * `CSD` - Serbian Dinar (2002–2006) + * `SCR` - Seychellois Rupee + * `SLL` - Sierra Leonean Leone + * `XAG` - Silver + * `SGD` - Singapore Dollar + * `SKK` - Slovak Koruna + * `SIT` - Slovenian Tolar + * `SBD` - Solomon Islands Dollar + * `SOS` - Somali Shilling + * `ZAR` - South African Rand + * `ZAL` - South African Rand (financial) + * `KRH` - South Korean Hwan (1953–1962) + * `KRW` - South Korean Won + * `KRO` - South Korean Won (1945–1953) + * `SSP` - South Sudanese Pound + * `SUR` - Soviet Rouble + * `ESP` - Spanish Peseta + * `ESA` - Spanish Peseta (A account) + * `ESB` - Spanish Peseta (convertible account) + * `XDR` - Special Drawing Rights + * `LKR` - Sri Lankan Rupee + * `SHP` - St. Helena Pound + * `XSU` - Sucre + * `SDD` - Sudanese Dinar (1992–2007) + * `SDG` - Sudanese Pound + * `SDP` - Sudanese Pound (1957–1998) + * `SRD` - Surinamese Dollar + * `SRG` - Surinamese Guilder + * `SZL` - Swazi Lilangeni + * `SEK` - Swedish Krona + * `CHF` - Swiss Franc + * `SYP` - Syrian Pound + * `STN` - São Tomé & Príncipe Dobra + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + * `TVD` - TVD + * `TJR` - Tajikistani Ruble + * `TJS` - Tajikistani Somoni + * `TZS` - Tanzanian Shilling + * `XTS` - Testing Currency Code + * `THB` - Thai Baht + * `XXX` - The codes assigned for transactions where no currency is involved + * `TPE` - Timorese Escudo + * `TOP` - Tongan Paʻanga + * `TTD` - Trinidad & Tobago Dollar + * `TND` - Tunisian Dinar + * `TRY` - Turkish Lira + * `TRL` - Turkish Lira (1922–2005) + * `TMT` - Turkmenistani Manat + * `TMM` - Turkmenistani Manat (1993–2009) + * `USD` - US Dollar + * `USN` - US Dollar (Next day) + * `USS` - US Dollar (Same day) + * `UGX` - Ugandan Shilling + * `UGS` - Ugandan Shilling (1966–1987) + * `UAH` - Ukrainian Hryvnia + * `UAK` - Ukrainian Karbovanets + * `AED` - United Arab Emirates Dirham + * `UYW` - Uruguayan Nominal Wage Index Unit + * `UYU` - Uruguayan Peso + * `UYP` - Uruguayan Peso (1975–1993) + * `UYI` - Uruguayan Peso (Indexed Units) + * `UZS` - Uzbekistani Som + * `VUV` - Vanuatu Vatu + * `VES` - Venezuelan Bolívar + * `VEB` - Venezuelan Bolívar (1871–2008) + * `VEF` - Venezuelan Bolívar (2008–2018) + * `VND` - Vietnamese Dong + * `VNN` - Vietnamese Dong (1978–1985) + * `CHE` - WIR Euro + * `CHW` - WIR Franc + * `XOF` - West African CFA Franc + * `YDD` - Yemeni Dinar + * `YER` - Yemeni Rial + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + * `YUM` - Yugoslavian New Dinar (1994–2002) + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + * `ZWN` - ZWN + * `ZRN` - Zairean New Zaire (1993–1998) + * `ZRZ` - Zairean Zaire (1971–1993) + * `ZMW` - Zambian Kwacha + * `ZMK` - Zambian Kwacha (1968–2012) + * `ZWD` - Zimbabwean Dollar (1980–2008) + * `ZWR` - Zimbabwean Dollar (2008) + * `ZWL` - Zimbabwean Dollar (2009) + example: USD + company: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/CompanyInfo' + nullable: true + description: The company the cash flow statement belongs to. + example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + x-merge-expands-to: CompanyInfo + start_period: + type: string + format: date-time + nullable: true + description: The cash flow statement's start period. + example: '2020-01-01T00:00:00Z' + end_period: + type: string + format: date-time + nullable: true + description: The cash flow statement's end period. + example: '2020-03-31T00:00:00Z' + cash_at_beginning_of_period: + type: number + format: double + nullable: true + description: Cash and cash equivalents at the beginning of the cash flow + statement's period. + example: 5000 + cash_at_end_of_period: + type: number + format: double + nullable: true + description: Cash and cash equivalents at the beginning of the cash flow + statement's period. + example: 4063.52 + operating_activities: + type: array + items: + $ref: '#/components/schemas/ReportItem' + readOnly: true + example: + - remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-09-18T00:00:00Z' + name: Operating Activities + value: 1000 + sub_items: + - remote_id: '23042938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-09-18T00:00:00Z' + name: Net Income + value: 1097.13 + sub_items: [] + company: + investing_activities: + type: array + items: + $ref: '#/components/schemas/ReportItem' + readOnly: true + example: + - remote_id: '192406939' + created_at: '2021-11-15T00:00:00Z' + modified_at: '2021-11-18T00:00:00Z' + name: Equipment + value: 1000 + sub_items: + - remote_id: + created_at: '2021-11-15T00:00:00Z' + modified_at: '2021-09-18T00:00:00Z' + name: Equipment + value: 1000 + sub_items: [] + company: + financing_activities: + type: array + items: + $ref: '#/components/schemas/ReportItem' + readOnly: true + example: + - remote_id: '192406939' + created_at: '2021-11-15T00:00:00Z' + modified_at: '2021-11-15T00:00:00Z' + sub_items: [] + remote_generated_at: + type: string + format: date-time + nullable: true + description: The time that cash flow statement was generated by the accounting + system. + example: '2020-04-01T00:00:00Z' + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /actions + data: + - Varies by platform + x-merge-expands: '{"company": "CompanyInfo"}' + x-merge-category: accounting + CategoriesEnum: + enum: + - hris + - ats + - accounting + - ticketing + - crm + - mktg + - filestorage + type: string + description: |- + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + x-merge-category: accounting + CategoryEnum: + enum: + - hris + - ats + - accounting + - ticketing + - crm + - mktg + - filestorage + type: string + description: |- + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + x-merge-category: accounting + CategoryTypeEnum: + enum: + - CLASS + - DEPARTMENT + type: string + description: |- + * `CLASS` - CLASS + * `DEPARTMENT` - DEPARTMENT + x-merge-category: accounting + ClassificationEnum: + enum: + - ASSET + - EQUITY + - EXPENSE + - LIABILITY + - REVENUE + type: string + description: |- + * `ASSET` - ASSET + * `EQUITY` - EQUITY + * `EXPENSE` - EXPENSE + * `LIABILITY` - LIABILITY + * `REVENUE` - REVENUE + x-merge-category: accounting + CommonModelScopeAPI: + type: object + properties: + common_models: + type: array + items: + $ref: '#/components/schemas/IndividualCommonModelScopeDeserializer' + description: The common models you want to update the scopes for + example: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - created_at + - custom_fields + - date_of_birth + - first_name + - gender + - remote_created_at + - remote_data + disabled_fields: + - company + - employments + - groups + - home_location + - manager + - work_location + required: + - common_models + x-merge-category: accounting + CommonModelScopesBodyRequest: + type: object + properties: + model_id: + type: string + minLength: 1 + example: hris.Employee + enabled_actions: + type: array + items: + $ref: '#/components/schemas/EnabledActionsEnum' + example: + - READ + - WRITE + disabled_fields: + type: array + items: + type: string + minLength: 1 + example: + - first_name + required: + - disabled_fields + - enabled_actions + - model_id + x-merge-category: accounting + CompanyInfo: + type: object + description: |- + # The CompanyInfo Object + ### Description + The `CompanyInfo` object contains information about the company of the linked account. If the company has multiple entities (also known as subsidiaries), each entity may show up as a single `CompanyInfo` record. + + ### Usage Example + Fetch from the `GET CompanyInfo` endpoint and view a company's information. + properties: + id: + type: string + format: uuid + readOnly: true + example: 65d8ffd0-211b-4ba4-b85a-fbe2ce220982 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '19202938' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + name: + type: string + nullable: true + description: The company's name. + example: Merge Pickleball Company + legal_name: + type: string + nullable: true + description: The company's legal name. + example: Merge Pickleball Company Inc. + tax_number: + type: string + nullable: true + description: The company's tax number. + example: 11-0011000 + fiscal_year_end_month: + type: integer + maximum: 12 + minimum: 1 + nullable: true + description: The company's fiscal year end month. + example: 12 + fiscal_year_end_day: + type: integer + maximum: 31 + minimum: 1 + nullable: true + description: The company's fiscal year end day. + example: 31 + currency: + nullable: true + description: |- + The currency set in the company's accounting platform. + + * `XUA` - ADB Unit of Account + * `AFN` - Afghan Afghani + * `AFA` - Afghan Afghani (1927–2002) + * `ALL` - Albanian Lek + * `ALK` - Albanian Lek (1946–1965) + * `DZD` - Algerian Dinar + * `ADP` - Andorran Peseta + * `AOA` - Angolan Kwanza + * `AOK` - Angolan Kwanza (1977–1991) + * `AON` - Angolan New Kwanza (1990–2000) + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + * `ARA` - Argentine Austral + * `ARS` - Argentine Peso + * `ARM` - Argentine Peso (1881–1970) + * `ARP` - Argentine Peso (1983–1985) + * `ARL` - Argentine Peso Ley (1970–1983) + * `AMD` - Armenian Dram + * `AWG` - Aruban Florin + * `AUD` - Australian Dollar + * `ATS` - Austrian Schilling + * `AZN` - Azerbaijani Manat + * `AZM` - Azerbaijani Manat (1993–2006) + * `BSD` - Bahamian Dollar + * `BHD` - Bahraini Dinar + * `BDT` - Bangladeshi Taka + * `BBD` - Barbadian Dollar + * `BYN` - Belarusian Ruble + * `BYB` - Belarusian Ruble (1994–1999) + * `BYR` - Belarusian Ruble (2000–2016) + * `BEF` - Belgian Franc + * `BEC` - Belgian Franc (convertible) + * `BEL` - Belgian Franc (financial) + * `BZD` - Belize Dollar + * `BMD` - Bermudan Dollar + * `BTN` - Bhutanese Ngultrum + * `BOB` - Bolivian Boliviano + * `BOL` - Bolivian Boliviano (1863–1963) + * `BOV` - Bolivian Mvdol + * `BOP` - Bolivian Peso + * `BAM` - Bosnia-Herzegovina Convertible Mark + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + * `BWP` - Botswanan Pula + * `BRC` - Brazilian Cruzado (1986–1989) + * `BRZ` - Brazilian Cruzeiro (1942–1967) + * `BRE` - Brazilian Cruzeiro (1990–1993) + * `BRR` - Brazilian Cruzeiro (1993–1994) + * `BRN` - Brazilian New Cruzado (1989–1990) + * `BRB` - Brazilian New Cruzeiro (1967–1986) + * `BRL` - Brazilian Real + * `GBP` - British Pound + * `BND` - Brunei Dollar + * `BGL` - Bulgarian Hard Lev + * `BGN` - Bulgarian Lev + * `BGO` - Bulgarian Lev (1879–1952) + * `BGM` - Bulgarian Socialist Lev + * `BUK` - Burmese Kyat + * `BIF` - Burundian Franc + * `XPF` - CFP Franc + * `KHR` - Cambodian Riel + * `CAD` - Canadian Dollar + * `CVE` - Cape Verdean Escudo + * `KYD` - Cayman Islands Dollar + * `XAF` - Central African CFA Franc + * `CLE` - Chilean Escudo + * `CLP` - Chilean Peso + * `CLF` - Chilean Unit of Account (UF) + * `CNX` - Chinese People’s Bank Dollar + * `CNY` - Chinese Yuan + * `CNH` - Chinese Yuan (offshore) + * `COP` - Colombian Peso + * `COU` - Colombian Real Value Unit + * `KMF` - Comorian Franc + * `CDF` - Congolese Franc + * `CRC` - Costa Rican Colón + * `HRD` - Croatian Dinar + * `HRK` - Croatian Kuna + * `CUC` - Cuban Convertible Peso + * `CUP` - Cuban Peso + * `CYP` - Cypriot Pound + * `CZK` - Czech Koruna + * `CSK` - Czechoslovak Hard Koruna + * `DKK` - Danish Krone + * `DJF` - Djiboutian Franc + * `DOP` - Dominican Peso + * `NLG` - Dutch Guilder + * `XCD` - East Caribbean Dollar + * `DDM` - East German Mark + * `ECS` - Ecuadorian Sucre + * `ECV` - Ecuadorian Unit of Constant Value + * `EGP` - Egyptian Pound + * `GQE` - Equatorial Guinean Ekwele + * `ERN` - Eritrean Nakfa + * `EEK` - Estonian Kroon + * `ETB` - Ethiopian Birr + * `EUR` - Euro + * `XBA` - European Composite Unit + * `XEU` - European Currency Unit + * `XBB` - European Monetary Unit + * `XBC` - European Unit of Account (XBC) + * `XBD` - European Unit of Account (XBD) + * `FKP` - Falkland Islands Pound + * `FJD` - Fijian Dollar + * `FIM` - Finnish Markka + * `FRF` - French Franc + * `XFO` - French Gold Franc + * `XFU` - French UIC-Franc + * `GMD` - Gambian Dalasi + * `GEK` - Georgian Kupon Larit + * `GEL` - Georgian Lari + * `DEM` - German Mark + * `GHS` - Ghanaian Cedi + * `GHC` - Ghanaian Cedi (1979–2007) + * `GIP` - Gibraltar Pound + * `XAU` - Gold + * `GRD` - Greek Drachma + * `GTQ` - Guatemalan Quetzal + * `GWP` - Guinea-Bissau Peso + * `GNF` - Guinean Franc + * `GNS` - Guinean Syli + * `GYD` - Guyanaese Dollar + * `HTG` - Haitian Gourde + * `HNL` - Honduran Lempira + * `HKD` - Hong Kong Dollar + * `HUF` - Hungarian Forint + * `IMP` - IMP + * `ISK` - Icelandic Króna + * `ISJ` - Icelandic Króna (1918–1981) + * `INR` - Indian Rupee + * `IDR` - Indonesian Rupiah + * `IRR` - Iranian Rial + * `IQD` - Iraqi Dinar + * `IEP` - Irish Pound + * `ILS` - Israeli New Shekel + * `ILP` - Israeli Pound + * `ILR` - Israeli Shekel (1980–1985) + * `ITL` - Italian Lira + * `JMD` - Jamaican Dollar + * `JPY` - Japanese Yen + * `JOD` - Jordanian Dinar + * `KZT` - Kazakhstani Tenge + * `KES` - Kenyan Shilling + * `KWD` - Kuwaiti Dinar + * `KGS` - Kyrgystani Som + * `LAK` - Laotian Kip + * `LVL` - Latvian Lats + * `LVR` - Latvian Ruble + * `LBP` - Lebanese Pound + * `LSL` - Lesotho Loti + * `LRD` - Liberian Dollar + * `LYD` - Libyan Dinar + * `LTL` - Lithuanian Litas + * `LTT` - Lithuanian Talonas + * `LUL` - Luxembourg Financial Franc + * `LUC` - Luxembourgian Convertible Franc + * `LUF` - Luxembourgian Franc + * `MOP` - Macanese Pataca + * `MKD` - Macedonian Denar + * `MKN` - Macedonian Denar (1992–1993) + * `MGA` - Malagasy Ariary + * `MGF` - Malagasy Franc + * `MWK` - Malawian Kwacha + * `MYR` - Malaysian Ringgit + * `MVR` - Maldivian Rufiyaa + * `MVP` - Maldivian Rupee (1947–1981) + * `MLF` - Malian Franc + * `MTL` - Maltese Lira + * `MTP` - Maltese Pound + * `MRU` - Mauritanian Ouguiya + * `MRO` - Mauritanian Ouguiya (1973–2017) + * `MUR` - Mauritian Rupee + * `MXV` - Mexican Investment Unit + * `MXN` - Mexican Peso + * `MXP` - Mexican Silver Peso (1861–1992) + * `MDC` - Moldovan Cupon + * `MDL` - Moldovan Leu + * `MCF` - Monegasque Franc + * `MNT` - Mongolian Tugrik + * `MAD` - Moroccan Dirham + * `MAF` - Moroccan Franc + * `MZE` - Mozambican Escudo + * `MZN` - Mozambican Metical + * `MZM` - Mozambican Metical (1980–2006) + * `MMK` - Myanmar Kyat + * `NAD` - Namibian Dollar + * `NPR` - Nepalese Rupee + * `ANG` - Netherlands Antillean Guilder + * `TWD` - New Taiwan Dollar + * `NZD` - New Zealand Dollar + * `NIO` - Nicaraguan Córdoba + * `NIC` - Nicaraguan Córdoba (1988–1991) + * `NGN` - Nigerian Naira + * `KPW` - North Korean Won + * `NOK` - Norwegian Krone + * `OMR` - Omani Rial + * `PKR` - Pakistani Rupee + * `XPD` - Palladium + * `PAB` - Panamanian Balboa + * `PGK` - Papua New Guinean Kina + * `PYG` - Paraguayan Guarani + * `PEI` - Peruvian Inti + * `PEN` - Peruvian Sol + * `PES` - Peruvian Sol (1863–1965) + * `PHP` - Philippine Peso + * `XPT` - Platinum + * `PLN` - Polish Zloty + * `PLZ` - Polish Zloty (1950–1995) + * `PTE` - Portuguese Escudo + * `GWE` - Portuguese Guinea Escudo + * `QAR` - Qatari Rial + * `XRE` - RINET Funds + * `RHD` - Rhodesian Dollar + * `RON` - Romanian Leu + * `ROL` - Romanian Leu (1952–2006) + * `RUB` - Russian Ruble + * `RUR` - Russian Ruble (1991–1998) + * `RWF` - Rwandan Franc + * `SVC` - Salvadoran Colón + * `WST` - Samoan Tala + * `SAR` - Saudi Riyal + * `RSD` - Serbian Dinar + * `CSD` - Serbian Dinar (2002–2006) + * `SCR` - Seychellois Rupee + * `SLL` - Sierra Leonean Leone + * `XAG` - Silver + * `SGD` - Singapore Dollar + * `SKK` - Slovak Koruna + * `SIT` - Slovenian Tolar + * `SBD` - Solomon Islands Dollar + * `SOS` - Somali Shilling + * `ZAR` - South African Rand + * `ZAL` - South African Rand (financial) + * `KRH` - South Korean Hwan (1953–1962) + * `KRW` - South Korean Won + * `KRO` - South Korean Won (1945–1953) + * `SSP` - South Sudanese Pound + * `SUR` - Soviet Rouble + * `ESP` - Spanish Peseta + * `ESA` - Spanish Peseta (A account) + * `ESB` - Spanish Peseta (convertible account) + * `XDR` - Special Drawing Rights + * `LKR` - Sri Lankan Rupee + * `SHP` - St. Helena Pound + * `XSU` - Sucre + * `SDD` - Sudanese Dinar (1992–2007) + * `SDG` - Sudanese Pound + * `SDP` - Sudanese Pound (1957–1998) + * `SRD` - Surinamese Dollar + * `SRG` - Surinamese Guilder + * `SZL` - Swazi Lilangeni + * `SEK` - Swedish Krona + * `CHF` - Swiss Franc + * `SYP` - Syrian Pound + * `STN` - São Tomé & Príncipe Dobra + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + * `TVD` - TVD + * `TJR` - Tajikistani Ruble + * `TJS` - Tajikistani Somoni + * `TZS` - Tanzanian Shilling + * `XTS` - Testing Currency Code + * `THB` - Thai Baht + * `XXX` - The codes assigned for transactions where no currency is involved + * `TPE` - Timorese Escudo + * `TOP` - Tongan Paʻanga + * `TTD` - Trinidad & Tobago Dollar + * `TND` - Tunisian Dinar + * `TRY` - Turkish Lira + * `TRL` - Turkish Lira (1922–2005) + * `TMT` - Turkmenistani Manat + * `TMM` - Turkmenistani Manat (1993–2009) + * `USD` - US Dollar + * `USN` - US Dollar (Next day) + * `USS` - US Dollar (Same day) + * `UGX` - Ugandan Shilling + * `UGS` - Ugandan Shilling (1966–1987) + * `UAH` - Ukrainian Hryvnia + * `UAK` - Ukrainian Karbovanets + * `AED` - United Arab Emirates Dirham + * `UYW` - Uruguayan Nominal Wage Index Unit + * `UYU` - Uruguayan Peso + * `UYP` - Uruguayan Peso (1975–1993) + * `UYI` - Uruguayan Peso (Indexed Units) + * `UZS` - Uzbekistani Som + * `VUV` - Vanuatu Vatu + * `VES` - Venezuelan Bolívar + * `VEB` - Venezuelan Bolívar (1871–2008) + * `VEF` - Venezuelan Bolívar (2008–2018) + * `VND` - Vietnamese Dong + * `VNN` - Vietnamese Dong (1978–1985) + * `CHE` - WIR Euro + * `CHW` - WIR Franc + * `XOF` - West African CFA Franc + * `YDD` - Yemeni Dinar + * `YER` - Yemeni Rial + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + * `YUM` - Yugoslavian New Dinar (1994–2002) + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + * `ZWN` - ZWN + * `ZRN` - Zairean New Zaire (1993–1998) + * `ZRZ` - Zairean Zaire (1971–1993) + * `ZMW` - Zambian Kwacha + * `ZMK` - Zambian Kwacha (1968–2012) + * `ZWD` - Zimbabwean Dollar (1980–2008) + * `ZWR` - Zimbabwean Dollar (2008) + * `ZWL` - Zimbabwean Dollar (2009) + example: USD + remote_created_at: + type: string + format: date-time + nullable: true + description: When the third party's company was created. + example: '2020-03-31T00:00:00Z' + urls: + type: array + items: + type: string + nullable: true + description: The url. + nullable: true + description: The company's urls. + example: https://www.merge.dev + addresses: + type: array + items: + $ref: '#/components/schemas/Address' + example: + - street_1: 2920 Broadway + street_2: 2nd Floor + city: New York + state: NY + country: US + zip_code: '10027' + x-merge-expands-to: Address + phone_numbers: + type: array + items: + $ref: '#/components/schemas/AccountingPhoneNumber' + x-merge-expands-to: AccountingPhoneNumber + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /actions + data: + - Varies by platform + x-merge-expands: '{"addresses": "Address", "phone_numbers": "AccountingPhoneNumber"}' + x-merge-category: accounting + ComponentTypeEnum: + enum: + - SALES + - PURCHASE + type: string + description: |- + * `SALES` - SALES + * `PURCHASE` - PURCHASE + x-merge-category: accounting + Contact: + type: object + description: |- + # The Contact Object + ### Description + A `Contact` is an individual or business entity to which products and services are sold to or purchased from. The `Contact` model contains both Customers, in which products and services are sold to, and Vendors (or Suppliers), in which products and services are purchased from. + * A `Contact` is a Vendor/Supplier if the `is_supplier` property is true. + * A `Contact` is a customer if the `is_customer` property is true. + + ### Usage Example + Fetch from the `LIST Contacts` endpoint and view a company's contacts. + properties: + id: + type: string + format: uuid + readOnly: true + example: c640b80b-fac9-409f-aa19-1f9221aec445 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '11167' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + name: + type: string + nullable: true + description: The contact's name. + example: Gil Feig's pickleball store + is_supplier: + type: boolean + nullable: true + description: Whether the contact is a supplier. + is_customer: + type: boolean + nullable: true + description: Whether the contact is a customer. + example: true + email_address: + type: string + nullable: true + description: The contact's email address. + example: pickleball@merge.dev + tax_number: + type: string + nullable: true + description: The contact's tax number. + example: 12-3456789 + status: + oneOf: + - $ref: '#/components/schemas/Status7d1Enum' + - type: string + nullable: true + description: |- + The contact's status + + * `ACTIVE` - ACTIVE + * `ARCHIVED` - ARCHIVED + example: ACTIVE + currency: + type: string + nullable: true + description: The currency the contact's transactions are in. + example: USD + remote_updated_at: + type: string + format: date-time + nullable: true + description: When the third party's contact was updated. + example: '2020-03-31T00:00:00Z' + company: + type: string + format: uuid + nullable: true + description: The company the contact belongs to. + example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + addresses: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Address' + nullable: true + example: + - 2f2702aa-8948-492b-a412-2acdf6d2c499 + - d98c7428-8dda-48a8-a1da-c570f65e2375 + description: '`Address` object IDs for the given `Contacts` object.' + phone_numbers: + type: array + items: + $ref: '#/components/schemas/AccountingPhoneNumber' + example: + - number: '+3198675309' + type: Mobile + description: '`AccountingPhoneNumber` object for the given `Contacts` object.' + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /actions + data: + - Varies by platform + remote_fields: + type: array + items: + $ref: '#/components/schemas/RemoteField' + readOnly: true + x-merge-expands: '{"account": "Account"}' + x-merge-category: accounting + ContactEndpointRequest: + type: object + properties: + model: + $ref: '#/components/schemas/ContactRequest' + required: + - model + x-merge-category: accounting + ContactRequest: + type: object + description: |- + # The Contact Object + ### Description + A `Contact` is an individual or business entity to which products and services are sold to or purchased from. The `Contact` model contains both Customers, in which products and services are sold to, and Vendors (or Suppliers), in which products and services are purchased from. + * A `Contact` is a Vendor/Supplier if the `is_supplier` property is true. + * A `Contact` is a customer if the `is_customer` property is true. + + ### Usage Example + Fetch from the `LIST Contacts` endpoint and view a company's contacts. + properties: + name: + type: string + nullable: true + description: The contact's name. + example: Gil Feig's pickleball store + is_supplier: + type: boolean + nullable: true + description: Whether the contact is a supplier. + is_customer: + type: boolean + nullable: true + description: Whether the contact is a customer. + example: true + email_address: + type: string + nullable: true + description: The contact's email address. + example: pickleball@merge.dev + tax_number: + type: string + nullable: true + description: The contact's tax number. + example: 12-3456789 + status: + oneOf: + - $ref: '#/components/schemas/Status7d1Enum' + - type: string + nullable: true + description: |- + The contact's status + + * `ACTIVE` - ACTIVE + * `ARCHIVED` - ARCHIVED + example: ACTIVE + currency: + type: string + nullable: true + description: The currency the contact's transactions are in. + example: USD + company: + type: string + format: uuid + nullable: true + description: The company the contact belongs to. + example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + addresses: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Address' + nullable: true + example: + - 2f2702aa-8948-492b-a412-2acdf6d2c499 + - d98c7428-8dda-48a8-a1da-c570f65e2375 + description: '`Address` object IDs for the given `Contacts` object.' + phone_numbers: + type: array + items: + $ref: '#/components/schemas/AccountingPhoneNumberRequest' + example: + - number: '+3198675309' + type: Mobile + description: '`AccountingPhoneNumber` object for the given `Contacts` object.' + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + remote_fields: + type: array + items: + $ref: '#/components/schemas/RemoteFieldRequest' + writeOnly: true + x-merge-expands: '{"account": "Account"}' + x-merge-category: accounting + ContactResponse: + type: object + properties: + model: + $ref: '#/components/schemas/Contact' + warnings: + type: array + items: + $ref: '#/components/schemas/WarningValidationProblem' + errors: + type: array + items: + $ref: '#/components/schemas/ErrorValidationProblem' + logs: + type: array + items: + $ref: '#/components/schemas/DebugModeLog' + required: + - errors + - model + - warnings + x-merge-category: accounting + CountryEnum: + enum: + - AF + - AX + - AL + - DZ + - AS + - AD + - AO + - AI + - AQ + - AG + - AR + - AM + - AW + - AU + - AT + - AZ + - BS + - BH + - BD + - BB + - BY + - BE + - BZ + - BJ + - BM + - BT + - BO + - BQ + - BA + - BW + - BV + - BR + - IO + - BN + - BG + - BF + - BI + - CV + - KH + - CM + - CA + - KY + - CF + - TD + - CL + - CN + - CX + - CC + - CO + - KM + - CG + - CD + - CK + - CR + - CI + - HR + - CU + - CW + - CY + - CZ + - DK + - DJ + - DM + - DO + - EC + - EG + - SV + - GQ + - ER + - EE + - SZ + - ET + - FK + - FO + - FJ + - FI + - FR + - GF + - PF + - TF + - GA + - GM + - GE + - DE + - GH + - GI + - GR + - GL + - GD + - GP + - GU + - GT + - GG + - GN + - GW + - GY + - HT + - HM + - VA + - HN + - HK + - HU + - IS + - IN + - ID + - IR + - IQ + - IE + - IM + - IL + - IT + - JM + - JP + - JE + - JO + - KZ + - KE + - KI + - KW + - KG + - LA + - LV + - LB + - LS + - LR + - LY + - LI + - LT + - LU + - MO + - MG + - MW + - MY + - MV + - ML + - MT + - MH + - MQ + - MR + - MU + - YT + - MX + - FM + - MD + - MC + - MN + - ME + - MS + - MA + - MZ + - MM + - NA + - NR + - NP + - NL + - NC + - NZ + - NI + - NE + - NG + - NU + - NF + - KP + - MK + - MP + - NO + - OM + - PK + - PW + - PS + - PA + - PG + - PY + - PE + - PH + - PN + - PL + - PT + - PR + - QA + - RE + - RO + - RU + - RW + - BL + - SH + - KN + - LC + - MF + - PM + - VC + - WS + - SM + - ST + - SA + - SN + - RS + - SC + - SL + - SG + - SX + - SK + - SI + - SB + - SO + - ZA + - GS + - KR + - SS + - ES + - LK + - SD + - SR + - SJ + - SE + - CH + - SY + - TW + - TJ + - TZ + - TH + - TL + - TG + - TK + - TO + - TT + - TN + - TR + - TM + - TC + - TV + - UG + - UA + - AE + - GB + - UM + - US + - UY + - UZ + - VU + - VE + - VN + - VG + - VI + - WF + - EH + - YE + - ZM + - ZW + type: string + description: |- + * `AF` - Afghanistan + * `AX` - Åland Islands + * `AL` - Albania + * `DZ` - Algeria + * `AS` - American Samoa + * `AD` - Andorra + * `AO` - Angola + * `AI` - Anguilla + * `AQ` - Antarctica + * `AG` - Antigua and Barbuda + * `AR` - Argentina + * `AM` - Armenia + * `AW` - Aruba + * `AU` - Australia + * `AT` - Austria + * `AZ` - Azerbaijan + * `BS` - Bahamas + * `BH` - Bahrain + * `BD` - Bangladesh + * `BB` - Barbados + * `BY` - Belarus + * `BE` - Belgium + * `BZ` - Belize + * `BJ` - Benin + * `BM` - Bermuda + * `BT` - Bhutan + * `BO` - Bolivia + * `BQ` - Bonaire, Sint Eustatius and Saba + * `BA` - Bosnia and Herzegovina + * `BW` - Botswana + * `BV` - Bouvet Island + * `BR` - Brazil + * `IO` - British Indian Ocean Territory + * `BN` - Brunei + * `BG` - Bulgaria + * `BF` - Burkina Faso + * `BI` - Burundi + * `CV` - Cabo Verde + * `KH` - Cambodia + * `CM` - Cameroon + * `CA` - Canada + * `KY` - Cayman Islands + * `CF` - Central African Republic + * `TD` - Chad + * `CL` - Chile + * `CN` - China + * `CX` - Christmas Island + * `CC` - Cocos (Keeling) Islands + * `CO` - Colombia + * `KM` - Comoros + * `CG` - Congo + * `CD` - Congo (the Democratic Republic of the) + * `CK` - Cook Islands + * `CR` - Costa Rica + * `CI` - Côte d'Ivoire + * `HR` - Croatia + * `CU` - Cuba + * `CW` - Curaçao + * `CY` - Cyprus + * `CZ` - Czechia + * `DK` - Denmark + * `DJ` - Djibouti + * `DM` - Dominica + * `DO` - Dominican Republic + * `EC` - Ecuador + * `EG` - Egypt + * `SV` - El Salvador + * `GQ` - Equatorial Guinea + * `ER` - Eritrea + * `EE` - Estonia + * `SZ` - Eswatini + * `ET` - Ethiopia + * `FK` - Falkland Islands (Malvinas) + * `FO` - Faroe Islands + * `FJ` - Fiji + * `FI` - Finland + * `FR` - France + * `GF` - French Guiana + * `PF` - French Polynesia + * `TF` - French Southern Territories + * `GA` - Gabon + * `GM` - Gambia + * `GE` - Georgia + * `DE` - Germany + * `GH` - Ghana + * `GI` - Gibraltar + * `GR` - Greece + * `GL` - Greenland + * `GD` - Grenada + * `GP` - Guadeloupe + * `GU` - Guam + * `GT` - Guatemala + * `GG` - Guernsey + * `GN` - Guinea + * `GW` - Guinea-Bissau + * `GY` - Guyana + * `HT` - Haiti + * `HM` - Heard Island and McDonald Islands + * `VA` - Holy See + * `HN` - Honduras + * `HK` - Hong Kong + * `HU` - Hungary + * `IS` - Iceland + * `IN` - India + * `ID` - Indonesia + * `IR` - Iran + * `IQ` - Iraq + * `IE` - Ireland + * `IM` - Isle of Man + * `IL` - Israel + * `IT` - Italy + * `JM` - Jamaica + * `JP` - Japan + * `JE` - Jersey + * `JO` - Jordan + * `KZ` - Kazakhstan + * `KE` - Kenya + * `KI` - Kiribati + * `KW` - Kuwait + * `KG` - Kyrgyzstan + * `LA` - Laos + * `LV` - Latvia + * `LB` - Lebanon + * `LS` - Lesotho + * `LR` - Liberia + * `LY` - Libya + * `LI` - Liechtenstein + * `LT` - Lithuania + * `LU` - Luxembourg + * `MO` - Macao + * `MG` - Madagascar + * `MW` - Malawi + * `MY` - Malaysia + * `MV` - Maldives + * `ML` - Mali + * `MT` - Malta + * `MH` - Marshall Islands + * `MQ` - Martinique + * `MR` - Mauritania + * `MU` - Mauritius + * `YT` - Mayotte + * `MX` - Mexico + * `FM` - Micronesia (Federated States of) + * `MD` - Moldova + * `MC` - Monaco + * `MN` - Mongolia + * `ME` - Montenegro + * `MS` - Montserrat + * `MA` - Morocco + * `MZ` - Mozambique + * `MM` - Myanmar + * `NA` - Namibia + * `NR` - Nauru + * `NP` - Nepal + * `NL` - Netherlands + * `NC` - New Caledonia + * `NZ` - New Zealand + * `NI` - Nicaragua + * `NE` - Niger + * `NG` - Nigeria + * `NU` - Niue + * `NF` - Norfolk Island + * `KP` - North Korea + * `MK` - North Macedonia + * `MP` - Northern Mariana Islands + * `NO` - Norway + * `OM` - Oman + * `PK` - Pakistan + * `PW` - Palau + * `PS` - Palestine, State of + * `PA` - Panama + * `PG` - Papua New Guinea + * `PY` - Paraguay + * `PE` - Peru + * `PH` - Philippines + * `PN` - Pitcairn + * `PL` - Poland + * `PT` - Portugal + * `PR` - Puerto Rico + * `QA` - Qatar + * `RE` - Réunion + * `RO` - Romania + * `RU` - Russia + * `RW` - Rwanda + * `BL` - Saint Barthélemy + * `SH` - Saint Helena, Ascension and Tristan da Cunha + * `KN` - Saint Kitts and Nevis + * `LC` - Saint Lucia + * `MF` - Saint Martin (French part) + * `PM` - Saint Pierre and Miquelon + * `VC` - Saint Vincent and the Grenadines + * `WS` - Samoa + * `SM` - San Marino + * `ST` - Sao Tome and Principe + * `SA` - Saudi Arabia + * `SN` - Senegal + * `RS` - Serbia + * `SC` - Seychelles + * `SL` - Sierra Leone + * `SG` - Singapore + * `SX` - Sint Maarten (Dutch part) + * `SK` - Slovakia + * `SI` - Slovenia + * `SB` - Solomon Islands + * `SO` - Somalia + * `ZA` - South Africa + * `GS` - South Georgia and the South Sandwich Islands + * `KR` - South Korea + * `SS` - South Sudan + * `ES` - Spain + * `LK` - Sri Lanka + * `SD` - Sudan + * `SR` - Suriname + * `SJ` - Svalbard and Jan Mayen + * `SE` - Sweden + * `CH` - Switzerland + * `SY` - Syria + * `TW` - Taiwan + * `TJ` - Tajikistan + * `TZ` - Tanzania + * `TH` - Thailand + * `TL` - Timor-Leste + * `TG` - Togo + * `TK` - Tokelau + * `TO` - Tonga + * `TT` - Trinidad and Tobago + * `TN` - Tunisia + * `TR` - Turkey + * `TM` - Turkmenistan + * `TC` - Turks and Caicos Islands + * `TV` - Tuvalu + * `UG` - Uganda + * `UA` - Ukraine + * `AE` - United Arab Emirates + * `GB` - United Kingdom + * `UM` - United States Minor Outlying Islands + * `US` - United States of America + * `UY` - Uruguay + * `UZ` - Uzbekistan + * `VU` - Vanuatu + * `VE` - Venezuela + * `VN` - Vietnam + * `VG` - Virgin Islands (British) + * `VI` - Virgin Islands (U.S.) + * `WF` - Wallis and Futuna + * `EH` - Western Sahara + * `YE` - Yemen + * `ZM` - Zambia + * `ZW` - Zimbabwe + x-merge-category: accounting + CreateFieldMappingRequest: + type: object + properties: + target_field_name: + type: string + minLength: 1 + description: The name of the target field you want this remote field to + map to. + example: example_target_field_name + target_field_description: + type: string + minLength: 1 + description: The description of the target field you want this remote field + to map to. + example: this is a example description of the target field + remote_field_traversal_path: + type: array + items: {} + description: The field traversal path of the remote field listed when you + hit the GET /remote-fields endpoint. + example: + - example_remote_field + remote_method: + type: string + minLength: 1 + description: The method of the remote endpoint where the remote field is + coming from. + example: GET + remote_url_path: + type: string + minLength: 1 + description: The path of the remote endpoint where the remote field is coming + from. + example: /example-url-path + common_model_name: + type: string + minLength: 1 + description: The name of the Common Model that the remote field corresponds + to in a given category. + example: ExampleCommonModel + required: + - common_model_name + - remote_field_traversal_path + - remote_method + - remote_url_path + - target_field_description + - target_field_name + x-merge-category: accounting + CreditNote: + type: object + description: |- + # The CreditNote Object + ### Description + A `CreditNote` is transaction issued to a customer, indicating a reduction or cancellation of the amount owed by the customer. It is most generally used as an adjustment note used to rectify errors, returns, or overpayments related to a sales transaction. A `CreditNote` can be applied to *Accounts Receivable* Invoices to decrease the overall amount of the Invoice. + + ### Usage Example + Fetch from the `LIST CreditNotes` endpoint and view a company's credit notes. + properties: + id: + type: string + format: uuid + readOnly: true + example: 8d9fd929-436c-4fd4-a48b-0c61f68d6178 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '123877' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + transaction_date: + type: string + format: date-time + nullable: true + description: The credit note's transaction date. + example: '2020-03-31T00:00:00Z' + status: + oneOf: + - $ref: '#/components/schemas/CreditNoteStatusEnum' + - type: string + nullable: true + description: |- + The credit note's status. + + * `SUBMITTED` - SUBMITTED + * `AUTHORIZED` - AUTHORIZED + * `PAID` - PAID + example: PAID + number: + type: string + nullable: true + description: The credit note's number. + example: CN-29 + contact: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Contact' + nullable: true + description: The credit note's contact. + example: c6c7b870-bb4d-489a-921e-2f0ee4192ff9 + x-merge-expands-to: Contact + company: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/CompanyInfo' + nullable: true + description: The company the credit note belongs to. + example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + x-merge-expands-to: CompanyInfo + exchange_rate: + type: string + format: decimal + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + nullable: true + description: The credit note's exchange rate. + example: '2.9' + total_amount: + type: number + format: double + nullable: true + description: The credit note's total amount. + example: 50 + remaining_credit: + type: number + format: double + nullable: true + description: The amount of value remaining in the credit note that the customer + can use. + example: 20 + inclusive_of_tax: + type: boolean + nullable: true + description: If the transaction is inclusive or exclusive of tax. `True` + if inclusive, `False` if exclusive. + line_items: + type: array + items: + $ref: '#/components/schemas/CreditNoteLineItem' + readOnly: true + example: + - item: 0e3fd929-436c-4fd4-a48b-0c61f68d6178 + name: Basic Monthly + description: prorated amount for items + quantity: 1 + memo: privNote + unit_price: '5.0' + tax_rate: 8d9fd929-436c-4fd4-a48b-0c61f68d6178 + total_line_amount: '5.0' + tracking_categories: + - 8d9fd929-436c-4fd4-a48b-0c61f68d6178 + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + project: 22e65a5d-2df5-4e6e-884a-e538d0339000 + contact: 908934-49j9-093f-0989-908923908 + account: 8d9fd929-436c-4fd4-a48b-0c61f68d6178 + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_id: '121222' + remote_was_deleted: true + x-merge-expands-to: CreditNoteLineItem + tracking_categories: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/TrackingCategory' + nullable: true + example: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + x-merge-expands-to: TrackingCategory + currency: + oneOf: + - $ref: '#/components/schemas/TransactionCurrencyEnum' + - type: string + nullable: true + description: |- + The credit note's currency. + + * `XUA` - ADB Unit of Account + * `AFN` - Afghan Afghani + * `AFA` - Afghan Afghani (1927–2002) + * `ALL` - Albanian Lek + * `ALK` - Albanian Lek (1946–1965) + * `DZD` - Algerian Dinar + * `ADP` - Andorran Peseta + * `AOA` - Angolan Kwanza + * `AOK` - Angolan Kwanza (1977–1991) + * `AON` - Angolan New Kwanza (1990–2000) + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + * `ARA` - Argentine Austral + * `ARS` - Argentine Peso + * `ARM` - Argentine Peso (1881–1970) + * `ARP` - Argentine Peso (1983–1985) + * `ARL` - Argentine Peso Ley (1970–1983) + * `AMD` - Armenian Dram + * `AWG` - Aruban Florin + * `AUD` - Australian Dollar + * `ATS` - Austrian Schilling + * `AZN` - Azerbaijani Manat + * `AZM` - Azerbaijani Manat (1993–2006) + * `BSD` - Bahamian Dollar + * `BHD` - Bahraini Dinar + * `BDT` - Bangladeshi Taka + * `BBD` - Barbadian Dollar + * `BYN` - Belarusian Ruble + * `BYB` - Belarusian Ruble (1994–1999) + * `BYR` - Belarusian Ruble (2000–2016) + * `BEF` - Belgian Franc + * `BEC` - Belgian Franc (convertible) + * `BEL` - Belgian Franc (financial) + * `BZD` - Belize Dollar + * `BMD` - Bermudan Dollar + * `BTN` - Bhutanese Ngultrum + * `BOB` - Bolivian Boliviano + * `BOL` - Bolivian Boliviano (1863–1963) + * `BOV` - Bolivian Mvdol + * `BOP` - Bolivian Peso + * `BAM` - Bosnia-Herzegovina Convertible Mark + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + * `BWP` - Botswanan Pula + * `BRC` - Brazilian Cruzado (1986–1989) + * `BRZ` - Brazilian Cruzeiro (1942–1967) + * `BRE` - Brazilian Cruzeiro (1990–1993) + * `BRR` - Brazilian Cruzeiro (1993–1994) + * `BRN` - Brazilian New Cruzado (1989–1990) + * `BRB` - Brazilian New Cruzeiro (1967–1986) + * `BRL` - Brazilian Real + * `GBP` - British Pound + * `BND` - Brunei Dollar + * `BGL` - Bulgarian Hard Lev + * `BGN` - Bulgarian Lev + * `BGO` - Bulgarian Lev (1879–1952) + * `BGM` - Bulgarian Socialist Lev + * `BUK` - Burmese Kyat + * `BIF` - Burundian Franc + * `XPF` - CFP Franc + * `KHR` - Cambodian Riel + * `CAD` - Canadian Dollar + * `CVE` - Cape Verdean Escudo + * `KYD` - Cayman Islands Dollar + * `XAF` - Central African CFA Franc + * `CLE` - Chilean Escudo + * `CLP` - Chilean Peso + * `CLF` - Chilean Unit of Account (UF) + * `CNX` - Chinese People’s Bank Dollar + * `CNY` - Chinese Yuan + * `CNH` - Chinese Yuan (offshore) + * `COP` - Colombian Peso + * `COU` - Colombian Real Value Unit + * `KMF` - Comorian Franc + * `CDF` - Congolese Franc + * `CRC` - Costa Rican Colón + * `HRD` - Croatian Dinar + * `HRK` - Croatian Kuna + * `CUC` - Cuban Convertible Peso + * `CUP` - Cuban Peso + * `CYP` - Cypriot Pound + * `CZK` - Czech Koruna + * `CSK` - Czechoslovak Hard Koruna + * `DKK` - Danish Krone + * `DJF` - Djiboutian Franc + * `DOP` - Dominican Peso + * `NLG` - Dutch Guilder + * `XCD` - East Caribbean Dollar + * `DDM` - East German Mark + * `ECS` - Ecuadorian Sucre + * `ECV` - Ecuadorian Unit of Constant Value + * `EGP` - Egyptian Pound + * `GQE` - Equatorial Guinean Ekwele + * `ERN` - Eritrean Nakfa + * `EEK` - Estonian Kroon + * `ETB` - Ethiopian Birr + * `EUR` - Euro + * `XBA` - European Composite Unit + * `XEU` - European Currency Unit + * `XBB` - European Monetary Unit + * `XBC` - European Unit of Account (XBC) + * `XBD` - European Unit of Account (XBD) + * `FKP` - Falkland Islands Pound + * `FJD` - Fijian Dollar + * `FIM` - Finnish Markka + * `FRF` - French Franc + * `XFO` - French Gold Franc + * `XFU` - French UIC-Franc + * `GMD` - Gambian Dalasi + * `GEK` - Georgian Kupon Larit + * `GEL` - Georgian Lari + * `DEM` - German Mark + * `GHS` - Ghanaian Cedi + * `GHC` - Ghanaian Cedi (1979–2007) + * `GIP` - Gibraltar Pound + * `XAU` - Gold + * `GRD` - Greek Drachma + * `GTQ` - Guatemalan Quetzal + * `GWP` - Guinea-Bissau Peso + * `GNF` - Guinean Franc + * `GNS` - Guinean Syli + * `GYD` - Guyanaese Dollar + * `HTG` - Haitian Gourde + * `HNL` - Honduran Lempira + * `HKD` - Hong Kong Dollar + * `HUF` - Hungarian Forint + * `IMP` - IMP + * `ISK` - Icelandic Króna + * `ISJ` - Icelandic Króna (1918–1981) + * `INR` - Indian Rupee + * `IDR` - Indonesian Rupiah + * `IRR` - Iranian Rial + * `IQD` - Iraqi Dinar + * `IEP` - Irish Pound + * `ILS` - Israeli New Shekel + * `ILP` - Israeli Pound + * `ILR` - Israeli Shekel (1980–1985) + * `ITL` - Italian Lira + * `JMD` - Jamaican Dollar + * `JPY` - Japanese Yen + * `JOD` - Jordanian Dinar + * `KZT` - Kazakhstani Tenge + * `KES` - Kenyan Shilling + * `KWD` - Kuwaiti Dinar + * `KGS` - Kyrgystani Som + * `LAK` - Laotian Kip + * `LVL` - Latvian Lats + * `LVR` - Latvian Ruble + * `LBP` - Lebanese Pound + * `LSL` - Lesotho Loti + * `LRD` - Liberian Dollar + * `LYD` - Libyan Dinar + * `LTL` - Lithuanian Litas + * `LTT` - Lithuanian Talonas + * `LUL` - Luxembourg Financial Franc + * `LUC` - Luxembourgian Convertible Franc + * `LUF` - Luxembourgian Franc + * `MOP` - Macanese Pataca + * `MKD` - Macedonian Denar + * `MKN` - Macedonian Denar (1992–1993) + * `MGA` - Malagasy Ariary + * `MGF` - Malagasy Franc + * `MWK` - Malawian Kwacha + * `MYR` - Malaysian Ringgit + * `MVR` - Maldivian Rufiyaa + * `MVP` - Maldivian Rupee (1947–1981) + * `MLF` - Malian Franc + * `MTL` - Maltese Lira + * `MTP` - Maltese Pound + * `MRU` - Mauritanian Ouguiya + * `MRO` - Mauritanian Ouguiya (1973–2017) + * `MUR` - Mauritian Rupee + * `MXV` - Mexican Investment Unit + * `MXN` - Mexican Peso + * `MXP` - Mexican Silver Peso (1861–1992) + * `MDC` - Moldovan Cupon + * `MDL` - Moldovan Leu + * `MCF` - Monegasque Franc + * `MNT` - Mongolian Tugrik + * `MAD` - Moroccan Dirham + * `MAF` - Moroccan Franc + * `MZE` - Mozambican Escudo + * `MZN` - Mozambican Metical + * `MZM` - Mozambican Metical (1980–2006) + * `MMK` - Myanmar Kyat + * `NAD` - Namibian Dollar + * `NPR` - Nepalese Rupee + * `ANG` - Netherlands Antillean Guilder + * `TWD` - New Taiwan Dollar + * `NZD` - New Zealand Dollar + * `NIO` - Nicaraguan Córdoba + * `NIC` - Nicaraguan Córdoba (1988–1991) + * `NGN` - Nigerian Naira + * `KPW` - North Korean Won + * `NOK` - Norwegian Krone + * `OMR` - Omani Rial + * `PKR` - Pakistani Rupee + * `XPD` - Palladium + * `PAB` - Panamanian Balboa + * `PGK` - Papua New Guinean Kina + * `PYG` - Paraguayan Guarani + * `PEI` - Peruvian Inti + * `PEN` - Peruvian Sol + * `PES` - Peruvian Sol (1863–1965) + * `PHP` - Philippine Peso + * `XPT` - Platinum + * `PLN` - Polish Zloty + * `PLZ` - Polish Zloty (1950–1995) + * `PTE` - Portuguese Escudo + * `GWE` - Portuguese Guinea Escudo + * `QAR` - Qatari Rial + * `XRE` - RINET Funds + * `RHD` - Rhodesian Dollar + * `RON` - Romanian Leu + * `ROL` - Romanian Leu (1952–2006) + * `RUB` - Russian Ruble + * `RUR` - Russian Ruble (1991–1998) + * `RWF` - Rwandan Franc + * `SVC` - Salvadoran Colón + * `WST` - Samoan Tala + * `SAR` - Saudi Riyal + * `RSD` - Serbian Dinar + * `CSD` - Serbian Dinar (2002–2006) + * `SCR` - Seychellois Rupee + * `SLL` - Sierra Leonean Leone + * `XAG` - Silver + * `SGD` - Singapore Dollar + * `SKK` - Slovak Koruna + * `SIT` - Slovenian Tolar + * `SBD` - Solomon Islands Dollar + * `SOS` - Somali Shilling + * `ZAR` - South African Rand + * `ZAL` - South African Rand (financial) + * `KRH` - South Korean Hwan (1953–1962) + * `KRW` - South Korean Won + * `KRO` - South Korean Won (1945–1953) + * `SSP` - South Sudanese Pound + * `SUR` - Soviet Rouble + * `ESP` - Spanish Peseta + * `ESA` - Spanish Peseta (A account) + * `ESB` - Spanish Peseta (convertible account) + * `XDR` - Special Drawing Rights + * `LKR` - Sri Lankan Rupee + * `SHP` - St. Helena Pound + * `XSU` - Sucre + * `SDD` - Sudanese Dinar (1992–2007) + * `SDG` - Sudanese Pound + * `SDP` - Sudanese Pound (1957–1998) + * `SRD` - Surinamese Dollar + * `SRG` - Surinamese Guilder + * `SZL` - Swazi Lilangeni + * `SEK` - Swedish Krona + * `CHF` - Swiss Franc + * `SYP` - Syrian Pound + * `STN` - São Tomé & Príncipe Dobra + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + * `TVD` - TVD + * `TJR` - Tajikistani Ruble + * `TJS` - Tajikistani Somoni + * `TZS` - Tanzanian Shilling + * `XTS` - Testing Currency Code + * `THB` - Thai Baht + * `XXX` - The codes assigned for transactions where no currency is involved + * `TPE` - Timorese Escudo + * `TOP` - Tongan Paʻanga + * `TTD` - Trinidad & Tobago Dollar + * `TND` - Tunisian Dinar + * `TRY` - Turkish Lira + * `TRL` - Turkish Lira (1922–2005) + * `TMT` - Turkmenistani Manat + * `TMM` - Turkmenistani Manat (1993–2009) + * `USD` - US Dollar + * `USN` - US Dollar (Next day) + * `USS` - US Dollar (Same day) + * `UGX` - Ugandan Shilling + * `UGS` - Ugandan Shilling (1966–1987) + * `UAH` - Ukrainian Hryvnia + * `UAK` - Ukrainian Karbovanets + * `AED` - United Arab Emirates Dirham + * `UYW` - Uruguayan Nominal Wage Index Unit + * `UYU` - Uruguayan Peso + * `UYP` - Uruguayan Peso (1975–1993) + * `UYI` - Uruguayan Peso (Indexed Units) + * `UZS` - Uzbekistani Som + * `VUV` - Vanuatu Vatu + * `VES` - Venezuelan Bolívar + * `VEB` - Venezuelan Bolívar (1871–2008) + * `VEF` - Venezuelan Bolívar (2008–2018) + * `VND` - Vietnamese Dong + * `VNN` - Vietnamese Dong (1978–1985) + * `CHE` - WIR Euro + * `CHW` - WIR Franc + * `XOF` - West African CFA Franc + * `YDD` - Yemeni Dinar + * `YER` - Yemeni Rial + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + * `YUM` - Yugoslavian New Dinar (1994–2002) + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + * `ZWN` - ZWN + * `ZRN` - Zairean New Zaire (1993–1998) + * `ZRZ` - Zairean Zaire (1971–1993) + * `ZMW` - Zambian Kwacha + * `ZMK` - Zambian Kwacha (1968–2012) + * `ZWD` - Zimbabwean Dollar (1980–2008) + * `ZWR` - Zimbabwean Dollar (2008) + * `ZWL` - Zimbabwean Dollar (2009) + example: USD + remote_created_at: + type: string + format: date-time + nullable: true + description: When the third party's credit note was created. + example: '2020-03-31T00:00:00Z' + remote_updated_at: + type: string + format: date-time + nullable: true + description: When the third party's credit note was updated. + example: '2020-03-31T00:00:00Z' + payments: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Payment' + nullable: true + example: + - b26fd49a-cbae-470a-a8f8-bcbc119e0390 + description: Array of `Payment` object IDs + x-merge-expands-to: Payment + applied_payments: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/PaymentLineItem' + nullable: true + example: + - a9a94a75-19c1-41fe-90d8-d9ba959c38e5 + description: A list of the Payment Applied to Lines common models related + to a given Invoice, Credit Note, or Journal Entry. + x-merge-expands-to: PaymentLineItemWithPayment + accounting_period: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/AccountingPeriod' + nullable: true + description: The accounting period that the CreditNote was generated in. + example: b38c59b0-a9d7-4740-b1ee-5436c6751e3d + x-merge-expands-to: AccountingPeriod + applied_to_lines: + type: array + items: + $ref: '#/components/schemas/CreditNoteApplyLineForCreditNote' + description: A list of the CreditNote Applied to Lines common models related + to a given Credit Note + example: + - invoice: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + applied_date: '2020-03-31T00:00:00Z' + applied_amount: '2.9' + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /actions + data: + - Varies by platform + x-merge-expands: '{"accounting_period": "AccountingPeriod", "applied_payments": + "PaymentLineItemWithPayment", "company": "CompanyInfo", "contact": "Contact", + "line_items": "CreditNoteLineItem", "payments": "Payment", "tracking_categories": + "TrackingCategory"}' + x-merge-category: accounting + CreditNoteApplyLineForCreditNote: + type: object + description: |- + # The CreditNoteApplyLine Object + ### Description + The `CreditNoteApplyLine` is attached to the CreditNote model. + + ### Usage Example + Fetch from the `GET CreditNote` endpoint and view the invoice's applied to lines. + properties: + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '088899' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + invoice: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Invoice' + nullable: true + example: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + x-merge-expands-to: Invoice + applied_date: + type: string + format: date-time + nullable: true + description: Date that the credit note is applied to the invoice. + example: '2020-03-31T00:00:00Z' + applied_amount: + type: string + format: decimal + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + nullable: true + description: The amount of the Credit Note applied to the invoice. + example: '2.9' + remote_was_deleted: + type: boolean + readOnly: true + description: 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/). + x-merge-nested-write-allowed: true + x-merge-expands: '{"invoice": "Invoice"}' + x-merge-category: accounting + CreditNoteApplyLineForCreditNoteRequest: + type: object + description: |- + # The CreditNoteApplyLine Object + ### Description + The `CreditNoteApplyLine` is attached to the CreditNote model. + + ### Usage Example + Fetch from the `GET CreditNote` endpoint and view the invoice's applied to lines. + properties: + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '088899' + invoice: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Invoice' + nullable: true + example: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + x-merge-expands-to: Invoice + applied_date: + type: string + format: date-time + nullable: true + description: Date that the credit note is applied to the invoice. + example: '2020-03-31T00:00:00Z' + applied_amount: + type: string + format: decimal + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + nullable: true + description: The amount of the Credit Note applied to the invoice. + example: '2.9' + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + x-merge-expands: '{"invoice": "Invoice"}' + x-merge-category: accounting + CreditNoteApplyLineForInvoice: + type: object + description: |- + # The CreditNoteApplyLine Object + ### Description + The `CreditNoteApplyLine` is attached to the CreditNote model. + + ### Usage Example + Fetch from the `GET CreditNote` endpoint and view the invoice's applied to lines. + properties: + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '088899' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + credit_note: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/CreditNote' + nullable: true + example: dd7ae92086acb2fc9c2739de564ef8e9571f7263 + x-merge-expands-to: CreditNote + applied_date: + type: string + format: date-time + nullable: true + description: Date that the credit note is applied to the invoice. + example: '2020-03-31T00:00:00Z' + applied_amount: + type: string + format: decimal + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + nullable: true + description: The amount of the Credit Note applied to the invoice. + example: '2.9' + remote_was_deleted: + type: boolean + readOnly: true + description: 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/). + x-merge-nested-write-allowed: true + x-merge-expands: '{"credit_note": "CreditNote"}' + x-merge-category: accounting + CreditNoteEndpointRequest: + type: object + properties: + model: + $ref: '#/components/schemas/CreditNoteRequest' + required: + - model + x-merge-category: accounting + CreditNoteLineItem: + type: object + description: |- + # The CreditNoteLineItem Object + ### Description + The `CreditNoteLineItem` object is used to represent a credit note's line items. + + ### Usage Example + Fetch from the `GET CreditNote` endpoint and view the credit note's line items. + properties: + id: + type: string + format: uuid + readOnly: true + example: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '121222' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + item: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Item' + nullable: true + example: 0e3fd929-436c-4fd4-a48b-0c61f68d6178 + x-merge-expands-to: Item + name: + type: string + nullable: true + description: The credit note line item's name. + example: Basic Monthly + description: + type: string + nullable: true + description: The description of the item that is owed. + example: prorated amount for items + quantity: + type: string + format: decimal + pattern: ^-?\d{0,24}(?:\.\d{0,8})?$ + nullable: true + description: The credit note line item's quantity. + example: 1 + memo: + type: string + nullable: true + description: The credit note line item's memo. + example: privNote + unit_price: + type: string + format: decimal + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + nullable: true + description: The credit note line item's unit price. + example: '5.0' + tax_rate: + type: string + format: uuid + nullable: true + example: 8d9fd929-436c-4fd4-a48b-0c61f68d6178 + description: The tax rate that applies to this line item. + total_line_amount: + type: string + format: decimal + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + nullable: true + description: The credit note line item's total. + example: '5.0' + tracking_category: + type: string + format: uuid + nullable: true + description: The credit note line item's associated tracking category. + deprecated: true + tracking_categories: + type: array + items: + type: string + format: uuid + nullable: true + example: + - 8d9fd929-436c-4fd4-a48b-0c61f68d6178 + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + description: The credit note line item's associated tracking categories. + account: + type: string + format: uuid + nullable: true + description: The credit note line item's account. + example: 8d9fd929-436c-4fd4-a48b-0c61f68d6178 + company: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/CompanyInfo' + nullable: true + description: The company the credit note belongs to. + example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + x-merge-expands-to: CompanyInfo + contact: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Contact' + nullable: true + description: The credit note's contact. + example: 908934-49j9-093f-0989-908923908 + x-merge-expands-to: Contact + project: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Project' + nullable: true + example: 22e65a5d-2df5-4e6e-884a-e538d0339000 + x-merge-expands-to: Project + remote_was_deleted: + type: boolean + readOnly: true + description: 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/). + example: true + x-merge-nested-write-allowed: true + x-merge-expands: '{"company": "CompanyInfo", "contact": "Contact", "item": "Item", + "project": "Project"}' + x-merge-category: accounting + CreditNoteLineItemRequest: + type: object + description: |- + # The CreditNoteLineItem Object + ### Description + The `CreditNoteLineItem` object is used to represent a credit note's line items. + + ### Usage Example + Fetch from the `GET CreditNote` endpoint and view the credit note's line items. + properties: + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '121222' + item: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Item' + nullable: true + example: 0e3fd929-436c-4fd4-a48b-0c61f68d6178 + x-merge-expands-to: Item + name: + type: string + nullable: true + description: The credit note line item's name. + example: Basic Monthly + description: + type: string + nullable: true + description: The description of the item that is owed. + example: prorated amount for items + quantity: + type: string + format: decimal + pattern: ^-?\d{0,24}(?:\.\d{0,8})?$ + nullable: true + description: The credit note line item's quantity. + example: 1 + memo: + type: string + nullable: true + description: The credit note line item's memo. + example: privNote + unit_price: + type: string + format: decimal + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + nullable: true + description: The credit note line item's unit price. + example: '5.0' + tax_rate: + type: string + format: uuid + nullable: true + example: 8d9fd929-436c-4fd4-a48b-0c61f68d6178 + description: The tax rate that applies to this line item. + total_line_amount: + type: string + format: decimal + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + nullable: true + description: The credit note line item's total. + example: '5.0' + tracking_category: + type: string + format: uuid + nullable: true + description: The credit note line item's associated tracking category. + deprecated: true + tracking_categories: + type: array + items: + type: string + format: uuid + nullable: true + example: + - 8d9fd929-436c-4fd4-a48b-0c61f68d6178 + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + description: The credit note line item's associated tracking categories. + account: + type: string + format: uuid + nullable: true + description: The credit note line item's account. + example: 8d9fd929-436c-4fd4-a48b-0c61f68d6178 + company: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/CompanyInfo' + nullable: true + description: The company the credit note belongs to. + example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + x-merge-expands-to: CompanyInfo + contact: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Contact' + nullable: true + description: The credit note's contact. + example: 908934-49j9-093f-0989-908923908 + x-merge-expands-to: Contact + project: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Project' + nullable: true + example: 22e65a5d-2df5-4e6e-884a-e538d0339000 + x-merge-expands-to: Project + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + x-merge-expands: '{"company": "CompanyInfo", "contact": "Contact", "item": "Item", + "project": "Project"}' + x-merge-category: accounting + CreditNoteRequest: + type: object + description: |- + # The CreditNote Object + ### Description + A `CreditNote` is transaction issued to a customer, indicating a reduction or cancellation of the amount owed by the customer. It is most generally used as an adjustment note used to rectify errors, returns, or overpayments related to a sales transaction. A `CreditNote` can be applied to *Accounts Receivable* Invoices to decrease the overall amount of the Invoice. + + ### Usage Example + Fetch from the `LIST CreditNotes` endpoint and view a company's credit notes. + properties: + transaction_date: + type: string + format: date-time + nullable: true + description: The credit note's transaction date. + example: '2020-03-31T00:00:00Z' + status: + oneOf: + - $ref: '#/components/schemas/CreditNoteStatusEnum' + - type: string + nullable: true + description: |- + The credit note's status. + + * `SUBMITTED` - SUBMITTED + * `AUTHORIZED` - AUTHORIZED + * `PAID` - PAID + example: PAID + number: + type: string + nullable: true + description: The credit note's number. + example: CN-29 + contact: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Contact' + nullable: true + description: The credit note's contact. + example: c6c7b870-bb4d-489a-921e-2f0ee4192ff9 + x-merge-expands-to: Contact + company: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/CompanyInfo' + nullable: true + description: The company the credit note belongs to. + example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + x-merge-expands-to: CompanyInfo + exchange_rate: + type: string + format: decimal + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + nullable: true + description: The credit note's exchange rate. + example: '2.9' + total_amount: + type: number + format: double + nullable: true + description: The credit note's total amount. + example: 50 + remaining_credit: + type: number + format: double + nullable: true + description: The amount of value remaining in the credit note that the customer + can use. + example: 20 + inclusive_of_tax: + type: boolean + nullable: true + description: If the transaction is inclusive or exclusive of tax. `True` + if inclusive, `False` if exclusive. + line_items: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/CreditNoteLineItemRequest' + example: + - item: 0e3fd929-436c-4fd4-a48b-0c61f68d6178 + name: Basic Monthly + description: prorated amount for items + quantity: 1 + memo: privNote + unit_price: '5.0' + tax_rate: 8d9fd929-436c-4fd4-a48b-0c61f68d6178 + total_line_amount: '5.0' + tracking_categories: + - 8d9fd929-436c-4fd4-a48b-0c61f68d6178 + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + project: 22e65a5d-2df5-4e6e-884a-e538d0339000 + contact: 908934-49j9-093f-0989-908923908 + account: 8d9fd929-436c-4fd4-a48b-0c61f68d6178 + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_id: '121222' + remote_was_deleted: true + x-merge-expands-to: CreditNoteLineItem + tracking_categories: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/TrackingCategory' + nullable: true + example: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + x-merge-expands-to: TrackingCategory + currency: + oneOf: + - $ref: '#/components/schemas/TransactionCurrencyEnum' + - type: string + nullable: true + description: |- + The credit note's currency. + + * `XUA` - ADB Unit of Account + * `AFN` - Afghan Afghani + * `AFA` - Afghan Afghani (1927–2002) + * `ALL` - Albanian Lek + * `ALK` - Albanian Lek (1946–1965) + * `DZD` - Algerian Dinar + * `ADP` - Andorran Peseta + * `AOA` - Angolan Kwanza + * `AOK` - Angolan Kwanza (1977–1991) + * `AON` - Angolan New Kwanza (1990–2000) + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + * `ARA` - Argentine Austral + * `ARS` - Argentine Peso + * `ARM` - Argentine Peso (1881–1970) + * `ARP` - Argentine Peso (1983–1985) + * `ARL` - Argentine Peso Ley (1970–1983) + * `AMD` - Armenian Dram + * `AWG` - Aruban Florin + * `AUD` - Australian Dollar + * `ATS` - Austrian Schilling + * `AZN` - Azerbaijani Manat + * `AZM` - Azerbaijani Manat (1993–2006) + * `BSD` - Bahamian Dollar + * `BHD` - Bahraini Dinar + * `BDT` - Bangladeshi Taka + * `BBD` - Barbadian Dollar + * `BYN` - Belarusian Ruble + * `BYB` - Belarusian Ruble (1994–1999) + * `BYR` - Belarusian Ruble (2000–2016) + * `BEF` - Belgian Franc + * `BEC` - Belgian Franc (convertible) + * `BEL` - Belgian Franc (financial) + * `BZD` - Belize Dollar + * `BMD` - Bermudan Dollar + * `BTN` - Bhutanese Ngultrum + * `BOB` - Bolivian Boliviano + * `BOL` - Bolivian Boliviano (1863–1963) + * `BOV` - Bolivian Mvdol + * `BOP` - Bolivian Peso + * `BAM` - Bosnia-Herzegovina Convertible Mark + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + * `BWP` - Botswanan Pula + * `BRC` - Brazilian Cruzado (1986–1989) + * `BRZ` - Brazilian Cruzeiro (1942–1967) + * `BRE` - Brazilian Cruzeiro (1990–1993) + * `BRR` - Brazilian Cruzeiro (1993–1994) + * `BRN` - Brazilian New Cruzado (1989–1990) + * `BRB` - Brazilian New Cruzeiro (1967–1986) + * `BRL` - Brazilian Real + * `GBP` - British Pound + * `BND` - Brunei Dollar + * `BGL` - Bulgarian Hard Lev + * `BGN` - Bulgarian Lev + * `BGO` - Bulgarian Lev (1879–1952) + * `BGM` - Bulgarian Socialist Lev + * `BUK` - Burmese Kyat + * `BIF` - Burundian Franc + * `XPF` - CFP Franc + * `KHR` - Cambodian Riel + * `CAD` - Canadian Dollar + * `CVE` - Cape Verdean Escudo + * `KYD` - Cayman Islands Dollar + * `XAF` - Central African CFA Franc + * `CLE` - Chilean Escudo + * `CLP` - Chilean Peso + * `CLF` - Chilean Unit of Account (UF) + * `CNX` - Chinese People’s Bank Dollar + * `CNY` - Chinese Yuan + * `CNH` - Chinese Yuan (offshore) + * `COP` - Colombian Peso + * `COU` - Colombian Real Value Unit + * `KMF` - Comorian Franc + * `CDF` - Congolese Franc + * `CRC` - Costa Rican Colón + * `HRD` - Croatian Dinar + * `HRK` - Croatian Kuna + * `CUC` - Cuban Convertible Peso + * `CUP` - Cuban Peso + * `CYP` - Cypriot Pound + * `CZK` - Czech Koruna + * `CSK` - Czechoslovak Hard Koruna + * `DKK` - Danish Krone + * `DJF` - Djiboutian Franc + * `DOP` - Dominican Peso + * `NLG` - Dutch Guilder + * `XCD` - East Caribbean Dollar + * `DDM` - East German Mark + * `ECS` - Ecuadorian Sucre + * `ECV` - Ecuadorian Unit of Constant Value + * `EGP` - Egyptian Pound + * `GQE` - Equatorial Guinean Ekwele + * `ERN` - Eritrean Nakfa + * `EEK` - Estonian Kroon + * `ETB` - Ethiopian Birr + * `EUR` - Euro + * `XBA` - European Composite Unit + * `XEU` - European Currency Unit + * `XBB` - European Monetary Unit + * `XBC` - European Unit of Account (XBC) + * `XBD` - European Unit of Account (XBD) + * `FKP` - Falkland Islands Pound + * `FJD` - Fijian Dollar + * `FIM` - Finnish Markka + * `FRF` - French Franc + * `XFO` - French Gold Franc + * `XFU` - French UIC-Franc + * `GMD` - Gambian Dalasi + * `GEK` - Georgian Kupon Larit + * `GEL` - Georgian Lari + * `DEM` - German Mark + * `GHS` - Ghanaian Cedi + * `GHC` - Ghanaian Cedi (1979–2007) + * `GIP` - Gibraltar Pound + * `XAU` - Gold + * `GRD` - Greek Drachma + * `GTQ` - Guatemalan Quetzal + * `GWP` - Guinea-Bissau Peso + * `GNF` - Guinean Franc + * `GNS` - Guinean Syli + * `GYD` - Guyanaese Dollar + * `HTG` - Haitian Gourde + * `HNL` - Honduran Lempira + * `HKD` - Hong Kong Dollar + * `HUF` - Hungarian Forint + * `IMP` - IMP + * `ISK` - Icelandic Króna + * `ISJ` - Icelandic Króna (1918–1981) + * `INR` - Indian Rupee + * `IDR` - Indonesian Rupiah + * `IRR` - Iranian Rial + * `IQD` - Iraqi Dinar + * `IEP` - Irish Pound + * `ILS` - Israeli New Shekel + * `ILP` - Israeli Pound + * `ILR` - Israeli Shekel (1980–1985) + * `ITL` - Italian Lira + * `JMD` - Jamaican Dollar + * `JPY` - Japanese Yen + * `JOD` - Jordanian Dinar + * `KZT` - Kazakhstani Tenge + * `KES` - Kenyan Shilling + * `KWD` - Kuwaiti Dinar + * `KGS` - Kyrgystani Som + * `LAK` - Laotian Kip + * `LVL` - Latvian Lats + * `LVR` - Latvian Ruble + * `LBP` - Lebanese Pound + * `LSL` - Lesotho Loti + * `LRD` - Liberian Dollar + * `LYD` - Libyan Dinar + * `LTL` - Lithuanian Litas + * `LTT` - Lithuanian Talonas + * `LUL` - Luxembourg Financial Franc + * `LUC` - Luxembourgian Convertible Franc + * `LUF` - Luxembourgian Franc + * `MOP` - Macanese Pataca + * `MKD` - Macedonian Denar + * `MKN` - Macedonian Denar (1992–1993) + * `MGA` - Malagasy Ariary + * `MGF` - Malagasy Franc + * `MWK` - Malawian Kwacha + * `MYR` - Malaysian Ringgit + * `MVR` - Maldivian Rufiyaa + * `MVP` - Maldivian Rupee (1947–1981) + * `MLF` - Malian Franc + * `MTL` - Maltese Lira + * `MTP` - Maltese Pound + * `MRU` - Mauritanian Ouguiya + * `MRO` - Mauritanian Ouguiya (1973–2017) + * `MUR` - Mauritian Rupee + * `MXV` - Mexican Investment Unit + * `MXN` - Mexican Peso + * `MXP` - Mexican Silver Peso (1861–1992) + * `MDC` - Moldovan Cupon + * `MDL` - Moldovan Leu + * `MCF` - Monegasque Franc + * `MNT` - Mongolian Tugrik + * `MAD` - Moroccan Dirham + * `MAF` - Moroccan Franc + * `MZE` - Mozambican Escudo + * `MZN` - Mozambican Metical + * `MZM` - Mozambican Metical (1980–2006) + * `MMK` - Myanmar Kyat + * `NAD` - Namibian Dollar + * `NPR` - Nepalese Rupee + * `ANG` - Netherlands Antillean Guilder + * `TWD` - New Taiwan Dollar + * `NZD` - New Zealand Dollar + * `NIO` - Nicaraguan Córdoba + * `NIC` - Nicaraguan Córdoba (1988–1991) + * `NGN` - Nigerian Naira + * `KPW` - North Korean Won + * `NOK` - Norwegian Krone + * `OMR` - Omani Rial + * `PKR` - Pakistani Rupee + * `XPD` - Palladium + * `PAB` - Panamanian Balboa + * `PGK` - Papua New Guinean Kina + * `PYG` - Paraguayan Guarani + * `PEI` - Peruvian Inti + * `PEN` - Peruvian Sol + * `PES` - Peruvian Sol (1863–1965) + * `PHP` - Philippine Peso + * `XPT` - Platinum + * `PLN` - Polish Zloty + * `PLZ` - Polish Zloty (1950–1995) + * `PTE` - Portuguese Escudo + * `GWE` - Portuguese Guinea Escudo + * `QAR` - Qatari Rial + * `XRE` - RINET Funds + * `RHD` - Rhodesian Dollar + * `RON` - Romanian Leu + * `ROL` - Romanian Leu (1952–2006) + * `RUB` - Russian Ruble + * `RUR` - Russian Ruble (1991–1998) + * `RWF` - Rwandan Franc + * `SVC` - Salvadoran Colón + * `WST` - Samoan Tala + * `SAR` - Saudi Riyal + * `RSD` - Serbian Dinar + * `CSD` - Serbian Dinar (2002–2006) + * `SCR` - Seychellois Rupee + * `SLL` - Sierra Leonean Leone + * `XAG` - Silver + * `SGD` - Singapore Dollar + * `SKK` - Slovak Koruna + * `SIT` - Slovenian Tolar + * `SBD` - Solomon Islands Dollar + * `SOS` - Somali Shilling + * `ZAR` - South African Rand + * `ZAL` - South African Rand (financial) + * `KRH` - South Korean Hwan (1953–1962) + * `KRW` - South Korean Won + * `KRO` - South Korean Won (1945–1953) + * `SSP` - South Sudanese Pound + * `SUR` - Soviet Rouble + * `ESP` - Spanish Peseta + * `ESA` - Spanish Peseta (A account) + * `ESB` - Spanish Peseta (convertible account) + * `XDR` - Special Drawing Rights + * `LKR` - Sri Lankan Rupee + * `SHP` - St. Helena Pound + * `XSU` - Sucre + * `SDD` - Sudanese Dinar (1992–2007) + * `SDG` - Sudanese Pound + * `SDP` - Sudanese Pound (1957–1998) + * `SRD` - Surinamese Dollar + * `SRG` - Surinamese Guilder + * `SZL` - Swazi Lilangeni + * `SEK` - Swedish Krona + * `CHF` - Swiss Franc + * `SYP` - Syrian Pound + * `STN` - São Tomé & Príncipe Dobra + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + * `TVD` - TVD + * `TJR` - Tajikistani Ruble + * `TJS` - Tajikistani Somoni + * `TZS` - Tanzanian Shilling + * `XTS` - Testing Currency Code + * `THB` - Thai Baht + * `XXX` - The codes assigned for transactions where no currency is involved + * `TPE` - Timorese Escudo + * `TOP` - Tongan Paʻanga + * `TTD` - Trinidad & Tobago Dollar + * `TND` - Tunisian Dinar + * `TRY` - Turkish Lira + * `TRL` - Turkish Lira (1922–2005) + * `TMT` - Turkmenistani Manat + * `TMM` - Turkmenistani Manat (1993–2009) + * `USD` - US Dollar + * `USN` - US Dollar (Next day) + * `USS` - US Dollar (Same day) + * `UGX` - Ugandan Shilling + * `UGS` - Ugandan Shilling (1966–1987) + * `UAH` - Ukrainian Hryvnia + * `UAK` - Ukrainian Karbovanets + * `AED` - United Arab Emirates Dirham + * `UYW` - Uruguayan Nominal Wage Index Unit + * `UYU` - Uruguayan Peso + * `UYP` - Uruguayan Peso (1975–1993) + * `UYI` - Uruguayan Peso (Indexed Units) + * `UZS` - Uzbekistani Som + * `VUV` - Vanuatu Vatu + * `VES` - Venezuelan Bolívar + * `VEB` - Venezuelan Bolívar (1871–2008) + * `VEF` - Venezuelan Bolívar (2008–2018) + * `VND` - Vietnamese Dong + * `VNN` - Vietnamese Dong (1978–1985) + * `CHE` - WIR Euro + * `CHW` - WIR Franc + * `XOF` - West African CFA Franc + * `YDD` - Yemeni Dinar + * `YER` - Yemeni Rial + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + * `YUM` - Yugoslavian New Dinar (1994–2002) + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + * `ZWN` - ZWN + * `ZRN` - Zairean New Zaire (1993–1998) + * `ZRZ` - Zairean Zaire (1971–1993) + * `ZMW` - Zambian Kwacha + * `ZMK` - Zambian Kwacha (1968–2012) + * `ZWD` - Zimbabwean Dollar (1980–2008) + * `ZWR` - Zimbabwean Dollar (2008) + * `ZWL` - Zimbabwean Dollar (2009) + example: USD + payments: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Payment' + nullable: true + example: + - b26fd49a-cbae-470a-a8f8-bcbc119e0390 + description: Array of `Payment` object IDs + x-merge-expands-to: Payment + applied_payments: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/PaymentLineItem' + nullable: true + example: + - a9a94a75-19c1-41fe-90d8-d9ba959c38e5 + description: A list of the Payment Applied to Lines common models related + to a given Invoice, Credit Note, or Journal Entry. + x-merge-expands-to: PaymentLineItemWithPayment + accounting_period: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/AccountingPeriod' + nullable: true + description: The accounting period that the CreditNote was generated in. + example: b38c59b0-a9d7-4740-b1ee-5436c6751e3d + x-merge-expands-to: AccountingPeriod + applied_to_lines: + type: array + items: + $ref: '#/components/schemas/CreditNoteApplyLineForCreditNoteRequest' + description: A list of the CreditNote Applied to Lines common models related + to a given Credit Note + example: + - invoice: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + applied_date: '2020-03-31T00:00:00Z' + applied_amount: '2.9' + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + x-merge-expands: '{"accounting_period": "AccountingPeriod", "applied_payments": + "PaymentLineItemWithPayment", "company": "CompanyInfo", "contact": "Contact", + "line_items": "CreditNoteLineItem", "payments": "Payment", "tracking_categories": + "TrackingCategory"}' + x-merge-category: accounting + CreditNoteResponse: + type: object + properties: + model: + $ref: '#/components/schemas/CreditNote' + warnings: + type: array + items: + $ref: '#/components/schemas/WarningValidationProblem' + errors: + type: array + items: + $ref: '#/components/schemas/ErrorValidationProblem' + logs: + type: array + items: + $ref: '#/components/schemas/DebugModeLog' + required: + - errors + - model + - warnings + x-merge-category: accounting + CreditNoteStatusEnum: + enum: + - SUBMITTED + - AUTHORIZED + - PAID + type: string + description: |- + * `SUBMITTED` - SUBMITTED + * `AUTHORIZED` - AUTHORIZED + * `PAID` - PAID + x-merge-category: accounting + CreditOrDebitEnum: + enum: + - CREDIT + - DEBIT + type: string + description: |- + * `CREDIT` - CREDIT + * `DEBIT` - DEBIT + x-merge-category: accounting + DataPassthroughRequest: + type: object + description: |- + # The DataPassthrough Object + ### Description + The `DataPassthrough` object is used to send information to an otherwise-unsupported third-party endpoint. + + ### Usage Example + Create a `DataPassthrough` to get team hierarchies from your Rippling integration. + properties: + method: + allOf: + - $ref: '#/components/schemas/MethodEnum' + example: POST + path: + type: string + minLength: 1 + description: The path of the request in the third party's platform. + example: /scooters + base_url_override: + type: string + nullable: true + minLength: 1 + description: An optional override of the third party's base url for the + request. + example: https://api.example.com + data: + type: string + nullable: true + minLength: 1 + description: The data with the request. You must include a `request_format` + parameter matching the data's format + example: '{"company": "Lime", "model": "Gen 2.5"}' + multipart_form_data: + type: array + items: + $ref: '#/components/schemas/MultipartFormFieldRequest' + nullable: true + description: Pass an array of `MultipartFormField` objects in here instead + of using the `data` param if `request_format` is set to `MULTIPART`. + headers: + type: object + additionalProperties: {} + nullable: true + description: The headers to use for the request (Merge will handle the account's + authorization headers). `Content-Type` header is required for passthrough. + Choose content type corresponding to expected format of receiving server. + example: + EXTRA-HEADER: value + request_format: + allOf: + - $ref: '#/components/schemas/RequestFormatEnum' + nullable: true + example: JSON + normalize_response: + type: boolean + description: 'Optional. If true, the response will always be an object of + the form `{"type": T, "value": ...}` where `T` will be one of `string, + boolean, number, null, array, object`.' + required: + - method + - path + x-merge-category: accounting + DebugModeLog: + type: object + properties: + log_id: + type: string + example: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: + type: string + example: https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + $ref: '#/components/schemas/DebugModelLogSummary' + example: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + required: + - dashboard_view + - log_id + - log_summary + x-merge-sample-json: '{"log_id": "99433219-8017-4acd-bb3c-ceb23d663832", "dashboard_view": + "https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832", "log_summary": + {"url": "www.exampleintegration.com/api/v1/exampleapi", "method": "POST", + "status_code": 200}}' + x-merge-category: accounting + DebugModelLogSummary: + type: object + properties: + url: + type: string + example: www.exampleintegration.com/api/v1/exampleapi + method: + type: string + example: POST + status_code: + type: integer + example: 200 + required: + - method + - status_code + - url + x-merge-sample-json: '{"url": "www.exampleintegration.com/api/v1/exampleapi", + "method": "POST", "status_code": 200}' + x-merge-category: accounting + Employee: + type: object + description: |- + # The Employee Object + ### Description + An `Employee` is an individual who works for the company of the linked account. The `Employee` model contains both contractors and full time employees. + * An `Employee` is a contractor if `is_contractor` property is `True` + * An `Employee` is a full time employee if `is_contractor` property is `False` + + ### Usage Example + Fetch from the `LIST Employees` endpoint and view a company's employees. + properties: + id: + type: string + format: uuid + readOnly: true + example: c640b80b-fac9-409f-aa19-1f9221aec445 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '11167' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + first_name: + type: string + nullable: true + description: The employee's first name. + maxLength: 255 + example: John + last_name: + type: string + nullable: true + description: The employee's last name. + maxLength: 255 + example: Smith + is_contractor: + type: boolean + nullable: true + description: '`True` if the employee is a contractor, `False` if not.' + example: true + employee_number: + type: string + nullable: true + description: The employee's internal identification number. + maxLength: 50 + example: '325462' + email_address: + type: string + nullable: true + description: The employee's email address. + example: johnsmith@merge.dev + company: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/CompanyInfo' + nullable: true + description: The subsidiary that the employee belongs to. + example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + x-merge-expands-to: CompanyInfo + status: + oneOf: + - $ref: '#/components/schemas/Status895Enum' + - type: string + description: |- + The employee's status in the accounting system. + + * `ACTIVE` - ACTIVE + * `INACTIVE` - INACTIVE + example: ACTIVE + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /actions + data: + - Varies by platform + required: + - status + x-merge-expands: '{"company": "Company", "employments": "Employment", "groups": + "Group", "home_location": "Location", "manager": "Employee", "pay_group": + "PayGroup", "team": "Team", "work_location": "Location"}' + x-merge-category: accounting + EnabledActionsEnum: + enum: + - READ + - WRITE + type: string + description: |- + * `READ` - READ + * `WRITE` - WRITE + x-merge-category: accounting + EncodingEnum: + enum: + - RAW + - BASE64 + - GZIP_BASE64 + type: string + description: |- + * `RAW` - RAW + * `BASE64` - BASE64 + * `GZIP_BASE64` - GZIP_BASE64 + x-merge-category: accounting + EndUserDetailsRequest: + type: object + properties: + end_user_email_address: + type: string + minLength: 1 + description: Your end user's email address. This is purely for identification + purposes - setting this value will not cause any emails to be sent. + maxLength: 100 + example: example@gmail.com + end_user_organization_name: + type: string + minLength: 1 + description: Your end user's organization. + maxLength: 100 + example: Test Organization + end_user_origin_id: + type: string + minLength: 1 + description: 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. + maxLength: 100 + example: '12345' + categories: + type: array + items: + $ref: '#/components/schemas/CategoriesEnum' + description: The integration categories to show in Merge Link. + example: + - hris + - ats + integration: + type: string + nullable: true + minLength: 1 + description: 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/. + example: bamboohr + link_expiry_mins: + type: integer + maximum: 10080 + minimum: 30 + default: 30 + description: An integer number of minutes between [30, 720 or 10080 if for + a Magic Link URL] for how long this token is valid. Defaults to 30. + should_create_magic_link_url: + type: boolean + nullable: true + default: false + description: Whether to generate a Magic Link URL. Defaults to false. For + more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. + hide_admin_magic_link: + type: boolean + nullable: true + default: false + description: 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: + type: array + items: + $ref: '#/components/schemas/CommonModelScopesBodyRequest' + nullable: true + description: An array of objects to specify the models and fields that will + be disabled for a given Linked Account. Each object uses model_id, enabled_actions, + and disabled_fields to specify the model, method, and fields that are + scoped for a given Linked Account. + category_common_model_scopes: + type: object + additionalProperties: + type: array + items: + $ref: '#/components/schemas/IndividualCommonModelScopeDeserializerRequest' + nullable: true + description: 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. + example: + hris: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: true + field_permissions: + enabled_fields: + - first_name + - last_name + - personal_email + disabled_fields: + - preferred_name + - model_name: Employment + model_permissions: + READ: + is_enabled: false + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - effective_date + ats: + - model_name: Job + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: true + field_permissions: + enabled_fields: + - name + disabled_fields: + - description + - model_name: Department + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: true + language: + oneOf: + - $ref: '#/components/schemas/LanguageEnum' + - type: string + nullable: true + description: |- + The following subset of IETF language tags can be used to configure localization. + + * `en` - en + * `de` - de + example: en + are_syncs_disabled: + type: boolean + nullable: true + default: false + description: The boolean that indicates whether initial, periodic, and force + syncs will be disabled. + integration_specific_config: + type: object + additionalProperties: {} + nullable: true + description: A JSON object containing integration-specific configuration + options. + example: + rippling: + oauth_code: 3h1jj8ssdf31dfji3o1jjdfjasd + required: + - categories + - end_user_email_address + - end_user_organization_name + - end_user_origin_id + x-merge-category: accounting + ErrorValidationProblem: + type: object + properties: + source: + $ref: '#/components/schemas/ValidationProblemSource' + example: + pointer: /model/custom_fields + title: + type: string + example: Missing Required Field + detail: + type: string + example: custom_fields is a required field on model. + problem_type: + type: string + example: MISSING_REQUIRED_FIELD + required: + - detail + - problem_type + - title + x-merge-category: accounting + EventTypeEnum: + enum: + - 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 + type: string + description: |- + * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + * `INVITED_USER` - INVITED_USER + * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + * `CREATED_DESTINATION` - CREATED_DESTINATION + * `DELETED_DESTINATION` - DELETED_DESTINATION + * `CHANGED_DESTINATION` - CHANGED_DESTINATION + * `CHANGED_SCOPES` - CHANGED_SCOPES + * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + * `ENABLED_CATEGORY` - ENABLED_CATEGORY + * `DISABLED_CATEGORY` - DISABLED_CATEGORY + * `CHANGED_PASSWORD` - CHANGED_PASSWORD + * `RESET_PASSWORD` - RESET_PASSWORD + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING + * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING + * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING + * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING + * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + * `MUTED_ISSUE` - MUTED_ISSUE + * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + x-merge-category: accounting + Expense: + type: object + description: |- + # The Expense Object + ### Description + The `Expense` object is used to represent a direct purchase by a business, typically made with a check, credit card, or cash. Each `Expense` object is dedicated to a grouping of expenses, with each expense recorded in the lines object. + + The `Expense` object is used also used to represent refunds to direct purchases. Refunds can be distinguished from purchases by the amount sign of the records. Expense objects with a negative amount are purchases and `Expense` objects with a positive amount are refunds to those purchases. + + ### Usage Example + Fetch from the `GET Expense` endpoint and view a company's expense. + properties: + id: + type: string + format: uuid + readOnly: true + example: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '088899' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + transaction_date: + type: string + format: date-time + nullable: true + description: When the transaction occurred. + remote_created_at: + type: string + format: date-time + nullable: true + description: When the expense was created. + example: '2020-03-31T00:00:00Z' + account: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Account' + nullable: true + description: The expense's payment account. + example: 9d892439-5fab-4dbb-8bd8-34f7f96c7912 + x-merge-expands-to: Account + contact: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Contact' + nullable: true + description: The expense's contact. + example: 3d263469-51a1-4766-9205-f6c997826be1 + x-merge-expands-to: Contact + total_amount: + type: number + format: double + nullable: true + description: The expense's total amount. + example: 10000 + sub_total: + type: number + format: double + nullable: true + description: The expense's total amount before tax. + total_tax_amount: + type: number + format: double + nullable: true + description: The expense's total tax amount. + currency: + oneOf: + - $ref: '#/components/schemas/TransactionCurrencyEnum' + - type: string + nullable: true + description: |- + The expense's currency. + + * `XUA` - ADB Unit of Account + * `AFN` - Afghan Afghani + * `AFA` - Afghan Afghani (1927–2002) + * `ALL` - Albanian Lek + * `ALK` - Albanian Lek (1946–1965) + * `DZD` - Algerian Dinar + * `ADP` - Andorran Peseta + * `AOA` - Angolan Kwanza + * `AOK` - Angolan Kwanza (1977–1991) + * `AON` - Angolan New Kwanza (1990–2000) + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + * `ARA` - Argentine Austral + * `ARS` - Argentine Peso + * `ARM` - Argentine Peso (1881–1970) + * `ARP` - Argentine Peso (1983–1985) + * `ARL` - Argentine Peso Ley (1970–1983) + * `AMD` - Armenian Dram + * `AWG` - Aruban Florin + * `AUD` - Australian Dollar + * `ATS` - Austrian Schilling + * `AZN` - Azerbaijani Manat + * `AZM` - Azerbaijani Manat (1993–2006) + * `BSD` - Bahamian Dollar + * `BHD` - Bahraini Dinar + * `BDT` - Bangladeshi Taka + * `BBD` - Barbadian Dollar + * `BYN` - Belarusian Ruble + * `BYB` - Belarusian Ruble (1994–1999) + * `BYR` - Belarusian Ruble (2000–2016) + * `BEF` - Belgian Franc + * `BEC` - Belgian Franc (convertible) + * `BEL` - Belgian Franc (financial) + * `BZD` - Belize Dollar + * `BMD` - Bermudan Dollar + * `BTN` - Bhutanese Ngultrum + * `BOB` - Bolivian Boliviano + * `BOL` - Bolivian Boliviano (1863–1963) + * `BOV` - Bolivian Mvdol + * `BOP` - Bolivian Peso + * `BAM` - Bosnia-Herzegovina Convertible Mark + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + * `BWP` - Botswanan Pula + * `BRC` - Brazilian Cruzado (1986–1989) + * `BRZ` - Brazilian Cruzeiro (1942–1967) + * `BRE` - Brazilian Cruzeiro (1990–1993) + * `BRR` - Brazilian Cruzeiro (1993–1994) + * `BRN` - Brazilian New Cruzado (1989–1990) + * `BRB` - Brazilian New Cruzeiro (1967–1986) + * `BRL` - Brazilian Real + * `GBP` - British Pound + * `BND` - Brunei Dollar + * `BGL` - Bulgarian Hard Lev + * `BGN` - Bulgarian Lev + * `BGO` - Bulgarian Lev (1879–1952) + * `BGM` - Bulgarian Socialist Lev + * `BUK` - Burmese Kyat + * `BIF` - Burundian Franc + * `XPF` - CFP Franc + * `KHR` - Cambodian Riel + * `CAD` - Canadian Dollar + * `CVE` - Cape Verdean Escudo + * `KYD` - Cayman Islands Dollar + * `XAF` - Central African CFA Franc + * `CLE` - Chilean Escudo + * `CLP` - Chilean Peso + * `CLF` - Chilean Unit of Account (UF) + * `CNX` - Chinese People’s Bank Dollar + * `CNY` - Chinese Yuan + * `CNH` - Chinese Yuan (offshore) + * `COP` - Colombian Peso + * `COU` - Colombian Real Value Unit + * `KMF` - Comorian Franc + * `CDF` - Congolese Franc + * `CRC` - Costa Rican Colón + * `HRD` - Croatian Dinar + * `HRK` - Croatian Kuna + * `CUC` - Cuban Convertible Peso + * `CUP` - Cuban Peso + * `CYP` - Cypriot Pound + * `CZK` - Czech Koruna + * `CSK` - Czechoslovak Hard Koruna + * `DKK` - Danish Krone + * `DJF` - Djiboutian Franc + * `DOP` - Dominican Peso + * `NLG` - Dutch Guilder + * `XCD` - East Caribbean Dollar + * `DDM` - East German Mark + * `ECS` - Ecuadorian Sucre + * `ECV` - Ecuadorian Unit of Constant Value + * `EGP` - Egyptian Pound + * `GQE` - Equatorial Guinean Ekwele + * `ERN` - Eritrean Nakfa + * `EEK` - Estonian Kroon + * `ETB` - Ethiopian Birr + * `EUR` - Euro + * `XBA` - European Composite Unit + * `XEU` - European Currency Unit + * `XBB` - European Monetary Unit + * `XBC` - European Unit of Account (XBC) + * `XBD` - European Unit of Account (XBD) + * `FKP` - Falkland Islands Pound + * `FJD` - Fijian Dollar + * `FIM` - Finnish Markka + * `FRF` - French Franc + * `XFO` - French Gold Franc + * `XFU` - French UIC-Franc + * `GMD` - Gambian Dalasi + * `GEK` - Georgian Kupon Larit + * `GEL` - Georgian Lari + * `DEM` - German Mark + * `GHS` - Ghanaian Cedi + * `GHC` - Ghanaian Cedi (1979–2007) + * `GIP` - Gibraltar Pound + * `XAU` - Gold + * `GRD` - Greek Drachma + * `GTQ` - Guatemalan Quetzal + * `GWP` - Guinea-Bissau Peso + * `GNF` - Guinean Franc + * `GNS` - Guinean Syli + * `GYD` - Guyanaese Dollar + * `HTG` - Haitian Gourde + * `HNL` - Honduran Lempira + * `HKD` - Hong Kong Dollar + * `HUF` - Hungarian Forint + * `IMP` - IMP + * `ISK` - Icelandic Króna + * `ISJ` - Icelandic Króna (1918–1981) + * `INR` - Indian Rupee + * `IDR` - Indonesian Rupiah + * `IRR` - Iranian Rial + * `IQD` - Iraqi Dinar + * `IEP` - Irish Pound + * `ILS` - Israeli New Shekel + * `ILP` - Israeli Pound + * `ILR` - Israeli Shekel (1980–1985) + * `ITL` - Italian Lira + * `JMD` - Jamaican Dollar + * `JPY` - Japanese Yen + * `JOD` - Jordanian Dinar + * `KZT` - Kazakhstani Tenge + * `KES` - Kenyan Shilling + * `KWD` - Kuwaiti Dinar + * `KGS` - Kyrgystani Som + * `LAK` - Laotian Kip + * `LVL` - Latvian Lats + * `LVR` - Latvian Ruble + * `LBP` - Lebanese Pound + * `LSL` - Lesotho Loti + * `LRD` - Liberian Dollar + * `LYD` - Libyan Dinar + * `LTL` - Lithuanian Litas + * `LTT` - Lithuanian Talonas + * `LUL` - Luxembourg Financial Franc + * `LUC` - Luxembourgian Convertible Franc + * `LUF` - Luxembourgian Franc + * `MOP` - Macanese Pataca + * `MKD` - Macedonian Denar + * `MKN` - Macedonian Denar (1992–1993) + * `MGA` - Malagasy Ariary + * `MGF` - Malagasy Franc + * `MWK` - Malawian Kwacha + * `MYR` - Malaysian Ringgit + * `MVR` - Maldivian Rufiyaa + * `MVP` - Maldivian Rupee (1947–1981) + * `MLF` - Malian Franc + * `MTL` - Maltese Lira + * `MTP` - Maltese Pound + * `MRU` - Mauritanian Ouguiya + * `MRO` - Mauritanian Ouguiya (1973–2017) + * `MUR` - Mauritian Rupee + * `MXV` - Mexican Investment Unit + * `MXN` - Mexican Peso + * `MXP` - Mexican Silver Peso (1861–1992) + * `MDC` - Moldovan Cupon + * `MDL` - Moldovan Leu + * `MCF` - Monegasque Franc + * `MNT` - Mongolian Tugrik + * `MAD` - Moroccan Dirham + * `MAF` - Moroccan Franc + * `MZE` - Mozambican Escudo + * `MZN` - Mozambican Metical + * `MZM` - Mozambican Metical (1980–2006) + * `MMK` - Myanmar Kyat + * `NAD` - Namibian Dollar + * `NPR` - Nepalese Rupee + * `ANG` - Netherlands Antillean Guilder + * `TWD` - New Taiwan Dollar + * `NZD` - New Zealand Dollar + * `NIO` - Nicaraguan Córdoba + * `NIC` - Nicaraguan Córdoba (1988–1991) + * `NGN` - Nigerian Naira + * `KPW` - North Korean Won + * `NOK` - Norwegian Krone + * `OMR` - Omani Rial + * `PKR` - Pakistani Rupee + * `XPD` - Palladium + * `PAB` - Panamanian Balboa + * `PGK` - Papua New Guinean Kina + * `PYG` - Paraguayan Guarani + * `PEI` - Peruvian Inti + * `PEN` - Peruvian Sol + * `PES` - Peruvian Sol (1863–1965) + * `PHP` - Philippine Peso + * `XPT` - Platinum + * `PLN` - Polish Zloty + * `PLZ` - Polish Zloty (1950–1995) + * `PTE` - Portuguese Escudo + * `GWE` - Portuguese Guinea Escudo + * `QAR` - Qatari Rial + * `XRE` - RINET Funds + * `RHD` - Rhodesian Dollar + * `RON` - Romanian Leu + * `ROL` - Romanian Leu (1952–2006) + * `RUB` - Russian Ruble + * `RUR` - Russian Ruble (1991–1998) + * `RWF` - Rwandan Franc + * `SVC` - Salvadoran Colón + * `WST` - Samoan Tala + * `SAR` - Saudi Riyal + * `RSD` - Serbian Dinar + * `CSD` - Serbian Dinar (2002–2006) + * `SCR` - Seychellois Rupee + * `SLL` - Sierra Leonean Leone + * `XAG` - Silver + * `SGD` - Singapore Dollar + * `SKK` - Slovak Koruna + * `SIT` - Slovenian Tolar + * `SBD` - Solomon Islands Dollar + * `SOS` - Somali Shilling + * `ZAR` - South African Rand + * `ZAL` - South African Rand (financial) + * `KRH` - South Korean Hwan (1953–1962) + * `KRW` - South Korean Won + * `KRO` - South Korean Won (1945–1953) + * `SSP` - South Sudanese Pound + * `SUR` - Soviet Rouble + * `ESP` - Spanish Peseta + * `ESA` - Spanish Peseta (A account) + * `ESB` - Spanish Peseta (convertible account) + * `XDR` - Special Drawing Rights + * `LKR` - Sri Lankan Rupee + * `SHP` - St. Helena Pound + * `XSU` - Sucre + * `SDD` - Sudanese Dinar (1992–2007) + * `SDG` - Sudanese Pound + * `SDP` - Sudanese Pound (1957–1998) + * `SRD` - Surinamese Dollar + * `SRG` - Surinamese Guilder + * `SZL` - Swazi Lilangeni + * `SEK` - Swedish Krona + * `CHF` - Swiss Franc + * `SYP` - Syrian Pound + * `STN` - São Tomé & Príncipe Dobra + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + * `TVD` - TVD + * `TJR` - Tajikistani Ruble + * `TJS` - Tajikistani Somoni + * `TZS` - Tanzanian Shilling + * `XTS` - Testing Currency Code + * `THB` - Thai Baht + * `XXX` - The codes assigned for transactions where no currency is involved + * `TPE` - Timorese Escudo + * `TOP` - Tongan Paʻanga + * `TTD` - Trinidad & Tobago Dollar + * `TND` - Tunisian Dinar + * `TRY` - Turkish Lira + * `TRL` - Turkish Lira (1922–2005) + * `TMT` - Turkmenistani Manat + * `TMM` - Turkmenistani Manat (1993–2009) + * `USD` - US Dollar + * `USN` - US Dollar (Next day) + * `USS` - US Dollar (Same day) + * `UGX` - Ugandan Shilling + * `UGS` - Ugandan Shilling (1966–1987) + * `UAH` - Ukrainian Hryvnia + * `UAK` - Ukrainian Karbovanets + * `AED` - United Arab Emirates Dirham + * `UYW` - Uruguayan Nominal Wage Index Unit + * `UYU` - Uruguayan Peso + * `UYP` - Uruguayan Peso (1975–1993) + * `UYI` - Uruguayan Peso (Indexed Units) + * `UZS` - Uzbekistani Som + * `VUV` - Vanuatu Vatu + * `VES` - Venezuelan Bolívar + * `VEB` - Venezuelan Bolívar (1871–2008) + * `VEF` - Venezuelan Bolívar (2008–2018) + * `VND` - Vietnamese Dong + * `VNN` - Vietnamese Dong (1978–1985) + * `CHE` - WIR Euro + * `CHW` - WIR Franc + * `XOF` - West African CFA Franc + * `YDD` - Yemeni Dinar + * `YER` - Yemeni Rial + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + * `YUM` - Yugoslavian New Dinar (1994–2002) + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + * `ZWN` - ZWN + * `ZRN` - Zairean New Zaire (1993–1998) + * `ZRZ` - Zairean Zaire (1971–1993) + * `ZMW` - Zambian Kwacha + * `ZMK` - Zambian Kwacha (1968–2012) + * `ZWD` - Zimbabwean Dollar (1980–2008) + * `ZWR` - Zimbabwean Dollar (2008) + * `ZWL` - Zimbabwean Dollar (2009) + example: USD + exchange_rate: + type: string + format: decimal + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + nullable: true + description: The expense's exchange rate. + example: '2.9' + inclusive_of_tax: + type: boolean + nullable: true + description: If the transaction is inclusive or exclusive of tax. `True` + if inclusive, `False` if exclusive. + company: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/CompanyInfo' + nullable: true + description: The company the expense belongs to. + example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + x-merge-expands-to: CompanyInfo + employee: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Employee' + nullable: true + description: The employee this overall transaction relates to. + example: 7442f0d5-722d-45bd-b807-6e38489d37fe + x-merge-expands-to: Employee + memo: + type: string + nullable: true + description: The expense's private note. + example: New employee supplies + lines: + type: array + items: + $ref: '#/components/schemas/ExpenseLine' + example: + - remote_id: '121222' + net_amount: 25.54 + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + project: 22e65a5d-2df5-4e6e-884a-e538d0339000 + employee: 7442f0d5-722d-45bd-b807-6e38489d37fe + item: b38c59b0-a9d7-4740-b1ee-5436c6751e3d + account: 2a56344a-a491-11ec-b909-0242ac120002 + contact: c640b80b-fac9-409f-aa19-1f9221aec445 + description: MacBook Pro + exchange_rate: '2.9' + remote_was_deleted: false + - remote_id: '121223' + net_amount: 10 + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + item: b38c59b0-a9d7-4740-b1ee-5436c6751e3d + account: 2a56344a-a491-11ec-b909-0242ac120002 + description: Desk Lamp + tracking_categories: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/TrackingCategory' + nullable: true + example: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + x-merge-expands-to: TrackingCategory + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + accounting_period: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/AccountingPeriod' + nullable: true + description: The accounting period that the Expense was generated in. + example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + x-merge-expands-to: AccountingPeriod + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /actions + data: + - Varies by platform + remote_fields: + type: array + items: + $ref: '#/components/schemas/RemoteField' + readOnly: true + x-merge-expands: '{"account": "Account", "accounting_period": "AccountingPeriod", + "company": "CompanyInfo", "contact": "Contact", "employee": "Employee", "tracking_categories": + "TrackingCategory"}' + x-merge-category: accounting + ExpenseEndpointRequest: + type: object + properties: + model: + $ref: '#/components/schemas/ExpenseRequest' + required: + - model + x-merge-category: accounting + ExpenseLine: + type: object + description: |- + # The ExpenseLine Object + ### Description + The `ExpenseLine` object is used to represent an expense's line items. + + ### Usage Example + Fetch from the `GET Expense` endpoint and view the expense's line items. + properties: + id: + type: string + format: uuid + readOnly: true + example: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '121222' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + item: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Item' + nullable: true + description: The line's item. + example: b38c59b0-a9d7-4740-b1ee-5436c6751e3d + x-merge-expands-to: Item + net_amount: + type: number + format: double + nullable: true + description: The line's net amount. + example: 25.54 + tracking_category: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/TrackingCategory' + nullable: true + deprecated: true + x-merge-expands-to: TrackingCategory + tracking_categories: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/TrackingCategory' + nullable: true + example: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + description: The expense line item's associated tracking categories. + x-merge-expands-to: TrackingCategory + company: + type: string + format: uuid + nullable: true + description: The company the expense belongs to. + example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + employee: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Employee' + nullable: true + description: The employee this overall transaction relates to. + example: 7442f0d5-722d-45bd-b807-6e38489d37fe + x-merge-expands-to: Employee + currency: + oneOf: + - $ref: '#/components/schemas/TransactionCurrencyEnum' + = type: string + nullable: true + description: |- + The expense line item's currency. + + * `XUA` - ADB Unit of Account + * `AFN` - Afghan Afghani + * `AFA` - Afghan Afghani (1927–2002) + * `ALL` - Albanian Lek + * `ALK` - Albanian Lek (1946–1965) + * `DZD` - Algerian Dinar + * `ADP` - Andorran Peseta + * `AOA` - Angolan Kwanza + * `AOK` - Angolan Kwanza (1977–1991) + * `AON` - Angolan New Kwanza (1990–2000) + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + * `ARA` - Argentine Austral + * `ARS` - Argentine Peso + * `ARM` - Argentine Peso (1881–1970) + * `ARP` - Argentine Peso (1983–1985) + * `ARL` - Argentine Peso Ley (1970–1983) + * `AMD` - Armenian Dram + * `AWG` - Aruban Florin + * `AUD` - Australian Dollar + * `ATS` - Austrian Schilling + * `AZN` - Azerbaijani Manat + * `AZM` - Azerbaijani Manat (1993–2006) + * `BSD` - Bahamian Dollar + * `BHD` - Bahraini Dinar + * `BDT` - Bangladeshi Taka + * `BBD` - Barbadian Dollar + * `BYN` - Belarusian Ruble + * `BYB` - Belarusian Ruble (1994–1999) + * `BYR` - Belarusian Ruble (2000–2016) + * `BEF` - Belgian Franc + * `BEC` - Belgian Franc (convertible) + * `BEL` - Belgian Franc (financial) + * `BZD` - Belize Dollar + * `BMD` - Bermudan Dollar + * `BTN` - Bhutanese Ngultrum + * `BOB` - Bolivian Boliviano + * `BOL` - Bolivian Boliviano (1863–1963) + * `BOV` - Bolivian Mvdol + * `BOP` - Bolivian Peso + * `BAM` - Bosnia-Herzegovina Convertible Mark + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + * `BWP` - Botswanan Pula + * `BRC` - Brazilian Cruzado (1986–1989) + * `BRZ` - Brazilian Cruzeiro (1942–1967) + * `BRE` - Brazilian Cruzeiro (1990–1993) + * `BRR` - Brazilian Cruzeiro (1993–1994) + * `BRN` - Brazilian New Cruzado (1989–1990) + * `BRB` - Brazilian New Cruzeiro (1967–1986) + * `BRL` - Brazilian Real + * `GBP` - British Pound + * `BND` - Brunei Dollar + * `BGL` - Bulgarian Hard Lev + * `BGN` - Bulgarian Lev + * `BGO` - Bulgarian Lev (1879–1952) + * `BGM` - Bulgarian Socialist Lev + * `BUK` - Burmese Kyat + * `BIF` - Burundian Franc + * `XPF` - CFP Franc + * `KHR` - Cambodian Riel + * `CAD` - Canadian Dollar + * `CVE` - Cape Verdean Escudo + * `KYD` - Cayman Islands Dollar + * `XAF` - Central African CFA Franc + * `CLE` - Chilean Escudo + * `CLP` - Chilean Peso + * `CLF` - Chilean Unit of Account (UF) + * `CNX` - Chinese People’s Bank Dollar + * `CNY` - Chinese Yuan + * `CNH` - Chinese Yuan (offshore) + * `COP` - Colombian Peso + * `COU` - Colombian Real Value Unit + * `KMF` - Comorian Franc + * `CDF` - Congolese Franc + * `CRC` - Costa Rican Colón + * `HRD` - Croatian Dinar + * `HRK` - Croatian Kuna + * `CUC` - Cuban Convertible Peso + * `CUP` - Cuban Peso + * `CYP` - Cypriot Pound + * `CZK` - Czech Koruna + * `CSK` - Czechoslovak Hard Koruna + * `DKK` - Danish Krone + * `DJF` - Djiboutian Franc + * `DOP` - Dominican Peso + * `NLG` - Dutch Guilder + * `XCD` - East Caribbean Dollar + * `DDM` - East German Mark + * `ECS` - Ecuadorian Sucre + * `ECV` - Ecuadorian Unit of Constant Value + * `EGP` - Egyptian Pound + * `GQE` - Equatorial Guinean Ekwele + * `ERN` - Eritrean Nakfa + * `EEK` - Estonian Kroon + * `ETB` - Ethiopian Birr + * `EUR` - Euro + * `XBA` - European Composite Unit + * `XEU` - European Currency Unit + * `XBB` - European Monetary Unit + * `XBC` - European Unit of Account (XBC) + * `XBD` - European Unit of Account (XBD) + * `FKP` - Falkland Islands Pound + * `FJD` - Fijian Dollar + * `FIM` - Finnish Markka + * `FRF` - French Franc + * `XFO` - French Gold Franc + * `XFU` - French UIC-Franc + * `GMD` - Gambian Dalasi + * `GEK` - Georgian Kupon Larit + * `GEL` - Georgian Lari + * `DEM` - German Mark + * `GHS` - Ghanaian Cedi + * `GHC` - Ghanaian Cedi (1979–2007) + * `GIP` - Gibraltar Pound + * `XAU` - Gold + * `GRD` - Greek Drachma + * `GTQ` - Guatemalan Quetzal + * `GWP` - Guinea-Bissau Peso + * `GNF` - Guinean Franc + * `GNS` - Guinean Syli + * `GYD` - Guyanaese Dollar + * `HTG` - Haitian Gourde + * `HNL` - Honduran Lempira + * `HKD` - Hong Kong Dollar + * `HUF` - Hungarian Forint + * `IMP` - IMP + * `ISK` - Icelandic Króna + * `ISJ` - Icelandic Króna (1918–1981) + * `INR` - Indian Rupee + * `IDR` - Indonesian Rupiah + * `IRR` - Iranian Rial + * `IQD` - Iraqi Dinar + * `IEP` - Irish Pound + * `ILS` - Israeli New Shekel + * `ILP` - Israeli Pound + * `ILR` - Israeli Shekel (1980–1985) + * `ITL` - Italian Lira + * `JMD` - Jamaican Dollar + * `JPY` - Japanese Yen + * `JOD` - Jordanian Dinar + * `KZT` - Kazakhstani Tenge + * `KES` - Kenyan Shilling + * `KWD` - Kuwaiti Dinar + * `KGS` - Kyrgystani Som + * `LAK` - Laotian Kip + * `LVL` - Latvian Lats + * `LVR` - Latvian Ruble + * `LBP` - Lebanese Pound + * `LSL` - Lesotho Loti + * `LRD` - Liberian Dollar + * `LYD` - Libyan Dinar + * `LTL` - Lithuanian Litas + * `LTT` - Lithuanian Talonas + * `LUL` - Luxembourg Financial Franc + * `LUC` - Luxembourgian Convertible Franc + * `LUF` - Luxembourgian Franc + * `MOP` - Macanese Pataca + * `MKD` - Macedonian Denar + * `MKN` - Macedonian Denar (1992–1993) + * `MGA` - Malagasy Ariary + * `MGF` - Malagasy Franc + * `MWK` - Malawian Kwacha + * `MYR` - Malaysian Ringgit + * `MVR` - Maldivian Rufiyaa + * `MVP` - Maldivian Rupee (1947–1981) + * `MLF` - Malian Franc + * `MTL` - Maltese Lira + * `MTP` - Maltese Pound + * `MRU` - Mauritanian Ouguiya + * `MRO` - Mauritanian Ouguiya (1973–2017) + * `MUR` - Mauritian Rupee + * `MXV` - Mexican Investment Unit + * `MXN` - Mexican Peso + * `MXP` - Mexican Silver Peso (1861–1992) + * `MDC` - Moldovan Cupon + * `MDL` - Moldovan Leu + * `MCF` - Monegasque Franc + * `MNT` - Mongolian Tugrik + * `MAD` - Moroccan Dirham + * `MAF` - Moroccan Franc + * `MZE` - Mozambican Escudo + * `MZN` - Mozambican Metical + * `MZM` - Mozambican Metical (1980–2006) + * `MMK` - Myanmar Kyat + * `NAD` - Namibian Dollar + * `NPR` - Nepalese Rupee + * `ANG` - Netherlands Antillean Guilder + * `TWD` - New Taiwan Dollar + * `NZD` - New Zealand Dollar + * `NIO` - Nicaraguan Córdoba + * `NIC` - Nicaraguan Córdoba (1988–1991) + * `NGN` - Nigerian Naira + * `KPW` - North Korean Won + * `NOK` - Norwegian Krone + * `OMR` - Omani Rial + * `PKR` - Pakistani Rupee + * `XPD` - Palladium + * `PAB` - Panamanian Balboa + * `PGK` - Papua New Guinean Kina + * `PYG` - Paraguayan Guarani + * `PEI` - Peruvian Inti + * `PEN` - Peruvian Sol + * `PES` - Peruvian Sol (1863–1965) + * `PHP` - Philippine Peso + * `XPT` - Platinum + * `PLN` - Polish Zloty + * `PLZ` - Polish Zloty (1950–1995) + * `PTE` - Portuguese Escudo + * `GWE` - Portuguese Guinea Escudo + * `QAR` - Qatari Rial + * `XRE` - RINET Funds + * `RHD` - Rhodesian Dollar + * `RON` - Romanian Leu + * `ROL` - Romanian Leu (1952–2006) + * `RUB` - Russian Ruble + * `RUR` - Russian Ruble (1991–1998) + * `RWF` - Rwandan Franc + * `SVC` - Salvadoran Colón + * `WST` - Samoan Tala + * `SAR` - Saudi Riyal + * `RSD` - Serbian Dinar + * `CSD` - Serbian Dinar (2002–2006) + * `SCR` - Seychellois Rupee + * `SLL` - Sierra Leonean Leone + * `XAG` - Silver + * `SGD` - Singapore Dollar + * `SKK` - Slovak Koruna + * `SIT` - Slovenian Tolar + * `SBD` - Solomon Islands Dollar + * `SOS` - Somali Shilling + * `ZAR` - South African Rand + * `ZAL` - South African Rand (financial) + * `KRH` - South Korean Hwan (1953–1962) + * `KRW` - South Korean Won + * `KRO` - South Korean Won (1945–1953) + * `SSP` - South Sudanese Pound + * `SUR` - Soviet Rouble + * `ESP` - Spanish Peseta + * `ESA` - Spanish Peseta (A account) + * `ESB` - Spanish Peseta (convertible account) + * `XDR` - Special Drawing Rights + * `LKR` - Sri Lankan Rupee + * `SHP` - St. Helena Pound + * `XSU` - Sucre + * `SDD` - Sudanese Dinar (1992–2007) + * `SDG` - Sudanese Pound + * `SDP` - Sudanese Pound (1957–1998) + * `SRD` - Surinamese Dollar + * `SRG` - Surinamese Guilder + * `SZL` - Swazi Lilangeni + * `SEK` - Swedish Krona + * `CHF` - Swiss Franc + * `SYP` - Syrian Pound + * `STN` - São Tomé & Príncipe Dobra + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + * `TVD` - TVD + * `TJR` - Tajikistani Ruble + * `TJS` - Tajikistani Somoni + * `TZS` - Tanzanian Shilling + * `XTS` - Testing Currency Code + * `THB` - Thai Baht + * `XXX` - The codes assigned for transactions where no currency is involved + * `TPE` - Timorese Escudo + * `TOP` - Tongan Paʻanga + * `TTD` - Trinidad & Tobago Dollar + * `TND` - Tunisian Dinar + * `TRY` - Turkish Lira + * `TRL` - Turkish Lira (1922–2005) + * `TMT` - Turkmenistani Manat + * `TMM` - Turkmenistani Manat (1993–2009) + * `USD` - US Dollar + * `USN` - US Dollar (Next day) + * `USS` - US Dollar (Same day) + * `UGX` - Ugandan Shilling + * `UGS` - Ugandan Shilling (1966–1987) + * `UAH` - Ukrainian Hryvnia + * `UAK` - Ukrainian Karbovanets + * `AED` - United Arab Emirates Dirham + * `UYW` - Uruguayan Nominal Wage Index Unit + * `UYU` - Uruguayan Peso + * `UYP` - Uruguayan Peso (1975–1993) + * `UYI` - Uruguayan Peso (Indexed Units) + * `UZS` - Uzbekistani Som + * `VUV` - Vanuatu Vatu + * `VES` - Venezuelan Bolívar + * `VEB` - Venezuelan Bolívar (1871–2008) + * `VEF` - Venezuelan Bolívar (2008–2018) + * `VND` - Vietnamese Dong + * `VNN` - Vietnamese Dong (1978–1985) + * `CHE` - WIR Euro + * `CHW` - WIR Franc + * `XOF` - West African CFA Franc + * `YDD` - Yemeni Dinar + * `YER` - Yemeni Rial + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + * `YUM` - Yugoslavian New Dinar (1994–2002) + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + * `ZWN` - ZWN + * `ZRN` - Zairean New Zaire (1993–1998) + * `ZRZ` - Zairean Zaire (1971–1993) + * `ZMW` - Zambian Kwacha + * `ZMK` - Zambian Kwacha (1968–2012) + * `ZWD` - Zimbabwean Dollar (1980–2008) + * `ZWR` - Zimbabwean Dollar (2008) + * `ZWL` - Zimbabwean Dollar (2009) + account: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Account' + nullable: true + description: The expense's payment account. + example: 2a56344a-a491-11ec-b909-0242ac120002 + x-merge-expands-to: Account + contact: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Contact' + nullable: true + description: The expense's contact. + example: c640b80b-fac9-409f-aa19-1f9221aec445 + x-merge-expands-to: Contact + project: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Project' + nullable: true + example: 22e65a5d-2df5-4e6e-884a-e538d0339000 + x-merge-expands-to: Project + description: + type: string + nullable: true + description: The description of the item that was purchased by the company. + example: MacBook Pro + exchange_rate: + type: string + format: decimal + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + nullable: true + description: The expense line item's exchange rate. + example: '2.9' + tax_rate: + type: string + format: uuid + nullable: true + example: a12e7c20-1922-9df7-s75n-edfeewnn7384 + description: The tax rate that applies to this line item. + remote_was_deleted: + type: boolean + readOnly: true + description: 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/). + x-merge-nested-write-allowed: true + x-merge-expands: '{"account": "Account", "contact": "Contact", "employee": "Employee", + "item": "Item", "project": "Project", "tracking_categories": "TrackingCategory", + "tracking_category": "TrackingCategory"}' + x-merge-category: accounting + ExpenseLineRequest: + type: object + description: |- + # The ExpenseLine Object + ### Description + The `ExpenseLine` object is used to represent an expense's line items. + + ### Usage Example + Fetch from the `GET Expense` endpoint and view the expense's line items. + properties: + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '121222' + item: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Item' + nullable: true + description: The line's item. + example: b38c59b0-a9d7-4740-b1ee-5436c6751e3d + x-merge-expands-to: Item + net_amount: + type: number + format: double + nullable: true + description: The line's net amount. + example: 25.54 + tracking_category: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/TrackingCategory' + nullable: true + deprecated: true + x-merge-expands-to: TrackingCategory + tracking_categories: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/TrackingCategory' + nullable: true + example: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + description: The expense line item's associated tracking categories. + x-merge-expands-to: TrackingCategory + company: + type: string + format: uuid + nullable: true + description: The company the expense belongs to. + example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + employee: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Employee' + nullable: true + description: The employee this overall transaction relates to. + example: 7442f0d5-722d-45bd-b807-6e38489d37fe + x-merge-expands-to: Employee + currency: + oneOf: + - $ref: '#/components/schemas/TransactionCurrencyEnum' + - type: string + nullable: true + description: |- + The expense line item's currency. + + * `XUA` - ADB Unit of Account + * `AFN` - Afghan Afghani + * `AFA` - Afghan Afghani (1927–2002) + * `ALL` - Albanian Lek + * `ALK` - Albanian Lek (1946–1965) + * `DZD` - Algerian Dinar + * `ADP` - Andorran Peseta + * `AOA` - Angolan Kwanza + * `AOK` - Angolan Kwanza (1977–1991) + * `AON` - Angolan New Kwanza (1990–2000) + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + * `ARA` - Argentine Austral + * `ARS` - Argentine Peso + * `ARM` - Argentine Peso (1881–1970) + * `ARP` - Argentine Peso (1983–1985) + * `ARL` - Argentine Peso Ley (1970–1983) + * `AMD` - Armenian Dram + * `AWG` - Aruban Florin + * `AUD` - Australian Dollar + * `ATS` - Austrian Schilling + * `AZN` - Azerbaijani Manat + * `AZM` - Azerbaijani Manat (1993–2006) + * `BSD` - Bahamian Dollar + * `BHD` - Bahraini Dinar + * `BDT` - Bangladeshi Taka + * `BBD` - Barbadian Dollar + * `BYN` - Belarusian Ruble + * `BYB` - Belarusian Ruble (1994–1999) + * `BYR` - Belarusian Ruble (2000–2016) + * `BEF` - Belgian Franc + * `BEC` - Belgian Franc (convertible) + * `BEL` - Belgian Franc (financial) + * `BZD` - Belize Dollar + * `BMD` - Bermudan Dollar + * `BTN` - Bhutanese Ngultrum + * `BOB` - Bolivian Boliviano + * `BOL` - Bolivian Boliviano (1863–1963) + * `BOV` - Bolivian Mvdol + * `BOP` - Bolivian Peso + * `BAM` - Bosnia-Herzegovina Convertible Mark + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + * `BWP` - Botswanan Pula + * `BRC` - Brazilian Cruzado (1986–1989) + * `BRZ` - Brazilian Cruzeiro (1942–1967) + * `BRE` - Brazilian Cruzeiro (1990–1993) + * `BRR` - Brazilian Cruzeiro (1993–1994) + * `BRN` - Brazilian New Cruzado (1989–1990) + * `BRB` - Brazilian New Cruzeiro (1967–1986) + * `BRL` - Brazilian Real + * `GBP` - British Pound + * `BND` - Brunei Dollar + * `BGL` - Bulgarian Hard Lev + * `BGN` - Bulgarian Lev + * `BGO` - Bulgarian Lev (1879–1952) + * `BGM` - Bulgarian Socialist Lev + * `BUK` - Burmese Kyat + * `BIF` - Burundian Franc + * `XPF` - CFP Franc + * `KHR` - Cambodian Riel + * `CAD` - Canadian Dollar + * `CVE` - Cape Verdean Escudo + * `KYD` - Cayman Islands Dollar + * `XAF` - Central African CFA Franc + * `CLE` - Chilean Escudo + * `CLP` - Chilean Peso + * `CLF` - Chilean Unit of Account (UF) + * `CNX` - Chinese People’s Bank Dollar + * `CNY` - Chinese Yuan + * `CNH` - Chinese Yuan (offshore) + * `COP` - Colombian Peso + * `COU` - Colombian Real Value Unit + * `KMF` - Comorian Franc + * `CDF` - Congolese Franc + * `CRC` - Costa Rican Colón + * `HRD` - Croatian Dinar + * `HRK` - Croatian Kuna + * `CUC` - Cuban Convertible Peso + * `CUP` - Cuban Peso + * `CYP` - Cypriot Pound + * `CZK` - Czech Koruna + * `CSK` - Czechoslovak Hard Koruna + * `DKK` - Danish Krone + * `DJF` - Djiboutian Franc + * `DOP` - Dominican Peso + * `NLG` - Dutch Guilder + * `XCD` - East Caribbean Dollar + * `DDM` - East German Mark + * `ECS` - Ecuadorian Sucre + * `ECV` - Ecuadorian Unit of Constant Value + * `EGP` - Egyptian Pound + * `GQE` - Equatorial Guinean Ekwele + * `ERN` - Eritrean Nakfa + * `EEK` - Estonian Kroon + * `ETB` - Ethiopian Birr + * `EUR` - Euro + * `XBA` - European Composite Unit + * `XEU` - European Currency Unit + * `XBB` - European Monetary Unit + * `XBC` - European Unit of Account (XBC) + * `XBD` - European Unit of Account (XBD) + * `FKP` - Falkland Islands Pound + * `FJD` - Fijian Dollar + * `FIM` - Finnish Markka + * `FRF` - French Franc + * `XFO` - French Gold Franc + * `XFU` - French UIC-Franc + * `GMD` - Gambian Dalasi + * `GEK` - Georgian Kupon Larit + * `GEL` - Georgian Lari + * `DEM` - German Mark + * `GHS` - Ghanaian Cedi + * `GHC` - Ghanaian Cedi (1979–2007) + * `GIP` - Gibraltar Pound + * `XAU` - Gold + * `GRD` - Greek Drachma + * `GTQ` - Guatemalan Quetzal + * `GWP` - Guinea-Bissau Peso + * `GNF` - Guinean Franc + * `GNS` - Guinean Syli + * `GYD` - Guyanaese Dollar + * `HTG` - Haitian Gourde + * `HNL` - Honduran Lempira + * `HKD` - Hong Kong Dollar + * `HUF` - Hungarian Forint + * `IMP` - IMP + * `ISK` - Icelandic Króna + * `ISJ` - Icelandic Króna (1918–1981) + * `INR` - Indian Rupee + * `IDR` - Indonesian Rupiah + * `IRR` - Iranian Rial + * `IQD` - Iraqi Dinar + * `IEP` - Irish Pound + * `ILS` - Israeli New Shekel + * `ILP` - Israeli Pound + * `ILR` - Israeli Shekel (1980–1985) + * `ITL` - Italian Lira + * `JMD` - Jamaican Dollar + * `JPY` - Japanese Yen + * `JOD` - Jordanian Dinar + * `KZT` - Kazakhstani Tenge + * `KES` - Kenyan Shilling + * `KWD` - Kuwaiti Dinar + * `KGS` - Kyrgystani Som + * `LAK` - Laotian Kip + * `LVL` - Latvian Lats + * `LVR` - Latvian Ruble + * `LBP` - Lebanese Pound + * `LSL` - Lesotho Loti + * `LRD` - Liberian Dollar + * `LYD` - Libyan Dinar + * `LTL` - Lithuanian Litas + * `LTT` - Lithuanian Talonas + * `LUL` - Luxembourg Financial Franc + * `LUC` - Luxembourgian Convertible Franc + * `LUF` - Luxembourgian Franc + * `MOP` - Macanese Pataca + * `MKD` - Macedonian Denar + * `MKN` - Macedonian Denar (1992–1993) + * `MGA` - Malagasy Ariary + * `MGF` - Malagasy Franc + * `MWK` - Malawian Kwacha + * `MYR` - Malaysian Ringgit + * `MVR` - Maldivian Rufiyaa + * `MVP` - Maldivian Rupee (1947–1981) + * `MLF` - Malian Franc + * `MTL` - Maltese Lira + * `MTP` - Maltese Pound + * `MRU` - Mauritanian Ouguiya + * `MRO` - Mauritanian Ouguiya (1973–2017) + * `MUR` - Mauritian Rupee + * `MXV` - Mexican Investment Unit + * `MXN` - Mexican Peso + * `MXP` - Mexican Silver Peso (1861–1992) + * `MDC` - Moldovan Cupon + * `MDL` - Moldovan Leu + * `MCF` - Monegasque Franc + * `MNT` - Mongolian Tugrik + * `MAD` - Moroccan Dirham + * `MAF` - Moroccan Franc + * `MZE` - Mozambican Escudo + * `MZN` - Mozambican Metical + * `MZM` - Mozambican Metical (1980–2006) + * `MMK` - Myanmar Kyat + * `NAD` - Namibian Dollar + * `NPR` - Nepalese Rupee + * `ANG` - Netherlands Antillean Guilder + * `TWD` - New Taiwan Dollar + * `NZD` - New Zealand Dollar + * `NIO` - Nicaraguan Córdoba + * `NIC` - Nicaraguan Córdoba (1988–1991) + * `NGN` - Nigerian Naira + * `KPW` - North Korean Won + * `NOK` - Norwegian Krone + * `OMR` - Omani Rial + * `PKR` - Pakistani Rupee + * `XPD` - Palladium + * `PAB` - Panamanian Balboa + * `PGK` - Papua New Guinean Kina + * `PYG` - Paraguayan Guarani + * `PEI` - Peruvian Inti + * `PEN` - Peruvian Sol + * `PES` - Peruvian Sol (1863–1965) + * `PHP` - Philippine Peso + * `XPT` - Platinum + * `PLN` - Polish Zloty + * `PLZ` - Polish Zloty (1950–1995) + * `PTE` - Portuguese Escudo + * `GWE` - Portuguese Guinea Escudo + * `QAR` - Qatari Rial + * `XRE` - RINET Funds + * `RHD` - Rhodesian Dollar + * `RON` - Romanian Leu + * `ROL` - Romanian Leu (1952–2006) + * `RUB` - Russian Ruble + * `RUR` - Russian Ruble (1991–1998) + * `RWF` - Rwandan Franc + * `SVC` - Salvadoran Colón + * `WST` - Samoan Tala + * `SAR` - Saudi Riyal + * `RSD` - Serbian Dinar + * `CSD` - Serbian Dinar (2002–2006) + * `SCR` - Seychellois Rupee + * `SLL` - Sierra Leonean Leone + * `XAG` - Silver + * `SGD` - Singapore Dollar + * `SKK` - Slovak Koruna + * `SIT` - Slovenian Tolar + * `SBD` - Solomon Islands Dollar + * `SOS` - Somali Shilling + * `ZAR` - South African Rand + * `ZAL` - South African Rand (financial) + * `KRH` - South Korean Hwan (1953–1962) + * `KRW` - South Korean Won + * `KRO` - South Korean Won (1945–1953) + * `SSP` - South Sudanese Pound + * `SUR` - Soviet Rouble + * `ESP` - Spanish Peseta + * `ESA` - Spanish Peseta (A account) + * `ESB` - Spanish Peseta (convertible account) + * `XDR` - Special Drawing Rights + * `LKR` - Sri Lankan Rupee + * `SHP` - St. Helena Pound + * `XSU` - Sucre + * `SDD` - Sudanese Dinar (1992–2007) + * `SDG` - Sudanese Pound + * `SDP` - Sudanese Pound (1957–1998) + * `SRD` - Surinamese Dollar + * `SRG` - Surinamese Guilder + * `SZL` - Swazi Lilangeni + * `SEK` - Swedish Krona + * `CHF` - Swiss Franc + * `SYP` - Syrian Pound + * `STN` - São Tomé & Príncipe Dobra + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + * `TVD` - TVD + * `TJR` - Tajikistani Ruble + * `TJS` - Tajikistani Somoni + * `TZS` - Tanzanian Shilling + * `XTS` - Testing Currency Code + * `THB` - Thai Baht + * `XXX` - The codes assigned for transactions where no currency is involved + * `TPE` - Timorese Escudo + * `TOP` - Tongan Paʻanga + * `TTD` - Trinidad & Tobago Dollar + * `TND` - Tunisian Dinar + * `TRY` - Turkish Lira + * `TRL` - Turkish Lira (1922–2005) + * `TMT` - Turkmenistani Manat + * `TMM` - Turkmenistani Manat (1993–2009) + * `USD` - US Dollar + * `USN` - US Dollar (Next day) + * `USS` - US Dollar (Same day) + * `UGX` - Ugandan Shilling + * `UGS` - Ugandan Shilling (1966–1987) + * `UAH` - Ukrainian Hryvnia + * `UAK` - Ukrainian Karbovanets + * `AED` - United Arab Emirates Dirham + * `UYW` - Uruguayan Nominal Wage Index Unit + * `UYU` - Uruguayan Peso + * `UYP` - Uruguayan Peso (1975–1993) + * `UYI` - Uruguayan Peso (Indexed Units) + * `UZS` - Uzbekistani Som + * `VUV` - Vanuatu Vatu + * `VES` - Venezuelan Bolívar + * `VEB` - Venezuelan Bolívar (1871–2008) + * `VEF` - Venezuelan Bolívar (2008–2018) + * `VND` - Vietnamese Dong + * `VNN` - Vietnamese Dong (1978–1985) + * `CHE` - WIR Euro + * `CHW` - WIR Franc + * `XOF` - West African CFA Franc + * `YDD` - Yemeni Dinar + * `YER` - Yemeni Rial + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + * `YUM` - Yugoslavian New Dinar (1994–2002) + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + * `ZWN` - ZWN + * `ZRN` - Zairean New Zaire (1993–1998) + * `ZRZ` - Zairean Zaire (1971–1993) + * `ZMW` - Zambian Kwacha + * `ZMK` - Zambian Kwacha (1968–2012) + * `ZWD` - Zimbabwean Dollar (1980–2008) + * `ZWR` - Zimbabwean Dollar (2008) + * `ZWL` - Zimbabwean Dollar (2009) + account: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Account' + nullable: true + description: The expense's payment account. + example: 2a56344a-a491-11ec-b909-0242ac120002 + x-merge-expands-to: Account + contact: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Contact' + nullable: true + description: The expense's contact. + example: c640b80b-fac9-409f-aa19-1f9221aec445 + x-merge-expands-to: Contact + project: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Project' + nullable: true + example: 22e65a5d-2df5-4e6e-884a-e538d0339000 + x-merge-expands-to: Project + description: + type: string + nullable: true + description: The description of the item that was purchased by the company. + example: MacBook Pro + exchange_rate: + type: string + format: decimal + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + nullable: true + description: The expense line item's exchange rate. + example: '2.9' + tax_rate: + type: string + format: uuid + nullable: true + example: a12e7c20-1922-9df7-s75n-edfeewnn7384 + description: The tax rate that applies to this line item. + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + remote_fields: + type: array + items: + $ref: '#/components/schemas/RemoteFieldRequest' + writeOnly: true + x-merge-expands: '{"account": "Account", "contact": "Contact", "employee": "Employee", + "item": "Item", "project": "Project", "tracking_categories": "TrackingCategory", + "tracking_category": "TrackingCategory"}' + x-merge-category: accounting + ExpenseRequest: + type: object + description: |- + # The Expense Object + ### Description + The `Expense` object is used to represent a direct purchase by a business, typically made with a check, credit card, or cash. Each `Expense` object is dedicated to a grouping of expenses, with each expense recorded in the lines object. + + The `Expense` object is used also used to represent refunds to direct purchases. Refunds can be distinguished from purchases by the amount sign of the records. Expense objects with a negative amount are purchases and `Expense` objects with a positive amount are refunds to those purchases. + + ### Usage Example + Fetch from the `GET Expense` endpoint and view a company's expense. + properties: + transaction_date: + type: string + format: date-time + nullable: true + description: When the transaction occurred. + account: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Account' + nullable: true + description: The expense's payment account. + example: 9d892439-5fab-4dbb-8bd8-34f7f96c7912 + x-merge-expands-to: Account + contact: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Contact' + nullable: true + description: The expense's contact. + example: 3d263469-51a1-4766-9205-f6c997826be1 + x-merge-expands-to: Contact + total_amount: + type: number + format: double + nullable: true + description: The expense's total amount. + example: 10000 + sub_total: + type: number + format: double + nullable: true + description: The expense's total amount before tax. + total_tax_amount: + type: number + format: double + nullable: true + description: The expense's total tax amount. + currency: + oneOf: + - $ref: '#/components/schemas/TransactionCurrencyEnum' + = type: string + nullable: true + description: |- + The expense's currency. + + * `XUA` - ADB Unit of Account + * `AFN` - Afghan Afghani + * `AFA` - Afghan Afghani (1927–2002) + * `ALL` - Albanian Lek + * `ALK` - Albanian Lek (1946–1965) + * `DZD` - Algerian Dinar + * `ADP` - Andorran Peseta + * `AOA` - Angolan Kwanza + * `AOK` - Angolan Kwanza (1977–1991) + * `AON` - Angolan New Kwanza (1990–2000) + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + * `ARA` - Argentine Austral + * `ARS` - Argentine Peso + * `ARM` - Argentine Peso (1881–1970) + * `ARP` - Argentine Peso (1983–1985) + * `ARL` - Argentine Peso Ley (1970–1983) + * `AMD` - Armenian Dram + * `AWG` - Aruban Florin + * `AUD` - Australian Dollar + * `ATS` - Austrian Schilling + * `AZN` - Azerbaijani Manat + * `AZM` - Azerbaijani Manat (1993–2006) + * `BSD` - Bahamian Dollar + * `BHD` - Bahraini Dinar + * `BDT` - Bangladeshi Taka + * `BBD` - Barbadian Dollar + * `BYN` - Belarusian Ruble + * `BYB` - Belarusian Ruble (1994–1999) + * `BYR` - Belarusian Ruble (2000–2016) + * `BEF` - Belgian Franc + * `BEC` - Belgian Franc (convertible) + * `BEL` - Belgian Franc (financial) + * `BZD` - Belize Dollar + * `BMD` - Bermudan Dollar + * `BTN` - Bhutanese Ngultrum + * `BOB` - Bolivian Boliviano + * `BOL` - Bolivian Boliviano (1863–1963) + * `BOV` - Bolivian Mvdol + * `BOP` - Bolivian Peso + * `BAM` - Bosnia-Herzegovina Convertible Mark + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + * `BWP` - Botswanan Pula + * `BRC` - Brazilian Cruzado (1986–1989) + * `BRZ` - Brazilian Cruzeiro (1942–1967) + * `BRE` - Brazilian Cruzeiro (1990–1993) + * `BRR` - Brazilian Cruzeiro (1993–1994) + * `BRN` - Brazilian New Cruzado (1989–1990) + * `BRB` - Brazilian New Cruzeiro (1967–1986) + * `BRL` - Brazilian Real + * `GBP` - British Pound + * `BND` - Brunei Dollar + * `BGL` - Bulgarian Hard Lev + * `BGN` - Bulgarian Lev + * `BGO` - Bulgarian Lev (1879–1952) + * `BGM` - Bulgarian Socialist Lev + * `BUK` - Burmese Kyat + * `BIF` - Burundian Franc + * `XPF` - CFP Franc + * `KHR` - Cambodian Riel + * `CAD` - Canadian Dollar + * `CVE` - Cape Verdean Escudo + * `KYD` - Cayman Islands Dollar + * `XAF` - Central African CFA Franc + * `CLE` - Chilean Escudo + * `CLP` - Chilean Peso + * `CLF` - Chilean Unit of Account (UF) + * `CNX` - Chinese People’s Bank Dollar + * `CNY` - Chinese Yuan + * `CNH` - Chinese Yuan (offshore) + * `COP` - Colombian Peso + * `COU` - Colombian Real Value Unit + * `KMF` - Comorian Franc + * `CDF` - Congolese Franc + * `CRC` - Costa Rican Colón + * `HRD` - Croatian Dinar + * `HRK` - Croatian Kuna + * `CUC` - Cuban Convertible Peso + * `CUP` - Cuban Peso + * `CYP` - Cypriot Pound + * `CZK` - Czech Koruna + * `CSK` - Czechoslovak Hard Koruna + * `DKK` - Danish Krone + * `DJF` - Djiboutian Franc + * `DOP` - Dominican Peso + * `NLG` - Dutch Guilder + * `XCD` - East Caribbean Dollar + * `DDM` - East German Mark + * `ECS` - Ecuadorian Sucre + * `ECV` - Ecuadorian Unit of Constant Value + * `EGP` - Egyptian Pound + * `GQE` - Equatorial Guinean Ekwele + * `ERN` - Eritrean Nakfa + * `EEK` - Estonian Kroon + * `ETB` - Ethiopian Birr + * `EUR` - Euro + * `XBA` - European Composite Unit + * `XEU` - European Currency Unit + * `XBB` - European Monetary Unit + * `XBC` - European Unit of Account (XBC) + * `XBD` - European Unit of Account (XBD) + * `FKP` - Falkland Islands Pound + * `FJD` - Fijian Dollar + * `FIM` - Finnish Markka + * `FRF` - French Franc + * `XFO` - French Gold Franc + * `XFU` - French UIC-Franc + * `GMD` - Gambian Dalasi + * `GEK` - Georgian Kupon Larit + * `GEL` - Georgian Lari + * `DEM` - German Mark + * `GHS` - Ghanaian Cedi + * `GHC` - Ghanaian Cedi (1979–2007) + * `GIP` - Gibraltar Pound + * `XAU` - Gold + * `GRD` - Greek Drachma + * `GTQ` - Guatemalan Quetzal + * `GWP` - Guinea-Bissau Peso + * `GNF` - Guinean Franc + * `GNS` - Guinean Syli + * `GYD` - Guyanaese Dollar + * `HTG` - Haitian Gourde + * `HNL` - Honduran Lempira + * `HKD` - Hong Kong Dollar + * `HUF` - Hungarian Forint + * `IMP` - IMP + * `ISK` - Icelandic Króna + * `ISJ` - Icelandic Króna (1918–1981) + * `INR` - Indian Rupee + * `IDR` - Indonesian Rupiah + * `IRR` - Iranian Rial + * `IQD` - Iraqi Dinar + * `IEP` - Irish Pound + * `ILS` - Israeli New Shekel + * `ILP` - Israeli Pound + * `ILR` - Israeli Shekel (1980–1985) + * `ITL` - Italian Lira + * `JMD` - Jamaican Dollar + * `JPY` - Japanese Yen + * `JOD` - Jordanian Dinar + * `KZT` - Kazakhstani Tenge + * `KES` - Kenyan Shilling + * `KWD` - Kuwaiti Dinar + * `KGS` - Kyrgystani Som + * `LAK` - Laotian Kip + * `LVL` - Latvian Lats + * `LVR` - Latvian Ruble + * `LBP` - Lebanese Pound + * `LSL` - Lesotho Loti + * `LRD` - Liberian Dollar + * `LYD` - Libyan Dinar + * `LTL` - Lithuanian Litas + * `LTT` - Lithuanian Talonas + * `LUL` - Luxembourg Financial Franc + * `LUC` - Luxembourgian Convertible Franc + * `LUF` - Luxembourgian Franc + * `MOP` - Macanese Pataca + * `MKD` - Macedonian Denar + * `MKN` - Macedonian Denar (1992–1993) + * `MGA` - Malagasy Ariary + * `MGF` - Malagasy Franc + * `MWK` - Malawian Kwacha + * `MYR` - Malaysian Ringgit + * `MVR` - Maldivian Rufiyaa + * `MVP` - Maldivian Rupee (1947–1981) + * `MLF` - Malian Franc + * `MTL` - Maltese Lira + * `MTP` - Maltese Pound + * `MRU` - Mauritanian Ouguiya + * `MRO` - Mauritanian Ouguiya (1973–2017) + * `MUR` - Mauritian Rupee + * `MXV` - Mexican Investment Unit + * `MXN` - Mexican Peso + * `MXP` - Mexican Silver Peso (1861–1992) + * `MDC` - Moldovan Cupon + * `MDL` - Moldovan Leu + * `MCF` - Monegasque Franc + * `MNT` - Mongolian Tugrik + * `MAD` - Moroccan Dirham + * `MAF` - Moroccan Franc + * `MZE` - Mozambican Escudo + * `MZN` - Mozambican Metical + * `MZM` - Mozambican Metical (1980–2006) + * `MMK` - Myanmar Kyat + * `NAD` - Namibian Dollar + * `NPR` - Nepalese Rupee + * `ANG` - Netherlands Antillean Guilder + * `TWD` - New Taiwan Dollar + * `NZD` - New Zealand Dollar + * `NIO` - Nicaraguan Córdoba + * `NIC` - Nicaraguan Córdoba (1988–1991) + * `NGN` - Nigerian Naira + * `KPW` - North Korean Won + * `NOK` - Norwegian Krone + * `OMR` - Omani Rial + * `PKR` - Pakistani Rupee + * `XPD` - Palladium + * `PAB` - Panamanian Balboa + * `PGK` - Papua New Guinean Kina + * `PYG` - Paraguayan Guarani + * `PEI` - Peruvian Inti + * `PEN` - Peruvian Sol + * `PES` - Peruvian Sol (1863–1965) + * `PHP` - Philippine Peso + * `XPT` - Platinum + * `PLN` - Polish Zloty + * `PLZ` - Polish Zloty (1950–1995) + * `PTE` - Portuguese Escudo + * `GWE` - Portuguese Guinea Escudo + * `QAR` - Qatari Rial + * `XRE` - RINET Funds + * `RHD` - Rhodesian Dollar + * `RON` - Romanian Leu + * `ROL` - Romanian Leu (1952–2006) + * `RUB` - Russian Ruble + * `RUR` - Russian Ruble (1991–1998) + * `RWF` - Rwandan Franc + * `SVC` - Salvadoran Colón + * `WST` - Samoan Tala + * `SAR` - Saudi Riyal + * `RSD` - Serbian Dinar + * `CSD` - Serbian Dinar (2002–2006) + * `SCR` - Seychellois Rupee + * `SLL` - Sierra Leonean Leone + * `XAG` - Silver + * `SGD` - Singapore Dollar + * `SKK` - Slovak Koruna + * `SIT` - Slovenian Tolar + * `SBD` - Solomon Islands Dollar + * `SOS` - Somali Shilling + * `ZAR` - South African Rand + * `ZAL` - South African Rand (financial) + * `KRH` - South Korean Hwan (1953–1962) + * `KRW` - South Korean Won + * `KRO` - South Korean Won (1945–1953) + * `SSP` - South Sudanese Pound + * `SUR` - Soviet Rouble + * `ESP` - Spanish Peseta + * `ESA` - Spanish Peseta (A account) + * `ESB` - Spanish Peseta (convertible account) + * `XDR` - Special Drawing Rights + * `LKR` - Sri Lankan Rupee + * `SHP` - St. Helena Pound + * `XSU` - Sucre + * `SDD` - Sudanese Dinar (1992–2007) + * `SDG` - Sudanese Pound + * `SDP` - Sudanese Pound (1957–1998) + * `SRD` - Surinamese Dollar + * `SRG` - Surinamese Guilder + * `SZL` - Swazi Lilangeni + * `SEK` - Swedish Krona + * `CHF` - Swiss Franc + * `SYP` - Syrian Pound + * `STN` - São Tomé & Príncipe Dobra + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + * `TVD` - TVD + * `TJR` - Tajikistani Ruble + * `TJS` - Tajikistani Somoni + * `TZS` - Tanzanian Shilling + * `XTS` - Testing Currency Code + * `THB` - Thai Baht + * `XXX` - The codes assigned for transactions where no currency is involved + * `TPE` - Timorese Escudo + * `TOP` - Tongan Paʻanga + * `TTD` - Trinidad & Tobago Dollar + * `TND` - Tunisian Dinar + * `TRY` - Turkish Lira + * `TRL` - Turkish Lira (1922–2005) + * `TMT` - Turkmenistani Manat + * `TMM` - Turkmenistani Manat (1993–2009) + * `USD` - US Dollar + * `USN` - US Dollar (Next day) + * `USS` - US Dollar (Same day) + * `UGX` - Ugandan Shilling + * `UGS` - Ugandan Shilling (1966–1987) + * `UAH` - Ukrainian Hryvnia + * `UAK` - Ukrainian Karbovanets + * `AED` - United Arab Emirates Dirham + * `UYW` - Uruguayan Nominal Wage Index Unit + * `UYU` - Uruguayan Peso + * `UYP` - Uruguayan Peso (1975–1993) + * `UYI` - Uruguayan Peso (Indexed Units) + * `UZS` - Uzbekistani Som + * `VUV` - Vanuatu Vatu + * `VES` - Venezuelan Bolívar + * `VEB` - Venezuelan Bolívar (1871–2008) + * `VEF` - Venezuelan Bolívar (2008–2018) + * `VND` - Vietnamese Dong + * `VNN` - Vietnamese Dong (1978–1985) + * `CHE` - WIR Euro + * `CHW` - WIR Franc + * `XOF` - West African CFA Franc + * `YDD` - Yemeni Dinar + * `YER` - Yemeni Rial + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + * `YUM` - Yugoslavian New Dinar (1994–2002) + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + * `ZWN` - ZWN + * `ZRN` - Zairean New Zaire (1993–1998) + * `ZRZ` - Zairean Zaire (1971–1993) + * `ZMW` - Zambian Kwacha + * `ZMK` - Zambian Kwacha (1968–2012) + * `ZWD` - Zimbabwean Dollar (1980–2008) + * `ZWR` - Zimbabwean Dollar (2008) + * `ZWL` - Zimbabwean Dollar (2009) + example: USD + exchange_rate: + type: string + format: decimal + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + nullable: true + description: The expense's exchange rate. + example: '2.9' + inclusive_of_tax: + type: boolean + nullable: true + description: If the transaction is inclusive or exclusive of tax. `True` + if inclusive, `False` if exclusive. + company: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/CompanyInfo' + nullable: true + description: The company the expense belongs to. + example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + x-merge-expands-to: CompanyInfo + employee: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Employee' + nullable: true + description: The employee this overall transaction relates to. + example: 7442f0d5-722d-45bd-b807-6e38489d37fe + x-merge-expands-to: Employee + memo: + type: string + nullable: true + description: The expense's private note. + example: New employee supplies + lines: + type: array + items: + $ref: '#/components/schemas/ExpenseLineRequest' + example: + - remote_id: '121222' + net_amount: 25.54 + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + project: 22e65a5d-2df5-4e6e-884a-e538d0339000 + employee: 7442f0d5-722d-45bd-b807-6e38489d37fe + item: b38c59b0-a9d7-4740-b1ee-5436c6751e3d + account: 2a56344a-a491-11ec-b909-0242ac120002 + contact: c640b80b-fac9-409f-aa19-1f9221aec445 + description: MacBook Pro + exchange_rate: '2.9' + remote_was_deleted: false + - remote_id: '121223' + net_amount: 10 + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + item: b38c59b0-a9d7-4740-b1ee-5436c6751e3d + account: 2a56344a-a491-11ec-b909-0242ac120002 + description: Desk Lamp + tracking_categories: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/TrackingCategory' + nullable: true + example: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + x-merge-expands-to: TrackingCategory + accounting_period: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/AccountingPeriod' + nullable: true + description: The accounting period that the Expense was generated in. + example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + x-merge-expands-to: AccountingPeriod + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + remote_fields: + type: array + items: + $ref: '#/components/schemas/RemoteFieldRequest' + writeOnly: true + x-merge-expands: '{"account": "Account", "accounting_period": "AccountingPeriod", + "company": "CompanyInfo", "contact": "Contact", "employee": "Employee", "tracking_categories": + "TrackingCategory"}' + x-merge-category: accounting + ExpenseResponse: + type: object + properties: + model: + $ref: '#/components/schemas/Expense' + warnings: + type: array + items: + $ref: '#/components/schemas/WarningValidationProblem' + errors: + type: array + items: + $ref: '#/components/schemas/ErrorValidationProblem' + logs: + type: array + items: + $ref: '#/components/schemas/DebugModeLog' + required: + - errors + - model + - warnings + x-merge-category: accounting + ExternalTargetFieldAPI: + type: object + properties: + name: + type: string + nullable: true + readOnly: true + example: example_target_field_name + description: + type: string + nullable: true + readOnly: true + example: this is a example description of a target field + is_mapped: + type: string + nullable: true + readOnly: true + example: true + x-merge-category: accounting + ExternalTargetFieldAPIResponse: + type: object + properties: + Account: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + AccountingAttachment: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + BalanceSheet: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + CashFlowStatement: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + CompanyInfo: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + Contact: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + IncomeStatement: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + CreditNote: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + Item: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + PurchaseOrder: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + TrackingCategory: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + JournalEntry: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + TaxRate: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + Invoice: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + Payment: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + Expense: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + VendorCredit: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + Transaction: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + AccountingPeriod: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + GeneralLedgerTransaction: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + BankFeedAccount: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + Employee: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + PaymentMethod: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + Project: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + PaymentTerm: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + x-merge-category: accounting + FeedStatusEnum: + enum: + - ACTIVE + - INACTIVE + type: string + description: |- + * `ACTIVE` - ACTIVE + * `INACTIVE` - INACTIVE + x-merge-category: accounting + FieldFormatEnum: + enum: + - string + - number + - date + - datetime + - bool + - list + type: string + description: |- + * `string` - string + * `number` - number + * `date` - date + * `datetime` - datetime + * `bool` - bool + * `list` - list + x-merge-category: accounting + FieldMappingApiInstance: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: + type: boolean + readOnly: true + target_field: + type: object + properties: + name: + type: string + description: + type: string + is_organization_wide: + type: boolean + required: + - description + - is_organization_wide + - name + nullable: true + readOnly: true + example: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + type: object + properties: + remote_key_name: + type: string + nullable: true + schema: + type: object + additionalProperties: {} + nullable: true + remote_endpoint_info: + type: object + properties: + method: + type: string + nullable: true + url_path: + type: string + nullable: true + field_traversal_path: + type: array + items: + type: string + nullable: true + required: + - field_traversal_path + - method + - url_path + required: + - remote_endpoint_info + - remote_key_name + - schema + nullable: true + readOnly: true + example: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + x-merge-category: accounting + FieldMappingApiInstanceResponse: + type: object + properties: + Account: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + AccountingAttachment: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + BalanceSheet: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + CashFlowStatement: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + CompanyInfo: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + Contact: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + IncomeStatement: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + CreditNote: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + Item: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + PurchaseOrder: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + TrackingCategory: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + JournalEntry: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + TaxRate: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + Invoice: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + Payment: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + Expense: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + VendorCredit: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + Transaction: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + AccountingPeriod: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + GeneralLedgerTransaction: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + BankFeedAccount: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + Employee: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + PaymentMethod: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + Project: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + PaymentTerm: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + x-merge-category: accounting + FieldMappingInstanceResponse: + type: object + properties: + model: + $ref: '#/components/schemas/FieldMappingApiInstance' + warnings: + type: array + items: + $ref: '#/components/schemas/WarningValidationProblem' + errors: + type: array + items: + $ref: '#/components/schemas/ErrorValidationProblem' + logs: + type: array + items: + $ref: '#/components/schemas/DebugModeLog' + required: + - errors + - model + - warnings + x-merge-category: accounting + FieldPermissionDeserializer: + type: object + properties: + enabled_fields: + type: array + items: {} + disabled_fields: + type: array + items: {} + x-merge-category: accounting + FieldPermissionDeserializerRequest: + type: object + properties: + enabled_fields: + type: array + items: {} + disabled_fields: + type: array + items: {} + x-merge-category: accounting + FieldTypeEnum: + enum: + - string + - number + - date + - datetime + - bool + - list + type: string + description: |- + * `string` - string + * `number` - number + * `date` - date + * `datetime` - datetime + * `bool` - bool + * `list` - list + x-merge-category: accounting + GeneralLedgerTransaction: + type: object + description: |- + # The GeneralLedgerTransaction Object + ### Description + A General Ledger Entry is a record of a financial transaction that is posted to the general ledger, the central repository of a company’s financial data. + + The `GeneralLedgerTransaction` object is a singular endpoint to pull all transactions posted to a company’s general ledger. The transaction that generated the `GeneralLedgerTransaction` can be found by referencing the `underlying_transaction_type` and `underlying_transaction_remote_id` fields. + + The lines of a `GeneralLedgerTransaction` object will always have equal amounts of debits and credits. + + ### Usage Example + Fetch from the `GET GeneralLedgerTransaction` endpoint and view a general ledger transaction. + properties: + id: + type: string + format: uuid + readOnly: true + example: b26fd49a-cbae-470a-a8f8-bcbc119e0390 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '987300' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + underlying_transaction_remote_id: + type: string + nullable: true + description: The third party remote ID of the underlying transaction. + maxLength: 50 + example: '1234' + underlying_transaction_type: + oneOf: + - $ref: '#/components/schemas/UnderlyingTransactionTypeEnum' + - type: string + nullable: true + description: |- + The type of the underlying transaction. + + * `INVOICE` - INVOICE + * `EXPENSE` - EXPENSE + * `TRANSACTION` - TRANSACTION + * `JOURNAL_ENTRY` - JOURNAL_ENTRY + * `PAYMENT` - PAYMENT + * `VENDOR_CREDIT` - VENDOR_CREDIT + * `CREDIT_NOTE` - CREDIT_NOTE + example: INVOICE + accounting_period: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/AccountingPeriod' + nullable: true + description: The accounting period that the GeneralLedgerTransaction was + generated in. + example: d6e687d6-0c36-48a1-8114-35324b5cb38f + x-merge-expands-to: AccountingPeriod + company: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/CompanyInfo' + nullable: true + description: The company the GeneralLedgerTransaction belongs to. + example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + x-merge-expands-to: CompanyInfo + remote_updated_at: + type: string + format: date-time + nullable: true + description: When the third party's GeneralLedgerTransaction entry was updated. + example: '2020-03-31T00:00:00Z' + remote_created_at: + type: string + format: date-time + nullable: true + description: When the third party's GeneralLedgerTransaction entry was created. + example: '2020-03-31T00:00:00Z' + tracking_categories: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/TrackingCategory' + nullable: true + example: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + x-merge-expands-to: TrackingCategory + posting_date: + type: string + format: date-time + nullable: true + description: The date that the transaction was posted to the general ledger. + example: '2020-03-31T00:00:00Z' + general_ledger_transaction_lines: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/GeneralLedgerTransactionLine' + readOnly: true + example: + - remote_id: '123' + account: a47e11b6-c73b-4a0c-be31-130fc48177fa + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + contact: d6e687d6-0c36-48a1-8114-35324b5cb38f + base_currency: USD + transaction_currency: USD + description: Invoice created + exchange_rate: 1 + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + debit_amount: 0 + crebit_amount: 123.5 + item: a47e11b6-c73b-4a0c-be31-130fc48177fa + foreign_debit_amount: 0 + foreign_credit_amount: 123.5 + remote_was_deleted: false + remote_data: + - path: /actions + data: + - Varies by platform + description: A list of “General Ledger Transaction Applied to Lines” objects. + x-merge-expands-to: GeneralLedgerTransactionLine + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + x-merge-expands: '{"accounting_period": "AccountingPeriod", "company": "CompanyInfo", + "general_ledger_transaction_lines": "GeneralLedgerTransactionLine", "tracking_categories": + "TrackingCategory"}' + x-merge-category: accounting + GeneralLedgerTransactionLine: + type: object + description: |- + # The GeneralLedgerTransactionLineSerializer Object + ### Description + The `GeneralLedgerTransactionLineSerializer` object represents general ledger transaction line item. + + ### Usage Example Fetch from the `GET GeneralLedgerTransactionLineSerializer` endpoint and view an + `GeneralLedgerTransaction` line item. + properties: + id: + type: string + format: uuid + readOnly: true + example: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '123' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + account: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Account' + nullable: true + example: a47e11b6-c73b-4a0c-be31-130fc48177fa + x-merge-expands-to: Account + company: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/CompanyInfo' + nullable: true + description: The company the GeneralLedgerTransaction belongs to. + example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + x-merge-expands-to: CompanyInfo + employee: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Employee' + nullable: true + example: 7442f0d5-722d-45bd-b807-6e38489d37fe + x-merge-expands-to: Employee + contact: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Contact' + nullable: true + example: d6e687d6-0c36-48a1-8114-35324b5cb38f + x-merge-expands-to: Contact + project: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Project' + nullable: true + example: 22e65a5d-2df5-4e6e-884a-e538d0339000 + x-merge-expands-to: Project + base_currency: + oneOf: + - $ref: '#/components/schemas/TransactionCurrencyEnum' + = type: string + nullable: true + description: |- + The base currency of the transaction + + * `XUA` - ADB Unit of Account + * `AFN` - Afghan Afghani + * `AFA` - Afghan Afghani (1927–2002) + * `ALL` - Albanian Lek + * `ALK` - Albanian Lek (1946–1965) + * `DZD` - Algerian Dinar + * `ADP` - Andorran Peseta + * `AOA` - Angolan Kwanza + * `AOK` - Angolan Kwanza (1977–1991) + * `AON` - Angolan New Kwanza (1990–2000) + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + * `ARA` - Argentine Austral + * `ARS` - Argentine Peso + * `ARM` - Argentine Peso (1881–1970) + * `ARP` - Argentine Peso (1983–1985) + * `ARL` - Argentine Peso Ley (1970–1983) + * `AMD` - Armenian Dram + * `AWG` - Aruban Florin + * `AUD` - Australian Dollar + * `ATS` - Austrian Schilling + * `AZN` - Azerbaijani Manat + * `AZM` - Azerbaijani Manat (1993–2006) + * `BSD` - Bahamian Dollar + * `BHD` - Bahraini Dinar + * `BDT` - Bangladeshi Taka + * `BBD` - Barbadian Dollar + * `BYN` - Belarusian Ruble + * `BYB` - Belarusian Ruble (1994–1999) + * `BYR` - Belarusian Ruble (2000–2016) + * `BEF` - Belgian Franc + * `BEC` - Belgian Franc (convertible) + * `BEL` - Belgian Franc (financial) + * `BZD` - Belize Dollar + * `BMD` - Bermudan Dollar + * `BTN` - Bhutanese Ngultrum + * `BOB` - Bolivian Boliviano + * `BOL` - Bolivian Boliviano (1863–1963) + * `BOV` - Bolivian Mvdol + * `BOP` - Bolivian Peso + * `BAM` - Bosnia-Herzegovina Convertible Mark + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + * `BWP` - Botswanan Pula + * `BRC` - Brazilian Cruzado (1986–1989) + * `BRZ` - Brazilian Cruzeiro (1942–1967) + * `BRE` - Brazilian Cruzeiro (1990–1993) + * `BRR` - Brazilian Cruzeiro (1993–1994) + * `BRN` - Brazilian New Cruzado (1989–1990) + * `BRB` - Brazilian New Cruzeiro (1967–1986) + * `BRL` - Brazilian Real + * `GBP` - British Pound + * `BND` - Brunei Dollar + * `BGL` - Bulgarian Hard Lev + * `BGN` - Bulgarian Lev + * `BGO` - Bulgarian Lev (1879–1952) + * `BGM` - Bulgarian Socialist Lev + * `BUK` - Burmese Kyat + * `BIF` - Burundian Franc + * `XPF` - CFP Franc + * `KHR` - Cambodian Riel + * `CAD` - Canadian Dollar + * `CVE` - Cape Verdean Escudo + * `KYD` - Cayman Islands Dollar + * `XAF` - Central African CFA Franc + * `CLE` - Chilean Escudo + * `CLP` - Chilean Peso + * `CLF` - Chilean Unit of Account (UF) + * `CNX` - Chinese People’s Bank Dollar + * `CNY` - Chinese Yuan + * `CNH` - Chinese Yuan (offshore) + * `COP` - Colombian Peso + * `COU` - Colombian Real Value Unit + * `KMF` - Comorian Franc + * `CDF` - Congolese Franc + * `CRC` - Costa Rican Colón + * `HRD` - Croatian Dinar + * `HRK` - Croatian Kuna + * `CUC` - Cuban Convertible Peso + * `CUP` - Cuban Peso + * `CYP` - Cypriot Pound + * `CZK` - Czech Koruna + * `CSK` - Czechoslovak Hard Koruna + * `DKK` - Danish Krone + * `DJF` - Djiboutian Franc + * `DOP` - Dominican Peso + * `NLG` - Dutch Guilder + * `XCD` - East Caribbean Dollar + * `DDM` - East German Mark + * `ECS` - Ecuadorian Sucre + * `ECV` - Ecuadorian Unit of Constant Value + * `EGP` - Egyptian Pound + * `GQE` - Equatorial Guinean Ekwele + * `ERN` - Eritrean Nakfa + * `EEK` - Estonian Kroon + * `ETB` - Ethiopian Birr + * `EUR` - Euro + * `XBA` - European Composite Unit + * `XEU` - European Currency Unit + * `XBB` - European Monetary Unit + * `XBC` - European Unit of Account (XBC) + * `XBD` - European Unit of Account (XBD) + * `FKP` - Falkland Islands Pound + * `FJD` - Fijian Dollar + * `FIM` - Finnish Markka + * `FRF` - French Franc + * `XFO` - French Gold Franc + * `XFU` - French UIC-Franc + * `GMD` - Gambian Dalasi + * `GEK` - Georgian Kupon Larit + * `GEL` - Georgian Lari + * `DEM` - German Mark + * `GHS` - Ghanaian Cedi + * `GHC` - Ghanaian Cedi (1979–2007) + * `GIP` - Gibraltar Pound + * `XAU` - Gold + * `GRD` - Greek Drachma + * `GTQ` - Guatemalan Quetzal + * `GWP` - Guinea-Bissau Peso + * `GNF` - Guinean Franc + * `GNS` - Guinean Syli + * `GYD` - Guyanaese Dollar + * `HTG` - Haitian Gourde + * `HNL` - Honduran Lempira + * `HKD` - Hong Kong Dollar + * `HUF` - Hungarian Forint + * `IMP` - IMP + * `ISK` - Icelandic Króna + * `ISJ` - Icelandic Króna (1918–1981) + * `INR` - Indian Rupee + * `IDR` - Indonesian Rupiah + * `IRR` - Iranian Rial + * `IQD` - Iraqi Dinar + * `IEP` - Irish Pound + * `ILS` - Israeli New Shekel + * `ILP` - Israeli Pound + * `ILR` - Israeli Shekel (1980–1985) + * `ITL` - Italian Lira + * `JMD` - Jamaican Dollar + * `JPY` - Japanese Yen + * `JOD` - Jordanian Dinar + * `KZT` - Kazakhstani Tenge + * `KES` - Kenyan Shilling + * `KWD` - Kuwaiti Dinar + * `KGS` - Kyrgystani Som + * `LAK` - Laotian Kip + * `LVL` - Latvian Lats + * `LVR` - Latvian Ruble + * `LBP` - Lebanese Pound + * `LSL` - Lesotho Loti + * `LRD` - Liberian Dollar + * `LYD` - Libyan Dinar + * `LTL` - Lithuanian Litas + * `LTT` - Lithuanian Talonas + * `LUL` - Luxembourg Financial Franc + * `LUC` - Luxembourgian Convertible Franc + * `LUF` - Luxembourgian Franc + * `MOP` - Macanese Pataca + * `MKD` - Macedonian Denar + * `MKN` - Macedonian Denar (1992–1993) + * `MGA` - Malagasy Ariary + * `MGF` - Malagasy Franc + * `MWK` - Malawian Kwacha + * `MYR` - Malaysian Ringgit + * `MVR` - Maldivian Rufiyaa + * `MVP` - Maldivian Rupee (1947–1981) + * `MLF` - Malian Franc + * `MTL` - Maltese Lira + * `MTP` - Maltese Pound + * `MRU` - Mauritanian Ouguiya + * `MRO` - Mauritanian Ouguiya (1973–2017) + * `MUR` - Mauritian Rupee + * `MXV` - Mexican Investment Unit + * `MXN` - Mexican Peso + * `MXP` - Mexican Silver Peso (1861–1992) + * `MDC` - Moldovan Cupon + * `MDL` - Moldovan Leu + * `MCF` - Monegasque Franc + * `MNT` - Mongolian Tugrik + * `MAD` - Moroccan Dirham + * `MAF` - Moroccan Franc + * `MZE` - Mozambican Escudo + * `MZN` - Mozambican Metical + * `MZM` - Mozambican Metical (1980–2006) + * `MMK` - Myanmar Kyat + * `NAD` - Namibian Dollar + * `NPR` - Nepalese Rupee + * `ANG` - Netherlands Antillean Guilder + * `TWD` - New Taiwan Dollar + * `NZD` - New Zealand Dollar + * `NIO` - Nicaraguan Córdoba + * `NIC` - Nicaraguan Córdoba (1988–1991) + * `NGN` - Nigerian Naira + * `KPW` - North Korean Won + * `NOK` - Norwegian Krone + * `OMR` - Omani Rial + * `PKR` - Pakistani Rupee + * `XPD` - Palladium + * `PAB` - Panamanian Balboa + * `PGK` - Papua New Guinean Kina + * `PYG` - Paraguayan Guarani + * `PEI` - Peruvian Inti + * `PEN` - Peruvian Sol + * `PES` - Peruvian Sol (1863–1965) + * `PHP` - Philippine Peso + * `XPT` - Platinum + * `PLN` - Polish Zloty + * `PLZ` - Polish Zloty (1950–1995) + * `PTE` - Portuguese Escudo + * `GWE` - Portuguese Guinea Escudo + * `QAR` - Qatari Rial + * `XRE` - RINET Funds + * `RHD` - Rhodesian Dollar + * `RON` - Romanian Leu + * `ROL` - Romanian Leu (1952–2006) + * `RUB` - Russian Ruble + * `RUR` - Russian Ruble (1991–1998) + * `RWF` - Rwandan Franc + * `SVC` - Salvadoran Colón + * `WST` - Samoan Tala + * `SAR` - Saudi Riyal + * `RSD` - Serbian Dinar + * `CSD` - Serbian Dinar (2002–2006) + * `SCR` - Seychellois Rupee + * `SLL` - Sierra Leonean Leone + * `XAG` - Silver + * `SGD` - Singapore Dollar + * `SKK` - Slovak Koruna + * `SIT` - Slovenian Tolar + * `SBD` - Solomon Islands Dollar + * `SOS` - Somali Shilling + * `ZAR` - South African Rand + * `ZAL` - South African Rand (financial) + * `KRH` - South Korean Hwan (1953–1962) + * `KRW` - South Korean Won + * `KRO` - South Korean Won (1945–1953) + * `SSP` - South Sudanese Pound + * `SUR` - Soviet Rouble + * `ESP` - Spanish Peseta + * `ESA` - Spanish Peseta (A account) + * `ESB` - Spanish Peseta (convertible account) + * `XDR` - Special Drawing Rights + * `LKR` - Sri Lankan Rupee + * `SHP` - St. Helena Pound + * `XSU` - Sucre + * `SDD` - Sudanese Dinar (1992–2007) + * `SDG` - Sudanese Pound + * `SDP` - Sudanese Pound (1957–1998) + * `SRD` - Surinamese Dollar + * `SRG` - Surinamese Guilder + * `SZL` - Swazi Lilangeni + * `SEK` - Swedish Krona + * `CHF` - Swiss Franc + * `SYP` - Syrian Pound + * `STN` - São Tomé & Príncipe Dobra + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + * `TVD` - TVD + * `TJR` - Tajikistani Ruble + * `TJS` - Tajikistani Somoni + * `TZS` - Tanzanian Shilling + * `XTS` - Testing Currency Code + * `THB` - Thai Baht + * `XXX` - The codes assigned for transactions where no currency is involved + * `TPE` - Timorese Escudo + * `TOP` - Tongan Paʻanga + * `TTD` - Trinidad & Tobago Dollar + * `TND` - Tunisian Dinar + * `TRY` - Turkish Lira + * `TRL` - Turkish Lira (1922–2005) + * `TMT` - Turkmenistani Manat + * `TMM` - Turkmenistani Manat (1993–2009) + * `USD` - US Dollar + * `USN` - US Dollar (Next day) + * `USS` - US Dollar (Same day) + * `UGX` - Ugandan Shilling + * `UGS` - Ugandan Shilling (1966–1987) + * `UAH` - Ukrainian Hryvnia + * `UAK` - Ukrainian Karbovanets + * `AED` - United Arab Emirates Dirham + * `UYW` - Uruguayan Nominal Wage Index Unit + * `UYU` - Uruguayan Peso + * `UYP` - Uruguayan Peso (1975–1993) + * `UYI` - Uruguayan Peso (Indexed Units) + * `UZS` - Uzbekistani Som + * `VUV` - Vanuatu Vatu + * `VES` - Venezuelan Bolívar + * `VEB` - Venezuelan Bolívar (1871–2008) + * `VEF` - Venezuelan Bolívar (2008–2018) + * `VND` - Vietnamese Dong + * `VNN` - Vietnamese Dong (1978–1985) + * `CHE` - WIR Euro + * `CHW` - WIR Franc + * `XOF` - West African CFA Franc + * `YDD` - Yemeni Dinar + * `YER` - Yemeni Rial + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + * `YUM` - Yugoslavian New Dinar (1994–2002) + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + * `ZWN` - ZWN + * `ZRN` - Zairean New Zaire (1993–1998) + * `ZRZ` - Zairean Zaire (1971–1993) + * `ZMW` - Zambian Kwacha + * `ZMK` - Zambian Kwacha (1968–2012) + * `ZWD` - Zimbabwean Dollar (1980–2008) + * `ZWR` - Zimbabwean Dollar (2008) + * `ZWL` - Zimbabwean Dollar (2009) + example: USD + transaction_currency: + oneOf: + - $ref: '#/components/schemas/TransactionCurrencyEnum' + - type: string + nullable: true + description: |- + The transaction currency that the transaction is made in. + + * `XUA` - ADB Unit of Account + * `AFN` - Afghan Afghani + * `AFA` - Afghan Afghani (1927–2002) + * `ALL` - Albanian Lek + * `ALK` - Albanian Lek (1946–1965) + * `DZD` - Algerian Dinar + * `ADP` - Andorran Peseta + * `AOA` - Angolan Kwanza + * `AOK` - Angolan Kwanza (1977–1991) + * `AON` - Angolan New Kwanza (1990–2000) + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + * `ARA` - Argentine Austral + * `ARS` - Argentine Peso + * `ARM` - Argentine Peso (1881–1970) + * `ARP` - Argentine Peso (1983–1985) + * `ARL` - Argentine Peso Ley (1970–1983) + * `AMD` - Armenian Dram + * `AWG` - Aruban Florin + * `AUD` - Australian Dollar + * `ATS` - Austrian Schilling + * `AZN` - Azerbaijani Manat + * `AZM` - Azerbaijani Manat (1993–2006) + * `BSD` - Bahamian Dollar + * `BHD` - Bahraini Dinar + * `BDT` - Bangladeshi Taka + * `BBD` - Barbadian Dollar + * `BYN` - Belarusian Ruble + * `BYB` - Belarusian Ruble (1994–1999) + * `BYR` - Belarusian Ruble (2000–2016) + * `BEF` - Belgian Franc + * `BEC` - Belgian Franc (convertible) + * `BEL` - Belgian Franc (financial) + * `BZD` - Belize Dollar + * `BMD` - Bermudan Dollar + * `BTN` - Bhutanese Ngultrum + * `BOB` - Bolivian Boliviano + * `BOL` - Bolivian Boliviano (1863–1963) + * `BOV` - Bolivian Mvdol + * `BOP` - Bolivian Peso + * `BAM` - Bosnia-Herzegovina Convertible Mark + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + * `BWP` - Botswanan Pula + * `BRC` - Brazilian Cruzado (1986–1989) + * `BRZ` - Brazilian Cruzeiro (1942–1967) + * `BRE` - Brazilian Cruzeiro (1990–1993) + * `BRR` - Brazilian Cruzeiro (1993–1994) + * `BRN` - Brazilian New Cruzado (1989–1990) + * `BRB` - Brazilian New Cruzeiro (1967–1986) + * `BRL` - Brazilian Real + * `GBP` - British Pound + * `BND` - Brunei Dollar + * `BGL` - Bulgarian Hard Lev + * `BGN` - Bulgarian Lev + * `BGO` - Bulgarian Lev (1879–1952) + * `BGM` - Bulgarian Socialist Lev + * `BUK` - Burmese Kyat + * `BIF` - Burundian Franc + * `XPF` - CFP Franc + * `KHR` - Cambodian Riel + * `CAD` - Canadian Dollar + * `CVE` - Cape Verdean Escudo + * `KYD` - Cayman Islands Dollar + * `XAF` - Central African CFA Franc + * `CLE` - Chilean Escudo + * `CLP` - Chilean Peso + * `CLF` - Chilean Unit of Account (UF) + * `CNX` - Chinese People’s Bank Dollar + * `CNY` - Chinese Yuan + * `CNH` - Chinese Yuan (offshore) + * `COP` - Colombian Peso + * `COU` - Colombian Real Value Unit + * `KMF` - Comorian Franc + * `CDF` - Congolese Franc + * `CRC` - Costa Rican Colón + * `HRD` - Croatian Dinar + * `HRK` - Croatian Kuna + * `CUC` - Cuban Convertible Peso + * `CUP` - Cuban Peso + * `CYP` - Cypriot Pound + * `CZK` - Czech Koruna + * `CSK` - Czechoslovak Hard Koruna + * `DKK` - Danish Krone + * `DJF` - Djiboutian Franc + * `DOP` - Dominican Peso + * `NLG` - Dutch Guilder + * `XCD` - East Caribbean Dollar + * `DDM` - East German Mark + * `ECS` - Ecuadorian Sucre + * `ECV` - Ecuadorian Unit of Constant Value + * `EGP` - Egyptian Pound + * `GQE` - Equatorial Guinean Ekwele + * `ERN` - Eritrean Nakfa + * `EEK` - Estonian Kroon + * `ETB` - Ethiopian Birr + * `EUR` - Euro + * `XBA` - European Composite Unit + * `XEU` - European Currency Unit + * `XBB` - European Monetary Unit + * `XBC` - European Unit of Account (XBC) + * `XBD` - European Unit of Account (XBD) + * `FKP` - Falkland Islands Pound + * `FJD` - Fijian Dollar + * `FIM` - Finnish Markka + * `FRF` - French Franc + * `XFO` - French Gold Franc + * `XFU` - French UIC-Franc + * `GMD` - Gambian Dalasi + * `GEK` - Georgian Kupon Larit + * `GEL` - Georgian Lari + * `DEM` - German Mark + * `GHS` - Ghanaian Cedi + * `GHC` - Ghanaian Cedi (1979–2007) + * `GIP` - Gibraltar Pound + * `XAU` - Gold + * `GRD` - Greek Drachma + * `GTQ` - Guatemalan Quetzal + * `GWP` - Guinea-Bissau Peso + * `GNF` - Guinean Franc + * `GNS` - Guinean Syli + * `GYD` - Guyanaese Dollar + * `HTG` - Haitian Gourde + * `HNL` - Honduran Lempira + * `HKD` - Hong Kong Dollar + * `HUF` - Hungarian Forint + * `IMP` - IMP + * `ISK` - Icelandic Króna + * `ISJ` - Icelandic Króna (1918–1981) + * `INR` - Indian Rupee + * `IDR` - Indonesian Rupiah + * `IRR` - Iranian Rial + * `IQD` - Iraqi Dinar + * `IEP` - Irish Pound + * `ILS` - Israeli New Shekel + * `ILP` - Israeli Pound + * `ILR` - Israeli Shekel (1980–1985) + * `ITL` - Italian Lira + * `JMD` - Jamaican Dollar + * `JPY` - Japanese Yen + * `JOD` - Jordanian Dinar + * `KZT` - Kazakhstani Tenge + * `KES` - Kenyan Shilling + * `KWD` - Kuwaiti Dinar + * `KGS` - Kyrgystani Som + * `LAK` - Laotian Kip + * `LVL` - Latvian Lats + * `LVR` - Latvian Ruble + * `LBP` - Lebanese Pound + * `LSL` - Lesotho Loti + * `LRD` - Liberian Dollar + * `LYD` - Libyan Dinar + * `LTL` - Lithuanian Litas + * `LTT` - Lithuanian Talonas + * `LUL` - Luxembourg Financial Franc + * `LUC` - Luxembourgian Convertible Franc + * `LUF` - Luxembourgian Franc + * `MOP` - Macanese Pataca + * `MKD` - Macedonian Denar + * `MKN` - Macedonian Denar (1992–1993) + * `MGA` - Malagasy Ariary + * `MGF` - Malagasy Franc + * `MWK` - Malawian Kwacha + * `MYR` - Malaysian Ringgit + * `MVR` - Maldivian Rufiyaa + * `MVP` - Maldivian Rupee (1947–1981) + * `MLF` - Malian Franc + * `MTL` - Maltese Lira + * `MTP` - Maltese Pound + * `MRU` - Mauritanian Ouguiya + * `MRO` - Mauritanian Ouguiya (1973–2017) + * `MUR` - Mauritian Rupee + * `MXV` - Mexican Investment Unit + * `MXN` - Mexican Peso + * `MXP` - Mexican Silver Peso (1861–1992) + * `MDC` - Moldovan Cupon + * `MDL` - Moldovan Leu + * `MCF` - Monegasque Franc + * `MNT` - Mongolian Tugrik + * `MAD` - Moroccan Dirham + * `MAF` - Moroccan Franc + * `MZE` - Mozambican Escudo + * `MZN` - Mozambican Metical + * `MZM` - Mozambican Metical (1980–2006) + * `MMK` - Myanmar Kyat + * `NAD` - Namibian Dollar + * `NPR` - Nepalese Rupee + * `ANG` - Netherlands Antillean Guilder + * `TWD` - New Taiwan Dollar + * `NZD` - New Zealand Dollar + * `NIO` - Nicaraguan Córdoba + * `NIC` - Nicaraguan Córdoba (1988–1991) + * `NGN` - Nigerian Naira + * `KPW` - North Korean Won + * `NOK` - Norwegian Krone + * `OMR` - Omani Rial + * `PKR` - Pakistani Rupee + * `XPD` - Palladium + * `PAB` - Panamanian Balboa + * `PGK` - Papua New Guinean Kina + * `PYG` - Paraguayan Guarani + * `PEI` - Peruvian Inti + * `PEN` - Peruvian Sol + * `PES` - Peruvian Sol (1863–1965) + * `PHP` - Philippine Peso + * `XPT` - Platinum + * `PLN` - Polish Zloty + * `PLZ` - Polish Zloty (1950–1995) + * `PTE` - Portuguese Escudo + * `GWE` - Portuguese Guinea Escudo + * `QAR` - Qatari Rial + * `XRE` - RINET Funds + * `RHD` - Rhodesian Dollar + * `RON` - Romanian Leu + * `ROL` - Romanian Leu (1952–2006) + * `RUB` - Russian Ruble + * `RUR` - Russian Ruble (1991–1998) + * `RWF` - Rwandan Franc + * `SVC` - Salvadoran Colón + * `WST` - Samoan Tala + * `SAR` - Saudi Riyal + * `RSD` - Serbian Dinar + * `CSD` - Serbian Dinar (2002–2006) + * `SCR` - Seychellois Rupee + * `SLL` - Sierra Leonean Leone + * `XAG` - Silver + * `SGD` - Singapore Dollar + * `SKK` - Slovak Koruna + * `SIT` - Slovenian Tolar + * `SBD` - Solomon Islands Dollar + * `SOS` - Somali Shilling + * `ZAR` - South African Rand + * `ZAL` - South African Rand (financial) + * `KRH` - South Korean Hwan (1953–1962) + * `KRW` - South Korean Won + * `KRO` - South Korean Won (1945–1953) + * `SSP` - South Sudanese Pound + * `SUR` - Soviet Rouble + * `ESP` - Spanish Peseta + * `ESA` - Spanish Peseta (A account) + * `ESB` - Spanish Peseta (convertible account) + * `XDR` - Special Drawing Rights + * `LKR` - Sri Lankan Rupee + * `SHP` - St. Helena Pound + * `XSU` - Sucre + * `SDD` - Sudanese Dinar (1992–2007) + * `SDG` - Sudanese Pound + * `SDP` - Sudanese Pound (1957–1998) + * `SRD` - Surinamese Dollar + * `SRG` - Surinamese Guilder + * `SZL` - Swazi Lilangeni + * `SEK` - Swedish Krona + * `CHF` - Swiss Franc + * `SYP` - Syrian Pound + * `STN` - São Tomé & Príncipe Dobra + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + * `TVD` - TVD + * `TJR` - Tajikistani Ruble + * `TJS` - Tajikistani Somoni + * `TZS` - Tanzanian Shilling + * `XTS` - Testing Currency Code + * `THB` - Thai Baht + * `XXX` - The codes assigned for transactions where no currency is involved + * `TPE` - Timorese Escudo + * `TOP` - Tongan Paʻanga + * `TTD` - Trinidad & Tobago Dollar + * `TND` - Tunisian Dinar + * `TRY` - Turkish Lira + * `TRL` - Turkish Lira (1922–2005) + * `TMT` - Turkmenistani Manat + * `TMM` - Turkmenistani Manat (1993–2009) + * `USD` - US Dollar + * `USN` - US Dollar (Next day) + * `USS` - US Dollar (Same day) + * `UGX` - Ugandan Shilling + * `UGS` - Ugandan Shilling (1966–1987) + * `UAH` - Ukrainian Hryvnia + * `UAK` - Ukrainian Karbovanets + * `AED` - United Arab Emirates Dirham + * `UYW` - Uruguayan Nominal Wage Index Unit + * `UYU` - Uruguayan Peso + * `UYP` - Uruguayan Peso (1975–1993) + * `UYI` - Uruguayan Peso (Indexed Units) + * `UZS` - Uzbekistani Som + * `VUV` - Vanuatu Vatu + * `VES` - Venezuelan Bolívar + * `VEB` - Venezuelan Bolívar (1871–2008) + * `VEF` - Venezuelan Bolívar (2008–2018) + * `VND` - Vietnamese Dong + * `VNN` - Vietnamese Dong (1978–1985) + * `CHE` - WIR Euro + * `CHW` - WIR Franc + * `XOF` - West African CFA Franc + * `YDD` - Yemeni Dinar + * `YER` - Yemeni Rial + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + * `YUM` - Yugoslavian New Dinar (1994–2002) + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + * `ZWN` - ZWN + * `ZRN` - Zairean New Zaire (1993–1998) + * `ZRZ` - Zairean Zaire (1971–1993) + * `ZMW` - Zambian Kwacha + * `ZMK` - Zambian Kwacha (1968–2012) + * `ZWD` - Zimbabwean Dollar (1980–2008) + * `ZWR` - Zimbabwean Dollar (2008) + * `ZWL` - Zimbabwean Dollar (2009) + example: USD + exchange_rate: + type: string + format: decimal + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + nullable: true + description: The exchange rate between the base currency and the transaction + currency. + example: 1 + description: + type: string + nullable: true + description: A description of the line item. + example: Invoice created + tracking_categories: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/TrackingCategory' + readOnly: true + example: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + debit_amount: + type: string + format: decimal + credit_amount: + type: string + format: decimal + item: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Item' + nullable: true + example: a47e11b6-c73b-4a0c-be31-130fc48177fa + x-merge-expands-to: Item + foreign_debit_amount: + type: string + format: decimal + foreign_credit_amount: + type: string + format: decimal + example: 123.5 + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + required: + - credit_amount + - debit_amount + - foreign_credit_amount + - foreign_debit_amount + x-merge-nested-write-allowed: true + x-merge-expands: '{"account": "Account", "company": "CompanyInfo", "contact": + "Contact", "employee": "Employee", "item": "Item", "project": "Project"}' + x-merge-category: accounting + GenerateRemoteKeyRequest: + type: object + description: |- + # The GenerateRemoteKey Object + ### Description + The `GenerateRemoteKey` object is used to represent a request for a new remote key. + + ### Usage Example + Post a `GenerateRemoteKey` to create a new remote key. + properties: + name: + type: string + minLength: 1 + description: The name of the remote key + example: Remote Deployment Key 1 + required: + - name + x-merge-category: accounting + IncomeStatement: + type: object + description: |- + # The IncomeStatement Object + ### Description + The `IncomeStatement` object is used to represent a company’s income, the cost of sales, operating expenses, and other non-operating expenses. The object also includes other important values like gross profit, gross operating profit, and net income. This represents a period of time (month, quarter, or year). + + ### Usage Example + Fetch from the `GET IncomeStatement` endpoint and view a company's income statement for a given period. + properties: + id: + type: string + format: uuid + readOnly: true + example: 0958cbc6-6040-430a-848e-aafacbadf4ae + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '1342348' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + name: + type: string + nullable: true + description: The income statement's name. + example: IncomeStatement + currency: + oneOf: + - $ref: '#/components/schemas/TransactionCurrencyEnum' + - type: string + nullable: true + description: |- + The income statement's currency. + + * `XUA` - ADB Unit of Account + * `AFN` - Afghan Afghani + * `AFA` - Afghan Afghani (1927–2002) + * `ALL` - Albanian Lek + * `ALK` - Albanian Lek (1946–1965) + * `DZD` - Algerian Dinar + * `ADP` - Andorran Peseta + * `AOA` - Angolan Kwanza + * `AOK` - Angolan Kwanza (1977–1991) + * `AON` - Angolan New Kwanza (1990–2000) + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + * `ARA` - Argentine Austral + * `ARS` - Argentine Peso + * `ARM` - Argentine Peso (1881–1970) + * `ARP` - Argentine Peso (1983–1985) + * `ARL` - Argentine Peso Ley (1970–1983) + * `AMD` - Armenian Dram + * `AWG` - Aruban Florin + * `AUD` - Australian Dollar + * `ATS` - Austrian Schilling + * `AZN` - Azerbaijani Manat + * `AZM` - Azerbaijani Manat (1993–2006) + * `BSD` - Bahamian Dollar + * `BHD` - Bahraini Dinar + * `BDT` - Bangladeshi Taka + * `BBD` - Barbadian Dollar + * `BYN` - Belarusian Ruble + * `BYB` - Belarusian Ruble (1994–1999) + * `BYR` - Belarusian Ruble (2000–2016) + * `BEF` - Belgian Franc + * `BEC` - Belgian Franc (convertible) + * `BEL` - Belgian Franc (financial) + * `BZD` - Belize Dollar + * `BMD` - Bermudan Dollar + * `BTN` - Bhutanese Ngultrum + * `BOB` - Bolivian Boliviano + * `BOL` - Bolivian Boliviano (1863–1963) + * `BOV` - Bolivian Mvdol + * `BOP` - Bolivian Peso + * `BAM` - Bosnia-Herzegovina Convertible Mark + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + * `BWP` - Botswanan Pula + * `BRC` - Brazilian Cruzado (1986–1989) + * `BRZ` - Brazilian Cruzeiro (1942–1967) + * `BRE` - Brazilian Cruzeiro (1990–1993) + * `BRR` - Brazilian Cruzeiro (1993–1994) + * `BRN` - Brazilian New Cruzado (1989–1990) + * `BRB` - Brazilian New Cruzeiro (1967–1986) + * `BRL` - Brazilian Real + * `GBP` - British Pound + * `BND` - Brunei Dollar + * `BGL` - Bulgarian Hard Lev + * `BGN` - Bulgarian Lev + * `BGO` - Bulgarian Lev (1879–1952) + * `BGM` - Bulgarian Socialist Lev + * `BUK` - Burmese Kyat + * `BIF` - Burundian Franc + * `XPF` - CFP Franc + * `KHR` - Cambodian Riel + * `CAD` - Canadian Dollar + * `CVE` - Cape Verdean Escudo + * `KYD` - Cayman Islands Dollar + * `XAF` - Central African CFA Franc + * `CLE` - Chilean Escudo + * `CLP` - Chilean Peso + * `CLF` - Chilean Unit of Account (UF) + * `CNX` - Chinese People’s Bank Dollar + * `CNY` - Chinese Yuan + * `CNH` - Chinese Yuan (offshore) + * `COP` - Colombian Peso + * `COU` - Colombian Real Value Unit + * `KMF` - Comorian Franc + * `CDF` - Congolese Franc + * `CRC` - Costa Rican Colón + * `HRD` - Croatian Dinar + * `HRK` - Croatian Kuna + * `CUC` - Cuban Convertible Peso + * `CUP` - Cuban Peso + * `CYP` - Cypriot Pound + * `CZK` - Czech Koruna + * `CSK` - Czechoslovak Hard Koruna + * `DKK` - Danish Krone + * `DJF` - Djiboutian Franc + * `DOP` - Dominican Peso + * `NLG` - Dutch Guilder + * `XCD` - East Caribbean Dollar + * `DDM` - East German Mark + * `ECS` - Ecuadorian Sucre + * `ECV` - Ecuadorian Unit of Constant Value + * `EGP` - Egyptian Pound + * `GQE` - Equatorial Guinean Ekwele + * `ERN` - Eritrean Nakfa + * `EEK` - Estonian Kroon + * `ETB` - Ethiopian Birr + * `EUR` - Euro + * `XBA` - European Composite Unit + * `XEU` - European Currency Unit + * `XBB` - European Monetary Unit + * `XBC` - European Unit of Account (XBC) + * `XBD` - European Unit of Account (XBD) + * `FKP` - Falkland Islands Pound + * `FJD` - Fijian Dollar + * `FIM` - Finnish Markka + * `FRF` - French Franc + * `XFO` - French Gold Franc + * `XFU` - French UIC-Franc + * `GMD` - Gambian Dalasi + * `GEK` - Georgian Kupon Larit + * `GEL` - Georgian Lari + * `DEM` - German Mark + * `GHS` - Ghanaian Cedi + * `GHC` - Ghanaian Cedi (1979–2007) + * `GIP` - Gibraltar Pound + * `XAU` - Gold + * `GRD` - Greek Drachma + * `GTQ` - Guatemalan Quetzal + * `GWP` - Guinea-Bissau Peso + * `GNF` - Guinean Franc + * `GNS` - Guinean Syli + * `GYD` - Guyanaese Dollar + * `HTG` - Haitian Gourde + * `HNL` - Honduran Lempira + * `HKD` - Hong Kong Dollar + * `HUF` - Hungarian Forint + * `IMP` - IMP + * `ISK` - Icelandic Króna + * `ISJ` - Icelandic Króna (1918–1981) + * `INR` - Indian Rupee + * `IDR` - Indonesian Rupiah + * `IRR` - Iranian Rial + * `IQD` - Iraqi Dinar + * `IEP` - Irish Pound + * `ILS` - Israeli New Shekel + * `ILP` - Israeli Pound + * `ILR` - Israeli Shekel (1980–1985) + * `ITL` - Italian Lira + * `JMD` - Jamaican Dollar + * `JPY` - Japanese Yen + * `JOD` - Jordanian Dinar + * `KZT` - Kazakhstani Tenge + * `KES` - Kenyan Shilling + * `KWD` - Kuwaiti Dinar + * `KGS` - Kyrgystani Som + * `LAK` - Laotian Kip + * `LVL` - Latvian Lats + * `LVR` - Latvian Ruble + * `LBP` - Lebanese Pound + * `LSL` - Lesotho Loti + * `LRD` - Liberian Dollar + * `LYD` - Libyan Dinar + * `LTL` - Lithuanian Litas + * `LTT` - Lithuanian Talonas + * `LUL` - Luxembourg Financial Franc + * `LUC` - Luxembourgian Convertible Franc + * `LUF` - Luxembourgian Franc + * `MOP` - Macanese Pataca + * `MKD` - Macedonian Denar + * `MKN` - Macedonian Denar (1992–1993) + * `MGA` - Malagasy Ariary + * `MGF` - Malagasy Franc + * `MWK` - Malawian Kwacha + * `MYR` - Malaysian Ringgit + * `MVR` - Maldivian Rufiyaa + * `MVP` - Maldivian Rupee (1947–1981) + * `MLF` - Malian Franc + * `MTL` - Maltese Lira + * `MTP` - Maltese Pound + * `MRU` - Mauritanian Ouguiya + * `MRO` - Mauritanian Ouguiya (1973–2017) + * `MUR` - Mauritian Rupee + * `MXV` - Mexican Investment Unit + * `MXN` - Mexican Peso + * `MXP` - Mexican Silver Peso (1861–1992) + * `MDC` - Moldovan Cupon + * `MDL` - Moldovan Leu + * `MCF` - Monegasque Franc + * `MNT` - Mongolian Tugrik + * `MAD` - Moroccan Dirham + * `MAF` - Moroccan Franc + * `MZE` - Mozambican Escudo + * `MZN` - Mozambican Metical + * `MZM` - Mozambican Metical (1980–2006) + * `MMK` - Myanmar Kyat + * `NAD` - Namibian Dollar + * `NPR` - Nepalese Rupee + * `ANG` - Netherlands Antillean Guilder + * `TWD` - New Taiwan Dollar + * `NZD` - New Zealand Dollar + * `NIO` - Nicaraguan Córdoba + * `NIC` - Nicaraguan Córdoba (1988–1991) + * `NGN` - Nigerian Naira + * `KPW` - North Korean Won + * `NOK` - Norwegian Krone + * `OMR` - Omani Rial + * `PKR` - Pakistani Rupee + * `XPD` - Palladium + * `PAB` - Panamanian Balboa + * `PGK` - Papua New Guinean Kina + * `PYG` - Paraguayan Guarani + * `PEI` - Peruvian Inti + * `PEN` - Peruvian Sol + * `PES` - Peruvian Sol (1863–1965) + * `PHP` - Philippine Peso + * `XPT` - Platinum + * `PLN` - Polish Zloty + * `PLZ` - Polish Zloty (1950–1995) + * `PTE` - Portuguese Escudo + * `GWE` - Portuguese Guinea Escudo + * `QAR` - Qatari Rial + * `XRE` - RINET Funds + * `RHD` - Rhodesian Dollar + * `RON` - Romanian Leu + * `ROL` - Romanian Leu (1952–2006) + * `RUB` - Russian Ruble + * `RUR` - Russian Ruble (1991–1998) + * `RWF` - Rwandan Franc + * `SVC` - Salvadoran Colón + * `WST` - Samoan Tala + * `SAR` - Saudi Riyal + * `RSD` - Serbian Dinar + * `CSD` - Serbian Dinar (2002–2006) + * `SCR` - Seychellois Rupee + * `SLL` - Sierra Leonean Leone + * `XAG` - Silver + * `SGD` - Singapore Dollar + * `SKK` - Slovak Koruna + * `SIT` - Slovenian Tolar + * `SBD` - Solomon Islands Dollar + * `SOS` - Somali Shilling + * `ZAR` - South African Rand + * `ZAL` - South African Rand (financial) + * `KRH` - South Korean Hwan (1953–1962) + * `KRW` - South Korean Won + * `KRO` - South Korean Won (1945–1953) + * `SSP` - South Sudanese Pound + * `SUR` - Soviet Rouble + * `ESP` - Spanish Peseta + * `ESA` - Spanish Peseta (A account) + * `ESB` - Spanish Peseta (convertible account) + * `XDR` - Special Drawing Rights + * `LKR` - Sri Lankan Rupee + * `SHP` - St. Helena Pound + * `XSU` - Sucre + * `SDD` - Sudanese Dinar (1992–2007) + * `SDG` - Sudanese Pound + * `SDP` - Sudanese Pound (1957–1998) + * `SRD` - Surinamese Dollar + * `SRG` - Surinamese Guilder + * `SZL` - Swazi Lilangeni + * `SEK` - Swedish Krona + * `CHF` - Swiss Franc + * `SYP` - Syrian Pound + * `STN` - São Tomé & Príncipe Dobra + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + * `TVD` - TVD + * `TJR` - Tajikistani Ruble + * `TJS` - Tajikistani Somoni + * `TZS` - Tanzanian Shilling + * `XTS` - Testing Currency Code + * `THB` - Thai Baht + * `XXX` - The codes assigned for transactions where no currency is involved + * `TPE` - Timorese Escudo + * `TOP` - Tongan Paʻanga + * `TTD` - Trinidad & Tobago Dollar + * `TND` - Tunisian Dinar + * `TRY` - Turkish Lira + * `TRL` - Turkish Lira (1922–2005) + * `TMT` - Turkmenistani Manat + * `TMM` - Turkmenistani Manat (1993–2009) + * `USD` - US Dollar + * `USN` - US Dollar (Next day) + * `USS` - US Dollar (Same day) + * `UGX` - Ugandan Shilling + * `UGS` - Ugandan Shilling (1966–1987) + * `UAH` - Ukrainian Hryvnia + * `UAK` - Ukrainian Karbovanets + * `AED` - United Arab Emirates Dirham + * `UYW` - Uruguayan Nominal Wage Index Unit + * `UYU` - Uruguayan Peso + * `UYP` - Uruguayan Peso (1975–1993) + * `UYI` - Uruguayan Peso (Indexed Units) + * `UZS` - Uzbekistani Som + * `VUV` - Vanuatu Vatu + * `VES` - Venezuelan Bolívar + * `VEB` - Venezuelan Bolívar (1871–2008) + * `VEF` - Venezuelan Bolívar (2008–2018) + * `VND` - Vietnamese Dong + * `VNN` - Vietnamese Dong (1978–1985) + * `CHE` - WIR Euro + * `CHW` - WIR Franc + * `XOF` - West African CFA Franc + * `YDD` - Yemeni Dinar + * `YER` - Yemeni Rial + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + * `YUM` - Yugoslavian New Dinar (1994–2002) + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + * `ZWN` - ZWN + * `ZRN` - Zairean New Zaire (1993–1998) + * `ZRZ` - Zairean Zaire (1971–1993) + * `ZMW` - Zambian Kwacha + * `ZMK` - Zambian Kwacha (1968–2012) + * `ZWD` - Zimbabwean Dollar (1980–2008) + * `ZWR` - Zimbabwean Dollar (2008) + * `ZWL` - Zimbabwean Dollar (2009) + example: USD + company: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/CompanyInfo' + nullable: true + description: The company the income statement belongs to. + example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + x-merge-expands-to: CompanyInfo + start_period: + type: string + format: date-time + nullable: true + description: The income statement's start period. + end_period: + type: string + format: date-time + nullable: true + description: The income statement's end period. + income: + type: array + items: + $ref: '#/components/schemas/ReportItem' + readOnly: true + example: + - remote_id: '10299' + name: Total Income + value: 325 + sub_items: + - remote_id: '10200' + name: Landscaping Services + value: 425 + sub_items: [] + - remote_id: '10201' + name: Pest Control Services + value: -100 + sub_items: [] + cost_of_sales: + type: array + items: + $ref: '#/components/schemas/ReportItem' + readOnly: true + example: + - remote_id: '10299' + name: Total COGS + value: 25 + sub_items: + - remote_id: '10200' + name: Supplies + value: 10 + sub_items: [] + gross_profit: + type: number + format: double + nullable: true + description: The revenue minus the cost of sale. + example: 300 + operating_expenses: + type: array + items: + $ref: '#/components/schemas/ReportItem' + readOnly: true + example: + - remote_id: '10299' + name: Total Operating Expenses + value: 100 + sub_items: [] + net_operating_income: + type: number + format: double + nullable: true + description: The revenue minus the operating expenses. + example: 200 + non_operating_expenses: + type: array + items: + $ref: '#/components/schemas/ReportItem' + readOnly: true + example: + - remote_id: '10299' + name: Total Non-Operating Expenses + value: 100 + sub_items: [] + net_income: + type: number + format: double + nullable: true + description: The gross profit minus the total expenses. + example: 100 + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /actions + data: + - Varies by platform + x-merge-expands: '{"company": "CompanyInfo"}' + x-merge-category: accounting + IndividualCommonModelScopeDeserializer: + type: object + properties: + model_name: + type: string + model_permissions: + type: object + additionalProperties: + $ref: '#/components/schemas/ModelPermissionDeserializer' + field_permissions: + $ref: '#/components/schemas/FieldPermissionDeserializer' + required: + - model_name + x-merge-category: accounting + IndividualCommonModelScopeDeserializerRequest: + type: object + properties: + model_name: + type: string + minLength: 1 + model_permissions: + type: object + additionalProperties: + $ref: '#/components/schemas/ModelPermissionDeserializerRequest' + field_permissions: + $ref: '#/components/schemas/FieldPermissionDeserializerRequest' + required: + - model_name + x-merge-category: accounting + Invoice: + type: object + description: |- + # The Invoice Object + ### Description + The `Invoice` object represents an itemized record of goods and/or services sold to a customer or bought from a vendor. + + + Represents a Bill when the `Invoice` type is `ACCOUNTS_PAYABLE`. References an Invoice when the `Invoice` type is `ACCOUNTS_RECEIVABLE`. + + ### Usage Example + Fetch from the `LIST Invoices` endpoint and view a company's invoices. + properties: + id: + type: string + format: uuid + readOnly: true + example: 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '990110' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + type: + oneOf: + - $ref: '#/components/schemas/InvoiceTypeEnum' + = type: string + nullable: true + description: |- + Whether the invoice is an accounts receivable or accounts payable. If `type` is `ACCOUNTS_PAYABLE`, the invoice is a bill. If `type` is `ACCOUNTS_RECEIVABLE`, it is an invoice. + + * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE + * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE + example: ACCOUNTS_RECEIVABLE + contact: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Contact' + nullable: true + description: The invoice's contact. + example: 022a2bef-57e5-4def-8ed2-7c41bd9a5ed8 + x-merge-expands-to: Contact + number: + type: string + nullable: true + description: The invoice's number. + example: AIQ12546 + issue_date: + type: string + format: date-time + nullable: true + description: The invoice's issue date. + example: '2020-03-31T00:00:00Z' + due_date: + type: string + format: date-time + nullable: true + description: The invoice's due date. + example: '2020-04-15T00:00:00Z' + paid_on_date: + type: string + format: date-time + nullable: true + description: The invoice's paid date. + example: '2020-04-01T00:00:00Z' + memo: + type: string + nullable: true + description: The invoice's private note. + example: Weekly Payment + company: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/CompanyInfo' + nullable: true + description: The company the invoice belongs to. + example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + x-merge-expands-to: CompanyInfo + employee: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Employee' + nullable: true + description: The employee this overall transaction relates to. + example: 7442f0d5-722d-45bd-b807-6e38489d37fe + x-merge-expands-to: Employee + currency: + oneOf: + - $ref: '#/components/schemas/TransactionCurrencyEnum' + - type: string + nullable: true + description: |- + The invoice's currency. + + * `XUA` - ADB Unit of Account + * `AFN` - Afghan Afghani + * `AFA` - Afghan Afghani (1927–2002) + * `ALL` - Albanian Lek + * `ALK` - Albanian Lek (1946–1965) + * `DZD` - Algerian Dinar + * `ADP` - Andorran Peseta + * `AOA` - Angolan Kwanza + * `AOK` - Angolan Kwanza (1977–1991) + * `AON` - Angolan New Kwanza (1990–2000) + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + * `ARA` - Argentine Austral + * `ARS` - Argentine Peso + * `ARM` - Argentine Peso (1881–1970) + * `ARP` - Argentine Peso (1983–1985) + * `ARL` - Argentine Peso Ley (1970–1983) + * `AMD` - Armenian Dram + * `AWG` - Aruban Florin + * `AUD` - Australian Dollar + * `ATS` - Austrian Schilling + * `AZN` - Azerbaijani Manat + * `AZM` - Azerbaijani Manat (1993–2006) + * `BSD` - Bahamian Dollar + * `BHD` - Bahraini Dinar + * `BDT` - Bangladeshi Taka + * `BBD` - Barbadian Dollar + * `BYN` - Belarusian Ruble + * `BYB` - Belarusian Ruble (1994–1999) + * `BYR` - Belarusian Ruble (2000–2016) + * `BEF` - Belgian Franc + * `BEC` - Belgian Franc (convertible) + * `BEL` - Belgian Franc (financial) + * `BZD` - Belize Dollar + * `BMD` - Bermudan Dollar + * `BTN` - Bhutanese Ngultrum + * `BOB` - Bolivian Boliviano + * `BOL` - Bolivian Boliviano (1863–1963) + * `BOV` - Bolivian Mvdol + * `BOP` - Bolivian Peso + * `BAM` - Bosnia-Herzegovina Convertible Mark + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + * `BWP` - Botswanan Pula + * `BRC` - Brazilian Cruzado (1986–1989) + * `BRZ` - Brazilian Cruzeiro (1942–1967) + * `BRE` - Brazilian Cruzeiro (1990–1993) + * `BRR` - Brazilian Cruzeiro (1993–1994) + * `BRN` - Brazilian New Cruzado (1989–1990) + * `BRB` - Brazilian New Cruzeiro (1967–1986) + * `BRL` - Brazilian Real + * `GBP` - British Pound + * `BND` - Brunei Dollar + * `BGL` - Bulgarian Hard Lev + * `BGN` - Bulgarian Lev + * `BGO` - Bulgarian Lev (1879–1952) + * `BGM` - Bulgarian Socialist Lev + * `BUK` - Burmese Kyat + * `BIF` - Burundian Franc + * `XPF` - CFP Franc + * `KHR` - Cambodian Riel + * `CAD` - Canadian Dollar + * `CVE` - Cape Verdean Escudo + * `KYD` - Cayman Islands Dollar + * `XAF` - Central African CFA Franc + * `CLE` - Chilean Escudo + * `CLP` - Chilean Peso + * `CLF` - Chilean Unit of Account (UF) + * `CNX` - Chinese People’s Bank Dollar + * `CNY` - Chinese Yuan + * `CNH` - Chinese Yuan (offshore) + * `COP` - Colombian Peso + * `COU` - Colombian Real Value Unit + * `KMF` - Comorian Franc + * `CDF` - Congolese Franc + * `CRC` - Costa Rican Colón + * `HRD` - Croatian Dinar + * `HRK` - Croatian Kuna + * `CUC` - Cuban Convertible Peso + * `CUP` - Cuban Peso + * `CYP` - Cypriot Pound + * `CZK` - Czech Koruna + * `CSK` - Czechoslovak Hard Koruna + * `DKK` - Danish Krone + * `DJF` - Djiboutian Franc + * `DOP` - Dominican Peso + * `NLG` - Dutch Guilder + * `XCD` - East Caribbean Dollar + * `DDM` - East German Mark + * `ECS` - Ecuadorian Sucre + * `ECV` - Ecuadorian Unit of Constant Value + * `EGP` - Egyptian Pound + * `GQE` - Equatorial Guinean Ekwele + * `ERN` - Eritrean Nakfa + * `EEK` - Estonian Kroon + * `ETB` - Ethiopian Birr + * `EUR` - Euro + * `XBA` - European Composite Unit + * `XEU` - European Currency Unit + * `XBB` - European Monetary Unit + * `XBC` - European Unit of Account (XBC) + * `XBD` - European Unit of Account (XBD) + * `FKP` - Falkland Islands Pound + * `FJD` - Fijian Dollar + * `FIM` - Finnish Markka + * `FRF` - French Franc + * `XFO` - French Gold Franc + * `XFU` - French UIC-Franc + * `GMD` - Gambian Dalasi + * `GEK` - Georgian Kupon Larit + * `GEL` - Georgian Lari + * `DEM` - German Mark + * `GHS` - Ghanaian Cedi + * `GHC` - Ghanaian Cedi (1979–2007) + * `GIP` - Gibraltar Pound + * `XAU` - Gold + * `GRD` - Greek Drachma + * `GTQ` - Guatemalan Quetzal + * `GWP` - Guinea-Bissau Peso + * `GNF` - Guinean Franc + * `GNS` - Guinean Syli + * `GYD` - Guyanaese Dollar + * `HTG` - Haitian Gourde + * `HNL` - Honduran Lempira + * `HKD` - Hong Kong Dollar + * `HUF` - Hungarian Forint + * `IMP` - IMP + * `ISK` - Icelandic Króna + * `ISJ` - Icelandic Króna (1918–1981) + * `INR` - Indian Rupee + * `IDR` - Indonesian Rupiah + * `IRR` - Iranian Rial + * `IQD` - Iraqi Dinar + * `IEP` - Irish Pound + * `ILS` - Israeli New Shekel + * `ILP` - Israeli Pound + * `ILR` - Israeli Shekel (1980–1985) + * `ITL` - Italian Lira + * `JMD` - Jamaican Dollar + * `JPY` - Japanese Yen + * `JOD` - Jordanian Dinar + * `KZT` - Kazakhstani Tenge + * `KES` - Kenyan Shilling + * `KWD` - Kuwaiti Dinar + * `KGS` - Kyrgystani Som + * `LAK` - Laotian Kip + * `LVL` - Latvian Lats + * `LVR` - Latvian Ruble + * `LBP` - Lebanese Pound + * `LSL` - Lesotho Loti + * `LRD` - Liberian Dollar + * `LYD` - Libyan Dinar + * `LTL` - Lithuanian Litas + * `LTT` - Lithuanian Talonas + * `LUL` - Luxembourg Financial Franc + * `LUC` - Luxembourgian Convertible Franc + * `LUF` - Luxembourgian Franc + * `MOP` - Macanese Pataca + * `MKD` - Macedonian Denar + * `MKN` - Macedonian Denar (1992–1993) + * `MGA` - Malagasy Ariary + * `MGF` - Malagasy Franc + * `MWK` - Malawian Kwacha + * `MYR` - Malaysian Ringgit + * `MVR` - Maldivian Rufiyaa + * `MVP` - Maldivian Rupee (1947–1981) + * `MLF` - Malian Franc + * `MTL` - Maltese Lira + * `MTP` - Maltese Pound + * `MRU` - Mauritanian Ouguiya + * `MRO` - Mauritanian Ouguiya (1973–2017) + * `MUR` - Mauritian Rupee + * `MXV` - Mexican Investment Unit + * `MXN` - Mexican Peso + * `MXP` - Mexican Silver Peso (1861–1992) + * `MDC` - Moldovan Cupon + * `MDL` - Moldovan Leu + * `MCF` - Monegasque Franc + * `MNT` - Mongolian Tugrik + * `MAD` - Moroccan Dirham + * `MAF` - Moroccan Franc + * `MZE` - Mozambican Escudo + * `MZN` - Mozambican Metical + * `MZM` - Mozambican Metical (1980–2006) + * `MMK` - Myanmar Kyat + * `NAD` - Namibian Dollar + * `NPR` - Nepalese Rupee + * `ANG` - Netherlands Antillean Guilder + * `TWD` - New Taiwan Dollar + * `NZD` - New Zealand Dollar + * `NIO` - Nicaraguan Córdoba + * `NIC` - Nicaraguan Córdoba (1988–1991) + * `NGN` - Nigerian Naira + * `KPW` - North Korean Won + * `NOK` - Norwegian Krone + * `OMR` - Omani Rial + * `PKR` - Pakistani Rupee + * `XPD` - Palladium + * `PAB` - Panamanian Balboa + * `PGK` - Papua New Guinean Kina + * `PYG` - Paraguayan Guarani + * `PEI` - Peruvian Inti + * `PEN` - Peruvian Sol + * `PES` - Peruvian Sol (1863–1965) + * `PHP` - Philippine Peso + * `XPT` - Platinum + * `PLN` - Polish Zloty + * `PLZ` - Polish Zloty (1950–1995) + * `PTE` - Portuguese Escudo + * `GWE` - Portuguese Guinea Escudo + * `QAR` - Qatari Rial + * `XRE` - RINET Funds + * `RHD` - Rhodesian Dollar + * `RON` - Romanian Leu + * `ROL` - Romanian Leu (1952–2006) + * `RUB` - Russian Ruble + * `RUR` - Russian Ruble (1991–1998) + * `RWF` - Rwandan Franc + * `SVC` - Salvadoran Colón + * `WST` - Samoan Tala + * `SAR` - Saudi Riyal + * `RSD` - Serbian Dinar + * `CSD` - Serbian Dinar (2002–2006) + * `SCR` - Seychellois Rupee + * `SLL` - Sierra Leonean Leone + * `XAG` - Silver + * `SGD` - Singapore Dollar + * `SKK` - Slovak Koruna + * `SIT` - Slovenian Tolar + * `SBD` - Solomon Islands Dollar + * `SOS` - Somali Shilling + * `ZAR` - South African Rand + * `ZAL` - South African Rand (financial) + * `KRH` - South Korean Hwan (1953–1962) + * `KRW` - South Korean Won + * `KRO` - South Korean Won (1945–1953) + * `SSP` - South Sudanese Pound + * `SUR` - Soviet Rouble + * `ESP` - Spanish Peseta + * `ESA` - Spanish Peseta (A account) + * `ESB` - Spanish Peseta (convertible account) + * `XDR` - Special Drawing Rights + * `LKR` - Sri Lankan Rupee + * `SHP` - St. Helena Pound + * `XSU` - Sucre + * `SDD` - Sudanese Dinar (1992–2007) + * `SDG` - Sudanese Pound + * `SDP` - Sudanese Pound (1957–1998) + * `SRD` - Surinamese Dollar + * `SRG` - Surinamese Guilder + * `SZL` - Swazi Lilangeni + * `SEK` - Swedish Krona + * `CHF` - Swiss Franc + * `SYP` - Syrian Pound + * `STN` - São Tomé & Príncipe Dobra + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + * `TVD` - TVD + * `TJR` - Tajikistani Ruble + * `TJS` - Tajikistani Somoni + * `TZS` - Tanzanian Shilling + * `XTS` - Testing Currency Code + * `THB` - Thai Baht + * `XXX` - The codes assigned for transactions where no currency is involved + * `TPE` - Timorese Escudo + * `TOP` - Tongan Paʻanga + * `TTD` - Trinidad & Tobago Dollar + * `TND` - Tunisian Dinar + * `TRY` - Turkish Lira + * `TRL` - Turkish Lira (1922–2005) + * `TMT` - Turkmenistani Manat + * `TMM` - Turkmenistani Manat (1993–2009) + * `USD` - US Dollar + * `USN` - US Dollar (Next day) + * `USS` - US Dollar (Same day) + * `UGX` - Ugandan Shilling + * `UGS` - Ugandan Shilling (1966–1987) + * `UAH` - Ukrainian Hryvnia + * `UAK` - Ukrainian Karbovanets + * `AED` - United Arab Emirates Dirham + * `UYW` - Uruguayan Nominal Wage Index Unit + * `UYU` - Uruguayan Peso + * `UYP` - Uruguayan Peso (1975–1993) + * `UYI` - Uruguayan Peso (Indexed Units) + * `UZS` - Uzbekistani Som + * `VUV` - Vanuatu Vatu + * `VES` - Venezuelan Bolívar + * `VEB` - Venezuelan Bolívar (1871–2008) + * `VEF` - Venezuelan Bolívar (2008–2018) + * `VND` - Vietnamese Dong + * `VNN` - Vietnamese Dong (1978–1985) + * `CHE` - WIR Euro + * `CHW` - WIR Franc + * `XOF` - West African CFA Franc + * `YDD` - Yemeni Dinar + * `YER` - Yemeni Rial + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + * `YUM` - Yugoslavian New Dinar (1994–2002) + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + * `ZWN` - ZWN + * `ZRN` - Zairean New Zaire (1993–1998) + * `ZRZ` - Zairean Zaire (1971–1993) + * `ZMW` - Zambian Kwacha + * `ZMK` - Zambian Kwacha (1968–2012) + * `ZWD` - Zimbabwean Dollar (1980–2008) + * `ZWR` - Zimbabwean Dollar (2008) + * `ZWL` - Zimbabwean Dollar (2009) + example: USD + exchange_rate: + type: string + format: decimal + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + nullable: true + description: The invoice's exchange rate. + example: '2.9' + payment_term: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/PaymentTerm' + nullable: true + description: The payment term that applies to this transaction. + example: 89d329de-825f-4ac6-8369-3c58b4e68bee + x-merge-expands-to: PaymentTerm + total_discount: + type: number + format: double + nullable: true + description: The total discounts applied to the total cost. + sub_total: + type: number + format: double + nullable: true + description: The total amount being paid before taxes. + example: 100 + status: + oneOf: + - $ref: '#/components/schemas/InvoiceStatusEnum' + - type: string + nullable: true + description: |- + The status of the invoice. + + * `PAID` - PAID + * `DRAFT` - DRAFT + * `SUBMITTED` - SUBMITTED + * `PARTIALLY_PAID` - PARTIALLY_PAID + * `OPEN` - OPEN + * `VOID` - VOID + example: DRAFT + total_tax_amount: + type: number + format: double + nullable: true + description: The total amount being paid in taxes. + example: 5 + total_amount: + type: number + format: double + nullable: true + description: The invoice's total amount. + example: 105 + balance: + type: number + format: double + nullable: true + description: The invoice's remaining balance. + example: 105 + remote_updated_at: + type: string + format: date-time + nullable: true + description: When the third party's invoice entry was updated. + example: '2020-04-01T00:00:00Z' + tracking_categories: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/TrackingCategory' + nullable: true + example: + - 7dc5ca17-d311-44cd-9ce0-333080367a18 + - 6aa0700c-48e1-4c4a-8162-02e6a582df05 + - 8c933d61-8f5b-4360-ac0c-c9dc87bee763 + x-merge-expands-to: TrackingCategory + accounting_period: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/AccountingPeriod' + nullable: true + description: The accounting period that the Invoice was generated in. + example: 7dc5ca17-d311-44cd-9ce0-333080367a18 + x-merge-expands-to: AccountingPeriod + purchase_orders: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/PurchaseOrder' + nullable: true + example: + - e7378d8f-3992-4c2a-8417-ebdc4f2bfeb7 + - dd70ca2f-b120-46fa-889a-9604037f45fd + - 889b281d-739c-4759-95b8-0aedb3947131 + x-merge-expands-to: PurchaseOrder + payments: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Payment' + nullable: true + example: + - b26fd49a-cbae-470a-a8f8-bcbc119e0390 + description: Array of `Payment` object IDs. + x-merge-expands-to: Payment + applied_payments: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/PaymentLineItem' + nullable: true + example: + - 9017594e-dc33-4113-a5d2-b0f928e34fdd + description: A list of the Payment Applied to Lines common models related + to a given Invoice, Credit Note, or Journal Entry. + x-merge-expands-to: PaymentLineItemWithPayment + line_items: + type: array + items: + $ref: '#/components/schemas/InvoiceLineItem' + readOnly: true + example: + - remote_id: '8765432' + description: Pickleball lessons + unit_price: 50 + quantity: 1 + total_amount: 50 + currency: USD + exchange_rate: '2.9' + employee: 7442f0d5-722d-45bd-b807-6e38489d37fe + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + item: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + account: cd0f32d4-a493-11ec-b909-0242ac120002 + project: 22e65a5d-2df5-4e6e-884a-e538d0339000 + contact: 908934-49j9-093f-0989-908923908 + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_data: + - path: /actions + data: + - Varies by platform + x-merge-expands-to: InvoiceLineItem + applied_credit_notes: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/CreditNoteApplyLineForInvoice' + readOnly: true + example: + - credit_note: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + applied_date: '2020-03-31T00:00:00Z' + applied_amount: '2.9' + description: '`CreditNoteApplyLines` applied to the Invoice.' + x-merge-expands-to: CreditNoteApplyLineForInvoice + applied_vendor_credits: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/VendorCreditApplyLineForInvoice' + readOnly: true + example: + - vendor_credit: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + applied_date: '2020-03-31T00:00:00Z' + applied_amount: '2.9' + description: '`VendorCreditApplyLines` applied to the Invoice.' + x-merge-expands-to: VendorCreditApplyLineForInvoice + inclusive_of_tax: + type: boolean + nullable: true + description: If the transaction is inclusive or exclusive of tax. `True` + if inclusive, `False` if exclusive. + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /actions + data: + - Varies by platform + remote_fields: + type: array + items: + $ref: '#/components/schemas/RemoteField' + readOnly: true + x-merge-expands: '{"accounting_period": "AccountingPeriod", "applied_credit_notes": + "CreditNoteApplyLineForInvoice", "applied_payments": "PaymentLineItemWithPayment", + "applied_vendor_credits": "VendorCreditApplyLineForInvoice", "company": "CompanyInfo", + "contact": "Contact", "employee": "Employee", "line_items": "InvoiceLineItem", + "payment_term": "PaymentTerm", "payments": "Payment", "purchase_orders": "PurchaseOrder", + "tracking_categories": "TrackingCategory"}' + x-merge-category: accounting + InvoiceEndpointRequest: + type: object + properties: + model: + $ref: '#/components/schemas/InvoiceRequest' + required: + - model + x-merge-category: accounting + InvoiceLineItem: + type: object + description: |- + # The InvoiceLineItem Object + ### Description + The `InvoiceLineItem` object represents an itemized record of goods and/or services sold to a customer. + + ### Usage Example + Fetch from the `GET Invoice` endpoint and view the invoice's line items. + properties: + id: + type: string + format: uuid + readOnly: true + example: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '8765432' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + description: + type: string + nullable: true + description: The line item's description. + example: Pickleball lessons + unit_price: + type: number + format: double + nullable: true + description: The line item's unit price. + example: 50 + quantity: + type: number + format: double + nullable: true + description: The line item's quantity. + example: 1 + total_amount: + type: number + format: double + nullable: true + description: The line item's total amount. + example: 50 + employee: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Employee' + nullable: true + description: The employee this overall transaction relates to. + example: 7442f0d5-722d-45bd-b807-6e38489d37fe + project: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Project' + nullable: true + example: 22e65a5d-2df5-4e6e-884a-e538d0339000 + x-merge-expands-to: Project + contact: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Contact' + nullable: true + description: The invoice's contact. + example: 908934-49j9-093f-0989-908923908 + x-merge-expands-to: Contact + currency: + oneOf: + - $ref: '#/components/schemas/TransactionCurrencyEnum' + - type: string + nullable: true + description: |- + The line item's currency. + + * `XUA` - ADB Unit of Account + * `AFN` - Afghan Afghani + * `AFA` - Afghan Afghani (1927–2002) + * `ALL` - Albanian Lek + * `ALK` - Albanian Lek (1946–1965) + * `DZD` - Algerian Dinar + * `ADP` - Andorran Peseta + * `AOA` - Angolan Kwanza + * `AOK` - Angolan Kwanza (1977–1991) + * `AON` - Angolan New Kwanza (1990–2000) + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + * `ARA` - Argentine Austral + * `ARS` - Argentine Peso + * `ARM` - Argentine Peso (1881–1970) + * `ARP` - Argentine Peso (1983–1985) + * `ARL` - Argentine Peso Ley (1970–1983) + * `AMD` - Armenian Dram + * `AWG` - Aruban Florin + * `AUD` - Australian Dollar + * `ATS` - Austrian Schilling + * `AZN` - Azerbaijani Manat + * `AZM` - Azerbaijani Manat (1993–2006) + * `BSD` - Bahamian Dollar + * `BHD` - Bahraini Dinar + * `BDT` - Bangladeshi Taka + * `BBD` - Barbadian Dollar + * `BYN` - Belarusian Ruble + * `BYB` - Belarusian Ruble (1994–1999) + * `BYR` - Belarusian Ruble (2000–2016) + * `BEF` - Belgian Franc + * `BEC` - Belgian Franc (convertible) + * `BEL` - Belgian Franc (financial) + * `BZD` - Belize Dollar + * `BMD` - Bermudan Dollar + * `BTN` - Bhutanese Ngultrum + * `BOB` - Bolivian Boliviano + * `BOL` - Bolivian Boliviano (1863–1963) + * `BOV` - Bolivian Mvdol + * `BOP` - Bolivian Peso + * `BAM` - Bosnia-Herzegovina Convertible Mark + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + * `BWP` - Botswanan Pula + * `BRC` - Brazilian Cruzado (1986–1989) + * `BRZ` - Brazilian Cruzeiro (1942–1967) + * `BRE` - Brazilian Cruzeiro (1990–1993) + * `BRR` - Brazilian Cruzeiro (1993–1994) + * `BRN` - Brazilian New Cruzado (1989–1990) + * `BRB` - Brazilian New Cruzeiro (1967–1986) + * `BRL` - Brazilian Real + * `GBP` - British Pound + * `BND` - Brunei Dollar + * `BGL` - Bulgarian Hard Lev + * `BGN` - Bulgarian Lev + * `BGO` - Bulgarian Lev (1879–1952) + * `BGM` - Bulgarian Socialist Lev + * `BUK` - Burmese Kyat + * `BIF` - Burundian Franc + * `XPF` - CFP Franc + * `KHR` - Cambodian Riel + * `CAD` - Canadian Dollar + * `CVE` - Cape Verdean Escudo + * `KYD` - Cayman Islands Dollar + * `XAF` - Central African CFA Franc + * `CLE` - Chilean Escudo + * `CLP` - Chilean Peso + * `CLF` - Chilean Unit of Account (UF) + * `CNX` - Chinese People’s Bank Dollar + * `CNY` - Chinese Yuan + * `CNH` - Chinese Yuan (offshore) + * `COP` - Colombian Peso + * `COU` - Colombian Real Value Unit + * `KMF` - Comorian Franc + * `CDF` - Congolese Franc + * `CRC` - Costa Rican Colón + * `HRD` - Croatian Dinar + * `HRK` - Croatian Kuna + * `CUC` - Cuban Convertible Peso + * `CUP` - Cuban Peso + * `CYP` - Cypriot Pound + * `CZK` - Czech Koruna + * `CSK` - Czechoslovak Hard Koruna + * `DKK` - Danish Krone + * `DJF` - Djiboutian Franc + * `DOP` - Dominican Peso + * `NLG` - Dutch Guilder + * `XCD` - East Caribbean Dollar + * `DDM` - East German Mark + * `ECS` - Ecuadorian Sucre + * `ECV` - Ecuadorian Unit of Constant Value + * `EGP` - Egyptian Pound + * `GQE` - Equatorial Guinean Ekwele + * `ERN` - Eritrean Nakfa + * `EEK` - Estonian Kroon + * `ETB` - Ethiopian Birr + * `EUR` - Euro + * `XBA` - European Composite Unit + * `XEU` - European Currency Unit + * `XBB` - European Monetary Unit + * `XBC` - European Unit of Account (XBC) + * `XBD` - European Unit of Account (XBD) + * `FKP` - Falkland Islands Pound + * `FJD` - Fijian Dollar + * `FIM` - Finnish Markka + * `FRF` - French Franc + * `XFO` - French Gold Franc + * `XFU` - French UIC-Franc + * `GMD` - Gambian Dalasi + * `GEK` - Georgian Kupon Larit + * `GEL` - Georgian Lari + * `DEM` - German Mark + * `GHS` - Ghanaian Cedi + * `GHC` - Ghanaian Cedi (1979–2007) + * `GIP` - Gibraltar Pound + * `XAU` - Gold + * `GRD` - Greek Drachma + * `GTQ` - Guatemalan Quetzal + * `GWP` - Guinea-Bissau Peso + * `GNF` - Guinean Franc + * `GNS` - Guinean Syli + * `GYD` - Guyanaese Dollar + * `HTG` - Haitian Gourde + * `HNL` - Honduran Lempira + * `HKD` - Hong Kong Dollar + * `HUF` - Hungarian Forint + * `IMP` - IMP + * `ISK` - Icelandic Króna + * `ISJ` - Icelandic Króna (1918–1981) + * `INR` - Indian Rupee + * `IDR` - Indonesian Rupiah + * `IRR` - Iranian Rial + * `IQD` - Iraqi Dinar + * `IEP` - Irish Pound + * `ILS` - Israeli New Shekel + * `ILP` - Israeli Pound + * `ILR` - Israeli Shekel (1980–1985) + * `ITL` - Italian Lira + * `JMD` - Jamaican Dollar + * `JPY` - Japanese Yen + * `JOD` - Jordanian Dinar + * `KZT` - Kazakhstani Tenge + * `KES` - Kenyan Shilling + * `KWD` - Kuwaiti Dinar + * `KGS` - Kyrgystani Som + * `LAK` - Laotian Kip + * `LVL` - Latvian Lats + * `LVR` - Latvian Ruble + * `LBP` - Lebanese Pound + * `LSL` - Lesotho Loti + * `LRD` - Liberian Dollar + * `LYD` - Libyan Dinar + * `LTL` - Lithuanian Litas + * `LTT` - Lithuanian Talonas + * `LUL` - Luxembourg Financial Franc + * `LUC` - Luxembourgian Convertible Franc + * `LUF` - Luxembourgian Franc + * `MOP` - Macanese Pataca + * `MKD` - Macedonian Denar + * `MKN` - Macedonian Denar (1992–1993) + * `MGA` - Malagasy Ariary + * `MGF` - Malagasy Franc + * `MWK` - Malawian Kwacha + * `MYR` - Malaysian Ringgit + * `MVR` - Maldivian Rufiyaa + * `MVP` - Maldivian Rupee (1947–1981) + * `MLF` - Malian Franc + * `MTL` - Maltese Lira + * `MTP` - Maltese Pound + * `MRU` - Mauritanian Ouguiya + * `MRO` - Mauritanian Ouguiya (1973–2017) + * `MUR` - Mauritian Rupee + * `MXV` - Mexican Investment Unit + * `MXN` - Mexican Peso + * `MXP` - Mexican Silver Peso (1861–1992) + * `MDC` - Moldovan Cupon + * `MDL` - Moldovan Leu + * `MCF` - Monegasque Franc + * `MNT` - Mongolian Tugrik + * `MAD` - Moroccan Dirham + * `MAF` - Moroccan Franc + * `MZE` - Mozambican Escudo + * `MZN` - Mozambican Metical + * `MZM` - Mozambican Metical (1980–2006) + * `MMK` - Myanmar Kyat + * `NAD` - Namibian Dollar + * `NPR` - Nepalese Rupee + * `ANG` - Netherlands Antillean Guilder + * `TWD` - New Taiwan Dollar + * `NZD` - New Zealand Dollar + * `NIO` - Nicaraguan Córdoba + * `NIC` - Nicaraguan Córdoba (1988–1991) + * `NGN` - Nigerian Naira + * `KPW` - North Korean Won + * `NOK` - Norwegian Krone + * `OMR` - Omani Rial + * `PKR` - Pakistani Rupee + * `XPD` - Palladium + * `PAB` - Panamanian Balboa + * `PGK` - Papua New Guinean Kina + * `PYG` - Paraguayan Guarani + * `PEI` - Peruvian Inti + * `PEN` - Peruvian Sol + * `PES` - Peruvian Sol (1863–1965) + * `PHP` - Philippine Peso + * `XPT` - Platinum + * `PLN` - Polish Zloty + * `PLZ` - Polish Zloty (1950–1995) + * `PTE` - Portuguese Escudo + * `GWE` - Portuguese Guinea Escudo + * `QAR` - Qatari Rial + * `XRE` - RINET Funds + * `RHD` - Rhodesian Dollar + * `RON` - Romanian Leu + * `ROL` - Romanian Leu (1952–2006) + * `RUB` - Russian Ruble + * `RUR` - Russian Ruble (1991–1998) + * `RWF` - Rwandan Franc + * `SVC` - Salvadoran Colón + * `WST` - Samoan Tala + * `SAR` - Saudi Riyal + * `RSD` - Serbian Dinar + * `CSD` - Serbian Dinar (2002–2006) + * `SCR` - Seychellois Rupee + * `SLL` - Sierra Leonean Leone + * `XAG` - Silver + * `SGD` - Singapore Dollar + * `SKK` - Slovak Koruna + * `SIT` - Slovenian Tolar + * `SBD` - Solomon Islands Dollar + * `SOS` - Somali Shilling + * `ZAR` - South African Rand + * `ZAL` - South African Rand (financial) + * `KRH` - South Korean Hwan (1953–1962) + * `KRW` - South Korean Won + * `KRO` - South Korean Won (1945–1953) + * `SSP` - South Sudanese Pound + * `SUR` - Soviet Rouble + * `ESP` - Spanish Peseta + * `ESA` - Spanish Peseta (A account) + * `ESB` - Spanish Peseta (convertible account) + * `XDR` - Special Drawing Rights + * `LKR` - Sri Lankan Rupee + * `SHP` - St. Helena Pound + * `XSU` - Sucre + * `SDD` - Sudanese Dinar (1992–2007) + * `SDG` - Sudanese Pound + * `SDP` - Sudanese Pound (1957–1998) + * `SRD` - Surinamese Dollar + * `SRG` - Surinamese Guilder + * `SZL` - Swazi Lilangeni + * `SEK` - Swedish Krona + * `CHF` - Swiss Franc + * `SYP` - Syrian Pound + * `STN` - São Tomé & Príncipe Dobra + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + * `TVD` - TVD + * `TJR` - Tajikistani Ruble + * `TJS` - Tajikistani Somoni + * `TZS` - Tanzanian Shilling + * `XTS` - Testing Currency Code + * `THB` - Thai Baht + * `XXX` - The codes assigned for transactions where no currency is involved + * `TPE` - Timorese Escudo + * `TOP` - Tongan Paʻanga + * `TTD` - Trinidad & Tobago Dollar + * `TND` - Tunisian Dinar + * `TRY` - Turkish Lira + * `TRL` - Turkish Lira (1922–2005) + * `TMT` - Turkmenistani Manat + * `TMM` - Turkmenistani Manat (1993–2009) + * `USD` - US Dollar + * `USN` - US Dollar (Next day) + * `USS` - US Dollar (Same day) + * `UGX` - Ugandan Shilling + * `UGS` - Ugandan Shilling (1966–1987) + * `UAH` - Ukrainian Hryvnia + * `UAK` - Ukrainian Karbovanets + * `AED` - United Arab Emirates Dirham + * `UYW` - Uruguayan Nominal Wage Index Unit + * `UYU` - Uruguayan Peso + * `UYP` - Uruguayan Peso (1975–1993) + * `UYI` - Uruguayan Peso (Indexed Units) + * `UZS` - Uzbekistani Som + * `VUV` - Vanuatu Vatu + * `VES` - Venezuelan Bolívar + * `VEB` - Venezuelan Bolívar (1871–2008) + * `VEF` - Venezuelan Bolívar (2008–2018) + * `VND` - Vietnamese Dong + * `VNN` - Vietnamese Dong (1978–1985) + * `CHE` - WIR Euro + * `CHW` - WIR Franc + * `XOF` - West African CFA Franc + * `YDD` - Yemeni Dinar + * `YER` - Yemeni Rial + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + * `YUM` - Yugoslavian New Dinar (1994–2002) + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + * `ZWN` - ZWN + * `ZRN` - Zairean New Zaire (1993–1998) + * `ZRZ` - Zairean Zaire (1971–1993) + * `ZMW` - Zambian Kwacha + * `ZMK` - Zambian Kwacha (1968–2012) + * `ZWD` - Zimbabwean Dollar (1980–2008) + * `ZWR` - Zimbabwean Dollar (2008) + * `ZWL` - Zimbabwean Dollar (2009) + example: USD + exchange_rate: + type: string + format: decimal + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + nullable: true + description: The line item's exchange rate. + example: '2.9' + item: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Item' + nullable: true + example: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + x-merge-expands-to: Item + account: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Account' + nullable: true + example: cd0f32d4-a493-11ec-b909-0242ac120002 + x-merge-expands-to: Account + tax_rate: + type: string + format: uuid + nullable: true + example: a12e7c20-1922-9df7-s75n-edfeewnn7384 + description: The tax rate that applies to this line item. + tracking_category: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/TrackingCategory' + nullable: true + deprecated: true + x-merge-expands-to: TrackingCategory + tracking_categories: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/TrackingCategory' + nullable: true + example: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + description: The invoice line item's associated tracking categories. + x-merge-expands-to: TrackingCategory + company: + type: string + format: uuid + nullable: true + description: The company the invoice belongs to. + example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_fields: + type: array + items: + $ref: '#/components/schemas/RemoteField' + readOnly: true + x-merge-nested-write-allowed: true + x-merge-expands: '{"account": "Account", "contact": "Contact", "item": "Item", + "project": "Project", "tracking_categories": "TrackingCategory", "tracking_category": + "TrackingCategory"}' + x-merge-category: accounting + InvoiceLineItemRequest: + type: object + description: |- + # The InvoiceLineItem Object + ### Description + The `InvoiceLineItem` object represents an itemized record of goods and/or services sold to a customer. + + ### Usage Example + Fetch from the `GET Invoice` endpoint and view the invoice's line items. + properties: + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '8765432' + description: + type: string + nullable: true + description: The line item's description. + example: Pickleball lessons + unit_price: + type: number + format: double + nullable: true + description: The line item's unit price. + example: 50 + quantity: + type: number + format: double + nullable: true + description: The line item's quantity. + example: 1 + total_amount: + type: number + format: double + nullable: true + description: The line item's total amount. + example: 50 + employee: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Employee' + nullable: true + description: The employee this overall transaction relates to. + example: 7442f0d5-722d-45bd-b807-6e38489d37fe + project: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Project' + nullable: true + example: 22e65a5d-2df5-4e6e-884a-e538d0339000 + x-merge-expands-to: Project + contact: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Contact' + nullable: true + description: The invoice's contact. + example: 908934-49j9-093f-0989-908923908 + x-merge-expands-to: Contact + currency: + oneOf: + - $ref: '#/components/schemas/TransactionCurrencyEnum' + - type: string + nullable: true + description: |- + The line item's currency. + + * `XUA` - ADB Unit of Account + * `AFN` - Afghan Afghani + * `AFA` - Afghan Afghani (1927–2002) + * `ALL` - Albanian Lek + * `ALK` - Albanian Lek (1946–1965) + * `DZD` - Algerian Dinar + * `ADP` - Andorran Peseta + * `AOA` - Angolan Kwanza + * `AOK` - Angolan Kwanza (1977–1991) + * `AON` - Angolan New Kwanza (1990–2000) + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + * `ARA` - Argentine Austral + * `ARS` - Argentine Peso + * `ARM` - Argentine Peso (1881–1970) + * `ARP` - Argentine Peso (1983–1985) + * `ARL` - Argentine Peso Ley (1970–1983) + * `AMD` - Armenian Dram + * `AWG` - Aruban Florin + * `AUD` - Australian Dollar + * `ATS` - Austrian Schilling + * `AZN` - Azerbaijani Manat + * `AZM` - Azerbaijani Manat (1993–2006) + * `BSD` - Bahamian Dollar + * `BHD` - Bahraini Dinar + * `BDT` - Bangladeshi Taka + * `BBD` - Barbadian Dollar + * `BYN` - Belarusian Ruble + * `BYB` - Belarusian Ruble (1994–1999) + * `BYR` - Belarusian Ruble (2000–2016) + * `BEF` - Belgian Franc + * `BEC` - Belgian Franc (convertible) + * `BEL` - Belgian Franc (financial) + * `BZD` - Belize Dollar + * `BMD` - Bermudan Dollar + * `BTN` - Bhutanese Ngultrum + * `BOB` - Bolivian Boliviano + * `BOL` - Bolivian Boliviano (1863–1963) + * `BOV` - Bolivian Mvdol + * `BOP` - Bolivian Peso + * `BAM` - Bosnia-Herzegovina Convertible Mark + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + * `BWP` - Botswanan Pula + * `BRC` - Brazilian Cruzado (1986–1989) + * `BRZ` - Brazilian Cruzeiro (1942–1967) + * `BRE` - Brazilian Cruzeiro (1990–1993) + * `BRR` - Brazilian Cruzeiro (1993–1994) + * `BRN` - Brazilian New Cruzado (1989–1990) + * `BRB` - Brazilian New Cruzeiro (1967–1986) + * `BRL` - Brazilian Real + * `GBP` - British Pound + * `BND` - Brunei Dollar + * `BGL` - Bulgarian Hard Lev + * `BGN` - Bulgarian Lev + * `BGO` - Bulgarian Lev (1879–1952) + * `BGM` - Bulgarian Socialist Lev + * `BUK` - Burmese Kyat + * `BIF` - Burundian Franc + * `XPF` - CFP Franc + * `KHR` - Cambodian Riel + * `CAD` - Canadian Dollar + * `CVE` - Cape Verdean Escudo + * `KYD` - Cayman Islands Dollar + * `XAF` - Central African CFA Franc + * `CLE` - Chilean Escudo + * `CLP` - Chilean Peso + * `CLF` - Chilean Unit of Account (UF) + * `CNX` - Chinese People’s Bank Dollar + * `CNY` - Chinese Yuan + * `CNH` - Chinese Yuan (offshore) + * `COP` - Colombian Peso + * `COU` - Colombian Real Value Unit + * `KMF` - Comorian Franc + * `CDF` - Congolese Franc + * `CRC` - Costa Rican Colón + * `HRD` - Croatian Dinar + * `HRK` - Croatian Kuna + * `CUC` - Cuban Convertible Peso + * `CUP` - Cuban Peso + * `CYP` - Cypriot Pound + * `CZK` - Czech Koruna + * `CSK` - Czechoslovak Hard Koruna + * `DKK` - Danish Krone + * `DJF` - Djiboutian Franc + * `DOP` - Dominican Peso + * `NLG` - Dutch Guilder + * `XCD` - East Caribbean Dollar + * `DDM` - East German Mark + * `ECS` - Ecuadorian Sucre + * `ECV` - Ecuadorian Unit of Constant Value + * `EGP` - Egyptian Pound + * `GQE` - Equatorial Guinean Ekwele + * `ERN` - Eritrean Nakfa + * `EEK` - Estonian Kroon + * `ETB` - Ethiopian Birr + * `EUR` - Euro + * `XBA` - European Composite Unit + * `XEU` - European Currency Unit + * `XBB` - European Monetary Unit + * `XBC` - European Unit of Account (XBC) + * `XBD` - European Unit of Account (XBD) + * `FKP` - Falkland Islands Pound + * `FJD` - Fijian Dollar + * `FIM` - Finnish Markka + * `FRF` - French Franc + * `XFO` - French Gold Franc + * `XFU` - French UIC-Franc + * `GMD` - Gambian Dalasi + * `GEK` - Georgian Kupon Larit + * `GEL` - Georgian Lari + * `DEM` - German Mark + * `GHS` - Ghanaian Cedi + * `GHC` - Ghanaian Cedi (1979–2007) + * `GIP` - Gibraltar Pound + * `XAU` - Gold + * `GRD` - Greek Drachma + * `GTQ` - Guatemalan Quetzal + * `GWP` - Guinea-Bissau Peso + * `GNF` - Guinean Franc + * `GNS` - Guinean Syli + * `GYD` - Guyanaese Dollar + * `HTG` - Haitian Gourde + * `HNL` - Honduran Lempira + * `HKD` - Hong Kong Dollar + * `HUF` - Hungarian Forint + * `IMP` - IMP + * `ISK` - Icelandic Króna + * `ISJ` - Icelandic Króna (1918–1981) + * `INR` - Indian Rupee + * `IDR` - Indonesian Rupiah + * `IRR` - Iranian Rial + * `IQD` - Iraqi Dinar + * `IEP` - Irish Pound + * `ILS` - Israeli New Shekel + * `ILP` - Israeli Pound + * `ILR` - Israeli Shekel (1980–1985) + * `ITL` - Italian Lira + * `JMD` - Jamaican Dollar + * `JPY` - Japanese Yen + * `JOD` - Jordanian Dinar + * `KZT` - Kazakhstani Tenge + * `KES` - Kenyan Shilling + * `KWD` - Kuwaiti Dinar + * `KGS` - Kyrgystani Som + * `LAK` - Laotian Kip + * `LVL` - Latvian Lats + * `LVR` - Latvian Ruble + * `LBP` - Lebanese Pound + * `LSL` - Lesotho Loti + * `LRD` - Liberian Dollar + * `LYD` - Libyan Dinar + * `LTL` - Lithuanian Litas + * `LTT` - Lithuanian Talonas + * `LUL` - Luxembourg Financial Franc + * `LUC` - Luxembourgian Convertible Franc + * `LUF` - Luxembourgian Franc + * `MOP` - Macanese Pataca + * `MKD` - Macedonian Denar + * `MKN` - Macedonian Denar (1992–1993) + * `MGA` - Malagasy Ariary + * `MGF` - Malagasy Franc + * `MWK` - Malawian Kwacha + * `MYR` - Malaysian Ringgit + * `MVR` - Maldivian Rufiyaa + * `MVP` - Maldivian Rupee (1947–1981) + * `MLF` - Malian Franc + * `MTL` - Maltese Lira + * `MTP` - Maltese Pound + * `MRU` - Mauritanian Ouguiya + * `MRO` - Mauritanian Ouguiya (1973–2017) + * `MUR` - Mauritian Rupee + * `MXV` - Mexican Investment Unit + * `MXN` - Mexican Peso + * `MXP` - Mexican Silver Peso (1861–1992) + * `MDC` - Moldovan Cupon + * `MDL` - Moldovan Leu + * `MCF` - Monegasque Franc + * `MNT` - Mongolian Tugrik + * `MAD` - Moroccan Dirham + * `MAF` - Moroccan Franc + * `MZE` - Mozambican Escudo + * `MZN` - Mozambican Metical + * `MZM` - Mozambican Metical (1980–2006) + * `MMK` - Myanmar Kyat + * `NAD` - Namibian Dollar + * `NPR` - Nepalese Rupee + * `ANG` - Netherlands Antillean Guilder + * `TWD` - New Taiwan Dollar + * `NZD` - New Zealand Dollar + * `NIO` - Nicaraguan Córdoba + * `NIC` - Nicaraguan Córdoba (1988–1991) + * `NGN` - Nigerian Naira + * `KPW` - North Korean Won + * `NOK` - Norwegian Krone + * `OMR` - Omani Rial + * `PKR` - Pakistani Rupee + * `XPD` - Palladium + * `PAB` - Panamanian Balboa + * `PGK` - Papua New Guinean Kina + * `PYG` - Paraguayan Guarani + * `PEI` - Peruvian Inti + * `PEN` - Peruvian Sol + * `PES` - Peruvian Sol (1863–1965) + * `PHP` - Philippine Peso + * `XPT` - Platinum + * `PLN` - Polish Zloty + * `PLZ` - Polish Zloty (1950–1995) + * `PTE` - Portuguese Escudo + * `GWE` - Portuguese Guinea Escudo + * `QAR` - Qatari Rial + * `XRE` - RINET Funds + * `RHD` - Rhodesian Dollar + * `RON` - Romanian Leu + * `ROL` - Romanian Leu (1952–2006) + * `RUB` - Russian Ruble + * `RUR` - Russian Ruble (1991–1998) + * `RWF` - Rwandan Franc + * `SVC` - Salvadoran Colón + * `WST` - Samoan Tala + * `SAR` - Saudi Riyal + * `RSD` - Serbian Dinar + * `CSD` - Serbian Dinar (2002–2006) + * `SCR` - Seychellois Rupee + * `SLL` - Sierra Leonean Leone + * `XAG` - Silver + * `SGD` - Singapore Dollar + * `SKK` - Slovak Koruna + * `SIT` - Slovenian Tolar + * `SBD` - Solomon Islands Dollar + * `SOS` - Somali Shilling + * `ZAR` - South African Rand + * `ZAL` - South African Rand (financial) + * `KRH` - South Korean Hwan (1953–1962) + * `KRW` - South Korean Won + * `KRO` - South Korean Won (1945–1953) + * `SSP` - South Sudanese Pound + * `SUR` - Soviet Rouble + * `ESP` - Spanish Peseta + * `ESA` - Spanish Peseta (A account) + * `ESB` - Spanish Peseta (convertible account) + * `XDR` - Special Drawing Rights + * `LKR` - Sri Lankan Rupee + * `SHP` - St. Helena Pound + * `XSU` - Sucre + * `SDD` - Sudanese Dinar (1992–2007) + * `SDG` - Sudanese Pound + * `SDP` - Sudanese Pound (1957–1998) + * `SRD` - Surinamese Dollar + * `SRG` - Surinamese Guilder + * `SZL` - Swazi Lilangeni + * `SEK` - Swedish Krona + * `CHF` - Swiss Franc + * `SYP` - Syrian Pound + * `STN` - São Tomé & Príncipe Dobra + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + * `TVD` - TVD + * `TJR` - Tajikistani Ruble + * `TJS` - Tajikistani Somoni + * `TZS` - Tanzanian Shilling + * `XTS` - Testing Currency Code + * `THB` - Thai Baht + * `XXX` - The codes assigned for transactions where no currency is involved + * `TPE` - Timorese Escudo + * `TOP` - Tongan Paʻanga + * `TTD` - Trinidad & Tobago Dollar + * `TND` - Tunisian Dinar + * `TRY` - Turkish Lira + * `TRL` - Turkish Lira (1922–2005) + * `TMT` - Turkmenistani Manat + * `TMM` - Turkmenistani Manat (1993–2009) + * `USD` - US Dollar + * `USN` - US Dollar (Next day) + * `USS` - US Dollar (Same day) + * `UGX` - Ugandan Shilling + * `UGS` - Ugandan Shilling (1966–1987) + * `UAH` - Ukrainian Hryvnia + * `UAK` - Ukrainian Karbovanets + * `AED` - United Arab Emirates Dirham + * `UYW` - Uruguayan Nominal Wage Index Unit + * `UYU` - Uruguayan Peso + * `UYP` - Uruguayan Peso (1975–1993) + * `UYI` - Uruguayan Peso (Indexed Units) + * `UZS` - Uzbekistani Som + * `VUV` - Vanuatu Vatu + * `VES` - Venezuelan Bolívar + * `VEB` - Venezuelan Bolívar (1871–2008) + * `VEF` - Venezuelan Bolívar (2008–2018) + * `VND` - Vietnamese Dong + * `VNN` - Vietnamese Dong (1978–1985) + * `CHE` - WIR Euro + * `CHW` - WIR Franc + * `XOF` - West African CFA Franc + * `YDD` - Yemeni Dinar + * `YER` - Yemeni Rial + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + * `YUM` - Yugoslavian New Dinar (1994–2002) + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + * `ZWN` - ZWN + * `ZRN` - Zairean New Zaire (1993–1998) + * `ZRZ` - Zairean Zaire (1971–1993) + * `ZMW` - Zambian Kwacha + * `ZMK` - Zambian Kwacha (1968–2012) + * `ZWD` - Zimbabwean Dollar (1980–2008) + * `ZWR` - Zimbabwean Dollar (2008) + * `ZWL` - Zimbabwean Dollar (2009) + example: USD + exchange_rate: + type: string + format: decimal + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + nullable: true + description: The line item's exchange rate. + example: '2.9' + item: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Item' + nullable: true + example: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + x-merge-expands-to: Item + account: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Account' + nullable: true + example: cd0f32d4-a493-11ec-b909-0242ac120002 + x-merge-expands-to: Account + tax_rate: + type: string + format: uuid + nullable: true + example: a12e7c20-1922-9df7-s75n-edfeewnn7384 + description: The tax rate that applies to this line item. + tracking_category: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/TrackingCategory' + nullable: true + deprecated: true + x-merge-expands-to: TrackingCategory + tracking_categories: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/TrackingCategory' + nullable: true + example: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + description: The invoice line item's associated tracking categories. + x-merge-expands-to: TrackingCategory + company: + type: string + format: uuid + nullable: true + description: The company the invoice belongs to. + example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + remote_fields: + type: array + items: + $ref: '#/components/schemas/RemoteFieldRequest' + writeOnly: true + x-merge-expands: '{"account": "Account", "contact": "Contact", "item": "Item", + "project": "Project", "tracking_categories": "TrackingCategory", "tracking_category": + "TrackingCategory"}' + x-merge-category: accounting + InvoiceRequest: + type: object + description: |- + # The Invoice Object + ### Description + The `Invoice` object represents an itemized record of goods and/or services sold to a customer or bought from a vendor. + + + Represents a Bill when the `Invoice` type is `ACCOUNTS_PAYABLE`. References an Invoice when the `Invoice` type is `ACCOUNTS_RECEIVABLE`. + + ### Usage Example + Fetch from the `LIST Invoices` endpoint and view a company's invoices. + properties: + type: + oneOf: + - $ref: '#/components/schemas/InvoiceTypeEnum' + - type: string + nullable: true + description: |- + Whether the invoice is an accounts receivable or accounts payable. If `type` is `ACCOUNTS_PAYABLE`, the invoice is a bill. If `type` is `ACCOUNTS_RECEIVABLE`, it is an invoice. + + * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE + * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE + contact: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Contact' + nullable: true + description: The invoice's contact. + x-merge-expands-to: Contact + number: + type: string + nullable: true + description: The invoice's number. + issue_date: + type: string + format: date-time + nullable: true + description: The invoice's issue date. + due_date: + type: string + format: date-time + nullable: true + description: The invoice's due date. + paid_on_date: + type: string + format: date-time + nullable: true + description: The invoice's paid date. + employee: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Employee' + nullable: true + description: The employee this overall transaction relates to. + x-merge-expands-to: Employee + memo: + type: string + nullable: true + description: The invoice's private note. + status: + oneOf: + - $ref: '#/components/schemas/InvoiceStatusEnum' + - type: string + nullable: true + description: |- + The status of the invoice. + + * `PAID` - PAID + * `DRAFT` - DRAFT + * `SUBMITTED` - SUBMITTED + * `PARTIALLY_PAID` - PARTIALLY_PAID + * `OPEN` - OPEN + * `VOID` - VOID + company: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/CompanyInfo' + nullable: true + description: The company the invoice belongs to. + x-merge-expands-to: CompanyInfo + currency: + oneOf: + - $ref: '#/components/schemas/TransactionCurrencyEnum' + - type: string + nullable: true + description: |- + The invoice's currency. + + * `XUA` - ADB Unit of Account + * `AFN` - Afghan Afghani + * `AFA` - Afghan Afghani (1927–2002) + * `ALL` - Albanian Lek + * `ALK` - Albanian Lek (1946–1965) + * `DZD` - Algerian Dinar + * `ADP` - Andorran Peseta + * `AOA` - Angolan Kwanza + * `AOK` - Angolan Kwanza (1977–1991) + * `AON` - Angolan New Kwanza (1990–2000) + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + * `ARA` - Argentine Austral + * `ARS` - Argentine Peso + * `ARM` - Argentine Peso (1881–1970) + * `ARP` - Argentine Peso (1983–1985) + * `ARL` - Argentine Peso Ley (1970–1983) + * `AMD` - Armenian Dram + * `AWG` - Aruban Florin + * `AUD` - Australian Dollar + * `ATS` - Austrian Schilling + * `AZN` - Azerbaijani Manat + * `AZM` - Azerbaijani Manat (1993–2006) + * `BSD` - Bahamian Dollar + * `BHD` - Bahraini Dinar + * `BDT` - Bangladeshi Taka + * `BBD` - Barbadian Dollar + * `BYN` - Belarusian Ruble + * `BYB` - Belarusian Ruble (1994–1999) + * `BYR` - Belarusian Ruble (2000–2016) + * `BEF` - Belgian Franc + * `BEC` - Belgian Franc (convertible) + * `BEL` - Belgian Franc (financial) + * `BZD` - Belize Dollar + * `BMD` - Bermudan Dollar + * `BTN` - Bhutanese Ngultrum + * `BOB` - Bolivian Boliviano + * `BOL` - Bolivian Boliviano (1863–1963) + * `BOV` - Bolivian Mvdol + * `BOP` - Bolivian Peso + * `BAM` - Bosnia-Herzegovina Convertible Mark + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + * `BWP` - Botswanan Pula + * `BRC` - Brazilian Cruzado (1986–1989) + * `BRZ` - Brazilian Cruzeiro (1942–1967) + * `BRE` - Brazilian Cruzeiro (1990–1993) + * `BRR` - Brazilian Cruzeiro (1993–1994) + * `BRN` - Brazilian New Cruzado (1989–1990) + * `BRB` - Brazilian New Cruzeiro (1967–1986) + * `BRL` - Brazilian Real + * `GBP` - British Pound + * `BND` - Brunei Dollar + * `BGL` - Bulgarian Hard Lev + * `BGN` - Bulgarian Lev + * `BGO` - Bulgarian Lev (1879–1952) + * `BGM` - Bulgarian Socialist Lev + * `BUK` - Burmese Kyat + * `BIF` - Burundian Franc + * `XPF` - CFP Franc + * `KHR` - Cambodian Riel + * `CAD` - Canadian Dollar + * `CVE` - Cape Verdean Escudo + * `KYD` - Cayman Islands Dollar + * `XAF` - Central African CFA Franc + * `CLE` - Chilean Escudo + * `CLP` - Chilean Peso + * `CLF` - Chilean Unit of Account (UF) + * `CNX` - Chinese People’s Bank Dollar + * `CNY` - Chinese Yuan + * `CNH` - Chinese Yuan (offshore) + * `COP` - Colombian Peso + * `COU` - Colombian Real Value Unit + * `KMF` - Comorian Franc + * `CDF` - Congolese Franc + * `CRC` - Costa Rican Colón + * `HRD` - Croatian Dinar + * `HRK` - Croatian Kuna + * `CUC` - Cuban Convertible Peso + * `CUP` - Cuban Peso + * `CYP` - Cypriot Pound + * `CZK` - Czech Koruna + * `CSK` - Czechoslovak Hard Koruna + * `DKK` - Danish Krone + * `DJF` - Djiboutian Franc + * `DOP` - Dominican Peso + * `NLG` - Dutch Guilder + * `XCD` - East Caribbean Dollar + * `DDM` - East German Mark + * `ECS` - Ecuadorian Sucre + * `ECV` - Ecuadorian Unit of Constant Value + * `EGP` - Egyptian Pound + * `GQE` - Equatorial Guinean Ekwele + * `ERN` - Eritrean Nakfa + * `EEK` - Estonian Kroon + * `ETB` - Ethiopian Birr + * `EUR` - Euro + * `XBA` - European Composite Unit + * `XEU` - European Currency Unit + * `XBB` - European Monetary Unit + * `XBC` - European Unit of Account (XBC) + * `XBD` - European Unit of Account (XBD) + * `FKP` - Falkland Islands Pound + * `FJD` - Fijian Dollar + * `FIM` - Finnish Markka + * `FRF` - French Franc + * `XFO` - French Gold Franc + * `XFU` - French UIC-Franc + * `GMD` - Gambian Dalasi + * `GEK` - Georgian Kupon Larit + * `GEL` - Georgian Lari + * `DEM` - German Mark + * `GHS` - Ghanaian Cedi + * `GHC` - Ghanaian Cedi (1979–2007) + * `GIP` - Gibraltar Pound + * `XAU` - Gold + * `GRD` - Greek Drachma + * `GTQ` - Guatemalan Quetzal + * `GWP` - Guinea-Bissau Peso + * `GNF` - Guinean Franc + * `GNS` - Guinean Syli + * `GYD` - Guyanaese Dollar + * `HTG` - Haitian Gourde + * `HNL` - Honduran Lempira + * `HKD` - Hong Kong Dollar + * `HUF` - Hungarian Forint + * `IMP` - IMP + * `ISK` - Icelandic Króna + * `ISJ` - Icelandic Króna (1918–1981) + * `INR` - Indian Rupee + * `IDR` - Indonesian Rupiah + * `IRR` - Iranian Rial + * `IQD` - Iraqi Dinar + * `IEP` - Irish Pound + * `ILS` - Israeli New Shekel + * `ILP` - Israeli Pound + * `ILR` - Israeli Shekel (1980–1985) + * `ITL` - Italian Lira + * `JMD` - Jamaican Dollar + * `JPY` - Japanese Yen + * `JOD` - Jordanian Dinar + * `KZT` - Kazakhstani Tenge + * `KES` - Kenyan Shilling + * `KWD` - Kuwaiti Dinar + * `KGS` - Kyrgystani Som + * `LAK` - Laotian Kip + * `LVL` - Latvian Lats + * `LVR` - Latvian Ruble + * `LBP` - Lebanese Pound + * `LSL` - Lesotho Loti + * `LRD` - Liberian Dollar + * `LYD` - Libyan Dinar + * `LTL` - Lithuanian Litas + * `LTT` - Lithuanian Talonas + * `LUL` - Luxembourg Financial Franc + * `LUC` - Luxembourgian Convertible Franc + * `LUF` - Luxembourgian Franc + * `MOP` - Macanese Pataca + * `MKD` - Macedonian Denar + * `MKN` - Macedonian Denar (1992–1993) + * `MGA` - Malagasy Ariary + * `MGF` - Malagasy Franc + * `MWK` - Malawian Kwacha + * `MYR` - Malaysian Ringgit + * `MVR` - Maldivian Rufiyaa + * `MVP` - Maldivian Rupee (1947–1981) + * `MLF` - Malian Franc + * `MTL` - Maltese Lira + * `MTP` - Maltese Pound + * `MRU` - Mauritanian Ouguiya + * `MRO` - Mauritanian Ouguiya (1973–2017) + * `MUR` - Mauritian Rupee + * `MXV` - Mexican Investment Unit + * `MXN` - Mexican Peso + * `MXP` - Mexican Silver Peso (1861–1992) + * `MDC` - Moldovan Cupon + * `MDL` - Moldovan Leu + * `MCF` - Monegasque Franc + * `MNT` - Mongolian Tugrik + * `MAD` - Moroccan Dirham + * `MAF` - Moroccan Franc + * `MZE` - Mozambican Escudo + * `MZN` - Mozambican Metical + * `MZM` - Mozambican Metical (1980–2006) + * `MMK` - Myanmar Kyat + * `NAD` - Namibian Dollar + * `NPR` - Nepalese Rupee + * `ANG` - Netherlands Antillean Guilder + * `TWD` - New Taiwan Dollar + * `NZD` - New Zealand Dollar + * `NIO` - Nicaraguan Córdoba + * `NIC` - Nicaraguan Córdoba (1988–1991) + * `NGN` - Nigerian Naira + * `KPW` - North Korean Won + * `NOK` - Norwegian Krone + * `OMR` - Omani Rial + * `PKR` - Pakistani Rupee + * `XPD` - Palladium + * `PAB` - Panamanian Balboa + * `PGK` - Papua New Guinean Kina + * `PYG` - Paraguayan Guarani + * `PEI` - Peruvian Inti + * `PEN` - Peruvian Sol + * `PES` - Peruvian Sol (1863–1965) + * `PHP` - Philippine Peso + * `XPT` - Platinum + * `PLN` - Polish Zloty + * `PLZ` - Polish Zloty (1950–1995) + * `PTE` - Portuguese Escudo + * `GWE` - Portuguese Guinea Escudo + * `QAR` - Qatari Rial + * `XRE` - RINET Funds + * `RHD` - Rhodesian Dollar + * `RON` - Romanian Leu + * `ROL` - Romanian Leu (1952–2006) + * `RUB` - Russian Ruble + * `RUR` - Russian Ruble (1991–1998) + * `RWF` - Rwandan Franc + * `SVC` - Salvadoran Colón + * `WST` - Samoan Tala + * `SAR` - Saudi Riyal + * `RSD` - Serbian Dinar + * `CSD` - Serbian Dinar (2002–2006) + * `SCR` - Seychellois Rupee + * `SLL` - Sierra Leonean Leone + * `XAG` - Silver + * `SGD` - Singapore Dollar + * `SKK` - Slovak Koruna + * `SIT` - Slovenian Tolar + * `SBD` - Solomon Islands Dollar + * `SOS` - Somali Shilling + * `ZAR` - South African Rand + * `ZAL` - South African Rand (financial) + * `KRH` - South Korean Hwan (1953–1962) + * `KRW` - South Korean Won + * `KRO` - South Korean Won (1945–1953) + * `SSP` - South Sudanese Pound + * `SUR` - Soviet Rouble + * `ESP` - Spanish Peseta + * `ESA` - Spanish Peseta (A account) + * `ESB` - Spanish Peseta (convertible account) + * `XDR` - Special Drawing Rights + * `LKR` - Sri Lankan Rupee + * `SHP` - St. Helena Pound + * `XSU` - Sucre + * `SDD` - Sudanese Dinar (1992–2007) + * `SDG` - Sudanese Pound + * `SDP` - Sudanese Pound (1957–1998) + * `SRD` - Surinamese Dollar + * `SRG` - Surinamese Guilder + * `SZL` - Swazi Lilangeni + * `SEK` - Swedish Krona + * `CHF` - Swiss Franc + * `SYP` - Syrian Pound + * `STN` - São Tomé & Príncipe Dobra + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + * `TVD` - TVD + * `TJR` - Tajikistani Ruble + * `TJS` - Tajikistani Somoni + * `TZS` - Tanzanian Shilling + * `XTS` - Testing Currency Code + * `THB` - Thai Baht + * `XXX` - The codes assigned for transactions where no currency is involved + * `TPE` - Timorese Escudo + * `TOP` - Tongan Paʻanga + * `TTD` - Trinidad & Tobago Dollar + * `TND` - Tunisian Dinar + * `TRY` - Turkish Lira + * `TRL` - Turkish Lira (1922–2005) + * `TMT` - Turkmenistani Manat + * `TMM` - Turkmenistani Manat (1993–2009) + * `USD` - US Dollar + * `USN` - US Dollar (Next day) + * `USS` - US Dollar (Same day) + * `UGX` - Ugandan Shilling + * `UGS` - Ugandan Shilling (1966–1987) + * `UAH` - Ukrainian Hryvnia + * `UAK` - Ukrainian Karbovanets + * `AED` - United Arab Emirates Dirham + * `UYW` - Uruguayan Nominal Wage Index Unit + * `UYU` - Uruguayan Peso + * `UYP` - Uruguayan Peso (1975–1993) + * `UYI` - Uruguayan Peso (Indexed Units) + * `UZS` - Uzbekistani Som + * `VUV` - Vanuatu Vatu + * `VES` - Venezuelan Bolívar + * `VEB` - Venezuelan Bolívar (1871–2008) + * `VEF` - Venezuelan Bolívar (2008–2018) + * `VND` - Vietnamese Dong + * `VNN` - Vietnamese Dong (1978–1985) + * `CHE` - WIR Euro + * `CHW` - WIR Franc + * `XOF` - West African CFA Franc + * `YDD` - Yemeni Dinar + * `YER` - Yemeni Rial + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + * `YUM` - Yugoslavian New Dinar (1994–2002) + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + * `ZWN` - ZWN + * `ZRN` - Zairean New Zaire (1993–1998) + * `ZRZ` - Zairean Zaire (1971–1993) + * `ZMW` - Zambian Kwacha + * `ZMK` - Zambian Kwacha (1968–2012) + * `ZWD` - Zimbabwean Dollar (1980–2008) + * `ZWR` - Zimbabwean Dollar (2008) + * `ZWL` - Zimbabwean Dollar (2009) + exchange_rate: + type: string + format: decimal + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + nullable: true + description: The invoice's exchange rate. + total_discount: + type: number + format: double + nullable: true + description: The total discounts applied to the total cost. + sub_total: + type: number + format: double + nullable: true + description: The total amount being paid before taxes. + payment_term: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/PaymentTerm' + nullable: true + description: The payment term that applies to this transaction. + x-merge-expands-to: PaymentTerm + total_tax_amount: + type: number + format: double + nullable: true + description: The total amount being paid in taxes. + inclusive_of_tax: + type: boolean + nullable: true + description: If the transaction is inclusive or exclusive of tax. `True` + if inclusive, `False` if exclusive. + total_amount: + type: number + format: double + nullable: true + description: The invoice's total amount. + balance: + type: number + format: double + nullable: true + description: The invoice's remaining balance. + payments: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Payment' + nullable: true + description: Array of `Payment` object IDs. + x-merge-expands-to: Payment + tracking_categories: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/TrackingCategory' + nullable: true + x-merge-expands-to: TrackingCategory + line_items: + type: array + items: + $ref: '#/components/schemas/InvoiceLineItemRequest' + x-merge-expands-to: InvoiceLineItem + purchase_orders: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/PurchaseOrder' + nullable: true + x-merge-expands-to: PurchaseOrder + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + remote_fields: + type: array + items: + $ref: '#/components/schemas/RemoteFieldRequest' + writeOnly: true + x-merge-expands: '{"accounting_period": "AccountingPeriod", "applied_credit_notes": + "CreditNoteApplyLineForInvoice", "applied_payments": "PaymentLineItemWithPayment", + "applied_vendor_credits": "VendorCreditApplyLineForInvoice", "company": "CompanyInfo", + "contact": "Contact", "employee": "Employee", "line_items": "InvoiceLineItem", + "payment_term": "PaymentTerm", "payments": "Payment", "purchase_orders": "PurchaseOrder", + "tracking_categories": "TrackingCategory"}' + x-merge-category: accounting + InvoiceResponse: + type: object + properties: + model: + $ref: '#/components/schemas/Invoice' + warnings: + type: array + items: + $ref: '#/components/schemas/WarningValidationProblem' + errors: + type: array + items: + $ref: '#/components/schemas/ErrorValidationProblem' + logs: + type: array + items: + $ref: '#/components/schemas/DebugModeLog' + required: + - errors + - model + - warnings + x-merge-category: accounting + InvoiceStatusEnum: + enum: + - PAID + - DRAFT + - SUBMITTED + - PARTIALLY_PAID + - OPEN + - VOID + type: string + description: |- + * `PAID` - PAID + * `DRAFT` - DRAFT + * `SUBMITTED` - SUBMITTED + * `PARTIALLY_PAID` - PARTIALLY_PAID + * `OPEN` - OPEN + * `VOID` - VOID + x-merge-category: accounting + InvoiceTypeEnum: + enum: + - ACCOUNTS_RECEIVABLE + - ACCOUNTS_PAYABLE + type: string + description: |- + * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE + * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE + x-merge-category: accounting + Issue: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + status: + oneOf: + - $ref: '#/components/schemas/IssueStatusEnum' + - type: string + description: |- + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + example: ONGOING + error_description: + type: string + example: Missing Permissions + end_user: + type: object + additionalProperties: {} + readOnly: true + example: b82302de-852e-4e60-b050-edf9da3b7c02 + first_incident_time: + type: string + format: date-time + nullable: true + example: '2022-12-05T16:19:15.161Z' + last_incident_time: + type: string + format: date-time + nullable: true + example: '2022-12-05T16:19:15.161Z' + is_muted: + type: boolean + readOnly: true + example: true + error_details: + type: array + items: + type: string + readOnly: true + example: + - Missing employee permissions. + - Missing time off permissions. + required: + - error_description + x-merge-category: accounting + IssueStatusEnum: + enum: + - ONGOING + - RESOLVED + type: string + description: |- + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + x-merge-category: accounting + Item: + type: object + description: |- + # The Item Object + ### Description + The `Item` object refers to the goods involved in a transaction. + + ### Usage Example + Fetch from the `LIST Items` endpoint and view a company's items. + properties: + id: + type: string + format: uuid + readOnly: true + example: d2f972d0-2526-434b-9409-4c3b468e08f0 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '12374' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + name: + type: string + nullable: true + description: The item's name. + example: Pickleball Paddle + status: + oneOf: + - $ref: '#/components/schemas/Status7d1Enum' + - type: string + nullable: true + description: |- + The item's status. + + * `ACTIVE` - ACTIVE + * `ARCHIVED` - ARCHIVED + example: ACTIVE + type: + oneOf: + - $ref: '#/components/schemas/Type2bbEnum' + - type: string + nullable: true + description: |- + The item's type. + + * `INVENTORY` - INVENTORY + * `NON_INVENTORY` - NON_INVENTORY + * `SERVICE` - SERVICE + * `UNKNOWN` - UNKNOWN + example: INVENTORY + unit_price: + type: number + format: double + nullable: true + description: The item's unit price. + example: 10 + purchase_price: + type: number + format: double + nullable: true + description: The price at which the item is purchased from a vendor. + example: 25 + purchase_account: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Account' + nullable: true + description: References the default account used to record a purchase of + the item. + example: 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 + x-merge-expands-to: Account + sales_account: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Account' + nullable: true + description: References the default account used to record a sale. + example: 3872b4c9-f5d2-4f3b-a66b-dfedbed42c49 + x-merge-expands-to: Account + company: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/CompanyInfo' + nullable: true + description: The company the item belongs to. + example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + x-merge-expands-to: CompanyInfo + purchase_tax_rate: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/TaxRate' + nullable: true + description: The default purchase tax rate for this item. + example: 983e8f97-9qw2-34v9-p123-67bdf98740v5 + x-merge-expands-to: TaxRate + sales_tax_rate: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/TaxRate' + nullable: true + description: The default sales tax rate for this item. + example: 232c8f56-7se4-98f2-y334-12bdf89249f5 + x-merge-expands-to: TaxRate + remote_updated_at: + type: string + format: date-time + nullable: true + description: When the third party's item note was updated. + example: '2020-03-31T00:00:00Z' + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /actions + data: + - Varies by platform + x-merge-expands: '{"company": "CompanyInfo", "purchase_account": "Account", + "purchase_tax_rate": "TaxRate", "sales_account": "Account", "sales_tax_rate": + "TaxRate"}' + x-merge-category: accounting + ItemEndpointRequest: + type: object + properties: + model: + $ref: '#/components/schemas/ItemRequestRequest' + required: + - model + x-merge-category: accounting + ItemFormatEnum: + enum: + - string + - number + - date + - datetime + - bool + - list + type: string + description: |- + * `string` - uuid + * `number` - url + * `date` - email + * `datetime` - phone + * `bool` - currency + * `list` - decimal + x-merge-category: accounting + ItemRequestRequest: + type: object + description: |- + # The Item Object + ### Description + The `Item` object refers to the goods involved in a transaction. + + ### Usage Example + Fetch from the `LIST Items` endpoint and view a company's items. + properties: + name: + type: string + nullable: true + description: The item's name. + example: Pickleball Paddle + status: + oneOf: + - $ref: '#/components/schemas/Status7d1Enum' + - type: string + nullable: true + description: |- + The item's status. + + * `ACTIVE` - ACTIVE + * `ARCHIVED` - ARCHIVED + example: ACTIVE + type: + oneOf: + - $ref: '#/components/schemas/Type2bbEnum' + - type: string + nullable: true + description: |- + The item's type. + + * `INVENTORY` - INVENTORY + * `NON_INVENTORY` - NON_INVENTORY + * `SERVICE` - SERVICE + * `UNKNOWN` - UNKNOWN + example: INVENTORY + unit_price: + type: number + format: double + nullable: true + description: The item's unit price. + example: 10 + purchase_price: + type: number + format: double + nullable: true + description: The price at which the item is purchased from a vendor. + example: 25 + purchase_account: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Account' + nullable: true + description: References the default account used to record a purchase of + the item. + example: 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 + x-merge-expands-to: Account + sales_account: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Account' + nullable: true + description: References the default account used to record a sale. + example: 3872b4c9-f5d2-4f3b-a66b-dfedbed42c49 + x-merge-expands-to: Account + company: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/CompanyInfo' + nullable: true + description: The company the item belongs to. + example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + x-merge-expands-to: CompanyInfo + purchase_tax_rate: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/TaxRate' + nullable: true + description: The default purchase tax rate for this item. + example: 983e8f97-9qw2-34v9-p123-67bdf98740v5 + x-merge-expands-to: TaxRate + sales_tax_rate: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/TaxRate' + nullable: true + description: The default sales tax rate for this item. + example: 232c8f56-7se4-98f2-y334-12bdf89249f5 + x-merge-expands-to: TaxRate + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + x-merge-expands: '{"company": "CompanyInfo", "purchase_account": "Account", + "purchase_tax_rate": "TaxRate", "sales_account": "Account", "sales_tax_rate": + "TaxRate"}' + x-merge-category: accounting + ItemResponse: + type: object + properties: + model: + $ref: '#/components/schemas/Item' + warnings: + type: array + items: + $ref: '#/components/schemas/WarningValidationProblem' + errors: + type: array + items: + $ref: '#/components/schemas/ErrorValidationProblem' + logs: + type: array + items: + $ref: '#/components/schemas/DebugModeLog' + required: + - errors + - model + - warnings + x-merge-category: accounting + ItemSchema: + type: object + properties: + item_type: + $ref: '#/components/schemas/ItemTypeEnum' + item_format: + $ref: '#/components/schemas/ItemFormatEnum' + item_choices: + type: array + items: + type: string + x-merge-category: accounting + ItemTypeEnum: + enum: + - string + - number + - date + - datetime + - bool + - list + type: string + description: |- + * `string` - string + * `number` - number + * `date` - date + * `datetime` - datetime + * `bool` - bool + * `list` - list + x-merge-category: accounting + JournalEntry: + type: object + description: |- + # The JournalEntry Object + ### Description + A `JournalEntry` is a record of a transaction or event that is entered into a company's accounting system. + + The `JournalEntry` common model contains records that are automatically created as a result of a certain type of transaction, like an Invoice, and records that are manually created against a company’s ledger. + + The lines of a given `JournalEntry` object should always sum to 0. A positive `net_amount` means the line represents a debit and a negative net_amount represents a credit. + + ### Usage Example + Fetch from the `GET JournalEntry` endpoint and view a company's journey entry. + properties: + id: + type: string + format: uuid + readOnly: true + example: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '088899' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + transaction_date: + type: string + format: date-time + nullable: true + description: The journal entry's transaction date. + example: '2020-03-31T00:00:00Z' + payments: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Payment' + nullable: true + example: + - b26fd49a-cbae-470a-a8f8-bcbc119e0390 + description: Array of `Payment` object IDs. + x-merge-expands-to: Payment + applied_payments: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/PaymentLineItem' + nullable: true + example: + - 4311155d-f236-4a5d-9e0f-1cb167e38f95 + description: A list of the Payment Applied to Lines common models related + to a given Invoice, Credit Note, or Journal Entry. + x-merge-expands-to: PaymentLineItemWithPayment + memo: + type: string + nullable: true + description: The journal entry's private note. + example: Weekly Payment + currency: + oneOf: + - $ref: '#/components/schemas/TransactionCurrencyEnum' + - type: string + nullable: true + description: |- + The journal's currency. + + * `XUA` - ADB Unit of Account + * `AFN` - Afghan Afghani + * `AFA` - Afghan Afghani (1927–2002) + * `ALL` - Albanian Lek + * `ALK` - Albanian Lek (1946–1965) + * `DZD` - Algerian Dinar + * `ADP` - Andorran Peseta + * `AOA` - Angolan Kwanza + * `AOK` - Angolan Kwanza (1977–1991) + * `AON` - Angolan New Kwanza (1990–2000) + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + * `ARA` - Argentine Austral + * `ARS` - Argentine Peso + * `ARM` - Argentine Peso (1881–1970) + * `ARP` - Argentine Peso (1983–1985) + * `ARL` - Argentine Peso Ley (1970–1983) + * `AMD` - Armenian Dram + * `AWG` - Aruban Florin + * `AUD` - Australian Dollar + * `ATS` - Austrian Schilling + * `AZN` - Azerbaijani Manat + * `AZM` - Azerbaijani Manat (1993–2006) + * `BSD` - Bahamian Dollar + * `BHD` - Bahraini Dinar + * `BDT` - Bangladeshi Taka + * `BBD` - Barbadian Dollar + * `BYN` - Belarusian Ruble + * `BYB` - Belarusian Ruble (1994–1999) + * `BYR` - Belarusian Ruble (2000–2016) + * `BEF` - Belgian Franc + * `BEC` - Belgian Franc (convertible) + * `BEL` - Belgian Franc (financial) + * `BZD` - Belize Dollar + * `BMD` - Bermudan Dollar + * `BTN` - Bhutanese Ngultrum + * `BOB` - Bolivian Boliviano + * `BOL` - Bolivian Boliviano (1863–1963) + * `BOV` - Bolivian Mvdol + * `BOP` - Bolivian Peso + * `BAM` - Bosnia-Herzegovina Convertible Mark + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + * `BWP` - Botswanan Pula + * `BRC` - Brazilian Cruzado (1986–1989) + * `BRZ` - Brazilian Cruzeiro (1942–1967) + * `BRE` - Brazilian Cruzeiro (1990–1993) + * `BRR` - Brazilian Cruzeiro (1993–1994) + * `BRN` - Brazilian New Cruzado (1989–1990) + * `BRB` - Brazilian New Cruzeiro (1967–1986) + * `BRL` - Brazilian Real + * `GBP` - British Pound + * `BND` - Brunei Dollar + * `BGL` - Bulgarian Hard Lev + * `BGN` - Bulgarian Lev + * `BGO` - Bulgarian Lev (1879–1952) + * `BGM` - Bulgarian Socialist Lev + * `BUK` - Burmese Kyat + * `BIF` - Burundian Franc + * `XPF` - CFP Franc + * `KHR` - Cambodian Riel + * `CAD` - Canadian Dollar + * `CVE` - Cape Verdean Escudo + * `KYD` - Cayman Islands Dollar + * `XAF` - Central African CFA Franc + * `CLE` - Chilean Escudo + * `CLP` - Chilean Peso + * `CLF` - Chilean Unit of Account (UF) + * `CNX` - Chinese People’s Bank Dollar + * `CNY` - Chinese Yuan + * `CNH` - Chinese Yuan (offshore) + * `COP` - Colombian Peso + * `COU` - Colombian Real Value Unit + * `KMF` - Comorian Franc + * `CDF` - Congolese Franc + * `CRC` - Costa Rican Colón + * `HRD` - Croatian Dinar + * `HRK` - Croatian Kuna + * `CUC` - Cuban Convertible Peso + * `CUP` - Cuban Peso + * `CYP` - Cypriot Pound + * `CZK` - Czech Koruna + * `CSK` - Czechoslovak Hard Koruna + * `DKK` - Danish Krone + * `DJF` - Djiboutian Franc + * `DOP` - Dominican Peso + * `NLG` - Dutch Guilder + * `XCD` - East Caribbean Dollar + * `DDM` - East German Mark + * `ECS` - Ecuadorian Sucre + * `ECV` - Ecuadorian Unit of Constant Value + * `EGP` - Egyptian Pound + * `GQE` - Equatorial Guinean Ekwele + * `ERN` - Eritrean Nakfa + * `EEK` - Estonian Kroon + * `ETB` - Ethiopian Birr + * `EUR` - Euro + * `XBA` - European Composite Unit + * `XEU` - European Currency Unit + * `XBB` - European Monetary Unit + * `XBC` - European Unit of Account (XBC) + * `XBD` - European Unit of Account (XBD) + * `FKP` - Falkland Islands Pound + * `FJD` - Fijian Dollar + * `FIM` - Finnish Markka + * `FRF` - French Franc + * `XFO` - French Gold Franc + * `XFU` - French UIC-Franc + * `GMD` - Gambian Dalasi + * `GEK` - Georgian Kupon Larit + * `GEL` - Georgian Lari + * `DEM` - German Mark + * `GHS` - Ghanaian Cedi + * `GHC` - Ghanaian Cedi (1979–2007) + * `GIP` - Gibraltar Pound + * `XAU` - Gold + * `GRD` - Greek Drachma + * `GTQ` - Guatemalan Quetzal + * `GWP` - Guinea-Bissau Peso + * `GNF` - Guinean Franc + * `GNS` - Guinean Syli + * `GYD` - Guyanaese Dollar + * `HTG` - Haitian Gourde + * `HNL` - Honduran Lempira + * `HKD` - Hong Kong Dollar + * `HUF` - Hungarian Forint + * `IMP` - IMP + * `ISK` - Icelandic Króna + * `ISJ` - Icelandic Króna (1918–1981) + * `INR` - Indian Rupee + * `IDR` - Indonesian Rupiah + * `IRR` - Iranian Rial + * `IQD` - Iraqi Dinar + * `IEP` - Irish Pound + * `ILS` - Israeli New Shekel + * `ILP` - Israeli Pound + * `ILR` - Israeli Shekel (1980–1985) + * `ITL` - Italian Lira + * `JMD` - Jamaican Dollar + * `JPY` - Japanese Yen + * `JOD` - Jordanian Dinar + * `KZT` - Kazakhstani Tenge + * `KES` - Kenyan Shilling + * `KWD` - Kuwaiti Dinar + * `KGS` - Kyrgystani Som + * `LAK` - Laotian Kip + * `LVL` - Latvian Lats + * `LVR` - Latvian Ruble + * `LBP` - Lebanese Pound + * `LSL` - Lesotho Loti + * `LRD` - Liberian Dollar + * `LYD` - Libyan Dinar + * `LTL` - Lithuanian Litas + * `LTT` - Lithuanian Talonas + * `LUL` - Luxembourg Financial Franc + * `LUC` - Luxembourgian Convertible Franc + * `LUF` - Luxembourgian Franc + * `MOP` - Macanese Pataca + * `MKD` - Macedonian Denar + * `MKN` - Macedonian Denar (1992–1993) + * `MGA` - Malagasy Ariary + * `MGF` - Malagasy Franc + * `MWK` - Malawian Kwacha + * `MYR` - Malaysian Ringgit + * `MVR` - Maldivian Rufiyaa + * `MVP` - Maldivian Rupee (1947–1981) + * `MLF` - Malian Franc + * `MTL` - Maltese Lira + * `MTP` - Maltese Pound + * `MRU` - Mauritanian Ouguiya + * `MRO` - Mauritanian Ouguiya (1973–2017) + * `MUR` - Mauritian Rupee + * `MXV` - Mexican Investment Unit + * `MXN` - Mexican Peso + * `MXP` - Mexican Silver Peso (1861–1992) + * `MDC` - Moldovan Cupon + * `MDL` - Moldovan Leu + * `MCF` - Monegasque Franc + * `MNT` - Mongolian Tugrik + * `MAD` - Moroccan Dirham + * `MAF` - Moroccan Franc + * `MZE` - Mozambican Escudo + * `MZN` - Mozambican Metical + * `MZM` - Mozambican Metical (1980–2006) + * `MMK` - Myanmar Kyat + * `NAD` - Namibian Dollar + * `NPR` - Nepalese Rupee + * `ANG` - Netherlands Antillean Guilder + * `TWD` - New Taiwan Dollar + * `NZD` - New Zealand Dollar + * `NIO` - Nicaraguan Córdoba + * `NIC` - Nicaraguan Córdoba (1988–1991) + * `NGN` - Nigerian Naira + * `KPW` - North Korean Won + * `NOK` - Norwegian Krone + * `OMR` - Omani Rial + * `PKR` - Pakistani Rupee + * `XPD` - Palladium + * `PAB` - Panamanian Balboa + * `PGK` - Papua New Guinean Kina + * `PYG` - Paraguayan Guarani + * `PEI` - Peruvian Inti + * `PEN` - Peruvian Sol + * `PES` - Peruvian Sol (1863–1965) + * `PHP` - Philippine Peso + * `XPT` - Platinum + * `PLN` - Polish Zloty + * `PLZ` - Polish Zloty (1950–1995) + * `PTE` - Portuguese Escudo + * `GWE` - Portuguese Guinea Escudo + * `QAR` - Qatari Rial + * `XRE` - RINET Funds + * `RHD` - Rhodesian Dollar + * `RON` - Romanian Leu + * `ROL` - Romanian Leu (1952–2006) + * `RUB` - Russian Ruble + * `RUR` - Russian Ruble (1991–1998) + * `RWF` - Rwandan Franc + * `SVC` - Salvadoran Colón + * `WST` - Samoan Tala + * `SAR` - Saudi Riyal + * `RSD` - Serbian Dinar + * `CSD` - Serbian Dinar (2002–2006) + * `SCR` - Seychellois Rupee + * `SLL` - Sierra Leonean Leone + * `XAG` - Silver + * `SGD` - Singapore Dollar + * `SKK` - Slovak Koruna + * `SIT` - Slovenian Tolar + * `SBD` - Solomon Islands Dollar + * `SOS` - Somali Shilling + * `ZAR` - South African Rand + * `ZAL` - South African Rand (financial) + * `KRH` - South Korean Hwan (1953–1962) + * `KRW` - South Korean Won + * `KRO` - South Korean Won (1945–1953) + * `SSP` - South Sudanese Pound + * `SUR` - Soviet Rouble + * `ESP` - Spanish Peseta + * `ESA` - Spanish Peseta (A account) + * `ESB` - Spanish Peseta (convertible account) + * `XDR` - Special Drawing Rights + * `LKR` - Sri Lankan Rupee + * `SHP` - St. Helena Pound + * `XSU` - Sucre + * `SDD` - Sudanese Dinar (1992–2007) + * `SDG` - Sudanese Pound + * `SDP` - Sudanese Pound (1957–1998) + * `SRD` - Surinamese Dollar + * `SRG` - Surinamese Guilder + * `SZL` - Swazi Lilangeni + * `SEK` - Swedish Krona + * `CHF` - Swiss Franc + * `SYP` - Syrian Pound + * `STN` - São Tomé & Príncipe Dobra + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + * `TVD` - TVD + * `TJR` - Tajikistani Ruble + * `TJS` - Tajikistani Somoni + * `TZS` - Tanzanian Shilling + * `XTS` - Testing Currency Code + * `THB` - Thai Baht + * `XXX` - The codes assigned for transactions where no currency is involved + * `TPE` - Timorese Escudo + * `TOP` - Tongan Paʻanga + * `TTD` - Trinidad & Tobago Dollar + * `TND` - Tunisian Dinar + * `TRY` - Turkish Lira + * `TRL` - Turkish Lira (1922–2005) + * `TMT` - Turkmenistani Manat + * `TMM` - Turkmenistani Manat (1993–2009) + * `USD` - US Dollar + * `USN` - US Dollar (Next day) + * `USS` - US Dollar (Same day) + * `UGX` - Ugandan Shilling + * `UGS` - Ugandan Shilling (1966–1987) + * `UAH` - Ukrainian Hryvnia + * `UAK` - Ukrainian Karbovanets + * `AED` - United Arab Emirates Dirham + * `UYW` - Uruguayan Nominal Wage Index Unit + * `UYU` - Uruguayan Peso + * `UYP` - Uruguayan Peso (1975–1993) + * `UYI` - Uruguayan Peso (Indexed Units) + * `UZS` - Uzbekistani Som + * `VUV` - Vanuatu Vatu + * `VES` - Venezuelan Bolívar + * `VEB` - Venezuelan Bolívar (1871–2008) + * `VEF` - Venezuelan Bolívar (2008–2018) + * `VND` - Vietnamese Dong + * `VNN` - Vietnamese Dong (1978–1985) + * `CHE` - WIR Euro + * `CHW` - WIR Franc + * `XOF` - West African CFA Franc + * `YDD` - Yemeni Dinar + * `YER` - Yemeni Rial + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + * `YUM` - Yugoslavian New Dinar (1994–2002) + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + * `ZWN` - ZWN + * `ZRN` - Zairean New Zaire (1993–1998) + * `ZRZ` - Zairean Zaire (1971–1993) + * `ZMW` - Zambian Kwacha + * `ZMK` - Zambian Kwacha (1968–2012) + * `ZWD` - Zimbabwean Dollar (1980–2008) + * `ZWR` - Zimbabwean Dollar (2008) + * `ZWL` - Zimbabwean Dollar (2009) + example: USD + exchange_rate: + type: string + format: decimal + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + nullable: true + description: The journal entry's exchange rate. + example: '2.9' + company: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/CompanyInfo' + nullable: true + description: The company the journal entry belongs to. + example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + x-merge-expands-to: CompanyInfo + inclusive_of_tax: + type: boolean + nullable: true + description: If the transaction is inclusive or exclusive of tax. `True` + if inclusive, `False` if exclusive. + lines: + type: array + items: + $ref: '#/components/schemas/JournalLine' + readOnly: true + example: + - remote_id: '121222' + account: 9d892439-5fab-4dbb-8bd8-34f7f96c7912 + net_amount: 25.54 + tracking_categories: + - d25d609b-945f-4762-b55a-1c8fb220c43c + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + contact: d2d5ea3c-b032-11ec-b909-0242ac120002 + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + project: 22e65a5d-2df5-4e6e-884a-e538d0339000 + employee: 123c8r35-5kf5-12x5-r833-99bwf35210b5 + description: Cash payment for lunch + exchange_rate: '2.9' + remote_was_deleted: false + - remote_id: '121223' + account: f963f34d-3d2f-4f77-b557-cf36bc7e6498 + net_amount: 10 + x-merge-expands-to: JournalLine + journal_number: + type: string + nullable: true + description: Reference number for identifying journal entries. + maxLength: 70 + example: '42' + tracking_categories: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/TrackingCategory' + nullable: true + example: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + x-merge-expands-to: TrackingCategory + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + posting_status: + oneOf: + - $ref: '#/components/schemas/PostingStatusEnum' + - type: string + nullable: true + description: |- + The journal's posting status. + + * `UNPOSTED` - UNPOSTED + * `POSTED` - POSTED + example: POSTED + accounting_period: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/AccountingPeriod' + nullable: true + description: The accounting period that the JournalEntry was generated in. + example: 655c8f97-2ac4-45b7-b000-41bdf43240b5 + x-merge-expands-to: AccountingPeriod + remote_created_at: + type: string + format: date-time + nullable: true + description: When the third party's journal entry was created. + example: '2020-03-31T00:00:00Z' + remote_updated_at: + type: string + format: date-time + nullable: true + description: When the third party's journal entry was updated. + example: '2020-03-31T00:00:00Z' + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /actions + data: + - Varies by platform + remote_fields: + type: array + items: + $ref: '#/components/schemas/RemoteField' + readOnly: true + x-merge-expands: '{"accounting_period": "AccountingPeriod", "applied_payments": + "PaymentLineItemWithPayment", "company": "CompanyInfo", "lines": "JournalLine", + "payments": "Payment", "tracking_categories": "TrackingCategory"}' + x-merge-category: accounting + JournalEntryEndpointRequest: + type: object + properties: + model: + $ref: '#/components/schemas/JournalEntryRequest' + required: + - model + x-merge-category: accounting + JournalEntryRequest: + type: object + description: |- + # The JournalEntry Object + ### Description + The `JournalEntry` object is used to get a record of all manually created entries made in a company’s general ledger. The journal line items for each journal entry should sum to zero. + + ### Usage Example + Fetch from the `GET JournalEntry` endpoint and view a company's journey entry. + properties: + transaction_date: + type: string + format: date-time + nullable: true + description: The journal entry's transaction date. + payments: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Payment' + nullable: true + description: Array of `Payment` object IDs. + x-merge-expands-to: Payment + memo: + type: string + nullable: true + description: The journal entry's private note. + currency: + oneOf: + - $ref: '#/components/schemas/TransactionCurrencyEnum' + - type: string + nullable: true + description: |- + The journal's currency. + + * `XUA` - ADB Unit of Account + * `AFN` - Afghan Afghani + * `AFA` - Afghan Afghani (1927–2002) + * `ALL` - Albanian Lek + * `ALK` - Albanian Lek (1946–1965) + * `DZD` - Algerian Dinar + * `ADP` - Andorran Peseta + * `AOA` - Angolan Kwanza + * `AOK` - Angolan Kwanza (1977–1991) + * `AON` - Angolan New Kwanza (1990–2000) + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + * `ARA` - Argentine Austral + * `ARS` - Argentine Peso + * `ARM` - Argentine Peso (1881–1970) + * `ARP` - Argentine Peso (1983–1985) + * `ARL` - Argentine Peso Ley (1970–1983) + * `AMD` - Armenian Dram + * `AWG` - Aruban Florin + * `AUD` - Australian Dollar + * `ATS` - Austrian Schilling + * `AZN` - Azerbaijani Manat + * `AZM` - Azerbaijani Manat (1993–2006) + * `BSD` - Bahamian Dollar + * `BHD` - Bahraini Dinar + * `BDT` - Bangladeshi Taka + * `BBD` - Barbadian Dollar + * `BYN` - Belarusian Ruble + * `BYB` - Belarusian Ruble (1994–1999) + * `BYR` - Belarusian Ruble (2000–2016) + * `BEF` - Belgian Franc + * `BEC` - Belgian Franc (convertible) + * `BEL` - Belgian Franc (financial) + * `BZD` - Belize Dollar + * `BMD` - Bermudan Dollar + * `BTN` - Bhutanese Ngultrum + * `BOB` - Bolivian Boliviano + * `BOL` - Bolivian Boliviano (1863–1963) + * `BOV` - Bolivian Mvdol + * `BOP` - Bolivian Peso + * `BAM` - Bosnia-Herzegovina Convertible Mark + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + * `BWP` - Botswanan Pula + * `BRC` - Brazilian Cruzado (1986–1989) + * `BRZ` - Brazilian Cruzeiro (1942–1967) + * `BRE` - Brazilian Cruzeiro (1990–1993) + * `BRR` - Brazilian Cruzeiro (1993–1994) + * `BRN` - Brazilian New Cruzado (1989–1990) + * `BRB` - Brazilian New Cruzeiro (1967–1986) + * `BRL` - Brazilian Real + * `GBP` - British Pound + * `BND` - Brunei Dollar + * `BGL` - Bulgarian Hard Lev + * `BGN` - Bulgarian Lev + * `BGO` - Bulgarian Lev (1879–1952) + * `BGM` - Bulgarian Socialist Lev + * `BUK` - Burmese Kyat + * `BIF` - Burundian Franc + * `XPF` - CFP Franc + * `KHR` - Cambodian Riel + * `CAD` - Canadian Dollar + * `CVE` - Cape Verdean Escudo + * `KYD` - Cayman Islands Dollar + * `XAF` - Central African CFA Franc + * `CLE` - Chilean Escudo + * `CLP` - Chilean Peso + * `CLF` - Chilean Unit of Account (UF) + * `CNX` - Chinese People’s Bank Dollar + * `CNY` - Chinese Yuan + * `CNH` - Chinese Yuan (offshore) + * `COP` - Colombian Peso + * `COU` - Colombian Real Value Unit + * `KMF` - Comorian Franc + * `CDF` - Congolese Franc + * `CRC` - Costa Rican Colón + * `HRD` - Croatian Dinar + * `HRK` - Croatian Kuna + * `CUC` - Cuban Convertible Peso + * `CUP` - Cuban Peso + * `CYP` - Cypriot Pound + * `CZK` - Czech Koruna + * `CSK` - Czechoslovak Hard Koruna + * `DKK` - Danish Krone + * `DJF` - Djiboutian Franc + * `DOP` - Dominican Peso + * `NLG` - Dutch Guilder + * `XCD` - East Caribbean Dollar + * `DDM` - East German Mark + * `ECS` - Ecuadorian Sucre + * `ECV` - Ecuadorian Unit of Constant Value + * `EGP` - Egyptian Pound + * `GQE` - Equatorial Guinean Ekwele + * `ERN` - Eritrean Nakfa + * `EEK` - Estonian Kroon + * `ETB` - Ethiopian Birr + * `EUR` - Euro + * `XBA` - European Composite Unit + * `XEU` - European Currency Unit + * `XBB` - European Monetary Unit + * `XBC` - European Unit of Account (XBC) + * `XBD` - European Unit of Account (XBD) + * `FKP` - Falkland Islands Pound + * `FJD` - Fijian Dollar + * `FIM` - Finnish Markka + * `FRF` - French Franc + * `XFO` - French Gold Franc + * `XFU` - French UIC-Franc + * `GMD` - Gambian Dalasi + * `GEK` - Georgian Kupon Larit + * `GEL` - Georgian Lari + * `DEM` - German Mark + * `GHS` - Ghanaian Cedi + * `GHC` - Ghanaian Cedi (1979–2007) + * `GIP` - Gibraltar Pound + * `XAU` - Gold + * `GRD` - Greek Drachma + * `GTQ` - Guatemalan Quetzal + * `GWP` - Guinea-Bissau Peso + * `GNF` - Guinean Franc + * `GNS` - Guinean Syli + * `GYD` - Guyanaese Dollar + * `HTG` - Haitian Gourde + * `HNL` - Honduran Lempira + * `HKD` - Hong Kong Dollar + * `HUF` - Hungarian Forint + * `IMP` - IMP + * `ISK` - Icelandic Króna + * `ISJ` - Icelandic Króna (1918–1981) + * `INR` - Indian Rupee + * `IDR` - Indonesian Rupiah + * `IRR` - Iranian Rial + * `IQD` - Iraqi Dinar + * `IEP` - Irish Pound + * `ILS` - Israeli New Shekel + * `ILP` - Israeli Pound + * `ILR` - Israeli Shekel (1980–1985) + * `ITL` - Italian Lira + * `JMD` - Jamaican Dollar + * `JPY` - Japanese Yen + * `JOD` - Jordanian Dinar + * `KZT` - Kazakhstani Tenge + * `KES` - Kenyan Shilling + * `KWD` - Kuwaiti Dinar + * `KGS` - Kyrgystani Som + * `LAK` - Laotian Kip + * `LVL` - Latvian Lats + * `LVR` - Latvian Ruble + * `LBP` - Lebanese Pound + * `LSL` - Lesotho Loti + * `LRD` - Liberian Dollar + * `LYD` - Libyan Dinar + * `LTL` - Lithuanian Litas + * `LTT` - Lithuanian Talonas + * `LUL` - Luxembourg Financial Franc + * `LUC` - Luxembourgian Convertible Franc + * `LUF` - Luxembourgian Franc + * `MOP` - Macanese Pataca + * `MKD` - Macedonian Denar + * `MKN` - Macedonian Denar (1992–1993) + * `MGA` - Malagasy Ariary + * `MGF` - Malagasy Franc + * `MWK` - Malawian Kwacha + * `MYR` - Malaysian Ringgit + * `MVR` - Maldivian Rufiyaa + * `MVP` - Maldivian Rupee (1947–1981) + * `MLF` - Malian Franc + * `MTL` - Maltese Lira + * `MTP` - Maltese Pound + * `MRU` - Mauritanian Ouguiya + * `MRO` - Mauritanian Ouguiya (1973–2017) + * `MUR` - Mauritian Rupee + * `MXV` - Mexican Investment Unit + * `MXN` - Mexican Peso + * `MXP` - Mexican Silver Peso (1861–1992) + * `MDC` - Moldovan Cupon + * `MDL` - Moldovan Leu + * `MCF` - Monegasque Franc + * `MNT` - Mongolian Tugrik + * `MAD` - Moroccan Dirham + * `MAF` - Moroccan Franc + * `MZE` - Mozambican Escudo + * `MZN` - Mozambican Metical + * `MZM` - Mozambican Metical (1980–2006) + * `MMK` - Myanmar Kyat + * `NAD` - Namibian Dollar + * `NPR` - Nepalese Rupee + * `ANG` - Netherlands Antillean Guilder + * `TWD` - New Taiwan Dollar + * `NZD` - New Zealand Dollar + * `NIO` - Nicaraguan Córdoba + * `NIC` - Nicaraguan Córdoba (1988–1991) + * `NGN` - Nigerian Naira + * `KPW` - North Korean Won + * `NOK` - Norwegian Krone + * `OMR` - Omani Rial + * `PKR` - Pakistani Rupee + * `XPD` - Palladium + * `PAB` - Panamanian Balboa + * `PGK` - Papua New Guinean Kina + * `PYG` - Paraguayan Guarani + * `PEI` - Peruvian Inti + * `PEN` - Peruvian Sol + * `PES` - Peruvian Sol (1863–1965) + * `PHP` - Philippine Peso + * `XPT` - Platinum + * `PLN` - Polish Zloty + * `PLZ` - Polish Zloty (1950–1995) + * `PTE` - Portuguese Escudo + * `GWE` - Portuguese Guinea Escudo + * `QAR` - Qatari Rial + * `XRE` - RINET Funds + * `RHD` - Rhodesian Dollar + * `RON` - Romanian Leu + * `ROL` - Romanian Leu (1952–2006) + * `RUB` - Russian Ruble + * `RUR` - Russian Ruble (1991–1998) + * `RWF` - Rwandan Franc + * `SVC` - Salvadoran Colón + * `WST` - Samoan Tala + * `SAR` - Saudi Riyal + * `RSD` - Serbian Dinar + * `CSD` - Serbian Dinar (2002–2006) + * `SCR` - Seychellois Rupee + * `SLL` - Sierra Leonean Leone + * `XAG` - Silver + * `SGD` - Singapore Dollar + * `SKK` - Slovak Koruna + * `SIT` - Slovenian Tolar + * `SBD` - Solomon Islands Dollar + * `SOS` - Somali Shilling + * `ZAR` - South African Rand + * `ZAL` - South African Rand (financial) + * `KRH` - South Korean Hwan (1953–1962) + * `KRW` - South Korean Won + * `KRO` - South Korean Won (1945–1953) + * `SSP` - South Sudanese Pound + * `SUR` - Soviet Rouble + * `ESP` - Spanish Peseta + * `ESA` - Spanish Peseta (A account) + * `ESB` - Spanish Peseta (convertible account) + * `XDR` - Special Drawing Rights + * `LKR` - Sri Lankan Rupee + * `SHP` - St. Helena Pound + * `XSU` - Sucre + * `SDD` - Sudanese Dinar (1992–2007) + * `SDG` - Sudanese Pound + * `SDP` - Sudanese Pound (1957–1998) + * `SRD` - Surinamese Dollar + * `SRG` - Surinamese Guilder + * `SZL` - Swazi Lilangeni + * `SEK` - Swedish Krona + * `CHF` - Swiss Franc + * `SYP` - Syrian Pound + * `STN` - São Tomé & Príncipe Dobra + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + * `TVD` - TVD + * `TJR` - Tajikistani Ruble + * `TJS` - Tajikistani Somoni + * `TZS` - Tanzanian Shilling + * `XTS` - Testing Currency Code + * `THB` - Thai Baht + * `XXX` - The codes assigned for transactions where no currency is involved + * `TPE` - Timorese Escudo + * `TOP` - Tongan Paʻanga + * `TTD` - Trinidad & Tobago Dollar + * `TND` - Tunisian Dinar + * `TRY` - Turkish Lira + * `TRL` - Turkish Lira (1922–2005) + * `TMT` - Turkmenistani Manat + * `TMM` - Turkmenistani Manat (1993–2009) + * `USD` - US Dollar + * `USN` - US Dollar (Next day) + * `USS` - US Dollar (Same day) + * `UGX` - Ugandan Shilling + * `UGS` - Ugandan Shilling (1966–1987) + * `UAH` - Ukrainian Hryvnia + * `UAK` - Ukrainian Karbovanets + * `AED` - United Arab Emirates Dirham + * `UYW` - Uruguayan Nominal Wage Index Unit + * `UYU` - Uruguayan Peso + * `UYP` - Uruguayan Peso (1975–1993) + * `UYI` - Uruguayan Peso (Indexed Units) + * `UZS` - Uzbekistani Som + * `VUV` - Vanuatu Vatu + * `VES` - Venezuelan Bolívar + * `VEB` - Venezuelan Bolívar (1871–2008) + * `VEF` - Venezuelan Bolívar (2008–2018) + * `VND` - Vietnamese Dong + * `VNN` - Vietnamese Dong (1978–1985) + * `CHE` - WIR Euro + * `CHW` - WIR Franc + * `XOF` - West African CFA Franc + * `YDD` - Yemeni Dinar + * `YER` - Yemeni Rial + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + * `YUM` - Yugoslavian New Dinar (1994–2002) + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + * `ZWN` - ZWN + * `ZRN` - Zairean New Zaire (1993–1998) + * `ZRZ` - Zairean Zaire (1971–1993) + * `ZMW` - Zambian Kwacha + * `ZMK` - Zambian Kwacha (1968–2012) + * `ZWD` - Zimbabwean Dollar (1980–2008) + * `ZWR` - Zimbabwean Dollar (2008) + * `ZWL` - Zimbabwean Dollar (2009) + exchange_rate: + type: string + format: decimal + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + nullable: true + description: The journal entry's exchange rate. + company: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/CompanyInfo' + nullable: true + description: The company the journal entry belongs to. + x-merge-expands-to: CompanyInfo + tracking_categories: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/TrackingCategory' + nullable: true + x-merge-expands-to: TrackingCategory + inclusive_of_tax: + type: boolean + nullable: true + description: If the transaction is inclusive or exclusive of tax. `True` + if inclusive, `False` if exclusive. + lines: + type: array + items: + $ref: '#/components/schemas/JournalLineRequest' + x-merge-expands-to: JournalLine + journal_number: + type: string + nullable: true + description: Reference number for identifying journal entries. + maxLength: 70 + posting_status: + oneOf: + - $ref: '#/components/schemas/PostingStatusEnum' + - type: string + nullable: true + description: |- + The journal's posting status. + + * `UNPOSTED` - UNPOSTED + * `POSTED` - POSTED + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + remote_fields: + type: array + items: + $ref: '#/components/schemas/RemoteFieldRequest' + writeOnly: true + x-merge-expands: '{"accounting_period": "AccountingPeriod", "applied_payments": + "PaymentLineItemWithPayment", "company": "CompanyInfo", "lines": "JournalLine", + "payments": "Payment", "tracking_categories": "TrackingCategory"}' + x-merge-category: accounting + JournalEntryResponse: + type: object + properties: + model: + $ref: '#/components/schemas/JournalEntry' + warnings: + type: array + items: + $ref: '#/components/schemas/WarningValidationProblem' + errors: + type: array + items: + $ref: '#/components/schemas/ErrorValidationProblem' + logs: + type: array + items: + $ref: '#/components/schemas/DebugModeLog' + required: + - errors + - model + - warnings + x-merge-category: accounting + JournalLine: + type: object + description: |- + # The JournalLine Object + ### Description + The `JournalLine` object is used to represent a journal entry's line items. + + ### Usage Example + Fetch from the `GET JournalEntry` endpoint and view the journal entry's line items. + properties: + id: + type: string + format: uuid + readOnly: true + example: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '121222' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + account: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Account' + nullable: true + example: 9d892439-5fab-4dbb-8bd8-34f7f96c7912 + x-merge-expands-to: Account + net_amount: + type: number + format: double + nullable: true + description: The value of the line item including taxes and other fees. + example: 25.54 + tracking_category: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/TrackingCategory' + nullable: true + deprecated: true + x-merge-expands-to: TrackingCategory + tracking_categories: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/TrackingCategory' + nullable: true + example: + - d25d609b-945f-4762-b55a-1c8fb220c43c + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + description: The journal line item's associated tracking categories. + x-merge-expands-to: TrackingCategory + currency: + oneOf: + - $ref: '#/components/schemas/TransactionCurrencyEnum' + - type: string + nullable: true + description: |- + The journal line item's currency. + + * `XUA` - ADB Unit of Account + * `AFN` - Afghan Afghani + * `AFA` - Afghan Afghani (1927–2002) + * `ALL` - Albanian Lek + * `ALK` - Albanian Lek (1946–1965) + * `DZD` - Algerian Dinar + * `ADP` - Andorran Peseta + * `AOA` - Angolan Kwanza + * `AOK` - Angolan Kwanza (1977–1991) + * `AON` - Angolan New Kwanza (1990–2000) + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + * `ARA` - Argentine Austral + * `ARS` - Argentine Peso + * `ARM` - Argentine Peso (1881–1970) + * `ARP` - Argentine Peso (1983–1985) + * `ARL` - Argentine Peso Ley (1970–1983) + * `AMD` - Armenian Dram + * `AWG` - Aruban Florin + * `AUD` - Australian Dollar + * `ATS` - Austrian Schilling + * `AZN` - Azerbaijani Manat + * `AZM` - Azerbaijani Manat (1993–2006) + * `BSD` - Bahamian Dollar + * `BHD` - Bahraini Dinar + * `BDT` - Bangladeshi Taka + * `BBD` - Barbadian Dollar + * `BYN` - Belarusian Ruble + * `BYB` - Belarusian Ruble (1994–1999) + * `BYR` - Belarusian Ruble (2000–2016) + * `BEF` - Belgian Franc + * `BEC` - Belgian Franc (convertible) + * `BEL` - Belgian Franc (financial) + * `BZD` - Belize Dollar + * `BMD` - Bermudan Dollar + * `BTN` - Bhutanese Ngultrum + * `BOB` - Bolivian Boliviano + * `BOL` - Bolivian Boliviano (1863–1963) + * `BOV` - Bolivian Mvdol + * `BOP` - Bolivian Peso + * `BAM` - Bosnia-Herzegovina Convertible Mark + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + * `BWP` - Botswanan Pula + * `BRC` - Brazilian Cruzado (1986–1989) + * `BRZ` - Brazilian Cruzeiro (1942–1967) + * `BRE` - Brazilian Cruzeiro (1990–1993) + * `BRR` - Brazilian Cruzeiro (1993–1994) + * `BRN` - Brazilian New Cruzado (1989–1990) + * `BRB` - Brazilian New Cruzeiro (1967–1986) + * `BRL` - Brazilian Real + * `GBP` - British Pound + * `BND` - Brunei Dollar + * `BGL` - Bulgarian Hard Lev + * `BGN` - Bulgarian Lev + * `BGO` - Bulgarian Lev (1879–1952) + * `BGM` - Bulgarian Socialist Lev + * `BUK` - Burmese Kyat + * `BIF` - Burundian Franc + * `XPF` - CFP Franc + * `KHR` - Cambodian Riel + * `CAD` - Canadian Dollar + * `CVE` - Cape Verdean Escudo + * `KYD` - Cayman Islands Dollar + * `XAF` - Central African CFA Franc + * `CLE` - Chilean Escudo + * `CLP` - Chilean Peso + * `CLF` - Chilean Unit of Account (UF) + * `CNX` - Chinese People’s Bank Dollar + * `CNY` - Chinese Yuan + * `CNH` - Chinese Yuan (offshore) + * `COP` - Colombian Peso + * `COU` - Colombian Real Value Unit + * `KMF` - Comorian Franc + * `CDF` - Congolese Franc + * `CRC` - Costa Rican Colón + * `HRD` - Croatian Dinar + * `HRK` - Croatian Kuna + * `CUC` - Cuban Convertible Peso + * `CUP` - Cuban Peso + * `CYP` - Cypriot Pound + * `CZK` - Czech Koruna + * `CSK` - Czechoslovak Hard Koruna + * `DKK` - Danish Krone + * `DJF` - Djiboutian Franc + * `DOP` - Dominican Peso + * `NLG` - Dutch Guilder + * `XCD` - East Caribbean Dollar + * `DDM` - East German Mark + * `ECS` - Ecuadorian Sucre + * `ECV` - Ecuadorian Unit of Constant Value + * `EGP` - Egyptian Pound + * `GQE` - Equatorial Guinean Ekwele + * `ERN` - Eritrean Nakfa + * `EEK` - Estonian Kroon + * `ETB` - Ethiopian Birr + * `EUR` - Euro + * `XBA` - European Composite Unit + * `XEU` - European Currency Unit + * `XBB` - European Monetary Unit + * `XBC` - European Unit of Account (XBC) + * `XBD` - European Unit of Account (XBD) + * `FKP` - Falkland Islands Pound + * `FJD` - Fijian Dollar + * `FIM` - Finnish Markka + * `FRF` - French Franc + * `XFO` - French Gold Franc + * `XFU` - French UIC-Franc + * `GMD` - Gambian Dalasi + * `GEK` - Georgian Kupon Larit + * `GEL` - Georgian Lari + * `DEM` - German Mark + * `GHS` - Ghanaian Cedi + * `GHC` - Ghanaian Cedi (1979–2007) + * `GIP` - Gibraltar Pound + * `XAU` - Gold + * `GRD` - Greek Drachma + * `GTQ` - Guatemalan Quetzal + * `GWP` - Guinea-Bissau Peso + * `GNF` - Guinean Franc + * `GNS` - Guinean Syli + * `GYD` - Guyanaese Dollar + * `HTG` - Haitian Gourde + * `HNL` - Honduran Lempira + * `HKD` - Hong Kong Dollar + * `HUF` - Hungarian Forint + * `IMP` - IMP + * `ISK` - Icelandic Króna + * `ISJ` - Icelandic Króna (1918–1981) + * `INR` - Indian Rupee + * `IDR` - Indonesian Rupiah + * `IRR` - Iranian Rial + * `IQD` - Iraqi Dinar + * `IEP` - Irish Pound + * `ILS` - Israeli New Shekel + * `ILP` - Israeli Pound + * `ILR` - Israeli Shekel (1980–1985) + * `ITL` - Italian Lira + * `JMD` - Jamaican Dollar + * `JPY` - Japanese Yen + * `JOD` - Jordanian Dinar + * `KZT` - Kazakhstani Tenge + * `KES` - Kenyan Shilling + * `KWD` - Kuwaiti Dinar + * `KGS` - Kyrgystani Som + * `LAK` - Laotian Kip + * `LVL` - Latvian Lats + * `LVR` - Latvian Ruble + * `LBP` - Lebanese Pound + * `LSL` - Lesotho Loti + * `LRD` - Liberian Dollar + * `LYD` - Libyan Dinar + * `LTL` - Lithuanian Litas + * `LTT` - Lithuanian Talonas + * `LUL` - Luxembourg Financial Franc + * `LUC` - Luxembourgian Convertible Franc + * `LUF` - Luxembourgian Franc + * `MOP` - Macanese Pataca + * `MKD` - Macedonian Denar + * `MKN` - Macedonian Denar (1992–1993) + * `MGA` - Malagasy Ariary + * `MGF` - Malagasy Franc + * `MWK` - Malawian Kwacha + * `MYR` - Malaysian Ringgit + * `MVR` - Maldivian Rufiyaa + * `MVP` - Maldivian Rupee (1947–1981) + * `MLF` - Malian Franc + * `MTL` - Maltese Lira + * `MTP` - Maltese Pound + * `MRU` - Mauritanian Ouguiya + * `MRO` - Mauritanian Ouguiya (1973–2017) + * `MUR` - Mauritian Rupee + * `MXV` - Mexican Investment Unit + * `MXN` - Mexican Peso + * `MXP` - Mexican Silver Peso (1861–1992) + * `MDC` - Moldovan Cupon + * `MDL` - Moldovan Leu + * `MCF` - Monegasque Franc + * `MNT` - Mongolian Tugrik + * `MAD` - Moroccan Dirham + * `MAF` - Moroccan Franc + * `MZE` - Mozambican Escudo + * `MZN` - Mozambican Metical + * `MZM` - Mozambican Metical (1980–2006) + * `MMK` - Myanmar Kyat + * `NAD` - Namibian Dollar + * `NPR` - Nepalese Rupee + * `ANG` - Netherlands Antillean Guilder + * `TWD` - New Taiwan Dollar + * `NZD` - New Zealand Dollar + * `NIO` - Nicaraguan Córdoba + * `NIC` - Nicaraguan Córdoba (1988–1991) + * `NGN` - Nigerian Naira + * `KPW` - North Korean Won + * `NOK` - Norwegian Krone + * `OMR` - Omani Rial + * `PKR` - Pakistani Rupee + * `XPD` - Palladium + * `PAB` - Panamanian Balboa + * `PGK` - Papua New Guinean Kina + * `PYG` - Paraguayan Guarani + * `PEI` - Peruvian Inti + * `PEN` - Peruvian Sol + * `PES` - Peruvian Sol (1863–1965) + * `PHP` - Philippine Peso + * `XPT` - Platinum + * `PLN` - Polish Zloty + * `PLZ` - Polish Zloty (1950–1995) + * `PTE` - Portuguese Escudo + * `GWE` - Portuguese Guinea Escudo + * `QAR` - Qatari Rial + * `XRE` - RINET Funds + * `RHD` - Rhodesian Dollar + * `RON` - Romanian Leu + * `ROL` - Romanian Leu (1952–2006) + * `RUB` - Russian Ruble + * `RUR` - Russian Ruble (1991–1998) + * `RWF` - Rwandan Franc + * `SVC` - Salvadoran Colón + * `WST` - Samoan Tala + * `SAR` - Saudi Riyal + * `RSD` - Serbian Dinar + * `CSD` - Serbian Dinar (2002–2006) + * `SCR` - Seychellois Rupee + * `SLL` - Sierra Leonean Leone + * `XAG` - Silver + * `SGD` - Singapore Dollar + * `SKK` - Slovak Koruna + * `SIT` - Slovenian Tolar + * `SBD` - Solomon Islands Dollar + * `SOS` - Somali Shilling + * `ZAR` - South African Rand + * `ZAL` - South African Rand (financial) + * `KRH` - South Korean Hwan (1953–1962) + * `KRW` - South Korean Won + * `KRO` - South Korean Won (1945–1953) + * `SSP` - South Sudanese Pound + * `SUR` - Soviet Rouble + * `ESP` - Spanish Peseta + * `ESA` - Spanish Peseta (A account) + * `ESB` - Spanish Peseta (convertible account) + * `XDR` - Special Drawing Rights + * `LKR` - Sri Lankan Rupee + * `SHP` - St. Helena Pound + * `XSU` - Sucre + * `SDD` - Sudanese Dinar (1992–2007) + * `SDG` - Sudanese Pound + * `SDP` - Sudanese Pound (1957–1998) + * `SRD` - Surinamese Dollar + * `SRG` - Surinamese Guilder + * `SZL` - Swazi Lilangeni + * `SEK` - Swedish Krona + * `CHF` - Swiss Franc + * `SYP` - Syrian Pound + * `STN` - São Tomé & Príncipe Dobra + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + * `TVD` - TVD + * `TJR` - Tajikistani Ruble + * `TJS` - Tajikistani Somoni + * `TZS` - Tanzanian Shilling + * `XTS` - Testing Currency Code + * `THB` - Thai Baht + * `XXX` - The codes assigned for transactions where no currency is involved + * `TPE` - Timorese Escudo + * `TOP` - Tongan Paʻanga + * `TTD` - Trinidad & Tobago Dollar + * `TND` - Tunisian Dinar + * `TRY` - Turkish Lira + * `TRL` - Turkish Lira (1922–2005) + * `TMT` - Turkmenistani Manat + * `TMM` - Turkmenistani Manat (1993–2009) + * `USD` - US Dollar + * `USN` - US Dollar (Next day) + * `USS` - US Dollar (Same day) + * `UGX` - Ugandan Shilling + * `UGS` - Ugandan Shilling (1966–1987) + * `UAH` - Ukrainian Hryvnia + * `UAK` - Ukrainian Karbovanets + * `AED` - United Arab Emirates Dirham + * `UYW` - Uruguayan Nominal Wage Index Unit + * `UYU` - Uruguayan Peso + * `UYP` - Uruguayan Peso (1975–1993) + * `UYI` - Uruguayan Peso (Indexed Units) + * `UZS` - Uzbekistani Som + * `VUV` - Vanuatu Vatu + * `VES` - Venezuelan Bolívar + * `VEB` - Venezuelan Bolívar (1871–2008) + * `VEF` - Venezuelan Bolívar (2008–2018) + * `VND` - Vietnamese Dong + * `VNN` - Vietnamese Dong (1978–1985) + * `CHE` - WIR Euro + * `CHW` - WIR Franc + * `XOF` - West African CFA Franc + * `YDD` - Yemeni Dinar + * `YER` - Yemeni Rial + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + * `YUM` - Yugoslavian New Dinar (1994–2002) + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + * `ZWN` - ZWN + * `ZRN` - Zairean New Zaire (1993–1998) + * `ZRZ` - Zairean Zaire (1971–1993) + * `ZMW` - Zambian Kwacha + * `ZMK` - Zambian Kwacha (1968–2012) + * `ZWD` - Zimbabwean Dollar (1980–2008) + * `ZWR` - Zimbabwean Dollar (2008) + * `ZWL` - Zimbabwean Dollar (2009) + company: + type: string + format: uuid + nullable: true + description: The company the journal entry belongs to. + example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + employee: + type: string + format: uuid + nullable: true + example: 123c8r35-5kf5-12x5-r833-99bwf35210b5 + project: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Project' + nullable: true + example: 22e65a5d-2df5-4e6e-884a-e538d0339000 + x-merge-expands-to: Project + contact: + type: string + format: uuid + nullable: true + example: d2d5ea3c-b032-11ec-b909-0242ac120002 + tax_rate: + type: string + format: uuid + nullable: true + example: a12e7c20-1922-9df7-s75n-edfeewnn7384 + description: The tax rate that applies to this line item. + description: + type: string + nullable: true + description: The line's description. + example: Cash payment for lunch + exchange_rate: + type: string + format: decimal + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + nullable: true + description: The journal line item's exchange rate. + example: '2.9' + remote_was_deleted: + type: boolean + readOnly: true + description: 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/). + remote_fields: + type: array + items: + $ref: '#/components/schemas/RemoteField' + readOnly: true + x-merge-nested-write-allowed: true + x-merge-expands: '{"account": "Account", "project": "Project", "tracking_categories": + "TrackingCategory", "tracking_category": "TrackingCategory"}' + x-merge-category: accounting + JournalLineRequest: + type: object + description: |- + # The JournalLine Object + ### Description + The `JournalLine` object is used to represent a journal entry's line items. + + ### Usage Example + Fetch from the `GET JournalEntry` endpoint and view the journal entry's line items. + properties: + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '121222' + account: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Account' + nullable: true + example: 9d892439-5fab-4dbb-8bd8-34f7f96c7912 + x-merge-expands-to: Account + net_amount: + type: number + format: double + nullable: true + description: The value of the line item including taxes and other fees. + example: 25.54 + tracking_category: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/TrackingCategory' + nullable: true + deprecated: true + x-merge-expands-to: TrackingCategory + tracking_categories: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/TrackingCategory' + nullable: true + example: + - d25d609b-945f-4762-b55a-1c8fb220c43c + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + description: The journal line item's associated tracking categories. + x-merge-expands-to: TrackingCategory + currency: + oneOf: + - $ref: '#/components/schemas/TransactionCurrencyEnum' + - type: string + nullable: true + description: |- + The journal line item's currency. + + * `XUA` - ADB Unit of Account + * `AFN` - Afghan Afghani + * `AFA` - Afghan Afghani (1927–2002) + * `ALL` - Albanian Lek + * `ALK` - Albanian Lek (1946–1965) + * `DZD` - Algerian Dinar + * `ADP` - Andorran Peseta + * `AOA` - Angolan Kwanza + * `AOK` - Angolan Kwanza (1977–1991) + * `AON` - Angolan New Kwanza (1990–2000) + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + * `ARA` - Argentine Austral + * `ARS` - Argentine Peso + * `ARM` - Argentine Peso (1881–1970) + * `ARP` - Argentine Peso (1983–1985) + * `ARL` - Argentine Peso Ley (1970–1983) + * `AMD` - Armenian Dram + * `AWG` - Aruban Florin + * `AUD` - Australian Dollar + * `ATS` - Austrian Schilling + * `AZN` - Azerbaijani Manat + * `AZM` - Azerbaijani Manat (1993–2006) + * `BSD` - Bahamian Dollar + * `BHD` - Bahraini Dinar + * `BDT` - Bangladeshi Taka + * `BBD` - Barbadian Dollar + * `BYN` - Belarusian Ruble + * `BYB` - Belarusian Ruble (1994–1999) + * `BYR` - Belarusian Ruble (2000–2016) + * `BEF` - Belgian Franc + * `BEC` - Belgian Franc (convertible) + * `BEL` - Belgian Franc (financial) + * `BZD` - Belize Dollar + * `BMD` - Bermudan Dollar + * `BTN` - Bhutanese Ngultrum + * `BOB` - Bolivian Boliviano + * `BOL` - Bolivian Boliviano (1863–1963) + * `BOV` - Bolivian Mvdol + * `BOP` - Bolivian Peso + * `BAM` - Bosnia-Herzegovina Convertible Mark + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + * `BWP` - Botswanan Pula + * `BRC` - Brazilian Cruzado (1986–1989) + * `BRZ` - Brazilian Cruzeiro (1942–1967) + * `BRE` - Brazilian Cruzeiro (1990–1993) + * `BRR` - Brazilian Cruzeiro (1993–1994) + * `BRN` - Brazilian New Cruzado (1989–1990) + * `BRB` - Brazilian New Cruzeiro (1967–1986) + * `BRL` - Brazilian Real + * `GBP` - British Pound + * `BND` - Brunei Dollar + * `BGL` - Bulgarian Hard Lev + * `BGN` - Bulgarian Lev + * `BGO` - Bulgarian Lev (1879–1952) + * `BGM` - Bulgarian Socialist Lev + * `BUK` - Burmese Kyat + * `BIF` - Burundian Franc + * `XPF` - CFP Franc + * `KHR` - Cambodian Riel + * `CAD` - Canadian Dollar + * `CVE` - Cape Verdean Escudo + * `KYD` - Cayman Islands Dollar + * `XAF` - Central African CFA Franc + * `CLE` - Chilean Escudo + * `CLP` - Chilean Peso + * `CLF` - Chilean Unit of Account (UF) + * `CNX` - Chinese People’s Bank Dollar + * `CNY` - Chinese Yuan + * `CNH` - Chinese Yuan (offshore) + * `COP` - Colombian Peso + * `COU` - Colombian Real Value Unit + * `KMF` - Comorian Franc + * `CDF` - Congolese Franc + * `CRC` - Costa Rican Colón + * `HRD` - Croatian Dinar + * `HRK` - Croatian Kuna + * `CUC` - Cuban Convertible Peso + * `CUP` - Cuban Peso + * `CYP` - Cypriot Pound + * `CZK` - Czech Koruna + * `CSK` - Czechoslovak Hard Koruna + * `DKK` - Danish Krone + * `DJF` - Djiboutian Franc + * `DOP` - Dominican Peso + * `NLG` - Dutch Guilder + * `XCD` - East Caribbean Dollar + * `DDM` - East German Mark + * `ECS` - Ecuadorian Sucre + * `ECV` - Ecuadorian Unit of Constant Value + * `EGP` - Egyptian Pound + * `GQE` - Equatorial Guinean Ekwele + * `ERN` - Eritrean Nakfa + * `EEK` - Estonian Kroon + * `ETB` - Ethiopian Birr + * `EUR` - Euro + * `XBA` - European Composite Unit + * `XEU` - European Currency Unit + * `XBB` - European Monetary Unit + * `XBC` - European Unit of Account (XBC) + * `XBD` - European Unit of Account (XBD) + * `FKP` - Falkland Islands Pound + * `FJD` - Fijian Dollar + * `FIM` - Finnish Markka + * `FRF` - French Franc + * `XFO` - French Gold Franc + * `XFU` - French UIC-Franc + * `GMD` - Gambian Dalasi + * `GEK` - Georgian Kupon Larit + * `GEL` - Georgian Lari + * `DEM` - German Mark + * `GHS` - Ghanaian Cedi + * `GHC` - Ghanaian Cedi (1979–2007) + * `GIP` - Gibraltar Pound + * `XAU` - Gold + * `GRD` - Greek Drachma + * `GTQ` - Guatemalan Quetzal + * `GWP` - Guinea-Bissau Peso + * `GNF` - Guinean Franc + * `GNS` - Guinean Syli + * `GYD` - Guyanaese Dollar + * `HTG` - Haitian Gourde + * `HNL` - Honduran Lempira + * `HKD` - Hong Kong Dollar + * `HUF` - Hungarian Forint + * `IMP` - IMP + * `ISK` - Icelandic Króna + * `ISJ` - Icelandic Króna (1918–1981) + * `INR` - Indian Rupee + * `IDR` - Indonesian Rupiah + * `IRR` - Iranian Rial + * `IQD` - Iraqi Dinar + * `IEP` - Irish Pound + * `ILS` - Israeli New Shekel + * `ILP` - Israeli Pound + * `ILR` - Israeli Shekel (1980–1985) + * `ITL` - Italian Lira + * `JMD` - Jamaican Dollar + * `JPY` - Japanese Yen + * `JOD` - Jordanian Dinar + * `KZT` - Kazakhstani Tenge + * `KES` - Kenyan Shilling + * `KWD` - Kuwaiti Dinar + * `KGS` - Kyrgystani Som + * `LAK` - Laotian Kip + * `LVL` - Latvian Lats + * `LVR` - Latvian Ruble + * `LBP` - Lebanese Pound + * `LSL` - Lesotho Loti + * `LRD` - Liberian Dollar + * `LYD` - Libyan Dinar + * `LTL` - Lithuanian Litas + * `LTT` - Lithuanian Talonas + * `LUL` - Luxembourg Financial Franc + * `LUC` - Luxembourgian Convertible Franc + * `LUF` - Luxembourgian Franc + * `MOP` - Macanese Pataca + * `MKD` - Macedonian Denar + * `MKN` - Macedonian Denar (1992–1993) + * `MGA` - Malagasy Ariary + * `MGF` - Malagasy Franc + * `MWK` - Malawian Kwacha + * `MYR` - Malaysian Ringgit + * `MVR` - Maldivian Rufiyaa + * `MVP` - Maldivian Rupee (1947–1981) + * `MLF` - Malian Franc + * `MTL` - Maltese Lira + * `MTP` - Maltese Pound + * `MRU` - Mauritanian Ouguiya + * `MRO` - Mauritanian Ouguiya (1973–2017) + * `MUR` - Mauritian Rupee + * `MXV` - Mexican Investment Unit + * `MXN` - Mexican Peso + * `MXP` - Mexican Silver Peso (1861–1992) + * `MDC` - Moldovan Cupon + * `MDL` - Moldovan Leu + * `MCF` - Monegasque Franc + * `MNT` - Mongolian Tugrik + * `MAD` - Moroccan Dirham + * `MAF` - Moroccan Franc + * `MZE` - Mozambican Escudo + * `MZN` - Mozambican Metical + * `MZM` - Mozambican Metical (1980–2006) + * `MMK` - Myanmar Kyat + * `NAD` - Namibian Dollar + * `NPR` - Nepalese Rupee + * `ANG` - Netherlands Antillean Guilder + * `TWD` - New Taiwan Dollar + * `NZD` - New Zealand Dollar + * `NIO` - Nicaraguan Córdoba + * `NIC` - Nicaraguan Córdoba (1988–1991) + * `NGN` - Nigerian Naira + * `KPW` - North Korean Won + * `NOK` - Norwegian Krone + * `OMR` - Omani Rial + * `PKR` - Pakistani Rupee + * `XPD` - Palladium + * `PAB` - Panamanian Balboa + * `PGK` - Papua New Guinean Kina + * `PYG` - Paraguayan Guarani + * `PEI` - Peruvian Inti + * `PEN` - Peruvian Sol + * `PES` - Peruvian Sol (1863–1965) + * `PHP` - Philippine Peso + * `XPT` - Platinum + * `PLN` - Polish Zloty + * `PLZ` - Polish Zloty (1950–1995) + * `PTE` - Portuguese Escudo + * `GWE` - Portuguese Guinea Escudo + * `QAR` - Qatari Rial + * `XRE` - RINET Funds + * `RHD` - Rhodesian Dollar + * `RON` - Romanian Leu + * `ROL` - Romanian Leu (1952–2006) + * `RUB` - Russian Ruble + * `RUR` - Russian Ruble (1991–1998) + * `RWF` - Rwandan Franc + * `SVC` - Salvadoran Colón + * `WST` - Samoan Tala + * `SAR` - Saudi Riyal + * `RSD` - Serbian Dinar + * `CSD` - Serbian Dinar (2002–2006) + * `SCR` - Seychellois Rupee + * `SLL` - Sierra Leonean Leone + * `XAG` - Silver + * `SGD` - Singapore Dollar + * `SKK` - Slovak Koruna + * `SIT` - Slovenian Tolar + * `SBD` - Solomon Islands Dollar + * `SOS` - Somali Shilling + * `ZAR` - South African Rand + * `ZAL` - South African Rand (financial) + * `KRH` - South Korean Hwan (1953–1962) + * `KRW` - South Korean Won + * `KRO` - South Korean Won (1945–1953) + * `SSP` - South Sudanese Pound + * `SUR` - Soviet Rouble + * `ESP` - Spanish Peseta + * `ESA` - Spanish Peseta (A account) + * `ESB` - Spanish Peseta (convertible account) + * `XDR` - Special Drawing Rights + * `LKR` - Sri Lankan Rupee + * `SHP` - St. Helena Pound + * `XSU` - Sucre + * `SDD` - Sudanese Dinar (1992–2007) + * `SDG` - Sudanese Pound + * `SDP` - Sudanese Pound (1957–1998) + * `SRD` - Surinamese Dollar + * `SRG` - Surinamese Guilder + * `SZL` - Swazi Lilangeni + * `SEK` - Swedish Krona + * `CHF` - Swiss Franc + * `SYP` - Syrian Pound + * `STN` - São Tomé & Príncipe Dobra + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + * `TVD` - TVD + * `TJR` - Tajikistani Ruble + * `TJS` - Tajikistani Somoni + * `TZS` - Tanzanian Shilling + * `XTS` - Testing Currency Code + * `THB` - Thai Baht + * `XXX` - The codes assigned for transactions where no currency is involved + * `TPE` - Timorese Escudo + * `TOP` - Tongan Paʻanga + * `TTD` - Trinidad & Tobago Dollar + * `TND` - Tunisian Dinar + * `TRY` - Turkish Lira + * `TRL` - Turkish Lira (1922–2005) + * `TMT` - Turkmenistani Manat + * `TMM` - Turkmenistani Manat (1993–2009) + * `USD` - US Dollar + * `USN` - US Dollar (Next day) + * `USS` - US Dollar (Same day) + * `UGX` - Ugandan Shilling + * `UGS` - Ugandan Shilling (1966–1987) + * `UAH` - Ukrainian Hryvnia + * `UAK` - Ukrainian Karbovanets + * `AED` - United Arab Emirates Dirham + * `UYW` - Uruguayan Nominal Wage Index Unit + * `UYU` - Uruguayan Peso + * `UYP` - Uruguayan Peso (1975–1993) + * `UYI` - Uruguayan Peso (Indexed Units) + * `UZS` - Uzbekistani Som + * `VUV` - Vanuatu Vatu + * `VES` - Venezuelan Bolívar + * `VEB` - Venezuelan Bolívar (1871–2008) + * `VEF` - Venezuelan Bolívar (2008–2018) + * `VND` - Vietnamese Dong + * `VNN` - Vietnamese Dong (1978–1985) + * `CHE` - WIR Euro + * `CHW` - WIR Franc + * `XOF` - West African CFA Franc + * `YDD` - Yemeni Dinar + * `YER` - Yemeni Rial + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + * `YUM` - Yugoslavian New Dinar (1994–2002) + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + * `ZWN` - ZWN + * `ZRN` - Zairean New Zaire (1993–1998) + * `ZRZ` - Zairean Zaire (1971–1993) + * `ZMW` - Zambian Kwacha + * `ZMK` - Zambian Kwacha (1968–2012) + * `ZWD` - Zimbabwean Dollar (1980–2008) + * `ZWR` - Zimbabwean Dollar (2008) + * `ZWL` - Zimbabwean Dollar (2009) + company: + type: string + format: uuid + nullable: true + description: The company the journal entry belongs to. + example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + employee: + type: string + format: uuid + nullable: true + example: 123c8r35-5kf5-12x5-r833-99bwf35210b5 + project: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Project' + nullable: true + example: 22e65a5d-2df5-4e6e-884a-e538d0339000 + x-merge-expands-to: Project + contact: + type: string + format: uuid + nullable: true + example: d2d5ea3c-b032-11ec-b909-0242ac120002 + tax_rate: + type: string + format: uuid + nullable: true + example: a12e7c20-1922-9df7-s75n-edfeewnn7384 + description: The tax rate that applies to this line item. + description: + type: string + nullable: true + description: The line's description. + example: Cash payment for lunch + exchange_rate: + type: string + format: decimal + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + nullable: true + description: The journal line item's exchange rate. + example: '2.9' + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + remote_fields: + type: array + items: + $ref: '#/components/schemas/RemoteFieldRequest' + writeOnly: true + x-merge-expands: '{"account": "Account", "project": "Project", "tracking_categories": + "TrackingCategory", "tracking_category": "TrackingCategory"}' + x-merge-category: accounting + LanguageEnum: + enum: + - en + - de + type: string + description: |- + * `en` - en + * `de` - de + x-merge-category: accounting + LastSyncResultEnum: + enum: + - SYNCING + - DONE + - FAILED + - DISABLED + - PAUSED + - PARTIALLY_SYNCED + type: string + description: |- + * `SYNCING` - SYNCING + * `DONE` - DONE + * `FAILED` - FAILED + * `DISABLED` - DISABLED + * `PAUSED` - PAUSED + * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED + x-merge-category: accounting + LinkToken: + type: object + properties: + link_token: + type: string + example: necdP7FtdASl1fQwm62be2_dM4wBG8_GactqoUV0 + integration_name: + type: string + example: Lever + magic_link_url: + type: string + example: https://link.merge.dev/asdfjkl12345jsndfgi2i83n + required: + - link_token + x-merge-category: accounting + LinkedAccountCommonModelScopeDeserializerRequest: + type: object + properties: + common_models: + type: array + items: + $ref: '#/components/schemas/IndividualCommonModelScopeDeserializerRequest' + description: The common models you want to update the scopes for + example: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - home_location + disabled_fields: + - work_location + - model_name: Benefit + model_permissions: + WRITE: + is_enabled: false + required: + - common_models + x-merge-category: accounting + LinkedAccountStatus: + type: object + properties: + linked_account_status: + type: string + can_make_request: + type: boolean + required: + - can_make_request + - linked_account_status + x-merge-category: accounting + MetaResponse: + type: object + properties: + request_schema: + type: object + additionalProperties: {} + example: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + type: object + additionalProperties: {} + status: + $ref: '#/components/schemas/LinkedAccountStatus' + example: + linked_account_status: COMPLETE + can_make_request: true + has_conditional_params: + type: boolean + has_required_linked_account_params: + type: boolean + required: + - has_conditional_params + - has_required_linked_account_params + - request_schema + x-merge-category: accounting + MethodEnum: + enum: + - GET + - OPTIONS + - HEAD + - POST + - PUT + - PATCH + - DELETE + type: string + description: |- + * `GET` - GET + * `OPTIONS` - OPTIONS + * `HEAD` - HEAD + * `POST` - POST + * `PUT` - PUT + * `PATCH` - PATCH + * `DELETE` - DELETE + x-merge-category: accounting + MethodTypeEnum: + enum: + - CREDIT_CARD + - DEBIT_CARD + - ACH + - CASH + - CHECK + type: string + description: |- + * `CREDIT_CARD` - CREDIT_CARD + * `DEBIT_CARD` - DEBIT_CARD + * `ACH` - ACH + * `CASH` - CASH + * `CHECK` - CHECK + x-merge-category: accounting + ModelOperation: + type: object + description: |- + # The ModelOperation Object + ### Description + The `ModelOperation` object is used to represent the operations that are currently supported for a given model. + + ### Usage Example + View what operations are supported for the `Candidate` endpoint. + properties: + model_name: + type: string + example: Candidate + available_operations: + type: array + items: + type: string + example: + - FETCH + - CREATE + required_post_parameters: + type: array + items: + type: string + example: + - remote_user_id + supported_fields: + type: array + items: + type: string + example: + - first_name + - last_name + - company + - title + required: + - available_operations + - model_name + - required_post_parameters + - supported_fields + x-merge-category: accounting + ModelPermissionDeserializer: + type: object + properties: + is_enabled: + type: boolean + x-merge-category: accounting + ModelPermissionDeserializerRequest: + type: object + properties: + is_enabled: + type: boolean + x-merge-category: accounting + MultipartFormFieldRequest: + type: object + description: |- + # The MultipartFormField Object + ### Description + The `MultipartFormField` object is used to represent fields in an HTTP request using `multipart/form-data`. + + ### Usage Example + Create a `MultipartFormField` to define a multipart form entry. + properties: + name: + type: string + minLength: 1 + description: The name of the form field + example: resume + data: + type: string + minLength: 1 + description: The data for the form field. + example: SW50ZWdyYXRlIGZhc3QKSW50ZWdyYXRlIG9uY2U= + encoding: + oneOf: + - $ref: '#/components/schemas/EncodingEnum' + nullable: true + default: RAW + description: |- + The encoding of the value of `data`. Defaults to `RAW` if not defined. + + * `RAW` - RAW + * `BASE64` - BASE64 + * `GZIP_BASE64` - GZIP_BASE64 + example: BASE64 + file_name: + type: string + nullable: true + minLength: 1 + description: The file name of the form field, if the field is for a file. + example: resume.pdf + content_type: + type: string + nullable: true + minLength: 1 + description: The MIME type of the file, if the field is for a file. + example: application/pdf + required: + - data + - name + x-merge-category: accounting + PaginatedAccountDetailsAndActionsList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/AccountDetailsAndActions' + x-merge-category: accounting + PaginatedAccountList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Account' + x-merge-category: accounting + PaginatedAccountingAttachmentList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/AccountingAttachment' + x-merge-category: accounting + PaginatedAccountingPeriodList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/AccountingPeriod' + x-merge-category: accounting + PaginatedAuditLogEventList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/AuditLogEvent' + x-merge-category: accounting + PaginatedBalanceSheetList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/BalanceSheet' + x-merge-category: accounting + PaginatedBankFeedAccountList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/BankFeedAccount' + x-merge-category: accounting + PaginatedBankFeedTransactionList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/BankFeedTransaction' + x-merge-category: accounting + PaginatedCashFlowStatementList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/CashFlowStatement' + x-merge-category: accounting + PaginatedCompanyInfoList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/CompanyInfo' + x-merge-category: accounting + PaginatedContactList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Contact' + x-merge-category: accounting + PaginatedCreditNoteList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/CreditNote' + x-merge-category: accounting + PaginatedEmployeeList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Employee' + x-merge-category: accounting + PaginatedExpenseList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Expense' + x-merge-category: accounting + PaginatedGeneralLedgerTransactionList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/GeneralLedgerTransaction' + x-merge-category: accounting + PaginatedIncomeStatementList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/IncomeStatement' + x-merge-category: accounting + PaginatedInvoiceList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Invoice' + x-merge-category: accounting + PaginatedIssueList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Issue' + x-merge-category: accounting + PaginatedItemList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Item' + x-merge-category: accounting + PaginatedJournalEntryList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/JournalEntry' + x-merge-category: accounting + PaginatedPaymentList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Payment' + x-merge-category: accounting + PaginatedPaymentMethodList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/PaymentMethod' + x-merge-category: accounting + PaginatedPaymentTermList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/PaymentTerm' + x-merge-category: accounting + PaginatedProjectList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Project' + x-merge-category: accounting + PaginatedPurchaseOrderList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/PurchaseOrder' + x-merge-category: accounting + PaginatedRemoteFieldClassList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/RemoteFieldClass' + x-merge-category: accounting + PaginatedSyncStatusList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/SyncStatus' + x-merge-category: accounting + PaginatedTaxRateList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/TaxRate' + x-merge-category: accounting + PaginatedTrackingCategoryList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/TrackingCategory' + x-merge-category: accounting + PaginatedTransactionList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Transaction' + x-merge-category: accounting + PaginatedVendorCreditList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/VendorCredit' + x-merge-category: accounting + PatchedEditFieldMappingRequest: + type: object + properties: + remote_field_traversal_path: + type: array + items: {} + description: The field traversal path of the remote field listed when you + hit the GET /remote-fields endpoint. + example: + - example_remote_field_name + remote_method: + type: string + minLength: 1 + description: The method of the remote endpoint where the remote field is + coming from. + example: GET + remote_url_path: + type: string + minLength: 1 + description: The path of the remote endpoint where the remote field is coming + from. + example: /example-url-path + x-merge-category: accounting + PatchedInvoiceEndpointRequest: + type: object + properties: + model: + $ref: '#/components/schemas/InvoiceRequest' + required: + - model + x-merge-category: accounting + PatchedItemEndpointRequest: + type: object + properties: + model: + $ref: '#/components/schemas/PatchedItemRequestRequest' + required: + - model + x-merge-category: accounting + PatchedItemRequestRequest: + type: object + description: |- + # The Item Object + ### Description + The `Item` object refers to the goods involved in a transaction. + + ### Usage Example + Fetch from the `LIST Items` endpoint and view a company's items. + properties: + name: + type: string + nullable: true + description: The item's name. + example: Pickleball Paddle + status: + oneOf: + - $ref: '#/components/schemas/Status7d1Enum' + - type: string + nullable: true + description: |- + The item's status. + + * `ACTIVE` - ACTIVE + * `ARCHIVED` - ARCHIVED + example: ACTIVE + type: + oneOf: + - $ref: '#/components/schemas/Type2bbEnum' + - type: string + nullable: true + description: |- + The item's type. + + * `INVENTORY` - INVENTORY + * `NON_INVENTORY` - NON_INVENTORY + * `SERVICE` - SERVICE + * `UNKNOWN` - UNKNOWN + example: INVENTORY + unit_price: + type: number + format: double + nullable: true + description: The item's unit price. + example: 10 + purchase_price: + type: number + format: double + nullable: true + description: The price at which the item is purchased from a vendor. + example: 25 + purchase_account: + type: string + format: uuid + nullable: true + description: References the default account used to record a purchase of + the item. + example: 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 + sales_account: + type: string + format: uuid + nullable: true + description: References the default account used to record a sale. + example: 3872b4c9-f5d2-4f3b-a66b-dfedbed42c49 + company: + type: string + format: uuid + nullable: true + description: The company the item belongs to. + example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + purchase_tax_rate: + type: string + format: uuid + nullable: true + description: The default purchase tax rate for this item. + example: 983e8f97-9qw2-34v9-p123-67bdf98740v5 + sales_tax_rate: + type: string + format: uuid + nullable: true + description: The default sales tax rate for this item. + example: 232c8f56-7se4-98f2-y334-12bdf89249f5 + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + x-merge-category: accounting + PatchedPaymentEndpointRequest: + type: object + properties: + model: + $ref: '#/components/schemas/PatchedPaymentRequest' + required: + - model + x-merge-category: accounting + PatchedPaymentRequest: + type: object + description: |- + # The Payment Object + ### Description + The `Payment` object represents general payments made towards a specific transaction. + + ### Usage Example + Fetch from the `GET Payment` endpoint and view an invoice's payment. + properties: + transaction_date: + type: string + format: date-time + nullable: true + description: The payment's transaction date. + example: '2020-03-31T00:00:00Z' + contact: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Contact' + nullable: true + description: The supplier, or customer involved in the payment. + example: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + account: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Account' + nullable: true + description: The supplier’s or customer’s account in which the payment is + made. + example: d6e687d6-0c36-48a1-8114-35324b5cb38f + payment_method: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/PaymentMethod' + nullable: true + description: The method which this payment was made by. + example: 9394320-8864-2343-4343-9008789 + currency: + oneOf: + - $ref: '#/components/schemas/TransactionCurrencyEnum' + - type: string + nullable: true + description: |- + The payment's currency. + + * `XUA` - ADB Unit of Account + * `AFN` - Afghan Afghani + * `AFA` - Afghan Afghani (1927–2002) + * `ALL` - Albanian Lek + * `ALK` - Albanian Lek (1946–1965) + * `DZD` - Algerian Dinar + * `ADP` - Andorran Peseta + * `AOA` - Angolan Kwanza + * `AOK` - Angolan Kwanza (1977–1991) + * `AON` - Angolan New Kwanza (1990–2000) + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + * `ARA` - Argentine Austral + * `ARS` - Argentine Peso + * `ARM` - Argentine Peso (1881–1970) + * `ARP` - Argentine Peso (1983–1985) + * `ARL` - Argentine Peso Ley (1970–1983) + * `AMD` - Armenian Dram + * `AWG` - Aruban Florin + * `AUD` - Australian Dollar + * `ATS` - Austrian Schilling + * `AZN` - Azerbaijani Manat + * `AZM` - Azerbaijani Manat (1993–2006) + * `BSD` - Bahamian Dollar + * `BHD` - Bahraini Dinar + * `BDT` - Bangladeshi Taka + * `BBD` - Barbadian Dollar + * `BYN` - Belarusian Ruble + * `BYB` - Belarusian Ruble (1994–1999) + * `BYR` - Belarusian Ruble (2000–2016) + * `BEF` - Belgian Franc + * `BEC` - Belgian Franc (convertible) + * `BEL` - Belgian Franc (financial) + * `BZD` - Belize Dollar + * `BMD` - Bermudan Dollar + * `BTN` - Bhutanese Ngultrum + * `BOB` - Bolivian Boliviano + * `BOL` - Bolivian Boliviano (1863–1963) + * `BOV` - Bolivian Mvdol + * `BOP` - Bolivian Peso + * `BAM` - Bosnia-Herzegovina Convertible Mark + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + * `BWP` - Botswanan Pula + * `BRC` - Brazilian Cruzado (1986–1989) + * `BRZ` - Brazilian Cruzeiro (1942–1967) + * `BRE` - Brazilian Cruzeiro (1990–1993) + * `BRR` - Brazilian Cruzeiro (1993–1994) + * `BRN` - Brazilian New Cruzado (1989–1990) + * `BRB` - Brazilian New Cruzeiro (1967–1986) + * `BRL` - Brazilian Real + * `GBP` - British Pound + * `BND` - Brunei Dollar + * `BGL` - Bulgarian Hard Lev + * `BGN` - Bulgarian Lev + * `BGO` - Bulgarian Lev (1879–1952) + * `BGM` - Bulgarian Socialist Lev + * `BUK` - Burmese Kyat + * `BIF` - Burundian Franc + * `XPF` - CFP Franc + * `KHR` - Cambodian Riel + * `CAD` - Canadian Dollar + * `CVE` - Cape Verdean Escudo + * `KYD` - Cayman Islands Dollar + * `XAF` - Central African CFA Franc + * `CLE` - Chilean Escudo + * `CLP` - Chilean Peso + * `CLF` - Chilean Unit of Account (UF) + * `CNX` - Chinese People’s Bank Dollar + * `CNY` - Chinese Yuan + * `CNH` - Chinese Yuan (offshore) + * `COP` - Colombian Peso + * `COU` - Colombian Real Value Unit + * `KMF` - Comorian Franc + * `CDF` - Congolese Franc + * `CRC` - Costa Rican Colón + * `HRD` - Croatian Dinar + * `HRK` - Croatian Kuna + * `CUC` - Cuban Convertible Peso + * `CUP` - Cuban Peso + * `CYP` - Cypriot Pound + * `CZK` - Czech Koruna + * `CSK` - Czechoslovak Hard Koruna + * `DKK` - Danish Krone + * `DJF` - Djiboutian Franc + * `DOP` - Dominican Peso + * `NLG` - Dutch Guilder + * `XCD` - East Caribbean Dollar + * `DDM` - East German Mark + * `ECS` - Ecuadorian Sucre + * `ECV` - Ecuadorian Unit of Constant Value + * `EGP` - Egyptian Pound + * `GQE` - Equatorial Guinean Ekwele + * `ERN` - Eritrean Nakfa + * `EEK` - Estonian Kroon + * `ETB` - Ethiopian Birr + * `EUR` - Euro + * `XBA` - European Composite Unit + * `XEU` - European Currency Unit + * `XBB` - European Monetary Unit + * `XBC` - European Unit of Account (XBC) + * `XBD` - European Unit of Account (XBD) + * `FKP` - Falkland Islands Pound + * `FJD` - Fijian Dollar + * `FIM` - Finnish Markka + * `FRF` - French Franc + * `XFO` - French Gold Franc + * `XFU` - French UIC-Franc + * `GMD` - Gambian Dalasi + * `GEK` - Georgian Kupon Larit + * `GEL` - Georgian Lari + * `DEM` - German Mark + * `GHS` - Ghanaian Cedi + * `GHC` - Ghanaian Cedi (1979–2007) + * `GIP` - Gibraltar Pound + * `XAU` - Gold + * `GRD` - Greek Drachma + * `GTQ` - Guatemalan Quetzal + * `GWP` - Guinea-Bissau Peso + * `GNF` - Guinean Franc + * `GNS` - Guinean Syli + * `GYD` - Guyanaese Dollar + * `HTG` - Haitian Gourde + * `HNL` - Honduran Lempira + * `HKD` - Hong Kong Dollar + * `HUF` - Hungarian Forint + * `IMP` - IMP + * `ISK` - Icelandic Króna + * `ISJ` - Icelandic Króna (1918–1981) + * `INR` - Indian Rupee + * `IDR` - Indonesian Rupiah + * `IRR` - Iranian Rial + * `IQD` - Iraqi Dinar + * `IEP` - Irish Pound + * `ILS` - Israeli New Shekel + * `ILP` - Israeli Pound + * `ILR` - Israeli Shekel (1980–1985) + * `ITL` - Italian Lira + * `JMD` - Jamaican Dollar + * `JPY` - Japanese Yen + * `JOD` - Jordanian Dinar + * `KZT` - Kazakhstani Tenge + * `KES` - Kenyan Shilling + * `KWD` - Kuwaiti Dinar + * `KGS` - Kyrgystani Som + * `LAK` - Laotian Kip + * `LVL` - Latvian Lats + * `LVR` - Latvian Ruble + * `LBP` - Lebanese Pound + * `LSL` - Lesotho Loti + * `LRD` - Liberian Dollar + * `LYD` - Libyan Dinar + * `LTL` - Lithuanian Litas + * `LTT` - Lithuanian Talonas + * `LUL` - Luxembourg Financial Franc + * `LUC` - Luxembourgian Convertible Franc + * `LUF` - Luxembourgian Franc + * `MOP` - Macanese Pataca + * `MKD` - Macedonian Denar + * `MKN` - Macedonian Denar (1992–1993) + * `MGA` - Malagasy Ariary + * `MGF` - Malagasy Franc + * `MWK` - Malawian Kwacha + * `MYR` - Malaysian Ringgit + * `MVR` - Maldivian Rufiyaa + * `MVP` - Maldivian Rupee (1947–1981) + * `MLF` - Malian Franc + * `MTL` - Maltese Lira + * `MTP` - Maltese Pound + * `MRU` - Mauritanian Ouguiya + * `MRO` - Mauritanian Ouguiya (1973–2017) + * `MUR` - Mauritian Rupee + * `MXV` - Mexican Investment Unit + * `MXN` - Mexican Peso + * `MXP` - Mexican Silver Peso (1861–1992) + * `MDC` - Moldovan Cupon + * `MDL` - Moldovan Leu + * `MCF` - Monegasque Franc + * `MNT` - Mongolian Tugrik + * `MAD` - Moroccan Dirham + * `MAF` - Moroccan Franc + * `MZE` - Mozambican Escudo + * `MZN` - Mozambican Metical + * `MZM` - Mozambican Metical (1980–2006) + * `MMK` - Myanmar Kyat + * `NAD` - Namibian Dollar + * `NPR` - Nepalese Rupee + * `ANG` - Netherlands Antillean Guilder + * `TWD` - New Taiwan Dollar + * `NZD` - New Zealand Dollar + * `NIO` - Nicaraguan Córdoba + * `NIC` - Nicaraguan Córdoba (1988–1991) + * `NGN` - Nigerian Naira + * `KPW` - North Korean Won + * `NOK` - Norwegian Krone + * `OMR` - Omani Rial + * `PKR` - Pakistani Rupee + * `XPD` - Palladium + * `PAB` - Panamanian Balboa + * `PGK` - Papua New Guinean Kina + * `PYG` - Paraguayan Guarani + * `PEI` - Peruvian Inti + * `PEN` - Peruvian Sol + * `PES` - Peruvian Sol (1863–1965) + * `PHP` - Philippine Peso + * `XPT` - Platinum + * `PLN` - Polish Zloty + * `PLZ` - Polish Zloty (1950–1995) + * `PTE` - Portuguese Escudo + * `GWE` - Portuguese Guinea Escudo + * `QAR` - Qatari Rial + * `XRE` - RINET Funds + * `RHD` - Rhodesian Dollar + * `RON` - Romanian Leu + * `ROL` - Romanian Leu (1952–2006) + * `RUB` - Russian Ruble + * `RUR` - Russian Ruble (1991–1998) + * `RWF` - Rwandan Franc + * `SVC` - Salvadoran Colón + * `WST` - Samoan Tala + * `SAR` - Saudi Riyal + * `RSD` - Serbian Dinar + * `CSD` - Serbian Dinar (2002–2006) + * `SCR` - Seychellois Rupee + * `SLL` - Sierra Leonean Leone + * `XAG` - Silver + * `SGD` - Singapore Dollar + * `SKK` - Slovak Koruna + * `SIT` - Slovenian Tolar + * `SBD` - Solomon Islands Dollar + * `SOS` - Somali Shilling + * `ZAR` - South African Rand + * `ZAL` - South African Rand (financial) + * `KRH` - South Korean Hwan (1953–1962) + * `KRW` - South Korean Won + * `KRO` - South Korean Won (1945–1953) + * `SSP` - South Sudanese Pound + * `SUR` - Soviet Rouble + * `ESP` - Spanish Peseta + * `ESA` - Spanish Peseta (A account) + * `ESB` - Spanish Peseta (convertible account) + * `XDR` - Special Drawing Rights + * `LKR` - Sri Lankan Rupee + * `SHP` - St. Helena Pound + * `XSU` - Sucre + * `SDD` - Sudanese Dinar (1992–2007) + * `SDG` - Sudanese Pound + * `SDP` - Sudanese Pound (1957–1998) + * `SRD` - Surinamese Dollar + * `SRG` - Surinamese Guilder + * `SZL` - Swazi Lilangeni + * `SEK` - Swedish Krona + * `CHF` - Swiss Franc + * `SYP` - Syrian Pound + * `STN` - São Tomé & Príncipe Dobra + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + * `TVD` - TVD + * `TJR` - Tajikistani Ruble + * `TJS` - Tajikistani Somoni + * `TZS` - Tanzanian Shilling + * `XTS` - Testing Currency Code + * `THB` - Thai Baht + * `XXX` - The codes assigned for transactions where no currency is involved + * `TPE` - Timorese Escudo + * `TOP` - Tongan Paʻanga + * `TTD` - Trinidad & Tobago Dollar + * `TND` - Tunisian Dinar + * `TRY` - Turkish Lira + * `TRL` - Turkish Lira (1922–2005) + * `TMT` - Turkmenistani Manat + * `TMM` - Turkmenistani Manat (1993–2009) + * `USD` - US Dollar + * `USN` - US Dollar (Next day) + * `USS` - US Dollar (Same day) + * `UGX` - Ugandan Shilling + * `UGS` - Ugandan Shilling (1966–1987) + * `UAH` - Ukrainian Hryvnia + * `UAK` - Ukrainian Karbovanets + * `AED` - United Arab Emirates Dirham + * `UYW` - Uruguayan Nominal Wage Index Unit + * `UYU` - Uruguayan Peso + * `UYP` - Uruguayan Peso (1975–1993) + * `UYI` - Uruguayan Peso (Indexed Units) + * `UZS` - Uzbekistani Som + * `VUV` - Vanuatu Vatu + * `VES` - Venezuelan Bolívar + * `VEB` - Venezuelan Bolívar (1871–2008) + * `VEF` - Venezuelan Bolívar (2008–2018) + * `VND` - Vietnamese Dong + * `VNN` - Vietnamese Dong (1978–1985) + * `CHE` - WIR Euro + * `CHW` - WIR Franc + * `XOF` - West African CFA Franc + * `YDD` - Yemeni Dinar + * `YER` - Yemeni Rial + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + * `YUM` - Yugoslavian New Dinar (1994–2002) + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + * `ZWN` - ZWN + * `ZRN` - Zairean New Zaire (1993–1998) + * `ZRZ` - Zairean Zaire (1971–1993) + * `ZMW` - Zambian Kwacha + * `ZMK` - Zambian Kwacha (1968–2012) + * `ZWD` - Zimbabwean Dollar (1980–2008) + * `ZWR` - Zimbabwean Dollar (2008) + * `ZWL` - Zimbabwean Dollar (2009) + example: FKP + exchange_rate: + type: string + format: decimal + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + nullable: true + description: The payment's exchange rate. + example: '2.9' + company: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/CompanyInfo' + nullable: true + description: The company the payment belongs to. + example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + total_amount: + type: number + format: double + nullable: true + description: The total amount of money being paid to the supplier, or customer, + after taxes. + example: 50 + type: + oneOf: + - $ref: '#/components/schemas/PaymentTypeEnum' + - type: string + nullable: true + description: |- + The type of the invoice. + + * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE + * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE + example: ACCOUNTS_PAYABLE + tracking_categories: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/TrackingCategory' + nullable: true + example: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + accounting_period: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/AccountingPeriod' + nullable: true + description: The accounting period that the Payment was generated in. + example: b38c59b0-a9d7-4740-b1ee-5436c6751e3d + applied_to_lines: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/PaymentLineItemRequest' + description: A list of “Payment Applied to Lines” objects. + example: + - remote_id: '234' + applied_amount: '25' + related_object_id: a47e11b6-c73b-4a0c-be31-130fc48177fa + related_object_type: INVOICE + applied_date: '2020-03-31T00:00:00Z' + - remote_id: '235' + applied_amount: '25' + related_object_id: 9b96a886-29a5-452b-8733-2a1e03497cf4 + related_object_type: CREDIT_NOTE + applied_date: '2020-03-31T00:00:00Z' + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + remote_fields: + type: array + items: + $ref: '#/components/schemas/RemoteFieldRequest' + writeOnly: true + x-merge-category: accounting + Payment: + type: object + description: |- + # The Payment Object + ### Description + The `Payment` object represents general payments made towards a specific transaction. + + ### Usage Example + Fetch from the `GET Payment` endpoint and view an invoice's payment. + properties: + id: + type: string + format: uuid + readOnly: true + example: b26fd49a-cbae-470a-a8f8-bcbc119e0390 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '987300' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + transaction_date: + type: string + format: date-time + nullable: true + description: The payment's transaction date. + example: '2020-03-31T00:00:00Z' + contact: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Contact' + nullable: true + description: The supplier, or customer involved in the payment. + example: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + x-merge-expands-to: Contact + account: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Account' + nullable: true + description: The supplier’s or customer’s account in which the payment is + made. + example: d6e687d6-0c36-48a1-8114-35324b5cb38f + x-merge-expands-to: Account + payment_method: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/PaymentMethod' + nullable: true + description: The method which this payment was made by. + example: 9394320-8864-2343-4343-9008789 + x-merge-expands-to: PaymentMethod + currency: + oneOf: + - $ref: '#/components/schemas/TransactionCurrencyEnum' + - type: string + nullable: true + description: |- + The payment's currency. + + * `XUA` - ADB Unit of Account + * `AFN` - Afghan Afghani + * `AFA` - Afghan Afghani (1927–2002) + * `ALL` - Albanian Lek + * `ALK` - Albanian Lek (1946–1965) + * `DZD` - Algerian Dinar + * `ADP` - Andorran Peseta + * `AOA` - Angolan Kwanza + * `AOK` - Angolan Kwanza (1977–1991) + * `AON` - Angolan New Kwanza (1990–2000) + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + * `ARA` - Argentine Austral + * `ARS` - Argentine Peso + * `ARM` - Argentine Peso (1881–1970) + * `ARP` - Argentine Peso (1983–1985) + * `ARL` - Argentine Peso Ley (1970–1983) + * `AMD` - Armenian Dram + * `AWG` - Aruban Florin + * `AUD` - Australian Dollar + * `ATS` - Austrian Schilling + * `AZN` - Azerbaijani Manat + * `AZM` - Azerbaijani Manat (1993–2006) + * `BSD` - Bahamian Dollar + * `BHD` - Bahraini Dinar + * `BDT` - Bangladeshi Taka + * `BBD` - Barbadian Dollar + * `BYN` - Belarusian Ruble + * `BYB` - Belarusian Ruble (1994–1999) + * `BYR` - Belarusian Ruble (2000–2016) + * `BEF` - Belgian Franc + * `BEC` - Belgian Franc (convertible) + * `BEL` - Belgian Franc (financial) + * `BZD` - Belize Dollar + * `BMD` - Bermudan Dollar + * `BTN` - Bhutanese Ngultrum + * `BOB` - Bolivian Boliviano + * `BOL` - Bolivian Boliviano (1863–1963) + * `BOV` - Bolivian Mvdol + * `BOP` - Bolivian Peso + * `BAM` - Bosnia-Herzegovina Convertible Mark + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + * `BWP` - Botswanan Pula + * `BRC` - Brazilian Cruzado (1986–1989) + * `BRZ` - Brazilian Cruzeiro (1942–1967) + * `BRE` - Brazilian Cruzeiro (1990–1993) + * `BRR` - Brazilian Cruzeiro (1993–1994) + * `BRN` - Brazilian New Cruzado (1989–1990) + * `BRB` - Brazilian New Cruzeiro (1967–1986) + * `BRL` - Brazilian Real + * `GBP` - British Pound + * `BND` - Brunei Dollar + * `BGL` - Bulgarian Hard Lev + * `BGN` - Bulgarian Lev + * `BGO` - Bulgarian Lev (1879–1952) + * `BGM` - Bulgarian Socialist Lev + * `BUK` - Burmese Kyat + * `BIF` - Burundian Franc + * `XPF` - CFP Franc + * `KHR` - Cambodian Riel + * `CAD` - Canadian Dollar + * `CVE` - Cape Verdean Escudo + * `KYD` - Cayman Islands Dollar + * `XAF` - Central African CFA Franc + * `CLE` - Chilean Escudo + * `CLP` - Chilean Peso + * `CLF` - Chilean Unit of Account (UF) + * `CNX` - Chinese People’s Bank Dollar + * `CNY` - Chinese Yuan + * `CNH` - Chinese Yuan (offshore) + * `COP` - Colombian Peso + * `COU` - Colombian Real Value Unit + * `KMF` - Comorian Franc + * `CDF` - Congolese Franc + * `CRC` - Costa Rican Colón + * `HRD` - Croatian Dinar + * `HRK` - Croatian Kuna + * `CUC` - Cuban Convertible Peso + * `CUP` - Cuban Peso + * `CYP` - Cypriot Pound + * `CZK` - Czech Koruna + * `CSK` - Czechoslovak Hard Koruna + * `DKK` - Danish Krone + * `DJF` - Djiboutian Franc + * `DOP` - Dominican Peso + * `NLG` - Dutch Guilder + * `XCD` - East Caribbean Dollar + * `DDM` - East German Mark + * `ECS` - Ecuadorian Sucre + * `ECV` - Ecuadorian Unit of Constant Value + * `EGP` - Egyptian Pound + * `GQE` - Equatorial Guinean Ekwele + * `ERN` - Eritrean Nakfa + * `EEK` - Estonian Kroon + * `ETB` - Ethiopian Birr + * `EUR` - Euro + * `XBA` - European Composite Unit + * `XEU` - European Currency Unit + * `XBB` - European Monetary Unit + * `XBC` - European Unit of Account (XBC) + * `XBD` - European Unit of Account (XBD) + * `FKP` - Falkland Islands Pound + * `FJD` - Fijian Dollar + * `FIM` - Finnish Markka + * `FRF` - French Franc + * `XFO` - French Gold Franc + * `XFU` - French UIC-Franc + * `GMD` - Gambian Dalasi + * `GEK` - Georgian Kupon Larit + * `GEL` - Georgian Lari + * `DEM` - German Mark + * `GHS` - Ghanaian Cedi + * `GHC` - Ghanaian Cedi (1979–2007) + * `GIP` - Gibraltar Pound + * `XAU` - Gold + * `GRD` - Greek Drachma + * `GTQ` - Guatemalan Quetzal + * `GWP` - Guinea-Bissau Peso + * `GNF` - Guinean Franc + * `GNS` - Guinean Syli + * `GYD` - Guyanaese Dollar + * `HTG` - Haitian Gourde + * `HNL` - Honduran Lempira + * `HKD` - Hong Kong Dollar + * `HUF` - Hungarian Forint + * `IMP` - IMP + * `ISK` - Icelandic Króna + * `ISJ` - Icelandic Króna (1918–1981) + * `INR` - Indian Rupee + * `IDR` - Indonesian Rupiah + * `IRR` - Iranian Rial + * `IQD` - Iraqi Dinar + * `IEP` - Irish Pound + * `ILS` - Israeli New Shekel + * `ILP` - Israeli Pound + * `ILR` - Israeli Shekel (1980–1985) + * `ITL` - Italian Lira + * `JMD` - Jamaican Dollar + * `JPY` - Japanese Yen + * `JOD` - Jordanian Dinar + * `KZT` - Kazakhstani Tenge + * `KES` - Kenyan Shilling + * `KWD` - Kuwaiti Dinar + * `KGS` - Kyrgystani Som + * `LAK` - Laotian Kip + * `LVL` - Latvian Lats + * `LVR` - Latvian Ruble + * `LBP` - Lebanese Pound + * `LSL` - Lesotho Loti + * `LRD` - Liberian Dollar + * `LYD` - Libyan Dinar + * `LTL` - Lithuanian Litas + * `LTT` - Lithuanian Talonas + * `LUL` - Luxembourg Financial Franc + * `LUC` - Luxembourgian Convertible Franc + * `LUF` - Luxembourgian Franc + * `MOP` - Macanese Pataca + * `MKD` - Macedonian Denar + * `MKN` - Macedonian Denar (1992–1993) + * `MGA` - Malagasy Ariary + * `MGF` - Malagasy Franc + * `MWK` - Malawian Kwacha + * `MYR` - Malaysian Ringgit + * `MVR` - Maldivian Rufiyaa + * `MVP` - Maldivian Rupee (1947–1981) + * `MLF` - Malian Franc + * `MTL` - Maltese Lira + * `MTP` - Maltese Pound + * `MRU` - Mauritanian Ouguiya + * `MRO` - Mauritanian Ouguiya (1973–2017) + * `MUR` - Mauritian Rupee + * `MXV` - Mexican Investment Unit + * `MXN` - Mexican Peso + * `MXP` - Mexican Silver Peso (1861–1992) + * `MDC` - Moldovan Cupon + * `MDL` - Moldovan Leu + * `MCF` - Monegasque Franc + * `MNT` - Mongolian Tugrik + * `MAD` - Moroccan Dirham + * `MAF` - Moroccan Franc + * `MZE` - Mozambican Escudo + * `MZN` - Mozambican Metical + * `MZM` - Mozambican Metical (1980–2006) + * `MMK` - Myanmar Kyat + * `NAD` - Namibian Dollar + * `NPR` - Nepalese Rupee + * `ANG` - Netherlands Antillean Guilder + * `TWD` - New Taiwan Dollar + * `NZD` - New Zealand Dollar + * `NIO` - Nicaraguan Córdoba + * `NIC` - Nicaraguan Córdoba (1988–1991) + * `NGN` - Nigerian Naira + * `KPW` - North Korean Won + * `NOK` - Norwegian Krone + * `OMR` - Omani Rial + * `PKR` - Pakistani Rupee + * `XPD` - Palladium + * `PAB` - Panamanian Balboa + * `PGK` - Papua New Guinean Kina + * `PYG` - Paraguayan Guarani + * `PEI` - Peruvian Inti + * `PEN` - Peruvian Sol + * `PES` - Peruvian Sol (1863–1965) + * `PHP` - Philippine Peso + * `XPT` - Platinum + * `PLN` - Polish Zloty + * `PLZ` - Polish Zloty (1950–1995) + * `PTE` - Portuguese Escudo + * `GWE` - Portuguese Guinea Escudo + * `QAR` - Qatari Rial + * `XRE` - RINET Funds + * `RHD` - Rhodesian Dollar + * `RON` - Romanian Leu + * `ROL` - Romanian Leu (1952–2006) + * `RUB` - Russian Ruble + * `RUR` - Russian Ruble (1991–1998) + * `RWF` - Rwandan Franc + * `SVC` - Salvadoran Colón + * `WST` - Samoan Tala + * `SAR` - Saudi Riyal + * `RSD` - Serbian Dinar + * `CSD` - Serbian Dinar (2002–2006) + * `SCR` - Seychellois Rupee + * `SLL` - Sierra Leonean Leone + * `XAG` - Silver + * `SGD` - Singapore Dollar + * `SKK` - Slovak Koruna + * `SIT` - Slovenian Tolar + * `SBD` - Solomon Islands Dollar + * `SOS` - Somali Shilling + * `ZAR` - South African Rand + * `ZAL` - South African Rand (financial) + * `KRH` - South Korean Hwan (1953–1962) + * `KRW` - South Korean Won + * `KRO` - South Korean Won (1945–1953) + * `SSP` - South Sudanese Pound + * `SUR` - Soviet Rouble + * `ESP` - Spanish Peseta + * `ESA` - Spanish Peseta (A account) + * `ESB` - Spanish Peseta (convertible account) + * `XDR` - Special Drawing Rights + * `LKR` - Sri Lankan Rupee + * `SHP` - St. Helena Pound + * `XSU` - Sucre + * `SDD` - Sudanese Dinar (1992–2007) + * `SDG` - Sudanese Pound + * `SDP` - Sudanese Pound (1957–1998) + * `SRD` - Surinamese Dollar + * `SRG` - Surinamese Guilder + * `SZL` - Swazi Lilangeni + * `SEK` - Swedish Krona + * `CHF` - Swiss Franc + * `SYP` - Syrian Pound + * `STN` - São Tomé & Príncipe Dobra + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + * `TVD` - TVD + * `TJR` - Tajikistani Ruble + * `TJS` - Tajikistani Somoni + * `TZS` - Tanzanian Shilling + * `XTS` - Testing Currency Code + * `THB` - Thai Baht + * `XXX` - The codes assigned for transactions where no currency is involved + * `TPE` - Timorese Escudo + * `TOP` - Tongan Paʻanga + * `TTD` - Trinidad & Tobago Dollar + * `TND` - Tunisian Dinar + * `TRY` - Turkish Lira + * `TRL` - Turkish Lira (1922–2005) + * `TMT` - Turkmenistani Manat + * `TMM` - Turkmenistani Manat (1993–2009) + * `USD` - US Dollar + * `USN` - US Dollar (Next day) + * `USS` - US Dollar (Same day) + * `UGX` - Ugandan Shilling + * `UGS` - Ugandan Shilling (1966–1987) + * `UAH` - Ukrainian Hryvnia + * `UAK` - Ukrainian Karbovanets + * `AED` - United Arab Emirates Dirham + * `UYW` - Uruguayan Nominal Wage Index Unit + * `UYU` - Uruguayan Peso + * `UYP` - Uruguayan Peso (1975–1993) + * `UYI` - Uruguayan Peso (Indexed Units) + * `UZS` - Uzbekistani Som + * `VUV` - Vanuatu Vatu + * `VES` - Venezuelan Bolívar + * `VEB` - Venezuelan Bolívar (1871–2008) + * `VEF` - Venezuelan Bolívar (2008–2018) + * `VND` - Vietnamese Dong + * `VNN` - Vietnamese Dong (1978–1985) + * `CHE` - WIR Euro + * `CHW` - WIR Franc + * `XOF` - West African CFA Franc + * `YDD` - Yemeni Dinar + * `YER` - Yemeni Rial + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + * `YUM` - Yugoslavian New Dinar (1994–2002) + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + * `ZWN` - ZWN + * `ZRN` - Zairean New Zaire (1993–1998) + * `ZRZ` - Zairean Zaire (1971–1993) + * `ZMW` - Zambian Kwacha + * `ZMK` - Zambian Kwacha (1968–2012) + * `ZWD` - Zimbabwean Dollar (1980–2008) + * `ZWR` - Zimbabwean Dollar (2008) + * `ZWL` - Zimbabwean Dollar (2009) + example: FKP + exchange_rate: + type: string + format: decimal + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + nullable: true + description: The payment's exchange rate. + example: '2.9' + company: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/CompanyInfo' + nullable: true + description: The company the payment belongs to. + example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + x-merge-expands-to: CompanyInfo + total_amount: + type: number + format: double + nullable: true + description: The total amount of money being paid to the supplier, or customer, + after taxes. + example: 50 + type: + oneOf: + - $ref: '#/components/schemas/PaymentTypeEnum' + - type: string + nullable: true + description: |- + The type of the invoice. + + * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE + * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE + example: ACCOUNTS_PAYABLE + tracking_categories: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/TrackingCategory' + nullable: true + example: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + x-merge-expands-to: TrackingCategory + accounting_period: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/AccountingPeriod' + nullable: true + description: The accounting period that the Payment was generated in. + example: b38c59b0-a9d7-4740-b1ee-5436c6751e3d + x-merge-expands-to: AccountingPeriod + applied_to_lines: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/PaymentLineItem' + description: A list of “Payment Applied to Lines” objects. + example: + - remote_id: '234' + applied_amount: '25' + related_object_id: a47e11b6-c73b-4a0c-be31-130fc48177fa + related_object_type: INVOICE + applied_date: '2020-03-31T00:00:00Z' + - remote_id: '235' + applied_amount: '25' + related_object_id: 9b96a886-29a5-452b-8733-2a1e03497cf4 + related_object_type: CREDIT_NOTE + applied_date: '2020-03-31T00:00:00Z' + x-merge-expands-to: PaymentLineItem + remote_updated_at: + type: string + format: date-time + nullable: true + description: When the third party's payment entry was updated. + example: '2020-03-31T00:00:00Z' + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /actions + data: + - Varies by platform + remote_fields: + type: array + items: + $ref: '#/components/schemas/RemoteField' + readOnly: true + x-merge-expands: '{"account": "Account", "accounting_period": "AccountingPeriod", + "applied_to_lines": "PaymentLineItem", "company": "CompanyInfo", "contact": + "Contact", "payment_method": "PaymentMethod", "tracking_categories": "TrackingCategory"}' + x-merge-category: accounting + PaymentEndpointRequest: + type: object + properties: + model: + $ref: '#/components/schemas/PaymentRequest' + required: + - model + x-merge-category: accounting + PaymentLineItem: + type: object + description: |- + # The PaymentLineItem Object + ### Description + The `PaymentLineItem` object is an applied-to-line on a `Payment` that can either be a `Invoice`, `CreditNote`, or `JournalEntry`. + + ### Usage Example + `Payment` will have a field called `applied-to-lines` which will be an array of `PaymentLineItemInternalMappingSerializer` objects that can either be a `Invoice`, `CreditNote`, or `JournalEntry`. + properties: + id: + type: string + format: uuid + readOnly: true + example: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '234' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + applied_amount: + type: string + format: decimal + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + nullable: true + description: The amount being applied to the transaction. + example: '25' + applied_date: + type: string + format: date-time + nullable: true + description: The date the payment portion is applied. + example: '2020-03-31T00:00:00Z' + related_object_id: + type: string + format: uuid + description: The Merge ID of the transaction the payment portion is being + applied to. + example: 92e8a369-fffe-430d-b93a-f7e8a16563f1 + related_object_type: + type: string + description: 'The type of transaction the payment portion is being applied + to. Possible values include: INVOICE, JOURNAL_ENTRY, or CREDIT_NOTE.' + example: INVOICE + x-merge-nested-write-allowed: true + x-merge-category: accounting + PaymentLineItemRequest: + type: object + description: |- + # The PaymentLineItem Object + ### Description + The `PaymentLineItem` object is an applied-to-line on a `Payment` that can either be a `Invoice`, `CreditNote`, or `JournalEntry`. + + ### Usage Example + `Payment` will have a field called `applied-to-lines` which will be an array of `PaymentLineItemInternalMappingSerializer` objects that can either be a `Invoice`, `CreditNote`, or `JournalEntry`. + properties: + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '234' + applied_amount: + type: string + format: decimal + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + nullable: true + description: The amount being applied to the transaction. + example: '25' + applied_date: + type: string + format: date-time + nullable: true + description: The date the payment portion is applied. + example: '2020-03-31T00:00:00Z' + related_object_id: + type: string + format: uuid + description: The Merge ID of the transaction the payment portion is being + applied to. + example: 92e8a369-fffe-430d-b93a-f7e8a16563f1 + related_object_type: + type: string + minLength: 1 + description: 'The type of transaction the payment portion is being applied + to. Possible values include: INVOICE, JOURNAL_ENTRY, or CREDIT_NOTE.' + example: INVOICE + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + remote_fields: + type: array + items: + $ref: '#/components/schemas/RemoteFieldRequest' + writeOnly: true + x-merge-category: accounting + PaymentMethod: + type: object + description: |- + # The PaymentMethod Object + ### Description + The `PaymentMethod` object defines how a payment against an invoice is made. + + ### Usage Example + Fetch from the `GET PaymentMethod` endpoint and view payment method information. + properties: + id: + type: string + format: uuid + readOnly: true + example: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '088899' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + method_type: + oneOf: + - $ref: '#/components/schemas/MethodTypeEnum' + - type: string + description: |- + The type of the payment method. + + * `CREDIT_CARD` - CREDIT_CARD + * `DEBIT_CARD` - DEBIT_CARD + * `ACH` - ACH + * `CASH` - CASH + * `CHECK` - CHECK + example: CREDIT_CARD + name: + type: string + description: The payment method’s name + maxLength: 255 + example: John Smith's Credit Card + is_active: + type: boolean + description: '`True` if the payment method is active, `False` if not.' + example: true + remote_updated_at: + type: string + format: date-time + nullable: true + description: When the third party's payment method was updated. + example: '2021-09-15T00:00:00Z' + field_mappings: + type: object + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /actions + data: + - Varies by platform + required: + - method_type + - name + x-merge-category: accounting + PaymentRequest: + type: object + description: |- + # The Payment Object + ### Description + The `Payment` object represents general payments made towards a specific transaction. + + ### Usage Example + Fetch from the `GET Payment` endpoint and view an invoice's payment. + properties: + transaction_date: + type: string + format: date-time + nullable: true + description: The payment's transaction date. + example: '2020-03-31T00:00:00Z' + contact: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Contact' + nullable: true + description: The supplier, or customer involved in the payment. + example: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + x-merge-expands-to: Contact + account: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Account' + nullable: true + description: The supplier’s or customer’s account in which the payment is + made. + example: d6e687d6-0c36-48a1-8114-35324b5cb38f + x-merge-expands-to: Account + payment_method: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/PaymentMethod' + nullable: true + description: The method which this payment was made by. + example: 9394320-8864-2343-4343-9008789 + x-merge-expands-to: PaymentMethod + currency: + oneOf: + - $ref: '#/components/schemas/TransactionCurrencyEnum' + - type: string + nullable: true + description: |- + The payment's currency. + + * `XUA` - ADB Unit of Account + * `AFN` - Afghan Afghani + * `AFA` - Afghan Afghani (1927–2002) + * `ALL` - Albanian Lek + * `ALK` - Albanian Lek (1946–1965) + * `DZD` - Algerian Dinar + * `ADP` - Andorran Peseta + * `AOA` - Angolan Kwanza + * `AOK` - Angolan Kwanza (1977–1991) + * `AON` - Angolan New Kwanza (1990–2000) + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + * `ARA` - Argentine Austral + * `ARS` - Argentine Peso + * `ARM` - Argentine Peso (1881–1970) + * `ARP` - Argentine Peso (1983–1985) + * `ARL` - Argentine Peso Ley (1970–1983) + * `AMD` - Armenian Dram + * `AWG` - Aruban Florin + * `AUD` - Australian Dollar + * `ATS` - Austrian Schilling + * `AZN` - Azerbaijani Manat + * `AZM` - Azerbaijani Manat (1993–2006) + * `BSD` - Bahamian Dollar + * `BHD` - Bahraini Dinar + * `BDT` - Bangladeshi Taka + * `BBD` - Barbadian Dollar + * `BYN` - Belarusian Ruble + * `BYB` - Belarusian Ruble (1994–1999) + * `BYR` - Belarusian Ruble (2000–2016) + * `BEF` - Belgian Franc + * `BEC` - Belgian Franc (convertible) + * `BEL` - Belgian Franc (financial) + * `BZD` - Belize Dollar + * `BMD` - Bermudan Dollar + * `BTN` - Bhutanese Ngultrum + * `BOB` - Bolivian Boliviano + * `BOL` - Bolivian Boliviano (1863–1963) + * `BOV` - Bolivian Mvdol + * `BOP` - Bolivian Peso + * `BAM` - Bosnia-Herzegovina Convertible Mark + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + * `BWP` - Botswanan Pula + * `BRC` - Brazilian Cruzado (1986–1989) + * `BRZ` - Brazilian Cruzeiro (1942–1967) + * `BRE` - Brazilian Cruzeiro (1990–1993) + * `BRR` - Brazilian Cruzeiro (1993–1994) + * `BRN` - Brazilian New Cruzado (1989–1990) + * `BRB` - Brazilian New Cruzeiro (1967–1986) + * `BRL` - Brazilian Real + * `GBP` - British Pound + * `BND` - Brunei Dollar + * `BGL` - Bulgarian Hard Lev + * `BGN` - Bulgarian Lev + * `BGO` - Bulgarian Lev (1879–1952) + * `BGM` - Bulgarian Socialist Lev + * `BUK` - Burmese Kyat + * `BIF` - Burundian Franc + * `XPF` - CFP Franc + * `KHR` - Cambodian Riel + * `CAD` - Canadian Dollar + * `CVE` - Cape Verdean Escudo + * `KYD` - Cayman Islands Dollar + * `XAF` - Central African CFA Franc + * `CLE` - Chilean Escudo + * `CLP` - Chilean Peso + * `CLF` - Chilean Unit of Account (UF) + * `CNX` - Chinese People’s Bank Dollar + * `CNY` - Chinese Yuan + * `CNH` - Chinese Yuan (offshore) + * `COP` - Colombian Peso + * `COU` - Colombian Real Value Unit + * `KMF` - Comorian Franc + * `CDF` - Congolese Franc + * `CRC` - Costa Rican Colón + * `HRD` - Croatian Dinar + * `HRK` - Croatian Kuna + * `CUC` - Cuban Convertible Peso + * `CUP` - Cuban Peso + * `CYP` - Cypriot Pound + * `CZK` - Czech Koruna + * `CSK` - Czechoslovak Hard Koruna + * `DKK` - Danish Krone + * `DJF` - Djiboutian Franc + * `DOP` - Dominican Peso + * `NLG` - Dutch Guilder + * `XCD` - East Caribbean Dollar + * `DDM` - East German Mark + * `ECS` - Ecuadorian Sucre + * `ECV` - Ecuadorian Unit of Constant Value + * `EGP` - Egyptian Pound + * `GQE` - Equatorial Guinean Ekwele + * `ERN` - Eritrean Nakfa + * `EEK` - Estonian Kroon + * `ETB` - Ethiopian Birr + * `EUR` - Euro + * `XBA` - European Composite Unit + * `XEU` - European Currency Unit + * `XBB` - European Monetary Unit + * `XBC` - European Unit of Account (XBC) + * `XBD` - European Unit of Account (XBD) + * `FKP` - Falkland Islands Pound + * `FJD` - Fijian Dollar + * `FIM` - Finnish Markka + * `FRF` - French Franc + * `XFO` - French Gold Franc + * `XFU` - French UIC-Franc + * `GMD` - Gambian Dalasi + * `GEK` - Georgian Kupon Larit + * `GEL` - Georgian Lari + * `DEM` - German Mark + * `GHS` - Ghanaian Cedi + * `GHC` - Ghanaian Cedi (1979–2007) + * `GIP` - Gibraltar Pound + * `XAU` - Gold + * `GRD` - Greek Drachma + * `GTQ` - Guatemalan Quetzal + * `GWP` - Guinea-Bissau Peso + * `GNF` - Guinean Franc + * `GNS` - Guinean Syli + * `GYD` - Guyanaese Dollar + * `HTG` - Haitian Gourde + * `HNL` - Honduran Lempira + * `HKD` - Hong Kong Dollar + * `HUF` - Hungarian Forint + * `IMP` - IMP + * `ISK` - Icelandic Króna + * `ISJ` - Icelandic Króna (1918–1981) + * `INR` - Indian Rupee + * `IDR` - Indonesian Rupiah + * `IRR` - Iranian Rial + * `IQD` - Iraqi Dinar + * `IEP` - Irish Pound + * `ILS` - Israeli New Shekel + * `ILP` - Israeli Pound + * `ILR` - Israeli Shekel (1980–1985) + * `ITL` - Italian Lira + * `JMD` - Jamaican Dollar + * `JPY` - Japanese Yen + * `JOD` - Jordanian Dinar + * `KZT` - Kazakhstani Tenge + * `KES` - Kenyan Shilling + * `KWD` - Kuwaiti Dinar + * `KGS` - Kyrgystani Som + * `LAK` - Laotian Kip + * `LVL` - Latvian Lats + * `LVR` - Latvian Ruble + * `LBP` - Lebanese Pound + * `LSL` - Lesotho Loti + * `LRD` - Liberian Dollar + * `LYD` - Libyan Dinar + * `LTL` - Lithuanian Litas + * `LTT` - Lithuanian Talonas + * `LUL` - Luxembourg Financial Franc + * `LUC` - Luxembourgian Convertible Franc + * `LUF` - Luxembourgian Franc + * `MOP` - Macanese Pataca + * `MKD` - Macedonian Denar + * `MKN` - Macedonian Denar (1992–1993) + * `MGA` - Malagasy Ariary + * `MGF` - Malagasy Franc + * `MWK` - Malawian Kwacha + * `MYR` - Malaysian Ringgit + * `MVR` - Maldivian Rufiyaa + * `MVP` - Maldivian Rupee (1947–1981) + * `MLF` - Malian Franc + * `MTL` - Maltese Lira + * `MTP` - Maltese Pound + * `MRU` - Mauritanian Ouguiya + * `MRO` - Mauritanian Ouguiya (1973–2017) + * `MUR` - Mauritian Rupee + * `MXV` - Mexican Investment Unit + * `MXN` - Mexican Peso + * `MXP` - Mexican Silver Peso (1861–1992) + * `MDC` - Moldovan Cupon + * `MDL` - Moldovan Leu + * `MCF` - Monegasque Franc + * `MNT` - Mongolian Tugrik + * `MAD` - Moroccan Dirham + * `MAF` - Moroccan Franc + * `MZE` - Mozambican Escudo + * `MZN` - Mozambican Metical + * `MZM` - Mozambican Metical (1980–2006) + * `MMK` - Myanmar Kyat + * `NAD` - Namibian Dollar + * `NPR` - Nepalese Rupee + * `ANG` - Netherlands Antillean Guilder + * `TWD` - New Taiwan Dollar + * `NZD` - New Zealand Dollar + * `NIO` - Nicaraguan Córdoba + * `NIC` - Nicaraguan Córdoba (1988–1991) + * `NGN` - Nigerian Naira + * `KPW` - North Korean Won + * `NOK` - Norwegian Krone + * `OMR` - Omani Rial + * `PKR` - Pakistani Rupee + * `XPD` - Palladium + * `PAB` - Panamanian Balboa + * `PGK` - Papua New Guinean Kina + * `PYG` - Paraguayan Guarani + * `PEI` - Peruvian Inti + * `PEN` - Peruvian Sol + * `PES` - Peruvian Sol (1863–1965) + * `PHP` - Philippine Peso + * `XPT` - Platinum + * `PLN` - Polish Zloty + * `PLZ` - Polish Zloty (1950–1995) + * `PTE` - Portuguese Escudo + * `GWE` - Portuguese Guinea Escudo + * `QAR` - Qatari Rial + * `XRE` - RINET Funds + * `RHD` - Rhodesian Dollar + * `RON` - Romanian Leu + * `ROL` - Romanian Leu (1952–2006) + * `RUB` - Russian Ruble + * `RUR` - Russian Ruble (1991–1998) + * `RWF` - Rwandan Franc + * `SVC` - Salvadoran Colón + * `WST` - Samoan Tala + * `SAR` - Saudi Riyal + * `RSD` - Serbian Dinar + * `CSD` - Serbian Dinar (2002–2006) + * `SCR` - Seychellois Rupee + * `SLL` - Sierra Leonean Leone + * `XAG` - Silver + * `SGD` - Singapore Dollar + * `SKK` - Slovak Koruna + * `SIT` - Slovenian Tolar + * `SBD` - Solomon Islands Dollar + * `SOS` - Somali Shilling + * `ZAR` - South African Rand + * `ZAL` - South African Rand (financial) + * `KRH` - South Korean Hwan (1953–1962) + * `KRW` - South Korean Won + * `KRO` - South Korean Won (1945–1953) + * `SSP` - South Sudanese Pound + * `SUR` - Soviet Rouble + * `ESP` - Spanish Peseta + * `ESA` - Spanish Peseta (A account) + * `ESB` - Spanish Peseta (convertible account) + * `XDR` - Special Drawing Rights + * `LKR` - Sri Lankan Rupee + * `SHP` - St. Helena Pound + * `XSU` - Sucre + * `SDD` - Sudanese Dinar (1992–2007) + * `SDG` - Sudanese Pound + * `SDP` - Sudanese Pound (1957–1998) + * `SRD` - Surinamese Dollar + * `SRG` - Surinamese Guilder + * `SZL` - Swazi Lilangeni + * `SEK` - Swedish Krona + * `CHF` - Swiss Franc + * `SYP` - Syrian Pound + * `STN` - São Tomé & Príncipe Dobra + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + * `TVD` - TVD + * `TJR` - Tajikistani Ruble + * `TJS` - Tajikistani Somoni + * `TZS` - Tanzanian Shilling + * `XTS` - Testing Currency Code + * `THB` - Thai Baht + * `XXX` - The codes assigned for transactions where no currency is involved + * `TPE` - Timorese Escudo + * `TOP` - Tongan Paʻanga + * `TTD` - Trinidad & Tobago Dollar + * `TND` - Tunisian Dinar + * `TRY` - Turkish Lira + * `TRL` - Turkish Lira (1922–2005) + * `TMT` - Turkmenistani Manat + * `TMM` - Turkmenistani Manat (1993–2009) + * `USD` - US Dollar + * `USN` - US Dollar (Next day) + * `USS` - US Dollar (Same day) + * `UGX` - Ugandan Shilling + * `UGS` - Ugandan Shilling (1966–1987) + * `UAH` - Ukrainian Hryvnia + * `UAK` - Ukrainian Karbovanets + * `AED` - United Arab Emirates Dirham + * `UYW` - Uruguayan Nominal Wage Index Unit + * `UYU` - Uruguayan Peso + * `UYP` - Uruguayan Peso (1975–1993) + * `UYI` - Uruguayan Peso (Indexed Units) + * `UZS` - Uzbekistani Som + * `VUV` - Vanuatu Vatu + * `VES` - Venezuelan Bolívar + * `VEB` - Venezuelan Bolívar (1871–2008) + * `VEF` - Venezuelan Bolívar (2008–2018) + * `VND` - Vietnamese Dong + * `VNN` - Vietnamese Dong (1978–1985) + * `CHE` - WIR Euro + * `CHW` - WIR Franc + * `XOF` - West African CFA Franc + * `YDD` - Yemeni Dinar + * `YER` - Yemeni Rial + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + * `YUM` - Yugoslavian New Dinar (1994–2002) + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + * `ZWN` - ZWN + * `ZRN` - Zairean New Zaire (1993–1998) + * `ZRZ` - Zairean Zaire (1971–1993) + * `ZMW` - Zambian Kwacha + * `ZMK` - Zambian Kwacha (1968–2012) + * `ZWD` - Zimbabwean Dollar (1980–2008) + * `ZWR` - Zimbabwean Dollar (2008) + * `ZWL` - Zimbabwean Dollar (2009) + example: FKP + exchange_rate: + type: string + format: decimal + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + nullable: true + description: The payment's exchange rate. + example: '2.9' + company: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/CompanyInfo' + nullable: true + description: The company the payment belongs to. + example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + x-merge-expands-to: CompanyInfo + total_amount: + type: number + format: double + nullable: true + description: The total amount of money being paid to the supplier, or customer, + after taxes. + example: 50 + type: + oneOf: + - $ref: '#/components/schemas/PaymentTypeEnum' + - type: string + nullable: true + description: |- + The type of the invoice. + + * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE + * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE + example: ACCOUNTS_PAYABLE + tracking_categories: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/TrackingCategory' + nullable: true + example: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + x-merge-expands-to: TrackingCategory + accounting_period: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/AccountingPeriod' + nullable: true + description: The accounting period that the Payment was generated in. + example: b38c59b0-a9d7-4740-b1ee-5436c6751e3d + x-merge-expands-to: AccountingPeriod + applied_to_lines: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/PaymentLineItemRequest' + description: A list of “Payment Applied to Lines” objects. + example: + - remote_id: '234' + applied_amount: 25 + related_object_id: a47e11b6-c73b-4a0c-be31-130fc48177fa + related_object_type: INVOICE + applied_date: '2020-03-31T00:00:00Z' + - remote_id: '235' + applied_amount: 25 + related_object_id: 9b96a886-29a5-452b-8733-2a1e03497cf4 + related_object_type: CREDIT_NOTE + applied_date: '2020-03-31T00:00:00Z' + x-merge-expands-to: PaymentLineItem + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + remote_fields: + type: array + items: + $ref: '#/components/schemas/RemoteFieldRequest' + writeOnly: true + x-merge-expands: '{"account": "Account", "accounting_period": "AccountingPeriod", + "applied_to_lines": "PaymentLineItem", "company": "CompanyInfo", "contact": + "Contact", "payment_method": "PaymentMethod", "tracking_categories": "TrackingCategory"}' + x-merge-category: accounting + PaymentResponse: + type: object + properties: + model: + $ref: '#/components/schemas/Payment' + warnings: + type: array + items: + $ref: '#/components/schemas/WarningValidationProblem' + errors: + type: array + items: + $ref: '#/components/schemas/ErrorValidationProblem' + logs: + type: array + items: + $ref: '#/components/schemas/DebugModeLog' + required: + - errors + - model + - warnings + x-merge-category: accounting + PaymentTerm: + type: object + description: |- + # The PaymentTerm Object + ### Description + The `PaymentTerm` object is the agreed-upon conditions between a buyer and a seller that define the timing, + amount, and conditions under which payment for goods or services must be made. + + ### Usage Example + Fetch from the `GET PaymentTerm` endpoint and view payment term information. + properties: + id: + type: string + format: uuid + readOnly: true + example: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '088899' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + name: + type: string + description: The name of the payment term. + maxLength: 255 + example: Net 30 + is_active: + type: boolean + description: '`True` if the payment term is active, `False` if not.' + example: true + company: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/CompanyInfo' + nullable: true + description: The subsidiary that the payment term belongs to. + example: d2f972d0-2526-434b-9409-4c3b468e08f0 + x-merge-expands-to: CompanyInfo + days_until_due: + type: integer + maximum: 2147483647 + minimum: -2147483648 + nullable: true + description: The number of days after the invoice date that payment is due. + example: 30 + discount_days: + type: integer + maximum: 2147483647 + minimum: -2147483648 + nullable: true + description: The number of days the invoice must be paid before discounts + expire. + example: 15 + remote_last_modified_at: + type: string + format: date-time + nullable: true + description: When the third party's payment term was modified. + example: '2024-10-16T00:00:00Z' + field_mappings: + type: object + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /actions + data: + - Varies by platform + required: + - name + x-merge-expands: '{"company": "CompanyInfo"}' + x-merge-category: accounting + PaymentTypeEnum: + enum: + - ACCOUNTS_PAYABLE + - ACCOUNTS_RECEIVABLE + type: string + description: |- + * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE + * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE + x-merge-category: accounting + PostingStatusEnum: + enum: + - UNPOSTED + - POSTED + type: string + description: |- + * `UNPOSTED` - UNPOSTED + * `POSTED` - POSTED + x-merge-category: accounting + Project: + type: object + description: |- + # The Project Object + ### Description + The `Project` object is used to track and manage time, costs, resources, and revenue for specific initiatives or work efforts. + It provides classification on transactions for allocating expenses, revenue, and activities to a specific project for financial reporting. + + ### Usage Example + Fetch from the `GET Project` endpoint and view project information. + properties: + id: + type: string + format: uuid + readOnly: true + example: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '088899' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + name: + type: string + description: The project’s name + maxLength: 255 + example: Permissions Mapping + is_active: + type: boolean + description: '`True` if the project is active, `False` if the project is + not active.' + example: true + company: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/CompanyInfo' + nullable: true + description: The subsidiary that the project belongs to. + example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + x-merge-expands-to: CompanyInfo + contact: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Contact' + nullable: true + description: The supplier, or customer involved in the project. + example: d25d609b-945f-4762-b55a-1c8fb220c43c + x-merge-expands-to: Contact + field_mappings: + type: object + nullable: true + readOnly: true + additionalProperties: {} + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /actions + data: + - Varies by platform + required: + - name + x-merge-expands: '{"company": "CompanyInfo", "contact": "Contact"}' + x-merge-category: accounting + PurchaseOrder: + type: object + description: |- + # The PurchaseOrder Object + ### Description + A `PurchaseOrder` represents a request to purchase goods or services from a vendor. It outlines the details of the purchase, such as the items or services requested, quantities, prices, and delivery details. + + A `PurchaseOrder` is a crucial component of the procurement process, but does not typically result in any impact on the company’s general ledger. The general ledger is typically only affected when the `PurchaseOrder` is fulfilled as an *Accounts Payable* `Invoice` object (also known as a Bill). + + ### Usage Example + Fetch from the `LIST PurchaseOrders` endpoint and view a company's purchase orders. + properties: + id: + type: string + format: uuid + readOnly: true + example: 0048ea5b-911e-4dff-9364-92070dea62ff + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '239741' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + status: + oneOf: + - $ref: '#/components/schemas/PurchaseOrderStatusEnum' + - type: string + nullable: true + description: |- + The purchase order's status. + + * `DRAFT` - DRAFT + * `SUBMITTED` - SUBMITTED + * `AUTHORIZED` - AUTHORIZED + * `BILLED` - BILLED + * `DELETED` - DELETED + example: SUBMITTED + issue_date: + type: string + format: date-time + nullable: true + description: The purchase order's issue date. + example: '2020-03-31T00:00:00Z' + purchase_order_number: + type: string + nullable: true + description: The human-readable number of the purchase order. + maxLength: 100 + example: PO1234 + delivery_date: + type: string + format: date-time + nullable: true + description: The purchase order's delivery date. + example: '2020-04-15T00:00:00Z' + delivery_address: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Address' + nullable: true + description: The purchase order's delivery address. + example: + street_1: 2920 Broadway + street_2: 2nd Floor + city: New York + state: NY + country: US + zip_code: '10027' + x-merge-expands-to: Address + customer: + type: string + format: uuid + nullable: true + description: The contact making the purchase order. + example: 3e442c5d-8f51-4103-b5c9-dcee39c30a08 + vendor: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Contact' + nullable: true + description: The party fulfilling the purchase order. + example: 2c22ce34-5c6e-4fc7-a594-7f26bb4cf78b + x-merge-expands-to: Contact + memo: + type: string + nullable: true + description: A memo attached to the purchase order. + example: private note + company: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/CompanyInfo' + nullable: true + description: The company the purchase order belongs to. + example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + x-merge-expands-to: CompanyInfo + total_amount: + type: number + format: double + nullable: true + description: The purchase order's total amount. + example: 260 + currency: + oneOf: + - $ref: '#/components/schemas/TransactionCurrencyEnum' + - type: string + nullable: true + description: |- + The purchase order's currency. + + * `XUA` - ADB Unit of Account + * `AFN` - Afghan Afghani + * `AFA` - Afghan Afghani (1927–2002) + * `ALL` - Albanian Lek + * `ALK` - Albanian Lek (1946–1965) + * `DZD` - Algerian Dinar + * `ADP` - Andorran Peseta + * `AOA` - Angolan Kwanza + * `AOK` - Angolan Kwanza (1977–1991) + * `AON` - Angolan New Kwanza (1990–2000) + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + * `ARA` - Argentine Austral + * `ARS` - Argentine Peso + * `ARM` - Argentine Peso (1881–1970) + * `ARP` - Argentine Peso (1983–1985) + * `ARL` - Argentine Peso Ley (1970–1983) + * `AMD` - Armenian Dram + * `AWG` - Aruban Florin + * `AUD` - Australian Dollar + * `ATS` - Austrian Schilling + * `AZN` - Azerbaijani Manat + * `AZM` - Azerbaijani Manat (1993–2006) + * `BSD` - Bahamian Dollar + * `BHD` - Bahraini Dinar + * `BDT` - Bangladeshi Taka + * `BBD` - Barbadian Dollar + * `BYN` - Belarusian Ruble + * `BYB` - Belarusian Ruble (1994–1999) + * `BYR` - Belarusian Ruble (2000–2016) + * `BEF` - Belgian Franc + * `BEC` - Belgian Franc (convertible) + * `BEL` - Belgian Franc (financial) + * `BZD` - Belize Dollar + * `BMD` - Bermudan Dollar + * `BTN` - Bhutanese Ngultrum + * `BOB` - Bolivian Boliviano + * `BOL` - Bolivian Boliviano (1863–1963) + * `BOV` - Bolivian Mvdol + * `BOP` - Bolivian Peso + * `BAM` - Bosnia-Herzegovina Convertible Mark + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + * `BWP` - Botswanan Pula + * `BRC` - Brazilian Cruzado (1986–1989) + * `BRZ` - Brazilian Cruzeiro (1942–1967) + * `BRE` - Brazilian Cruzeiro (1990–1993) + * `BRR` - Brazilian Cruzeiro (1993–1994) + * `BRN` - Brazilian New Cruzado (1989–1990) + * `BRB` - Brazilian New Cruzeiro (1967–1986) + * `BRL` - Brazilian Real + * `GBP` - British Pound + * `BND` - Brunei Dollar + * `BGL` - Bulgarian Hard Lev + * `BGN` - Bulgarian Lev + * `BGO` - Bulgarian Lev (1879–1952) + * `BGM` - Bulgarian Socialist Lev + * `BUK` - Burmese Kyat + * `BIF` - Burundian Franc + * `XPF` - CFP Franc + * `KHR` - Cambodian Riel + * `CAD` - Canadian Dollar + * `CVE` - Cape Verdean Escudo + * `KYD` - Cayman Islands Dollar + * `XAF` - Central African CFA Franc + * `CLE` - Chilean Escudo + * `CLP` - Chilean Peso + * `CLF` - Chilean Unit of Account (UF) + * `CNX` - Chinese People’s Bank Dollar + * `CNY` - Chinese Yuan + * `CNH` - Chinese Yuan (offshore) + * `COP` - Colombian Peso + * `COU` - Colombian Real Value Unit + * `KMF` - Comorian Franc + * `CDF` - Congolese Franc + * `CRC` - Costa Rican Colón + * `HRD` - Croatian Dinar + * `HRK` - Croatian Kuna + * `CUC` - Cuban Convertible Peso + * `CUP` - Cuban Peso + * `CYP` - Cypriot Pound + * `CZK` - Czech Koruna + * `CSK` - Czechoslovak Hard Koruna + * `DKK` - Danish Krone + * `DJF` - Djiboutian Franc + * `DOP` - Dominican Peso + * `NLG` - Dutch Guilder + * `XCD` - East Caribbean Dollar + * `DDM` - East German Mark + * `ECS` - Ecuadorian Sucre + * `ECV` - Ecuadorian Unit of Constant Value + * `EGP` - Egyptian Pound + * `GQE` - Equatorial Guinean Ekwele + * `ERN` - Eritrean Nakfa + * `EEK` - Estonian Kroon + * `ETB` - Ethiopian Birr + * `EUR` - Euro + * `XBA` - European Composite Unit + * `XEU` - European Currency Unit + * `XBB` - European Monetary Unit + * `XBC` - European Unit of Account (XBC) + * `XBD` - European Unit of Account (XBD) + * `FKP` - Falkland Islands Pound + * `FJD` - Fijian Dollar + * `FIM` - Finnish Markka + * `FRF` - French Franc + * `XFO` - French Gold Franc + * `XFU` - French UIC-Franc + * `GMD` - Gambian Dalasi + * `GEK` - Georgian Kupon Larit + * `GEL` - Georgian Lari + * `DEM` - German Mark + * `GHS` - Ghanaian Cedi + * `GHC` - Ghanaian Cedi (1979–2007) + * `GIP` - Gibraltar Pound + * `XAU` - Gold + * `GRD` - Greek Drachma + * `GTQ` - Guatemalan Quetzal + * `GWP` - Guinea-Bissau Peso + * `GNF` - Guinean Franc + * `GNS` - Guinean Syli + * `GYD` - Guyanaese Dollar + * `HTG` - Haitian Gourde + * `HNL` - Honduran Lempira + * `HKD` - Hong Kong Dollar + * `HUF` - Hungarian Forint + * `IMP` - IMP + * `ISK` - Icelandic Króna + * `ISJ` - Icelandic Króna (1918–1981) + * `INR` - Indian Rupee + * `IDR` - Indonesian Rupiah + * `IRR` - Iranian Rial + * `IQD` - Iraqi Dinar + * `IEP` - Irish Pound + * `ILS` - Israeli New Shekel + * `ILP` - Israeli Pound + * `ILR` - Israeli Shekel (1980–1985) + * `ITL` - Italian Lira + * `JMD` - Jamaican Dollar + * `JPY` - Japanese Yen + * `JOD` - Jordanian Dinar + * `KZT` - Kazakhstani Tenge + * `KES` - Kenyan Shilling + * `KWD` - Kuwaiti Dinar + * `KGS` - Kyrgystani Som + * `LAK` - Laotian Kip + * `LVL` - Latvian Lats + * `LVR` - Latvian Ruble + * `LBP` - Lebanese Pound + * `LSL` - Lesotho Loti + * `LRD` - Liberian Dollar + * `LYD` - Libyan Dinar + * `LTL` - Lithuanian Litas + * `LTT` - Lithuanian Talonas + * `LUL` - Luxembourg Financial Franc + * `LUC` - Luxembourgian Convertible Franc + * `LUF` - Luxembourgian Franc + * `MOP` - Macanese Pataca + * `MKD` - Macedonian Denar + * `MKN` - Macedonian Denar (1992–1993) + * `MGA` - Malagasy Ariary + * `MGF` - Malagasy Franc + * `MWK` - Malawian Kwacha + * `MYR` - Malaysian Ringgit + * `MVR` - Maldivian Rufiyaa + * `MVP` - Maldivian Rupee (1947–1981) + * `MLF` - Malian Franc + * `MTL` - Maltese Lira + * `MTP` - Maltese Pound + * `MRU` - Mauritanian Ouguiya + * `MRO` - Mauritanian Ouguiya (1973–2017) + * `MUR` - Mauritian Rupee + * `MXV` - Mexican Investment Unit + * `MXN` - Mexican Peso + * `MXP` - Mexican Silver Peso (1861–1992) + * `MDC` - Moldovan Cupon + * `MDL` - Moldovan Leu + * `MCF` - Monegasque Franc + * `MNT` - Mongolian Tugrik + * `MAD` - Moroccan Dirham + * `MAF` - Moroccan Franc + * `MZE` - Mozambican Escudo + * `MZN` - Mozambican Metical + * `MZM` - Mozambican Metical (1980–2006) + * `MMK` - Myanmar Kyat + * `NAD` - Namibian Dollar + * `NPR` - Nepalese Rupee + * `ANG` - Netherlands Antillean Guilder + * `TWD` - New Taiwan Dollar + * `NZD` - New Zealand Dollar + * `NIO` - Nicaraguan Córdoba + * `NIC` - Nicaraguan Córdoba (1988–1991) + * `NGN` - Nigerian Naira + * `KPW` - North Korean Won + * `NOK` - Norwegian Krone + * `OMR` - Omani Rial + * `PKR` - Pakistani Rupee + * `XPD` - Palladium + * `PAB` - Panamanian Balboa + * `PGK` - Papua New Guinean Kina + * `PYG` - Paraguayan Guarani + * `PEI` - Peruvian Inti + * `PEN` - Peruvian Sol + * `PES` - Peruvian Sol (1863–1965) + * `PHP` - Philippine Peso + * `XPT` - Platinum + * `PLN` - Polish Zloty + * `PLZ` - Polish Zloty (1950–1995) + * `PTE` - Portuguese Escudo + * `GWE` - Portuguese Guinea Escudo + * `QAR` - Qatari Rial + * `XRE` - RINET Funds + * `RHD` - Rhodesian Dollar + * `RON` - Romanian Leu + * `ROL` - Romanian Leu (1952–2006) + * `RUB` - Russian Ruble + * `RUR` - Russian Ruble (1991–1998) + * `RWF` - Rwandan Franc + * `SVC` - Salvadoran Colón + * `WST` - Samoan Tala + * `SAR` - Saudi Riyal + * `RSD` - Serbian Dinar + * `CSD` - Serbian Dinar (2002–2006) + * `SCR` - Seychellois Rupee + * `SLL` - Sierra Leonean Leone + * `XAG` - Silver + * `SGD` - Singapore Dollar + * `SKK` - Slovak Koruna + * `SIT` - Slovenian Tolar + * `SBD` - Solomon Islands Dollar + * `SOS` - Somali Shilling + * `ZAR` - South African Rand + * `ZAL` - South African Rand (financial) + * `KRH` - South Korean Hwan (1953–1962) + * `KRW` - South Korean Won + * `KRO` - South Korean Won (1945–1953) + * `SSP` - South Sudanese Pound + * `SUR` - Soviet Rouble + * `ESP` - Spanish Peseta + * `ESA` - Spanish Peseta (A account) + * `ESB` - Spanish Peseta (convertible account) + * `XDR` - Special Drawing Rights + * `LKR` - Sri Lankan Rupee + * `SHP` - St. Helena Pound + * `XSU` - Sucre + * `SDD` - Sudanese Dinar (1992–2007) + * `SDG` - Sudanese Pound + * `SDP` - Sudanese Pound (1957–1998) + * `SRD` - Surinamese Dollar + * `SRG` - Surinamese Guilder + * `SZL` - Swazi Lilangeni + * `SEK` - Swedish Krona + * `CHF` - Swiss Franc + * `SYP` - Syrian Pound + * `STN` - São Tomé & Príncipe Dobra + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + * `TVD` - TVD + * `TJR` - Tajikistani Ruble + * `TJS` - Tajikistani Somoni + * `TZS` - Tanzanian Shilling + * `XTS` - Testing Currency Code + * `THB` - Thai Baht + * `XXX` - The codes assigned for transactions where no currency is involved + * `TPE` - Timorese Escudo + * `TOP` - Tongan Paʻanga + * `TTD` - Trinidad & Tobago Dollar + * `TND` - Tunisian Dinar + * `TRY` - Turkish Lira + * `TRL` - Turkish Lira (1922–2005) + * `TMT` - Turkmenistani Manat + * `TMM` - Turkmenistani Manat (1993–2009) + * `USD` - US Dollar + * `USN` - US Dollar (Next day) + * `USS` - US Dollar (Same day) + * `UGX` - Ugandan Shilling + * `UGS` - Ugandan Shilling (1966–1987) + * `UAH` - Ukrainian Hryvnia + * `UAK` - Ukrainian Karbovanets + * `AED` - United Arab Emirates Dirham + * `UYW` - Uruguayan Nominal Wage Index Unit + * `UYU` - Uruguayan Peso + * `UYP` - Uruguayan Peso (1975–1993) + * `UYI` - Uruguayan Peso (Indexed Units) + * `UZS` - Uzbekistani Som + * `VUV` - Vanuatu Vatu + * `VES` - Venezuelan Bolívar + * `VEB` - Venezuelan Bolívar (1871–2008) + * `VEF` - Venezuelan Bolívar (2008–2018) + * `VND` - Vietnamese Dong + * `VNN` - Vietnamese Dong (1978–1985) + * `CHE` - WIR Euro + * `CHW` - WIR Franc + * `XOF` - West African CFA Franc + * `YDD` - Yemeni Dinar + * `YER` - Yemeni Rial + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + * `YUM` - Yugoslavian New Dinar (1994–2002) + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + * `ZWN` - ZWN + * `ZRN` - Zairean New Zaire (1993–1998) + * `ZRZ` - Zairean Zaire (1971–1993) + * `ZMW` - Zambian Kwacha + * `ZMK` - Zambian Kwacha (1968–2012) + * `ZWD` - Zimbabwean Dollar (1980–2008) + * `ZWR` - Zimbabwean Dollar (2008) + * `ZWL` - Zimbabwean Dollar (2009) + example: USD + exchange_rate: + type: string + format: decimal + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + nullable: true + description: The purchase order's exchange rate. + example: '2.9' + payment_term: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/PaymentTerm' + nullable: true + description: The payment term that applies to this transaction. + example: 89d329de-825f-4ac6-8369-3c58b4e68bee + x-merge-expands-to: PaymentTerm + line_items: + type: array + items: + $ref: '#/components/schemas/PurchaseOrderLineItem' + readOnly: true + example: + - remote_id: '121222' + description: Pickleball paddles + unit_price: 25 + quantity: 10 + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + item: 0958cbc6-6040-430a-848e-aafacbadf4ae + tracking_categories: + - f1214c24-2702-4617-b74b-3ddecfc0d384 + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + tax_amount: 10 + total_line_amount: 260 + currency: USD + exchange_rate: '2.9' + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: false + - description: Pickleball Balls + unit_price: 1 + quantity: 10 + item: 249c9faa-3045-4a31-953b-8f22d3613301 + tracking_categories: + - f1214c24-2702-4617-b74b-3ddecfc0d384 + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + tax_amount: 10 + total_line_amount: 20 + x-merge-expands-to: PurchaseOrderLineItem + inclusive_of_tax: + type: boolean + nullable: true + description: If the transaction is inclusive or exclusive of tax. `True` + if inclusive, `False` if exclusive. + tracking_categories: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/TrackingCategory' + nullable: true + example: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + x-merge-expands-to: TrackingCategory + accounting_period: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/AccountingPeriod' + nullable: true + description: The accounting period that the PurchaseOrder was generated + in. + example: 2c22ce34-5c6e-4fc7-a594-7f26bb4cf78b + x-merge-expands-to: AccountingPeriod + remote_created_at: + type: string + format: date-time + nullable: true + description: When the third party's purchase order note was created. + example: '2020-03-31T00:00:00Z' + remote_updated_at: + type: string + format: date-time + nullable: true + description: When the third party's purchase order note was updated. + example: '2020-03-31T00:00:00Z' + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /actions + data: + - Varies by platform + remote_fields: + type: array + items: + $ref: '#/components/schemas/RemoteField' + readOnly: true + x-merge-expands: '{"accounting_period": "AccountingPeriod", "company": "CompanyInfo", + "delivery_address": "Address", "line_items": "PurchaseOrderLineItem", "payment_term": + "PaymentTerm", "tracking_categories": "TrackingCategory", "vendor": "Contact"}' + x-merge-category: accounting + PurchaseOrderEndpointRequest: + type: object + properties: + model: + $ref: '#/components/schemas/PurchaseOrderRequest' + required: + - model + x-merge-category: accounting + PurchaseOrderLineItem: + type: object + description: |- + # The PurchaseOrderLineItem Object + ### Description + The `PurchaseOrderLineItem` object is used to represent a purchase order's line item. + + ### Usage Example + Fetch from the `GET PurchaseOrder` endpoint and view a company's purchase orders. + properties: + id: + type: string + format: uuid + readOnly: true + example: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '121222' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + description: + type: string + nullable: true + description: A description of the good being purchased. + example: Pickleball paddles + unit_price: + type: number + format: double + nullable: true + description: The line item's unit price. + example: 25 + quantity: + type: number + format: double + nullable: true + description: The line item's quantity. + example: 10 + item: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Item' + nullable: true + example: 0958cbc6-6040-430a-848e-aafacbadf4ae + x-merge-expands-to: Item + account: + type: string + format: uuid + nullable: true + description: The purchase order line item's account. + tracking_category: + type: string + format: uuid + nullable: true + description: The purchase order line item's associated tracking category. + deprecated: true + tracking_categories: + type: array + items: + type: string + format: uuid + nullable: true + example: + - f1214c24-2702-4617-b74b-3ddecfc0d384 + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + description: The purchase order line item's associated tracking categories. + tax_amount: + type: string + format: decimal + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + nullable: true + description: The purchase order line item's tax amount. + example: 10 + total_line_amount: + type: string + format: decimal + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + nullable: true + description: The purchase order line item's total amount. + example: 260 + currency: + oneOf: + - $ref: '#/components/schemas/TransactionCurrencyEnum' + - type: string + nullable: true + description: |- + The purchase order line item's currency. + + * `XUA` - ADB Unit of Account + * `AFN` - Afghan Afghani + * `AFA` - Afghan Afghani (1927–2002) + * `ALL` - Albanian Lek + * `ALK` - Albanian Lek (1946–1965) + * `DZD` - Algerian Dinar + * `ADP` - Andorran Peseta + * `AOA` - Angolan Kwanza + * `AOK` - Angolan Kwanza (1977–1991) + * `AON` - Angolan New Kwanza (1990–2000) + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + * `ARA` - Argentine Austral + * `ARS` - Argentine Peso + * `ARM` - Argentine Peso (1881–1970) + * `ARP` - Argentine Peso (1983–1985) + * `ARL` - Argentine Peso Ley (1970–1983) + * `AMD` - Armenian Dram + * `AWG` - Aruban Florin + * `AUD` - Australian Dollar + * `ATS` - Austrian Schilling + * `AZN` - Azerbaijani Manat + * `AZM` - Azerbaijani Manat (1993–2006) + * `BSD` - Bahamian Dollar + * `BHD` - Bahraini Dinar + * `BDT` - Bangladeshi Taka + * `BBD` - Barbadian Dollar + * `BYN` - Belarusian Ruble + * `BYB` - Belarusian Ruble (1994–1999) + * `BYR` - Belarusian Ruble (2000–2016) + * `BEF` - Belgian Franc + * `BEC` - Belgian Franc (convertible) + * `BEL` - Belgian Franc (financial) + * `BZD` - Belize Dollar + * `BMD` - Bermudan Dollar + * `BTN` - Bhutanese Ngultrum + * `BOB` - Bolivian Boliviano + * `BOL` - Bolivian Boliviano (1863–1963) + * `BOV` - Bolivian Mvdol + * `BOP` - Bolivian Peso + * `BAM` - Bosnia-Herzegovina Convertible Mark + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + * `BWP` - Botswanan Pula + * `BRC` - Brazilian Cruzado (1986–1989) + * `BRZ` - Brazilian Cruzeiro (1942–1967) + * `BRE` - Brazilian Cruzeiro (1990–1993) + * `BRR` - Brazilian Cruzeiro (1993–1994) + * `BRN` - Brazilian New Cruzado (1989–1990) + * `BRB` - Brazilian New Cruzeiro (1967–1986) + * `BRL` - Brazilian Real + * `GBP` - British Pound + * `BND` - Brunei Dollar + * `BGL` - Bulgarian Hard Lev + * `BGN` - Bulgarian Lev + * `BGO` - Bulgarian Lev (1879–1952) + * `BGM` - Bulgarian Socialist Lev + * `BUK` - Burmese Kyat + * `BIF` - Burundian Franc + * `XPF` - CFP Franc + * `KHR` - Cambodian Riel + * `CAD` - Canadian Dollar + * `CVE` - Cape Verdean Escudo + * `KYD` - Cayman Islands Dollar + * `XAF` - Central African CFA Franc + * `CLE` - Chilean Escudo + * `CLP` - Chilean Peso + * `CLF` - Chilean Unit of Account (UF) + * `CNX` - Chinese People’s Bank Dollar + * `CNY` - Chinese Yuan + * `CNH` - Chinese Yuan (offshore) + * `COP` - Colombian Peso + * `COU` - Colombian Real Value Unit + * `KMF` - Comorian Franc + * `CDF` - Congolese Franc + * `CRC` - Costa Rican Colón + * `HRD` - Croatian Dinar + * `HRK` - Croatian Kuna + * `CUC` - Cuban Convertible Peso + * `CUP` - Cuban Peso + * `CYP` - Cypriot Pound + * `CZK` - Czech Koruna + * `CSK` - Czechoslovak Hard Koruna + * `DKK` - Danish Krone + * `DJF` - Djiboutian Franc + * `DOP` - Dominican Peso + * `NLG` - Dutch Guilder + * `XCD` - East Caribbean Dollar + * `DDM` - East German Mark + * `ECS` - Ecuadorian Sucre + * `ECV` - Ecuadorian Unit of Constant Value + * `EGP` - Egyptian Pound + * `GQE` - Equatorial Guinean Ekwele + * `ERN` - Eritrean Nakfa + * `EEK` - Estonian Kroon + * `ETB` - Ethiopian Birr + * `EUR` - Euro + * `XBA` - European Composite Unit + * `XEU` - European Currency Unit + * `XBB` - European Monetary Unit + * `XBC` - European Unit of Account (XBC) + * `XBD` - European Unit of Account (XBD) + * `FKP` - Falkland Islands Pound + * `FJD` - Fijian Dollar + * `FIM` - Finnish Markka + * `FRF` - French Franc + * `XFO` - French Gold Franc + * `XFU` - French UIC-Franc + * `GMD` - Gambian Dalasi + * `GEK` - Georgian Kupon Larit + * `GEL` - Georgian Lari + * `DEM` - German Mark + * `GHS` - Ghanaian Cedi + * `GHC` - Ghanaian Cedi (1979–2007) + * `GIP` - Gibraltar Pound + * `XAU` - Gold + * `GRD` - Greek Drachma + * `GTQ` - Guatemalan Quetzal + * `GWP` - Guinea-Bissau Peso + * `GNF` - Guinean Franc + * `GNS` - Guinean Syli + * `GYD` - Guyanaese Dollar + * `HTG` - Haitian Gourde + * `HNL` - Honduran Lempira + * `HKD` - Hong Kong Dollar + * `HUF` - Hungarian Forint + * `IMP` - IMP + * `ISK` - Icelandic Króna + * `ISJ` - Icelandic Króna (1918–1981) + * `INR` - Indian Rupee + * `IDR` - Indonesian Rupiah + * `IRR` - Iranian Rial + * `IQD` - Iraqi Dinar + * `IEP` - Irish Pound + * `ILS` - Israeli New Shekel + * `ILP` - Israeli Pound + * `ILR` - Israeli Shekel (1980–1985) + * `ITL` - Italian Lira + * `JMD` - Jamaican Dollar + * `JPY` - Japanese Yen + * `JOD` - Jordanian Dinar + * `KZT` - Kazakhstani Tenge + * `KES` - Kenyan Shilling + * `KWD` - Kuwaiti Dinar + * `KGS` - Kyrgystani Som + * `LAK` - Laotian Kip + * `LVL` - Latvian Lats + * `LVR` - Latvian Ruble + * `LBP` - Lebanese Pound + * `LSL` - Lesotho Loti + * `LRD` - Liberian Dollar + * `LYD` - Libyan Dinar + * `LTL` - Lithuanian Litas + * `LTT` - Lithuanian Talonas + * `LUL` - Luxembourg Financial Franc + * `LUC` - Luxembourgian Convertible Franc + * `LUF` - Luxembourgian Franc + * `MOP` - Macanese Pataca + * `MKD` - Macedonian Denar + * `MKN` - Macedonian Denar (1992–1993) + * `MGA` - Malagasy Ariary + * `MGF` - Malagasy Franc + * `MWK` - Malawian Kwacha + * `MYR` - Malaysian Ringgit + * `MVR` - Maldivian Rufiyaa + * `MVP` - Maldivian Rupee (1947–1981) + * `MLF` - Malian Franc + * `MTL` - Maltese Lira + * `MTP` - Maltese Pound + * `MRU` - Mauritanian Ouguiya + * `MRO` - Mauritanian Ouguiya (1973–2017) + * `MUR` - Mauritian Rupee + * `MXV` - Mexican Investment Unit + * `MXN` - Mexican Peso + * `MXP` - Mexican Silver Peso (1861–1992) + * `MDC` - Moldovan Cupon + * `MDL` - Moldovan Leu + * `MCF` - Monegasque Franc + * `MNT` - Mongolian Tugrik + * `MAD` - Moroccan Dirham + * `MAF` - Moroccan Franc + * `MZE` - Mozambican Escudo + * `MZN` - Mozambican Metical + * `MZM` - Mozambican Metical (1980–2006) + * `MMK` - Myanmar Kyat + * `NAD` - Namibian Dollar + * `NPR` - Nepalese Rupee + * `ANG` - Netherlands Antillean Guilder + * `TWD` - New Taiwan Dollar + * `NZD` - New Zealand Dollar + * `NIO` - Nicaraguan Córdoba + * `NIC` - Nicaraguan Córdoba (1988–1991) + * `NGN` - Nigerian Naira + * `KPW` - North Korean Won + * `NOK` - Norwegian Krone + * `OMR` - Omani Rial + * `PKR` - Pakistani Rupee + * `XPD` - Palladium + * `PAB` - Panamanian Balboa + * `PGK` - Papua New Guinean Kina + * `PYG` - Paraguayan Guarani + * `PEI` - Peruvian Inti + * `PEN` - Peruvian Sol + * `PES` - Peruvian Sol (1863–1965) + * `PHP` - Philippine Peso + * `XPT` - Platinum + * `PLN` - Polish Zloty + * `PLZ` - Polish Zloty (1950–1995) + * `PTE` - Portuguese Escudo + * `GWE` - Portuguese Guinea Escudo + * `QAR` - Qatari Rial + * `XRE` - RINET Funds + * `RHD` - Rhodesian Dollar + * `RON` - Romanian Leu + * `ROL` - Romanian Leu (1952–2006) + * `RUB` - Russian Ruble + * `RUR` - Russian Ruble (1991–1998) + * `RWF` - Rwandan Franc + * `SVC` - Salvadoran Colón + * `WST` - Samoan Tala + * `SAR` - Saudi Riyal + * `RSD` - Serbian Dinar + * `CSD` - Serbian Dinar (2002–2006) + * `SCR` - Seychellois Rupee + * `SLL` - Sierra Leonean Leone + * `XAG` - Silver + * `SGD` - Singapore Dollar + * `SKK` - Slovak Koruna + * `SIT` - Slovenian Tolar + * `SBD` - Solomon Islands Dollar + * `SOS` - Somali Shilling + * `ZAR` - South African Rand + * `ZAL` - South African Rand (financial) + * `KRH` - South Korean Hwan (1953–1962) + * `KRW` - South Korean Won + * `KRO` - South Korean Won (1945–1953) + * `SSP` - South Sudanese Pound + * `SUR` - Soviet Rouble + * `ESP` - Spanish Peseta + * `ESA` - Spanish Peseta (A account) + * `ESB` - Spanish Peseta (convertible account) + * `XDR` - Special Drawing Rights + * `LKR` - Sri Lankan Rupee + * `SHP` - St. Helena Pound + * `XSU` - Sucre + * `SDD` - Sudanese Dinar (1992–2007) + * `SDG` - Sudanese Pound + * `SDP` - Sudanese Pound (1957–1998) + * `SRD` - Surinamese Dollar + * `SRG` - Surinamese Guilder + * `SZL` - Swazi Lilangeni + * `SEK` - Swedish Krona + * `CHF` - Swiss Franc + * `SYP` - Syrian Pound + * `STN` - São Tomé & Príncipe Dobra + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + * `TVD` - TVD + * `TJR` - Tajikistani Ruble + * `TJS` - Tajikistani Somoni + * `TZS` - Tanzanian Shilling + * `XTS` - Testing Currency Code + * `THB` - Thai Baht + * `XXX` - The codes assigned for transactions where no currency is involved + * `TPE` - Timorese Escudo + * `TOP` - Tongan Paʻanga + * `TTD` - Trinidad & Tobago Dollar + * `TND` - Tunisian Dinar + * `TRY` - Turkish Lira + * `TRL` - Turkish Lira (1922–2005) + * `TMT` - Turkmenistani Manat + * `TMM` - Turkmenistani Manat (1993–2009) + * `USD` - US Dollar + * `USN` - US Dollar (Next day) + * `USS` - US Dollar (Same day) + * `UGX` - Ugandan Shilling + * `UGS` - Ugandan Shilling (1966–1987) + * `UAH` - Ukrainian Hryvnia + * `UAK` - Ukrainian Karbovanets + * `AED` - United Arab Emirates Dirham + * `UYW` - Uruguayan Nominal Wage Index Unit + * `UYU` - Uruguayan Peso + * `UYP` - Uruguayan Peso (1975–1993) + * `UYI` - Uruguayan Peso (Indexed Units) + * `UZS` - Uzbekistani Som + * `VUV` - Vanuatu Vatu + * `VES` - Venezuelan Bolívar + * `VEB` - Venezuelan Bolívar (1871–2008) + * `VEF` - Venezuelan Bolívar (2008–2018) + * `VND` - Vietnamese Dong + * `VNN` - Vietnamese Dong (1978–1985) + * `CHE` - WIR Euro + * `CHW` - WIR Franc + * `XOF` - West African CFA Franc + * `YDD` - Yemeni Dinar + * `YER` - Yemeni Rial + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + * `YUM` - Yugoslavian New Dinar (1994–2002) + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + * `ZWN` - ZWN + * `ZRN` - Zairean New Zaire (1993–1998) + * `ZRZ` - Zairean Zaire (1971–1993) + * `ZMW` - Zambian Kwacha + * `ZMK` - Zambian Kwacha (1968–2012) + * `ZWD` - Zimbabwean Dollar (1980–2008) + * `ZWR` - Zimbabwean Dollar (2008) + * `ZWL` - Zimbabwean Dollar (2009) + example: USD + tax_rate: + type: string + format: uuid + nullable: true + example: a12e7c20-1922-9df7-s75n-edfeewnn7384 + description: The tax rate that applies to this line item. + exchange_rate: + type: string + format: decimal + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + nullable: true + description: The purchase order line item's exchange rate. + example: '2.9' + company: + type: string + format: uuid + nullable: true + description: The company the purchase order line item belongs to. + example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: + type: boolean + readOnly: true + description: 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/). + remote_fields: + type: array + items: + $ref: '#/components/schemas/RemoteField' + readOnly: true + x-merge-nested-write-allowed: true + x-merge-expands: '{"item": "Item"}' + x-merge-category: accounting + PurchaseOrderLineItemRequest: + type: object + description: |- + # The PurchaseOrderLineItem Object + ### Description + The `PurchaseOrderLineItem` object is used to represent a purchase order's line item. + + ### Usage Example + Fetch from the `GET PurchaseOrder` endpoint and view a company's purchase orders. + properties: + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '121222' + description: + type: string + nullable: true + description: A description of the good being purchased. + example: Pickleball paddles + unit_price: + type: number + format: double + nullable: true + description: The line item's unit price. + example: 25 + quantity: + type: number + format: double + nullable: true + description: The line item's quantity. + example: 10 + item: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Item' + nullable: true + example: 0958cbc6-6040-430a-848e-aafacbadf4ae + x-merge-expands-to: Item + account: + type: string + format: uuid + nullable: true + description: The purchase order line item's account. + tracking_category: + type: string + format: uuid + nullable: true + description: The purchase order line item's associated tracking category. + deprecated: true + tracking_categories: + type: array + items: + type: string + format: uuid + nullable: true + example: + - f1214c24-2702-4617-b74b-3ddecfc0d384 + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + description: The purchase order line item's associated tracking categories. + tax_amount: + type: string + format: decimal + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + nullable: true + description: The purchase order line item's tax amount. + example: 10 + total_line_amount: + type: string + format: decimal + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + nullable: true + description: The purchase order line item's total amount. + example: 260 + currency: + oneOf: + - $ref: '#/components/schemas/TransactionCurrencyEnum' + - type: string + nullable: true + description: |- + The purchase order line item's currency. + + * `XUA` - ADB Unit of Account + * `AFN` - Afghan Afghani + * `AFA` - Afghan Afghani (1927–2002) + * `ALL` - Albanian Lek + * `ALK` - Albanian Lek (1946–1965) + * `DZD` - Algerian Dinar + * `ADP` - Andorran Peseta + * `AOA` - Angolan Kwanza + * `AOK` - Angolan Kwanza (1977–1991) + * `AON` - Angolan New Kwanza (1990–2000) + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + * `ARA` - Argentine Austral + * `ARS` - Argentine Peso + * `ARM` - Argentine Peso (1881–1970) + * `ARP` - Argentine Peso (1983–1985) + * `ARL` - Argentine Peso Ley (1970–1983) + * `AMD` - Armenian Dram + * `AWG` - Aruban Florin + * `AUD` - Australian Dollar + * `ATS` - Austrian Schilling + * `AZN` - Azerbaijani Manat + * `AZM` - Azerbaijani Manat (1993–2006) + * `BSD` - Bahamian Dollar + * `BHD` - Bahraini Dinar + * `BDT` - Bangladeshi Taka + * `BBD` - Barbadian Dollar + * `BYN` - Belarusian Ruble + * `BYB` - Belarusian Ruble (1994–1999) + * `BYR` - Belarusian Ruble (2000–2016) + * `BEF` - Belgian Franc + * `BEC` - Belgian Franc (convertible) + * `BEL` - Belgian Franc (financial) + * `BZD` - Belize Dollar + * `BMD` - Bermudan Dollar + * `BTN` - Bhutanese Ngultrum + * `BOB` - Bolivian Boliviano + * `BOL` - Bolivian Boliviano (1863–1963) + * `BOV` - Bolivian Mvdol + * `BOP` - Bolivian Peso + * `BAM` - Bosnia-Herzegovina Convertible Mark + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + * `BWP` - Botswanan Pula + * `BRC` - Brazilian Cruzado (1986–1989) + * `BRZ` - Brazilian Cruzeiro (1942–1967) + * `BRE` - Brazilian Cruzeiro (1990–1993) + * `BRR` - Brazilian Cruzeiro (1993–1994) + * `BRN` - Brazilian New Cruzado (1989–1990) + * `BRB` - Brazilian New Cruzeiro (1967–1986) + * `BRL` - Brazilian Real + * `GBP` - British Pound + * `BND` - Brunei Dollar + * `BGL` - Bulgarian Hard Lev + * `BGN` - Bulgarian Lev + * `BGO` - Bulgarian Lev (1879–1952) + * `BGM` - Bulgarian Socialist Lev + * `BUK` - Burmese Kyat + * `BIF` - Burundian Franc + * `XPF` - CFP Franc + * `KHR` - Cambodian Riel + * `CAD` - Canadian Dollar + * `CVE` - Cape Verdean Escudo + * `KYD` - Cayman Islands Dollar + * `XAF` - Central African CFA Franc + * `CLE` - Chilean Escudo + * `CLP` - Chilean Peso + * `CLF` - Chilean Unit of Account (UF) + * `CNX` - Chinese People’s Bank Dollar + * `CNY` - Chinese Yuan + * `CNH` - Chinese Yuan (offshore) + * `COP` - Colombian Peso + * `COU` - Colombian Real Value Unit + * `KMF` - Comorian Franc + * `CDF` - Congolese Franc + * `CRC` - Costa Rican Colón + * `HRD` - Croatian Dinar + * `HRK` - Croatian Kuna + * `CUC` - Cuban Convertible Peso + * `CUP` - Cuban Peso + * `CYP` - Cypriot Pound + * `CZK` - Czech Koruna + * `CSK` - Czechoslovak Hard Koruna + * `DKK` - Danish Krone + * `DJF` - Djiboutian Franc + * `DOP` - Dominican Peso + * `NLG` - Dutch Guilder + * `XCD` - East Caribbean Dollar + * `DDM` - East German Mark + * `ECS` - Ecuadorian Sucre + * `ECV` - Ecuadorian Unit of Constant Value + * `EGP` - Egyptian Pound + * `GQE` - Equatorial Guinean Ekwele + * `ERN` - Eritrean Nakfa + * `EEK` - Estonian Kroon + * `ETB` - Ethiopian Birr + * `EUR` - Euro + * `XBA` - European Composite Unit + * `XEU` - European Currency Unit + * `XBB` - European Monetary Unit + * `XBC` - European Unit of Account (XBC) + * `XBD` - European Unit of Account (XBD) + * `FKP` - Falkland Islands Pound + * `FJD` - Fijian Dollar + * `FIM` - Finnish Markka + * `FRF` - French Franc + * `XFO` - French Gold Franc + * `XFU` - French UIC-Franc + * `GMD` - Gambian Dalasi + * `GEK` - Georgian Kupon Larit + * `GEL` - Georgian Lari + * `DEM` - German Mark + * `GHS` - Ghanaian Cedi + * `GHC` - Ghanaian Cedi (1979–2007) + * `GIP` - Gibraltar Pound + * `XAU` - Gold + * `GRD` - Greek Drachma + * `GTQ` - Guatemalan Quetzal + * `GWP` - Guinea-Bissau Peso + * `GNF` - Guinean Franc + * `GNS` - Guinean Syli + * `GYD` - Guyanaese Dollar + * `HTG` - Haitian Gourde + * `HNL` - Honduran Lempira + * `HKD` - Hong Kong Dollar + * `HUF` - Hungarian Forint + * `IMP` - IMP + * `ISK` - Icelandic Króna + * `ISJ` - Icelandic Króna (1918–1981) + * `INR` - Indian Rupee + * `IDR` - Indonesian Rupiah + * `IRR` - Iranian Rial + * `IQD` - Iraqi Dinar + * `IEP` - Irish Pound + * `ILS` - Israeli New Shekel + * `ILP` - Israeli Pound + * `ILR` - Israeli Shekel (1980–1985) + * `ITL` - Italian Lira + * `JMD` - Jamaican Dollar + * `JPY` - Japanese Yen + * `JOD` - Jordanian Dinar + * `KZT` - Kazakhstani Tenge + * `KES` - Kenyan Shilling + * `KWD` - Kuwaiti Dinar + * `KGS` - Kyrgystani Som + * `LAK` - Laotian Kip + * `LVL` - Latvian Lats + * `LVR` - Latvian Ruble + * `LBP` - Lebanese Pound + * `LSL` - Lesotho Loti + * `LRD` - Liberian Dollar + * `LYD` - Libyan Dinar + * `LTL` - Lithuanian Litas + * `LTT` - Lithuanian Talonas + * `LUL` - Luxembourg Financial Franc + * `LUC` - Luxembourgian Convertible Franc + * `LUF` - Luxembourgian Franc + * `MOP` - Macanese Pataca + * `MKD` - Macedonian Denar + * `MKN` - Macedonian Denar (1992–1993) + * `MGA` - Malagasy Ariary + * `MGF` - Malagasy Franc + * `MWK` - Malawian Kwacha + * `MYR` - Malaysian Ringgit + * `MVR` - Maldivian Rufiyaa + * `MVP` - Maldivian Rupee (1947–1981) + * `MLF` - Malian Franc + * `MTL` - Maltese Lira + * `MTP` - Maltese Pound + * `MRU` - Mauritanian Ouguiya + * `MRO` - Mauritanian Ouguiya (1973–2017) + * `MUR` - Mauritian Rupee + * `MXV` - Mexican Investment Unit + * `MXN` - Mexican Peso + * `MXP` - Mexican Silver Peso (1861–1992) + * `MDC` - Moldovan Cupon + * `MDL` - Moldovan Leu + * `MCF` - Monegasque Franc + * `MNT` - Mongolian Tugrik + * `MAD` - Moroccan Dirham + * `MAF` - Moroccan Franc + * `MZE` - Mozambican Escudo + * `MZN` - Mozambican Metical + * `MZM` - Mozambican Metical (1980–2006) + * `MMK` - Myanmar Kyat + * `NAD` - Namibian Dollar + * `NPR` - Nepalese Rupee + * `ANG` - Netherlands Antillean Guilder + * `TWD` - New Taiwan Dollar + * `NZD` - New Zealand Dollar + * `NIO` - Nicaraguan Córdoba + * `NIC` - Nicaraguan Córdoba (1988–1991) + * `NGN` - Nigerian Naira + * `KPW` - North Korean Won + * `NOK` - Norwegian Krone + * `OMR` - Omani Rial + * `PKR` - Pakistani Rupee + * `XPD` - Palladium + * `PAB` - Panamanian Balboa + * `PGK` - Papua New Guinean Kina + * `PYG` - Paraguayan Guarani + * `PEI` - Peruvian Inti + * `PEN` - Peruvian Sol + * `PES` - Peruvian Sol (1863–1965) + * `PHP` - Philippine Peso + * `XPT` - Platinum + * `PLN` - Polish Zloty + * `PLZ` - Polish Zloty (1950–1995) + * `PTE` - Portuguese Escudo + * `GWE` - Portuguese Guinea Escudo + * `QAR` - Qatari Rial + * `XRE` - RINET Funds + * `RHD` - Rhodesian Dollar + * `RON` - Romanian Leu + * `ROL` - Romanian Leu (1952–2006) + * `RUB` - Russian Ruble + * `RUR` - Russian Ruble (1991–1998) + * `RWF` - Rwandan Franc + * `SVC` - Salvadoran Colón + * `WST` - Samoan Tala + * `SAR` - Saudi Riyal + * `RSD` - Serbian Dinar + * `CSD` - Serbian Dinar (2002–2006) + * `SCR` - Seychellois Rupee + * `SLL` - Sierra Leonean Leone + * `XAG` - Silver + * `SGD` - Singapore Dollar + * `SKK` - Slovak Koruna + * `SIT` - Slovenian Tolar + * `SBD` - Solomon Islands Dollar + * `SOS` - Somali Shilling + * `ZAR` - South African Rand + * `ZAL` - South African Rand (financial) + * `KRH` - South Korean Hwan (1953–1962) + * `KRW` - South Korean Won + * `KRO` - South Korean Won (1945–1953) + * `SSP` - South Sudanese Pound + * `SUR` - Soviet Rouble + * `ESP` - Spanish Peseta + * `ESA` - Spanish Peseta (A account) + * `ESB` - Spanish Peseta (convertible account) + * `XDR` - Special Drawing Rights + * `LKR` - Sri Lankan Rupee + * `SHP` - St. Helena Pound + * `XSU` - Sucre + * `SDD` - Sudanese Dinar (1992–2007) + * `SDG` - Sudanese Pound + * `SDP` - Sudanese Pound (1957–1998) + * `SRD` - Surinamese Dollar + * `SRG` - Surinamese Guilder + * `SZL` - Swazi Lilangeni + * `SEK` - Swedish Krona + * `CHF` - Swiss Franc + * `SYP` - Syrian Pound + * `STN` - São Tomé & Príncipe Dobra + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + * `TVD` - TVD + * `TJR` - Tajikistani Ruble + * `TJS` - Tajikistani Somoni + * `TZS` - Tanzanian Shilling + * `XTS` - Testing Currency Code + * `THB` - Thai Baht + * `XXX` - The codes assigned for transactions where no currency is involved + * `TPE` - Timorese Escudo + * `TOP` - Tongan Paʻanga + * `TTD` - Trinidad & Tobago Dollar + * `TND` - Tunisian Dinar + * `TRY` - Turkish Lira + * `TRL` - Turkish Lira (1922–2005) + * `TMT` - Turkmenistani Manat + * `TMM` - Turkmenistani Manat (1993–2009) + * `USD` - US Dollar + * `USN` - US Dollar (Next day) + * `USS` - US Dollar (Same day) + * `UGX` - Ugandan Shilling + * `UGS` - Ugandan Shilling (1966–1987) + * `UAH` - Ukrainian Hryvnia + * `UAK` - Ukrainian Karbovanets + * `AED` - United Arab Emirates Dirham + * `UYW` - Uruguayan Nominal Wage Index Unit + * `UYU` - Uruguayan Peso + * `UYP` - Uruguayan Peso (1975–1993) + * `UYI` - Uruguayan Peso (Indexed Units) + * `UZS` - Uzbekistani Som + * `VUV` - Vanuatu Vatu + * `VES` - Venezuelan Bolívar + * `VEB` - Venezuelan Bolívar (1871–2008) + * `VEF` - Venezuelan Bolívar (2008–2018) + * `VND` - Vietnamese Dong + * `VNN` - Vietnamese Dong (1978–1985) + * `CHE` - WIR Euro + * `CHW` - WIR Franc + * `XOF` - West African CFA Franc + * `YDD` - Yemeni Dinar + * `YER` - Yemeni Rial + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + * `YUM` - Yugoslavian New Dinar (1994–2002) + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + * `ZWN` - ZWN + * `ZRN` - Zairean New Zaire (1993–1998) + * `ZRZ` - Zairean Zaire (1971–1993) + * `ZMW` - Zambian Kwacha + * `ZMK` - Zambian Kwacha (1968–2012) + * `ZWD` - Zimbabwean Dollar (1980–2008) + * `ZWR` - Zimbabwean Dollar (2008) + * `ZWL` - Zimbabwean Dollar (2009) + example: USD + tax_rate: + type: string + format: uuid + nullable: true + example: a12e7c20-1922-9df7-s75n-edfeewnn7384 + description: The tax rate that applies to this line item. + exchange_rate: + type: string + format: decimal + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + nullable: true + description: The purchase order line item's exchange rate. + example: '2.9' + company: + type: string + format: uuid + nullable: true + description: The company the purchase order line item belongs to. + example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + remote_fields: + type: array + items: + $ref: '#/components/schemas/RemoteFieldRequest' + writeOnly: true + x-merge-expands: '{"item": "Item"}' + x-merge-category: accounting + PurchaseOrderRequest: + type: object + description: |- + # The PurchaseOrder Object + ### Description + The `PurchaseOrder` object is a record of request for a product or service between a buyer and seller. + + ### Usage Example + Fetch from the `LIST PurchaseOrders` endpoint and view a company's purchase orders. + properties: + status: + oneOf: + - $ref: '#/components/schemas/PurchaseOrderStatusEnum' + - type: string + nullable: true + description: |- + The purchase order's status. + + * `DRAFT` - DRAFT + * `SUBMITTED` - SUBMITTED + * `AUTHORIZED` - AUTHORIZED + * `BILLED` - BILLED + * `DELETED` - DELETED + issue_date: + type: string + format: date-time + nullable: true + description: The purchase order's issue date. + delivery_date: + type: string + format: date-time + nullable: true + description: The purchase order's delivery date. + delivery_address: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Address' + nullable: true + description: The purchase order's delivery address. + x-merge-expands-to: Address + customer: + type: string + format: uuid + nullable: true + description: The contact making the purchase order. + vendor: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Contact' + nullable: true + description: The party fulfilling the purchase order. + x-merge-expands-to: Contact + memo: + type: string + nullable: true + description: A memo attached to the purchase order. + company: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/CompanyInfo' + nullable: true + description: The company the purchase order belongs to. + x-merge-expands-to: CompanyInfo + total_amount: + type: number + format: double + nullable: true + description: The purchase order's total amount. + payment_term: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/PaymentTerm' + nullable: true + description: The payment term that applies to this transaction. + x-merge-expands-to: PaymentTerm + currency: + oneOf: + - $ref: '#/components/schemas/TransactionCurrencyEnum' + - type: string + nullable: true + description: |- + The purchase order's currency. + + * `XUA` - ADB Unit of Account + * `AFN` - Afghan Afghani + * `AFA` - Afghan Afghani (1927–2002) + * `ALL` - Albanian Lek + * `ALK` - Albanian Lek (1946–1965) + * `DZD` - Algerian Dinar + * `ADP` - Andorran Peseta + * `AOA` - Angolan Kwanza + * `AOK` - Angolan Kwanza (1977–1991) + * `AON` - Angolan New Kwanza (1990–2000) + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + * `ARA` - Argentine Austral + * `ARS` - Argentine Peso + * `ARM` - Argentine Peso (1881–1970) + * `ARP` - Argentine Peso (1983–1985) + * `ARL` - Argentine Peso Ley (1970–1983) + * `AMD` - Armenian Dram + * `AWG` - Aruban Florin + * `AUD` - Australian Dollar + * `ATS` - Austrian Schilling + * `AZN` - Azerbaijani Manat + * `AZM` - Azerbaijani Manat (1993–2006) + * `BSD` - Bahamian Dollar + * `BHD` - Bahraini Dinar + * `BDT` - Bangladeshi Taka + * `BBD` - Barbadian Dollar + * `BYN` - Belarusian Ruble + * `BYB` - Belarusian Ruble (1994–1999) + * `BYR` - Belarusian Ruble (2000–2016) + * `BEF` - Belgian Franc + * `BEC` - Belgian Franc (convertible) + * `BEL` - Belgian Franc (financial) + * `BZD` - Belize Dollar + * `BMD` - Bermudan Dollar + * `BTN` - Bhutanese Ngultrum + * `BOB` - Bolivian Boliviano + * `BOL` - Bolivian Boliviano (1863–1963) + * `BOV` - Bolivian Mvdol + * `BOP` - Bolivian Peso + * `BAM` - Bosnia-Herzegovina Convertible Mark + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + * `BWP` - Botswanan Pula + * `BRC` - Brazilian Cruzado (1986–1989) + * `BRZ` - Brazilian Cruzeiro (1942–1967) + * `BRE` - Brazilian Cruzeiro (1990–1993) + * `BRR` - Brazilian Cruzeiro (1993–1994) + * `BRN` - Brazilian New Cruzado (1989–1990) + * `BRB` - Brazilian New Cruzeiro (1967–1986) + * `BRL` - Brazilian Real + * `GBP` - British Pound + * `BND` - Brunei Dollar + * `BGL` - Bulgarian Hard Lev + * `BGN` - Bulgarian Lev + * `BGO` - Bulgarian Lev (1879–1952) + * `BGM` - Bulgarian Socialist Lev + * `BUK` - Burmese Kyat + * `BIF` - Burundian Franc + * `XPF` - CFP Franc + * `KHR` - Cambodian Riel + * `CAD` - Canadian Dollar + * `CVE` - Cape Verdean Escudo + * `KYD` - Cayman Islands Dollar + * `XAF` - Central African CFA Franc + * `CLE` - Chilean Escudo + * `CLP` - Chilean Peso + * `CLF` - Chilean Unit of Account (UF) + * `CNX` - Chinese People’s Bank Dollar + * `CNY` - Chinese Yuan + * `CNH` - Chinese Yuan (offshore) + * `COP` - Colombian Peso + * `COU` - Colombian Real Value Unit + * `KMF` - Comorian Franc + * `CDF` - Congolese Franc + * `CRC` - Costa Rican Colón + * `HRD` - Croatian Dinar + * `HRK` - Croatian Kuna + * `CUC` - Cuban Convertible Peso + * `CUP` - Cuban Peso + * `CYP` - Cypriot Pound + * `CZK` - Czech Koruna + * `CSK` - Czechoslovak Hard Koruna + * `DKK` - Danish Krone + * `DJF` - Djiboutian Franc + * `DOP` - Dominican Peso + * `NLG` - Dutch Guilder + * `XCD` - East Caribbean Dollar + * `DDM` - East German Mark + * `ECS` - Ecuadorian Sucre + * `ECV` - Ecuadorian Unit of Constant Value + * `EGP` - Egyptian Pound + * `GQE` - Equatorial Guinean Ekwele + * `ERN` - Eritrean Nakfa + * `EEK` - Estonian Kroon + * `ETB` - Ethiopian Birr + * `EUR` - Euro + * `XBA` - European Composite Unit + * `XEU` - European Currency Unit + * `XBB` - European Monetary Unit + * `XBC` - European Unit of Account (XBC) + * `XBD` - European Unit of Account (XBD) + * `FKP` - Falkland Islands Pound + * `FJD` - Fijian Dollar + * `FIM` - Finnish Markka + * `FRF` - French Franc + * `XFO` - French Gold Franc + * `XFU` - French UIC-Franc + * `GMD` - Gambian Dalasi + * `GEK` - Georgian Kupon Larit + * `GEL` - Georgian Lari + * `DEM` - German Mark + * `GHS` - Ghanaian Cedi + * `GHC` - Ghanaian Cedi (1979–2007) + * `GIP` - Gibraltar Pound + * `XAU` - Gold + * `GRD` - Greek Drachma + * `GTQ` - Guatemalan Quetzal + * `GWP` - Guinea-Bissau Peso + * `GNF` - Guinean Franc + * `GNS` - Guinean Syli + * `GYD` - Guyanaese Dollar + * `HTG` - Haitian Gourde + * `HNL` - Honduran Lempira + * `HKD` - Hong Kong Dollar + * `HUF` - Hungarian Forint + * `IMP` - IMP + * `ISK` - Icelandic Króna + * `ISJ` - Icelandic Króna (1918–1981) + * `INR` - Indian Rupee + * `IDR` - Indonesian Rupiah + * `IRR` - Iranian Rial + * `IQD` - Iraqi Dinar + * `IEP` - Irish Pound + * `ILS` - Israeli New Shekel + * `ILP` - Israeli Pound + * `ILR` - Israeli Shekel (1980–1985) + * `ITL` - Italian Lira + * `JMD` - Jamaican Dollar + * `JPY` - Japanese Yen + * `JOD` - Jordanian Dinar + * `KZT` - Kazakhstani Tenge + * `KES` - Kenyan Shilling + * `KWD` - Kuwaiti Dinar + * `KGS` - Kyrgystani Som + * `LAK` - Laotian Kip + * `LVL` - Latvian Lats + * `LVR` - Latvian Ruble + * `LBP` - Lebanese Pound + * `LSL` - Lesotho Loti + * `LRD` - Liberian Dollar + * `LYD` - Libyan Dinar + * `LTL` - Lithuanian Litas + * `LTT` - Lithuanian Talonas + * `LUL` - Luxembourg Financial Franc + * `LUC` - Luxembourgian Convertible Franc + * `LUF` - Luxembourgian Franc + * `MOP` - Macanese Pataca + * `MKD` - Macedonian Denar + * `MKN` - Macedonian Denar (1992–1993) + * `MGA` - Malagasy Ariary + * `MGF` - Malagasy Franc + * `MWK` - Malawian Kwacha + * `MYR` - Malaysian Ringgit + * `MVR` - Maldivian Rufiyaa + * `MVP` - Maldivian Rupee (1947–1981) + * `MLF` - Malian Franc + * `MTL` - Maltese Lira + * `MTP` - Maltese Pound + * `MRU` - Mauritanian Ouguiya + * `MRO` - Mauritanian Ouguiya (1973–2017) + * `MUR` - Mauritian Rupee + * `MXV` - Mexican Investment Unit + * `MXN` - Mexican Peso + * `MXP` - Mexican Silver Peso (1861–1992) + * `MDC` - Moldovan Cupon + * `MDL` - Moldovan Leu + * `MCF` - Monegasque Franc + * `MNT` - Mongolian Tugrik + * `MAD` - Moroccan Dirham + * `MAF` - Moroccan Franc + * `MZE` - Mozambican Escudo + * `MZN` - Mozambican Metical + * `MZM` - Mozambican Metical (1980–2006) + * `MMK` - Myanmar Kyat + * `NAD` - Namibian Dollar + * `NPR` - Nepalese Rupee + * `ANG` - Netherlands Antillean Guilder + * `TWD` - New Taiwan Dollar + * `NZD` - New Zealand Dollar + * `NIO` - Nicaraguan Córdoba + * `NIC` - Nicaraguan Córdoba (1988–1991) + * `NGN` - Nigerian Naira + * `KPW` - North Korean Won + * `NOK` - Norwegian Krone + * `OMR` - Omani Rial + * `PKR` - Pakistani Rupee + * `XPD` - Palladium + * `PAB` - Panamanian Balboa + * `PGK` - Papua New Guinean Kina + * `PYG` - Paraguayan Guarani + * `PEI` - Peruvian Inti + * `PEN` - Peruvian Sol + * `PES` - Peruvian Sol (1863–1965) + * `PHP` - Philippine Peso + * `XPT` - Platinum + * `PLN` - Polish Zloty + * `PLZ` - Polish Zloty (1950–1995) + * `PTE` - Portuguese Escudo + * `GWE` - Portuguese Guinea Escudo + * `QAR` - Qatari Rial + * `XRE` - RINET Funds + * `RHD` - Rhodesian Dollar + * `RON` - Romanian Leu + * `ROL` - Romanian Leu (1952–2006) + * `RUB` - Russian Ruble + * `RUR` - Russian Ruble (1991–1998) + * `RWF` - Rwandan Franc + * `SVC` - Salvadoran Colón + * `WST` - Samoan Tala + * `SAR` - Saudi Riyal + * `RSD` - Serbian Dinar + * `CSD` - Serbian Dinar (2002–2006) + * `SCR` - Seychellois Rupee + * `SLL` - Sierra Leonean Leone + * `XAG` - Silver + * `SGD` - Singapore Dollar + * `SKK` - Slovak Koruna + * `SIT` - Slovenian Tolar + * `SBD` - Solomon Islands Dollar + * `SOS` - Somali Shilling + * `ZAR` - South African Rand + * `ZAL` - South African Rand (financial) + * `KRH` - South Korean Hwan (1953–1962) + * `KRW` - South Korean Won + * `KRO` - South Korean Won (1945–1953) + * `SSP` - South Sudanese Pound + * `SUR` - Soviet Rouble + * `ESP` - Spanish Peseta + * `ESA` - Spanish Peseta (A account) + * `ESB` - Spanish Peseta (convertible account) + * `XDR` - Special Drawing Rights + * `LKR` - Sri Lankan Rupee + * `SHP` - St. Helena Pound + * `XSU` - Sucre + * `SDD` - Sudanese Dinar (1992–2007) + * `SDG` - Sudanese Pound + * `SDP` - Sudanese Pound (1957–1998) + * `SRD` - Surinamese Dollar + * `SRG` - Surinamese Guilder + * `SZL` - Swazi Lilangeni + * `SEK` - Swedish Krona + * `CHF` - Swiss Franc + * `SYP` - Syrian Pound + * `STN` - São Tomé & Príncipe Dobra + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + * `TVD` - TVD + * `TJR` - Tajikistani Ruble + * `TJS` - Tajikistani Somoni + * `TZS` - Tanzanian Shilling + * `XTS` - Testing Currency Code + * `THB` - Thai Baht + * `XXX` - The codes assigned for transactions where no currency is involved + * `TPE` - Timorese Escudo + * `TOP` - Tongan Paʻanga + * `TTD` - Trinidad & Tobago Dollar + * `TND` - Tunisian Dinar + * `TRY` - Turkish Lira + * `TRL` - Turkish Lira (1922–2005) + * `TMT` - Turkmenistani Manat + * `TMM` - Turkmenistani Manat (1993–2009) + * `USD` - US Dollar + * `USN` - US Dollar (Next day) + * `USS` - US Dollar (Same day) + * `UGX` - Ugandan Shilling + * `UGS` - Ugandan Shilling (1966–1987) + * `UAH` - Ukrainian Hryvnia + * `UAK` - Ukrainian Karbovanets + * `AED` - United Arab Emirates Dirham + * `UYW` - Uruguayan Nominal Wage Index Unit + * `UYU` - Uruguayan Peso + * `UYP` - Uruguayan Peso (1975–1993) + * `UYI` - Uruguayan Peso (Indexed Units) + * `UZS` - Uzbekistani Som + * `VUV` - Vanuatu Vatu + * `VES` - Venezuelan Bolívar + * `VEB` - Venezuelan Bolívar (1871–2008) + * `VEF` - Venezuelan Bolívar (2008–2018) + * `VND` - Vietnamese Dong + * `VNN` - Vietnamese Dong (1978–1985) + * `CHE` - WIR Euro + * `CHW` - WIR Franc + * `XOF` - West African CFA Franc + * `YDD` - Yemeni Dinar + * `YER` - Yemeni Rial + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + * `YUM` - Yugoslavian New Dinar (1994–2002) + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + * `ZWN` - ZWN + * `ZRN` - Zairean New Zaire (1993–1998) + * `ZRZ` - Zairean Zaire (1971–1993) + * `ZMW` - Zambian Kwacha + * `ZMK` - Zambian Kwacha (1968–2012) + * `ZWD` - Zimbabwean Dollar (1980–2008) + * `ZWR` - Zimbabwean Dollar (2008) + * `ZWL` - Zimbabwean Dollar (2009) + inclusive_of_tax: + type: boolean + nullable: true + description: If the transaction is inclusive or exclusive of tax. `True` + if inclusive, `False` if exclusive. + exchange_rate: + type: string + format: decimal + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + nullable: true + description: The purchase order's exchange rate. + tracking_categories: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/TrackingCategory' + nullable: true + x-merge-expands-to: TrackingCategory + line_items: + type: array + items: + $ref: '#/components/schemas/PurchaseOrderLineItemRequest' + x-merge-expands-to: PurchaseOrderLineItem + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + remote_fields: + type: array + items: + $ref: '#/components/schemas/RemoteFieldRequest' + writeOnly: true + x-merge-expands: '{"accounting_period": "AccountingPeriod", "company": "CompanyInfo", + "delivery_address": "Address", "line_items": "PurchaseOrderLineItem", "payment_term": + "PaymentTerm", "tracking_categories": "TrackingCategory", "vendor": "Contact"}' + x-merge-category: accounting + PurchaseOrderResponse: + type: object + properties: + model: + $ref: '#/components/schemas/PurchaseOrder' + warnings: + type: array + items: + $ref: '#/components/schemas/WarningValidationProblem' + errors: + type: array + items: + $ref: '#/components/schemas/ErrorValidationProblem' + logs: + type: array + items: + $ref: '#/components/schemas/DebugModeLog' + required: + - errors + - model + - warnings + x-merge-category: accounting + PurchaseOrderStatusEnum: + enum: + - DRAFT + - SUBMITTED + - AUTHORIZED + - BILLED + - DELETED + type: string + description: |- + * `DRAFT` - DRAFT + * `SUBMITTED` - SUBMITTED + * `AUTHORIZED` - AUTHORIZED + * `BILLED` - BILLED + * `DELETED` - DELETED + x-merge-category: accounting + RemoteData: + type: object + description: |- + # The RemoteData Object + ### Description + The `RemoteData` object is used to represent the full data pulled from the third-party API for an object. + + ### Usage Example + TODO + properties: + path: + type: string + description: The third-party API path that is being called. + example: /platform-endpoint + data: + readOnly: true + description: The data returned from the third-party for this object in its + original, unnormalized format. + example: + - Varies by platform + required: + - path + x-merge-category: accounting + RemoteEndpointInfo: + type: object + properties: + method: + type: string + example: GET + url_path: + type: string + example: /example-url-path + field_traversal_path: + type: array + items: {} + example: + - example_key_name + required: + - field_traversal_path + - method + - url_path + x-merge-category: accounting + RemoteField: + type: object + properties: + remote_field_class: + oneOf: + - type: string + - $ref: '#/components/schemas/RemoteFieldClass' + x-merge-expands-to: RemoteFieldClass + value: + nullable: true + example: string + required: + - remote_field_class + x-merge-expands: '{"remote_field_class": "RemoteFieldClass"}' + x-merge-category: accounting + RemoteFieldAPI: + type: object + properties: + schema: + type: object + additionalProperties: {} + example: + type: string + remote_key_name: + type: string + example: example_remote_key_name + remote_endpoint_info: + $ref: '#/components/schemas/RemoteEndpointInfo' + example: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + type: array + items: {} + nullable: true + example: + - example + advanced_metadata: + allOf: + - $ref: '#/components/schemas/AdvancedMetadata' + nullable: true + coverage: + oneOf: + - type: integer + - type: number + format: double + nullable: true + readOnly: true + example: 0.33 + required: + - advanced_metadata + - remote_endpoint_info + - remote_key_name + - schema + x-merge-category: accounting + RemoteFieldAPIResponse: + type: object + properties: + Account: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + AccountingAttachment: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + BalanceSheet: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + CashFlowStatement: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + CompanyInfo: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + Contact: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + IncomeStatement: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + CreditNote: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + Item: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + PurchaseOrder: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + TrackingCategory: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + JournalEntry: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + TaxRate: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + Invoice: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + Payment: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + Expense: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + VendorCredit: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + Transaction: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + AccountingPeriod: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + GeneralLedgerTransaction: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + BankFeedAccount: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + Employee: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + PaymentMethod: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + Project: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + PaymentTerm: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + x-merge-category: accounting + RemoteFieldClass: + type: object + properties: + id: + type: string + display_name: + type: string + remote_key_name: + type: string + description: + type: string + is_custom: + type: boolean + is_required: + type: boolean + field_type: + $ref: '#/components/schemas/FieldTypeEnum' + field_format: + $ref: '#/components/schemas/FieldFormatEnum' + field_choices: + type: array + items: + type: string + item_schema: + $ref: '#/components/schemas/ItemSchema' + x-merge-category: accounting + RemoteFieldRequest: + type: object + properties: + remote_field_class: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/RemoteFieldClass' + example: b057d1d2-c204-4da8-a74c-c91d1a260614 + x-merge-expands-to: RemoteFieldClass + value: + nullable: true + example: string + required: + - remote_field_class + x-merge-expands: '{"remote_field_class": "RemoteFieldClass"}' + x-merge-category: accounting + RemoteKey: + type: object + description: |- + # The RemoteKey Object + ### Description + The `RemoteKey` object is used to represent a request for a new remote key. + + ### Usage Example + Post a `GenerateRemoteKey` to receive a new `RemoteKey`. + properties: + name: + type: string + example: Remote Deployment Key 1 + key: + type: string + example: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA + required: + - key + - name + x-merge-category: accounting + RemoteKeyForRegenerationRequest: + type: object + description: |- + # The RemoteKeyForRegeneration Object + ### Description + The `RemoteKeyForRegeneration` object is used to exchange an old remote key for a new one + + ### Usage Example + Post a `RemoteKeyForRegeneration` to swap out an old remote key for a new one + properties: + name: + type: string + minLength: 1 + description: The name of the remote key + example: Remote Deployment Key 1 + required: + - name + x-merge-category: accounting + RemoteResponse: + type: object + description: |- + # The RemoteResponse Object + ### Description + The `RemoteResponse` object is used to represent information returned from a third-party endpoint. + + ### Usage Example + View the `RemoteResponse` returned from your `DataPassthrough`. + properties: + method: + type: string + example: GET + path: + type: string + example: /scooters + status: + type: integer + example: 200 + response: + example: + scooters: + - company: Lime + model: Gen 2.5 + - company: Bird + model: Bird Zero + response_headers: + type: object + additionalProperties: {} + example: + X-Page-Token: value + response_type: + allOf: + - $ref: '#/components/schemas/ResponseTypeEnum' + example: JSON + headers: + type: object + additionalProperties: {} + example: + EXTRA-HEADER: value + Authorization: + required: + - method + - path + - response + - status + x-merge-category: accounting + ReportItem: + type: object + description: |- + # The ReportItem Object + ### Description + The `ReportItem` object is used to represent a report item for a Balance Sheet, Cash Flow Statement or Profit and Loss Report. + + ### Usage Example + Fetch from the `GET BalanceSheet` endpoint and view the balance sheet's report items. + properties: + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '10299' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + name: + type: string + nullable: true + description: The report item's name. + example: Revenue + value: + type: number + format: double + nullable: true + description: The report item's value. + example: 1000 + sub_items: + type: array + items: + type: object + additionalProperties: {} + readOnly: true + example: + - remote_id: '10300' + name: Revenue - San Francisco + value: 500 + sub_items: [] + - remote_id: '10301' + name: Revenue - New York + value: 500 + sub_items: [] + company: + type: string + format: uuid + nullable: true + description: The company the report item belongs to. + example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: + type: boolean + description: 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/). + x-merge-nested-write-allowed: true + x-merge-category: accounting + RequestFormatEnum: + enum: + - JSON + - XML + - MULTIPART + type: string + description: |- + * `JSON` - JSON + * `XML` - XML + * `MULTIPART` - MULTIPART + x-merge-category: accounting + ResponseTypeEnum: + enum: + - JSON + - BASE64_GZIP + type: string + description: |- + * `JSON` - JSON + * `BASE64_GZIP` - BASE64_GZIP + x-merge-category: accounting + RoleEnum: + enum: + - ADMIN + - DEVELOPER + - MEMBER + - API + - SYSTEM + - MERGE_TEAM + type: string + description: |- + * `ADMIN` - ADMIN + * `DEVELOPER` - DEVELOPER + * `MEMBER` - MEMBER + * `API` - API + * `SYSTEM` - SYSTEM + * `MERGE_TEAM` - MERGE_TEAM + x-merge-category: accounting + SelectiveSyncConfigurationsUsageEnum: + enum: + - IN_NEXT_SYNC + - IN_LAST_SYNC + type: string + description: |- + * `IN_NEXT_SYNC` - IN_NEXT_SYNC + * `IN_LAST_SYNC` - IN_LAST_SYNC + x-merge-category: accounting + Status7d1Enum: + enum: + - ACTIVE + - ARCHIVED + type: string + description: |- + * `ACTIVE` - ACTIVE + * `ARCHIVED` - ARCHIVED + x-merge-category: accounting + Status895Enum: + enum: + - ACTIVE + - INACTIVE + type: string + description: |- + * `ACTIVE` - ACTIVE + * `INACTIVE` - INACTIVE + x-merge-category: accounting + StatusFd5Enum: + enum: + - SYNCING + - DONE + - FAILED + - DISABLED + - PAUSED + - PARTIALLY_SYNCED + type: string + description: |- + * `SYNCING` - SYNCING + * `DONE` - DONE + * `FAILED` - FAILED + * `DISABLED` - DISABLED + * `PAUSED` - PAUSED + * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED + x-merge-category: accounting + SyncStatus: + type: object + description: |- + # The SyncStatus Object + ### Description + The `SyncStatus` object is used to represent the syncing state of an account + + ### Usage Example + View the `SyncStatus` for an account to see how recently its models were synced. + properties: + model_name: + type: string + example: Invoice + model_id: + type: string + example: accounting.Invoices + last_sync_start: + type: string + format: date-time + example: '2021-03-30T19:44:18.695973Z' + next_sync_start: + type: string + format: date-time + example: '2021-03-30T20:44:18.662942Z' + last_sync_result: + oneOf: + - $ref: '#/components/schemas/LastSyncResultEnum' + - type: string + example: DONE + last_sync_finished: + type: string + format: date-time + example: '2021-03-30T19:55:18.695973Z' + status: + oneOf: + - $ref: '#/components/schemas/StatusFd5Enum' + - type: string + example: SYNCING + is_initial_sync: + type: boolean + example: true + selective_sync_configurations_usage: + $ref: '#/components/schemas/SelectiveSyncConfigurationsUsageEnum' + required: + - is_initial_sync + - model_id + - model_name + - status + x-merge-sample-json: '{"model_name": "Candidate", "model_id": "ats.Candidate", + "last_sync_start": "2021-03-30T19:44:18.695973Z", "next_sync_start": "2021-03-30T20:44:18.662942Z", + "status": "SYNCING", "is_initial_sync": true}' + x-merge-category: accounting + TaxComponent: + type: object + description: |- + # The TaxRate Object + ### Description + The `TaxComponent` object is used to represent any sub-taxes that make up the `TaxRate`. + + ### Usage Example + Fetch from the `LIST TaxRates` endpoint and view tax components relevant to a tax rate. + properties: + id: + type: string + format: uuid + readOnly: true + example: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '039111' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + name: + type: string + nullable: true + description: The tax rate’s name. + maxLength: 100 + example: Drink Tax Component + rate: + type: string + format: decimal + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + nullable: true + description: The tax component’s rate. + example: 15 + is_compound: + type: boolean + nullable: true + description: Returns True if the tax component is compound, False if not. + example: true + component_type: + oneOf: + - $ref: '#/components/schemas/ComponentTypeEnum' + - type: string + nullable: true + description: |- + Returns PURCHASE if the tax component corresponds to a purchase tax or SALES if the tax component corresponds to a sales tax. + + * `SALES` - SALES + * `PURCHASE` - PURCHASE + example: SALES + remote_was_deleted: + type: boolean + readOnly: true + description: 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/). + x-merge-nested-write-allowed: true + x-merge-category: accounting + TaxRate: + type: object + description: |- + # The TaxRate Object + ### Description + The `TaxRate` object is used to represent a tax rate. + + ### Usage Example + Fetch from the `LIST TaxRates` endpoint and view tax rates relevant to a company. + properties: + id: + type: string + format: uuid + readOnly: true + example: b82302de-852e-4e60-b050-edf9da3b7c02 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '039111' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + company: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/CompanyInfo' + nullable: true + description: The subsidiary that the tax rate belongs to (in the case of + multi-entity systems). + example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + x-merge-expands-to: CompanyInfo + code: + type: string + nullable: true + description: The tax code associated with this tax rate or group of tax + rates from the third-party platform. + maxLength: 100 + example: '890' + name: + type: string + nullable: true + description: The tax rate’s name. + maxLength: 100 + example: State tax rate + description: + type: string + nullable: true + description: The tax rate's description. + example: Sales Tax + status: + oneOf: + - $ref: '#/components/schemas/Status7d1Enum' + - type: string + nullable: true + description: |- + The tax rate’s status - `ACTIVE` if an active tax rate, `ARCHIVED` if not active. + + * `ACTIVE` - ACTIVE + * `ARCHIVED` - ARCHIVED + example: ACTIVE + country: + type: string + nullable: true + description: The country the tax rate is associated with. + maxLength: 100 + example: US + total_tax_rate: + type: number + format: double + nullable: true + description: The tax’s total tax rate - sum of the tax components (not compounded). + example: 15 + effective_tax_rate: + type: number + format: double + nullable: true + description: The tax rate’s effective tax rate - total amount of tax with + compounding. + example: 15 + tax_components: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/TaxComponent' + example: + - remote_id: '039111' + is_compound: true + rate: 15 + component_type: SALES + name: Drink Tax Component + description: The related tax components of the tax rate. + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /actions + data: + - Varies by platform + x-merge-expands: '{"company": "CompanyInfo"}' + x-merge-category: accounting + TrackingCategory: + type: object + description: |- + # The TrackingCategory Object + ### Description + A `TrackingCategory` object represents a categorization method used to classify transactions within an accounting platform. They are often used to group records for reporting and analysis purposes. The most common types of `TrackingCategories` are Classes and Departments. + + ### Usage Example + Fetch from the `GET TrackingCategory` endpoint and view a company's tracking category. + properties: + id: + type: string + format: uuid + readOnly: true + example: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '948201' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + name: + type: string + nullable: true + description: The tracking category's name. + example: Marketing Department + status: + oneOf: + - $ref: '#/components/schemas/Status7d1Enum' + - type: string + nullable: true + description: |- + The tracking category's status. + + * `ACTIVE` - ACTIVE + * `ARCHIVED` - ARCHIVED + example: ACTIVE + category_type: + oneOf: + - $ref: '#/components/schemas/CategoryTypeEnum' + - type: string + nullable: true + description: |- + The tracking category’s type. + + * `CLASS` - CLASS + * `DEPARTMENT` - DEPARTMENT + example: DEPARTMENT + parent_category: + type: string + format: uuid + nullable: true + example: d25d609b-945f-4762-b55a-1c8fb220c43c + company: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/CompanyInfo' + nullable: true + description: The company the GeneralLedgerTransaction belongs to. + example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + x-merge-expands-to: CompanyInfo + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + x-merge-expands: '{"company": "CompanyInfo"}' + x-merge-category: accounting + Transaction: + type: object + description: |- + # The Transaction Object + ### Description + The `Transaction` common model includes records of all types of transactions that do not appear in other common models. The type of transaction can be identified through the type field. More specifically, it will contain all types of transactions outside of: + * __Credit Notes__ + * __Expenses__ + * __Invoices__ + * __Journal Entries__ + * __Payments__ + * __Purchase Orders__ + * __Vendor Credits__ + + ### Usage Example + Fetch from the `GET Transaction` endpoint and view a company's transactions. + properties: + id: + type: string + format: uuid + readOnly: true + example: 0048ea5b-911e-4dff-9364-92070dea62ff + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '239741' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + transaction_type: + type: string + nullable: true + description: The type of transaction, which can by any transaction object + not already included in Merge’s common model. + example: estimate + number: + type: string + nullable: true + description: The transaction's number used for identifying purposes. + example: '122' + transaction_date: + type: string + format: date-time + nullable: true + description: The date upon which the transaction occurred. + example: '2020-03-31T00:00:00Z' + account: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Account' + nullable: true + description: The transaction's account. + example: 3e442c5d-8f51-4103-b5c9-dcee39c30a08 + x-merge-expands-to: Account + contact: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Contact' + nullable: true + description: The contact to whom the transaction relates to. + example: 2c22ce34-5c6e-4fc7-a594-7f26bb4cf78b + x-merge-expands-to: Contact + inclusive_of_tax: + type: boolean + nullable: true + description: If the transaction is inclusive or exclusive of tax. `True` + if inclusive, `False` if exclusive. + total_amount: + type: string + format: decimal + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + nullable: true + description: The total amount being paid after taxes. + example: 260 + currency: + oneOf: + - $ref: '#/components/schemas/TransactionCurrencyEnum' + - type: string + nullable: true + description: |- + The transaction's currency. + + * `XUA` - ADB Unit of Account + * `AFN` - Afghan Afghani + * `AFA` - Afghan Afghani (1927–2002) + * `ALL` - Albanian Lek + * `ALK` - Albanian Lek (1946–1965) + * `DZD` - Algerian Dinar + * `ADP` - Andorran Peseta + * `AOA` - Angolan Kwanza + * `AOK` - Angolan Kwanza (1977–1991) + * `AON` - Angolan New Kwanza (1990–2000) + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + * `ARA` - Argentine Austral + * `ARS` - Argentine Peso + * `ARM` - Argentine Peso (1881–1970) + * `ARP` - Argentine Peso (1983–1985) + * `ARL` - Argentine Peso Ley (1970–1983) + * `AMD` - Armenian Dram + * `AWG` - Aruban Florin + * `AUD` - Australian Dollar + * `ATS` - Austrian Schilling + * `AZN` - Azerbaijani Manat + * `AZM` - Azerbaijani Manat (1993–2006) + * `BSD` - Bahamian Dollar + * `BHD` - Bahraini Dinar + * `BDT` - Bangladeshi Taka + * `BBD` - Barbadian Dollar + * `BYN` - Belarusian Ruble + * `BYB` - Belarusian Ruble (1994–1999) + * `BYR` - Belarusian Ruble (2000–2016) + * `BEF` - Belgian Franc + * `BEC` - Belgian Franc (convertible) + * `BEL` - Belgian Franc (financial) + * `BZD` - Belize Dollar + * `BMD` - Bermudan Dollar + * `BTN` - Bhutanese Ngultrum + * `BOB` - Bolivian Boliviano + * `BOL` - Bolivian Boliviano (1863–1963) + * `BOV` - Bolivian Mvdol + * `BOP` - Bolivian Peso + * `BAM` - Bosnia-Herzegovina Convertible Mark + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + * `BWP` - Botswanan Pula + * `BRC` - Brazilian Cruzado (1986–1989) + * `BRZ` - Brazilian Cruzeiro (1942–1967) + * `BRE` - Brazilian Cruzeiro (1990–1993) + * `BRR` - Brazilian Cruzeiro (1993–1994) + * `BRN` - Brazilian New Cruzado (1989–1990) + * `BRB` - Brazilian New Cruzeiro (1967–1986) + * `BRL` - Brazilian Real + * `GBP` - British Pound + * `BND` - Brunei Dollar + * `BGL` - Bulgarian Hard Lev + * `BGN` - Bulgarian Lev + * `BGO` - Bulgarian Lev (1879–1952) + * `BGM` - Bulgarian Socialist Lev + * `BUK` - Burmese Kyat + * `BIF` - Burundian Franc + * `XPF` - CFP Franc + * `KHR` - Cambodian Riel + * `CAD` - Canadian Dollar + * `CVE` - Cape Verdean Escudo + * `KYD` - Cayman Islands Dollar + * `XAF` - Central African CFA Franc + * `CLE` - Chilean Escudo + * `CLP` - Chilean Peso + * `CLF` - Chilean Unit of Account (UF) + * `CNX` - Chinese People’s Bank Dollar + * `CNY` - Chinese Yuan + * `CNH` - Chinese Yuan (offshore) + * `COP` - Colombian Peso + * `COU` - Colombian Real Value Unit + * `KMF` - Comorian Franc + * `CDF` - Congolese Franc + * `CRC` - Costa Rican Colón + * `HRD` - Croatian Dinar + * `HRK` - Croatian Kuna + * `CUC` - Cuban Convertible Peso + * `CUP` - Cuban Peso + * `CYP` - Cypriot Pound + * `CZK` - Czech Koruna + * `CSK` - Czechoslovak Hard Koruna + * `DKK` - Danish Krone + * `DJF` - Djiboutian Franc + * `DOP` - Dominican Peso + * `NLG` - Dutch Guilder + * `XCD` - East Caribbean Dollar + * `DDM` - East German Mark + * `ECS` - Ecuadorian Sucre + * `ECV` - Ecuadorian Unit of Constant Value + * `EGP` - Egyptian Pound + * `GQE` - Equatorial Guinean Ekwele + * `ERN` - Eritrean Nakfa + * `EEK` - Estonian Kroon + * `ETB` - Ethiopian Birr + * `EUR` - Euro + * `XBA` - European Composite Unit + * `XEU` - European Currency Unit + * `XBB` - European Monetary Unit + * `XBC` - European Unit of Account (XBC) + * `XBD` - European Unit of Account (XBD) + * `FKP` - Falkland Islands Pound + * `FJD` - Fijian Dollar + * `FIM` - Finnish Markka + * `FRF` - French Franc + * `XFO` - French Gold Franc + * `XFU` - French UIC-Franc + * `GMD` - Gambian Dalasi + * `GEK` - Georgian Kupon Larit + * `GEL` - Georgian Lari + * `DEM` - German Mark + * `GHS` - Ghanaian Cedi + * `GHC` - Ghanaian Cedi (1979–2007) + * `GIP` - Gibraltar Pound + * `XAU` - Gold + * `GRD` - Greek Drachma + * `GTQ` - Guatemalan Quetzal + * `GWP` - Guinea-Bissau Peso + * `GNF` - Guinean Franc + * `GNS` - Guinean Syli + * `GYD` - Guyanaese Dollar + * `HTG` - Haitian Gourde + * `HNL` - Honduran Lempira + * `HKD` - Hong Kong Dollar + * `HUF` - Hungarian Forint + * `IMP` - IMP + * `ISK` - Icelandic Króna + * `ISJ` - Icelandic Króna (1918–1981) + * `INR` - Indian Rupee + * `IDR` - Indonesian Rupiah + * `IRR` - Iranian Rial + * `IQD` - Iraqi Dinar + * `IEP` - Irish Pound + * `ILS` - Israeli New Shekel + * `ILP` - Israeli Pound + * `ILR` - Israeli Shekel (1980–1985) + * `ITL` - Italian Lira + * `JMD` - Jamaican Dollar + * `JPY` - Japanese Yen + * `JOD` - Jordanian Dinar + * `KZT` - Kazakhstani Tenge + * `KES` - Kenyan Shilling + * `KWD` - Kuwaiti Dinar + * `KGS` - Kyrgystani Som + * `LAK` - Laotian Kip + * `LVL` - Latvian Lats + * `LVR` - Latvian Ruble + * `LBP` - Lebanese Pound + * `LSL` - Lesotho Loti + * `LRD` - Liberian Dollar + * `LYD` - Libyan Dinar + * `LTL` - Lithuanian Litas + * `LTT` - Lithuanian Talonas + * `LUL` - Luxembourg Financial Franc + * `LUC` - Luxembourgian Convertible Franc + * `LUF` - Luxembourgian Franc + * `MOP` - Macanese Pataca + * `MKD` - Macedonian Denar + * `MKN` - Macedonian Denar (1992–1993) + * `MGA` - Malagasy Ariary + * `MGF` - Malagasy Franc + * `MWK` - Malawian Kwacha + * `MYR` - Malaysian Ringgit + * `MVR` - Maldivian Rufiyaa + * `MVP` - Maldivian Rupee (1947–1981) + * `MLF` - Malian Franc + * `MTL` - Maltese Lira + * `MTP` - Maltese Pound + * `MRU` - Mauritanian Ouguiya + * `MRO` - Mauritanian Ouguiya (1973–2017) + * `MUR` - Mauritian Rupee + * `MXV` - Mexican Investment Unit + * `MXN` - Mexican Peso + * `MXP` - Mexican Silver Peso (1861–1992) + * `MDC` - Moldovan Cupon + * `MDL` - Moldovan Leu + * `MCF` - Monegasque Franc + * `MNT` - Mongolian Tugrik + * `MAD` - Moroccan Dirham + * `MAF` - Moroccan Franc + * `MZE` - Mozambican Escudo + * `MZN` - Mozambican Metical + * `MZM` - Mozambican Metical (1980–2006) + * `MMK` - Myanmar Kyat + * `NAD` - Namibian Dollar + * `NPR` - Nepalese Rupee + * `ANG` - Netherlands Antillean Guilder + * `TWD` - New Taiwan Dollar + * `NZD` - New Zealand Dollar + * `NIO` - Nicaraguan Córdoba + * `NIC` - Nicaraguan Córdoba (1988–1991) + * `NGN` - Nigerian Naira + * `KPW` - North Korean Won + * `NOK` - Norwegian Krone + * `OMR` - Omani Rial + * `PKR` - Pakistani Rupee + * `XPD` - Palladium + * `PAB` - Panamanian Balboa + * `PGK` - Papua New Guinean Kina + * `PYG` - Paraguayan Guarani + * `PEI` - Peruvian Inti + * `PEN` - Peruvian Sol + * `PES` - Peruvian Sol (1863–1965) + * `PHP` - Philippine Peso + * `XPT` - Platinum + * `PLN` - Polish Zloty + * `PLZ` - Polish Zloty (1950–1995) + * `PTE` - Portuguese Escudo + * `GWE` - Portuguese Guinea Escudo + * `QAR` - Qatari Rial + * `XRE` - RINET Funds + * `RHD` - Rhodesian Dollar + * `RON` - Romanian Leu + * `ROL` - Romanian Leu (1952–2006) + * `RUB` - Russian Ruble + * `RUR` - Russian Ruble (1991–1998) + * `RWF` - Rwandan Franc + * `SVC` - Salvadoran Colón + * `WST` - Samoan Tala + * `SAR` - Saudi Riyal + * `RSD` - Serbian Dinar + * `CSD` - Serbian Dinar (2002–2006) + * `SCR` - Seychellois Rupee + * `SLL` - Sierra Leonean Leone + * `XAG` - Silver + * `SGD` - Singapore Dollar + * `SKK` - Slovak Koruna + * `SIT` - Slovenian Tolar + * `SBD` - Solomon Islands Dollar + * `SOS` - Somali Shilling + * `ZAR` - South African Rand + * `ZAL` - South African Rand (financial) + * `KRH` - South Korean Hwan (1953–1962) + * `KRW` - South Korean Won + * `KRO` - South Korean Won (1945–1953) + * `SSP` - South Sudanese Pound + * `SUR` - Soviet Rouble + * `ESP` - Spanish Peseta + * `ESA` - Spanish Peseta (A account) + * `ESB` - Spanish Peseta (convertible account) + * `XDR` - Special Drawing Rights + * `LKR` - Sri Lankan Rupee + * `SHP` - St. Helena Pound + * `XSU` - Sucre + * `SDD` - Sudanese Dinar (1992–2007) + * `SDG` - Sudanese Pound + * `SDP` - Sudanese Pound (1957–1998) + * `SRD` - Surinamese Dollar + * `SRG` - Surinamese Guilder + * `SZL` - Swazi Lilangeni + * `SEK` - Swedish Krona + * `CHF` - Swiss Franc + * `SYP` - Syrian Pound + * `STN` - São Tomé & Príncipe Dobra + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + * `TVD` - TVD + * `TJR` - Tajikistani Ruble + * `TJS` - Tajikistani Somoni + * `TZS` - Tanzanian Shilling + * `XTS` - Testing Currency Code + * `THB` - Thai Baht + * `XXX` - The codes assigned for transactions where no currency is involved + * `TPE` - Timorese Escudo + * `TOP` - Tongan Paʻanga + * `TTD` - Trinidad & Tobago Dollar + * `TND` - Tunisian Dinar + * `TRY` - Turkish Lira + * `TRL` - Turkish Lira (1922–2005) + * `TMT` - Turkmenistani Manat + * `TMM` - Turkmenistani Manat (1993–2009) + * `USD` - US Dollar + * `USN` - US Dollar (Next day) + * `USS` - US Dollar (Same day) + * `UGX` - Ugandan Shilling + * `UGS` - Ugandan Shilling (1966–1987) + * `UAH` - Ukrainian Hryvnia + * `UAK` - Ukrainian Karbovanets + * `AED` - United Arab Emirates Dirham + * `UYW` - Uruguayan Nominal Wage Index Unit + * `UYU` - Uruguayan Peso + * `UYP` - Uruguayan Peso (1975–1993) + * `UYI` - Uruguayan Peso (Indexed Units) + * `UZS` - Uzbekistani Som + * `VUV` - Vanuatu Vatu + * `VES` - Venezuelan Bolívar + * `VEB` - Venezuelan Bolívar (1871–2008) + * `VEF` - Venezuelan Bolívar (2008–2018) + * `VND` - Vietnamese Dong + * `VNN` - Vietnamese Dong (1978–1985) + * `CHE` - WIR Euro + * `CHW` - WIR Franc + * `XOF` - West African CFA Franc + * `YDD` - Yemeni Dinar + * `YER` - Yemeni Rial + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + * `YUM` - Yugoslavian New Dinar (1994–2002) + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + * `ZWN` - ZWN + * `ZRN` - Zairean New Zaire (1993–1998) + * `ZRZ` - Zairean Zaire (1971–1993) + * `ZMW` - Zambian Kwacha + * `ZMK` - Zambian Kwacha (1968–2012) + * `ZWD` - Zimbabwean Dollar (1980–2008) + * `ZWR` - Zimbabwean Dollar (2008) + * `ZWL` - Zimbabwean Dollar (2009) + example: USD + exchange_rate: + type: string + format: decimal + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + nullable: true + description: The transaction's exchange rate. + example: '2.9' + company: + type: string + format: uuid + nullable: true + description: The company the transaction belongs to. + example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + tracking_categories: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/TrackingCategory' + nullable: true + example: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + x-merge-expands-to: TrackingCategory + line_items: + type: array + items: + $ref: '#/components/schemas/TransactionLineItem' + readOnly: true + example: + - remote_id: '121222' + memo: Pickleball paddles + unit_price: '25.0' + quantity: '10.0' + item: 0958cbc6-6040-430a-848e-aafacbadf4ae + account: 2b38c085-2620-4269-b5ec-75dd9095ed2c + tracking_categories: + - f1214c24-2702-4617-b74b-3ddecfc0d384 + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + total_line_amount: 260 + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + currency: USD + exchange_rate: '2.9' + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: false + - memo: Pickleball balls + unit_price: 1 + quantity: 10 + item: 249c9faa-3045-4a31-953b-8f22d3613301 + account: 3e442c5d-8f51-4103-b5c9-dcee39c30a08 + tracking_categories: + - f1214c24-2702-4617-b74b-3ddecfc0d384 + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + total_line_amount: 20 + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + x-merge-expands-to: TransactionLineItem + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + accounting_period: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/AccountingPeriod' + nullable: true + description: The accounting period that the Transaction was generated in. + example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + x-merge-expands-to: AccountingPeriod + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /actions + data: + - Varies by platform + x-merge-model-tooltip: + title: + content: A positive `net_amount` means the line represents a debit and a negative + `net_amount` represents a credit. + x-merge-expands: '{"account": "Account", "accounting_period": "AccountingPeriod", + "contact": "Contact", "line_items": "TransactionLineItem", "tracking_categories": + "TrackingCategory"}' + x-merge-category: accounting + TransactionCurrencyEnum: + enum: + - XUA + - AFN + - AFA + - ALL + - ALK + - DZD + - ADP + - AOA + - AOK + - AON + - AOR + - ARA + - ARS + - ARM + - ARP + - ARL + - AMD + - AWG + - AUD + - ATS + - AZN + - AZM + - BSD + - BHD + - BDT + - BBD + - BYN + - BYB + - BYR + - BEF + - BEC + - BEL + - BZD + - BMD + - BTN + - BOB + - BOL + - BOV + - BOP + - BAM + - BAD + - BAN + - BWP + - BRC + - BRZ + - BRE + - BRR + - BRN + - BRB + - BRL + - GBP + - BND + - BGL + - BGN + - BGO + - BGM + - BUK + - BIF + - XPF + - KHR + - CAD + - CVE + - KYD + - XAF + - CLE + - CLP + - CLF + - CNX + - CNY + - CNH + - COP + - COU + - KMF + - CDF + - CRC + - HRD + - HRK + - CUC + - CUP + - CYP + - CZK + - CSK + - DKK + - DJF + - DOP + - NLG + - XCD + - DDM + - ECS + - ECV + - EGP + - GQE + - ERN + - EEK + - ETB + - EUR + - XBA + - XEU + - XBB + - XBC + - XBD + - FKP + - FJD + - FIM + - FRF + - XFO + - XFU + - GMD + - GEK + - GEL + - DEM + - GHS + - GHC + - GIP + - XAU + - GRD + - GTQ + - GWP + - GNF + - GNS + - GYD + - HTG + - HNL + - HKD + - HUF + - IMP + - ISK + - ISJ + - INR + - IDR + - IRR + - IQD + - IEP + - ILS + - ILP + - ILR + - ITL + - JMD + - JPY + - JOD + - KZT + - KES + - KWD + - KGS + - LAK + - LVL + - LVR + - LBP + - LSL + - LRD + - LYD + - LTL + - LTT + - LUL + - LUC + - LUF + - MOP + - MKD + - MKN + - MGA + - MGF + - MWK + - MYR + - MVR + - MVP + - MLF + - MTL + - MTP + - MRU + - MRO + - MUR + - MXV + - MXN + - MXP + - MDC + - MDL + - MCF + - MNT + - MAD + - MAF + - MZE + - MZN + - MZM + - MMK + - NAD + - NPR + - ANG + - TWD + - NZD + - NIO + - NIC + - NGN + - KPW + - NOK + - OMR + - PKR + - XPD + - PAB + - PGK + - PYG + - PEI + - PEN + - PES + - PHP + - XPT + - PLN + - PLZ + - PTE + - GWE + - QAR + - XRE + - RHD + - RON + - ROL + - RUB + - RUR + - RWF + - SVC + - WST + - SAR + - RSD + - CSD + - SCR + - SLL + - XAG + - SGD + - SKK + - SIT + - SBD + - SOS + - ZAR + - ZAL + - KRH + - KRW + - KRO + - SSP + - SUR + - ESP + - ESA + - ESB + - XDR + - LKR + - SHP + - XSU + - SDD + - SDG + - SDP + - SRD + - SRG + - SZL + - SEK + - CHF + - SYP + - STN + - STD + - TVD + - TJR + - TJS + - TZS + - XTS + - THB + - XXX + - TPE + - TOP + - TTD + - TND + - TRY + - TRL + - TMT + - TMM + - USD + - USN + - USS + - UGX + - UGS + - UAH + - UAK + - AED + - UYW + - UYU + - UYP + - UYI + - UZS + - VUV + - VES + - VEB + - VEF + - VND + - VNN + - CHE + - CHW + - XOF + - YDD + - YER + - YUN + - YUD + - YUM + - YUR + - ZWN + - ZRN + - ZRZ + - ZMW + - ZMK + - ZWD + - ZWR + - ZWL + type: string + description: |- + * `XUA` - ADB Unit of Account + * `AFN` - Afghan Afghani + * `AFA` - Afghan Afghani (1927–2002) + * `ALL` - Albanian Lek + * `ALK` - Albanian Lek (1946–1965) + * `DZD` - Algerian Dinar + * `ADP` - Andorran Peseta + * `AOA` - Angolan Kwanza + * `AOK` - Angolan Kwanza (1977–1991) + * `AON` - Angolan New Kwanza (1990–2000) + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + * `ARA` - Argentine Austral + * `ARS` - Argentine Peso + * `ARM` - Argentine Peso (1881–1970) + * `ARP` - Argentine Peso (1983–1985) + * `ARL` - Argentine Peso Ley (1970–1983) + * `AMD` - Armenian Dram + * `AWG` - Aruban Florin + * `AUD` - Australian Dollar + * `ATS` - Austrian Schilling + * `AZN` - Azerbaijani Manat + * `AZM` - Azerbaijani Manat (1993–2006) + * `BSD` - Bahamian Dollar + * `BHD` - Bahraini Dinar + * `BDT` - Bangladeshi Taka + * `BBD` - Barbadian Dollar + * `BYN` - Belarusian Ruble + * `BYB` - Belarusian Ruble (1994–1999) + * `BYR` - Belarusian Ruble (2000–2016) + * `BEF` - Belgian Franc + * `BEC` - Belgian Franc (convertible) + * `BEL` - Belgian Franc (financial) + * `BZD` - Belize Dollar + * `BMD` - Bermudan Dollar + * `BTN` - Bhutanese Ngultrum + * `BOB` - Bolivian Boliviano + * `BOL` - Bolivian Boliviano (1863–1963) + * `BOV` - Bolivian Mvdol + * `BOP` - Bolivian Peso + * `BAM` - Bosnia-Herzegovina Convertible Mark + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + * `BWP` - Botswanan Pula + * `BRC` - Brazilian Cruzado (1986–1989) + * `BRZ` - Brazilian Cruzeiro (1942–1967) + * `BRE` - Brazilian Cruzeiro (1990–1993) + * `BRR` - Brazilian Cruzeiro (1993–1994) + * `BRN` - Brazilian New Cruzado (1989–1990) + * `BRB` - Brazilian New Cruzeiro (1967–1986) + * `BRL` - Brazilian Real + * `GBP` - British Pound + * `BND` - Brunei Dollar + * `BGL` - Bulgarian Hard Lev + * `BGN` - Bulgarian Lev + * `BGO` - Bulgarian Lev (1879–1952) + * `BGM` - Bulgarian Socialist Lev + * `BUK` - Burmese Kyat + * `BIF` - Burundian Franc + * `XPF` - CFP Franc + * `KHR` - Cambodian Riel + * `CAD` - Canadian Dollar + * `CVE` - Cape Verdean Escudo + * `KYD` - Cayman Islands Dollar + * `XAF` - Central African CFA Franc + * `CLE` - Chilean Escudo + * `CLP` - Chilean Peso + * `CLF` - Chilean Unit of Account (UF) + * `CNX` - Chinese People’s Bank Dollar + * `CNY` - Chinese Yuan + * `CNH` - Chinese Yuan (offshore) + * `COP` - Colombian Peso + * `COU` - Colombian Real Value Unit + * `KMF` - Comorian Franc + * `CDF` - Congolese Franc + * `CRC` - Costa Rican Colón + * `HRD` - Croatian Dinar + * `HRK` - Croatian Kuna + * `CUC` - Cuban Convertible Peso + * `CUP` - Cuban Peso + * `CYP` - Cypriot Pound + * `CZK` - Czech Koruna + * `CSK` - Czechoslovak Hard Koruna + * `DKK` - Danish Krone + * `DJF` - Djiboutian Franc + * `DOP` - Dominican Peso + * `NLG` - Dutch Guilder + * `XCD` - East Caribbean Dollar + * `DDM` - East German Mark + * `ECS` - Ecuadorian Sucre + * `ECV` - Ecuadorian Unit of Constant Value + * `EGP` - Egyptian Pound + * `GQE` - Equatorial Guinean Ekwele + * `ERN` - Eritrean Nakfa + * `EEK` - Estonian Kroon + * `ETB` - Ethiopian Birr + * `EUR` - Euro + * `XBA` - European Composite Unit + * `XEU` - European Currency Unit + * `XBB` - European Monetary Unit + * `XBC` - European Unit of Account (XBC) + * `XBD` - European Unit of Account (XBD) + * `FKP` - Falkland Islands Pound + * `FJD` - Fijian Dollar + * `FIM` - Finnish Markka + * `FRF` - French Franc + * `XFO` - French Gold Franc + * `XFU` - French UIC-Franc + * `GMD` - Gambian Dalasi + * `GEK` - Georgian Kupon Larit + * `GEL` - Georgian Lari + * `DEM` - German Mark + * `GHS` - Ghanaian Cedi + * `GHC` - Ghanaian Cedi (1979–2007) + * `GIP` - Gibraltar Pound + * `XAU` - Gold + * `GRD` - Greek Drachma + * `GTQ` - Guatemalan Quetzal + * `GWP` - Guinea-Bissau Peso + * `GNF` - Guinean Franc + * `GNS` - Guinean Syli + * `GYD` - Guyanaese Dollar + * `HTG` - Haitian Gourde + * `HNL` - Honduran Lempira + * `HKD` - Hong Kong Dollar + * `HUF` - Hungarian Forint + * `IMP` - IMP + * `ISK` - Icelandic Króna + * `ISJ` - Icelandic Króna (1918–1981) + * `INR` - Indian Rupee + * `IDR` - Indonesian Rupiah + * `IRR` - Iranian Rial + * `IQD` - Iraqi Dinar + * `IEP` - Irish Pound + * `ILS` - Israeli New Shekel + * `ILP` - Israeli Pound + * `ILR` - Israeli Shekel (1980–1985) + * `ITL` - Italian Lira + * `JMD` - Jamaican Dollar + * `JPY` - Japanese Yen + * `JOD` - Jordanian Dinar + * `KZT` - Kazakhstani Tenge + * `KES` - Kenyan Shilling + * `KWD` - Kuwaiti Dinar + * `KGS` - Kyrgystani Som + * `LAK` - Laotian Kip + * `LVL` - Latvian Lats + * `LVR` - Latvian Ruble + * `LBP` - Lebanese Pound + * `LSL` - Lesotho Loti + * `LRD` - Liberian Dollar + * `LYD` - Libyan Dinar + * `LTL` - Lithuanian Litas + * `LTT` - Lithuanian Talonas + * `LUL` - Luxembourg Financial Franc + * `LUC` - Luxembourgian Convertible Franc + * `LUF` - Luxembourgian Franc + * `MOP` - Macanese Pataca + * `MKD` - Macedonian Denar + * `MKN` - Macedonian Denar (1992–1993) + * `MGA` - Malagasy Ariary + * `MGF` - Malagasy Franc + * `MWK` - Malawian Kwacha + * `MYR` - Malaysian Ringgit + * `MVR` - Maldivian Rufiyaa + * `MVP` - Maldivian Rupee (1947–1981) + * `MLF` - Malian Franc + * `MTL` - Maltese Lira + * `MTP` - Maltese Pound + * `MRU` - Mauritanian Ouguiya + * `MRO` - Mauritanian Ouguiya (1973–2017) + * `MUR` - Mauritian Rupee + * `MXV` - Mexican Investment Unit + * `MXN` - Mexican Peso + * `MXP` - Mexican Silver Peso (1861–1992) + * `MDC` - Moldovan Cupon + * `MDL` - Moldovan Leu + * `MCF` - Monegasque Franc + * `MNT` - Mongolian Tugrik + * `MAD` - Moroccan Dirham + * `MAF` - Moroccan Franc + * `MZE` - Mozambican Escudo + * `MZN` - Mozambican Metical + * `MZM` - Mozambican Metical (1980–2006) + * `MMK` - Myanmar Kyat + * `NAD` - Namibian Dollar + * `NPR` - Nepalese Rupee + * `ANG` - Netherlands Antillean Guilder + * `TWD` - New Taiwan Dollar + * `NZD` - New Zealand Dollar + * `NIO` - Nicaraguan Córdoba + * `NIC` - Nicaraguan Córdoba (1988–1991) + * `NGN` - Nigerian Naira + * `KPW` - North Korean Won + * `NOK` - Norwegian Krone + * `OMR` - Omani Rial + * `PKR` - Pakistani Rupee + * `XPD` - Palladium + * `PAB` - Panamanian Balboa + * `PGK` - Papua New Guinean Kina + * `PYG` - Paraguayan Guarani + * `PEI` - Peruvian Inti + * `PEN` - Peruvian Sol + * `PES` - Peruvian Sol (1863–1965) + * `PHP` - Philippine Peso + * `XPT` - Platinum + * `PLN` - Polish Zloty + * `PLZ` - Polish Zloty (1950–1995) + * `PTE` - Portuguese Escudo + * `GWE` - Portuguese Guinea Escudo + * `QAR` - Qatari Rial + * `XRE` - RINET Funds + * `RHD` - Rhodesian Dollar + * `RON` - Romanian Leu + * `ROL` - Romanian Leu (1952–2006) + * `RUB` - Russian Ruble + * `RUR` - Russian Ruble (1991–1998) + * `RWF` - Rwandan Franc + * `SVC` - Salvadoran Colón + * `WST` - Samoan Tala + * `SAR` - Saudi Riyal + * `RSD` - Serbian Dinar + * `CSD` - Serbian Dinar (2002–2006) + * `SCR` - Seychellois Rupee + * `SLL` - Sierra Leonean Leone + * `XAG` - Silver + * `SGD` - Singapore Dollar + * `SKK` - Slovak Koruna + * `SIT` - Slovenian Tolar + * `SBD` - Solomon Islands Dollar + * `SOS` - Somali Shilling + * `ZAR` - South African Rand + * `ZAL` - South African Rand (financial) + * `KRH` - South Korean Hwan (1953–1962) + * `KRW` - South Korean Won + * `KRO` - South Korean Won (1945–1953) + * `SSP` - South Sudanese Pound + * `SUR` - Soviet Rouble + * `ESP` - Spanish Peseta + * `ESA` - Spanish Peseta (A account) + * `ESB` - Spanish Peseta (convertible account) + * `XDR` - Special Drawing Rights + * `LKR` - Sri Lankan Rupee + * `SHP` - St. Helena Pound + * `XSU` - Sucre + * `SDD` - Sudanese Dinar (1992–2007) + * `SDG` - Sudanese Pound + * `SDP` - Sudanese Pound (1957–1998) + * `SRD` - Surinamese Dollar + * `SRG` - Surinamese Guilder + * `SZL` - Swazi Lilangeni + * `SEK` - Swedish Krona + * `CHF` - Swiss Franc + * `SYP` - Syrian Pound + * `STN` - São Tomé & Príncipe Dobra + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + * `TVD` - TVD + * `TJR` - Tajikistani Ruble + * `TJS` - Tajikistani Somoni + * `TZS` - Tanzanian Shilling + * `XTS` - Testing Currency Code + * `THB` - Thai Baht + * `XXX` - The codes assigned for transactions where no currency is involved + * `TPE` - Timorese Escudo + * `TOP` - Tongan Paʻanga + * `TTD` - Trinidad & Tobago Dollar + * `TND` - Tunisian Dinar + * `TRY` - Turkish Lira + * `TRL` - Turkish Lira (1922–2005) + * `TMT` - Turkmenistani Manat + * `TMM` - Turkmenistani Manat (1993–2009) + * `USD` - US Dollar + * `USN` - US Dollar (Next day) + * `USS` - US Dollar (Same day) + * `UGX` - Ugandan Shilling + * `UGS` - Ugandan Shilling (1966–1987) + * `UAH` - Ukrainian Hryvnia + * `UAK` - Ukrainian Karbovanets + * `AED` - United Arab Emirates Dirham + * `UYW` - Uruguayan Nominal Wage Index Unit + * `UYU` - Uruguayan Peso + * `UYP` - Uruguayan Peso (1975–1993) + * `UYI` - Uruguayan Peso (Indexed Units) + * `UZS` - Uzbekistani Som + * `VUV` - Vanuatu Vatu + * `VES` - Venezuelan Bolívar + * `VEB` - Venezuelan Bolívar (1871–2008) + * `VEF` - Venezuelan Bolívar (2008–2018) + * `VND` - Vietnamese Dong + * `VNN` - Vietnamese Dong (1978–1985) + * `CHE` - WIR Euro + * `CHW` - WIR Franc + * `XOF` - West African CFA Franc + * `YDD` - Yemeni Dinar + * `YER` - Yemeni Rial + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + * `YUM` - Yugoslavian New Dinar (1994–2002) + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + * `ZWN` - ZWN + * `ZRN` - Zairean New Zaire (1993–1998) + * `ZRZ` - Zairean Zaire (1971–1993) + * `ZMW` - Zambian Kwacha + * `ZMK` - Zambian Kwacha (1968–2012) + * `ZWD` - Zimbabwean Dollar (1980–2008) + * `ZWR` - Zimbabwean Dollar (2008) + * `ZWL` - Zimbabwean Dollar (2009) + x-merge-category: accounting + TransactionLineItem: + type: object + description: |- + # The TransactionLineItem Object + ### Description + The `TransactionLineItem` object is used to represent a transaction's line items. + + ### Usage Example + Fetch from the `GET TransactionLineItem` endpoint and view the transaction's line items. + properties: + id: + type: string + format: uuid + readOnly: true + example: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '121222' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + memo: + type: string + nullable: true + description: An internal note used by the business to clarify purpose of + the transaction. + example: Pickleball paddles + unit_price: + type: string + format: decimal + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + nullable: true + description: The line item's unit price. + example: '25.0' + quantity: + type: string + format: decimal + pattern: ^-?\d{0,24}(?:\.\d{0,8})?$ + nullable: true + description: The line item's quantity. + example: '10.0' + item: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Item' + nullable: true + example: 0958cbc6-6040-430a-848e-aafacbadf4ae + x-merge-expands-to: Item + account: + type: string + format: uuid + nullable: true + description: The line item's account. + example: 2b38c085-2620-4269-b5ec-75dd9095ed2c + tracking_category: + type: string + format: uuid + nullable: true + description: The line's associated tracking category. + deprecated: true + tracking_categories: + type: array + items: + type: string + format: uuid + nullable: true + example: + - f1214c24-2702-4617-b74b-3ddecfc0d384 + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + description: The transaction line item's associated tracking categories. + total_line_amount: + type: string + format: decimal + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + nullable: true + description: The line item's total. + example: 260 + tax_rate: + type: string + format: uuid + nullable: true + example: a12e7c20-1922-9df7-s75n-edfeewnn7384 + description: The tax rate that applies to this line item. + currency: + oneOf: + - $ref: '#/components/schemas/TransactionCurrencyEnum' + - type: string + nullable: true + description: |- + The line item's currency. + + * `XUA` - ADB Unit of Account + * `AFN` - Afghan Afghani + * `AFA` - Afghan Afghani (1927–2002) + * `ALL` - Albanian Lek + * `ALK` - Albanian Lek (1946–1965) + * `DZD` - Algerian Dinar + * `ADP` - Andorran Peseta + * `AOA` - Angolan Kwanza + * `AOK` - Angolan Kwanza (1977–1991) + * `AON` - Angolan New Kwanza (1990–2000) + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + * `ARA` - Argentine Austral + * `ARS` - Argentine Peso + * `ARM` - Argentine Peso (1881–1970) + * `ARP` - Argentine Peso (1983–1985) + * `ARL` - Argentine Peso Ley (1970–1983) + * `AMD` - Armenian Dram + * `AWG` - Aruban Florin + * `AUD` - Australian Dollar + * `ATS` - Austrian Schilling + * `AZN` - Azerbaijani Manat + * `AZM` - Azerbaijani Manat (1993–2006) + * `BSD` - Bahamian Dollar + * `BHD` - Bahraini Dinar + * `BDT` - Bangladeshi Taka + * `BBD` - Barbadian Dollar + * `BYN` - Belarusian Ruble + * `BYB` - Belarusian Ruble (1994–1999) + * `BYR` - Belarusian Ruble (2000–2016) + * `BEF` - Belgian Franc + * `BEC` - Belgian Franc (convertible) + * `BEL` - Belgian Franc (financial) + * `BZD` - Belize Dollar + * `BMD` - Bermudan Dollar + * `BTN` - Bhutanese Ngultrum + * `BOB` - Bolivian Boliviano + * `BOL` - Bolivian Boliviano (1863–1963) + * `BOV` - Bolivian Mvdol + * `BOP` - Bolivian Peso + * `BAM` - Bosnia-Herzegovina Convertible Mark + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + * `BWP` - Botswanan Pula + * `BRC` - Brazilian Cruzado (1986–1989) + * `BRZ` - Brazilian Cruzeiro (1942–1967) + * `BRE` - Brazilian Cruzeiro (1990–1993) + * `BRR` - Brazilian Cruzeiro (1993–1994) + * `BRN` - Brazilian New Cruzado (1989–1990) + * `BRB` - Brazilian New Cruzeiro (1967–1986) + * `BRL` - Brazilian Real + * `GBP` - British Pound + * `BND` - Brunei Dollar + * `BGL` - Bulgarian Hard Lev + * `BGN` - Bulgarian Lev + * `BGO` - Bulgarian Lev (1879–1952) + * `BGM` - Bulgarian Socialist Lev + * `BUK` - Burmese Kyat + * `BIF` - Burundian Franc + * `XPF` - CFP Franc + * `KHR` - Cambodian Riel + * `CAD` - Canadian Dollar + * `CVE` - Cape Verdean Escudo + * `KYD` - Cayman Islands Dollar + * `XAF` - Central African CFA Franc + * `CLE` - Chilean Escudo + * `CLP` - Chilean Peso + * `CLF` - Chilean Unit of Account (UF) + * `CNX` - Chinese People’s Bank Dollar + * `CNY` - Chinese Yuan + * `CNH` - Chinese Yuan (offshore) + * `COP` - Colombian Peso + * `COU` - Colombian Real Value Unit + * `KMF` - Comorian Franc + * `CDF` - Congolese Franc + * `CRC` - Costa Rican Colón + * `HRD` - Croatian Dinar + * `HRK` - Croatian Kuna + * `CUC` - Cuban Convertible Peso + * `CUP` - Cuban Peso + * `CYP` - Cypriot Pound + * `CZK` - Czech Koruna + * `CSK` - Czechoslovak Hard Koruna + * `DKK` - Danish Krone + * `DJF` - Djiboutian Franc + * `DOP` - Dominican Peso + * `NLG` - Dutch Guilder + * `XCD` - East Caribbean Dollar + * `DDM` - East German Mark + * `ECS` - Ecuadorian Sucre + * `ECV` - Ecuadorian Unit of Constant Value + * `EGP` - Egyptian Pound + * `GQE` - Equatorial Guinean Ekwele + * `ERN` - Eritrean Nakfa + * `EEK` - Estonian Kroon + * `ETB` - Ethiopian Birr + * `EUR` - Euro + * `XBA` - European Composite Unit + * `XEU` - European Currency Unit + * `XBB` - European Monetary Unit + * `XBC` - European Unit of Account (XBC) + * `XBD` - European Unit of Account (XBD) + * `FKP` - Falkland Islands Pound + * `FJD` - Fijian Dollar + * `FIM` - Finnish Markka + * `FRF` - French Franc + * `XFO` - French Gold Franc + * `XFU` - French UIC-Franc + * `GMD` - Gambian Dalasi + * `GEK` - Georgian Kupon Larit + * `GEL` - Georgian Lari + * `DEM` - German Mark + * `GHS` - Ghanaian Cedi + * `GHC` - Ghanaian Cedi (1979–2007) + * `GIP` - Gibraltar Pound + * `XAU` - Gold + * `GRD` - Greek Drachma + * `GTQ` - Guatemalan Quetzal + * `GWP` - Guinea-Bissau Peso + * `GNF` - Guinean Franc + * `GNS` - Guinean Syli + * `GYD` - Guyanaese Dollar + * `HTG` - Haitian Gourde + * `HNL` - Honduran Lempira + * `HKD` - Hong Kong Dollar + * `HUF` - Hungarian Forint + * `IMP` - IMP + * `ISK` - Icelandic Króna + * `ISJ` - Icelandic Króna (1918–1981) + * `INR` - Indian Rupee + * `IDR` - Indonesian Rupiah + * `IRR` - Iranian Rial + * `IQD` - Iraqi Dinar + * `IEP` - Irish Pound + * `ILS` - Israeli New Shekel + * `ILP` - Israeli Pound + * `ILR` - Israeli Shekel (1980–1985) + * `ITL` - Italian Lira + * `JMD` - Jamaican Dollar + * `JPY` - Japanese Yen + * `JOD` - Jordanian Dinar + * `KZT` - Kazakhstani Tenge + * `KES` - Kenyan Shilling + * `KWD` - Kuwaiti Dinar + * `KGS` - Kyrgystani Som + * `LAK` - Laotian Kip + * `LVL` - Latvian Lats + * `LVR` - Latvian Ruble + * `LBP` - Lebanese Pound + * `LSL` - Lesotho Loti + * `LRD` - Liberian Dollar + * `LYD` - Libyan Dinar + * `LTL` - Lithuanian Litas + * `LTT` - Lithuanian Talonas + * `LUL` - Luxembourg Financial Franc + * `LUC` - Luxembourgian Convertible Franc + * `LUF` - Luxembourgian Franc + * `MOP` - Macanese Pataca + * `MKD` - Macedonian Denar + * `MKN` - Macedonian Denar (1992–1993) + * `MGA` - Malagasy Ariary + * `MGF` - Malagasy Franc + * `MWK` - Malawian Kwacha + * `MYR` - Malaysian Ringgit + * `MVR` - Maldivian Rufiyaa + * `MVP` - Maldivian Rupee (1947–1981) + * `MLF` - Malian Franc + * `MTL` - Maltese Lira + * `MTP` - Maltese Pound + * `MRU` - Mauritanian Ouguiya + * `MRO` - Mauritanian Ouguiya (1973–2017) + * `MUR` - Mauritian Rupee + * `MXV` - Mexican Investment Unit + * `MXN` - Mexican Peso + * `MXP` - Mexican Silver Peso (1861–1992) + * `MDC` - Moldovan Cupon + * `MDL` - Moldovan Leu + * `MCF` - Monegasque Franc + * `MNT` - Mongolian Tugrik + * `MAD` - Moroccan Dirham + * `MAF` - Moroccan Franc + * `MZE` - Mozambican Escudo + * `MZN` - Mozambican Metical + * `MZM` - Mozambican Metical (1980–2006) + * `MMK` - Myanmar Kyat + * `NAD` - Namibian Dollar + * `NPR` - Nepalese Rupee + * `ANG` - Netherlands Antillean Guilder + * `TWD` - New Taiwan Dollar + * `NZD` - New Zealand Dollar + * `NIO` - Nicaraguan Córdoba + * `NIC` - Nicaraguan Córdoba (1988–1991) + * `NGN` - Nigerian Naira + * `KPW` - North Korean Won + * `NOK` - Norwegian Krone + * `OMR` - Omani Rial + * `PKR` - Pakistani Rupee + * `XPD` - Palladium + * `PAB` - Panamanian Balboa + * `PGK` - Papua New Guinean Kina + * `PYG` - Paraguayan Guarani + * `PEI` - Peruvian Inti + * `PEN` - Peruvian Sol + * `PES` - Peruvian Sol (1863–1965) + * `PHP` - Philippine Peso + * `XPT` - Platinum + * `PLN` - Polish Zloty + * `PLZ` - Polish Zloty (1950–1995) + * `PTE` - Portuguese Escudo + * `GWE` - Portuguese Guinea Escudo + * `QAR` - Qatari Rial + * `XRE` - RINET Funds + * `RHD` - Rhodesian Dollar + * `RON` - Romanian Leu + * `ROL` - Romanian Leu (1952–2006) + * `RUB` - Russian Ruble + * `RUR` - Russian Ruble (1991–1998) + * `RWF` - Rwandan Franc + * `SVC` - Salvadoran Colón + * `WST` - Samoan Tala + * `SAR` - Saudi Riyal + * `RSD` - Serbian Dinar + * `CSD` - Serbian Dinar (2002–2006) + * `SCR` - Seychellois Rupee + * `SLL` - Sierra Leonean Leone + * `XAG` - Silver + * `SGD` - Singapore Dollar + * `SKK` - Slovak Koruna + * `SIT` - Slovenian Tolar + * `SBD` - Solomon Islands Dollar + * `SOS` - Somali Shilling + * `ZAR` - South African Rand + * `ZAL` - South African Rand (financial) + * `KRH` - South Korean Hwan (1953–1962) + * `KRW` - South Korean Won + * `KRO` - South Korean Won (1945–1953) + * `SSP` - South Sudanese Pound + * `SUR` - Soviet Rouble + * `ESP` - Spanish Peseta + * `ESA` - Spanish Peseta (A account) + * `ESB` - Spanish Peseta (convertible account) + * `XDR` - Special Drawing Rights + * `LKR` - Sri Lankan Rupee + * `SHP` - St. Helena Pound + * `XSU` - Sucre + * `SDD` - Sudanese Dinar (1992–2007) + * `SDG` - Sudanese Pound + * `SDP` - Sudanese Pound (1957–1998) + * `SRD` - Surinamese Dollar + * `SRG` - Surinamese Guilder + * `SZL` - Swazi Lilangeni + * `SEK` - Swedish Krona + * `CHF` - Swiss Franc + * `SYP` - Syrian Pound + * `STN` - São Tomé & Príncipe Dobra + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + * `TVD` - TVD + * `TJR` - Tajikistani Ruble + * `TJS` - Tajikistani Somoni + * `TZS` - Tanzanian Shilling + * `XTS` - Testing Currency Code + * `THB` - Thai Baht + * `XXX` - The codes assigned for transactions where no currency is involved + * `TPE` - Timorese Escudo + * `TOP` - Tongan Paʻanga + * `TTD` - Trinidad & Tobago Dollar + * `TND` - Tunisian Dinar + * `TRY` - Turkish Lira + * `TRL` - Turkish Lira (1922–2005) + * `TMT` - Turkmenistani Manat + * `TMM` - Turkmenistani Manat (1993–2009) + * `USD` - US Dollar + * `USN` - US Dollar (Next day) + * `USS` - US Dollar (Same day) + * `UGX` - Ugandan Shilling + * `UGS` - Ugandan Shilling (1966–1987) + * `UAH` - Ukrainian Hryvnia + * `UAK` - Ukrainian Karbovanets + * `AED` - United Arab Emirates Dirham + * `UYW` - Uruguayan Nominal Wage Index Unit + * `UYU` - Uruguayan Peso + * `UYP` - Uruguayan Peso (1975–1993) + * `UYI` - Uruguayan Peso (Indexed Units) + * `UZS` - Uzbekistani Som + * `VUV` - Vanuatu Vatu + * `VES` - Venezuelan Bolívar + * `VEB` - Venezuelan Bolívar (1871–2008) + * `VEF` - Venezuelan Bolívar (2008–2018) + * `VND` - Vietnamese Dong + * `VNN` - Vietnamese Dong (1978–1985) + * `CHE` - WIR Euro + * `CHW` - WIR Franc + * `XOF` - West African CFA Franc + * `YDD` - Yemeni Dinar + * `YER` - Yemeni Rial + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + * `YUM` - Yugoslavian New Dinar (1994–2002) + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + * `ZWN` - ZWN + * `ZRN` - Zairean New Zaire (1993–1998) + * `ZRZ` - Zairean Zaire (1971–1993) + * `ZMW` - Zambian Kwacha + * `ZMK` - Zambian Kwacha (1968–2012) + * `ZWD` - Zimbabwean Dollar (1980–2008) + * `ZWR` - Zimbabwean Dollar (2008) + * `ZWL` - Zimbabwean Dollar (2009) + example: USD + exchange_rate: + type: string + format: decimal + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + nullable: true + description: The line item's exchange rate. + example: '2.9' + company: + type: string + format: uuid + nullable: true + description: The company the line belongs to. + example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: + type: boolean + readOnly: true + description: 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/). + x-merge-nested-write-allowed: true + x-merge-expands: '{"item": "Item"}' + x-merge-category: accounting + Type2bbEnum: + enum: + - INVENTORY + - NON_INVENTORY + - SERVICE + - UNKNOWN + type: string + description: |- + * `INVENTORY` - INVENTORY + * `NON_INVENTORY` - NON_INVENTORY + * `SERVICE` - SERVICE + * `UNKNOWN` - UNKNOWN + x-merge-category: accounting + UnderlyingTransactionTypeEnum: + enum: + - INVOICE + - EXPENSE + - TRANSACTION + - JOURNAL_ENTRY + - PAYMENT + - VENDOR_CREDIT + - CREDIT_NOTE + type: string + description: |- + * `INVOICE` - INVOICE + * `EXPENSE` - EXPENSE + * `TRANSACTION` - TRANSACTION + * `JOURNAL_ENTRY` - JOURNAL_ENTRY + * `PAYMENT` - PAYMENT + * `VENDOR_CREDIT` - VENDOR_CREDIT + * `CREDIT_NOTE` - CREDIT_NOTE + x-merge-category: accounting + ValidationProblemSource: + type: object + properties: + pointer: + type: string + required: + - pointer + x-merge-category: accounting + VendorCredit: + type: object + description: |- + # The VendorCredit Object + ### Description + A `VendorCredit` is transaction issued by a vendor to the accounting company, indicating a reduction or cancellation of the amount owed to the vendor. It is most generally used as an adjustment note used to rectify errors, returns, or overpayments related to a purchasing transaction. A `VendorCredit` can be applied to `Accounts Payable` Invoices to decrease the overall amount of the `Invoice`. + + ### Usage Example + Fetch from the `GET VendorCredit` endpoint and view a company's vendor credits. + properties: + id: + type: string + format: uuid + readOnly: true + example: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '088899' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + number: + type: string + nullable: true + description: The vendor credit's number. + example: '6' + transaction_date: + type: string + format: date-time + nullable: true + description: The vendor credit's transaction date. + example: '2020-03-31T00:00:00Z' + vendor: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Contact' + nullable: true + description: The vendor that owes the gift or refund. + example: 3d263469-51a1-4766-9205-f6c997826be1 + x-merge-expands-to: Contact + total_amount: + type: number + format: double + nullable: true + description: The vendor credit's total amount. + example: 10000 + currency: + oneOf: + - $ref: '#/components/schemas/TransactionCurrencyEnum' + - type: string + nullable: true + description: |- + The vendor credit's currency. + + * `XUA` - ADB Unit of Account + * `AFN` - Afghan Afghani + * `AFA` - Afghan Afghani (1927–2002) + * `ALL` - Albanian Lek + * `ALK` - Albanian Lek (1946–1965) + * `DZD` - Algerian Dinar + * `ADP` - Andorran Peseta + * `AOA` - Angolan Kwanza + * `AOK` - Angolan Kwanza (1977–1991) + * `AON` - Angolan New Kwanza (1990–2000) + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + * `ARA` - Argentine Austral + * `ARS` - Argentine Peso + * `ARM` - Argentine Peso (1881–1970) + * `ARP` - Argentine Peso (1983–1985) + * `ARL` - Argentine Peso Ley (1970–1983) + * `AMD` - Armenian Dram + * `AWG` - Aruban Florin + * `AUD` - Australian Dollar + * `ATS` - Austrian Schilling + * `AZN` - Azerbaijani Manat + * `AZM` - Azerbaijani Manat (1993–2006) + * `BSD` - Bahamian Dollar + * `BHD` - Bahraini Dinar + * `BDT` - Bangladeshi Taka + * `BBD` - Barbadian Dollar + * `BYN` - Belarusian Ruble + * `BYB` - Belarusian Ruble (1994–1999) + * `BYR` - Belarusian Ruble (2000–2016) + * `BEF` - Belgian Franc + * `BEC` - Belgian Franc (convertible) + * `BEL` - Belgian Franc (financial) + * `BZD` - Belize Dollar + * `BMD` - Bermudan Dollar + * `BTN` - Bhutanese Ngultrum + * `BOB` - Bolivian Boliviano + * `BOL` - Bolivian Boliviano (1863–1963) + * `BOV` - Bolivian Mvdol + * `BOP` - Bolivian Peso + * `BAM` - Bosnia-Herzegovina Convertible Mark + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + * `BWP` - Botswanan Pula + * `BRC` - Brazilian Cruzado (1986–1989) + * `BRZ` - Brazilian Cruzeiro (1942–1967) + * `BRE` - Brazilian Cruzeiro (1990–1993) + * `BRR` - Brazilian Cruzeiro (1993–1994) + * `BRN` - Brazilian New Cruzado (1989–1990) + * `BRB` - Brazilian New Cruzeiro (1967–1986) + * `BRL` - Brazilian Real + * `GBP` - British Pound + * `BND` - Brunei Dollar + * `BGL` - Bulgarian Hard Lev + * `BGN` - Bulgarian Lev + * `BGO` - Bulgarian Lev (1879–1952) + * `BGM` - Bulgarian Socialist Lev + * `BUK` - Burmese Kyat + * `BIF` - Burundian Franc + * `XPF` - CFP Franc + * `KHR` - Cambodian Riel + * `CAD` - Canadian Dollar + * `CVE` - Cape Verdean Escudo + * `KYD` - Cayman Islands Dollar + * `XAF` - Central African CFA Franc + * `CLE` - Chilean Escudo + * `CLP` - Chilean Peso + * `CLF` - Chilean Unit of Account (UF) + * `CNX` - Chinese People’s Bank Dollar + * `CNY` - Chinese Yuan + * `CNH` - Chinese Yuan (offshore) + * `COP` - Colombian Peso + * `COU` - Colombian Real Value Unit + * `KMF` - Comorian Franc + * `CDF` - Congolese Franc + * `CRC` - Costa Rican Colón + * `HRD` - Croatian Dinar + * `HRK` - Croatian Kuna + * `CUC` - Cuban Convertible Peso + * `CUP` - Cuban Peso + * `CYP` - Cypriot Pound + * `CZK` - Czech Koruna + * `CSK` - Czechoslovak Hard Koruna + * `DKK` - Danish Krone + * `DJF` - Djiboutian Franc + * `DOP` - Dominican Peso + * `NLG` - Dutch Guilder + * `XCD` - East Caribbean Dollar + * `DDM` - East German Mark + * `ECS` - Ecuadorian Sucre + * `ECV` - Ecuadorian Unit of Constant Value + * `EGP` - Egyptian Pound + * `GQE` - Equatorial Guinean Ekwele + * `ERN` - Eritrean Nakfa + * `EEK` - Estonian Kroon + * `ETB` - Ethiopian Birr + * `EUR` - Euro + * `XBA` - European Composite Unit + * `XEU` - European Currency Unit + * `XBB` - European Monetary Unit + * `XBC` - European Unit of Account (XBC) + * `XBD` - European Unit of Account (XBD) + * `FKP` - Falkland Islands Pound + * `FJD` - Fijian Dollar + * `FIM` - Finnish Markka + * `FRF` - French Franc + * `XFO` - French Gold Franc + * `XFU` - French UIC-Franc + * `GMD` - Gambian Dalasi + * `GEK` - Georgian Kupon Larit + * `GEL` - Georgian Lari + * `DEM` - German Mark + * `GHS` - Ghanaian Cedi + * `GHC` - Ghanaian Cedi (1979–2007) + * `GIP` - Gibraltar Pound + * `XAU` - Gold + * `GRD` - Greek Drachma + * `GTQ` - Guatemalan Quetzal + * `GWP` - Guinea-Bissau Peso + * `GNF` - Guinean Franc + * `GNS` - Guinean Syli + * `GYD` - Guyanaese Dollar + * `HTG` - Haitian Gourde + * `HNL` - Honduran Lempira + * `HKD` - Hong Kong Dollar + * `HUF` - Hungarian Forint + * `IMP` - IMP + * `ISK` - Icelandic Króna + * `ISJ` - Icelandic Króna (1918–1981) + * `INR` - Indian Rupee + * `IDR` - Indonesian Rupiah + * `IRR` - Iranian Rial + * `IQD` - Iraqi Dinar + * `IEP` - Irish Pound + * `ILS` - Israeli New Shekel + * `ILP` - Israeli Pound + * `ILR` - Israeli Shekel (1980–1985) + * `ITL` - Italian Lira + * `JMD` - Jamaican Dollar + * `JPY` - Japanese Yen + * `JOD` - Jordanian Dinar + * `KZT` - Kazakhstani Tenge + * `KES` - Kenyan Shilling + * `KWD` - Kuwaiti Dinar + * `KGS` - Kyrgystani Som + * `LAK` - Laotian Kip + * `LVL` - Latvian Lats + * `LVR` - Latvian Ruble + * `LBP` - Lebanese Pound + * `LSL` - Lesotho Loti + * `LRD` - Liberian Dollar + * `LYD` - Libyan Dinar + * `LTL` - Lithuanian Litas + * `LTT` - Lithuanian Talonas + * `LUL` - Luxembourg Financial Franc + * `LUC` - Luxembourgian Convertible Franc + * `LUF` - Luxembourgian Franc + * `MOP` - Macanese Pataca + * `MKD` - Macedonian Denar + * `MKN` - Macedonian Denar (1992–1993) + * `MGA` - Malagasy Ariary + * `MGF` - Malagasy Franc + * `MWK` - Malawian Kwacha + * `MYR` - Malaysian Ringgit + * `MVR` - Maldivian Rufiyaa + * `MVP` - Maldivian Rupee (1947–1981) + * `MLF` - Malian Franc + * `MTL` - Maltese Lira + * `MTP` - Maltese Pound + * `MRU` - Mauritanian Ouguiya + * `MRO` - Mauritanian Ouguiya (1973–2017) + * `MUR` - Mauritian Rupee + * `MXV` - Mexican Investment Unit + * `MXN` - Mexican Peso + * `MXP` - Mexican Silver Peso (1861–1992) + * `MDC` - Moldovan Cupon + * `MDL` - Moldovan Leu + * `MCF` - Monegasque Franc + * `MNT` - Mongolian Tugrik + * `MAD` - Moroccan Dirham + * `MAF` - Moroccan Franc + * `MZE` - Mozambican Escudo + * `MZN` - Mozambican Metical + * `MZM` - Mozambican Metical (1980–2006) + * `MMK` - Myanmar Kyat + * `NAD` - Namibian Dollar + * `NPR` - Nepalese Rupee + * `ANG` - Netherlands Antillean Guilder + * `TWD` - New Taiwan Dollar + * `NZD` - New Zealand Dollar + * `NIO` - Nicaraguan Córdoba + * `NIC` - Nicaraguan Córdoba (1988–1991) + * `NGN` - Nigerian Naira + * `KPW` - North Korean Won + * `NOK` - Norwegian Krone + * `OMR` - Omani Rial + * `PKR` - Pakistani Rupee + * `XPD` - Palladium + * `PAB` - Panamanian Balboa + * `PGK` - Papua New Guinean Kina + * `PYG` - Paraguayan Guarani + * `PEI` - Peruvian Inti + * `PEN` - Peruvian Sol + * `PES` - Peruvian Sol (1863–1965) + * `PHP` - Philippine Peso + * `XPT` - Platinum + * `PLN` - Polish Zloty + * `PLZ` - Polish Zloty (1950–1995) + * `PTE` - Portuguese Escudo + * `GWE` - Portuguese Guinea Escudo + * `QAR` - Qatari Rial + * `XRE` - RINET Funds + * `RHD` - Rhodesian Dollar + * `RON` - Romanian Leu + * `ROL` - Romanian Leu (1952–2006) + * `RUB` - Russian Ruble + * `RUR` - Russian Ruble (1991–1998) + * `RWF` - Rwandan Franc + * `SVC` - Salvadoran Colón + * `WST` - Samoan Tala + * `SAR` - Saudi Riyal + * `RSD` - Serbian Dinar + * `CSD` - Serbian Dinar (2002–2006) + * `SCR` - Seychellois Rupee + * `SLL` - Sierra Leonean Leone + * `XAG` - Silver + * `SGD` - Singapore Dollar + * `SKK` - Slovak Koruna + * `SIT` - Slovenian Tolar + * `SBD` - Solomon Islands Dollar + * `SOS` - Somali Shilling + * `ZAR` - South African Rand + * `ZAL` - South African Rand (financial) + * `KRH` - South Korean Hwan (1953–1962) + * `KRW` - South Korean Won + * `KRO` - South Korean Won (1945–1953) + * `SSP` - South Sudanese Pound + * `SUR` - Soviet Rouble + * `ESP` - Spanish Peseta + * `ESA` - Spanish Peseta (A account) + * `ESB` - Spanish Peseta (convertible account) + * `XDR` - Special Drawing Rights + * `LKR` - Sri Lankan Rupee + * `SHP` - St. Helena Pound + * `XSU` - Sucre + * `SDD` - Sudanese Dinar (1992–2007) + * `SDG` - Sudanese Pound + * `SDP` - Sudanese Pound (1957–1998) + * `SRD` - Surinamese Dollar + * `SRG` - Surinamese Guilder + * `SZL` - Swazi Lilangeni + * `SEK` - Swedish Krona + * `CHF` - Swiss Franc + * `SYP` - Syrian Pound + * `STN` - São Tomé & Príncipe Dobra + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + * `TVD` - TVD + * `TJR` - Tajikistani Ruble + * `TJS` - Tajikistani Somoni + * `TZS` - Tanzanian Shilling + * `XTS` - Testing Currency Code + * `THB` - Thai Baht + * `XXX` - The codes assigned for transactions where no currency is involved + * `TPE` - Timorese Escudo + * `TOP` - Tongan Paʻanga + * `TTD` - Trinidad & Tobago Dollar + * `TND` - Tunisian Dinar + * `TRY` - Turkish Lira + * `TRL` - Turkish Lira (1922–2005) + * `TMT` - Turkmenistani Manat + * `TMM` - Turkmenistani Manat (1993–2009) + * `USD` - US Dollar + * `USN` - US Dollar (Next day) + * `USS` - US Dollar (Same day) + * `UGX` - Ugandan Shilling + * `UGS` - Ugandan Shilling (1966–1987) + * `UAH` - Ukrainian Hryvnia + * `UAK` - Ukrainian Karbovanets + * `AED` - United Arab Emirates Dirham + * `UYW` - Uruguayan Nominal Wage Index Unit + * `UYU` - Uruguayan Peso + * `UYP` - Uruguayan Peso (1975–1993) + * `UYI` - Uruguayan Peso (Indexed Units) + * `UZS` - Uzbekistani Som + * `VUV` - Vanuatu Vatu + * `VES` - Venezuelan Bolívar + * `VEB` - Venezuelan Bolívar (1871–2008) + * `VEF` - Venezuelan Bolívar (2008–2018) + * `VND` - Vietnamese Dong + * `VNN` - Vietnamese Dong (1978–1985) + * `CHE` - WIR Euro + * `CHW` - WIR Franc + * `XOF` - West African CFA Franc + * `YDD` - Yemeni Dinar + * `YER` - Yemeni Rial + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + * `YUM` - Yugoslavian New Dinar (1994–2002) + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + * `ZWN` - ZWN + * `ZRN` - Zairean New Zaire (1993–1998) + * `ZRZ` - Zairean Zaire (1971–1993) + * `ZMW` - Zambian Kwacha + * `ZMK` - Zambian Kwacha (1968–2012) + * `ZWD` - Zimbabwean Dollar (1980–2008) + * `ZWR` - Zimbabwean Dollar (2008) + * `ZWL` - Zimbabwean Dollar (2009) + example: USD + exchange_rate: + type: string + format: decimal + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + nullable: true + description: The vendor credit's exchange rate. + example: '2.9' + inclusive_of_tax: + type: boolean + nullable: true + description: If the transaction is inclusive or exclusive of tax. `True` + if inclusive, `False` if exclusive. + company: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/CompanyInfo' + nullable: true + description: The company the vendor credit belongs to. + example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + x-merge-expands-to: CompanyInfo + lines: + type: array + items: + $ref: '#/components/schemas/VendorCreditLine' + readOnly: true + example: + - remote_id: '121222' + net_amount: 25.54 + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + project: 22e65a5d-2df5-4e6e-884a-e538d0339000 + contact: 908934-49j9-093f-0989-908923908 + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + exchange_rate: '2.9' + description: Gifted Merge Credit + account: 9d892439-5fab-4dbb-8bd8-34f7f96c7912 + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: false + - remote_id: '121223' + net_amount: 10 + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + description: Refund for overpayment + account: 9d892439-5fab-4dbb-8bd8-34f7f96c7912 + x-merge-expands-to: VendorCreditLine + tracking_categories: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/TrackingCategory' + nullable: true + example: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + x-merge-expands-to: TrackingCategory + applied_to_lines: + type: array + items: + $ref: '#/components/schemas/VendorCreditApplyLineForVendorCredit' + description: A list of VendorCredit Applied to Lines objects. + example: + - invoice: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + applied_date: '2020-03-31T00:00:00Z' + applied_amount: '2.9' + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + accounting_period: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/AccountingPeriod' + nullable: true + description: The accounting period that the VendorCredit was generated in. + example: 9b840d2-686a-465a-8a8e-7b028498f8e4 + x-merge-expands-to: AccountingPeriod + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /actions + data: + - Varies by platform + x-merge-expands: '{"accounting_period": "AccountingPeriod", "company": "CompanyInfo", + "lines": "VendorCreditLine", "tracking_categories": "TrackingCategory", "vendor": + "Contact"}' + x-merge-category: accounting + VendorCreditApplyLineForInvoice: + type: object + description: |- + # The VendorCreditApplyLine Object + ### Description + The `VendorCreditApplyLine` object is used to represent a applied vendor credit. + + ### Usage Example + Fetch from the `GET VendorCredit` endpoint and view the vendor credit's applied to lines. + properties: + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '088899' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + vendor_credit: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/VendorCredit' + nullable: true + example: f776d7e886ebcc3c56ff31b5ab2608c10f9fd823 + x-merge-expands-to: VendorCredit + applied_date: + type: string + format: date-time + nullable: true + description: Date that the vendor credit is applied to the invoice. + example: '2020-03-31T00:00:00Z' + applied_amount: + type: string + format: decimal + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + nullable: true + description: The amount of the VendorCredit applied to the invoice. + example: '2.9' + remote_was_deleted: + type: boolean + readOnly: true + description: 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/). + x-merge-nested-write-allowed: true + x-merge-expands: '{"vendor_credit": "VendorCredit"}' + x-merge-category: accounting + VendorCreditApplyLineForVendorCredit: + type: object + description: |- + # The VendorCreditApplyLine Object + ### Description + The `VendorCreditApplyLine` object is used to represent a applied vendor credit. + + ### Usage Example + Fetch from the `GET VendorCredit` endpoint and view the vendor credit's applied to lines. + properties: + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '088899' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + invoice: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Invoice' + nullable: true + example: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + x-merge-expands-to: Invoice + applied_date: + type: string + format: date-time + nullable: true + description: Date that the vendor credit is applied to the invoice. + example: '2020-03-31T00:00:00Z' + applied_amount: + type: string + format: decimal + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + nullable: true + description: The amount of the VendorCredit applied to the invoice. + example: '2.9' + remote_was_deleted: + type: boolean + readOnly: true + description: 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/). + x-merge-nested-write-allowed: true + x-merge-expands: '{"invoice": "Invoice"}' + x-merge-category: accounting + VendorCreditApplyLineForVendorCreditRequest: + type: object + description: |- + # The VendorCreditApplyLine Object + ### Description + The `VendorCreditApplyLine` object is used to represent a applied vendor credit. + + ### Usage Example + Fetch from the `GET VendorCredit` endpoint and view the vendor credit's applied to lines. + properties: + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '088899' + invoice: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Invoice' + nullable: true + example: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + x-merge-expands-to: Invoice + applied_date: + type: string + format: date-time + nullable: true + description: Date that the vendor credit is applied to the invoice. + example: '2020-03-31T00:00:00Z' + applied_amount: + type: string + format: decimal + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + nullable: true + description: The amount of the VendorCredit applied to the invoice. + example: '2.9' + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + x-merge-expands: '{"invoice": "Invoice"}' + x-merge-category: accounting + VendorCreditEndpointRequest: + type: object + properties: + model: + $ref: '#/components/schemas/VendorCreditRequest' + required: + - model + x-merge-category: accounting + VendorCreditLine: + type: object + description: |- + # The VendorCreditLine Object + ### Description + The `VendorCreditLine` object is used to represent a vendor credit's line items. + + ### Usage Example + Fetch from the `GET VendorCredit` endpoint and view the vendor credit's line items. + properties: + id: + type: string + format: uuid + readOnly: true + example: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '121222' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + net_amount: + type: number + format: double + nullable: true + description: The full value of the credit. + example: 25.54 + tracking_category: + type: string + format: uuid + nullable: true + description: The line's associated tracking category. + deprecated: true + tracking_categories: + type: array + items: + type: string + format: uuid + nullable: true + example: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + description: The vendor credit line item's associated tracking categories. + description: + type: string + nullable: true + description: The line's description. + example: Gifted Merge Credit + account: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Account' + nullable: true + description: The line's account. + example: 9d892439-5fab-4dbb-8bd8-34f7f96c7912 + x-merge-expands-to: Account + company: + type: string + format: uuid + nullable: true + description: The company the line belongs to. + example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + project: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Project' + nullable: true + example: 22e65a5d-2df5-4e6e-884a-e538d0339000 + x-merge-expands-to: Project + contact: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Contact' + nullable: true + example: 908934-49j9-093f-0989-908923908 + x-merge-expands-to: Contact + tax_rate: + type: string + format: uuid + nullable: true + example: a12e7c20-1922-9df7-s75n-edfeewnn7384 + description: The tax rate that applies to this line item. + exchange_rate: + type: string + format: decimal + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + nullable: true + description: The vendor credit line item's exchange rate. + example: '2.9' + remote_was_deleted: + type: boolean + readOnly: true + description: 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/). + x-merge-nested-write-allowed: true + x-merge-expands: '{"account": "Account", "contact": "Contact", "project": "Project"}' + x-merge-category: accounting + VendorCreditLineRequest: + type: object + description: |- + # The VendorCreditLine Object + ### Description + The `VendorCreditLine` object is used to represent a vendor credit's line items. + + ### Usage Example + Fetch from the `GET VendorCredit` endpoint and view the vendor credit's line items. + properties: + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '121222' + net_amount: + type: number + format: double + nullable: true + description: The full value of the credit. + example: 25.54 + tracking_category: + type: string + format: uuid + nullable: true + description: The line's associated tracking category. + deprecated: true + tracking_categories: + type: array + items: + type: string + format: uuid + nullable: true + example: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + description: The vendor credit line item's associated tracking categories. + description: + type: string + nullable: true + description: The line's description. + example: Gifted Merge Credit + account: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Account' + nullable: true + description: The line's account. + example: 9d892439-5fab-4dbb-8bd8-34f7f96c7912 + x-merge-expands-to: Account + company: + type: string + format: uuid + nullable: true + description: The company the line belongs to. + example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + project: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Project' + nullable: true + example: 22e65a5d-2df5-4e6e-884a-e538d0339000 + x-merge-expands-to: Project + contact: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Contact' + nullable: true + example: 908934-49j9-093f-0989-908923908 + x-merge-expands-to: Contact + tax_rate: + type: string + format: uuid + nullable: true + example: a12e7c20-1922-9df7-s75n-edfeewnn7384 + description: The tax rate that applies to this line item. + exchange_rate: + type: string + format: decimal + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + nullable: true + description: The vendor credit line item's exchange rate. + example: '2.9' + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + x-merge-expands: '{"account": "Account", "contact": "Contact", "project": "Project"}' + x-merge-category: accounting + VendorCreditRequest: + type: object + description: |- + # The VendorCredit Object + ### Description + A `VendorCredit` is transaction issued by a vendor to the accounting company, indicating a reduction or cancellation of the amount owed to the vendor. It is most generally used as an adjustment note used to rectify errors, returns, or overpayments related to a purchasing transaction. A `VendorCredit` can be applied to `Accounts Payable` Invoices to decrease the overall amount of the `Invoice`. + + ### Usage Example + Fetch from the `GET VendorCredit` endpoint and view a company's vendor credits. + properties: + number: + type: string + nullable: true + description: The vendor credit's number. + example: '6' + transaction_date: + type: string + format: date-time + nullable: true + description: The vendor credit's transaction date. + example: '2020-03-31T00:00:00Z' + vendor: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Contact' + nullable: true + description: The vendor that owes the gift or refund. + example: 3d263469-51a1-4766-9205-f6c997826be1 + x-merge-expands-to: Contact + total_amount: + type: number + format: double + nullable: true + description: The vendor credit's total amount. + example: 10000 + currency: + oneOf: + - $ref: '#/components/schemas/TransactionCurrencyEnum' + - type: string + nullable: true + description: |- + The vendor credit's currency. + + * `XUA` - ADB Unit of Account + * `AFN` - Afghan Afghani + * `AFA` - Afghan Afghani (1927–2002) + * `ALL` - Albanian Lek + * `ALK` - Albanian Lek (1946–1965) + * `DZD` - Algerian Dinar + * `ADP` - Andorran Peseta + * `AOA` - Angolan Kwanza + * `AOK` - Angolan Kwanza (1977–1991) + * `AON` - Angolan New Kwanza (1990–2000) + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + * `ARA` - Argentine Austral + * `ARS` - Argentine Peso + * `ARM` - Argentine Peso (1881–1970) + * `ARP` - Argentine Peso (1983–1985) + * `ARL` - Argentine Peso Ley (1970–1983) + * `AMD` - Armenian Dram + * `AWG` - Aruban Florin + * `AUD` - Australian Dollar + * `ATS` - Austrian Schilling + * `AZN` - Azerbaijani Manat + * `AZM` - Azerbaijani Manat (1993–2006) + * `BSD` - Bahamian Dollar + * `BHD` - Bahraini Dinar + * `BDT` - Bangladeshi Taka + * `BBD` - Barbadian Dollar + * `BYN` - Belarusian Ruble + * `BYB` - Belarusian Ruble (1994–1999) + * `BYR` - Belarusian Ruble (2000–2016) + * `BEF` - Belgian Franc + * `BEC` - Belgian Franc (convertible) + * `BEL` - Belgian Franc (financial) + * `BZD` - Belize Dollar + * `BMD` - Bermudan Dollar + * `BTN` - Bhutanese Ngultrum + * `BOB` - Bolivian Boliviano + * `BOL` - Bolivian Boliviano (1863–1963) + * `BOV` - Bolivian Mvdol + * `BOP` - Bolivian Peso + * `BAM` - Bosnia-Herzegovina Convertible Mark + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + * `BWP` - Botswanan Pula + * `BRC` - Brazilian Cruzado (1986–1989) + * `BRZ` - Brazilian Cruzeiro (1942–1967) + * `BRE` - Brazilian Cruzeiro (1990–1993) + * `BRR` - Brazilian Cruzeiro (1993–1994) + * `BRN` - Brazilian New Cruzado (1989–1990) + * `BRB` - Brazilian New Cruzeiro (1967–1986) + * `BRL` - Brazilian Real + * `GBP` - British Pound + * `BND` - Brunei Dollar + * `BGL` - Bulgarian Hard Lev + * `BGN` - Bulgarian Lev + * `BGO` - Bulgarian Lev (1879–1952) + * `BGM` - Bulgarian Socialist Lev + * `BUK` - Burmese Kyat + * `BIF` - Burundian Franc + * `XPF` - CFP Franc + * `KHR` - Cambodian Riel + * `CAD` - Canadian Dollar + * `CVE` - Cape Verdean Escudo + * `KYD` - Cayman Islands Dollar + * `XAF` - Central African CFA Franc + * `CLE` - Chilean Escudo + * `CLP` - Chilean Peso + * `CLF` - Chilean Unit of Account (UF) + * `CNX` - Chinese People’s Bank Dollar + * `CNY` - Chinese Yuan + * `CNH` - Chinese Yuan (offshore) + * `COP` - Colombian Peso + * `COU` - Colombian Real Value Unit + * `KMF` - Comorian Franc + * `CDF` - Congolese Franc + * `CRC` - Costa Rican Colón + * `HRD` - Croatian Dinar + * `HRK` - Croatian Kuna + * `CUC` - Cuban Convertible Peso + * `CUP` - Cuban Peso + * `CYP` - Cypriot Pound + * `CZK` - Czech Koruna + * `CSK` - Czechoslovak Hard Koruna + * `DKK` - Danish Krone + * `DJF` - Djiboutian Franc + * `DOP` - Dominican Peso + * `NLG` - Dutch Guilder + * `XCD` - East Caribbean Dollar + * `DDM` - East German Mark + * `ECS` - Ecuadorian Sucre + * `ECV` - Ecuadorian Unit of Constant Value + * `EGP` - Egyptian Pound + * `GQE` - Equatorial Guinean Ekwele + * `ERN` - Eritrean Nakfa + * `EEK` - Estonian Kroon + * `ETB` - Ethiopian Birr + * `EUR` - Euro + * `XBA` - European Composite Unit + * `XEU` - European Currency Unit + * `XBB` - European Monetary Unit + * `XBC` - European Unit of Account (XBC) + * `XBD` - European Unit of Account (XBD) + * `FKP` - Falkland Islands Pound + * `FJD` - Fijian Dollar + * `FIM` - Finnish Markka + * `FRF` - French Franc + * `XFO` - French Gold Franc + * `XFU` - French UIC-Franc + * `GMD` - Gambian Dalasi + * `GEK` - Georgian Kupon Larit + * `GEL` - Georgian Lari + * `DEM` - German Mark + * `GHS` - Ghanaian Cedi + * `GHC` - Ghanaian Cedi (1979–2007) + * `GIP` - Gibraltar Pound + * `XAU` - Gold + * `GRD` - Greek Drachma + * `GTQ` - Guatemalan Quetzal + * `GWP` - Guinea-Bissau Peso + * `GNF` - Guinean Franc + * `GNS` - Guinean Syli + * `GYD` - Guyanaese Dollar + * `HTG` - Haitian Gourde + * `HNL` - Honduran Lempira + * `HKD` - Hong Kong Dollar + * `HUF` - Hungarian Forint + * `IMP` - IMP + * `ISK` - Icelandic Króna + * `ISJ` - Icelandic Króna (1918–1981) + * `INR` - Indian Rupee + * `IDR` - Indonesian Rupiah + * `IRR` - Iranian Rial + * `IQD` - Iraqi Dinar + * `IEP` - Irish Pound + * `ILS` - Israeli New Shekel + * `ILP` - Israeli Pound + * `ILR` - Israeli Shekel (1980–1985) + * `ITL` - Italian Lira + * `JMD` - Jamaican Dollar + * `JPY` - Japanese Yen + * `JOD` - Jordanian Dinar + * `KZT` - Kazakhstani Tenge + * `KES` - Kenyan Shilling + * `KWD` - Kuwaiti Dinar + * `KGS` - Kyrgystani Som + * `LAK` - Laotian Kip + * `LVL` - Latvian Lats + * `LVR` - Latvian Ruble + * `LBP` - Lebanese Pound + * `LSL` - Lesotho Loti + * `LRD` - Liberian Dollar + * `LYD` - Libyan Dinar + * `LTL` - Lithuanian Litas + * `LTT` - Lithuanian Talonas + * `LUL` - Luxembourg Financial Franc + * `LUC` - Luxembourgian Convertible Franc + * `LUF` - Luxembourgian Franc + * `MOP` - Macanese Pataca + * `MKD` - Macedonian Denar + * `MKN` - Macedonian Denar (1992–1993) + * `MGA` - Malagasy Ariary + * `MGF` - Malagasy Franc + * `MWK` - Malawian Kwacha + * `MYR` - Malaysian Ringgit + * `MVR` - Maldivian Rufiyaa + * `MVP` - Maldivian Rupee (1947–1981) + * `MLF` - Malian Franc + * `MTL` - Maltese Lira + * `MTP` - Maltese Pound + * `MRU` - Mauritanian Ouguiya + * `MRO` - Mauritanian Ouguiya (1973–2017) + * `MUR` - Mauritian Rupee + * `MXV` - Mexican Investment Unit + * `MXN` - Mexican Peso + * `MXP` - Mexican Silver Peso (1861–1992) + * `MDC` - Moldovan Cupon + * `MDL` - Moldovan Leu + * `MCF` - Monegasque Franc + * `MNT` - Mongolian Tugrik + * `MAD` - Moroccan Dirham + * `MAF` - Moroccan Franc + * `MZE` - Mozambican Escudo + * `MZN` - Mozambican Metical + * `MZM` - Mozambican Metical (1980–2006) + * `MMK` - Myanmar Kyat + * `NAD` - Namibian Dollar + * `NPR` - Nepalese Rupee + * `ANG` - Netherlands Antillean Guilder + * `TWD` - New Taiwan Dollar + * `NZD` - New Zealand Dollar + * `NIO` - Nicaraguan Córdoba + * `NIC` - Nicaraguan Córdoba (1988–1991) + * `NGN` - Nigerian Naira + * `KPW` - North Korean Won + * `NOK` - Norwegian Krone + * `OMR` - Omani Rial + * `PKR` - Pakistani Rupee + * `XPD` - Palladium + * `PAB` - Panamanian Balboa + * `PGK` - Papua New Guinean Kina + * `PYG` - Paraguayan Guarani + * `PEI` - Peruvian Inti + * `PEN` - Peruvian Sol + * `PES` - Peruvian Sol (1863–1965) + * `PHP` - Philippine Peso + * `XPT` - Platinum + * `PLN` - Polish Zloty + * `PLZ` - Polish Zloty (1950–1995) + * `PTE` - Portuguese Escudo + * `GWE` - Portuguese Guinea Escudo + * `QAR` - Qatari Rial + * `XRE` - RINET Funds + * `RHD` - Rhodesian Dollar + * `RON` - Romanian Leu + * `ROL` - Romanian Leu (1952–2006) + * `RUB` - Russian Ruble + * `RUR` - Russian Ruble (1991–1998) + * `RWF` - Rwandan Franc + * `SVC` - Salvadoran Colón + * `WST` - Samoan Tala + * `SAR` - Saudi Riyal + * `RSD` - Serbian Dinar + * `CSD` - Serbian Dinar (2002–2006) + * `SCR` - Seychellois Rupee + * `SLL` - Sierra Leonean Leone + * `XAG` - Silver + * `SGD` - Singapore Dollar + * `SKK` - Slovak Koruna + * `SIT` - Slovenian Tolar + * `SBD` - Solomon Islands Dollar + * `SOS` - Somali Shilling + * `ZAR` - South African Rand + * `ZAL` - South African Rand (financial) + * `KRH` - South Korean Hwan (1953–1962) + * `KRW` - South Korean Won + * `KRO` - South Korean Won (1945–1953) + * `SSP` - South Sudanese Pound + * `SUR` - Soviet Rouble + * `ESP` - Spanish Peseta + * `ESA` - Spanish Peseta (A account) + * `ESB` - Spanish Peseta (convertible account) + * `XDR` - Special Drawing Rights + * `LKR` - Sri Lankan Rupee + * `SHP` - St. Helena Pound + * `XSU` - Sucre + * `SDD` - Sudanese Dinar (1992–2007) + * `SDG` - Sudanese Pound + * `SDP` - Sudanese Pound (1957–1998) + * `SRD` - Surinamese Dollar + * `SRG` - Surinamese Guilder + * `SZL` - Swazi Lilangeni + * `SEK` - Swedish Krona + * `CHF` - Swiss Franc + * `SYP` - Syrian Pound + * `STN` - São Tomé & Príncipe Dobra + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + * `TVD` - TVD + * `TJR` - Tajikistani Ruble + * `TJS` - Tajikistani Somoni + * `TZS` - Tanzanian Shilling + * `XTS` - Testing Currency Code + * `THB` - Thai Baht + * `XXX` - The codes assigned for transactions where no currency is involved + * `TPE` - Timorese Escudo + * `TOP` - Tongan Paʻanga + * `TTD` - Trinidad & Tobago Dollar + * `TND` - Tunisian Dinar + * `TRY` - Turkish Lira + * `TRL` - Turkish Lira (1922–2005) + * `TMT` - Turkmenistani Manat + * `TMM` - Turkmenistani Manat (1993–2009) + * `USD` - US Dollar + * `USN` - US Dollar (Next day) + * `USS` - US Dollar (Same day) + * `UGX` - Ugandan Shilling + * `UGS` - Ugandan Shilling (1966–1987) + * `UAH` - Ukrainian Hryvnia + * `UAK` - Ukrainian Karbovanets + * `AED` - United Arab Emirates Dirham + * `UYW` - Uruguayan Nominal Wage Index Unit + * `UYU` - Uruguayan Peso + * `UYP` - Uruguayan Peso (1975–1993) + * `UYI` - Uruguayan Peso (Indexed Units) + * `UZS` - Uzbekistani Som + * `VUV` - Vanuatu Vatu + * `VES` - Venezuelan Bolívar + * `VEB` - Venezuelan Bolívar (1871–2008) + * `VEF` - Venezuelan Bolívar (2008–2018) + * `VND` - Vietnamese Dong + * `VNN` - Vietnamese Dong (1978–1985) + * `CHE` - WIR Euro + * `CHW` - WIR Franc + * `XOF` - West African CFA Franc + * `YDD` - Yemeni Dinar + * `YER` - Yemeni Rial + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + * `YUM` - Yugoslavian New Dinar (1994–2002) + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + * `ZWN` - ZWN + * `ZRN` - Zairean New Zaire (1993–1998) + * `ZRZ` - Zairean Zaire (1971–1993) + * `ZMW` - Zambian Kwacha + * `ZMK` - Zambian Kwacha (1968–2012) + * `ZWD` - Zimbabwean Dollar (1980–2008) + * `ZWR` - Zimbabwean Dollar (2008) + * `ZWL` - Zimbabwean Dollar (2009) + example: USD + exchange_rate: + type: string + format: decimal + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + nullable: true + description: The vendor credit's exchange rate. + example: '2.9' + inclusive_of_tax: + type: boolean + nullable: true + description: If the transaction is inclusive or exclusive of tax. `True` + if inclusive, `False` if exclusive. + company: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/CompanyInfo' + nullable: true + description: The company the vendor credit belongs to. + example: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + x-merge-expands-to: CompanyInfo + tracking_categories: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/TrackingCategory' + nullable: true + example: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + x-merge-expands-to: TrackingCategory + applied_to_lines: + type: array + items: + $ref: '#/components/schemas/VendorCreditApplyLineForVendorCreditRequest' + description: A list of VendorCredit Applied to Lines objects. + example: + - invoice: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + applied_date: '2020-03-31T00:00:00Z' + applied_amount: '2.9' + accounting_period: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/AccountingPeriod' + nullable: true + description: The accounting period that the VendorCredit was generated in. + example: 9b840d2-686a-465a-8a8e-7b028498f8e4 + x-merge-expands-to: AccountingPeriod + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + x-merge-expands: '{"accounting_period": "AccountingPeriod", "company": "CompanyInfo", + "lines": "VendorCreditLine", "tracking_categories": "TrackingCategory", "vendor": + "Contact"}' + x-merge-category: accounting + VendorCreditResponse: + type: object + properties: + model: + $ref: '#/components/schemas/VendorCredit' + warnings: + type: array + items: + $ref: '#/components/schemas/WarningValidationProblem' + errors: + type: array + items: + $ref: '#/components/schemas/ErrorValidationProblem' + logs: + type: array + items: + $ref: '#/components/schemas/DebugModeLog' + required: + - errors + - model + - warnings + x-merge-category: accounting + WarningValidationProblem: + type: object + properties: + source: + $ref: '#/components/schemas/ValidationProblemSource' + example: + pointer: /age + title: + type: string + example: Unrecognized Field + detail: + type: string + example: An unrecognized field, age, was passed in with request data. + problem_type: + type: string + example: UNRECOGNIZED_FIELD + required: + - detail + - problem_type + - title + x-merge-category: accounting + WebhookReceiver: + type: object + properties: + event: + type: string + is_active: + type: boolean + key: + type: string + required: + - event + - is_active + x-merge-category: accounting + WebhookReceiverRequest: + type: object + properties: + event: + type: string + minLength: 1 + is_active: + type: boolean + key: + type: string + minLength: 1 + required: + - event + - is_active + x-merge-category: accounting + securitySchemes: + tokenAuth: + type: http + scheme: bearer + description: Token-based authentication with required prefix "Bearer" + x-fern-token-variable-name: api_key +servers: +- url: https://api.merge.dev/api/accounting/v1 + description: Production + x-fern-server-name: Production +- url: https://api-sandbox.merge.dev/api/accounting/v1 + description: Sandbox + x-fern-server-name: Sandbox +- url: https://api-eu.merge.dev/api/accounting/v1 + description: Production EU + x-fern-server-name: ProductionEU +- url: https://api-ap.merge.dev/api/accounting/v1 + description: Production APSE1 + x-fern-server-name: ProductionAPSE1 diff --git a/.mock/ats_v3.yml b/.mock/ats_v3.yml new file mode 100644 index 000000000..c478403cd --- /dev/null +++ b/.mock/ats_v3.yml @@ -0,0 +1,10845 @@ +openapi: 3.0.3 +info: + title: Merge ATS API + version: '1.0' + description: The unified API for building rich integrations with multiple Applicant + Tracking System platforms. + contact: + name: Merge Team + url: https://www.merge.dev/ + email: hello@merge.dev +paths: + /ats/v1/account-details: + get: + operationId: account_details_retrieve + description: Get details for a linked account. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - account-details + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AccountDetails' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/account-token/{public_token}: + get: + operationId: account_token_retrieve + description: Returns the account token for the end user with the provided public + token. + parameters: + - in: path + name: public_token + schema: + type: string + required: true + tags: + - account-token + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AccountToken' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/activities: + get: + operationId: activities_list + description: Returns a list of `Activity` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - user + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandUser: + value: user + summary: Expand User + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_fields + schema: + type: string + enum: + - activity_type + - activity_type,visibility + - visibility + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesActivityType,Visibility: + value: activity_type,visibility + summary: Original Enum Values Activity_type, Visibility + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + - in: query + name: show_enum_origins + schema: + type: string + enum: + - activity_type + - activity_type,visibility + - visibility + description: 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) + examples: + OriginalEnumValuesActivityType,Visibility: + value: activity_type,visibility + summary: Original Enum Values Activity_type, Visibility + - in: query + name: user_id + schema: + type: string + description: If provided, will only return activities done by this user. + examples: + UserId: + summary: user_id + tags: + - activities + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedActivityList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + post: + operationId: activities_create + description: Creates an `Activity` object with the given values. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: is_debug_mode + schema: + type: boolean + description: Whether to include debug fields (such as log file links) in the + response. + - in: query + name: run_async + schema: + type: boolean + description: Whether or not third-party updates should be run asynchronously. + tags: + - activities + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ActivityEndpointRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ActivityEndpointRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/ActivityEndpointRequest' + required: true + security: + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/ActivityResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /ats/v1/activities/{id}: + get: + operationId: activities_retrieve + description: Returns an `Activity` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - user + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandUser: + value: user + summary: Expand User + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: remote_fields + schema: + type: string + enum: + - activity_type + - activity_type,visibility + - visibility + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesActivityType,Visibility: + value: activity_type,visibility + summary: Original Enum Values Activity_type, Visibility + - in: query + name: show_enum_origins + schema: + type: string + enum: + - activity_type + - activity_type,visibility + - visibility + description: 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) + examples: + OriginalEnumValuesActivityType,Visibility: + value: activity_type,visibility + summary: Original Enum Values Activity_type, Visibility + tags: + - activities + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Activity' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/activities/meta/post: + get: + operationId: activities_meta_post_retrieve + description: Returns metadata for `Activity` POSTs. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - activities + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetaResponse' + description: '' + x-merge-meta-post: META_POST + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/applications: + get: + operationId: applications_list + description: Returns a list of `Application` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: candidate_id + schema: + type: string + description: If provided, will only return applications for this candidate. + examples: + CandidateId: + summary: candidate_id + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: credited_to_id + schema: + type: string + description: If provided, will only return applications credited to this user. + examples: + CreditedToId: + summary: credited_to_id + - in: query + name: current_stage_id + schema: + type: string + description: If provided, will only return applications at this interview + stage. + examples: + CurrentStageId: + summary: current_stage_id + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - candidate + - credited_to + - current_stage + - job + - offers + - reject_reason + - screening_question_answers + - screening_question_answers.question + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandOffers,ScreeningQuestionAnswers,ScreeningQuestionAnswers.question,Candidate,Job,CreditedTo,CurrentStage,RejectReason: + value: + offers,screening_question_answers,screening_question_answers.question,candidate,job,credited_to,current_stage,reject_reason + summary: Expand Offers, Screening_question_answers, Screening_question_answers.question, + Candidate, Job, Credited_to, Current_stage, Reject_reason + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: job_id + schema: + type: string + description: If provided, will only return applications for this job. + examples: + JobId: + summary: job_id + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: reject_reason_id + schema: + type: string + description: If provided, will only return applications with this reject reason. + examples: + RejectReasonId: + summary: reject_reason_id + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + - in: query + name: source + schema: + type: string + nullable: true + description: If provided, will only return applications with this source. + tags: + - applications + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedApplicationList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + post: + operationId: applications_create + description: | + Creates an `Application` object with the given values. + For certain integrations, but not all, our API detects duplicate candidates and will associate applications with existing records in the third-party. New candidates are created and automatically linked to the application. + + See our [Help Center article](https://help.merge.dev/en/articles/10012366-updates-to-post-applications-oct-2024) for detailed support per integration. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: is_debug_mode + schema: + type: boolean + description: Whether to include debug fields (such as log file links) in the + response. + - in: query + name: run_async + schema: + type: boolean + description: Whether or not third-party updates should be run asynchronously. + tags: + - applications + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ApplicationEndpointRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ApplicationEndpointRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/ApplicationEndpointRequest' + required: true + security: + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/ApplicationResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/applications/{id}: + get: + operationId: applications_retrieve + description: Returns an `Application` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - candidate + - credited_to + - current_stage + - job + - offers + - reject_reason + - screening_question_answers + - screening_question_answers.question + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandOffers,ScreeningQuestionAnswers,ScreeningQuestionAnswers.question,Candidate,Job,CreditedTo,CurrentStage,RejectReason: + value: + offers,screening_question_answers,screening_question_answers.question,candidate,job,credited_to,current_stage,reject_reason + summary: Expand Offers, Screening_question_answers, Screening_question_answers.question, + Candidate, Job, Credited_to, Current_stage, Reject_reason + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - applications + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Application' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/applications/{id}/change-stage: + post: + operationId: applications_change_stage_create + description: Updates the `current_stage` field of an `Application` object + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: is_debug_mode + schema: + type: boolean + description: Whether to include debug fields (such as log file links) in the + response. + - in: query + name: run_async + schema: + type: boolean + description: Whether or not third-party updates should be run asynchronously. + tags: + - applications + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateApplicationStageRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/UpdateApplicationStageRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/UpdateApplicationStageRequest' + security: + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/ApplicationResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /ats/v1/applications/meta/post: + get: + operationId: applications_meta_post_retrieve + description: Returns metadata for `Application` POSTs. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: application_remote_template_id + schema: + type: string + description: The template ID associated with the nested application in the + request. + tags: + - applications + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetaResponse' + description: '' + x-merge-meta-post: META_POST + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/async-passthrough: + post: + operationId: async_passthrough_create + description: Asynchronously pull data from an endpoint not currently supported + by Merge. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - async-passthrough + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DataPassthroughRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/DataPassthroughRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/DataPassthroughRequest' + required: true + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AsyncPassthroughReciept' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/async-passthrough/{async_passthrough_receipt_id}: + get: + operationId: async_passthrough_retrieve + description: Retrieves data from earlier async-passthrough POST request + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: async_passthrough_receipt_id + schema: + type: string + format: uuid + required: true + tags: + - async-passthrough + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/RemoteResponse' + - type: string + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/attachments: + get: + operationId: attachments_list + description: Returns a list of `Attachment` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: candidate_id + schema: + type: string + description: If provided, will only return attachments for this candidate. + examples: + CandidateId: + summary: candidate_id + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - candidate + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandCandidate: + value: candidate + summary: Expand Candidate + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_fields + schema: + type: string + enum: + - attachment_type + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesAttachmentType: + value: attachment_type + summary: Original Enum Values Attachment_type + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + - in: query + name: show_enum_origins + schema: + type: string + enum: + - attachment_type + description: 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) + examples: + OriginalEnumValuesAttachmentType: + value: attachment_type + summary: Original Enum Values Attachment_type + tags: + - attachments + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedAttachmentList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + post: + operationId: attachments_create + description: Creates an `Attachment` object with the given values. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: is_debug_mode + schema: + type: boolean + description: Whether to include debug fields (such as log file links) in the + response. + - in: query + name: run_async + schema: + type: boolean + description: Whether or not third-party updates should be run asynchronously. + tags: + - attachments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AttachmentEndpointRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/AttachmentEndpointRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/AttachmentEndpointRequest' + required: true + security: + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/AttachmentResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/attachments/{id}: + get: + operationId: attachments_retrieve + description: Returns an `Attachment` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - candidate + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandCandidate: + value: candidate + summary: Expand Candidate + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: remote_fields + schema: + type: string + enum: + - attachment_type + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesAttachmentType: + value: attachment_type + summary: Original Enum Values Attachment_type + - in: query + name: show_enum_origins + schema: + type: string + enum: + - attachment_type + description: 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) + examples: + OriginalEnumValuesAttachmentType: + value: attachment_type + summary: Original Enum Values Attachment_type + tags: + - attachments + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Attachment' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/attachments/meta/post: + get: + operationId: attachments_meta_post_retrieve + description: Returns metadata for `Attachment` POSTs. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - attachments + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetaResponse' + description: '' + x-merge-meta-post: META_POST + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/audit-trail: + get: + operationId: audit_trail_list + description: Gets a list of audit trail events. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: end_date + schema: + type: string + description: If included, will only include audit trail events that occurred + before this time + - in: query + name: event_type + schema: + type: string + description: '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`' + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: start_date + schema: + type: string + description: If included, will only include audit trail events that occurred + after this time + - in: query + name: user_email + schema: + type: string + description: 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. + tags: + - audit-trail + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedAuditLogEventList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/available-actions: + get: + operationId: available_actions_retrieve + description: Returns a list of models and actions available for an account. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - available-actions + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AvailableActions' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/candidates: + get: + operationId: candidates_list + description: Returns a list of `Candidate` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: email_addresses + schema: + type: string + description: If provided, will only return candidates with these email addresses; + multiple addresses can be separated by commas. + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - applications + - attachments + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandApplications,Attachments: + value: applications,attachments + summary: Expand Applications, Attachments + explode: false + - in: query + name: first_name + schema: + type: string + nullable: true + description: If provided, will only return candidates with this first name. + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: last_name + schema: + type: string + nullable: true + description: If provided, will only return candidates with this last name. + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + - in: query + name: tags + schema: + type: string + description: If provided, will only return candidates with these tags; multiple + tags can be separated by commas. + tags: + - candidates + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedCandidateList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + post: + operationId: candidates_create + description: Creates a `Candidate` object with the given values. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: is_debug_mode + schema: + type: boolean + description: Whether to include debug fields (such as log file links) in the + response. + - in: query + name: run_async + schema: + type: boolean + description: Whether or not third-party updates should be run asynchronously. + tags: + - candidates + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CandidateEndpointRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/CandidateEndpointRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/CandidateEndpointRequest' + required: true + security: + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/CandidateResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/candidates/{id}: + get: + operationId: candidates_retrieve + description: Returns a `Candidate` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - applications + - attachments + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandApplications,Attachments: + value: applications,attachments + summary: Expand Applications, Attachments + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - candidates + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Candidate' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + patch: + operationId: candidates_partial_update + description: Updates a `Candidate` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: is_debug_mode + schema: + type: boolean + description: Whether to include debug fields (such as log file links) in the + response. + - in: query + name: run_async + schema: + type: boolean + description: Whether or not third-party updates should be run asynchronously. + tags: + - candidates + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedCandidateEndpointRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedCandidateEndpointRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedCandidateEndpointRequest' + required: true + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CandidateResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /ats/v1/candidates/ignore/{model_id}: + post: + operationId: candidates_ignore_create + description: Ignores a specific row based on the `model_id` in the url. These + records will have their properties set to null, and will not be updated in + future syncs. The "reason" and "message" fields in the request body will be + stored for audit purposes. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: model_id + schema: + type: string + format: uuid + required: true + tags: + - candidates + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/IgnoreCommonModelRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/IgnoreCommonModelRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/IgnoreCommonModelRequest' + required: true + security: + - tokenAuth: [] + responses: + '200': + description: No response body + x-extra-tags: + - ignore-model + /ats/v1/candidates/meta/patch/{id}: + get: + operationId: candidates_meta_patch_retrieve + description: Returns metadata for `Candidate` PATCHs. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + tags: + - candidates + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetaResponse' + description: '' + x-merge-meta-patch: META_PATCH + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/candidates/meta/post: + get: + operationId: candidates_meta_post_retrieve + description: Returns metadata for `Candidate` POSTs. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - candidates + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetaResponse' + description: '' + x-merge-meta-post: META_POST + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/default-scopes: + get: + operationId: default_scopes_retrieve + description: Get the default permissions for Merge Common Models and fields + across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). + tags: + - scopes + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CommonModelScopeAPI' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/delete-account: + post: + operationId: delete_account_delete + description: Delete a linked account. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - delete-account + security: + - tokenAuth: [] + responses: + '200': + description: No response body + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/departments: + get: + operationId: departments_list + description: Returns a list of `Department` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + tags: + - departments + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedDepartmentList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/departments/{id}: + get: + operationId: departments_retrieve + description: Returns a `Department` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - departments + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Department' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/eeocs: + get: + operationId: eeocs_list + description: Returns a list of `EEOC` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: candidate_id + schema: + type: string + description: If provided, will only return EEOC info for this candidate. + examples: + CandidateId: + summary: candidate_id + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - candidate + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandCandidate: + value: candidate + summary: Expand Candidate + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_fields + schema: + type: string + enum: + - disability_status + - disability_status,gender + - disability_status,gender,race + - disability_status,gender,race,veteran_status + - disability_status,gender,veteran_status + - disability_status,race + - disability_status,race,veteran_status + - disability_status,veteran_status + - gender + - gender,race + - gender,race,veteran_status + - gender,veteran_status + - race + - race,veteran_status + - veteran_status + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesDisabilityStatus,Gender,Race,VeteranStatus: + value: disability_status,gender,race,veteran_status + summary: Original Enum Values Disability_status, Gender, Race, Veteran_status + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + - in: query + name: show_enum_origins + schema: + type: string + enum: + - disability_status + - disability_status,gender + - disability_status,gender,race + - disability_status,gender,race,veteran_status + - disability_status,gender,veteran_status + - disability_status,race + - disability_status,race,veteran_status + - disability_status,veteran_status + - gender + - gender,race + - gender,race,veteran_status + - gender,veteran_status + - race + - race,veteran_status + - veteran_status + description: 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) + examples: + OriginalEnumValuesDisabilityStatus,Gender,Race,VeteranStatus: + value: disability_status,gender,race,veteran_status + summary: Original Enum Values Disability_status, Gender, Race, Veteran_status + tags: + - eeocs + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedEEOCList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/eeocs/{id}: + get: + operationId: eeocs_retrieve + description: Returns an `EEOC` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - candidate + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandCandidate: + value: candidate + summary: Expand Candidate + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: remote_fields + schema: + type: string + enum: + - disability_status + - disability_status,gender + - disability_status,gender,race + - disability_status,gender,race,veteran_status + - disability_status,gender,veteran_status + - disability_status,race + - disability_status,race,veteran_status + - disability_status,veteran_status + - gender + - gender,race + - gender,race,veteran_status + - gender,veteran_status + - race + - race,veteran_status + - veteran_status + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesDisabilityStatus,Gender,Race,VeteranStatus: + value: disability_status,gender,race,veteran_status + summary: Original Enum Values Disability_status, Gender, Race, Veteran_status + - in: query + name: show_enum_origins + schema: + type: string + enum: + - disability_status + - disability_status,gender + - disability_status,gender,race + - disability_status,gender,race,veteran_status + - disability_status,gender,veteran_status + - disability_status,race + - disability_status,race,veteran_status + - disability_status,veteran_status + - gender + - gender,race + - gender,race,veteran_status + - gender,veteran_status + - race + - race,veteran_status + - veteran_status + description: 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) + examples: + OriginalEnumValuesDisabilityStatus,Gender,Race,VeteranStatus: + value: disability_status,gender,race,veteran_status + summary: Original Enum Values Disability_status, Gender, Race, Veteran_status + tags: + - eeocs + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/EEOC' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/field-mappings: + get: + operationId: field_mappings_retrieve + description: Get all Field Mappings for this Linked Account. Field Mappings + are mappings between third-party Remote Fields and user defined Merge fields. + [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: exclude_remote_field_metadata + schema: + type: boolean + description: 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. + tags: + - field-mapping + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/FieldMappingApiInstanceResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + post: + operationId: field_mappings_create + description: Create new Field Mappings that will be available after the next + scheduled sync. This will cause the next sync for this Linked Account to sync + **ALL** data from start. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: exclude_remote_field_metadata + schema: + type: boolean + description: 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. + tags: + - field-mapping + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateFieldMappingRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/CreateFieldMappingRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/CreateFieldMappingRequest' + required: true + security: + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/FieldMappingInstanceResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/field-mappings/{field_mapping_id}: + patch: + operationId: field_mappings_partial_update + description: Create or update existing Field Mappings for a Linked Account. + Changes will be reflected after the next scheduled sync. This will cause the + next sync for this Linked Account to sync **ALL** data from start. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: field_mapping_id + schema: + type: string + format: uuid + required: true + tags: + - field-mapping + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedEditFieldMappingRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedEditFieldMappingRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedEditFieldMappingRequest' + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/FieldMappingInstanceResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + delete: + operationId: field_mappings_destroy + description: Deletes Field Mappings for a Linked Account. All data related to + this Field Mapping will be deleted and these changes will be reflected after + the next scheduled sync. This will cause the next sync for this Linked Account + to sync **ALL** data from start. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: field_mapping_id + schema: + type: string + format: uuid + required: true + tags: + - field-mapping + security: + - tokenAuth: [] + responses: + '204': + content: + application/json: + schema: + $ref: '#/components/schemas/FieldMappingInstanceResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/generate-key: + post: + operationId: generate_key_create + description: Create a remote key. + tags: + - generate-key + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GenerateRemoteKeyRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/GenerateRemoteKeyRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/GenerateRemoteKeyRequest' + required: true + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RemoteKey' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/interviews: + get: + operationId: interviews_list + description: Returns a list of `ScheduledInterview` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: application_id + schema: + type: string + description: If provided, will only return interviews for this application. + examples: + ApplicationId: + summary: application_id + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - application + - interviewers + - job_interview_stage + - organizer + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandInterviewers,Organizer,Application,JobInterviewStage: + value: interviewers,organizer,application,job_interview_stage + summary: Expand Interviewers, Organizer, Application, Job_interview_stage + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: job_id + schema: + type: string + description: If provided, wll only return interviews organized for this job. + examples: + JobId: + summary: job_id + - in: query + name: job_interview_stage_id + schema: + type: string + description: If provided, will only return interviews at this stage. + examples: + JobInterviewStageId: + summary: job_interview_stage_id + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - in: query + name: organizer_id + schema: + type: string + description: If provided, will only return interviews organized by this user. + examples: + OrganizerId: + summary: organizer_id + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_fields + schema: + type: string + enum: + - status + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesStatus: + value: status + summary: Original Enum Values Status + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + - in: query + name: show_enum_origins + schema: + type: string + enum: + - status + description: 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) + examples: + OriginalEnumValuesStatus: + value: status + summary: Original Enum Values Status + tags: + - interviews + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedScheduledInterviewList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + post: + operationId: interviews_create + description: Creates a `ScheduledInterview` object with the given values. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: is_debug_mode + schema: + type: boolean + description: Whether to include debug fields (such as log file links) in the + response. + - in: query + name: run_async + schema: + type: boolean + description: Whether or not third-party updates should be run asynchronously. + tags: + - interviews + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ScheduledInterviewEndpointRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ScheduledInterviewEndpointRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/ScheduledInterviewEndpointRequest' + required: true + security: + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/ScheduledInterviewResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /ats/v1/interviews/{id}: + get: + operationId: interviews_retrieve + description: Returns a `ScheduledInterview` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - application + - interviewers + - job_interview_stage + - organizer + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandInterviewers,Organizer,Application,JobInterviewStage: + value: interviewers,organizer,application,job_interview_stage + summary: Expand Interviewers, Organizer, Application, Job_interview_stage + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: remote_fields + schema: + type: string + enum: + - status + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesStatus: + value: status + summary: Original Enum Values Status + - in: query + name: show_enum_origins + schema: + type: string + enum: + - status + description: 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) + examples: + OriginalEnumValuesStatus: + value: status + summary: Original Enum Values Status + tags: + - interviews + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ScheduledInterview' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/interviews/meta/post: + get: + operationId: interviews_meta_post_retrieve + description: Returns metadata for `ScheduledInterview` POSTs. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - interviews + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetaResponse' + description: '' + x-merge-meta-post: META_POST + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/issues: + get: + operationId: issues_list + description: Gets all issues for Organization. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: query + name: account_token + schema: + type: string + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: end_date + schema: + type: string + description: If included, will only include issues whose most recent action + occurred before this time + - in: query + name: end_user_organization_name + schema: + type: string + - in: query + name: first_incident_time_after + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return issues whose first incident time + was after this datetime. + - in: query + name: first_incident_time_before + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return issues whose first incident time + was before this datetime. + - in: query + name: include_muted + schema: + type: string + description: If true, will include muted issues + - in: query + name: integration_name + schema: + type: string + - in: query + name: last_incident_time_after + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return issues whose last incident time + was after this datetime. + - in: query + name: last_incident_time_before + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return issues whose last incident time + was before this datetime. + - in: query + name: linked_account_id + schema: + type: string + description: If provided, will only include issues pertaining to the linked + account passed in. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: start_date + schema: + type: string + description: If included, will only include issues whose most recent action + occurred after this time + - in: query + name: status + schema: + type: string + enum: + - ONGOING + - RESOLVED + description: |- + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + tags: + - issues + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedIssueList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/issues/{id}: + get: + operationId: issues_retrieve + description: Get a specific issue. + parameters: + - in: path + name: id + schema: + type: string + format: uuid + required: true + tags: + - issues + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Issue' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/job-interview-stages: + get: + operationId: job_interview_stages_list + description: Returns a list of `JobInterviewStage` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - job + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandJob: + value: job + summary: Expand Job + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: job_id + schema: + type: string + description: If provided, will only return interview stages for this job. + examples: + JobId: + summary: job_id + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + tags: + - job-interview-stages + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedJobInterviewStageList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/job-interview-stages/{id}: + get: + operationId: job_interview_stages_retrieve + description: Returns a `JobInterviewStage` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - job + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandJob: + value: job + summary: Expand Job + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - job-interview-stages + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/JobInterviewStage' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/job-postings: + get: + operationId: job_postings_list + description: Returns a list of `JobPosting` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - job + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandJob: + value: job + summary: Expand Job + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + - in: query + name: status + schema: + type: string + nullable: true + enum: + - CLOSED + - DRAFT + - INTERNAL + - PENDING + - PUBLISHED + description: |- + If provided, will only return Job Postings with this status. Options: ('PUBLISHED', 'CLOSED', 'DRAFT', 'INTERNAL', 'PENDING') + + * `PUBLISHED` - PUBLISHED + * `CLOSED` - CLOSED + * `DRAFT` - DRAFT + * `INTERNAL` - INTERNAL + * `PENDING` - PENDING + tags: + - job-postings + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedJobPostingList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /ats/v1/job-postings/{id}: + get: + operationId: job_postings_retrieve + description: Returns a `JobPosting` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - job + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandJob: + value: job + summary: Expand Job + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - job-postings + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/JobPosting' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /ats/v1/jobs: + get: + operationId: jobs_list + description: Returns a list of `Job` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: code + schema: + type: string + nullable: true + description: If provided, will only return jobs with this code. + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - departments + - hiring_managers + - job_postings + - offices + - recruiters + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandDepartments,Offices,HiringManagers,JobPostings,Recruiters: + value: departments,offices,hiring_managers,job_postings,recruiters + summary: Expand Departments, Offices, Hiring_managers, Job_postings, Recruiters + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - in: query + name: offices + schema: + type: string + description: If provided, will only return jobs for this office; multiple + offices can be separated by commas. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_fields + schema: + type: string + enum: + - status + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesStatus: + value: status + summary: Original Enum Values Status + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + - in: query + name: show_enum_origins + schema: + type: string + enum: + - status + description: 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) + examples: + OriginalEnumValuesStatus: + value: status + summary: Original Enum Values Status + - in: query + name: status + schema: + type: string + nullable: true + enum: + - ARCHIVED + - CLOSED + - DRAFT + - OPEN + - PENDING + description: |- + If provided, will only return jobs with this status. Options: ('OPEN', 'CLOSED', 'DRAFT', 'ARCHIVED', 'PENDING') + + * `OPEN` - OPEN + * `CLOSED` - CLOSED + * `DRAFT` - DRAFT + * `ARCHIVED` - ARCHIVED + * `PENDING` - PENDING + tags: + - jobs + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedJobList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/jobs/{id}: + get: + operationId: jobs_retrieve + description: Returns a `Job` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - departments + - hiring_managers + - job_postings + - offices + - recruiters + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandDepartments,Offices,HiringManagers,JobPostings,Recruiters: + value: departments,offices,hiring_managers,job_postings,recruiters + summary: Expand Departments, Offices, Hiring_managers, Job_postings, Recruiters + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: remote_fields + schema: + type: string + enum: + - status + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesStatus: + value: status + summary: Original Enum Values Status + - in: query + name: show_enum_origins + schema: + type: string + enum: + - status + description: 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) + examples: + OriginalEnumValuesStatus: + value: status + summary: Original Enum Values Status + tags: + - jobs + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Job' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/jobs/{job_id}/screening-questions: + get: + operationId: jobs_screening_questions_list + description: Returns a list of `ScreeningQuestion` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - job + - options + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandOptions,Job: + value: options,job + summary: Expand Options, Job + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: path + name: job_id + schema: + type: string + format: uuid + required: true + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - jobs + - screening-questions + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedScreeningQuestionList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /ats/v1/link-token: + post: + operationId: link_token_create + description: Creates a link token to be used when linking a new end user. + tags: + - link-token + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EndUserDetailsRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/EndUserDetailsRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/EndUserDetailsRequest' + required: true + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/LinkToken' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/linked-account-scopes: + get: + operationId: linked_account_scopes_retrieve + description: Get all available permissions for Merge Common Models and fields + for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - scopes + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CommonModelScopeAPI' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + post: + operationId: linked_account_scopes_create + description: Update permissions for any Common Model or field for a single Linked + Account. Any Scopes not set in this POST request will inherit the default + Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes) + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - scopes + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LinkedAccountCommonModelScopeDeserializerRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/LinkedAccountCommonModelScopeDeserializerRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/LinkedAccountCommonModelScopeDeserializerRequest' + required: true + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CommonModelScopeAPI' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /ats/v1/linked-accounts: + get: + operationId: linked_accounts_list + description: List linked accounts for your organization. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: query + name: category + schema: + type: string + nullable: true + enum: + - accounting + - ats + - crm + - filestorage + - hris + - mktg + - ticketing + description: |- + Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing` + + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: end_user_email_address + schema: + type: string + description: If provided, will only return linked accounts associated with + the given email address. + - in: query + name: end_user_organization_name + schema: + type: string + description: If provided, will only return linked accounts associated with + the given organization name. + - in: query + name: end_user_origin_id + schema: + type: string + description: If provided, will only return linked accounts associated with + the given origin ID. + - in: query + name: end_user_origin_ids + schema: + type: string + description: Comma-separated list of EndUser origin IDs, making it possible + to specify multiple EndUsers at once. + - in: query + name: id + schema: + type: string + format: uuid + - in: query + name: ids + schema: + type: string + description: Comma-separated list of LinkedAccount IDs, making it possible + to specify multiple LinkedAccounts at once. + - in: query + name: include_duplicates + schema: + type: boolean + description: 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. + - in: query + name: integration_name + schema: + type: string + description: If provided, will only return linked accounts associated with + the given integration name. + - in: query + name: is_test_account + schema: + type: string + description: If included, will only include test linked accounts. If not included, + will only include non-test linked accounts. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: status + schema: + type: string + description: 'Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, + `RELINK_NEEDED`' + tags: + - linked-accounts + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedAccountDetailsAndActionsList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/offers: + get: + operationId: offers_list + description: Returns a list of `Offer` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: application_id + schema: + type: string + description: If provided, will only return offers for this application. + examples: + ApplicationId: + summary: application_id + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: creator_id + schema: + type: string + description: If provided, will only return offers created by this user. + examples: + CreatorId: + summary: creator_id + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - application + - creator + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandApplication,Creator: + value: application,creator + summary: Expand Application, Creator + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_fields + schema: + type: string + enum: + - status + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesStatus: + value: status + summary: Original Enum Values Status + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + - in: query + name: show_enum_origins + schema: + type: string + enum: + - status + description: 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) + examples: + OriginalEnumValuesStatus: + value: status + summary: Original Enum Values Status + tags: + - offers + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedOfferList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/offers/{id}: + get: + operationId: offers_retrieve + description: Returns an `Offer` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - application + - creator + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandApplication,Creator: + value: application,creator + summary: Expand Application, Creator + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: remote_fields + schema: + type: string + enum: + - status + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesStatus: + value: status + summary: Original Enum Values Status + - in: query + name: show_enum_origins + schema: + type: string + enum: + - status + description: 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) + examples: + OriginalEnumValuesStatus: + value: status + summary: Original Enum Values Status + tags: + - offers + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Offer' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/offices: + get: + operationId: offices_list + description: Returns a list of `Office` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + tags: + - offices + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedOfficeList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/offices/{id}: + get: + operationId: offices_retrieve + description: Returns an `Office` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - offices + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Office' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/passthrough: + post: + operationId: passthrough_create + description: Pull data from an endpoint not currently supported by Merge. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - passthrough + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DataPassthroughRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/DataPassthroughRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/DataPassthroughRequest' + required: true + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RemoteResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/regenerate-key: + post: + operationId: regenerate_key_create + description: Exchange remote keys. + tags: + - regenerate-key + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RemoteKeyForRegenerationRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/RemoteKeyForRegenerationRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/RemoteKeyForRegenerationRequest' + required: true + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RemoteKey' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/reject-reasons: + get: + operationId: reject_reasons_list + description: Returns a list of `RejectReason` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + tags: + - reject-reasons + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedRejectReasonList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/reject-reasons/{id}: + get: + operationId: reject_reasons_retrieve + description: Returns a `RejectReason` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - reject-reasons + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RejectReason' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/remote-fields: + get: + operationId: remote_fields_retrieve + description: Get all remote fields for a Linked Account. Remote fields are third-party + fields that are accessible after initial sync if remote_data is enabled. You + can use remote fields to override existing Merge fields or map a new Merge + field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: common_models + schema: + type: string + description: A comma seperated list of Common Model names. If included, will + only return Remote Fields for those Common Models. + - in: query + name: include_example_values + schema: + type: string + description: 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. + tags: + - field-mapping + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RemoteFieldAPIResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/scorecards: + get: + operationId: scorecards_list + description: Returns a list of `Scorecard` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: application_id + schema: + type: string + description: If provided, will only return scorecards for this application. + examples: + ApplicationId: + summary: application_id + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - application + - interview + - interviewer + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandApplication,Interview,Interviewer: + value: application,interview,interviewer + summary: Expand Application, Interview, Interviewer + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: interview_id + schema: + type: string + description: If provided, will only return scorecards for this interview. + examples: + InterviewId: + summary: interview_id + - in: query + name: interviewer_id + schema: + type: string + description: If provided, will only return scorecards for this interviewer. + examples: + InterviewerId: + summary: interviewer_id + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_fields + schema: + type: string + enum: + - overall_recommendation + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesOverallRecommendation: + value: overall_recommendation + summary: Original Enum Values Overall_recommendation + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + - in: query + name: show_enum_origins + schema: + type: string + enum: + - overall_recommendation + description: 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) + examples: + OriginalEnumValuesOverallRecommendation: + value: overall_recommendation + summary: Original Enum Values Overall_recommendation + tags: + - scorecards + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedScorecardList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/scorecards/{id}: + get: + operationId: scorecards_retrieve + description: Returns a `Scorecard` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - application + - interview + - interviewer + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandApplication,Interview,Interviewer: + value: application,interview,interviewer + summary: Expand Application, Interview, Interviewer + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: remote_fields + schema: + type: string + enum: + - overall_recommendation + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesOverallRecommendation: + value: overall_recommendation + summary: Original Enum Values Overall_recommendation + - in: query + name: show_enum_origins + schema: + type: string + enum: + - overall_recommendation + description: 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) + examples: + OriginalEnumValuesOverallRecommendation: + value: overall_recommendation + summary: Original Enum Values Overall_recommendation + tags: + - scorecards + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Scorecard' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/sync-status: + get: + operationId: sync_status_list + description: 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). + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - sync-status + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedSyncStatusList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/sync-status/resync: + post: + operationId: 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. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - force-resync + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SyncStatus' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/tags: + get: + operationId: tags_list + description: Returns a list of `Tag` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + tags: + - tags + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedTagList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/target-fields: + get: + operationId: target_fields_retrieve + description: Get all organization-wide Target Fields, this will not include + any Linked Account specific Target Fields. Organization-wide Target Fields + are additional fields appended to the Merge Common Model for all Linked Accounts + in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - field-mapping + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ExternalTargetFieldAPIResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/users: + get: + operationId: users_list + description: Returns a list of `RemoteUser` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: email + schema: + type: string + format: email + nullable: true + description: If provided, will only return remote users with the given email + address + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_fields + schema: + type: string + enum: + - access_role + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesAccessRole: + value: access_role + summary: Original Enum Values Access_role + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + - in: query + name: show_enum_origins + schema: + type: string + enum: + - access_role + description: 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) + examples: + OriginalEnumValuesAccessRole: + value: access_role + summary: Original Enum Values Access_role + tags: + - users + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedRemoteUserList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/users/{id}: + get: + operationId: users_retrieve + description: Returns a `RemoteUser` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: remote_fields + schema: + type: string + enum: + - access_role + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesAccessRole: + value: access_role + summary: Original Enum Values Access_role + - in: query + name: show_enum_origins + schema: + type: string + enum: + - access_role + description: 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) + examples: + OriginalEnumValuesAccessRole: + value: access_role + summary: Original Enum Values Access_role + tags: + - users + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RemoteUser' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ats/v1/webhook-receivers: + get: + operationId: webhook_receivers_list + description: Returns a list of `WebhookReceiver` objects. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - webhook-receivers + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/WebhookReceiver' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + post: + operationId: webhook_receivers_create + description: Creates a `WebhookReceiver` object with the given values. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - webhook-receivers + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/WebhookReceiverRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/WebhookReceiverRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/WebhookReceiverRequest' + required: true + security: + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/WebhookReceiver' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC +components: + schemas: + AccessRoleEnum: + enum: + - SUPER_ADMIN + - ADMIN + - TEAM_MEMBER + - LIMITED_TEAM_MEMBER + - INTERVIEWER + type: string + description: |- + * `SUPER_ADMIN` - SUPER_ADMIN + * `ADMIN` - ADMIN + * `TEAM_MEMBER` - TEAM_MEMBER + * `LIMITED_TEAM_MEMBER` - LIMITED_TEAM_MEMBER + * `INTERVIEWER` - INTERVIEWER + x-merge-category: ats + AccountDetails: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + example: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd + integration: + type: string + readOnly: true + example: BambooHR + integration_slug: + type: string + readOnly: true + example: bamboohr + category: + oneOf: + - $ref: '#/components/schemas/CategoryEnum' + - type: string + nullable: true + example: hris + end_user_origin_id: + type: string + readOnly: true + example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + end_user_organization_name: + type: string + readOnly: true + example: Waystar Royco + end_user_email_address: + type: string + format: email + readOnly: true + example: kendall.roy@waystar-royco.com + status: + type: string + readOnly: true + example: COMPLETE + webhook_listener_url: + type: string + format: uri + readOnly: true + example: https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 + is_duplicate: + type: boolean + nullable: true + readOnly: true + description: Whether a Production Linked Account's credentials match another + existing Production Linked Account. This field is `null` for Test Linked + Accounts, incomplete Production Linked Accounts, and ignored duplicate + Production Linked Account sets. + example: true + account_type: + type: string + readOnly: true + example: PRODUCTION + completed_at: + type: string + format: date-time + nullable: true + description: The time at which account completes the linking flow. + example: '2024-08-26T20:11:19.277118Z' + x-merge-category: ats + AccountDetailsAndActions: + type: object + description: |- + # The LinkedAccount Object + ### Description + The `LinkedAccount` object is used to represent an end user's link with a specific integration. + + ### Usage Example + View a list of your organization's `LinkedAccount` objects. + properties: + id: + type: string + example: e59b1821-f85c-4e28-a6b3-1804156f3563 + category: + oneOf: + - $ref: '#/components/schemas/CategoryEnum' + - type: string + example: hris + status: + oneOf: + - $ref: '#/components/schemas/AccountDetailsAndActionsStatusEnum' + - type: string + example: INCOMPLETE + status_detail: + type: string + example: Invalid login credentials + end_user_origin_id: + type: string + example: 3ac95cde-6c7f-4eef-afec-be710b42308d + end_user_organization_name: + type: string + example: Foo Bar, LLC + end_user_email_address: + type: string + example: hradmin@foobar.dev + subdomain: + type: string + description: The tenant or domain the customer has provided access to. + example: foobar + webhook_listener_url: + type: string + example: https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 + is_duplicate: + type: boolean + nullable: true + description: Whether a Production Linked Account's credentials match another + existing Production Linked Account. This field is `null` for Test Linked + Accounts, incomplete Production Linked Accounts, and ignored duplicate + Production Linked Account sets. + example: true + integration: + $ref: '#/components/schemas/AccountDetailsAndActionsIntegration' + example: + name: SAP SuccessFactors + categories: + - hris + - ats + image: https://cdn.merge.dev/SuccessFactors_Logo.png + square_image: https://cdn.merge.dev/SuccessFactors_Square_Logo.jpg + color: '#F6A704' + slug: sap-successfactors + passthrough_available: true + available_model_operations: + - model_name: Candidate + available_operations: + - FETCH + - CREATE + required_post_parameters: + - remote_user_id + supported_fields: + - first_name + - last_name + - company + - title + account_type: + type: string + example: PRODUCTION + completed_at: + type: string + format: date-time + example: '2024-08-26T20:11:19.277118Z' + required: + - account_type + - completed_at + - end_user_email_address + - end_user_organization_name + - id + - status + - webhook_listener_url + x-merge-sample-json: '{"id": "e59b1821-f85c-4e28-a6b3-1804156f3563", "category": + "hris", "status": "INCOMPLETE", "status_detail": "Invalid login credentials", + "end_user_origin_id": "3ac95cde-6c7f-4eef-afec-be710b42308d", "end_user_organization_name": + "Foo Bar, LLC", "end_user_email_address": "hradmin@foobar.dev", "webhook_listener_url": + "https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4", + "is_duplicate": true, "integration": {"name": "SAP SuccessFactors", "categories": + ["hris", "ats"], "image": "https://cdn.merge.dev/SuccessFactors_Logo.png", + "square_image": "https://cdn.merge.dev/SuccessFactors_Square_Logo.jpg", "color": + "#F6A704", "slug": "sap-successfactors", "passthrough_available": true, "available_model_operations": + [{"model_name": "Candidate", "available_operations": ["FETCH", "CREATE"], + "required_post_parameters": ["remote_user_id"], "supported_fields": ["first_name", + "last_name", "company", "title"]}]}}' + x-merge-category: ats + AccountDetailsAndActionsIntegration: + type: object + properties: + name: + type: string + categories: + type: array + items: + $ref: '#/components/schemas/CategoriesEnum' + image: + type: string + square_image: + type: string + color: + type: string + slug: + type: string + passthrough_available: + type: boolean + available_model_operations: + type: array + items: + $ref: '#/components/schemas/ModelOperation' + required: + - categories + - color + - name + - passthrough_available + - slug + x-merge-category: ats + AccountDetailsAndActionsStatusEnum: + enum: + - COMPLETE + - INCOMPLETE + - RELINK_NEEDED + - IDLE + type: string + description: |- + * `COMPLETE` - COMPLETE + * `INCOMPLETE` - INCOMPLETE + * `RELINK_NEEDED` - RELINK_NEEDED + * `IDLE` - IDLE + x-merge-category: ats + AccountIntegration: + type: object + properties: + name: + type: string + description: Company name. + abbreviated_name: + type: string + nullable: true + description: "Optional. This shortened name appears in places with limited + space, usually in conjunction with the platform's logo (e.g., Merge Link + menu).

Example: Workforce Now (in lieu of ADP Workforce Now), + SuccessFactors (in lieu of SAP SuccessFactors)" + categories: + type: array + items: + $ref: '#/components/schemas/CategoriesEnum' + description: Category or categories this integration belongs to. Multiple + categories should be comma separated, i.e. [ats, hris]. + readOnly: true + image: + type: string + format: uri + nullable: true + description: Company logo in rectangular shape. + square_image: + type: string + format: uri + nullable: true + description: Company logo in square shape. + color: + type: string + description: The color of this integration used for buttons and text throughout + the app and landing pages. Choose a darker, saturated color. + pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ + maxLength: 18 + slug: + type: string + readOnly: true + api_endpoints_to_documentation_urls: + type: object + additionalProperties: {} + description: "Mapping of API endpoints to documentation urls for support. + Example: {'GET': [['/common-model-scopes', 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', + 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], + 'POST': []}" + webhook_setup_guide_url: + type: string + nullable: true + description: Setup guide URL for third party webhook creation. Exposed in + Merge Docs. + category_beta_status: + type: object + description: Category or categories this integration is in beta status for. + readOnly: true + required: + - name + x-merge-category: ats + AccountToken: + type: object + properties: + account_token: + type: string + example: T9klMDQrcHdm9jrtHuOS2Nf06BIHwMNjpPXPMB + integration: + $ref: '#/components/schemas/AccountIntegration' + example: + name: SAP SuccessFactors + categories: + - hris + - ats + image: https://cdn.merge.dev/SuccessFactors_Logo.png + square_image: https://cdn.merge.dev/SuccessFactors_Square_Logo.jpg + color: '#F6A704' + slug: sap-successfactors + id: + type: string + example: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd + required: + - account_token + - id + - integration + x-merge-category: ats + Activity: + type: object + description: |- + # The Activity Object + ### Description + The `Activity` object is used to represent an activity for a candidate performed by a user. + ### Usage Example + Fetch from the `LIST Activities` endpoint and filter by `ID` to show all activities. + properties: + id: + type: string + format: uuid + readOnly: true + example: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '198123' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + user: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/RemoteUser' + nullable: true + description: The user that performed the action. + example: 9d892439-5fab-4dbb-8bd8-34f7f96c7912 + x-merge-expands-to: RemoteUser + remote_created_at: + type: string + format: date-time + nullable: true + description: When the third party's activity was created. + example: '2021-10-15T00:00:00Z' + activity_type: + oneOf: + - $ref: '#/components/schemas/ActivityTypeEnum' + - type: string + nullable: true + description: |- + The activity's type. + + * `NOTE` - NOTE + * `EMAIL` - EMAIL + * `OTHER` - OTHER + example: NOTE + subject: + type: string + nullable: true + description: The activity's subject. + example: Gil Feig's interview + body: + type: string + nullable: true + description: The activity's body. + example: Candidate loves integrations! + visibility: + oneOf: + - $ref: '#/components/schemas/VisibilityEnum' + - type: string + nullable: true + description: |- + The activity's visibility. + + * `ADMIN_ONLY` - ADMIN_ONLY + * `PUBLIC` - PUBLIC + * `PRIVATE` - PRIVATE + example: PRIVATE + candidate: + type: string + format: uuid + nullable: true + example: 550e8400-e29b-41d4-a716-446655440000 + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /actions + data: + - Varies by platform + x-merge-expands: '{"user": "RemoteUser"}' + x-merge-category: ats + ActivityEndpointRequest: + type: object + properties: + model: + $ref: '#/components/schemas/ActivityRequest' + remote_user_id: + type: string + required: + - model + - remote_user_id + x-merge-category: ats + ActivityRequest: + type: object + description: |- + # The Activity Object + ### Description + The `Activity` object is used to represent an activity for a candidate performed by a user. + ### Usage Example + Fetch from the `LIST Activities` endpoint and filter by `ID` to show all activities. + properties: + user: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/RemoteUser' + nullable: true + description: The user that performed the action. + example: 9d892439-5fab-4dbb-8bd8-34f7f96c7912 + x-merge-expands-to: RemoteUser + activity_type: + nullable: true + description: |- + The activity's type. + + * `NOTE` - NOTE + * `EMAIL` - EMAIL + * `OTHER` - OTHER + example: NOTE + $ref: '#/components/schemas/ActivityTypeEnum' + subject: + type: string + nullable: true + description: The activity's subject. + example: Gil Feig's interview + body: + type: string + nullable: true + description: The activity's body. + example: Candidate loves integrations! + visibility: + oneOf: + - $ref: '#/components/schemas/VisibilityEnum' + - type: string + nullable: true + description: |- + The activity's visibility. + + * `ADMIN_ONLY` - ADMIN_ONLY + * `PUBLIC` - PUBLIC + * `PRIVATE` - PRIVATE + example: PRIVATE + candidate: + type: string + format: uuid + nullable: true + example: 550e8400-e29b-41d4-a716-446655440000 + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + x-merge-expands: '{"user": "RemoteUser"}' + x-merge-category: ats + ActivityResponse: + type: object + properties: + model: + $ref: '#/components/schemas/Activity' + warnings: + type: array + items: + $ref: '#/components/schemas/WarningValidationProblem' + errors: + type: array + items: + $ref: '#/components/schemas/ErrorValidationProblem' + logs: + type: array + items: + $ref: '#/components/schemas/DebugModeLog' + required: + - errors + - model + - warnings + x-merge-category: ats + ActivityTypeEnum: + enum: + - NOTE + - EMAIL + - OTHER + type: string + description: |- + * `NOTE` - NOTE + * `EMAIL` - EMAIL + * `OTHER` - OTHER + x-merge-category: ats + AdvancedMetadata: + type: object + properties: + id: + type: string + format: uuid + display_name: + type: string + description: + type: string + is_required: + type: boolean + is_custom: + type: boolean + field_choices: + type: array + items: {} + required: + - id + x-merge-category: ats + Application: + type: object + description: |- + # The Application Object + ### Description + The Application Object is used to represent a candidate's journey through a particular Job's recruiting process. If a Candidate applies for multiple Jobs, there will be a separate Application for each Job if the third-party integration allows it. + + ### Usage Example + Fetch from the `LIST Applications` endpoint and filter by `ID` to show all applications. + properties: + id: + type: string + format: uuid + readOnly: true + example: 92e8a369-fffe-430d-b93a-f7e8a16563f1 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '98796' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + candidate: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Candidate' + nullable: true + description: The candidate applying. + example: 2872ba14-4084-492b-be96-e5eee6fc33ef + x-merge-expands-to: Candidate + job: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Job' + nullable: true + description: The job being applied for. + example: 52bf9b5e-0beb-4f6f-8a72-cd4dca7ca633 + x-merge-expands-to: Job + applied_at: + type: string + format: date-time + nullable: true + description: When the application was submitted. + example: '2021-10-15T00:00:00Z' + rejected_at: + type: string + format: date-time + nullable: true + description: When the application was rejected. + example: '2021-11-15T00:00:00Z' + offers: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Offer' + nullable: true + example: + - e9b5c11d-c588-468e-8567-cd6992e42b62 + x-merge-expands-to: Offer + source: + type: string + nullable: true + description: The application's source. + example: Campus recruiting event + credited_to: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/RemoteUser' + nullable: true + description: The user credited for this application. + example: 58166795-8d68-4b30-9bfb-bfd402479484 + x-merge-expands-to: RemoteUser + screening_question_answers: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/ScreeningQuestionAnswer' + example: + - question: 0238cbc6-6040-430a-848e-aaiehfhdbadf4ae + answer: 5+ years experience + - question: 59982bf6-7c54-4ff8-ab60-ced0bb644b84 + answer: New york city + x-merge-expands-to: ScreeningQuestionAnswer + current_stage: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/JobInterviewStage' + nullable: true + description: The application's current stage. + example: d578dfdc-7b0a-4ab6-a2b0-4b40f20eb9ea + x-merge-expands-to: JobInterviewStage + reject_reason: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/RejectReason' + nullable: true + description: The application's reason for rejection. + example: 59b25f2b-da02-40f5-9656-9fa0db555784 + x-merge-expands-to: RejectReason + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /candidacies + data: + - Varies by platform + x-merge-nested-write-allowed: true + x-merge-expands: '{"candidate": "Candidate", "credited_to": "RemoteUser", "current_stage": + "JobInterviewStage", "job": "Job", "offers": "Offer", "reject_reason": "RejectReason", + "screening_question_answers": "ScreeningQuestionAnswer", "screening_question_answers.question": + "ScreeningQuestion"}' + x-merge-category: ats + ApplicationEndpointRequest: + type: object + properties: + model: + $ref: '#/components/schemas/ApplicationRequest' + remote_user_id: + type: string + required: + - model + - remote_user_id + x-merge-category: ats + ApplicationRequest: + type: object + description: |- + # The Application Object + ### Description + The Application Object is used to represent a candidate's journey through a particular Job's recruiting process. If a Candidate applies for multiple Jobs, there will be a separate Application for each Job if the third-party integration allows it. + + ### Usage Example + Fetch from the `LIST Applications` endpoint and filter by `ID` to show all applications. + properties: + candidate: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Candidate' + nullable: true + description: The candidate applying. + example: 2872ba14-4084-492b-be96-e5eee6fc33ef + x-merge-expands-to: Candidate + job: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Job' + nullable: true + description: The job being applied for. + example: 52bf9b5e-0beb-4f6f-8a72-cd4dca7ca633 + x-merge-expands-to: Job + applied_at: + type: string + format: date-time + nullable: true + description: When the application was submitted. + example: '2021-10-15T00:00:00Z' + rejected_at: + type: string + format: date-time + nullable: true + description: When the application was rejected. + example: '2021-11-15T00:00:00Z' + offers: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Offer' + nullable: true + example: + - e9b5c11d-c588-468e-8567-cd6992e42b62 + x-merge-expands-to: Offer + source: + type: string + nullable: true + description: The application's source. + example: Campus recruiting event + credited_to: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/RemoteUser' + nullable: true + description: The user credited for this application. + example: 58166795-8d68-4b30-9bfb-bfd402479484 + x-merge-expands-to: RemoteUser + screening_question_answers: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/ScreeningQuestionAnswerRequest' + example: + - question: 0238cbc6-6040-430a-848e-aaiehfhdbadf4ae + answer: 5+ years experience + - question: 59982bf6-7c54-4ff8-ab60-ced0bb644b84 + answer: New york city + x-merge-expands-to: ScreeningQuestionAnswer + current_stage: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/JobInterviewStage' + nullable: true + description: The application's current stage. + example: d578dfdc-7b0a-4ab6-a2b0-4b40f20eb9ea + x-merge-expands-to: JobInterviewStage + reject_reason: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/RejectReason' + nullable: true + description: The application's reason for rejection. + example: 59b25f2b-da02-40f5-9656-9fa0db555784 + x-merge-expands-to: RejectReason + remote_template_id: + type: string + writeOnly: true + nullable: true + minLength: 1 + example: '92830948203' + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + x-merge-expands: '{"candidate": "Candidate", "credited_to": "RemoteUser", "current_stage": + "JobInterviewStage", "job": "Job", "offers": "Offer", "reject_reason": "RejectReason", + "screening_question_answers": "ScreeningQuestionAnswer", "screening_question_answers.question": + "ScreeningQuestion"}' + x-merge-category: ats + ApplicationResponse: + type: object + properties: + model: + $ref: '#/components/schemas/Application' + warnings: + type: array + items: + $ref: '#/components/schemas/WarningValidationProblem' + errors: + type: array + items: + $ref: '#/components/schemas/ErrorValidationProblem' + logs: + type: array + items: + $ref: '#/components/schemas/DebugModeLog' + required: + - errors + - model + - warnings + x-merge-category: ats + AsyncPassthroughReciept: + type: object + properties: + async_passthrough_receipt_id: + type: string + format: uuid + example: fd29020f-2695-445e-922e-dcd5e81903fd + required: + - async_passthrough_receipt_id + x-merge-category: ats + Attachment: + type: object + description: |- + # The Attachment Object + ### Description + The `Attachment` object is used to represent a file attached to a candidate. + ### Usage Example + Fetch from the `LIST Attachments` endpoint and view attachments accessible by a company. + properties: + id: + type: string + format: uuid + readOnly: true + example: c640b80b-fac9-409f-aa19-1f9221aec445 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '11167' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + file_name: + type: string + nullable: true + description: The attachment's name. + example: Candidate Resume + file_url: + type: string + format: uri + nullable: true + maxLength: 2000 + example: http://alturl.com/p749b + description: The attachment's url. + candidate: + type: string + format: uuid + nullable: true + description: '' + example: 2872ba14-4084-492b-be96-e5eee6fc33ef + attachment_type: + oneOf: + - $ref: '#/components/schemas/AttachmentTypeEnum' + - type: string + nullable: true + description: |- + The attachment's type. + + * `RESUME` - RESUME + * `COVER_LETTER` - COVER_LETTER + * `OFFER_LETTER` - OFFER_LETTER + * `OTHER` - OTHER + example: RESUME + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /attachments + data: + - Varies by platform + x-merge-nested-write-allowed: true + x-merge-expands: '{"ticket": "Ticket"}' + x-merge-category: ats + AttachmentEndpointRequest: + type: object + properties: + model: + $ref: '#/components/schemas/AttachmentRequest' + remote_user_id: + type: string + required: + - model + - remote_user_id + x-merge-category: ats + AttachmentRequest: + type: object + description: |- + # The Attachment Object + ### Description + The `Attachment` object is used to represent a file attached to a candidate. + ### Usage Example + Fetch from the `LIST Attachments` endpoint and view attachments accessible by a company. + properties: + file_name: + type: string + nullable: true + description: The attachment's name. + example: Candidate Resume + file_url: + type: string + format: uri + nullable: true + maxLength: 2000 + example: http://alturl.com/p749b + description: The attachment's url. + candidate: + type: string + format: uuid + nullable: true + description: '' + example: 2872ba14-4084-492b-be96-e5eee6fc33ef + attachment_type: + oneOf: + - $ref: '#/components/schemas/AttachmentTypeEnum' + - type: string + nullable: true + description: |- + The attachment's type. + + * `RESUME` - RESUME + * `COVER_LETTER` - COVER_LETTER + * `OFFER_LETTER` - OFFER_LETTER + * `OTHER` - OTHER + example: RESUME + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + x-merge-expands: '{"ticket": "Ticket"}' + x-merge-category: ats + AttachmentResponse: + type: object + properties: + model: + $ref: '#/components/schemas/Attachment' + warnings: + type: array + items: + $ref: '#/components/schemas/WarningValidationProblem' + errors: + type: array + items: + $ref: '#/components/schemas/ErrorValidationProblem' + logs: + type: array + items: + $ref: '#/components/schemas/DebugModeLog' + required: + - errors + - model + - warnings + x-merge-category: ats + AttachmentTypeEnum: + enum: + - RESUME + - COVER_LETTER + - OFFER_LETTER + - OTHER + type: string + description: |- + * `RESUME` - RESUME + * `COVER_LETTER` - COVER_LETTER + * `OFFER_LETTER` - OFFER_LETTER + * `OTHER` - OTHER + x-merge-category: ats + AuditLogEvent: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + example: b5ceea2a-7171-47ce-8090-165cfce5572c + user_name: + type: string + nullable: true + description: The User's full name at the time of this Event occurring. + maxLength: 200 + example: Gil Feig + user_email: + type: string + format: email + nullable: true + description: The User's email at the time of this Event occurring. + maxLength: 254 + example: hello@merge.dev + role: + oneOf: + - $ref: '#/components/schemas/RoleEnum' + - type: string + description: |- + Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. + + * `ADMIN` - ADMIN + * `DEVELOPER` - DEVELOPER + * `MEMBER` - MEMBER + * `API` - API + * `SYSTEM` - SYSTEM + * `MERGE_TEAM` - MERGE_TEAM + example: ADMIN + ip_address: + type: string + maxLength: 45 + example: 192.0.2.123 + event_type: + oneOf: + - $ref: '#/components/schemas/EventTypeEnum' + - type: string + description: |- + Designates the type of event that occurred. + + * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + * `INVITED_USER` - INVITED_USER + * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + * `CREATED_DESTINATION` - CREATED_DESTINATION + * `DELETED_DESTINATION` - DELETED_DESTINATION + * `CHANGED_DESTINATION` - CHANGED_DESTINATION + * `CHANGED_SCOPES` - CHANGED_SCOPES + * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + * `ENABLED_CATEGORY` - ENABLED_CATEGORY + * `DISABLED_CATEGORY` - DISABLED_CATEGORY + * `CHANGED_PASSWORD` - CHANGED_PASSWORD + * `RESET_PASSWORD` - RESET_PASSWORD + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING + * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING + * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING + * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING + * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + * `MUTED_ISSUE` - MUTED_ISSUE + * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + example: CHANGED_SCOPES + event_description: + type: string + example: Organization-wide Scopes for model hris.Employee updated from Read + to Read+Write + created_at: + type: string + format: date-time + readOnly: true + required: + - event_description + - event_type + - ip_address + - role + x-merge-category: ats + AvailableActions: + type: object + description: |- + # The AvailableActions Object + ### Description + The `Activity` object is used to see all available model/operation combinations for an integration. + + ### Usage Example + Fetch all the actions available for the `Zenefits` integration. + properties: + integration: + $ref: '#/components/schemas/AccountIntegration' + example: + name: Lever + categories: + - ats + image: https://merge-api-production.s3.amazonaws.com/media/Lever_Logo.png + square_image: https://merge-api-production.s3.amazonaws.com/media/Lever_Square_Logo.png + color: '#262A34' + is_in_beta: 'true' + api_endpoints_to_documentation_urls: "{'GET': [('/common-model-scopes', + 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve')], + 'POST': []}" + passthrough_available: + type: boolean + example: true + available_model_operations: + type: array + items: + $ref: '#/components/schemas/ModelOperation' + example: + - model_name: Candidate + available_operations: + - FETCH + - CREATE + required_post_parameters: + - remote_user_id + supported_fields: + - first_name + - last_name + - company + - title + required: + - integration + - passthrough_available + x-merge-category: ats + Candidate: + type: object + description: |- + # The Candidate Object + ### Description + The `Candidate` object is used to represent profile information about a given Candidate. Because it is specific to a Candidate, this information stays constant across applications. + ### Usage Example + Fetch from the `LIST Candidates` endpoint and filter by `ID` to show all candidates. + properties: + id: + type: string + format: uuid + readOnly: true + example: 521b18c2-4d01-4297-b451-19858d07c133 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '21198' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + first_name: + type: string + nullable: true + description: The candidate's first name. + example: Gil + last_name: + type: string + nullable: true + description: The candidate's last name. + example: Feig + company: + type: string + nullable: true + description: The candidate's current company. + example: Columbia Dining App. + title: + type: string + nullable: true + description: The candidate's current title. + example: Software Engineer + remote_created_at: + type: string + format: date-time + nullable: true + description: When the third party's candidate was created. + example: '2021-10-15T00:00:00Z' + remote_updated_at: + type: string + format: date-time + nullable: true + description: When the third party's candidate was updated. + example: '2021-10-16T00:00:00Z' + last_interaction_at: + type: string + format: date-time + nullable: true + description: When the most recent interaction with the candidate occurred. + example: '2021-10-17T00:00:00Z' + is_private: + type: boolean + nullable: true + description: Whether or not the candidate is private. + example: true + can_email: + type: boolean + nullable: true + description: Whether or not the candidate can be emailed. + example: true + locations: + type: array + items: + type: string + nullable: true + description: The candidate's locations. + nullable: true + description: The candidate's locations. + example: + - San Francisco + - New York + - Miami + phone_numbers: + type: array + items: + $ref: '#/components/schemas/PhoneNumber' + example: + - value: '+1234567890' + phone_number_type: MOBILE + email_addresses: + type: array + items: + $ref: '#/components/schemas/EmailAddress' + example: + - value: hello@merge.dev + email_address_type: PERSONAL + urls: + type: array + items: + $ref: '#/components/schemas/Url' + example: + - value: http://alturl.com/p749b + url_type: BLOG + tags: + type: array + items: + type: string + nullable: true + description: The tag's name. + example: + - High-Priority + description: Array of `Tag` names as strings. + applications: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Application' + nullable: true + example: + - 29eb9867-ce2a-403f-b8ce-f2844b89f078 + - b4d08e5c-de00-4d64-a29f-66addac9af99 + - 4ff877d2-fb3e-4a5b-a7a5-168ddf2ffa56 + description: Array of `Application` object IDs. + x-merge-expands-to: Application + attachments: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Attachment' + nullable: true + example: + - bea08964-32b4-4a20-8bb4-2612ba09de1d + description: Array of `Attachment` object IDs. + x-merge-expands-to: Attachment + remote_was_deleted: + type: boolean + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /candidates + data: + - Varies by platform + x-merge-nested-write-allowed: true + x-merge-expands: '{"applications": "Application", "attachments": "Attachment"}' + x-merge-category: ats + CandidateEndpointRequest: + type: object + properties: + model: + $ref: '#/components/schemas/CandidateRequest' + remote_user_id: + type: string + required: + - model + - remote_user_id + x-merge-category: ats + CandidateRequest: + type: object + description: |- + # The Candidate Object + ### Description + The `Candidate` object is used to represent profile information about a given Candidate. Because it is specific to a Candidate, this information stays constant across applications. + ### Usage Example + Fetch from the `LIST Candidates` endpoint and filter by `ID` to show all candidates. + properties: + first_name: + type: string + nullable: true + description: The candidate's first name. + example: Gil + last_name: + type: string + nullable: true + description: The candidate's last name. + example: Feig + company: + type: string + nullable: true + description: The candidate's current company. + example: Columbia Dining App. + title: + type: string + nullable: true + description: The candidate's current title. + example: Software Engineer + last_interaction_at: + type: string + format: date-time + nullable: true + description: When the most recent interaction with the candidate occurred. + example: '2021-10-17T00:00:00Z' + is_private: + type: boolean + nullable: true + description: Whether or not the candidate is private. + example: true + can_email: + type: boolean + nullable: true + description: Whether or not the candidate can be emailed. + example: true + locations: + type: array + items: + type: string + nullable: true + description: The candidate's locations. + nullable: true + description: The candidate's locations. + example: + - San Francisco + - New York + - Miami + phone_numbers: + type: array + items: + $ref: '#/components/schemas/PhoneNumberRequest' + example: + - value: '+1234567890' + phone_number_type: MOBILE + email_addresses: + type: array + items: + $ref: '#/components/schemas/EmailAddressRequest' + example: + - value: hello@merge.dev + email_address_type: PERSONAL + urls: + type: array + items: + $ref: '#/components/schemas/UrlRequest' + example: + - value: http://alturl.com/p749b + url_type: BLOG + tags: + type: array + items: + type: string + nullable: true + description: The tag's name. + example: + - High-Priority + description: Array of `Tag` names as strings. + applications: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Application' + nullable: true + example: + - 29eb9867-ce2a-403f-b8ce-f2844b89f078 + - b4d08e5c-de00-4d64-a29f-66addac9af99 + - 4ff877d2-fb3e-4a5b-a7a5-168ddf2ffa56 + description: Array of `Application` object IDs. + x-merge-expands-to: Application + attachments: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Attachment' + nullable: true + example: + - bea08964-32b4-4a20-8bb4-2612ba09de1d + description: Array of `Attachment` object IDs. + x-merge-expands-to: Attachment + remote_template_id: + type: string + writeOnly: true + nullable: true + minLength: 1 + example: '92830948203' + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + x-merge-expands: '{"applications": "Application", "attachments": "Attachment"}' + x-merge-category: ats + CandidateResponse: + type: object + properties: + model: + $ref: '#/components/schemas/Candidate' + warnings: + type: array + items: + $ref: '#/components/schemas/WarningValidationProblem' + errors: + type: array + items: + $ref: '#/components/schemas/ErrorValidationProblem' + logs: + type: array + items: + $ref: '#/components/schemas/DebugModeLog' + required: + - errors + - model + - warnings + x-merge-category: ats + CategoriesEnum: + enum: + - hris + - ats + - accounting + - ticketing + - crm + - mktg + - filestorage + type: string + description: |- + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + x-merge-category: ats + CategoryEnum: + enum: + - hris + - ats + - accounting + - ticketing + - crm + - mktg + - filestorage + type: string + description: |- + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + x-merge-category: ats + CommonModelScopeAPI: + type: object + properties: + common_models: + type: array + items: + $ref: '#/components/schemas/IndividualCommonModelScopeDeserializer' + description: The common models you want to update the scopes for + example: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - created_at + - custom_fields + - date_of_birth + - first_name + - gender + - remote_created_at + - remote_data + disabled_fields: + - company + - employments + - groups + - home_location + - manager + - work_location + required: + - common_models + x-merge-category: ats + CommonModelScopesBodyRequest: + type: object + properties: + model_id: + type: string + minLength: 1 + example: hris.Employee + enabled_actions: + type: array + items: + $ref: '#/components/schemas/EnabledActionsEnum' + example: + - READ + - WRITE + disabled_fields: + type: array + items: + type: string + minLength: 1 + example: + - first_name + required: + - disabled_fields + - enabled_actions + - model_id + x-merge-category: ats + CreateFieldMappingRequest: + type: object + properties: + target_field_name: + type: string + minLength: 1 + description: The name of the target field you want this remote field to + map to. + example: example_target_field_name + target_field_description: + type: string + minLength: 1 + description: The description of the target field you want this remote field + to map to. + example: this is a example description of the target field + remote_field_traversal_path: + type: array + items: {} + description: The field traversal path of the remote field listed when you + hit the GET /remote-fields endpoint. + example: + - example_remote_field + remote_method: + type: string + minLength: 1 + description: The method of the remote endpoint where the remote field is + coming from. + example: GET + remote_url_path: + type: string + minLength: 1 + description: The path of the remote endpoint where the remote field is coming + from. + example: /example-url-path + common_model_name: + type: string + minLength: 1 + description: The name of the Common Model that the remote field corresponds + to in a given category. + example: ExampleCommonModel + required: + - common_model_name + - remote_field_traversal_path + - remote_method + - remote_url_path + - target_field_description + - target_field_name + x-merge-category: ats + DataPassthroughRequest: + type: object + description: |- + # The DataPassthrough Object + ### Description + The `DataPassthrough` object is used to send information to an otherwise-unsupported third-party endpoint. + + ### Usage Example + Create a `DataPassthrough` to get team hierarchies from your Rippling integration. + properties: + method: + allOf: + - $ref: '#/components/schemas/MethodEnum' + example: POST + path: + type: string + minLength: 1 + description: The path of the request in the third party's platform. + example: /scooters + base_url_override: + type: string + nullable: true + minLength: 1 + description: An optional override of the third party's base url for the + request. + example: https://api.example.com + data: + type: string + nullable: true + minLength: 1 + description: The data with the request. You must include a `request_format` + parameter matching the data's format + example: '{"company": "Lime", "model": "Gen 2.5"}' + multipart_form_data: + type: array + items: + $ref: '#/components/schemas/MultipartFormFieldRequest' + nullable: true + description: Pass an array of `MultipartFormField` objects in here instead + of using the `data` param if `request_format` is set to `MULTIPART`. + headers: + type: object + additionalProperties: {} + nullable: true + description: The headers to use for the request (Merge will handle the account's + authorization headers). `Content-Type` header is required for passthrough. + Choose content type corresponding to expected format of receiving server. + example: + EXTRA-HEADER: value + request_format: + allOf: + - $ref: '#/components/schemas/RequestFormatEnum' + nullable: true + example: JSON + normalize_response: + type: boolean + description: 'Optional. If true, the response will always be an object of + the form `{"type": T, "value": ...}` where `T` will be one of `string, + boolean, number, null, array, object`.' + required: + - method + - path + x-merge-category: ats + DebugModeLog: + type: object + properties: + log_id: + type: string + example: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: + type: string + example: https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + $ref: '#/components/schemas/DebugModelLogSummary' + example: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + required: + - dashboard_view + - log_id + - log_summary + x-merge-sample-json: '{"log_id": "99433219-8017-4acd-bb3c-ceb23d663832", "dashboard_view": + "https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832", "log_summary": + {"url": "www.exampleintegration.com/api/v1/exampleapi", "method": "POST", + "status_code": 200}}' + x-merge-category: ats + DebugModelLogSummary: + type: object + properties: + url: + type: string + example: www.exampleintegration.com/api/v1/exampleapi + method: + type: string + example: POST + status_code: + type: integer + example: 200 + required: + - method + - status_code + - url + x-merge-sample-json: '{"url": "www.exampleintegration.com/api/v1/exampleapi", + "method": "POST", "status_code": 200}' + x-merge-category: ats + Department: + type: object + description: |- + # The Department Object + ### Description + The `Department` object is used to represent a department within a company. + ### Usage Example + Fetch from the `LIST Departments` endpoint and view the departments within a company. + properties: + id: + type: string + format: uuid + readOnly: true + example: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '23456' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + name: + type: string + nullable: true + description: The department's name. + example: Engineering + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /departments + data: + - Varies by platform + x-merge-category: ats + DisabilityStatusEnum: + enum: + - YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY + - NO_I_DONT_HAVE_A_DISABILITY + - I_DONT_WISH_TO_ANSWER + type: string + description: |- + * `YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY` - YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY + * `NO_I_DONT_HAVE_A_DISABILITY` - NO_I_DONT_HAVE_A_DISABILITY + * `I_DONT_WISH_TO_ANSWER` - I_DONT_WISH_TO_ANSWER + x-merge-category: ats + EEOC: + type: object + description: |- + # The EEOC Object + ### Description + The `EEOC` object is used to represent the Equal Employment Opportunity Commission information for a candidate (race, gender, veteran status, disability status). + ### Usage Example + Fetch from the `LIST EEOCs` endpoint and filter by `candidate` to show all EEOC information for a candidate. + properties: + id: + type: string + format: uuid + readOnly: true + example: f7dd7b4f-237e-4772-8bd4-3246384c6c58 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '76' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + candidate: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Candidate' + nullable: true + description: The candidate being represented. + example: f963f34d-3d2f-4f77-b557-cf36bc7e6498 + x-merge-expands-to: Candidate + submitted_at: + type: string + format: date-time + nullable: true + description: When the information was submitted. + example: '2021-10-15T00:00:00Z' + race: + oneOf: + - $ref: '#/components/schemas/RaceEnum' + - type: string + nullable: true + description: |- + The candidate's race. + + * `AMERICAN_INDIAN_OR_ALASKAN_NATIVE` - AMERICAN_INDIAN_OR_ALASKAN_NATIVE + * `ASIAN` - ASIAN + * `BLACK_OR_AFRICAN_AMERICAN` - BLACK_OR_AFRICAN_AMERICAN + * `HISPANIC_OR_LATINO` - HISPANIC_OR_LATINO + * `WHITE` - WHITE + * `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER` - NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER + * `TWO_OR_MORE_RACES` - TWO_OR_MORE_RACES + * `DECLINE_TO_SELF_IDENTIFY` - DECLINE_TO_SELF_IDENTIFY + example: HISPANIC_OR_LATINO + gender: + oneOf: + - $ref: '#/components/schemas/GenderEnum' + - type: string + nullable: true + description: |- + The candidate's gender. + + * `MALE` - MALE + * `FEMALE` - FEMALE + * `NON-BINARY` - NON-BINARY + * `OTHER` - OTHER + * `DECLINE_TO_SELF_IDENTIFY` - DECLINE_TO_SELF_IDENTIFY + example: FEMALE + veteran_status: + oneOf: + - $ref: '#/components/schemas/VeteranStatusEnum' + - type: string + nullable: true + description: |- + The candidate's veteran status. + + * `I_AM_NOT_A_PROTECTED_VETERAN` - I_AM_NOT_A_PROTECTED_VETERAN + * `I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN` - I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN + * `I_DONT_WISH_TO_ANSWER` - I_DONT_WISH_TO_ANSWER + example: I_AM_NOT_A_PROTECTED_VETERAN + disability_status: + oneOf: + - $ref: '#/components/schemas/DisabilityStatusEnum' + - type: string + nullable: true + description: |- + The candidate's disability status. + + * `YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY` - YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY + * `NO_I_DONT_HAVE_A_DISABILITY` - NO_I_DONT_HAVE_A_DISABILITY + * `I_DONT_WISH_TO_ANSWER` - I_DONT_WISH_TO_ANSWER + example: I_DONT_WISH_TO_ANSWER + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /eeoc + data: + - Varies by platform + x-merge-expands: '{"candidate": "Candidate"}' + x-merge-category: ats + EmailAddress: + type: object + description: |- + # The EmailAddress Object + ### Description + The `EmailAddress` object is used to represent a candidate's email address. + ### Usage Example + Fetch from the `GET Candidate` endpoint and view their email addresses. + properties: + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + value: + type: string + format: email + nullable: true + description: The email address. + maxLength: 254 + example: merge_is_hiring@merge.dev + email_address_type: + oneOf: + - $ref: '#/components/schemas/EmailAddressTypeEnum' + - type: string + nullable: true + description: |- + The type of email address. + + * `PERSONAL` - PERSONAL + * `WORK` - WORK + * `OTHER` - OTHER + example: PERSONAL + remote_was_deleted: + type: boolean + readOnly: true + description: 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/). + x-merge-nested-write-allowed: true + x-merge-category: ats + EmailAddressRequest: + type: object + description: |- + # The EmailAddress Object + ### Description + The `EmailAddress` object is used to represent a candidate's email address. + ### Usage Example + Fetch from the `GET Candidate` endpoint and view their email addresses. + properties: + value: + type: string + format: email + nullable: true + description: The email address. + maxLength: 254 + example: merge_is_hiring@merge.dev + email_address_type: + oneOf: + - $ref: '#/components/schemas/EmailAddressTypeEnum' + - type: string + nullable: true + description: |- + The type of email address. + + * `PERSONAL` - PERSONAL + * `WORK` - WORK + * `OTHER` - OTHER + example: PERSONAL + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + x-merge-category: ats + EmailAddressTypeEnum: + enum: + - PERSONAL + - WORK + - OTHER + type: string + description: |- + * `PERSONAL` - PERSONAL + * `WORK` - WORK + * `OTHER` - OTHER + x-merge-category: ats + EnabledActionsEnum: + enum: + - READ + - WRITE + type: string + description: |- + * `READ` - READ + * `WRITE` - WRITE + x-merge-category: ats + EncodingEnum: + enum: + - RAW + - BASE64 + - GZIP_BASE64 + type: string + description: |- + * `RAW` - RAW + * `BASE64` - BASE64 + * `GZIP_BASE64` - GZIP_BASE64 + x-merge-category: ats + EndUserDetailsRequest: + type: object + properties: + end_user_email_address: + type: string + minLength: 1 + description: Your end user's email address. This is purely for identification + purposes - setting this value will not cause any emails to be sent. + maxLength: 100 + example: example@gmail.com + end_user_organization_name: + type: string + minLength: 1 + description: Your end user's organization. + maxLength: 100 + example: Test Organization + end_user_origin_id: + type: string + minLength: 1 + description: 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. + maxLength: 100 + example: '12345' + categories: + type: array + items: + $ref: '#/components/schemas/CategoriesEnum' + description: The integration categories to show in Merge Link. + example: + - hris + - ats + integration: + type: string + nullable: true + minLength: 1 + description: 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/. + example: bamboohr + link_expiry_mins: + type: integer + maximum: 10080 + minimum: 30 + default: 30 + description: An integer number of minutes between [30, 720 or 10080 if for + a Magic Link URL] for how long this token is valid. Defaults to 30. + should_create_magic_link_url: + type: boolean + nullable: true + default: false + description: Whether to generate a Magic Link URL. Defaults to false. For + more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. + hide_admin_magic_link: + type: boolean + nullable: true + default: false + description: 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: + type: array + items: + $ref: '#/components/schemas/CommonModelScopesBodyRequest' + nullable: true + description: An array of objects to specify the models and fields that will + be disabled for a given Linked Account. Each object uses model_id, enabled_actions, + and disabled_fields to specify the model, method, and fields that are + scoped for a given Linked Account. + category_common_model_scopes: + type: object + additionalProperties: + type: array + items: + $ref: '#/components/schemas/IndividualCommonModelScopeDeserializerRequest' + nullable: true + description: 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. + example: + hris: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: true + field_permissions: + enabled_fields: + - first_name + - last_name + - personal_email + disabled_fields: + - preferred_name + - model_name: Employment + model_permissions: + READ: + is_enabled: false + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - effective_date + ats: + - model_name: Job + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: true + field_permissions: + enabled_fields: + - name + disabled_fields: + - description + - model_name: Department + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: true + language: + oneOf: + - $ref: '#/components/schemas/LanguageEnum' + - type: string + nullable: true + description: |- + The following subset of IETF language tags can be used to configure localization. + + * `en` - en + * `de` - de + example: en + are_syncs_disabled: + type: boolean + nullable: true + default: false + description: The boolean that indicates whether initial, periodic, and force + syncs will be disabled. + integration_specific_config: + type: object + additionalProperties: {} + nullable: true + description: A JSON object containing integration-specific configuration + options. + example: + rippling: + oauth_code: 3h1jj8ssdf31dfji3o1jjdfjasd + required: + - categories + - end_user_email_address + - end_user_organization_name + - end_user_origin_id + x-merge-category: ats + ErrorValidationProblem: + type: object + properties: + source: + $ref: '#/components/schemas/ValidationProblemSource' + example: + pointer: /model/custom_fields + title: + type: string + example: Missing Required Field + detail: + type: string + example: custom_fields is a required field on model. + problem_type: + type: string + example: MISSING_REQUIRED_FIELD + required: + - detail + - problem_type + - title + x-merge-category: ats + EventTypeEnum: + enum: + - 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 + type: string + description: |- + * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + * `INVITED_USER` - INVITED_USER + * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + * `CREATED_DESTINATION` - CREATED_DESTINATION + * `DELETED_DESTINATION` - DELETED_DESTINATION + * `CHANGED_DESTINATION` - CHANGED_DESTINATION + * `CHANGED_SCOPES` - CHANGED_SCOPES + * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + * `ENABLED_CATEGORY` - ENABLED_CATEGORY + * `DISABLED_CATEGORY` - DISABLED_CATEGORY + * `CHANGED_PASSWORD` - CHANGED_PASSWORD + * `RESET_PASSWORD` - RESET_PASSWORD + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING + * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING + * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING + * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING + * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + * `MUTED_ISSUE` - MUTED_ISSUE + * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + x-merge-category: ats + ExternalTargetFieldAPI: + type: object + properties: + name: + type: string + nullable: true + readOnly: true + example: example_target_field_name + description: + type: string + nullable: true + readOnly: true + example: this is a example description of a target field + is_mapped: + type: string + nullable: true + readOnly: true + example: true + x-merge-category: ats + ExternalTargetFieldAPIResponse: + type: object + properties: + Activity: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + Application: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + Attachment: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + Candidate: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + Department: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + EEOC: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + ScheduledInterview: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + Job: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + JobPosting: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + JobInterviewStage: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + Offer: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + Office: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + RejectReason: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + Scorecard: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + Tag: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + RemoteUser: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + x-merge-category: ats + FieldMappingApiInstance: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: + type: boolean + readOnly: true + target_field: + type: object + properties: + name: + type: string + description: + type: string + is_organization_wide: + type: boolean + required: + - description + - is_organization_wide + - name + nullable: true + readOnly: true + example: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + type: object + properties: + remote_key_name: + type: string + nullable: true + schema: + type: object + additionalProperties: {} + nullable: true + remote_endpoint_info: + type: object + properties: + method: + type: string + nullable: true + url_path: + type: string + nullable: true + field_traversal_path: + type: array + items: + type: string + nullable: true + required: + - field_traversal_path + - method + - url_path + required: + - remote_endpoint_info + - remote_key_name + - schema + nullable: true + readOnly: true + example: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + x-merge-category: ats + FieldMappingApiInstanceResponse: + type: object + properties: + Activity: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + Application: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + Attachment: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + Candidate: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + Department: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + EEOC: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + ScheduledInterview: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + Job: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + JobPosting: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + JobInterviewStage: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + Offer: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + Office: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + RejectReason: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + Scorecard: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + Tag: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + RemoteUser: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + x-merge-category: ats + FieldMappingInstanceResponse: + type: object + properties: + model: + $ref: '#/components/schemas/FieldMappingApiInstance' + warnings: + type: array + items: + $ref: '#/components/schemas/WarningValidationProblem' + errors: + type: array + items: + $ref: '#/components/schemas/ErrorValidationProblem' + logs: + type: array + items: + $ref: '#/components/schemas/DebugModeLog' + required: + - errors + - model + - warnings + x-merge-category: ats + FieldPermissionDeserializer: + type: object + properties: + enabled_fields: + type: array + items: {} + disabled_fields: + type: array + items: {} + x-merge-category: ats + FieldPermissionDeserializerRequest: + type: object + properties: + enabled_fields: + type: array + items: {} + disabled_fields: + type: array + items: {} + x-merge-category: ats + GenderEnum: + enum: + - MALE + - FEMALE + - NON-BINARY + - OTHER + - DECLINE_TO_SELF_IDENTIFY + type: string + description: |- + * `MALE` - MALE + * `FEMALE` - FEMALE + * `NON-BINARY` - NON-BINARY + * `OTHER` - OTHER + * `DECLINE_TO_SELF_IDENTIFY` - DECLINE_TO_SELF_IDENTIFY + x-merge-category: ats + GenerateRemoteKeyRequest: + type: object + description: |- + # The GenerateRemoteKey Object + ### Description + The `GenerateRemoteKey` object is used to represent a request for a new remote key. + + ### Usage Example + Post a `GenerateRemoteKey` to create a new remote key. + properties: + name: + type: string + minLength: 1 + description: The name of the remote key + example: Remote Deployment Key 1 + required: + - name + x-merge-category: ats + IgnoreCommonModelRequest: + type: object + properties: + reason: + oneOf: + - $ref: '#/components/schemas/ReasonEnum' + - type: string + example: GENERAL_CUSTOMER_REQUEST + message: + type: string + minLength: 1 + maxLength: 256 + example: deletion request by user id 51903790-7dfe-4053-8d63-5a10cc4ffd39 + required: + - reason + x-merge-category: ats + IndividualCommonModelScopeDeserializer: + type: object + properties: + model_name: + type: string + model_permissions: + type: object + additionalProperties: + $ref: '#/components/schemas/ModelPermissionDeserializer' + field_permissions: + $ref: '#/components/schemas/FieldPermissionDeserializer' + required: + - model_name + x-merge-category: ats + IndividualCommonModelScopeDeserializerRequest: + type: object + properties: + model_name: + type: string + minLength: 1 + model_permissions: + type: object + additionalProperties: + $ref: '#/components/schemas/ModelPermissionDeserializerRequest' + field_permissions: + $ref: '#/components/schemas/FieldPermissionDeserializerRequest' + required: + - model_name + x-merge-category: ats + Issue: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + status: + oneOf: + - $ref: '#/components/schemas/IssueStatusEnum' + - type: string + description: |- + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + example: ONGOING + error_description: + type: string + example: Missing Permissions + end_user: + type: object + additionalProperties: {} + readOnly: true + example: b82302de-852e-4e60-b050-edf9da3b7c02 + first_incident_time: + type: string + format: date-time + nullable: true + example: '2022-12-05T16:19:15.161Z' + last_incident_time: + type: string + format: date-time + nullable: true + example: '2022-12-05T16:19:15.161Z' + is_muted: + type: boolean + readOnly: true + example: true + error_details: + type: array + items: + type: string + readOnly: true + example: + - Missing employee permissions. + - Missing time off permissions. + required: + - error_description + x-merge-category: ats + IssueStatusEnum: + enum: + - ONGOING + - RESOLVED + type: string + description: |- + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + x-merge-category: ats + Job: + type: object + description: |- + # The Job Object + ### Description + The `Job` object can be used to track any jobs that are currently or will be open/closed for applications. + ### Usage Example + Fetch from the `LIST Jobs` endpoint to show all job postings. + properties: + id: + type: string + format: uuid + readOnly: true + example: 022a2bef-57e5-4def-8ed2-7c41bd9a5ed8 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '8765432' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + name: + type: string + nullable: true + description: The job's name. + example: Software Engineer (Merge is actually hiring btw) + description: + type: string + nullable: true + description: The job's description. + example: If you're reading this documentation, you might be a good fit + for Merge! + code: + type: string + nullable: true + description: The job's code. Typically an additional identifier used to + reference the particular job that is displayed on the ATS. + example: C0025 + status: + oneOf: + - $ref: '#/components/schemas/JobStatusEnum' + - type: string + nullable: true + description: |- + The job's status. + + * `OPEN` - OPEN + * `CLOSED` - CLOSED + * `DRAFT` - DRAFT + * `ARCHIVED` - ARCHIVED + * `PENDING` - PENDING + example: OPEN + type: + oneOf: + - $ref: '#/components/schemas/JobTypeEnum' + - type: string + nullable: true + description: |- + The job's type. + + * `POSTING` - POSTING + * `REQUISITION` - REQUISITION + * `PROFILE` - PROFILE + example: POSTING + job_postings: + type: array + items: + type: string + format: uuid + nullable: true + example: + - 2r3c1341-a20f-4e51-b72c-f3830a16c97b + - 543ed912-33ec-444e-a215-8d71cc42fc12 + description: IDs of `JobPosting` objects that serve as job postings for + this `Job`. + x-merge-expands-to: JobPosting + job_posting_urls: + type: array + items: + $ref: '#/components/schemas/Url' + example: + - value: https://merge.dev/careers + url_type: JOB_POSTING + remote_created_at: + type: string + format: date-time + nullable: true + description: When the third party's job was created. + example: '2021-10-15T00:00:00Z' + remote_updated_at: + type: string + format: date-time + nullable: true + description: When the third party's job was updated. + example: '2021-10-16T00:00:00Z' + confidential: + type: boolean + nullable: true + description: Whether the job is confidential. + example: true + departments: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Department' + nullable: true + example: + - 5b3c1341-a20f-4e51-b72c-f3830a16c97b + - d6e687d6-0c36-48a1-8114-35324b5cb38f + description: IDs of `Department` objects for this `Job`. + x-merge-expands-to: Department + offices: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Office' + nullable: true + example: + - 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 + description: IDs of `Office` objects for this `Job`. + x-merge-expands-to: Office + hiring_managers: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/RemoteUser' + nullable: true + example: + - 787ed912-33ec-444e-a215-8d71cc42fc12 + description: IDs of `RemoteUser` objects that serve as hiring managers for + this `Job`. + x-merge-expands-to: RemoteUser + recruiters: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/RemoteUser' + nullable: true + example: + - 787ed912-33ec-444e-a215-8d71cc42fc12 + description: IDs of `RemoteUser` objects that serve as recruiters for this + `Job`. + x-merge-expands-to: RemoteUser + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /positions + data: + - Varies by platform + x-merge-sample-json: "{\"id\": \"022a2bef-57e5-4def-8ed2-7c41bd9a5ed8\", \"\ + remote_id\": \"8765432\", \"name\": \"Software Engineer (Merge is actually + hiring btw)\", \"description\": \"If you're reading this documentation, + you might be a good fit for Merge!\", \"code\": \"C0025\", \"status\" + : \"OPEN\", \"job_posting_urls\": [{\"value\": \"https://merge.dev/careers\"\ + , \"url_type\": \"JOB_POSTING\"}], \"remote_created_at\": \"2021-10-15T00:00:00Z\"\ + , \"remote_updated_at\": \"2021-10-16T00:00:00Z\", \"confidential\": true, + \"departments\": [\"5b3c1341-a20f-4e51-b72c-f3830a16c97b\", \"d6e687d6-0c36-48a1-8114-35324b5cb38f\"\ + ], \"offices\": [\"9871b4a9-f5d2-4f3b-a66b-dfedbed42c46\"], \"hiring_managers\"\ + : [\"787ed912-33ec-444e-a215-8d71cc42fc12\"], \"remote_data\": [{\"path\" + : \"/positions\", \"data\": {\"example\": \"Varies by platform\"}}]}" + x-merge-expands: '{"departments": "Department", "hiring_managers": "RemoteUser", + "job_postings": "JobPosting", "offices": "Office", "recruiters": "RemoteUser"}' + x-merge-category: ats + JobInterviewStage: + type: object + description: |- + # The JobInterviewStage Object + ### Description + The `JobInterviewStage` object is used to represent a particular recruiting stage for an `Application`. A given `Application` typically has the `JobInterviewStage` object represented in the current_stage field. + ### Usage Example + Fetch from the `LIST JobInterviewStages` endpoint and view the job interview stages used by a company. + properties: + id: + type: string + format: uuid + readOnly: true + example: f9813dd5-e70b-484c-91d8-00acd6065b07 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '876556788' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + name: + type: string + nullable: true + description: Standard stage names are offered by ATS systems but can be + modified by users. + example: Phone Screen + job: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Job' + nullable: true + description: This field is populated only if the stage is specific to a + particular job. If the stage is generic, this field will not be populated. + example: ba7d9648-5316-4a80-8d73-4e636cef5a90 + x-merge-expands-to: Job + stage_order: + type: integer + maximum: 2147483647 + minimum: -2147483648 + nullable: true + description: The stage’s order, with the lowest values ordered first. If + the third-party does not return details on the order of stages, this field + will not be populated. + example: 2 + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /interview-stages + data: + - Varies by platform + x-merge-expands: '{"job": "Job"}' + x-merge-category: ats + JobPosting: + type: object + description: |- + # The JobPosting Object + ### Description + The `JobPosting` object represents an external announcement on a job board created by an organization to attract qualified candidates to apply for a specific `Job` opening + ### Usage Example + Fetch from the `LIST JobPostings` endpoint to show all job postings. + properties: + id: + type: string + format: uuid + readOnly: true + example: 156a2bef-57e5-4def-8ed2-7c41bd9a554t + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '1341324' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + title: + type: string + nullable: true + description: The job posting’s title. + example: Platform - NYC + job_posting_urls: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Url' + example: + - value: https://merge.dev/careers + url_type: JOB_POSTING + description: The Url object is used to represent hyperlinks for a candidate + to apply to a given job. + job: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Job' + nullable: true + description: ID of `Job` object for this `JobPosting`. + example: 022a2bef-57e5-4def-8ed2-7c41bd9a5ed8 + x-merge-expands-to: Job + status: + oneOf: + - $ref: '#/components/schemas/JobPostingStatusEnum' + - type: string + nullable: true + description: |- + The job posting's status. + + * `PUBLISHED` - PUBLISHED + * `CLOSED` - CLOSED + * `DRAFT` - DRAFT + * `INTERNAL` - INTERNAL + * `PENDING` - PENDING + example: PUBLISHED + content: + type: string + nullable: true + description: The job posting’s content. + example: Apply at https://merge.dev/careers + remote_created_at: + type: string + format: date-time + nullable: true + description: When the third party's job posting was created. + example: '2021-10-15T00:00:00Z' + remote_updated_at: + type: string + format: date-time + nullable: true + description: When the third party's job posting was updated. + example: '2021-10-16T00:00:00Z' + is_internal: + type: boolean + nullable: true + description: Indicates whether the job posting is internal or external. + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /positions + data: + - Varies by platform + x-merge-expands: '{"job": "Job"}' + x-merge-category: ats + JobPostingStatusEnum: + enum: + - PUBLISHED + - CLOSED + - DRAFT + - INTERNAL + - PENDING + type: string + description: |- + * `PUBLISHED` - PUBLISHED + * `CLOSED` - CLOSED + * `DRAFT` - DRAFT + * `INTERNAL` - INTERNAL + * `PENDING` - PENDING + x-merge-category: ats + JobStatusEnum: + enum: + - OPEN + - CLOSED + - DRAFT + - ARCHIVED + - PENDING + type: string + description: |- + * `OPEN` - OPEN + * `CLOSED` - CLOSED + * `DRAFT` - DRAFT + * `ARCHIVED` - ARCHIVED + * `PENDING` - PENDING + x-merge-category: ats + JobTypeEnum: + enum: + - POSTING + - REQUISITION + - PROFILE + type: string + description: |- + * `POSTING` - POSTING + * `REQUISITION` - REQUISITION + * `PROFILE` - PROFILE + x-merge-category: ats + LanguageEnum: + enum: + - en + - de + type: string + description: |- + * `en` - en + * `de` - de + x-merge-category: ats + LastSyncResultEnum: + enum: + - SYNCING + - DONE + - FAILED + - DISABLED + - PAUSED + - PARTIALLY_SYNCED + type: string + description: |- + * `SYNCING` - SYNCING + * `DONE` - DONE + * `FAILED` - FAILED + * `DISABLED` - DISABLED + * `PAUSED` - PAUSED + * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED + x-merge-category: ats + LinkToken: + type: object + properties: + link_token: + type: string + example: necdP7FtdASl1fQwm62be2_dM4wBG8_GactqoUV0 + integration_name: + type: string + example: Lever + magic_link_url: + type: string + example: https://link.merge.dev/asdfjkl12345jsndfgi2i83n + required: + - link_token + x-merge-category: ats + LinkedAccountCommonModelScopeDeserializerRequest: + type: object + properties: + common_models: + type: array + items: + $ref: '#/components/schemas/IndividualCommonModelScopeDeserializerRequest' + description: The common models you want to update the scopes for + example: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - home_location + disabled_fields: + - work_location + - model_name: Benefit + model_permissions: + WRITE: + is_enabled: false + required: + - common_models + x-merge-category: ats + LinkedAccountStatus: + type: object + properties: + linked_account_status: + type: string + can_make_request: + type: boolean + required: + - can_make_request + - linked_account_status + x-merge-category: ats + MetaResponse: + type: object + properties: + request_schema: + type: object + additionalProperties: {} + example: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + type: object + additionalProperties: {} + status: + $ref: '#/components/schemas/LinkedAccountStatus' + example: + linked_account_status: COMPLETE + can_make_request: true + has_conditional_params: + type: boolean + has_required_linked_account_params: + type: boolean + required: + - has_conditional_params + - has_required_linked_account_params + - request_schema + x-merge-category: ats + MethodEnum: + enum: + - GET + - OPTIONS + - HEAD + - POST + - PUT + - PATCH + - DELETE + type: string + description: |- + * `GET` - GET + * `OPTIONS` - OPTIONS + * `HEAD` - HEAD + * `POST` - POST + * `PUT` - PUT + * `PATCH` - PATCH + * `DELETE` - DELETE + x-merge-category: ats + ModelOperation: + type: object + description: |- + # The ModelOperation Object + ### Description + The `ModelOperation` object is used to represent the operations that are currently supported for a given model. + + ### Usage Example + View what operations are supported for the `Candidate` endpoint. + properties: + model_name: + type: string + example: Candidate + available_operations: + type: array + items: + type: string + example: + - FETCH + - CREATE + required_post_parameters: + type: array + items: + type: string + example: + - remote_user_id + supported_fields: + type: array + items: + type: string + example: + - first_name + - last_name + - company + - title + required: + - available_operations + - model_name + - required_post_parameters + - supported_fields + x-merge-category: ats + ModelPermissionDeserializer: + type: object + properties: + is_enabled: + type: boolean + x-merge-category: ats + ModelPermissionDeserializerRequest: + type: object + properties: + is_enabled: + type: boolean + x-merge-category: ats + MultipartFormFieldRequest: + type: object + description: |- + # The MultipartFormField Object + ### Description + The `MultipartFormField` object is used to represent fields in an HTTP request using `multipart/form-data`. + + ### Usage Example + Create a `MultipartFormField` to define a multipart form entry. + properties: + name: + type: string + minLength: 1 + description: The name of the form field + example: resume + data: + type: string + minLength: 1 + description: The data for the form field. + example: SW50ZWdyYXRlIGZhc3QKSW50ZWdyYXRlIG9uY2U= + encoding: + oneOf: + - $ref: '#/components/schemas/EncodingEnum' + - type: string + nullable: true + default: RAW + description: |- + The encoding of the value of `data`. Defaults to `RAW` if not defined. + + * `RAW` - RAW + * `BASE64` - BASE64 + * `GZIP_BASE64` - GZIP_BASE64 + example: BASE64 + file_name: + type: string + nullable: true + minLength: 1 + description: The file name of the form field, if the field is for a file. + example: resume.pdf + content_type: + type: string + nullable: true + minLength: 1 + description: The MIME type of the file, if the field is for a file. + example: application/pdf + required: + - data + - name + x-merge-category: ats + Offer: + type: object + description: |- + # The Offer Object + ### Description + The `Offer` object is used to represent an offer for a candidate's application specific to a job. + ### Usage Example + Fetch from the `LIST Offers` endpoint and filter by `ID` to show all offers. + properties: + id: + type: string + format: uuid + readOnly: true + example: dd85625c-6a59-446f-a317-6de64d83bae7 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '9876' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + application: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Application' + nullable: true + description: The application who is receiving the offer. + example: 2872ba14-4084-492b-be96-e5eee6fc33ef + x-merge-expands-to: Application + creator: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/RemoteUser' + nullable: true + description: The user who created the offer. + example: 52bf9b5e-0beb-4f6f-8a72-cd4dca7ca633 + x-merge-expands-to: RemoteUser + remote_created_at: + type: string + format: date-time + nullable: true + description: When the third party's offer was created. + example: '2021-10-15T00:00:00Z' + closed_at: + type: string + format: date-time + nullable: true + description: When the offer was closed. + example: '2021-10-16T00:00:00Z' + sent_at: + type: string + format: date-time + nullable: true + description: When the offer was sent. + example: '2021-10-15T00:00:00Z' + start_date: + type: string + format: date-time + nullable: true + description: The employment start date on the offer. + example: '2021-11-15T00:00:00Z' + status: + oneOf: + - $ref: '#/components/schemas/OfferStatusEnum' + - type: string + nullable: true + description: |- + The offer's status. + + * `DRAFT` - DRAFT + * `APPROVAL-SENT` - APPROVAL-SENT + * `APPROVED` - APPROVED + * `SENT` - SENT + * `SENT-MANUALLY` - SENT-MANUALLY + * `OPENED` - OPENED + * `DENIED` - DENIED + * `SIGNED` - SIGNED + * `DEPRECATED` - DEPRECATED + example: SENT + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /offers + data: + - Varies by platform + x-merge-expands: '{"application": "Application", "creator": "RemoteUser"}' + x-merge-category: ats + OfferStatusEnum: + enum: + - DRAFT + - APPROVAL-SENT + - APPROVED + - SENT + - SENT-MANUALLY + - OPENED + - DENIED + - SIGNED + - DEPRECATED + type: string + description: |- + * `DRAFT` - DRAFT + * `APPROVAL-SENT` - APPROVAL-SENT + * `APPROVED` - APPROVED + * `SENT` - SENT + * `SENT-MANUALLY` - SENT-MANUALLY + * `OPENED` - OPENED + * `DENIED` - DENIED + * `SIGNED` - SIGNED + * `DEPRECATED` - DEPRECATED + x-merge-category: ats + Office: + type: object + description: |- + # The Office Object + ### Description + The `Office` object is used to represent an office within a company. A given `Job` has the `Office` ID in its offices field. + ### Usage Example + Fetch from the `LIST Offices` endpoint and view the offices within a company. + properties: + id: + type: string + format: uuid + readOnly: true + example: 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '876556788' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + name: + type: string + nullable: true + description: The office's name. + example: SF Office + location: + type: string + nullable: true + description: The office's location. + example: Embarcadero Center 2 + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /locations + data: + - Varies by platform + x-merge-sample-json: '{"id": "9871b4a9-f5d2-4f3b-a66b-dfedbed42c46", "remote_id": + "876556788", "name": "SF Office", "location": "Embarcadero Center 2", "remote_data": + [{"path": "/locations", "data": {"example": "Varies by platform"}}]}' + x-merge-category: ats + OverallRecommendationEnum: + enum: + - DEFINITELY_NO + - NO + - YES + - STRONG_YES + - NO_DECISION + type: string + description: |- + * `DEFINITELY_NO` - DEFINITELY_NO + * `NO` - NO + * `YES` - YES + * `STRONG_YES` - STRONG_YES + * `NO_DECISION` - NO_DECISION + x-merge-category: ats + PaginatedAccountDetailsAndActionsList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/AccountDetailsAndActions' + x-merge-category: ats + PaginatedActivityList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Activity' + x-merge-category: ats + PaginatedApplicationList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Application' + x-merge-category: ats + PaginatedAttachmentList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Attachment' + x-merge-category: ats + PaginatedAuditLogEventList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/AuditLogEvent' + x-merge-category: ats + PaginatedCandidateList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Candidate' + x-merge-category: ats + PaginatedDepartmentList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Department' + x-merge-category: ats + PaginatedEEOCList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/EEOC' + x-merge-category: ats + PaginatedIssueList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Issue' + x-merge-category: ats + PaginatedJobInterviewStageList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/JobInterviewStage' + x-merge-category: ats + PaginatedJobList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Job' + x-merge-category: ats + PaginatedJobPostingList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/JobPosting' + x-merge-category: ats + PaginatedOfferList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Offer' + x-merge-category: ats + PaginatedOfficeList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Office' + x-merge-category: ats + PaginatedRejectReasonList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/RejectReason' + x-merge-category: ats + PaginatedRemoteUserList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/RemoteUser' + x-merge-category: ats + PaginatedScheduledInterviewList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/ScheduledInterview' + x-merge-category: ats + PaginatedScorecardList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Scorecard' + x-merge-category: ats + PaginatedScreeningQuestionList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/ScreeningQuestion' + x-merge-category: ats + PaginatedSyncStatusList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/SyncStatus' + x-merge-category: ats + PaginatedTagList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Tag' + x-merge-category: ats + PatchedCandidateEndpointRequest: + type: object + properties: + model: + $ref: '#/components/schemas/PatchedCandidateRequest' + remote_user_id: + type: string + required: + - model + - remote_user_id + x-merge-category: ats + PatchedCandidateRequest: + type: object + description: |- + # The Candidate Object + ### Description + The `Candidate` object is used to represent profile information about a given Candidate. Because it is specific to a Candidate, this information stays constant across applications. + ### Usage Example + Fetch from the `LIST Candidates` endpoint and filter by `ID` to show all candidates. + properties: + first_name: + type: string + nullable: true + description: The candidate's first name. + example: Gil + last_name: + type: string + nullable: true + description: The candidate's last name. + example: Feig + company: + type: string + nullable: true + description: The candidate's current company. + example: Columbia Dining App. + title: + type: string + nullable: true + description: The candidate's current title. + example: Software Engineer + last_interaction_at: + type: string + format: date-time + nullable: true + description: When the most recent interaction with the candidate occurred. + example: '2021-10-17T00:00:00Z' + is_private: + type: boolean + nullable: true + description: Whether or not the candidate is private. + example: true + can_email: + type: boolean + nullable: true + description: Whether or not the candidate can be emailed. + example: true + locations: + type: array + items: + type: string + nullable: true + description: The candidate's locations. + nullable: true + description: The candidate's locations. + example: + - San Francisco + - New York + - Miami + phone_numbers: + type: array + items: + $ref: '#/components/schemas/PhoneNumberRequest' + example: + - value: '+1234567890' + phone_number_type: MOBILE + email_addresses: + type: array + items: + $ref: '#/components/schemas/EmailAddressRequest' + example: + - value: hello@merge.dev + email_address_type: PERSONAL + urls: + type: array + items: + $ref: '#/components/schemas/UrlRequest' + example: + - value: http://alturl.com/p749b + url_type: BLOG + tags: + type: array + items: + type: string + nullable: true + description: The tag's name. + example: + - High-Priority + description: Array of `Tag` names as strings. + applications: + type: array + items: + type: string + format: uuid + nullable: true + example: + - 29eb9867-ce2a-403f-b8ce-f2844b89f078 + - b4d08e5c-de00-4d64-a29f-66addac9af99 + - 4ff877d2-fb3e-4a5b-a7a5-168ddf2ffa56 + description: Array of `Application` object IDs. + attachments: + type: array + items: + type: string + format: uuid + nullable: true + example: + - bea08964-32b4-4a20-8bb4-2612ba09de1d + description: Array of `Attachment` object IDs. + remote_template_id: + type: string + writeOnly: true + nullable: true + minLength: 1 + example: '92830948203' + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + x-merge-category: ats + PatchedEditFieldMappingRequest: + type: object + properties: + remote_field_traversal_path: + type: array + items: {} + description: The field traversal path of the remote field listed when you + hit the GET /remote-fields endpoint. + example: + - example_remote_field_name + remote_method: + type: string + minLength: 1 + description: The method of the remote endpoint where the remote field is + coming from. + example: GET + remote_url_path: + type: string + minLength: 1 + description: The path of the remote endpoint where the remote field is coming + from. + example: /example-url-path + x-merge-category: ats + PhoneNumber: + type: object + description: |- + # The PhoneNumber Object + ### Description + The `PhoneNumber` object is used to represent a candidate's phone number. + ### Usage Example + Fetch from the `GET Candidate` endpoint and view their phone numbers. + properties: + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + value: + type: string + nullable: true + description: The phone number. + example: '+3198675309' + phone_number_type: + oneOf: + - $ref: '#/components/schemas/PhoneNumberTypeEnum' + - type: string + nullable: true + description: |- + The type of phone number. + + * `HOME` - HOME + * `WORK` - WORK + * `MOBILE` - MOBILE + * `SKYPE` - SKYPE + * `OTHER` - OTHER + example: HOME + remote_was_deleted: + type: boolean + readOnly: true + description: 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/). + x-merge-nested-write-allowed: true + x-merge-category: ats + PhoneNumberRequest: + type: object + description: |- + # The PhoneNumber Object + ### Description + The `PhoneNumber` object is used to represent a candidate's phone number. + ### Usage Example + Fetch from the `GET Candidate` endpoint and view their phone numbers. + properties: + value: + type: string + nullable: true + description: The phone number. + example: '+3198675309' + phone_number_type: + oneOf: + - $ref: '#/components/schemas/PhoneNumberTypeEnum' + - type: string + nullable: true + description: |- + The type of phone number. + + * `HOME` - HOME + * `WORK` - WORK + * `MOBILE` - MOBILE + * `SKYPE` - SKYPE + * `OTHER` - OTHER + example: HOME + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + x-merge-category: ats + PhoneNumberTypeEnum: + enum: + - HOME + - WORK + - MOBILE + - SKYPE + - OTHER + type: string + description: |- + * `HOME` - HOME + * `WORK` - WORK + * `MOBILE` - MOBILE + * `SKYPE` - SKYPE + * `OTHER` - OTHER + x-merge-category: ats + RaceEnum: + enum: + - AMERICAN_INDIAN_OR_ALASKAN_NATIVE + - ASIAN + - BLACK_OR_AFRICAN_AMERICAN + - HISPANIC_OR_LATINO + - WHITE + - NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER + - TWO_OR_MORE_RACES + - DECLINE_TO_SELF_IDENTIFY + type: string + description: |- + * `AMERICAN_INDIAN_OR_ALASKAN_NATIVE` - AMERICAN_INDIAN_OR_ALASKAN_NATIVE + * `ASIAN` - ASIAN + * `BLACK_OR_AFRICAN_AMERICAN` - BLACK_OR_AFRICAN_AMERICAN + * `HISPANIC_OR_LATINO` - HISPANIC_OR_LATINO + * `WHITE` - WHITE + * `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER` - NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER + * `TWO_OR_MORE_RACES` - TWO_OR_MORE_RACES + * `DECLINE_TO_SELF_IDENTIFY` - DECLINE_TO_SELF_IDENTIFY + x-merge-category: ats + ReasonEnum: + enum: + - GENERAL_CUSTOMER_REQUEST + - GDPR + - OTHER + type: string + description: |- + * `GENERAL_CUSTOMER_REQUEST` - GENERAL_CUSTOMER_REQUEST + * `GDPR` - GDPR + * `OTHER` - OTHER + x-merge-category: ats + RejectReason: + type: object + description: |- + # The RejectReason Object + ### Description + The `RejectReason` object is used to represent a reason for rejecting an application. These can typically be configured within an ATS system. + ### Usage Example + Fetch from the `LIST RejectReasons` endpoint and filter by `ID` to show all reasons. + properties: + id: + type: string + format: uuid + readOnly: true + example: 8be99a4a-f8d4-4339-bf1e-30eac970e217 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '876556788' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + name: + type: string + nullable: true + description: The rejection reason’s name. + example: Not passionate enough about APIs. + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /rejection-reasons + data: + - Varies by platform + x-merge-category: ats + RemoteData: + type: object + description: |- + # The RemoteData Object + ### Description + The `RemoteData` object is used to represent the full data pulled from the third-party API for an object. + + ### Usage Example + TODO + properties: + path: + type: string + description: The third-party API path that is being called. + example: /platform-endpoint + data: + readOnly: true + description: The data returned from the third-party for this object in its + original, unnormalized format. + example: + - Varies by platform + required: + - path + x-merge-category: ats + RemoteEndpointInfo: + type: object + properties: + method: + type: string + example: GET + url_path: + type: string + example: /example-url-path + field_traversal_path: + type: array + items: {} + example: + - example_key_name + required: + - field_traversal_path + - method + - url_path + x-merge-category: ats + RemoteFieldAPI: + type: object + properties: + schema: + type: object + additionalProperties: {} + example: + type: string + remote_key_name: + type: string + example: example_remote_key_name + remote_endpoint_info: + $ref: '#/components/schemas/RemoteEndpointInfo' + example: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + type: array + items: {} + nullable: true + example: + - example + advanced_metadata: + allOf: + - $ref: '#/components/schemas/AdvancedMetadata' + nullable: true + coverage: + oneOf: + - type: integer + - type: number + format: double + nullable: true + readOnly: true + example: 0.33 + required: + - advanced_metadata + - remote_endpoint_info + - remote_key_name + - schema + x-merge-category: ats + RemoteFieldAPIResponse: + type: object + properties: + Activity: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + Application: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + Attachment: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + Candidate: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + Department: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + EEOC: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + ScheduledInterview: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + Job: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + JobPosting: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + JobInterviewStage: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + Offer: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + Office: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + RejectReason: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + Scorecard: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + Tag: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + RemoteUser: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + x-merge-category: ats + RemoteKey: + type: object + description: |- + # The RemoteKey Object + ### Description + The `RemoteKey` object is used to represent a request for a new remote key. + + ### Usage Example + Post a `GenerateRemoteKey` to receive a new `RemoteKey`. + properties: + name: + type: string + example: Remote Deployment Key 1 + key: + type: string + example: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA + required: + - key + - name + x-merge-category: ats + RemoteKeyForRegenerationRequest: + type: object + description: |- + # The RemoteKeyForRegeneration Object + ### Description + The `RemoteKeyForRegeneration` object is used to exchange an old remote key for a new one + + ### Usage Example + Post a `RemoteKeyForRegeneration` to swap out an old remote key for a new one + properties: + name: + type: string + minLength: 1 + description: The name of the remote key + example: Remote Deployment Key 1 + required: + - name + x-merge-category: ats + RemoteResponse: + type: object + description: |- + # The RemoteResponse Object + ### Description + The `RemoteResponse` object is used to represent information returned from a third-party endpoint. + + ### Usage Example + View the `RemoteResponse` returned from your `DataPassthrough`. + properties: + method: + type: string + example: GET + path: + type: string + example: /scooters + status: + type: integer + example: 200 + response: + example: + scooters: + - company: Lime + model: Gen 2.5 + - company: Bird + model: Bird Zero + response_headers: + type: object + additionalProperties: {} + example: + X-Page-Token: value + response_type: + oneOf: + - $ref: '#/components/schemas/ResponseTypeEnum' + - type: string + example: JSON + headers: + type: object + additionalProperties: {} + example: + EXTRA-HEADER: value + Authorization: + required: + - method + - path + - response + - status + x-merge-category: ats + RemoteUser: + type: object + description: |- + # The RemoteUser Object + ### Description + The `RemoteUser` object is used to represent a user with a login to the ATS system. + ### Usage Example + Fetch from the `LIST RemoteUsers` endpoint to show all users for a third party. + properties: + id: + type: string + format: uuid + readOnly: true + example: b82302de-852e-4e60-b050-edf9da3b7c02 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '344321' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + first_name: + type: string + nullable: true + description: The user's first name. + example: Shensi + last_name: + type: string + nullable: true + description: The user's last name. + example: Ding + email: + type: string + format: email + nullable: true + description: The user's email. + maxLength: 254 + example: hello@merge.dev + disabled: + type: boolean + nullable: true + description: Whether the user's account had been disabled. + remote_created_at: + type: string + format: date-time + nullable: true + description: When the third party's user was created. + example: '2020-11-10T00:00:00Z' + access_role: + oneOf: + - $ref: '#/components/schemas/AccessRoleEnum' + - type: string + nullable: true + description: |- + The user's role. + + * `SUPER_ADMIN` - SUPER_ADMIN + * `ADMIN` - ADMIN + * `TEAM_MEMBER` - TEAM_MEMBER + * `LIMITED_TEAM_MEMBER` - LIMITED_TEAM_MEMBER + * `INTERVIEWER` - INTERVIEWER + example: SUPER_ADMIN + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /users + data: + - Varies by platform + x-merge-sample-json: '{"id": "b82302de-852e-4e60-b050-edf9da3b7c02", "remote_id": + "344321", "first_name": "Shensi", "last_name": "Ding", "email": "hello@merge.dev", + "disabled": false, "remote_created_at": "2020-11-10T00:00:00Z", "access_role": + "SUPER_ADMIN", "remote_data": [{"path": "/users", "data": {"example": "Varies + by platform"}}]}' + x-merge-category: ats + RequestFormatEnum: + enum: + - JSON + - XML + - MULTIPART + type: string + description: |- + * `JSON` - JSON + * `XML` - XML + * `MULTIPART` - MULTIPART + x-merge-category: ats + ResponseTypeEnum: + enum: + - JSON + - BASE64_GZIP + type: string + description: |- + * `JSON` - JSON + * `BASE64_GZIP` - BASE64_GZIP + x-merge-category: ats + RoleEnum: + enum: + - ADMIN + - DEVELOPER + - MEMBER + - API + - SYSTEM + - MERGE_TEAM + type: string + description: |- + * `ADMIN` - ADMIN + * `DEVELOPER` - DEVELOPER + * `MEMBER` - MEMBER + * `API` - API + * `SYSTEM` - SYSTEM + * `MERGE_TEAM` - MERGE_TEAM + x-merge-category: ats + ScheduledInterview: + type: object + description: |- + # The ScheduledInterview Object + ### Description + The `ScheduledInterview` object is used to represent a scheduled interview for a given candidate’s application to a job. An `Application` can have multiple `ScheduledInterview`s depending on the particular hiring process. + ### Usage Example + Fetch from the `LIST ScheduledInterviews` endpoint and filter by `interviewers` to show all office locations. + properties: + id: + type: string + format: uuid + readOnly: true + example: b8faf072-98b9-4445-8a9a-6b4950efca19 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '3' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + application: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Application' + nullable: true + description: The application being interviewed. + example: 92e8a369-fffe-430d-b93a-f7e8a16563f1 + x-merge-expands-to: Application + job_interview_stage: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/JobInterviewStage' + nullable: true + description: The stage of the interview. + example: 2f7adb59-3fe6-4b5b-aef6-563f72bd13dc + x-merge-expands-to: JobInterviewStage + organizer: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/RemoteUser' + nullable: true + description: The user organizing the interview. + example: 52bf9b5e-0beb-4f6f-8a72-cd4dca7ca633 + x-merge-expands-to: RemoteUser + interviewers: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/RemoteUser' + nullable: true + example: + - f9813dd5-e70b-484c-91d8-00acd6065b07 + - 89a86fcf-d540-4e6b-ac3d-ce07c4ec9b3c + description: Array of `RemoteUser` IDs. + x-merge-expands-to: RemoteUser + location: + type: string + nullable: true + description: The interview's location. + example: Embarcadero Center 2 + start_at: + type: string + format: date-time + nullable: true + description: When the interview was started. + example: '2021-10-15T00:00:00Z' + end_at: + type: string + format: date-time + nullable: true + description: When the interview was ended. + example: '2021-10-15T02:00:00Z' + remote_created_at: + type: string + format: date-time + nullable: true + description: When the third party's interview was created. + example: '2021-10-15T00:00:00Z' + remote_updated_at: + type: string + format: date-time + nullable: true + description: When the third party's interview was updated. + example: '2021-10-15T00:00:00Z' + status: + oneOf: + - $ref: '#/components/schemas/ScheduledInterviewStatusEnum' + - type: string + nullable: true + description: |- + The interview's status. + + * `SCHEDULED` - SCHEDULED + * `AWAITING_FEEDBACK` - AWAITING_FEEDBACK + * `COMPLETE` - COMPLETE + example: SCHEDULED + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /interviews + data: + - Varies by platform + x-merge-expands: '{"application": "Application", "interviewers": "RemoteUser", + "job_interview_stage": "JobInterviewStage", "organizer": "RemoteUser"}' + x-merge-category: ats + ScheduledInterviewEndpointRequest: + type: object + properties: + model: + $ref: '#/components/schemas/ScheduledInterviewRequest' + remote_user_id: + type: string + required: + - model + - remote_user_id + x-merge-category: ats + ScheduledInterviewRequest: + type: object + description: |- + # The ScheduledInterview Object + ### Description + The `ScheduledInterview` object is used to represent a scheduled interview for a given candidate’s application to a job. An `Application` can have multiple `ScheduledInterview`s depending on the particular hiring process. + ### Usage Example + Fetch from the `LIST ScheduledInterviews` endpoint and filter by `interviewers` to show all office locations. + properties: + application: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Application' + nullable: true + description: The application being interviewed. + example: 92e8a369-fffe-430d-b93a-f7e8a16563f1 + x-merge-expands-to: Application + job_interview_stage: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/JobInterviewStage' + nullable: true + description: The stage of the interview. + example: 2f7adb59-3fe6-4b5b-aef6-563f72bd13dc + x-merge-expands-to: JobInterviewStage + organizer: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/RemoteUser' + nullable: true + description: The user organizing the interview. + example: 52bf9b5e-0beb-4f6f-8a72-cd4dca7ca633 + x-merge-expands-to: RemoteUser + interviewers: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/RemoteUser' + nullable: true + example: + - f9813dd5-e70b-484c-91d8-00acd6065b07 + - 89a86fcf-d540-4e6b-ac3d-ce07c4ec9b3c + description: Array of `RemoteUser` IDs. + x-merge-expands-to: RemoteUser + location: + type: string + nullable: true + description: The interview's location. + example: Embarcadero Center 2 + start_at: + type: string + format: date-time + nullable: true + description: When the interview was started. + example: '2021-10-15T00:00:00Z' + end_at: + type: string + format: date-time + nullable: true + description: When the interview was ended. + example: '2021-10-15T02:00:00Z' + status: + oneOf: + - $ref: '#/components/schemas/ScheduledInterviewStatusEnum' + - type: string + nullable: true + description: |- + The interview's status. + + * `SCHEDULED` - SCHEDULED + * `AWAITING_FEEDBACK` - AWAITING_FEEDBACK + * `COMPLETE` - COMPLETE + example: SCHEDULED + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + x-merge-expands: '{"application": "Application", "interviewers": "RemoteUser", + "job_interview_stage": "JobInterviewStage", "organizer": "RemoteUser"}' + x-merge-category: ats + ScheduledInterviewResponse: + type: object + properties: + model: + $ref: '#/components/schemas/ScheduledInterview' + warnings: + type: array + items: + $ref: '#/components/schemas/WarningValidationProblem' + errors: + type: array + items: + $ref: '#/components/schemas/ErrorValidationProblem' + logs: + type: array + items: + $ref: '#/components/schemas/DebugModeLog' + required: + - errors + - model + - warnings + x-merge-category: ats + ScheduledInterviewStatusEnum: + enum: + - SCHEDULED + - AWAITING_FEEDBACK + - COMPLETE + type: string + description: |- + * `SCHEDULED` - SCHEDULED + * `AWAITING_FEEDBACK` - AWAITING_FEEDBACK + * `COMPLETE` - COMPLETE + x-merge-category: ats + Scorecard: + type: object + description: |- + # The Scorecard Object + ### Description + The `Scorecard` object is used to represent an interviewer's candidate recommendation based on a particular interview. + ### Usage Example + Fetch from the `LIST Scorecards` endpoint and filter by `application` to show all scorecard for an applicant. + properties: + id: + type: string + format: uuid + readOnly: true + example: 3eab2f17-eeb1-450d-97f0-029d8be1e06f + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '22234' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + application: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Application' + nullable: true + description: The application being scored. + example: 2872ba14-4084-492b-be96-e5eee6fc33ef + x-merge-expands-to: Application + interview: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/ScheduledInterview' + nullable: true + description: The interview being scored. + example: 52bf9b5e-0beb-4f6f-8a72-cd4dca7ca633 + x-merge-expands-to: ScheduledInterview + interviewer: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/RemoteUser' + nullable: true + description: The interviewer doing the scoring. + example: bbb519a3-246e-4b95-b6b3-dba16107ba6b + x-merge-expands-to: RemoteUser + remote_created_at: + type: string + format: date-time + nullable: true + description: When the third party's scorecard was created. + example: '2021-10-15T00:00:00Z' + submitted_at: + type: string + format: date-time + nullable: true + description: When the scorecard was submitted. + example: '2021-10-15T00:00:00Z' + overall_recommendation: + oneOf: + - $ref: '#/components/schemas/OverallRecommendationEnum' + - type: string + nullable: true + description: |- + The inteviewer's recommendation. + + * `DEFINITELY_NO` - DEFINITELY_NO + * `NO` - NO + * `YES` - YES + * `STRONG_YES` - STRONG_YES + * `NO_DECISION` - NO_DECISION + example: STRONG_YES + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /ratings + data: + - Varies by platform + x-merge-expands: '{"application": "Application", "interview": "ScheduledInterview", + "interviewer": "RemoteUser"}' + x-merge-category: ats + ScreeningQuestion: + type: object + description: |- + # The ScreeningQuestion Object + ### Description + The `ScreeningQuestion` object is used to represent questions asked to screen candidates for a job. + + ### Usage Example + TODO + properties: + id: + type: string + format: uuid + readOnly: true + example: 0238cbc6-6040-430a-848e-aaiehfhdbadf4ae + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '23729392' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + job: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Job' + nullable: true + description: The job associated with the screening question. + example: 92e8a369-fffe-430d-b93a-f7e8a16563f1 + x-merge-expands-to: Job + description: + type: string + nullable: true + description: The description of the screening question + maxLength: 500 + example: Are you currently authorized to work for any employer in the country + outlined for this role? + title: + type: string + nullable: true + description: The title of the screening question + maxLength: 2500 + example: Work Authorisation + type: + oneOf: + - $ref: '#/components/schemas/ScreeningQuestionTypeEnum' + - type: string + nullable: true + description: |- + The data type for the screening question. + + * `DATE` - DATE + * `FILE` - FILE + * `SINGLE_SELECT` - SINGLE_SELECT + * `MULTI_SELECT` - MULTI_SELECT + * `SINGLE_LINE_TEXT` - SINGLE_LINE_TEXT + * `MULTI_LINE_TEXT` - MULTI_LINE_TEXT + * `NUMERIC` - NUMERIC + * `BOOLEAN` - BOOLEAN + example: SINGLE_SELECT + required: + type: boolean + nullable: true + description: Whether or not the screening question is required. + example: true + options: + type: array + items: + oneof: + - type: string + format: uuid + - $ref: '#/components/schemas/ScreeningQuestionOption' + example: + - remote_id: '19281' + label: I am currently authorised + - remote_id: '38372' + label: I am currently not eligible + x-merge-expands-to: ScreeningQuestionOption + remote_was_deleted: + type: boolean + description: 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/). + x-merge-expands: '{"job": "Job", "options": "ScreeningQuestionOption"}' + x-merge-category: ats + ScreeningQuestionAnswer: + type: object + description: |- + # The ScreeningQuestionAnswer Object + ### Description + The `ScreeningQuestionAnswer` object is used to represent candidate responses to a screening question, for a specific application. + + ### Usage Example + TODO + properties: + id: + type: string + format: uuid + readOnly: true + example: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '088899' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + question: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/ScreeningQuestion' + nullable: true + example: 0238cbc6-6040-430a-848e-aaiehfhdbadf4ae + description: The screening question associated with the candidate’s answer. + To determine the data type of the answer, you can expand on the screening + question by adding `screening_question_answers.question` to the `expand` + query parameter. + x-merge-expands-to: ScreeningQuestion + answer: + type: string + nullable: true + description: The candidate’s response to the screening question. + maxLength: 10000 + example: 5+ years experience + remote_was_deleted: + type: boolean + readOnly: true + description: 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/). + x-merge-nested-write-allowed: true + x-merge-expands: '{"question": "ScreeningQuestion"}' + x-merge-category: ats + ScreeningQuestionAnswerRequest: + type: object + description: |- + # The ScreeningQuestionAnswer Object + ### Description + The `ScreeningQuestionAnswer` object is used to represent candidate responses to a screening question, for a specific application. + + ### Usage Example + TODO + properties: + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '088899' + question: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/ScreeningQuestion' + nullable: true + example: 0238cbc6-6040-430a-848e-aaiehfhdbadf4ae + description: The screening question associated with the candidate’s answer. + To determine the data type of the answer, you can expand on the screening + question by adding `screening_question_answers.question` to the `expand` + query parameter. + x-merge-expands-to: ScreeningQuestion + answer: + type: string + nullable: true + description: The candidate’s response to the screening question. + maxLength: 10000 + example: 5+ years experience + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + x-merge-expands: '{"question": "ScreeningQuestion"}' + x-merge-category: ats + ScreeningQuestionOption: + type: object + description: |- + # The ScreeningQuestionOption Object + ### Description + The `ScreeningQuestionOption` object is used to represent options for a `ScreeningQuestion` object + + ### Usage Example + TODO + properties: + id: + type: string + format: uuid + readOnly: true + example: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '19202938' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + label: + type: string + nullable: true + description: Available response options + maxLength: 300 + example: 5+ years experience + remote_was_deleted: + type: boolean + description: 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/). + x-merge-nested-write-allowed: true + x-merge-category: ats + ScreeningQuestionTypeEnum: + enum: + - DATE + - FILE + - SINGLE_SELECT + - MULTI_SELECT + - SINGLE_LINE_TEXT + - MULTI_LINE_TEXT + - NUMERIC + - BOOLEAN + type: string + description: |- + * `DATE` - DATE + * `FILE` - FILE + * `SINGLE_SELECT` - SINGLE_SELECT + * `MULTI_SELECT` - MULTI_SELECT + * `SINGLE_LINE_TEXT` - SINGLE_LINE_TEXT + * `MULTI_LINE_TEXT` - MULTI_LINE_TEXT + * `NUMERIC` - NUMERIC + * `BOOLEAN` - BOOLEAN + x-merge-category: ats + SelectiveSyncConfigurationsUsageEnum: + enum: + - IN_NEXT_SYNC + - IN_LAST_SYNC + type: string + description: |- + * `IN_NEXT_SYNC` - IN_NEXT_SYNC + * `IN_LAST_SYNC` - IN_LAST_SYNC + x-merge-category: ats + StatusFd5Enum: + enum: + - SYNCING + - DONE + - FAILED + - DISABLED + - PAUSED + - PARTIALLY_SYNCED + type: string + description: |- + * `SYNCING` - SYNCING + * `DONE` - DONE + * `FAILED` - FAILED + * `DISABLED` - DISABLED + * `PAUSED` - PAUSED + * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED + x-merge-category: ats + SyncStatus: + type: object + description: |- + # The SyncStatus Object + ### Description + The `SyncStatus` object is used to represent the syncing state of an account + + ### Usage Example + View the `SyncStatus` for an account to see how recently its models were synced. + properties: + model_name: + type: string + example: Candidate + model_id: + type: string + example: ats.Candidate + last_sync_start: + type: string + format: date-time + example: '2021-03-30T19:44:18.695973Z' + next_sync_start: + type: string + format: date-time + example: '2021-03-30T20:44:18.662942Z' + last_sync_result: + oneOf: + - $ref: '#/components/schemas/LastSyncResultEnum' + - type: string + example: DONE + last_sync_finished: + type: string + format: date-time + example: '2021-03-30T19:55:18.695973Z' + status: + oneOf: + - $ref: '#/components/schemas/StatusFd5Enum' + - type: string + example: SYNCING + is_initial_sync: + type: boolean + example: true + selective_sync_configurations_usage: + $ref: '#/components/schemas/SelectiveSyncConfigurationsUsageEnum' + required: + - is_initial_sync + - model_id + - model_name + - status + x-merge-sample-json: '{"model_name": "Candidate", "model_id": "ats.Candidate", + "last_sync_start": "2021-03-30T19:44:18.695973Z", "next_sync_start": "2021-03-30T20:44:18.662942Z", + "status": "SYNCING", "is_initial_sync": true}' + x-merge-category: ats + Tag: + type: object + description: |- + # The Tag Object + ### Description + The `Tag` object is used to represent a tag for a candidate. + ### Usage Example + Fetch from the `LIST Tags` endpoint and view the tags used within a company. + properties: + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '4567' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + name: + type: string + nullable: true + description: The tag's name. + example: High-Priority + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + type: object + additionalProperties: {} + nullable: true + description: The full data pulled from the third-party API for an object. + nullable: true + example: + - path: /tags + data: + - Varies by platform + x-merge-category: ats + UpdateApplicationStageRequest: + type: object + properties: + job_interview_stage: + type: string + format: uuid + nullable: true + description: The interview stage to move the application to. + remote_user_id: + type: string + minLength: 1 + x-merge-category: ats + Url: + type: object + description: |- + # The Url Object + ### Description + The `Url` object is used to represent hyperlinks associated with the parent model. + ### Usage Example + Fetch from the `GET Candidate` endpoint and view their website urls. + properties: + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + value: + type: string + format: uri + nullable: true + description: The site's url. + maxLength: 2000 + example: http://alturl.com/p749b + url_type: + oneOf: + - $ref: '#/components/schemas/UrlTypeEnum' + - type: string + nullable: true + description: |- + The type of site. + + * `PERSONAL` - PERSONAL + * `COMPANY` - COMPANY + * `PORTFOLIO` - PORTFOLIO + * `BLOG` - BLOG + * `SOCIAL_MEDIA` - SOCIAL_MEDIA + * `OTHER` - OTHER + * `JOB_POSTING` - JOB_POSTING + example: PERSONAL + remote_was_deleted: + type: boolean + readOnly: true + description: 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/). + x-merge-nested-write-allowed: true + x-merge-category: ats + UrlRequest: + type: object + description: |- + # The Url Object + ### Description + The `Url` object is used to represent hyperlinks associated with the parent model. + ### Usage Example + Fetch from the `GET Candidate` endpoint and view their website urls. + properties: + value: + type: string + format: uri + nullable: true + description: The site's url. + maxLength: 2000 + example: http://alturl.com/p749b + url_type: + oneOf: + - $ref: '#/components/schemas/UrlTypeEnum' + - type: string + nullable: true + description: |- + The type of site. + + * `PERSONAL` - PERSONAL + * `COMPANY` - COMPANY + * `PORTFOLIO` - PORTFOLIO + * `BLOG` - BLOG + * `SOCIAL_MEDIA` - SOCIAL_MEDIA + * `OTHER` - OTHER + * `JOB_POSTING` - JOB_POSTING + example: PERSONAL + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + x-merge-category: ats + UrlTypeEnum: + enum: + - PERSONAL + - COMPANY + - PORTFOLIO + - BLOG + - SOCIAL_MEDIA + - OTHER + - JOB_POSTING + type: string + description: |- + * `PERSONAL` - PERSONAL + * `COMPANY` - COMPANY + * `PORTFOLIO` - PORTFOLIO + * `BLOG` - BLOG + * `SOCIAL_MEDIA` - SOCIAL_MEDIA + * `OTHER` - OTHER + * `JOB_POSTING` - JOB_POSTING + x-merge-category: ats + ValidationProblemSource: + type: object + properties: + pointer: + type: string + required: + - pointer + x-merge-category: ats + VeteranStatusEnum: + enum: + - I_AM_NOT_A_PROTECTED_VETERAN + - I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN + - I_DONT_WISH_TO_ANSWER + type: string + description: |- + * `I_AM_NOT_A_PROTECTED_VETERAN` - I_AM_NOT_A_PROTECTED_VETERAN + * `I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN` - I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN + * `I_DONT_WISH_TO_ANSWER` - I_DONT_WISH_TO_ANSWER + x-merge-category: ats + VisibilityEnum: + enum: + - ADMIN_ONLY + - PUBLIC + - PRIVATE + type: string + description: |- + * `ADMIN_ONLY` - ADMIN_ONLY + * `PUBLIC` - PUBLIC + * `PRIVATE` - PRIVATE + x-merge-category: ats + WarningValidationProblem: + type: object + properties: + source: + $ref: '#/components/schemas/ValidationProblemSource' + example: + pointer: /age + title: + type: string + example: Unrecognized Field + detail: + type: string + example: An unrecognized field, age, was passed in with request data. + problem_type: + type: string + example: UNRECOGNIZED_FIELD + required: + - detail + - problem_type + - title + x-merge-category: ats + WebhookReceiver: + type: object + properties: + event: + type: string + is_active: + type: boolean + key: + type: string + required: + - event + - is_active + x-merge-category: ats + WebhookReceiverRequest: + type: object + properties: + event: + type: string + minLength: 1 + is_active: + type: boolean + key: + type: string + minLength: 1 + required: + - event + - is_active + x-merge-category: ats + securitySchemes: + tokenAuth: + type: http + scheme: bearer + description: Token-based authentication with required prefix "Bearer" + x-fern-token-variable-name: api_key +servers: +- url: https://api.merge.dev/api/ats/v1 + description: Production + x-fern-server-name: Production +- url: https://api-sandbox.merge.dev/api/ats/v1 + description: Sandbox + x-fern-server-name: Sandbox +- url: https://api-eu.merge.dev/api/ats/v1 + description: Production EU + x-fern-server-name: ProductionEU +- url: https://api-ap.merge.dev/api/ats/v1 + description: Production APSE1 + x-fern-server-name: ProductionAPSE1 diff --git a/.mock/crm_v3.yml b/.mock/crm_v3.yml new file mode 100644 index 000000000..4e754eb5f --- /dev/null +++ b/.mock/crm_v3.yml @@ -0,0 +1,12652 @@ +openapi: 3.0.3 +info: + title: Merge CRM API + version: '1.0' + description: The unified API for building rich integrations with multiple CRM platforms. + contact: + name: Merge Team + url: https://www.merge.dev/ + email: hello@merge.dev +paths: + /crm/v1/account-details: + get: + operationId: account_details_retrieve + description: Get details for a linked account. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - account-details + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AccountDetails' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /crm/v1/account-token/{public_token}: + get: + operationId: account_token_retrieve + description: Returns the account token for the end user with the provided public + token. + parameters: + - in: path + name: public_token + schema: + type: string + required: true + tags: + - account-token + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AccountToken' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /crm/v1/accounts: + get: + operationId: accounts_list + description: Returns a list of `Account` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - owner + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandOwner: + value: owner + summary: Expand Owner + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_remote_fields + schema: + type: boolean + description: Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - in: query + name: name + schema: + type: string + nullable: true + description: If provided, will only return accounts with this name. + - in: query + name: owner_id + schema: + type: string + description: If provided, will only return accounts with this owner. + examples: + OwnerId: + summary: owner_id + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + tags: + - accounts + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedAccountList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + post: + operationId: accounts_create + description: Creates an `Account` object with the given values. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: is_debug_mode + schema: + type: boolean + description: Whether to include debug fields (such as log file links) in the + response. + - in: query + name: run_async + schema: + type: boolean + description: Whether or not third-party updates should be run asynchronously. + tags: + - accounts + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CRMAccountEndpointRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/CRMAccountEndpointRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/CRMAccountEndpointRequest' + required: true + security: + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/CRMAccountResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /crm/v1/accounts/{id}: + get: + operationId: accounts_retrieve + description: Returns an `Account` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - owner + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandOwner: + value: owner + summary: Expand Owner + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_remote_fields + schema: + type: boolean + description: Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - accounts + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Account' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + patch: + operationId: accounts_partial_update + description: Updates an `Account` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: is_debug_mode + schema: + type: boolean + description: Whether to include debug fields (such as log file links) in the + response. + - in: query + name: run_async + schema: + type: boolean + description: Whether or not third-party updates should be run asynchronously. + tags: + - accounts + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedCRMAccountEndpointRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedCRMAccountEndpointRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedCRMAccountEndpointRequest' + required: true + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CRMAccountResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /crm/v1/accounts/meta/patch/{id}: + get: + operationId: accounts_meta_patch_retrieve + description: Returns metadata for `CRMAccount` PATCHs. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + tags: + - accounts + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetaResponse' + description: '' + x-merge-meta-patch: META_PATCH + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /crm/v1/accounts/meta/post: + get: + operationId: accounts_meta_post_retrieve + description: Returns metadata for `CRMAccount` POSTs. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - accounts + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetaResponse' + description: '' + x-merge-meta-post: META_POST + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /crm/v1/accounts/remote-field-classes: + get: + operationId: accounts_remote_field_classes_list + description: Returns a list of `RemoteFieldClass` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_remote_fields + schema: + type: boolean + description: Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: is_common_model_field + schema: + type: boolean + nullable: true + description: If provided, will only return remote field classes with this + is_common_model_field value + - in: query + name: is_custom + schema: + type: boolean + nullable: true + description: If provided, will only return remote fields classes with this + is_custom value + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - accounts + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedRemoteFieldClassList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /crm/v1/async-passthrough: + post: + operationId: async_passthrough_create + description: Asynchronously pull data from an endpoint not currently supported + by Merge. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - async-passthrough + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DataPassthroughRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/DataPassthroughRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/DataPassthroughRequest' + required: true + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AsyncPassthroughReciept' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /crm/v1/async-passthrough/{async_passthrough_receipt_id}: + get: + operationId: async_passthrough_retrieve + description: Retrieves data from earlier async-passthrough POST request + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: async_passthrough_receipt_id + schema: + type: string + format: uuid + required: true + tags: + - async-passthrough + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/RemoteResponse' + - type: string + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /crm/v1/audit-trail: + get: + operationId: audit_trail_list + description: Gets a list of audit trail events. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: end_date + schema: + type: string + description: If included, will only include audit trail events that occurred + before this time + - in: query + name: event_type + schema: + type: string + description: '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`' + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: start_date + schema: + type: string + description: If included, will only include audit trail events that occurred + after this time + - in: query + name: user_email + schema: + type: string + description: 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. + tags: + - audit-trail + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedAuditLogEventList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /crm/v1/available-actions: + get: + operationId: available_actions_retrieve + description: Returns a list of models and actions available for an account. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - available-actions + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AvailableActions' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /crm/v1/contacts: + get: + operationId: contacts_list + description: Returns a list of `Contact` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: account_id + schema: + type: string + description: If provided, will only return contacts with this account. + examples: + AccountId: + summary: account_id + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: email_addresses + schema: + type: string + description: If provided, will only return contacts matching the email addresses; + multiple email_addresses can be separated by commas. + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - account + - owner + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandAccount,Owner: + value: account,owner + summary: Expand Account, Owner + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_remote_fields + schema: + type: boolean + description: Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: phone_numbers + schema: + type: string + description: If provided, will only return contacts matching the phone numbers; + multiple phone numbers can be separated by commas. + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + tags: + - contacts + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedContactList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + post: + operationId: contacts_create + description: Creates a `Contact` object with the given values. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: is_debug_mode + schema: + type: boolean + description: Whether to include debug fields (such as log file links) in the + response. + - in: query + name: run_async + schema: + type: boolean + description: Whether or not third-party updates should be run asynchronously. + tags: + - contacts + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CRMContactEndpointRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/CRMContactEndpointRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/CRMContactEndpointRequest' + required: true + security: + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/CRMContactResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /crm/v1/contacts/{id}: + get: + operationId: contacts_retrieve + description: Returns a `Contact` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - account + - owner + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandAccount,Owner: + value: account,owner + summary: Expand Account, Owner + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_remote_fields + schema: + type: boolean + description: Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - contacts + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Contact' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + patch: + operationId: contacts_partial_update + description: Updates a `Contact` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: is_debug_mode + schema: + type: boolean + description: Whether to include debug fields (such as log file links) in the + response. + - in: query + name: run_async + schema: + type: boolean + description: Whether or not third-party updates should be run asynchronously. + tags: + - contacts + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedCRMContactEndpointRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedCRMContactEndpointRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedCRMContactEndpointRequest' + required: true + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CRMContactResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /crm/v1/contacts/ignore/{model_id}: + post: + operationId: contacts_ignore_create + description: Ignores a specific row based on the `model_id` in the url. These + records will have their properties set to null, and will not be updated in + future syncs. The "reason" and "message" fields in the request body will be + stored for audit purposes. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: model_id + schema: + type: string + format: uuid + required: true + tags: + - contacts + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/IgnoreCommonModelRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/IgnoreCommonModelRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/IgnoreCommonModelRequest' + required: true + security: + - tokenAuth: [] + responses: + '200': + description: No response body + x-extra-tags: + - ignore-model + /crm/v1/contacts/meta/patch/{id}: + get: + operationId: contacts_meta_patch_retrieve + description: Returns metadata for `CRMContact` PATCHs. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + tags: + - contacts + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetaResponse' + description: '' + x-merge-meta-patch: META_PATCH + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /crm/v1/contacts/meta/post: + get: + operationId: contacts_meta_post_retrieve + description: Returns metadata for `CRMContact` POSTs. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - contacts + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetaResponse' + description: '' + x-merge-meta-post: META_POST + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /crm/v1/contacts/remote-field-classes: + get: + operationId: contacts_remote_field_classes_list + description: Returns a list of `RemoteFieldClass` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_remote_fields + schema: + type: boolean + description: Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: is_common_model_field + schema: + type: boolean + nullable: true + description: If provided, will only return remote field classes with this + is_common_model_field value + - in: query + name: is_custom + schema: + type: boolean + nullable: true + description: If provided, will only return remote fields classes with this + is_custom value + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - contacts + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedRemoteFieldClassList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /crm/v1/custom-object-classes: + get: + operationId: custom_object_classes_list + description: Returns a list of `CustomObjectClass` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - fields + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandFields: + value: fields + summary: Expand Fields + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + tags: + - custom-object-classes + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedCustomObjectClassList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /crm/v1/custom-object-classes/{custom_object_class_id}/association-types: + get: + operationId: custom_object_classes_association_types_list + description: Returns a list of `AssociationType` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: path + name: custom_object_class_id + schema: + type: string + format: uuid + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - target_object_classes + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandTargetObjectClasses: + value: target_object_classes + summary: Expand Target_object_classes + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + tags: + - association-types + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedAssociationTypeList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + post: + operationId: custom_object_classes_association_types_create + description: Creates an `AssociationType` object with the given values. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: custom_object_class_id + schema: + type: string + format: uuid + required: true + - in: query + name: is_debug_mode + schema: + type: boolean + description: Whether to include debug fields (such as log file links) in the + response. + - in: query + name: run_async + schema: + type: boolean + description: Whether or not third-party updates should be run asynchronously. + tags: + - association-types + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CRMAssociationTypeEndpointRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/CRMAssociationTypeEndpointRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/CRMAssociationTypeEndpointRequest' + required: true + security: + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/CRMAssociationTypeResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /crm/v1/custom-object-classes/{custom_object_class_id}/association-types/{id}: + get: + operationId: custom_object_classes_association_types_retrieve + description: Returns an `AssociationType` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: custom_object_class_id + schema: + type: string + format: uuid + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - target_object_classes + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandTargetObjectClasses: + value: target_object_classes + summary: Expand Target_object_classes + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - association-types + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AssociationType' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /crm/v1/custom-object-classes/{custom_object_class_id}/association-types/meta/post: + get: + operationId: custom_object_classes_association_types_meta_post_retrieve + description: Returns metadata for `CRMAssociationType` POSTs. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: custom_object_class_id + schema: + type: string + format: uuid + required: true + tags: + - association-types + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetaResponse' + description: '' + x-merge-meta-post: META_POST + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects: + get: + operationId: custom_object_classes_custom_objects_list + description: Returns a list of `CustomObject` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: path + name: custom_object_class_id + schema: + type: string + format: uuid + required: true + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_remote_fields + schema: + type: boolean + description: Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + tags: + - custom-objects + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedCustomObjectList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + post: + operationId: custom_object_classes_custom_objects_create + description: Creates a `CustomObject` object with the given values. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: custom_object_class_id + schema: + type: string + format: uuid + required: true + - in: query + name: is_debug_mode + schema: + type: boolean + description: Whether to include debug fields (such as log file links) in the + response. + - in: query + name: run_async + schema: + type: boolean + description: Whether or not third-party updates should be run asynchronously. + tags: + - custom-objects + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CRMCustomObjectEndpointRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/CRMCustomObjectEndpointRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/CRMCustomObjectEndpointRequest' + required: true + security: + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/CRMCustomObjectResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects/{id}: + get: + operationId: custom_object_classes_custom_objects_retrieve + description: Returns a `CustomObject` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: custom_object_class_id + schema: + type: string + format: uuid + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_remote_fields + schema: + type: boolean + description: Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - custom-objects + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CustomObject' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects/{object_id}/associations: + get: + operationId: custom_object_classes_custom_objects_associations_list + description: Returns a list of `Association` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: association_type_id + schema: + type: string + description: If provided, will only return opportunities with this association_type. + examples: + AssociationTypeId: + summary: association_type_id + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: path + name: custom_object_class_id + schema: + type: string + format: uuid + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - association_type + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandAssociationType: + value: association_type + summary: Expand Association_type + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - in: path + name: object_id + schema: + type: string + format: uuid + required: true + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + tags: + - associations + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedAssociationList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects/meta/post: + get: + operationId: custom_object_classes_custom_objects_meta_post_retrieve + description: Returns metadata for `CRMCustomObject` POSTs. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: custom_object_class_id + schema: + type: string + format: uuid + required: true + tags: + - custom-objects + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetaResponse' + description: '' + x-merge-meta-post: META_POST + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /crm/v1/custom-object-classes/{id}: + get: + operationId: custom_object_classes_retrieve + description: Returns a `CustomObjectClass` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - fields + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandFields: + value: fields + summary: Expand Fields + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - custom-object-classes + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CustomObjectClass' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + ? /crm/v1/custom-object-classes/{source_class_id}/custom-objects/{source_object_id}/associations/{target_class_id}/{target_object_id}/{association_type_id} + : put: + operationId: custom_object_classes_custom_objects_associations_update + description: Creates an Association between `source_object_id` and `target_object_id` + of type `association_type_id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: association_type_id + schema: + type: string + format: uuid + required: true + - in: query + name: is_debug_mode + schema: + type: boolean + description: Whether to include debug fields (such as log file links) in the + response. + - in: query + name: run_async + schema: + type: boolean + description: Whether or not third-party updates should be run asynchronously. + - in: path + name: source_class_id + schema: + type: string + format: uuid + required: true + - in: path + name: source_object_id + schema: + type: string + format: uuid + required: true + - in: path + name: target_class_id + schema: + type: string + required: true + - in: path + name: target_object_id + schema: + type: string + format: uuid + required: true + tags: + - associations + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Association' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /crm/v1/custom-object-classes/custom-objects/remote-field-classes: + get: + operationId: custom_object_classes_custom_objects_remote_field_classes_list + description: Returns a list of `RemoteFieldClass` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_remote_fields + schema: + type: boolean + description: Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: is_common_model_field + schema: + type: boolean + nullable: true + description: If provided, will only return remote field classes with this + is_common_model_field value + - in: query + name: is_custom + schema: + type: boolean + nullable: true + description: If provided, will only return remote fields classes with this + is_custom value + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - custom-objects + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedRemoteFieldClassList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /crm/v1/default-scopes: + get: + operationId: default_scopes_retrieve + description: Get the default permissions for Merge Common Models and fields + across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). + tags: + - scopes + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CommonModelScopeAPI' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /crm/v1/delete-account: + post: + operationId: delete_account_delete + description: Delete a linked account. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - delete-account + security: + - tokenAuth: [] + responses: + '200': + description: No response body + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /crm/v1/engagement-types: + get: + operationId: engagement_types_list + description: Returns a list of `EngagementType` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_remote_fields + schema: + type: boolean + description: Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + tags: + - engagement-types + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedEngagementTypeList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /crm/v1/engagement-types/{id}: + get: + operationId: engagement_types_retrieve + description: Returns an `EngagementType` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_remote_fields + schema: + type: boolean + description: Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - engagement-types + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/EngagementType' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /crm/v1/engagement-types/remote-field-classes: + get: + operationId: engagement_types_remote_field_classes_list + description: Returns a list of `RemoteFieldClass` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_remote_fields + schema: + type: boolean + description: Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: is_common_model_field + schema: + type: boolean + nullable: true + description: If provided, will only return remote field classes with this + is_common_model_field value + - in: query + name: is_custom + schema: + type: boolean + nullable: true + description: If provided, will only return remote fields classes with this + is_custom value + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - engagement-types + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedRemoteFieldClassList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /crm/v1/engagements: + get: + operationId: engagements_list + description: Returns a list of `Engagement` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - account + - contacts + - engagement_type + - owner + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandContacts,Owner,Account,EngagementType: + value: contacts,owner,account,engagement_type + summary: Expand Contacts, Owner, Account, Engagement_type + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_remote_fields + schema: + type: boolean + description: Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + - in: query + name: started_after + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return engagements started after this + datetime. + - in: query + name: started_before + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return engagements started before this + datetime. + tags: + - engagements + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedEngagementList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + post: + operationId: engagements_create + description: Creates an `Engagement` object with the given values. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: is_debug_mode + schema: + type: boolean + description: Whether to include debug fields (such as log file links) in the + response. + - in: query + name: run_async + schema: + type: boolean + description: Whether or not third-party updates should be run asynchronously. + tags: + - engagements + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EngagementEndpointRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/EngagementEndpointRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/EngagementEndpointRequest' + required: true + security: + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/EngagementResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /crm/v1/engagements/{id}: + get: + operationId: engagements_retrieve + description: Returns an `Engagement` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - account + - contacts + - engagement_type + - owner + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandContacts,Owner,Account,EngagementType: + value: contacts,owner,account,engagement_type + summary: Expand Contacts, Owner, Account, Engagement_type + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_remote_fields + schema: + type: boolean + description: Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - engagements + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Engagement' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + patch: + operationId: engagements_partial_update + description: Updates an `Engagement` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: is_debug_mode + schema: + type: boolean + description: Whether to include debug fields (such as log file links) in the + response. + - in: query + name: run_async + schema: + type: boolean + description: Whether or not third-party updates should be run asynchronously. + tags: + - engagements + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedEngagementEndpointRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedEngagementEndpointRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedEngagementEndpointRequest' + required: true + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/EngagementResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /crm/v1/engagements/meta/patch/{id}: + get: + operationId: engagements_meta_patch_retrieve + description: Returns metadata for `Engagement` PATCHs. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + tags: + - engagements + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetaResponse' + description: '' + x-merge-meta-patch: META_PATCH + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /crm/v1/engagements/meta/post: + get: + operationId: engagements_meta_post_retrieve + description: Returns metadata for `Engagement` POSTs. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - engagements + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetaResponse' + description: '' + x-merge-meta-post: META_POST + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /crm/v1/engagements/remote-field-classes: + get: + operationId: engagements_remote_field_classes_list + description: Returns a list of `RemoteFieldClass` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_remote_fields + schema: + type: boolean + description: Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: is_common_model_field + schema: + type: boolean + nullable: true + description: If provided, will only return remote field classes with this + is_common_model_field value + - in: query + name: is_custom + schema: + type: boolean + nullable: true + description: If provided, will only return remote fields classes with this + is_custom value + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - engagements + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedRemoteFieldClassList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /crm/v1/field-mappings: + get: + operationId: field_mappings_retrieve + description: Get all Field Mappings for this Linked Account. Field Mappings + are mappings between third-party Remote Fields and user defined Merge fields. + [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: exclude_remote_field_metadata + schema: + type: boolean + description: 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. + tags: + - field-mapping + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/FieldMappingApiInstanceResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + post: + operationId: field_mappings_create + description: Create new Field Mappings that will be available after the next + scheduled sync. This will cause the next sync for this Linked Account to sync + **ALL** data from start. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: exclude_remote_field_metadata + schema: + type: boolean + description: 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. + tags: + - field-mapping + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateFieldMappingRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/CreateFieldMappingRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/CreateFieldMappingRequest' + required: true + security: + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/FieldMappingInstanceResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /crm/v1/field-mappings/{field_mapping_id}: + patch: + operationId: field_mappings_partial_update + description: Create or update existing Field Mappings for a Linked Account. + Changes will be reflected after the next scheduled sync. This will cause the + next sync for this Linked Account to sync **ALL** data from start. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: field_mapping_id + schema: + type: string + format: uuid + required: true + tags: + - field-mapping + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedEditFieldMappingRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedEditFieldMappingRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedEditFieldMappingRequest' + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/FieldMappingInstanceResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + delete: + operationId: field_mappings_destroy + description: Deletes Field Mappings for a Linked Account. All data related to + this Field Mapping will be deleted and these changes will be reflected after + the next scheduled sync. This will cause the next sync for this Linked Account + to sync **ALL** data from start. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: field_mapping_id + schema: + type: string + format: uuid + required: true + tags: + - field-mapping + security: + - tokenAuth: [] + responses: + '204': + content: + application/json: + schema: + $ref: '#/components/schemas/FieldMappingInstanceResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /crm/v1/generate-key: + post: + operationId: generate_key_create + description: Create a remote key. + tags: + - generate-key + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GenerateRemoteKeyRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/GenerateRemoteKeyRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/GenerateRemoteKeyRequest' + required: true + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RemoteKey' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /crm/v1/issues: + get: + operationId: issues_list + description: Gets all issues for Organization. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: query + name: account_token + schema: + type: string + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: end_date + schema: + type: string + description: If included, will only include issues whose most recent action + occurred before this time + - in: query + name: end_user_organization_name + schema: + type: string + - in: query + name: first_incident_time_after + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return issues whose first incident time + was after this datetime. + - in: query + name: first_incident_time_before + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return issues whose first incident time + was before this datetime. + - in: query + name: include_muted + schema: + type: string + description: If true, will include muted issues + - in: query + name: integration_name + schema: + type: string + - in: query + name: last_incident_time_after + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return issues whose last incident time + was after this datetime. + - in: query + name: last_incident_time_before + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return issues whose last incident time + was before this datetime. + - in: query + name: linked_account_id + schema: + type: string + description: If provided, will only include issues pertaining to the linked + account passed in. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: start_date + schema: + type: string + description: If included, will only include issues whose most recent action + occurred after this time + - in: query + name: status + schema: + type: string + enum: + - ONGOING + - RESOLVED + description: |- + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + tags: + - issues + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedIssueList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /crm/v1/issues/{id}: + get: + operationId: issues_retrieve + description: Get a specific issue. + parameters: + - in: path + name: id + schema: + type: string + format: uuid + required: true + tags: + - issues + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Issue' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /crm/v1/leads: + get: + operationId: leads_list + description: Returns a list of `Lead` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: converted_account_id + schema: + type: string + description: If provided, will only return leads with this account. + examples: + ConvertedAccountId: + summary: converted_account_id + - in: query + name: converted_contact_id + schema: + type: string + description: If provided, will only return leads with this contact. + examples: + ConvertedContactId: + summary: converted_contact_id + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: email_addresses + schema: + type: string + description: If provided, will only return contacts matching the email addresses; + multiple email_addresses can be separated by commas. + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - converted_account + - converted_contact + - owner + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandOwner,ConvertedContact,ConvertedAccount: + value: owner,converted_contact,converted_account + summary: Expand Owner, Converted_contact, Converted_account + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_remote_fields + schema: + type: boolean + description: Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - in: query + name: owner_id + schema: + type: string + description: If provided, will only return leads with this owner. + examples: + OwnerId: + summary: owner_id + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: phone_numbers + schema: + type: string + description: If provided, will only return contacts matching the phone numbers; + multiple phone numbers can be separated by commas. + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + tags: + - leads + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedLeadList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + post: + operationId: leads_create + description: Creates a `Lead` object with the given values. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: is_debug_mode + schema: + type: boolean + description: Whether to include debug fields (such as log file links) in the + response. + - in: query + name: run_async + schema: + type: boolean + description: Whether or not third-party updates should be run asynchronously. + tags: + - leads + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LeadEndpointRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/LeadEndpointRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/LeadEndpointRequest' + required: true + security: + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/LeadResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /crm/v1/leads/{id}: + get: + operationId: leads_retrieve + description: Returns a `Lead` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - converted_account + - converted_contact + - owner + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandOwner,ConvertedContact,ConvertedAccount: + value: owner,converted_contact,converted_account + summary: Expand Owner, Converted_contact, Converted_account + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_remote_fields + schema: + type: boolean + description: Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - leads + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Lead' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /crm/v1/leads/meta/post: + get: + operationId: leads_meta_post_retrieve + description: Returns metadata for `Lead` POSTs. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - leads + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetaResponse' + description: '' + x-merge-meta-post: META_POST + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /crm/v1/leads/remote-field-classes: + get: + operationId: leads_remote_field_classes_list + description: Returns a list of `RemoteFieldClass` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_remote_fields + schema: + type: boolean + description: Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: is_common_model_field + schema: + type: boolean + nullable: true + description: If provided, will only return remote field classes with this + is_common_model_field value + - in: query + name: is_custom + schema: + type: boolean + nullable: true + description: If provided, will only return remote fields classes with this + is_custom value + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - leads + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedRemoteFieldClassList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /crm/v1/link-token: + post: + operationId: link_token_create + description: Creates a link token to be used when linking a new end user. + tags: + - link-token + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EndUserDetailsRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/EndUserDetailsRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/EndUserDetailsRequest' + required: true + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/LinkToken' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /crm/v1/linked-account-scopes: + get: + operationId: linked_account_scopes_retrieve + description: Get all available permissions for Merge Common Models and fields + for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - scopes + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CommonModelScopeAPI' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + post: + operationId: linked_account_scopes_create + description: Update permissions for any Common Model or field for a single Linked + Account. Any Scopes not set in this POST request will inherit the default + Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes) + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - scopes + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LinkedAccountCommonModelScopeDeserializerRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/LinkedAccountCommonModelScopeDeserializerRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/LinkedAccountCommonModelScopeDeserializerRequest' + required: true + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CommonModelScopeAPI' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /crm/v1/linked-accounts: + get: + operationId: linked_accounts_list + description: List linked accounts for your organization. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: query + name: category + schema: + type: string + nullable: true + enum: + - accounting + - ats + - crm + - filestorage + - hris + - mktg + - ticketing + description: |- + Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing` + + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: end_user_email_address + schema: + type: string + description: If provided, will only return linked accounts associated with + the given email address. + - in: query + name: end_user_organization_name + schema: + type: string + description: If provided, will only return linked accounts associated with + the given organization name. + - in: query + name: end_user_origin_id + schema: + type: string + description: If provided, will only return linked accounts associated with + the given origin ID. + - in: query + name: end_user_origin_ids + schema: + type: string + description: Comma-separated list of EndUser origin IDs, making it possible + to specify multiple EndUsers at once. + - in: query + name: id + schema: + type: string + format: uuid + - in: query + name: ids + schema: + type: string + description: Comma-separated list of LinkedAccount IDs, making it possible + to specify multiple LinkedAccounts at once. + - in: query + name: include_duplicates + schema: + type: boolean + description: 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. + - in: query + name: integration_name + schema: + type: string + description: If provided, will only return linked accounts associated with + the given integration name. + - in: query + name: is_test_account + schema: + type: string + description: If included, will only include test linked accounts. If not included, + will only include non-test linked accounts. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: status + schema: + type: string + description: 'Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, + `RELINK_NEEDED`' + tags: + - linked-accounts + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedAccountDetailsAndActionsList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /crm/v1/notes: + get: + operationId: notes_list + description: Returns a list of `Note` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: account_id + schema: + type: string + description: If provided, will only return notes with this account. + examples: + AccountId: + summary: account_id + - in: query + name: contact_id + schema: + type: string + description: If provided, will only return notes with this contact. + examples: + ContactId: + summary: contact_id + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - account + - contact + - opportunity + - owner + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandOwner,Contact,Account,Opportunity: + value: owner,contact,account,opportunity + summary: Expand Owner, Contact, Account, Opportunity + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_remote_fields + schema: + type: boolean + description: Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - in: query + name: opportunity_id + schema: + type: string + description: If provided, will only return notes with this opportunity. + examples: + OpportunityId: + summary: opportunity_id + - in: query + name: owner_id + schema: + type: string + description: If provided, will only return notes with this owner. + examples: + OwnerId: + summary: owner_id + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + tags: + - notes + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedNoteList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + post: + operationId: notes_create + description: Creates a `Note` object with the given values. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: is_debug_mode + schema: + type: boolean + description: Whether to include debug fields (such as log file links) in the + response. + - in: query + name: run_async + schema: + type: boolean + description: Whether or not third-party updates should be run asynchronously. + tags: + - notes + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/NoteEndpointRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/NoteEndpointRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/NoteEndpointRequest' + required: true + security: + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/NoteResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /crm/v1/notes/{id}: + get: + operationId: notes_retrieve + description: Returns a `Note` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - account + - contact + - opportunity + - owner + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandOwner,Contact,Account,Opportunity: + value: owner,contact,account,opportunity + summary: Expand Owner, Contact, Account, Opportunity + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_remote_fields + schema: + type: boolean + description: Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - notes + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Note' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /crm/v1/notes/meta/post: + get: + operationId: notes_meta_post_retrieve + description: Returns metadata for `Note` POSTs. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - notes + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetaResponse' + description: '' + x-merge-meta-post: META_POST + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /crm/v1/notes/remote-field-classes: + get: + operationId: notes_remote_field_classes_list + description: Returns a list of `RemoteFieldClass` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_remote_fields + schema: + type: boolean + description: Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: is_common_model_field + schema: + type: boolean + nullable: true + description: If provided, will only return remote field classes with this + is_common_model_field value + - in: query + name: is_custom + schema: + type: boolean + nullable: true + description: If provided, will only return remote fields classes with this + is_custom value + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - notes + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedRemoteFieldClassList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /crm/v1/opportunities: + get: + operationId: opportunities_list + description: Returns a list of `Opportunity` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: account_id + schema: + type: string + description: If provided, will only return opportunities with this account. + examples: + AccountId: + summary: account_id + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - account + - owner + - stage + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandOwner,Stage,Account: + value: owner,stage,account + summary: Expand Owner, Stage, Account + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_remote_fields + schema: + type: boolean + description: Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - in: query + name: owner_id + schema: + type: string + description: If provided, will only return opportunities with this owner. + examples: + OwnerId: + summary: owner_id + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_created_after + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return opportunities created in the third + party platform after this datetime. + - in: query + name: remote_fields + schema: + type: string + enum: + - status + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesStatus: + value: status + summary: Original Enum Values Status + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + - in: query + name: show_enum_origins + schema: + type: string + enum: + - status + description: 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) + examples: + OriginalEnumValuesStatus: + value: status + summary: Original Enum Values Status + - in: query + name: stage_id + schema: + type: string + description: If provided, will only return opportunities with this stage. + examples: + StageId: + summary: stage_id + - in: query + name: status + schema: + type: string + nullable: true + enum: + - LOST + - OPEN + - WON + description: |- + If provided, will only return opportunities with this status. Options: ('OPEN', 'WON', 'LOST') + + * `OPEN` - OPEN + * `WON` - WON + * `LOST` - LOST + tags: + - opportunities + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedOpportunityList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + post: + operationId: opportunities_create + description: Creates an `Opportunity` object with the given values. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: is_debug_mode + schema: + type: boolean + description: Whether to include debug fields (such as log file links) in the + response. + - in: query + name: run_async + schema: + type: boolean + description: Whether or not third-party updates should be run asynchronously. + tags: + - opportunities + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OpportunityEndpointRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/OpportunityEndpointRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/OpportunityEndpointRequest' + required: true + security: + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/OpportunityResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /crm/v1/opportunities/{id}: + get: + operationId: opportunities_retrieve + description: Returns an `Opportunity` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - account + - owner + - stage + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandOwner,Stage,Account: + value: owner,stage,account + summary: Expand Owner, Stage, Account + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_remote_fields + schema: + type: boolean + description: Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: remote_fields + schema: + type: string + enum: + - status + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesStatus: + value: status + summary: Original Enum Values Status + - in: query + name: show_enum_origins + schema: + type: string + enum: + - status + description: 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) + examples: + OriginalEnumValuesStatus: + value: status + summary: Original Enum Values Status + tags: + - opportunities + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Opportunity' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + patch: + operationId: opportunities_partial_update + description: Updates an `Opportunity` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: is_debug_mode + schema: + type: boolean + description: Whether to include debug fields (such as log file links) in the + response. + - in: query + name: run_async + schema: + type: boolean + description: Whether or not third-party updates should be run asynchronously. + tags: + - opportunities + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedOpportunityEndpointRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedOpportunityEndpointRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedOpportunityEndpointRequest' + required: true + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/OpportunityResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /crm/v1/opportunities/meta/patch/{id}: + get: + operationId: opportunities_meta_patch_retrieve + description: Returns metadata for `Opportunity` PATCHs. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + tags: + - opportunities + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetaResponse' + description: '' + x-merge-meta-patch: META_PATCH + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /crm/v1/opportunities/meta/post: + get: + operationId: opportunities_meta_post_retrieve + description: Returns metadata for `Opportunity` POSTs. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - opportunities + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetaResponse' + description: '' + x-merge-meta-post: META_POST + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /crm/v1/opportunities/remote-field-classes: + get: + operationId: opportunities_remote_field_classes_list + description: Returns a list of `RemoteFieldClass` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_remote_fields + schema: + type: boolean + description: Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: is_common_model_field + schema: + type: boolean + nullable: true + description: If provided, will only return remote field classes with this + is_common_model_field value + - in: query + name: is_custom + schema: + type: boolean + nullable: true + description: If provided, will only return remote fields classes with this + is_custom value + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - opportunities + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedRemoteFieldClassList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /crm/v1/passthrough: + post: + operationId: passthrough_create + description: Pull data from an endpoint not currently supported by Merge. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - passthrough + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DataPassthroughRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/DataPassthroughRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/DataPassthroughRequest' + required: true + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RemoteResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /crm/v1/regenerate-key: + post: + operationId: regenerate_key_create + description: Exchange remote keys. + tags: + - regenerate-key + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RemoteKeyForRegenerationRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/RemoteKeyForRegenerationRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/RemoteKeyForRegenerationRequest' + required: true + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RemoteKey' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /crm/v1/remote-fields: + get: + operationId: remote_fields_retrieve + description: Get all remote fields for a Linked Account. Remote fields are third-party + fields that are accessible after initial sync if remote_data is enabled. You + can use remote fields to override existing Merge fields or map a new Merge + field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: common_models + schema: + type: string + description: A comma seperated list of Common Model names. If included, will + only return Remote Fields for those Common Models. + - in: query + name: include_example_values + schema: + type: string + description: 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. + tags: + - field-mapping + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RemoteFieldAPIResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /crm/v1/stages: + get: + operationId: stages_list + description: Returns a list of `Stage` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_remote_fields + schema: + type: boolean + description: Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + tags: + - stages + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedStageList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /crm/v1/stages/{id}: + get: + operationId: stages_retrieve + description: Returns a `Stage` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_remote_fields + schema: + type: boolean + description: Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - stages + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Stage' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /crm/v1/stages/remote-field-classes: + get: + operationId: stages_remote_field_classes_list + description: Returns a list of `RemoteFieldClass` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_remote_fields + schema: + type: boolean + description: Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: is_common_model_field + schema: + type: boolean + nullable: true + description: If provided, will only return remote field classes with this + is_common_model_field value + - in: query + name: is_custom + schema: + type: boolean + nullable: true + description: If provided, will only return remote fields classes with this + is_custom value + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - stages + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedRemoteFieldClassList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /crm/v1/sync-status: + get: + operationId: sync_status_list + description: 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). + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - sync-status + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedSyncStatusList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /crm/v1/sync-status/resync: + post: + operationId: 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. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - force-resync + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SyncStatus' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /crm/v1/target-fields: + get: + operationId: target_fields_retrieve + description: Get all organization-wide Target Fields, this will not include + any Linked Account specific Target Fields. Organization-wide Target Fields + are additional fields appended to the Merge Common Model for all Linked Accounts + in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - field-mapping + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ExternalTargetFieldAPIResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /crm/v1/tasks: + get: + operationId: tasks_list + description: Returns a list of `Task` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - account + - opportunity + - owner + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandOwner,Account,Opportunity: + value: owner,account,opportunity + summary: Expand Owner, Account, Opportunity + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_remote_fields + schema: + type: boolean + description: Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + tags: + - tasks + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedTaskList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + post: + operationId: tasks_create + description: Creates a `Task` object with the given values. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: is_debug_mode + schema: + type: boolean + description: Whether to include debug fields (such as log file links) in the + response. + - in: query + name: run_async + schema: + type: boolean + description: Whether or not third-party updates should be run asynchronously. + tags: + - tasks + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TaskEndpointRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/TaskEndpointRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/TaskEndpointRequest' + required: true + security: + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/TaskResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /crm/v1/tasks/{id}: + get: + operationId: tasks_retrieve + description: Returns a `Task` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - account + - opportunity + - owner + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandOwner,Account,Opportunity: + value: owner,account,opportunity + summary: Expand Owner, Account, Opportunity + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_remote_fields + schema: + type: boolean + description: Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - tasks + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Task' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + patch: + operationId: tasks_partial_update + description: Updates a `Task` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: is_debug_mode + schema: + type: boolean + description: Whether to include debug fields (such as log file links) in the + response. + - in: query + name: run_async + schema: + type: boolean + description: Whether or not third-party updates should be run asynchronously. + tags: + - tasks + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedTaskEndpointRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedTaskEndpointRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedTaskEndpointRequest' + required: true + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/TaskResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /crm/v1/tasks/meta/patch/{id}: + get: + operationId: tasks_meta_patch_retrieve + description: Returns metadata for `Task` PATCHs. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + tags: + - tasks + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetaResponse' + description: '' + x-merge-meta-patch: META_PATCH + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /crm/v1/tasks/meta/post: + get: + operationId: tasks_meta_post_retrieve + description: Returns metadata for `Task` POSTs. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - tasks + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetaResponse' + description: '' + x-merge-meta-post: META_POST + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /crm/v1/tasks/remote-field-classes: + get: + operationId: tasks_remote_field_classes_list + description: Returns a list of `RemoteFieldClass` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_remote_fields + schema: + type: boolean + description: Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: is_common_model_field + schema: + type: boolean + nullable: true + description: If provided, will only return remote field classes with this + is_common_model_field value + - in: query + name: is_custom + schema: + type: boolean + nullable: true + description: If provided, will only return remote fields classes with this + is_custom value + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - tasks + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedRemoteFieldClassList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /crm/v1/users: + get: + operationId: users_list + description: Returns a list of `User` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: email + schema: + type: string + nullable: true + description: If provided, will only return users with this email. + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_remote_fields + schema: + type: boolean + description: Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + tags: + - users + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedUserList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /crm/v1/users/{id}: + get: + operationId: users_retrieve + description: Returns a `User` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_remote_fields + schema: + type: boolean + description: Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - users + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/User' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /crm/v1/users/ignore/{model_id}: + post: + operationId: users_ignore_create + description: Ignores a specific row based on the `model_id` in the url. These + records will have their properties set to null, and will not be updated in + future syncs. The "reason" and "message" fields in the request body will be + stored for audit purposes. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: model_id + schema: + type: string + format: uuid + required: true + tags: + - users + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/IgnoreCommonModelRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/IgnoreCommonModelRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/IgnoreCommonModelRequest' + required: true + security: + - tokenAuth: [] + responses: + '200': + description: No response body + x-extra-tags: + - ignore-model + /crm/v1/users/remote-field-classes: + get: + operationId: users_remote_field_classes_list + description: Returns a list of `RemoteFieldClass` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_remote_fields + schema: + type: boolean + description: Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: is_common_model_field + schema: + type: boolean + nullable: true + description: If provided, will only return remote field classes with this + is_common_model_field value + - in: query + name: is_custom + schema: + type: boolean + nullable: true + description: If provided, will only return remote fields classes with this + is_custom value + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - users + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedRemoteFieldClassList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /crm/v1/webhook-receivers: + get: + operationId: webhook_receivers_list + description: Returns a list of `WebhookReceiver` objects. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - webhook-receivers + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/WebhookReceiver' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + post: + operationId: webhook_receivers_create + description: Creates a `WebhookReceiver` object with the given values. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - webhook-receivers + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/WebhookReceiverRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/WebhookReceiverRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/WebhookReceiverRequest' + required: true + security: + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/WebhookReceiver' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC +components: + schemas: + Account: + type: object + description: |- + # The Account Object + ### Description + The `Account` object is used to represent a company in a CRM system. + ### Usage Example + TODO + properties: + id: + type: string + format: uuid + readOnly: true + example: 0958cbc6-6040-430a-848e-aafacbadf4ae + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '19202938' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + owner: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/User' + nullable: true + description: The account's owner. + example: 0258cbc6-6020-430a-848e-aafacbadf4ae + x-merge-expands-to: User + name: + type: string + nullable: true + description: The account's name. + example: Merge API + description: + type: string + nullable: true + description: The account's description. + example: One API for all integrations + industry: + type: string + nullable: true + description: The account's industry. + example: API's + website: + type: string + format: uri + nullable: true + description: The account's website. + maxLength: 2000 + example: https://merge.dev/ + number_of_employees: + type: integer + maximum: 2147483647 + minimum: -2147483648 + nullable: true + description: The account's number of employees. + example: 276000 + addresses: + type: array + items: + $ref: '#/components/schemas/Address' + example: + - street_1: 50 Bowling Green Dr + street_2: Golden Gate Park + city: San Francisco + state: CA + postal_code: '94122' + country: US + address_type: Shipping + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + phone_numbers: + type: array + items: + $ref: '#/components/schemas/PhoneNumber' + readOnly: true + example: + - phone_number: '+16788879833' + phone_number_type: Mobile + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + last_activity_at: + type: string + format: date-time + nullable: true + description: The last date (either most recent or furthest in the future) + of when an activity occurs in an account. + example: '2022-02-10T00:00:00Z' + remote_updated_at: + type: string + format: date-time + nullable: true + description: When the CRM system account data was last modified by a user + with a login. + example: '2022-01-09T00:00:00Z' + remote_created_at: + type: string + format: date-time + nullable: true + description: When the third party's account was created. + example: '2021-11-10T00:00:00Z' + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /accounts + data: + - Varies by platform + remote_fields: + type: array + items: + $ref: '#/components/schemas/RemoteField' + readOnly: true + x-merge-expands: '{"owner": "User"}' + x-merge-category: crm + AccountDetails: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + example: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd + integration: + type: string + readOnly: true + example: BambooHR + integration_slug: + type: string + readOnly: true + example: bamboohr + category: + oneOf: + - $ref: '#/components/schemas/CategoryEnum' + - type: string + nullable: true + example: hris + end_user_origin_id: + type: string + readOnly: true + example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + end_user_organization_name: + type: string + readOnly: true + example: Waystar Royco + end_user_email_address: + type: string + format: email + readOnly: true + example: kendall.roy@waystar-royco.com + status: + type: string + readOnly: true + example: COMPLETE + webhook_listener_url: + type: string + format: uri + readOnly: true + example: https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 + is_duplicate: + type: boolean + nullable: true + readOnly: true + description: Whether a Production Linked Account's credentials match another + existing Production Linked Account. This field is `null` for Test Linked + Accounts, incomplete Production Linked Accounts, and ignored duplicate + Production Linked Account sets. + example: true + account_type: + type: string + readOnly: true + example: PRODUCTION + completed_at: + type: string + format: date-time + nullable: true + description: The time at which account completes the linking flow. + example: '2024-08-26T20:11:19.277118Z' + x-merge-category: crm + AccountDetailsAndActions: + type: object + description: |- + # The LinkedAccount Object + ### Description + The `LinkedAccount` object is used to represent an end user's link with a specific integration. + + ### Usage Example + View a list of your organization's `LinkedAccount` objects. + properties: + id: + type: string + example: e59b1821-f85c-4e28-a6b3-1804156f3563 + category: + oneOf: + - $ref: '#/components/schemas/CategoryEnum' + - type: string + example: hris + status: + oneOf: + - $ref: '#/components/schemas/AccountDetailsAndActionsStatusEnum' + - type: string + example: INCOMPLETE + status_detail: + type: string + example: Invalid login credentials + end_user_origin_id: + type: string + example: 3ac95cde-6c7f-4eef-afec-be710b42308d + end_user_organization_name: + type: string + example: Foo Bar, LLC + end_user_email_address: + type: string + example: hradmin@foobar.dev + subdomain: + type: string + description: The tenant or domain the customer has provided access to. + example: foobar + webhook_listener_url: + type: string + example: https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 + is_duplicate: + type: boolean + nullable: true + description: Whether a Production Linked Account's credentials match another + existing Production Linked Account. This field is `null` for Test Linked + Accounts, incomplete Production Linked Accounts, and ignored duplicate + Production Linked Account sets. + example: true + integration: + $ref: '#/components/schemas/AccountDetailsAndActionsIntegration' + example: + name: SAP SuccessFactors + categories: + - hris + - ats + image: https://cdn.merge.dev/SuccessFactors_Logo.png + square_image: https://cdn.merge.dev/SuccessFactors_Square_Logo.jpg + color: '#F6A704' + slug: sap-successfactors + passthrough_available: true + available_model_operations: + - model_name: Candidate + available_operations: + - FETCH + - CREATE + required_post_parameters: + - remote_user_id + supported_fields: + - first_name + - last_name + - company + - title + account_type: + type: string + example: PRODUCTION + completed_at: + type: string + format: date-time + example: '2024-08-26T20:11:19.277118Z' + required: + - account_type + - completed_at + - end_user_email_address + - end_user_organization_name + - id + - status + - webhook_listener_url + x-merge-sample-json: '{"id": "e59b1821-f85c-4e28-a6b3-1804156f3563", "category": + "hris", "status": "INCOMPLETE", "status_detail": "Invalid login credentials", + "end_user_origin_id": "3ac95cde-6c7f-4eef-afec-be710b42308d", "end_user_organization_name": + "Foo Bar, LLC", "end_user_email_address": "hradmin@foobar.dev", "webhook_listener_url": + "https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4", + "is_duplicate": true, "integration": {"name": "SAP SuccessFactors", "categories": + ["hris", "ats"], "image": "https://cdn.merge.dev/SuccessFactors_Logo.png", + "square_image": "https://cdn.merge.dev/SuccessFactors_Square_Logo.jpg", "color": + "#F6A704", "slug": "sap-successfactors", "passthrough_available": true, "available_model_operations": + [{"model_name": "Candidate", "available_operations": ["FETCH", "CREATE"], + "required_post_parameters": ["remote_user_id"], "supported_fields": ["first_name", + "last_name", "company", "title"]}]}}' + x-merge-category: crm + AccountDetailsAndActionsIntegration: + type: object + properties: + name: + type: string + categories: + type: array + items: + $ref: '#/components/schemas/CategoriesEnum' + image: + type: string + square_image: + type: string + color: + type: string + slug: + type: string + passthrough_available: + type: boolean + available_model_operations: + type: array + items: + $ref: '#/components/schemas/ModelOperation' + required: + - categories + - color + - name + - passthrough_available + - slug + x-merge-category: crm + AccountDetailsAndActionsStatusEnum: + enum: + - COMPLETE + - INCOMPLETE + - RELINK_NEEDED + - IDLE + type: string + description: |- + * `COMPLETE` - COMPLETE + * `INCOMPLETE` - INCOMPLETE + * `RELINK_NEEDED` - RELINK_NEEDED + * `IDLE` - IDLE + x-merge-category: crm + AccountIntegration: + type: object + properties: + name: + type: string + description: Company name. + abbreviated_name: + type: string + nullable: true + description: "Optional. This shortened name appears in places with limited + space, usually in conjunction with the platform's logo (e.g., Merge Link + menu).

Example: Workforce Now (in lieu of ADP Workforce Now), + SuccessFactors (in lieu of SAP SuccessFactors)" + categories: + type: array + items: + $ref: '#/components/schemas/CategoriesEnum' + description: Category or categories this integration belongs to. Multiple + categories should be comma separated, i.e. [ats, hris]. + readOnly: true + image: + type: string + format: uri + nullable: true + description: Company logo in rectangular shape. + square_image: + type: string + format: uri + nullable: true + description: Company logo in square shape. + color: + type: string + description: The color of this integration used for buttons and text throughout + the app and landing pages. Choose a darker, saturated color. + pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ + maxLength: 18 + slug: + type: string + readOnly: true + api_endpoints_to_documentation_urls: + type: object + additionalProperties: {} + description: "Mapping of API endpoints to documentation urls for support. + Example: {'GET': [['/common-model-scopes', 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', + 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], + 'POST': []}" + webhook_setup_guide_url: + type: string + nullable: true + description: Setup guide URL for third party webhook creation. Exposed in + Merge Docs. + category_beta_status: + type: object + description: Category or categories this integration is in beta status for. + readOnly: true + required: + - name + x-merge-category: crm + AccountRequest: + type: object + description: |- + # The Account Object + ### Description + The `Account` object is used to represent a company in a CRM system. + ### Usage Example + TODO + properties: + owner: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/User' + nullable: true + description: The account's owner. + example: 0258cbc6-6020-430a-848e-aafacbadf4ae + x-merge-expands-to: User + name: + type: string + nullable: true + description: The account's name. + example: Merge API + description: + type: string + nullable: true + description: The account's description. + example: One API for all integrations + industry: + type: string + nullable: true + description: The account's industry. + example: API's + website: + type: string + format: uri + nullable: true + description: The account's website. + maxLength: 2000 + example: https://merge.dev/ + number_of_employees: + type: integer + maximum: 2147483647 + minimum: -2147483648 + nullable: true + description: The account's number of employees. + example: 276000 + addresses: + type: array + items: + $ref: '#/components/schemas/AddressRequest' + example: + - street_1: 50 Bowling Green Dr + street_2: Golden Gate Park + city: San Francisco + state: CA + postal_code: '94122' + country: US + address_type: Shipping + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + last_activity_at: + type: string + format: date-time + nullable: true + description: The last date (either most recent or furthest in the future) + of when an activity occurs in an account. + example: '2022-02-10T00:00:00Z' + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + remote_fields: + type: array + items: + $ref: '#/components/schemas/RemoteFieldRequest' + writeOnly: true + x-merge-expands: '{"owner": "User"}' + x-merge-category: crm + AccountToken: + type: object + properties: + account_token: + type: string + example: T9klMDQrcHdm9jrtHuOS2Nf06BIHwMNjpPXPMB + integration: + $ref: '#/components/schemas/AccountIntegration' + example: + name: SAP SuccessFactors + categories: + - hris + - ats + image: https://cdn.merge.dev/SuccessFactors_Logo.png + square_image: https://cdn.merge.dev/SuccessFactors_Square_Logo.jpg + color: '#F6A704' + slug: sap-successfactors + id: + type: string + example: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd + required: + - account_token + - id + - integration + x-merge-category: crm + ActivityTypeEnum: + enum: + - CALL + - MEETING + - EMAIL + type: string + description: |- + * `CALL` - CALL + * `MEETING` - MEETING + * `EMAIL` - EMAIL + x-merge-category: crm + Address: + type: object + description: |- + # The Address Object + ### Description + The `Address` object is used to represent an entity's address. + ### Usage Example + TODO + properties: + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + street_1: + type: string + nullable: true + description: Line 1 of the address's street. + example: 50 Bowling Green Dr + street_2: + type: string + nullable: true + description: Line 2 of the address's street. + example: Golden Gate Park + city: + type: string + nullable: true + description: The address's city. + example: San Francisco + state: + type: string + nullable: true + description: The address's state. + example: CA + postal_code: + type: string + nullable: true + description: The address's postal code. + example: '94122' + country: + oneOf: + - $ref: '#/components/schemas/CountryEnum' + - type: string + nullable: true + description: |- + The address's country. + + * `AF` - Afghanistan + * `AX` - Åland Islands + * `AL` - Albania + * `DZ` - Algeria + * `AS` - American Samoa + * `AD` - Andorra + * `AO` - Angola + * `AI` - Anguilla + * `AQ` - Antarctica + * `AG` - Antigua and Barbuda + * `AR` - Argentina + * `AM` - Armenia + * `AW` - Aruba + * `AU` - Australia + * `AT` - Austria + * `AZ` - Azerbaijan + * `BS` - Bahamas + * `BH` - Bahrain + * `BD` - Bangladesh + * `BB` - Barbados + * `BY` - Belarus + * `BE` - Belgium + * `BZ` - Belize + * `BJ` - Benin + * `BM` - Bermuda + * `BT` - Bhutan + * `BO` - Bolivia + * `BQ` - Bonaire, Sint Eustatius and Saba + * `BA` - Bosnia and Herzegovina + * `BW` - Botswana + * `BV` - Bouvet Island + * `BR` - Brazil + * `IO` - British Indian Ocean Territory + * `BN` - Brunei + * `BG` - Bulgaria + * `BF` - Burkina Faso + * `BI` - Burundi + * `CV` - Cabo Verde + * `KH` - Cambodia + * `CM` - Cameroon + * `CA` - Canada + * `KY` - Cayman Islands + * `CF` - Central African Republic + * `TD` - Chad + * `CL` - Chile + * `CN` - China + * `CX` - Christmas Island + * `CC` - Cocos (Keeling) Islands + * `CO` - Colombia + * `KM` - Comoros + * `CG` - Congo + * `CD` - Congo (the Democratic Republic of the) + * `CK` - Cook Islands + * `CR` - Costa Rica + * `CI` - Côte d'Ivoire + * `HR` - Croatia + * `CU` - Cuba + * `CW` - Curaçao + * `CY` - Cyprus + * `CZ` - Czechia + * `DK` - Denmark + * `DJ` - Djibouti + * `DM` - Dominica + * `DO` - Dominican Republic + * `EC` - Ecuador + * `EG` - Egypt + * `SV` - El Salvador + * `GQ` - Equatorial Guinea + * `ER` - Eritrea + * `EE` - Estonia + * `SZ` - Eswatini + * `ET` - Ethiopia + * `FK` - Falkland Islands (Malvinas) + * `FO` - Faroe Islands + * `FJ` - Fiji + * `FI` - Finland + * `FR` - France + * `GF` - French Guiana + * `PF` - French Polynesia + * `TF` - French Southern Territories + * `GA` - Gabon + * `GM` - Gambia + * `GE` - Georgia + * `DE` - Germany + * `GH` - Ghana + * `GI` - Gibraltar + * `GR` - Greece + * `GL` - Greenland + * `GD` - Grenada + * `GP` - Guadeloupe + * `GU` - Guam + * `GT` - Guatemala + * `GG` - Guernsey + * `GN` - Guinea + * `GW` - Guinea-Bissau + * `GY` - Guyana + * `HT` - Haiti + * `HM` - Heard Island and McDonald Islands + * `VA` - Holy See + * `HN` - Honduras + * `HK` - Hong Kong + * `HU` - Hungary + * `IS` - Iceland + * `IN` - India + * `ID` - Indonesia + * `IR` - Iran + * `IQ` - Iraq + * `IE` - Ireland + * `IM` - Isle of Man + * `IL` - Israel + * `IT` - Italy + * `JM` - Jamaica + * `JP` - Japan + * `JE` - Jersey + * `JO` - Jordan + * `KZ` - Kazakhstan + * `KE` - Kenya + * `KI` - Kiribati + * `KW` - Kuwait + * `KG` - Kyrgyzstan + * `LA` - Laos + * `LV` - Latvia + * `LB` - Lebanon + * `LS` - Lesotho + * `LR` - Liberia + * `LY` - Libya + * `LI` - Liechtenstein + * `LT` - Lithuania + * `LU` - Luxembourg + * `MO` - Macao + * `MG` - Madagascar + * `MW` - Malawi + * `MY` - Malaysia + * `MV` - Maldives + * `ML` - Mali + * `MT` - Malta + * `MH` - Marshall Islands + * `MQ` - Martinique + * `MR` - Mauritania + * `MU` - Mauritius + * `YT` - Mayotte + * `MX` - Mexico + * `FM` - Micronesia (Federated States of) + * `MD` - Moldova + * `MC` - Monaco + * `MN` - Mongolia + * `ME` - Montenegro + * `MS` - Montserrat + * `MA` - Morocco + * `MZ` - Mozambique + * `MM` - Myanmar + * `NA` - Namibia + * `NR` - Nauru + * `NP` - Nepal + * `NL` - Netherlands + * `NC` - New Caledonia + * `NZ` - New Zealand + * `NI` - Nicaragua + * `NE` - Niger + * `NG` - Nigeria + * `NU` - Niue + * `NF` - Norfolk Island + * `KP` - North Korea + * `MK` - North Macedonia + * `MP` - Northern Mariana Islands + * `NO` - Norway + * `OM` - Oman + * `PK` - Pakistan + * `PW` - Palau + * `PS` - Palestine, State of + * `PA` - Panama + * `PG` - Papua New Guinea + * `PY` - Paraguay + * `PE` - Peru + * `PH` - Philippines + * `PN` - Pitcairn + * `PL` - Poland + * `PT` - Portugal + * `PR` - Puerto Rico + * `QA` - Qatar + * `RE` - Réunion + * `RO` - Romania + * `RU` - Russia + * `RW` - Rwanda + * `BL` - Saint Barthélemy + * `SH` - Saint Helena, Ascension and Tristan da Cunha + * `KN` - Saint Kitts and Nevis + * `LC` - Saint Lucia + * `MF` - Saint Martin (French part) + * `PM` - Saint Pierre and Miquelon + * `VC` - Saint Vincent and the Grenadines + * `WS` - Samoa + * `SM` - San Marino + * `ST` - Sao Tome and Principe + * `SA` - Saudi Arabia + * `SN` - Senegal + * `RS` - Serbia + * `SC` - Seychelles + * `SL` - Sierra Leone + * `SG` - Singapore + * `SX` - Sint Maarten (Dutch part) + * `SK` - Slovakia + * `SI` - Slovenia + * `SB` - Solomon Islands + * `SO` - Somalia + * `ZA` - South Africa + * `GS` - South Georgia and the South Sandwich Islands + * `KR` - South Korea + * `SS` - South Sudan + * `ES` - Spain + * `LK` - Sri Lanka + * `SD` - Sudan + * `SR` - Suriname + * `SJ` - Svalbard and Jan Mayen + * `SE` - Sweden + * `CH` - Switzerland + * `SY` - Syria + * `TW` - Taiwan + * `TJ` - Tajikistan + * `TZ` - Tanzania + * `TH` - Thailand + * `TL` - Timor-Leste + * `TG` - Togo + * `TK` - Tokelau + * `TO` - Tonga + * `TT` - Trinidad and Tobago + * `TN` - Tunisia + * `TR` - Turkey + * `TM` - Turkmenistan + * `TC` - Turks and Caicos Islands + * `TV` - Tuvalu + * `UG` - Uganda + * `UA` - Ukraine + * `AE` - United Arab Emirates + * `GB` - United Kingdom + * `UM` - United States Minor Outlying Islands + * `US` - United States of America + * `UY` - Uruguay + * `UZ` - Uzbekistan + * `VU` - Vanuatu + * `VE` - Venezuela + * `VN` - Vietnam + * `VG` - Virgin Islands (British) + * `VI` - Virgin Islands (U.S.) + * `WF` - Wallis and Futuna + * `EH` - Western Sahara + * `YE` - Yemen + * `ZM` - Zambia + * `ZW` - Zimbabwe + example: US + address_type: + oneOf: + - $ref: '#/components/schemas/AddressTypeEnum' + - type: string + nullable: true + description: |- + The address type. + + * `BILLING` - BILLING + * `SHIPPING` - SHIPPING + example: Shipping + x-merge-nested-write-allowed: true + x-merge-category: crm + AddressRequest: + type: object + description: |- + # The Address Object + ### Description + The `Address` object is used to represent an entity's address. + ### Usage Example + TODO + properties: + street_1: + type: string + nullable: true + description: Line 1 of the address's street. + example: 50 Bowling Green Dr + street_2: + type: string + nullable: true + description: Line 2 of the address's street. + example: Golden Gate Park + city: + type: string + nullable: true + description: The address's city. + example: San Francisco + state: + type: string + nullable: true + description: The address's state. + example: CA + postal_code: + type: string + nullable: true + description: The address's postal code. + example: '94122' + country: + oneOf: + - $ref: '#/components/schemas/CountryEnum' + - type: string + nullable: true + description: |- + The address's country. + + * `AF` - Afghanistan + * `AX` - Åland Islands + * `AL` - Albania + * `DZ` - Algeria + * `AS` - American Samoa + * `AD` - Andorra + * `AO` - Angola + * `AI` - Anguilla + * `AQ` - Antarctica + * `AG` - Antigua and Barbuda + * `AR` - Argentina + * `AM` - Armenia + * `AW` - Aruba + * `AU` - Australia + * `AT` - Austria + * `AZ` - Azerbaijan + * `BS` - Bahamas + * `BH` - Bahrain + * `BD` - Bangladesh + * `BB` - Barbados + * `BY` - Belarus + * `BE` - Belgium + * `BZ` - Belize + * `BJ` - Benin + * `BM` - Bermuda + * `BT` - Bhutan + * `BO` - Bolivia + * `BQ` - Bonaire, Sint Eustatius and Saba + * `BA` - Bosnia and Herzegovina + * `BW` - Botswana + * `BV` - Bouvet Island + * `BR` - Brazil + * `IO` - British Indian Ocean Territory + * `BN` - Brunei + * `BG` - Bulgaria + * `BF` - Burkina Faso + * `BI` - Burundi + * `CV` - Cabo Verde + * `KH` - Cambodia + * `CM` - Cameroon + * `CA` - Canada + * `KY` - Cayman Islands + * `CF` - Central African Republic + * `TD` - Chad + * `CL` - Chile + * `CN` - China + * `CX` - Christmas Island + * `CC` - Cocos (Keeling) Islands + * `CO` - Colombia + * `KM` - Comoros + * `CG` - Congo + * `CD` - Congo (the Democratic Republic of the) + * `CK` - Cook Islands + * `CR` - Costa Rica + * `CI` - Côte d'Ivoire + * `HR` - Croatia + * `CU` - Cuba + * `CW` - Curaçao + * `CY` - Cyprus + * `CZ` - Czechia + * `DK` - Denmark + * `DJ` - Djibouti + * `DM` - Dominica + * `DO` - Dominican Republic + * `EC` - Ecuador + * `EG` - Egypt + * `SV` - El Salvador + * `GQ` - Equatorial Guinea + * `ER` - Eritrea + * `EE` - Estonia + * `SZ` - Eswatini + * `ET` - Ethiopia + * `FK` - Falkland Islands (Malvinas) + * `FO` - Faroe Islands + * `FJ` - Fiji + * `FI` - Finland + * `FR` - France + * `GF` - French Guiana + * `PF` - French Polynesia + * `TF` - French Southern Territories + * `GA` - Gabon + * `GM` - Gambia + * `GE` - Georgia + * `DE` - Germany + * `GH` - Ghana + * `GI` - Gibraltar + * `GR` - Greece + * `GL` - Greenland + * `GD` - Grenada + * `GP` - Guadeloupe + * `GU` - Guam + * `GT` - Guatemala + * `GG` - Guernsey + * `GN` - Guinea + * `GW` - Guinea-Bissau + * `GY` - Guyana + * `HT` - Haiti + * `HM` - Heard Island and McDonald Islands + * `VA` - Holy See + * `HN` - Honduras + * `HK` - Hong Kong + * `HU` - Hungary + * `IS` - Iceland + * `IN` - India + * `ID` - Indonesia + * `IR` - Iran + * `IQ` - Iraq + * `IE` - Ireland + * `IM` - Isle of Man + * `IL` - Israel + * `IT` - Italy + * `JM` - Jamaica + * `JP` - Japan + * `JE` - Jersey + * `JO` - Jordan + * `KZ` - Kazakhstan + * `KE` - Kenya + * `KI` - Kiribati + * `KW` - Kuwait + * `KG` - Kyrgyzstan + * `LA` - Laos + * `LV` - Latvia + * `LB` - Lebanon + * `LS` - Lesotho + * `LR` - Liberia + * `LY` - Libya + * `LI` - Liechtenstein + * `LT` - Lithuania + * `LU` - Luxembourg + * `MO` - Macao + * `MG` - Madagascar + * `MW` - Malawi + * `MY` - Malaysia + * `MV` - Maldives + * `ML` - Mali + * `MT` - Malta + * `MH` - Marshall Islands + * `MQ` - Martinique + * `MR` - Mauritania + * `MU` - Mauritius + * `YT` - Mayotte + * `MX` - Mexico + * `FM` - Micronesia (Federated States of) + * `MD` - Moldova + * `MC` - Monaco + * `MN` - Mongolia + * `ME` - Montenegro + * `MS` - Montserrat + * `MA` - Morocco + * `MZ` - Mozambique + * `MM` - Myanmar + * `NA` - Namibia + * `NR` - Nauru + * `NP` - Nepal + * `NL` - Netherlands + * `NC` - New Caledonia + * `NZ` - New Zealand + * `NI` - Nicaragua + * `NE` - Niger + * `NG` - Nigeria + * `NU` - Niue + * `NF` - Norfolk Island + * `KP` - North Korea + * `MK` - North Macedonia + * `MP` - Northern Mariana Islands + * `NO` - Norway + * `OM` - Oman + * `PK` - Pakistan + * `PW` - Palau + * `PS` - Palestine, State of + * `PA` - Panama + * `PG` - Papua New Guinea + * `PY` - Paraguay + * `PE` - Peru + * `PH` - Philippines + * `PN` - Pitcairn + * `PL` - Poland + * `PT` - Portugal + * `PR` - Puerto Rico + * `QA` - Qatar + * `RE` - Réunion + * `RO` - Romania + * `RU` - Russia + * `RW` - Rwanda + * `BL` - Saint Barthélemy + * `SH` - Saint Helena, Ascension and Tristan da Cunha + * `KN` - Saint Kitts and Nevis + * `LC` - Saint Lucia + * `MF` - Saint Martin (French part) + * `PM` - Saint Pierre and Miquelon + * `VC` - Saint Vincent and the Grenadines + * `WS` - Samoa + * `SM` - San Marino + * `ST` - Sao Tome and Principe + * `SA` - Saudi Arabia + * `SN` - Senegal + * `RS` - Serbia + * `SC` - Seychelles + * `SL` - Sierra Leone + * `SG` - Singapore + * `SX` - Sint Maarten (Dutch part) + * `SK` - Slovakia + * `SI` - Slovenia + * `SB` - Solomon Islands + * `SO` - Somalia + * `ZA` - South Africa + * `GS` - South Georgia and the South Sandwich Islands + * `KR` - South Korea + * `SS` - South Sudan + * `ES` - Spain + * `LK` - Sri Lanka + * `SD` - Sudan + * `SR` - Suriname + * `SJ` - Svalbard and Jan Mayen + * `SE` - Sweden + * `CH` - Switzerland + * `SY` - Syria + * `TW` - Taiwan + * `TJ` - Tajikistan + * `TZ` - Tanzania + * `TH` - Thailand + * `TL` - Timor-Leste + * `TG` - Togo + * `TK` - Tokelau + * `TO` - Tonga + * `TT` - Trinidad and Tobago + * `TN` - Tunisia + * `TR` - Turkey + * `TM` - Turkmenistan + * `TC` - Turks and Caicos Islands + * `TV` - Tuvalu + * `UG` - Uganda + * `UA` - Ukraine + * `AE` - United Arab Emirates + * `GB` - United Kingdom + * `UM` - United States Minor Outlying Islands + * `US` - United States of America + * `UY` - Uruguay + * `UZ` - Uzbekistan + * `VU` - Vanuatu + * `VE` - Venezuela + * `VN` - Vietnam + * `VG` - Virgin Islands (British) + * `VI` - Virgin Islands (U.S.) + * `WF` - Wallis and Futuna + * `EH` - Western Sahara + * `YE` - Yemen + * `ZM` - Zambia + * `ZW` - Zimbabwe + example: US + address_type: + oneOf: + - $ref: '#/components/schemas/AddressTypeEnum' + - type: string + nullable: true + description: |- + The address type. + + * `BILLING` - BILLING + * `SHIPPING` - SHIPPING + example: Shipping + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + x-merge-category: crm + AddressTypeEnum: + enum: + - BILLING + - SHIPPING + type: string + description: |- + * `BILLING` - BILLING + * `SHIPPING` - SHIPPING + x-merge-category: crm + AdvancedMetadata: + type: object + properties: + id: + type: string + format: uuid + display_name: + type: string + description: + type: string + is_required: + type: boolean + is_custom: + type: boolean + field_choices: + type: array + items: {} + required: + - id + x-merge-category: crm + Association: + type: object + description: |- + # The Association Object + ### Description + The `Association` record refers to an instance of an Association Type. + ### Usage Example + TODO + properties: + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + source_object: + type: string + format: uuid + readOnly: true + example: a8f5d29f-4e50-473f-8f12-27128ffcd37a + target_object: + type: string + format: uuid + readOnly: true + example: da0b1963-be70-469c-9f8c-06a81d0fe759 + association_type: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/AssociationType' + nullable: true + description: The association type the association belongs to. + example: 88a71b5c-a3cc-4bce-84ff-d18b049a4081 + x-merge-expands-to: AssociationType + x-merge-expands: '{"association_type": "AssociationType"}' + x-merge-category: crm + AssociationSubType: + type: object + properties: + id: + type: string + nullable: true + readOnly: true + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + origin_type: + type: string + nullable: true + readOnly: true + x-merge-category: crm + AssociationType: + type: object + description: |- + # The AssociationType Object + ### Description + The `Association Type` object represents the relationship between two objects. + ### Usage Example + TODO + properties: + id: + type: string + format: uuid + readOnly: true + example: 5bb73c32-3c6c-4757-ab7d-7d3540a1be31 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '93' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + source_object_class: + type: object + additionalProperties: {} + readOnly: true + description: The class of the source object (Custom Object or Common Model) + for the association type. + example: + id: ff1ff4cb-a66b-47dc-8e2a-50388049e602 + origin_type: CUSTOM_OBJECT + target_object_classes: + type: array + items: + $ref: '#/components/schemas/AssociationSubType' + readOnly: true + example: + - id: Opportunity + origin_type: COMMON_MODEL + x-merge-expands-to: AssociationSubType + remote_key_name: + type: string + nullable: true + example: order_to_opportunity + display_name: + type: string + nullable: true + example: Order to Opportunity + cardinality: + oneOf: + - $ref: '#/components/schemas/CardinalityEnum' + - type: string + nullable: true + example: ONE_TO_MANY + is_required: + type: boolean + x-merge-expands: '{"target_object_classes": "AssociationSubType"}' + x-merge-category: crm + AssociationTypeRequestRequest: + type: object + properties: + source_object_class: + $ref: '#/components/schemas/ObjectClassDescriptionRequest' + target_object_classes: + type: array + items: + $ref: '#/components/schemas/ObjectClassDescriptionRequest' + x-merge-expands-to: AssociationSubType + remote_key_name: + type: string + minLength: 1 + display_name: + type: string + minLength: 1 + cardinality: + $ref: '#/components/schemas/CardinalityEnum' + is_required: + type: boolean + default: false + required: + - remote_key_name + - source_object_class + - target_object_classes + x-merge-expands: '{"target_object_classes": "AssociationSubType"}' + x-merge-category: crm + AsyncPassthroughReciept: + type: object + properties: + async_passthrough_receipt_id: + type: string + format: uuid + example: fd29020f-2695-445e-922e-dcd5e81903fd + required: + - async_passthrough_receipt_id + x-merge-category: crm + AuditLogEvent: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + example: b5ceea2a-7171-47ce-8090-165cfce5572c + user_name: + type: string + nullable: true + description: The User's full name at the time of this Event occurring. + maxLength: 200 + example: Gil Feig + user_email: + type: string + format: email + nullable: true + description: The User's email at the time of this Event occurring. + maxLength: 254 + example: hello@merge.dev + role: + oneOf: + - $ref: '#/components/schemas/RoleEnum' + - type: string + description: |- + Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. + + * `ADMIN` - ADMIN + * `DEVELOPER` - DEVELOPER + * `MEMBER` - MEMBER + * `API` - API + * `SYSTEM` - SYSTEM + * `MERGE_TEAM` - MERGE_TEAM + example: ADMIN + ip_address: + type: string + maxLength: 45 + example: 192.0.2.123 + event_type: + oneOf: + - $ref: '#/components/schemas/EventTypeEnum' + - type: string + description: |- + Designates the type of event that occurred. + + * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + * `INVITED_USER` - INVITED_USER + * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + * `CREATED_DESTINATION` - CREATED_DESTINATION + * `DELETED_DESTINATION` - DELETED_DESTINATION + * `CHANGED_DESTINATION` - CHANGED_DESTINATION + * `CHANGED_SCOPES` - CHANGED_SCOPES + * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + * `ENABLED_CATEGORY` - ENABLED_CATEGORY + * `DISABLED_CATEGORY` - DISABLED_CATEGORY + * `CHANGED_PASSWORD` - CHANGED_PASSWORD + * `RESET_PASSWORD` - RESET_PASSWORD + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING + * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING + * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING + * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING + * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + * `MUTED_ISSUE` - MUTED_ISSUE + * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + example: CHANGED_SCOPES + event_description: + type: string + example: Organization-wide Scopes for model hris.Employee updated from Read + to Read+Write + created_at: + type: string + format: date-time + readOnly: true + required: + - event_description + - event_type + - ip_address + - role + x-merge-category: crm + AvailableActions: + type: object + description: |- + # The AvailableActions Object + ### Description + The `Activity` object is used to see all available model/operation combinations for an integration. + + ### Usage Example + Fetch all the actions available for the `Zenefits` integration. + properties: + integration: + $ref: '#/components/schemas/AccountIntegration' + example: + name: Lever + categories: + - ats + image: https://merge-api-production.s3.amazonaws.com/media/Lever_Logo.png + square_image: https://merge-api-production.s3.amazonaws.com/media/Lever_Square_Logo.png + color: '#262A34' + is_in_beta: 'true' + api_endpoints_to_documentation_urls: "{'GET': [('/common-model-scopes', + 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve')], + 'POST': []}" + passthrough_available: + type: boolean + example: true + available_model_operations: + type: array + items: + $ref: '#/components/schemas/ModelOperation' + example: + - model_name: Candidate + available_operations: + - FETCH + - CREATE + required_post_parameters: + - remote_user_id + supported_fields: + - first_name + - last_name + - company + - title + required: + - integration + - passthrough_available + x-merge-category: crm + CRMAccountEndpointRequest: + type: object + properties: + model: + $ref: '#/components/schemas/AccountRequest' + required: + - model + x-merge-category: crm + CRMAccountResponse: + type: object + properties: + model: + $ref: '#/components/schemas/Account' + warnings: + type: array + items: + $ref: '#/components/schemas/WarningValidationProblem' + errors: + type: array + items: + $ref: '#/components/schemas/ErrorValidationProblem' + logs: + type: array + items: + $ref: '#/components/schemas/DebugModeLog' + required: + - errors + - model + - warnings + x-merge-category: crm + CRMAssociationTypeEndpointRequest: + type: object + properties: + model: + $ref: '#/components/schemas/AssociationTypeRequestRequest' + required: + - model + x-merge-category: crm + CRMAssociationTypeResponse: + type: object + properties: + model: + $ref: '#/components/schemas/AssociationType' + warnings: + type: array + items: + $ref: '#/components/schemas/WarningValidationProblem' + errors: + type: array + items: + $ref: '#/components/schemas/ErrorValidationProblem' + logs: + type: array + items: + $ref: '#/components/schemas/DebugModeLog' + required: + - errors + - model + - warnings + x-merge-category: crm + CRMContactEndpointRequest: + type: object + properties: + model: + $ref: '#/components/schemas/ContactRequest' + required: + - model + x-merge-category: crm + CRMContactResponse: + type: object + properties: + model: + $ref: '#/components/schemas/Contact' + warnings: + type: array + items: + $ref: '#/components/schemas/WarningValidationProblem' + errors: + type: array + items: + $ref: '#/components/schemas/ErrorValidationProblem' + logs: + type: array + items: + $ref: '#/components/schemas/DebugModeLog' + required: + - errors + - model + - warnings + x-merge-category: crm + CRMCustomObjectEndpointRequest: + type: object + properties: + model: + $ref: '#/components/schemas/CustomObjectRequest' + required: + - model + x-merge-category: crm + CRMCustomObjectResponse: + type: object + properties: + model: + $ref: '#/components/schemas/CustomObject' + warnings: + type: array + items: + $ref: '#/components/schemas/WarningValidationProblem' + errors: + type: array + items: + $ref: '#/components/schemas/ErrorValidationProblem' + logs: + type: array + items: + $ref: '#/components/schemas/DebugModeLog' + required: + - errors + - model + - warnings + x-merge-category: crm + CardinalityEnum: + enum: + - ONE_TO_ONE + - MANY_TO_ONE + - MANY_TO_MANY + - ONE_TO_MANY + type: string + description: |- + * `ONE_TO_ONE` - ONE_TO_ONE + * `MANY_TO_ONE` - MANY_TO_ONE + * `MANY_TO_MANY` - MANY_TO_MANY + * `ONE_TO_MANY` - ONE_TO_MANY + x-merge-category: crm + CategoriesEnum: + enum: + - hris + - ats + - accounting + - ticketing + - crm + - mktg + - filestorage + type: string + description: |- + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + x-merge-category: crm + CategoryEnum: + enum: + - hris + - ats + - accounting + - ticketing + - crm + - mktg + - filestorage + type: string + description: |- + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + x-merge-category: crm + CommonModelScopeAPI: + type: object + properties: + common_models: + type: array + items: + $ref: '#/components/schemas/IndividualCommonModelScopeDeserializer' + description: The common models you want to update the scopes for + example: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - created_at + - custom_fields + - date_of_birth + - first_name + - gender + - remote_created_at + - remote_data + disabled_fields: + - company + - employments + - groups + - home_location + - manager + - work_location + required: + - common_models + x-merge-category: crm + CommonModelScopesBodyRequest: + type: object + properties: + model_id: + type: string + minLength: 1 + example: hris.Employee + enabled_actions: + type: array + items: + $ref: '#/components/schemas/EnabledActionsEnum' + example: + - READ + - WRITE + disabled_fields: + type: array + items: + type: string + minLength: 1 + example: + - first_name + required: + - disabled_fields + - enabled_actions + - model_id + x-merge-category: crm + Contact: + type: object + description: |- + # The Contact Object + ### Description + The `Contact` object is used to represent an existing point of contact at a company in a CRM system. + ### Usage Example + TODO + properties: + id: + type: string + format: uuid + readOnly: true + example: 550e8400-e29b-41d4-a716-446655440000 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '19202938' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + first_name: + type: string + nullable: true + description: The contact's first name. + example: Gil + last_name: + type: string + nullable: true + description: The contact's last name. + example: Feig + account: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Account' + nullable: true + description: The contact's account. + example: 0958cbc6-6040-430a-848e-aafacbadf4ae + x-merge-expands-to: Account + owner: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/User' + nullable: true + description: The contact's owner. + example: b8fbfc30-0982-420e-8c20-dab07b70b9d6 + addresses: + type: array + items: + $ref: '#/components/schemas/Address' + example: + - street_1: 50 Bowling Green Dr + street_2: Golden Gate Park + city: San Francisco + state: CA + postal_code: '94122' + country: US + address_type: Shipping + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + email_addresses: + type: array + items: + $ref: '#/components/schemas/EmailAddress' + example: + - email_address: hello@merge.dev + email_address_type: Work + phone_numbers: + type: array + items: + $ref: '#/components/schemas/PhoneNumber' + example: + - phone_number: '+13785579223' + phone_number_type: Mobile + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + last_activity_at: + type: string + format: date-time + nullable: true + description: When the contact's last activity occurred. + example: '2022-02-10T00:00:00Z' + remote_created_at: + type: string + format: date-time + nullable: true + description: When the third party's contact was created. + example: '2021-11-10T00:00:00Z' + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /contacts + data: + - Varies by platform + remote_fields: + type: array + items: + $ref: '#/components/schemas/RemoteField' + readOnly: true + x-merge-expands: '{"account": "Account"}' + x-merge-category: crm + ContactRequest: + type: object + description: |- + # The Contact Object + ### Description + The `Contact` object is used to represent an existing point of contact at a company in a CRM system. + ### Usage Example + TODO + properties: + first_name: + type: string + nullable: true + description: The contact's first name. + example: Gil + last_name: + type: string + nullable: true + description: The contact's last name. + example: Feig + account: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Account' + nullable: true + description: The contact's account. + example: 0958cbc6-6040-430a-848e-aafacbadf4ae + x-merge-expands-to: Account + owner: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/User' + nullable: true + description: The contact's owner. + example: b8fbfc30-0982-420e-8c20-dab07b70b9d6 + addresses: + type: array + items: + $ref: '#/components/schemas/AddressRequest' + example: + - street_1: 50 Bowling Green Dr + street_2: Golden Gate Park + city: San Francisco + state: CA + postal_code: '94122' + country: US + address_type: Shipping + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + email_addresses: + type: array + items: + $ref: '#/components/schemas/EmailAddressRequest' + example: + - email_address: hello@merge.dev + email_address_type: Work + phone_numbers: + type: array + items: + $ref: '#/components/schemas/PhoneNumberRequest' + example: + - phone_number: '+13785579223' + phone_number_type: Mobile + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + last_activity_at: + type: string + format: date-time + nullable: true + description: When the contact's last activity occurred. + example: '2022-02-10T00:00:00Z' + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + remote_fields: + type: array + items: + $ref: '#/components/schemas/RemoteFieldRequest' + writeOnly: true + x-merge-expands: '{"account": "Account"}' + x-merge-category: crm + CountryEnum: + enum: + - AF + - AX + - AL + - DZ + - AS + - AD + - AO + - AI + - AQ + - AG + - AR + - AM + - AW + - AU + - AT + - AZ + - BS + - BH + - BD + - BB + - BY + - BE + - BZ + - BJ + - BM + - BT + - BO + - BQ + - BA + - BW + - BV + - BR + - IO + - BN + - BG + - BF + - BI + - CV + - KH + - CM + - CA + - KY + - CF + - TD + - CL + - CN + - CX + - CC + - CO + - KM + - CG + - CD + - CK + - CR + - CI + - HR + - CU + - CW + - CY + - CZ + - DK + - DJ + - DM + - DO + - EC + - EG + - SV + - GQ + - ER + - EE + - SZ + - ET + - FK + - FO + - FJ + - FI + - FR + - GF + - PF + - TF + - GA + - GM + - GE + - DE + - GH + - GI + - GR + - GL + - GD + - GP + - GU + - GT + - GG + - GN + - GW + - GY + - HT + - HM + - VA + - HN + - HK + - HU + - IS + - IN + - ID + - IR + - IQ + - IE + - IM + - IL + - IT + - JM + - JP + - JE + - JO + - KZ + - KE + - KI + - KW + - KG + - LA + - LV + - LB + - LS + - LR + - LY + - LI + - LT + - LU + - MO + - MG + - MW + - MY + - MV + - ML + - MT + - MH + - MQ + - MR + - MU + - YT + - MX + - FM + - MD + - MC + - MN + - ME + - MS + - MA + - MZ + - MM + - NA + - NR + - NP + - NL + - NC + - NZ + - NI + - NE + - NG + - NU + - NF + - KP + - MK + - MP + - NO + - OM + - PK + - PW + - PS + - PA + - PG + - PY + - PE + - PH + - PN + - PL + - PT + - PR + - QA + - RE + - RO + - RU + - RW + - BL + - SH + - KN + - LC + - MF + - PM + - VC + - WS + - SM + - ST + - SA + - SN + - RS + - SC + - SL + - SG + - SX + - SK + - SI + - SB + - SO + - ZA + - GS + - KR + - SS + - ES + - LK + - SD + - SR + - SJ + - SE + - CH + - SY + - TW + - TJ + - TZ + - TH + - TL + - TG + - TK + - TO + - TT + - TN + - TR + - TM + - TC + - TV + - UG + - UA + - AE + - GB + - UM + - US + - UY + - UZ + - VU + - VE + - VN + - VG + - VI + - WF + - EH + - YE + - ZM + - ZW + type: string + description: |- + * `AF` - Afghanistan + * `AX` - Åland Islands + * `AL` - Albania + * `DZ` - Algeria + * `AS` - American Samoa + * `AD` - Andorra + * `AO` - Angola + * `AI` - Anguilla + * `AQ` - Antarctica + * `AG` - Antigua and Barbuda + * `AR` - Argentina + * `AM` - Armenia + * `AW` - Aruba + * `AU` - Australia + * `AT` - Austria + * `AZ` - Azerbaijan + * `BS` - Bahamas + * `BH` - Bahrain + * `BD` - Bangladesh + * `BB` - Barbados + * `BY` - Belarus + * `BE` - Belgium + * `BZ` - Belize + * `BJ` - Benin + * `BM` - Bermuda + * `BT` - Bhutan + * `BO` - Bolivia + * `BQ` - Bonaire, Sint Eustatius and Saba + * `BA` - Bosnia and Herzegovina + * `BW` - Botswana + * `BV` - Bouvet Island + * `BR` - Brazil + * `IO` - British Indian Ocean Territory + * `BN` - Brunei + * `BG` - Bulgaria + * `BF` - Burkina Faso + * `BI` - Burundi + * `CV` - Cabo Verde + * `KH` - Cambodia + * `CM` - Cameroon + * `CA` - Canada + * `KY` - Cayman Islands + * `CF` - Central African Republic + * `TD` - Chad + * `CL` - Chile + * `CN` - China + * `CX` - Christmas Island + * `CC` - Cocos (Keeling) Islands + * `CO` - Colombia + * `KM` - Comoros + * `CG` - Congo + * `CD` - Congo (the Democratic Republic of the) + * `CK` - Cook Islands + * `CR` - Costa Rica + * `CI` - Côte d'Ivoire + * `HR` - Croatia + * `CU` - Cuba + * `CW` - Curaçao + * `CY` - Cyprus + * `CZ` - Czechia + * `DK` - Denmark + * `DJ` - Djibouti + * `DM` - Dominica + * `DO` - Dominican Republic + * `EC` - Ecuador + * `EG` - Egypt + * `SV` - El Salvador + * `GQ` - Equatorial Guinea + * `ER` - Eritrea + * `EE` - Estonia + * `SZ` - Eswatini + * `ET` - Ethiopia + * `FK` - Falkland Islands (Malvinas) + * `FO` - Faroe Islands + * `FJ` - Fiji + * `FI` - Finland + * `FR` - France + * `GF` - French Guiana + * `PF` - French Polynesia + * `TF` - French Southern Territories + * `GA` - Gabon + * `GM` - Gambia + * `GE` - Georgia + * `DE` - Germany + * `GH` - Ghana + * `GI` - Gibraltar + * `GR` - Greece + * `GL` - Greenland + * `GD` - Grenada + * `GP` - Guadeloupe + * `GU` - Guam + * `GT` - Guatemala + * `GG` - Guernsey + * `GN` - Guinea + * `GW` - Guinea-Bissau + * `GY` - Guyana + * `HT` - Haiti + * `HM` - Heard Island and McDonald Islands + * `VA` - Holy See + * `HN` - Honduras + * `HK` - Hong Kong + * `HU` - Hungary + * `IS` - Iceland + * `IN` - India + * `ID` - Indonesia + * `IR` - Iran + * `IQ` - Iraq + * `IE` - Ireland + * `IM` - Isle of Man + * `IL` - Israel + * `IT` - Italy + * `JM` - Jamaica + * `JP` - Japan + * `JE` - Jersey + * `JO` - Jordan + * `KZ` - Kazakhstan + * `KE` - Kenya + * `KI` - Kiribati + * `KW` - Kuwait + * `KG` - Kyrgyzstan + * `LA` - Laos + * `LV` - Latvia + * `LB` - Lebanon + * `LS` - Lesotho + * `LR` - Liberia + * `LY` - Libya + * `LI` - Liechtenstein + * `LT` - Lithuania + * `LU` - Luxembourg + * `MO` - Macao + * `MG` - Madagascar + * `MW` - Malawi + * `MY` - Malaysia + * `MV` - Maldives + * `ML` - Mali + * `MT` - Malta + * `MH` - Marshall Islands + * `MQ` - Martinique + * `MR` - Mauritania + * `MU` - Mauritius + * `YT` - Mayotte + * `MX` - Mexico + * `FM` - Micronesia (Federated States of) + * `MD` - Moldova + * `MC` - Monaco + * `MN` - Mongolia + * `ME` - Montenegro + * `MS` - Montserrat + * `MA` - Morocco + * `MZ` - Mozambique + * `MM` - Myanmar + * `NA` - Namibia + * `NR` - Nauru + * `NP` - Nepal + * `NL` - Netherlands + * `NC` - New Caledonia + * `NZ` - New Zealand + * `NI` - Nicaragua + * `NE` - Niger + * `NG` - Nigeria + * `NU` - Niue + * `NF` - Norfolk Island + * `KP` - North Korea + * `MK` - North Macedonia + * `MP` - Northern Mariana Islands + * `NO` - Norway + * `OM` - Oman + * `PK` - Pakistan + * `PW` - Palau + * `PS` - Palestine, State of + * `PA` - Panama + * `PG` - Papua New Guinea + * `PY` - Paraguay + * `PE` - Peru + * `PH` - Philippines + * `PN` - Pitcairn + * `PL` - Poland + * `PT` - Portugal + * `PR` - Puerto Rico + * `QA` - Qatar + * `RE` - Réunion + * `RO` - Romania + * `RU` - Russia + * `RW` - Rwanda + * `BL` - Saint Barthélemy + * `SH` - Saint Helena, Ascension and Tristan da Cunha + * `KN` - Saint Kitts and Nevis + * `LC` - Saint Lucia + * `MF` - Saint Martin (French part) + * `PM` - Saint Pierre and Miquelon + * `VC` - Saint Vincent and the Grenadines + * `WS` - Samoa + * `SM` - San Marino + * `ST` - Sao Tome and Principe + * `SA` - Saudi Arabia + * `SN` - Senegal + * `RS` - Serbia + * `SC` - Seychelles + * `SL` - Sierra Leone + * `SG` - Singapore + * `SX` - Sint Maarten (Dutch part) + * `SK` - Slovakia + * `SI` - Slovenia + * `SB` - Solomon Islands + * `SO` - Somalia + * `ZA` - South Africa + * `GS` - South Georgia and the South Sandwich Islands + * `KR` - South Korea + * `SS` - South Sudan + * `ES` - Spain + * `LK` - Sri Lanka + * `SD` - Sudan + * `SR` - Suriname + * `SJ` - Svalbard and Jan Mayen + * `SE` - Sweden + * `CH` - Switzerland + * `SY` - Syria + * `TW` - Taiwan + * `TJ` - Tajikistan + * `TZ` - Tanzania + * `TH` - Thailand + * `TL` - Timor-Leste + * `TG` - Togo + * `TK` - Tokelau + * `TO` - Tonga + * `TT` - Trinidad and Tobago + * `TN` - Tunisia + * `TR` - Turkey + * `TM` - Turkmenistan + * `TC` - Turks and Caicos Islands + * `TV` - Tuvalu + * `UG` - Uganda + * `UA` - Ukraine + * `AE` - United Arab Emirates + * `GB` - United Kingdom + * `UM` - United States Minor Outlying Islands + * `US` - United States of America + * `UY` - Uruguay + * `UZ` - Uzbekistan + * `VU` - Vanuatu + * `VE` - Venezuela + * `VN` - Vietnam + * `VG` - Virgin Islands (British) + * `VI` - Virgin Islands (U.S.) + * `WF` - Wallis and Futuna + * `EH` - Western Sahara + * `YE` - Yemen + * `ZM` - Zambia + * `ZW` - Zimbabwe + x-merge-category: crm + CreateFieldMappingRequest: + type: object + properties: + target_field_name: + type: string + minLength: 1 + description: The name of the target field you want this remote field to + map to. + example: example_target_field_name + target_field_description: + type: string + minLength: 1 + description: The description of the target field you want this remote field + to map to. + example: this is a example description of the target field + remote_field_traversal_path: + type: array + items: {} + description: The field traversal path of the remote field listed when you + hit the GET /remote-fields endpoint. + example: + - example_remote_field + remote_method: + type: string + minLength: 1 + description: The method of the remote endpoint where the remote field is + coming from. + example: GET + remote_url_path: + type: string + minLength: 1 + description: The path of the remote endpoint where the remote field is coming + from. + example: /example-url-path + common_model_name: + type: string + minLength: 1 + description: The name of the Common Model that the remote field corresponds + to in a given category. + example: ExampleCommonModel + required: + - common_model_name + - remote_field_traversal_path + - remote_method + - remote_url_path + - target_field_description + - target_field_name + x-merge-category: crm + CustomObject: + type: object + description: |- + # The CustomObject Object + ### Description + The `Custom Object` record refers to an instance of a Custom Object Class. + ### Usage Example + TODO + properties: + id: + type: string + format: uuid + readOnly: true + example: da0b1963-be70-469c-9f8c-06a81d0fe759 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '4183634295' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + object_class: + type: string + format: uuid + nullable: true + description: The custom object class the custom object record belongs to. + example: ff1ff4cb-a66b-47dc-8e2a-50388049e602 + fields: + type: object + additionalProperties: {} + readOnly: true + description: The fields and values contained within the custom object record. + example: + order_id: '4183634295' + order_quantity: 50 + customer_type: Returning + remote_fields: + type: array + items: + $ref: '#/components/schemas/RemoteField' + readOnly: true + x-merge-category: crm + CustomObjectClass: + type: object + description: |- + # The Custom Object Class Object + ### Description + The `Custom Object Class` object is used to represent a Custom Object Schema in the remote system. + ### Usage Example + TODO + properties: + id: + type: string + format: uuid + readOnly: true + example: ff1ff4cb-a66b-47dc-8e2a-50388049e602 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '9579977' + created_at: + type: string + format: date-time + readOnly: true + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + example: '2021-10-16T00:00:00Z' + name: + type: string + nullable: true + description: The custom object class's name. + example: order + description: + type: string + nullable: true + description: The custom object class's description. + example: Order object + labels: + type: object + additionalProperties: + type: string + nullable: true + readOnly: true + description: The custom object class's singular and plural labels. + example: + singular: Order + plural: Orders + fields: + type: array + items: + $ref: '#/components/schemas/RemoteFieldClassForCustomObjectClass' + readOnly: true + example: + - display_name: Order ID + remote_key_name: order_id + description: The unique ID for the order. + is_required: true + is_nested_list: false + field_type: string + field_format: string + field_choices: [] + item_schema: string + - display_name: Order Quantity + remote_key_name: order_quantity + description: The number of items ordered. + is_required: true + is_nested_list: false + field_type: number + field_format: number + field_choices: [] + item_schema: string + - display_name: Customer Type + remote_key_name: customer_type + description: The type of customer. + is_required: true + is_nested_list: false + field_type: string + field_format: enumeration + field_choices: + - New + - Returning + item_schema: + x-merge-expands-to: RemoteFieldClassForCustomObjectClass + association_types: + type: array + items: + type: object + additionalProperties: {} + nullable: true + readOnly: true + description: The types of associations with other models that the custom + object class can have. + x-merge-expands: '{"fields": "RemoteFieldClassForCustomObjectClass"}' + x-merge-category: crm + CustomObjectRequest: + type: object + properties: + fields: + type: object + additionalProperties: {} + example: + test_field: hello + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + required: + - fields + x-merge-category: crm + DataPassthroughRequest: + type: object + description: |- + # The DataPassthrough Object + ### Description + The `DataPassthrough` object is used to send information to an otherwise-unsupported third-party endpoint. + + ### Usage Example + Create a `DataPassthrough` to get team hierarchies from your Rippling integration. + properties: + method: + allOf: + - $ref: '#/components/schemas/MethodEnum' + example: POST + path: + type: string + minLength: 1 + description: The path of the request in the third party's platform. + example: /scooters + base_url_override: + type: string + nullable: true + minLength: 1 + description: An optional override of the third party's base url for the + request. + example: https://api.example.com + data: + type: string + nullable: true + minLength: 1 + description: The data with the request. You must include a `request_format` + parameter matching the data's format + example: '{"company": "Lime", "model": "Gen 2.5"}' + multipart_form_data: + type: array + items: + $ref: '#/components/schemas/MultipartFormFieldRequest' + nullable: true + description: Pass an array of `MultipartFormField` objects in here instead + of using the `data` param if `request_format` is set to `MULTIPART`. + headers: + type: object + additionalProperties: {} + nullable: true + description: The headers to use for the request (Merge will handle the account's + authorization headers). `Content-Type` header is required for passthrough. + Choose content type corresponding to expected format of receiving server. + example: + EXTRA-HEADER: value + request_format: + allOf: + - $ref: '#/components/schemas/RequestFormatEnum' + nullable: true + example: JSON + normalize_response: + type: boolean + description: 'Optional. If true, the response will always be an object of + the form `{"type": T, "value": ...}` where `T` will be one of `string, + boolean, number, null, array, object`.' + required: + - method + - path + x-merge-category: crm + DebugModeLog: + type: object + properties: + log_id: + type: string + example: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: + type: string + example: https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + $ref: '#/components/schemas/DebugModelLogSummary' + example: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + required: + - dashboard_view + - log_id + - log_summary + x-merge-sample-json: '{"log_id": "99433219-8017-4acd-bb3c-ceb23d663832", "dashboard_view": + "https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832", "log_summary": + {"url": "www.exampleintegration.com/api/v1/exampleapi", "method": "POST", + "status_code": 200}}' + x-merge-category: crm + DebugModelLogSummary: + type: object + properties: + url: + type: string + example: www.exampleintegration.com/api/v1/exampleapi + method: + type: string + example: POST + status_code: + type: integer + example: 200 + required: + - method + - status_code + - url + x-merge-sample-json: '{"url": "www.exampleintegration.com/api/v1/exampleapi", + "method": "POST", "status_code": 200}' + x-merge-category: crm + DirectionEnum: + enum: + - INBOUND + - OUTBOUND + type: string + description: |- + * `INBOUND` - INBOUND + * `OUTBOUND` - OUTBOUND + x-merge-category: crm + EmailAddress: + type: object + description: |- + # The EmailAddress Object + ### Description + The `EmailAddress` object is used to represent an entity's email address. + ### Usage Example + Fetch from the `GET Contact` endpoint and view their email addresses. + properties: + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + email_address: + type: string + nullable: true + description: The email address. + example: merge_is_hiring@merge.dev + email_address_type: + type: string + nullable: true + description: The email address's type. + example: Work + x-merge-nested-write-allowed: true + x-merge-category: crm + EmailAddressRequest: + type: object + description: |- + # The EmailAddress Object + ### Description + The `EmailAddress` object is used to represent an entity's email address. + ### Usage Example + Fetch from the `GET Contact` endpoint and view their email addresses. + properties: + email_address: + type: string + nullable: true + description: The email address. + example: merge_is_hiring@merge.dev + email_address_type: + type: string + nullable: true + description: The email address's type. + example: Work + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + x-merge-category: crm + EnabledActionsEnum: + enum: + - READ + - WRITE + type: string + description: |- + * `READ` - READ + * `WRITE` - WRITE + x-merge-category: crm + EncodingEnum: + enum: + - RAW + - BASE64 + - GZIP_BASE64 + type: string + description: |- + * `RAW` - RAW + * `BASE64` - BASE64 + * `GZIP_BASE64` - GZIP_BASE64 + x-merge-category: crm + EndUserDetailsRequest: + type: object + properties: + end_user_email_address: + type: string + minLength: 1 + description: Your end user's email address. This is purely for identification + purposes - setting this value will not cause any emails to be sent. + maxLength: 100 + example: example@gmail.com + end_user_organization_name: + type: string + minLength: 1 + description: Your end user's organization. + maxLength: 100 + example: Test Organization + end_user_origin_id: + type: string + minLength: 1 + description: 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. + maxLength: 100 + example: '12345' + categories: + type: array + items: + $ref: '#/components/schemas/CategoriesEnum' + description: The integration categories to show in Merge Link. + example: + - hris + - ats + integration: + type: string + nullable: true + minLength: 1 + description: 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/. + example: bamboohr + link_expiry_mins: + type: integer + maximum: 10080 + minimum: 30 + default: 30 + description: An integer number of minutes between [30, 720 or 10080 if for + a Magic Link URL] for how long this token is valid. Defaults to 30. + should_create_magic_link_url: + type: boolean + nullable: true + default: false + description: Whether to generate a Magic Link URL. Defaults to false. For + more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. + hide_admin_magic_link: + type: boolean + nullable: true + default: false + description: 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: + type: array + items: + $ref: '#/components/schemas/CommonModelScopesBodyRequest' + nullable: true + description: An array of objects to specify the models and fields that will + be disabled for a given Linked Account. Each object uses model_id, enabled_actions, + and disabled_fields to specify the model, method, and fields that are + scoped for a given Linked Account. + category_common_model_scopes: + type: object + additionalProperties: + type: array + items: + $ref: '#/components/schemas/IndividualCommonModelScopeDeserializerRequest' + nullable: true + description: 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. + example: + hris: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: true + field_permissions: + enabled_fields: + - first_name + - last_name + - personal_email + disabled_fields: + - preferred_name + - model_name: Employment + model_permissions: + READ: + is_enabled: false + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - effective_date + ats: + - model_name: Job + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: true + field_permissions: + enabled_fields: + - name + disabled_fields: + - description + - model_name: Department + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: true + language: + oneOf: + - $ref: '#/components/schemas/LanguageEnum' + - type: string + nullable: true + description: |- + The following subset of IETF language tags can be used to configure localization. + + * `en` - en + * `de` - de + example: en + are_syncs_disabled: + type: boolean + nullable: true + default: false + description: The boolean that indicates whether initial, periodic, and force + syncs will be disabled. + integration_specific_config: + type: object + additionalProperties: {} + nullable: true + description: A JSON object containing integration-specific configuration + options. + example: + rippling: + oauth_code: 3h1jj8ssdf31dfji3o1jjdfjasd + required: + - categories + - end_user_email_address + - end_user_organization_name + - end_user_origin_id + x-merge-category: crm + Engagement: + type: object + description: |- + # The Engagement Object + ### Description + The `Engagement` object is used to represent an interaction noted in a CRM system. + ### Usage Example + TODO + properties: + id: + type: string + format: uuid + readOnly: true + example: 550e8400-e29b-41d4-a716-446655440000 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '19202938' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + owner: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/User' + nullable: true + description: The engagement's owner. + example: 0358cbc6-2040-430a-848e-aafacbadf3aa + x-merge-expands-to: User + content: + type: string + nullable: true + description: The engagement's content. + example: Call for negotiation + subject: + type: string + nullable: true + description: The engagement's subject. + example: Call from customer + direction: + oneOf: + - $ref: '#/components/schemas/DirectionEnum' + - type: string + nullable: true + description: |- + The engagement's direction. + + * `INBOUND` - INBOUND + * `OUTBOUND` - OUTBOUND + example: INBOUND + engagement_type: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/EngagementType' + nullable: true + description: The engagement type of the engagement. + example: 0358cbc6-2040-430a-848e-aafacbadf3aa + x-merge-expands-to: EngagementType + start_time: + type: string + format: date-time + nullable: true + description: The time at which the engagement started. + example: '2022-02-10T00:00:00Z' + end_time: + type: string + format: date-time + nullable: true + description: The time at which the engagement ended. + example: '2022-02-10T00:05:00Z' + account: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Account' + nullable: true + description: The account of the engagement. + example: 025fjlc6-6000-430a-848e-aafacbadf4fe + x-merge-expands-to: Account + contacts: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Contact' + nullable: true + example: + - a7c55bc6-2940-c80a-848e-bbfacbfdf4fg + x-merge-expands-to: Contact + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /engagements + data: + - Varies by platform + remote_fields: + type: array + items: + $ref: '#/components/schemas/RemoteField' + readOnly: true + x-merge-expands: '{"account": "Account", "contacts": "Contact", "engagement_type": + "EngagementType", "owner": "User"}' + x-merge-category: crm + EngagementEndpointRequest: + type: object + properties: + model: + $ref: '#/components/schemas/EngagementRequest' + required: + - model + x-merge-category: crm + EngagementRequest: + type: object + description: |- + # The Engagement Object + ### Description + The `Engagement` object is used to represent an interaction noted in a CRM system. + ### Usage Example + TODO + properties: + owner: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/User' + nullable: true + description: The engagement's owner. + example: 0358cbc6-2040-430a-848e-aafacbadf3aa + x-merge-expands-to: User + content: + type: string + nullable: true + description: The engagement's content. + example: Call for negotiation + subject: + type: string + nullable: true + description: The engagement's subject. + example: Call from customer + direction: + oneOf: + - $ref: '#/components/schemas/DirectionEnum' + - type: string + nullable: true + description: |- + The engagement's direction. + + * `INBOUND` - INBOUND + * `OUTBOUND` - OUTBOUND + example: INBOUND + engagement_type: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/EngagementType' + nullable: true + description: The engagement type of the engagement. + example: 0358cbc6-2040-430a-848e-aafacbadf3aa + x-merge-expands-to: EngagementType + start_time: + type: string + format: date-time + nullable: true + description: The time at which the engagement started. + example: '2022-02-10T00:00:00Z' + end_time: + type: string + format: date-time + nullable: true + description: The time at which the engagement ended. + example: '2022-02-10T00:05:00Z' + account: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Account' + nullable: true + description: The account of the engagement. + example: 025fjlc6-6000-430a-848e-aafacbadf4fe + x-merge-expands-to: Account + contacts: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Contact' + nullable: true + example: + - a7c55bc6-2940-c80a-848e-bbfacbfdf4fg + x-merge-expands-to: Contact + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + remote_fields: + type: array + items: + $ref: '#/components/schemas/RemoteFieldRequest' + writeOnly: true + x-merge-expands: '{"account": "Account", "contacts": "Contact", "engagement_type": + "EngagementType", "owner": "User"}' + x-merge-category: crm + EngagementResponse: + type: object + properties: + model: + $ref: '#/components/schemas/Engagement' + warnings: + type: array + items: + $ref: '#/components/schemas/WarningValidationProblem' + errors: + type: array + items: + $ref: '#/components/schemas/ErrorValidationProblem' + logs: + type: array + items: + $ref: '#/components/schemas/DebugModeLog' + required: + - errors + - model + - warnings + x-merge-category: crm + EngagementType: + type: object + description: |- + # The Engagement Type Object + ### Description + The `Engagement Type` object is used to represent an interaction activity. A given `Engagement` typically has an `Engagement Type` object represented in the engagement_type field. + ### Usage Example + TODO + properties: + id: + type: string + format: uuid + readOnly: true + example: 550e8400-e29b-41d4-a716-446655440000 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '19202938' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + activity_type: + oneOf: + - $ref: '#/components/schemas/ActivityTypeEnum' + - type: string + nullable: true + description: |- + The engagement type's activity type. + + * `CALL` - CALL + * `MEETING` - MEETING + * `EMAIL` - EMAIL + example: CALL + name: + type: string + nullable: true + description: The engagement type's name. + example: First Call + remote_fields: + type: array + items: + $ref: '#/components/schemas/RemoteField' + readOnly: true + x-merge-category: crm + ErrorValidationProblem: + type: object + properties: + source: + $ref: '#/components/schemas/ValidationProblemSource' + example: + pointer: /model/custom_fields + title: + type: string + example: Missing Required Field + detail: + type: string + example: custom_fields is a required field on model. + problem_type: + type: string + example: MISSING_REQUIRED_FIELD + required: + - detail + - problem_type + - title + x-merge-category: crm + EventTypeEnum: + enum: + - 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 + type: string + description: |- + * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + * `INVITED_USER` - INVITED_USER + * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + * `CREATED_DESTINATION` - CREATED_DESTINATION + * `DELETED_DESTINATION` - DELETED_DESTINATION + * `CHANGED_DESTINATION` - CHANGED_DESTINATION + * `CHANGED_SCOPES` - CHANGED_SCOPES + * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + * `ENABLED_CATEGORY` - ENABLED_CATEGORY + * `DISABLED_CATEGORY` - DISABLED_CATEGORY + * `CHANGED_PASSWORD` - CHANGED_PASSWORD + * `RESET_PASSWORD` - RESET_PASSWORD + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING + * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING + * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING + * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING + * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + * `MUTED_ISSUE` - MUTED_ISSUE + * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + x-merge-category: crm + ExternalTargetFieldAPI: + type: object + properties: + name: + type: string + nullable: true + readOnly: true + example: example_target_field_name + description: + type: string + nullable: true + readOnly: true + example: this is a example description of a target field + is_mapped: + type: string + nullable: true + readOnly: true + example: true + x-merge-category: crm + ExternalTargetFieldAPIResponse: + type: object + properties: + Account: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + Contact: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + Lead: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + Note: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + Opportunity: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + Stage: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + User: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + Task: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + Engagement: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + x-merge-category: crm + FieldFormatEnum: + enum: + - string + - number + - date + - datetime + - bool + - list + type: string + description: |- + * `string` - string + * `number` - number + * `date` - date + * `datetime` - datetime + * `bool` - bool + * `list` - list + x-merge-category: crm + FieldMappingApiInstance: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: + type: boolean + readOnly: true + target_field: + type: object + properties: + name: + type: string + description: + type: string + is_organization_wide: + type: boolean + required: + - description + - is_organization_wide + - name + nullable: true + readOnly: true + example: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + type: object + properties: + remote_key_name: + type: string + nullable: true + schema: + type: object + additionalProperties: {} + nullable: true + remote_endpoint_info: + type: object + properties: + method: + type: string + nullable: true + url_path: + type: string + nullable: true + field_traversal_path: + type: array + items: + type: string + nullable: true + required: + - field_traversal_path + - method + - url_path + required: + - remote_endpoint_info + - remote_key_name + - schema + nullable: true + readOnly: true + example: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + x-merge-category: crm + FieldMappingApiInstanceResponse: + type: object + properties: + Account: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + Contact: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + Lead: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + Note: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + Opportunity: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + Stage: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + User: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + Task: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + Engagement: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + x-merge-category: crm + FieldMappingInstanceResponse: + type: object + properties: + model: + $ref: '#/components/schemas/FieldMappingApiInstance' + warnings: + type: array + items: + $ref: '#/components/schemas/WarningValidationProblem' + errors: + type: array + items: + $ref: '#/components/schemas/ErrorValidationProblem' + logs: + type: array + items: + $ref: '#/components/schemas/DebugModeLog' + required: + - errors + - model + - warnings + x-merge-category: crm + FieldPermissionDeserializer: + type: object + properties: + enabled_fields: + type: array + items: {} + disabled_fields: + type: array + items: {} + x-merge-category: crm + FieldPermissionDeserializerRequest: + type: object + properties: + enabled_fields: + type: array + items: {} + disabled_fields: + type: array + items: {} + x-merge-category: crm + FieldTypeEnum: + enum: + - string + - number + - date + - datetime + - bool + - list + type: string + description: |- + * `string` - string + * `number` - number + * `date` - date + * `datetime` - datetime + * `bool` - bool + * `list` - list + x-merge-category: crm + GenerateRemoteKeyRequest: + type: object + description: |- + # The GenerateRemoteKey Object + ### Description + The `GenerateRemoteKey` object is used to represent a request for a new remote key. + + ### Usage Example + Post a `GenerateRemoteKey` to create a new remote key. + properties: + name: + type: string + minLength: 1 + description: The name of the remote key + example: Remote Deployment Key 1 + required: + - name + x-merge-category: crm + IgnoreCommonModelRequest: + type: object + properties: + reason: + oneOf: + - $ref: '#/components/schemas/ReasonEnum' + - type: string + example: GENERAL_CUSTOMER_REQUEST + message: + type: string + minLength: 1 + maxLength: 256 + example: deletion request by user id 51903790-7dfe-4053-8d63-5a10cc4ffd39 + required: + - reason + x-merge-category: crm + IndividualCommonModelScopeDeserializer: + type: object + properties: + model_name: + type: string + model_permissions: + type: object + additionalProperties: + $ref: '#/components/schemas/ModelPermissionDeserializer' + field_permissions: + $ref: '#/components/schemas/FieldPermissionDeserializer' + required: + - model_name + x-merge-category: crm + IndividualCommonModelScopeDeserializerRequest: + type: object + properties: + model_name: + type: string + minLength: 1 + model_permissions: + type: object + additionalProperties: + $ref: '#/components/schemas/ModelPermissionDeserializerRequest' + field_permissions: + $ref: '#/components/schemas/FieldPermissionDeserializerRequest' + required: + - model_name + x-merge-category: crm + Issue: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + status: + oneOf: + - $ref: '#/components/schemas/IssueStatusEnum' + - type: string + description: |- + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + example: ONGOING + error_description: + type: string + example: Missing Permissions + end_user: + type: object + additionalProperties: {} + readOnly: true + example: b82302de-852e-4e60-b050-edf9da3b7c02 + first_incident_time: + type: string + format: date-time + nullable: true + example: '2022-12-05T16:19:15.161Z' + last_incident_time: + type: string + format: date-time + nullable: true + example: '2022-12-05T16:19:15.161Z' + is_muted: + type: boolean + readOnly: true + example: true + error_details: + type: array + items: + type: string + readOnly: true + example: + - Missing employee permissions. + - Missing time off permissions. + required: + - error_description + x-merge-category: crm + IssueStatusEnum: + enum: + - ONGOING + - RESOLVED + type: string + description: |- + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + x-merge-category: crm + ItemFormatEnum: + enum: + - string + - number + - date + - datetime + - bool + - list + type: string + description: |- + * `string` - uuid + * `number` - url + * `date` - email + * `datetime` - phone + * `bool` - currency + * `list` - decimal + x-merge-category: crm + ItemSchema: + type: object + properties: + item_type: + $ref: '#/components/schemas/ItemTypeEnum' + item_format: + $ref: '#/components/schemas/ItemFormatEnum' + item_choices: + type: array + items: + type: string + x-merge-category: crm + ItemTypeEnum: + enum: + - string + - number + - date + - datetime + - bool + - list + type: string + description: |- + * `string` - string + * `number` - number + * `date` - date + * `datetime` - datetime + * `bool` - bool + * `list` - list + x-merge-category: crm + LanguageEnum: + enum: + - en + - de + type: string + description: |- + * `en` - en + * `de` - de + x-merge-category: crm + LastSyncResultEnum: + enum: + - SYNCING + - DONE + - FAILED + - DISABLED + - PAUSED + - PARTIALLY_SYNCED + type: string + description: |- + * `SYNCING` - SYNCING + * `DONE` - DONE + * `FAILED` - FAILED + * `DISABLED` - DISABLED + * `PAUSED` - PAUSED + * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED + x-merge-category: crm + Lead: + type: object + description: |- + # The Lead Object + ### Description + The `Lead` object is used to represent an individual who is a potential customer. + ### Usage Example + TODO + properties: + id: + type: string + format: uuid + readOnly: true + example: 550e8400-e29b-41d4-a716-446655440000 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '19202938' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + owner: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/User' + nullable: true + description: The lead's owner. + example: 0358cbc6-2040-430a-848e-aafacbadf3aa + x-merge-expands-to: User + lead_source: + type: string + nullable: true + description: The lead's source. + example: API Blogger + title: + type: string + nullable: true + description: The lead's title. + example: Co-Founder + company: + type: string + nullable: true + description: The lead's company. + example: Merge API + first_name: + type: string + nullable: true + description: The lead's first name. + example: Gil + last_name: + type: string + nullable: true + description: The lead's last name. + example: Feig + addresses: + type: array + items: + $ref: '#/components/schemas/Address' + readOnly: true + example: + - street_1: 50 Bowling Green Dr + street_2: Golden Gate Park + city: San Francisco + state: CA + postal_code: '94122' + country: US + address_type: Shipping + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + email_addresses: + type: array + items: + $ref: '#/components/schemas/EmailAddress' + readOnly: true + example: + - email_address: hello@merge.dev + email_address_type: Work + phone_numbers: + type: array + items: + $ref: '#/components/schemas/PhoneNumber' + readOnly: true + example: + - phone_number: '+16789932455' + phone_number_type: Mobile + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + remote_updated_at: + type: string + format: date-time + nullable: true + description: When the third party's lead was updated. + example: '2022-02-10T00:00:00Z' + remote_created_at: + type: string + format: date-time + nullable: true + description: When the third party's lead was created. + example: '2021-11-10T00:00:00Z' + converted_date: + type: string + format: date-time + nullable: true + description: When the lead was converted. + example: '2022-03-10T00:00:00Z' + converted_contact: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Contact' + nullable: true + description: The contact of the converted lead. + example: 025fjlc6-6000-430a-848e-aafacbadf4fe + x-merge-expands-to: Contact + converted_account: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Account' + nullable: true + description: The account of the converted lead. + example: 9c9de072-29cf-48e3-9578-1ca5b145b40e + x-merge-expands-to: Account + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /leads + data: + - Varies by platform + remote_fields: + type: array + items: + $ref: '#/components/schemas/RemoteField' + readOnly: true + x-merge-expands: '{"converted_account": "Account", "converted_contact": "Contact", + "owner": "User"}' + x-merge-category: crm + LeadEndpointRequest: + type: object + properties: + model: + $ref: '#/components/schemas/LeadRequest' + required: + - model + x-merge-category: crm + LeadRequest: + type: object + description: |- + # The Lead Object + ### Description + The `Lead` object is used to represent an individual who is a potential customer. + ### Usage Example + TODO + properties: + owner: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/User' + nullable: true + description: The lead's owner. + example: 0358cbc6-2040-430a-848e-aafacbadf3aa + x-merge-expands-to: User + lead_source: + type: string + nullable: true + description: The lead's source. + example: API Blogger + title: + type: string + nullable: true + description: The lead's title. + example: Co-Founder + company: + type: string + nullable: true + description: The lead's company. + example: Merge API + first_name: + type: string + nullable: true + description: The lead's first name. + example: Gil + last_name: + type: string + nullable: true + description: The lead's last name. + example: Feig + addresses: + type: array + items: + $ref: '#/components/schemas/AddressRequest' + example: + - street_1: 50 Bowling Green Dr + street_2: Golden Gate Park + city: San Francisco + state: CA + postal_code: '94122' + country: US + address_type: Shipping + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + email_addresses: + type: array + items: + $ref: '#/components/schemas/EmailAddressRequest' + example: + - email_address: hello@merge.dev + email_address_type: Work + phone_numbers: + type: array + items: + $ref: '#/components/schemas/PhoneNumberRequest' + example: + - phone_number: '+16789932455' + phone_number_type: Mobile + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + converted_date: + type: string + format: date-time + nullable: true + description: When the lead was converted. + example: '2022-03-10T00:00:00Z' + converted_contact: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Contact' + nullable: true + description: The contact of the converted lead. + example: 025fjlc6-6000-430a-848e-aafacbadf4fe + x-merge-expands-to: Contact + converted_account: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Account' + nullable: true + description: The account of the converted lead. + example: 9c9de072-29cf-48e3-9578-1ca5b145b40e + x-merge-expands-to: Account + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + remote_fields: + type: array + items: + $ref: '#/components/schemas/RemoteFieldRequest' + writeOnly: true + x-merge-expands: '{"converted_account": "Account", "converted_contact": "Contact", + "owner": "User"}' + x-merge-category: crm + LeadResponse: + type: object + properties: + model: + $ref: '#/components/schemas/Lead' + warnings: + type: array + items: + $ref: '#/components/schemas/WarningValidationProblem' + errors: + type: array + items: + $ref: '#/components/schemas/ErrorValidationProblem' + logs: + type: array + items: + $ref: '#/components/schemas/DebugModeLog' + required: + - errors + - model + - warnings + x-merge-category: crm + LinkToken: + type: object + properties: + link_token: + type: string + example: necdP7FtdASl1fQwm62be2_dM4wBG8_GactqoUV0 + integration_name: + type: string + example: Lever + magic_link_url: + type: string + example: https://link.merge.dev/asdfjkl12345jsndfgi2i83n + required: + - link_token + x-merge-category: crm + LinkedAccountCommonModelScopeDeserializerRequest: + type: object + properties: + common_models: + type: array + items: + $ref: '#/components/schemas/IndividualCommonModelScopeDeserializerRequest' + description: The common models you want to update the scopes for + example: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - home_location + disabled_fields: + - work_location + - model_name: Benefit + model_permissions: + WRITE: + is_enabled: false + required: + - common_models + x-merge-category: crm + LinkedAccountStatus: + type: object + properties: + linked_account_status: + type: string + can_make_request: + type: boolean + required: + - can_make_request + - linked_account_status + x-merge-category: crm + MetaResponse: + type: object + properties: + request_schema: + type: object + additionalProperties: {} + example: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + type: object + additionalProperties: {} + status: + $ref: '#/components/schemas/LinkedAccountStatus' + example: + linked_account_status: COMPLETE + can_make_request: true + has_conditional_params: + type: boolean + has_required_linked_account_params: + type: boolean + required: + - has_conditional_params + - has_required_linked_account_params + - request_schema + x-merge-category: crm + MethodEnum: + enum: + - GET + - OPTIONS + - HEAD + - POST + - PUT + - PATCH + - DELETE + type: string + description: |- + * `GET` - GET + * `OPTIONS` - OPTIONS + * `HEAD` - HEAD + * `POST` - POST + * `PUT` - PUT + * `PATCH` - PATCH + * `DELETE` - DELETE + x-merge-category: crm + ModelOperation: + type: object + description: |- + # The ModelOperation Object + ### Description + The `ModelOperation` object is used to represent the operations that are currently supported for a given model. + + ### Usage Example + View what operations are supported for the `Candidate` endpoint. + properties: + model_name: + type: string + example: Candidate + available_operations: + type: array + items: + type: string + example: + - FETCH + - CREATE + required_post_parameters: + type: array + items: + type: string + example: + - remote_user_id + supported_fields: + type: array + items: + type: string + example: + - first_name + - last_name + - company + - title + required: + - available_operations + - model_name + - required_post_parameters + - supported_fields + x-merge-category: crm + ModelPermissionDeserializer: + type: object + properties: + is_enabled: + type: boolean + x-merge-category: crm + ModelPermissionDeserializerRequest: + type: object + properties: + is_enabled: + type: boolean + x-merge-category: crm + MultipartFormFieldRequest: + type: object + description: |- + # The MultipartFormField Object + ### Description + The `MultipartFormField` object is used to represent fields in an HTTP request using `multipart/form-data`. + + ### Usage Example + Create a `MultipartFormField` to define a multipart form entry. + properties: + name: + type: string + minLength: 1 + description: The name of the form field + example: resume + data: + type: string + minLength: 1 + description: The data for the form field. + example: SW50ZWdyYXRlIGZhc3QKSW50ZWdyYXRlIG9uY2U= + encoding: + oneOf: + - $ref: '#/components/schemas/EncodingEnum' + - type: string + nullable: true + default: RAW + description: |- + The encoding of the value of `data`. Defaults to `RAW` if not defined. + + * `RAW` - RAW + * `BASE64` - BASE64 + * `GZIP_BASE64` - GZIP_BASE64 + example: BASE64 + file_name: + type: string + nullable: true + minLength: 1 + description: The file name of the form field, if the field is for a file. + example: resume.pdf + content_type: + type: string + nullable: true + minLength: 1 + description: The MIME type of the file, if the field is for a file. + example: application/pdf + required: + - data + - name + x-merge-category: crm + Note: + type: object + description: |- + # The Note Object + ### Description + The `Note` object is used to represent a note on another object. + ### Usage Example + TODO + properties: + id: + type: string + format: uuid + readOnly: true + example: 550e8400-e29b-41d4-a716-446655440000 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '19202938' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + owner: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/User' + nullable: true + description: The note's owner. + example: 0358cbc6-2040-430a-848e-aafacbadf3aa + x-merge-expands-to: User + content: + type: string + nullable: true + description: The note's content. + example: Merge is hiring! + contact: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Contact' + nullable: true + description: The note's contact. + example: 025fjlc6-6000-430a-848e-aafacbadf4fe + x-merge-expands-to: Contact + account: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Account' + nullable: true + description: The note's account. + example: fba1fbc6-67c0-4cb2-a176-7896acd2ffd5 + x-merge-expands-to: Account + opportunity: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Opportunity' + nullable: true + description: The note's opportunity. + example: 754a244e-dd67-4731-a8d3-9bff9dc10465 + x-merge-expands-to: Opportunity + remote_updated_at: + type: string + format: date-time + nullable: true + description: When the third party's lead was updated. + example: '2022-02-10T00:00:00Z' + remote_created_at: + type: string + format: date-time + nullable: true + description: When the third party's lead was created. + example: '2021-11-10T00:00:00Z' + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /notes + data: + - Varies by platform + remote_fields: + type: array + items: + $ref: '#/components/schemas/RemoteField' + readOnly: true + x-merge-expands: '{"account": "Account", "contact": "Contact", "opportunity": + "Opportunity", "owner": "User"}' + x-merge-category: crm + NoteEndpointRequest: + type: object + properties: + model: + $ref: '#/components/schemas/NoteRequest' + required: + - model + x-merge-category: crm + NoteRequest: + type: object + description: |- + # The Note Object + ### Description + The `Note` object is used to represent a note on another object. + ### Usage Example + TODO + properties: + owner: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/User' + nullable: true + description: The note's owner. + example: 0358cbc6-2040-430a-848e-aafacbadf3aa + x-merge-expands-to: User + content: + type: string + nullable: true + description: The note's content. + example: Merge is hiring! + contact: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Contact' + nullable: true + description: The note's contact. + example: 025fjlc6-6000-430a-848e-aafacbadf4fe + x-merge-expands-to: Contact + account: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Account' + nullable: true + description: The note's account. + example: fba1fbc6-67c0-4cb2-a176-7896acd2ffd5 + x-merge-expands-to: Account + opportunity: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Opportunity' + nullable: true + description: The note's opportunity. + example: 754a244e-dd67-4731-a8d3-9bff9dc10465 + x-merge-expands-to: Opportunity + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + remote_fields: + type: array + items: + $ref: '#/components/schemas/RemoteFieldRequest' + writeOnly: true + x-merge-expands: '{"account": "Account", "contact": "Contact", "opportunity": + "Opportunity", "owner": "User"}' + x-merge-category: crm + NoteResponse: + type: object + properties: + model: + $ref: '#/components/schemas/Note' + warnings: + type: array + items: + $ref: '#/components/schemas/WarningValidationProblem' + errors: + type: array + items: + $ref: '#/components/schemas/ErrorValidationProblem' + logs: + type: array + items: + $ref: '#/components/schemas/DebugModeLog' + required: + - errors + - model + - warnings + x-merge-category: crm + ObjectClassDescriptionRequest: + type: object + properties: + id: + type: string + minLength: 1 + origin_type: + $ref: '#/components/schemas/OriginTypeEnum' + required: + - id + - origin_type + x-merge-category: crm + Opportunity: + type: object + description: |- + # The Opportunity Object + ### Description + The `Opportunity` object is used to represent a deal opportunity in a CRM system. + ### Usage Example + TODO + properties: + id: + type: string + format: uuid + readOnly: true + example: 550e8400-e29b-41d4-a716-446655440000 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '19202938' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + name: + type: string + nullable: true + description: The opportunity's name. + example: Needs Integrations + description: + type: string + nullable: true + description: The opportunity's description. + example: Needs a Unified API for Integrations! + amount: + type: integer + maximum: 2147483647 + minimum: -2147483648 + nullable: true + description: The opportunity's amount. + example: 100000 + owner: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/User' + nullable: true + description: The opportunity's owner. + example: 0358cbc6-2040-430a-848e-aafacbadf3aa + x-merge-expands-to: User + account: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Account' + nullable: true + description: The account of the opportunity. + example: 0958cbc6-6040-430a-848e-aafacbadf4ae + x-merge-expands-to: Account + stage: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Stage' + nullable: true + description: The stage of the opportunity. + example: 1968cbc6-6040-430a-848e-aafacbadf4ad + x-merge-expands-to: Stage + status: + oneOf: + - $ref: '#/components/schemas/OpportunityStatusEnum' + - type: string + nullable: true + description: |- + The opportunity's status. + + * `OPEN` - OPEN + * `WON` - WON + * `LOST` - LOST + example: WON + last_activity_at: + type: string + format: date-time + nullable: true + description: When the opportunity's last activity occurred. + example: '2022-02-10T00:00:00Z' + close_date: + type: string + format: date-time + nullable: true + description: When the opportunity was closed. + example: '2022-02-10T00:00:00Z' + remote_created_at: + type: string + format: date-time + nullable: true + description: When the third party's opportunity was created. + example: '2021-11-10T00:00:00Z' + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /opportunities + data: + - Varies by platform + remote_fields: + type: array + items: + $ref: '#/components/schemas/RemoteField' + readOnly: true + x-merge-expands: '{"account": "Account", "owner": "User", "stage": "Stage"}' + x-merge-category: crm + OpportunityEndpointRequest: + type: object + properties: + model: + $ref: '#/components/schemas/OpportunityRequest' + required: + - model + x-merge-category: crm + OpportunityRequest: + type: object + description: |- + # The Opportunity Object + ### Description + The `Opportunity` object is used to represent a deal opportunity in a CRM system. + ### Usage Example + TODO + properties: + name: + type: string + nullable: true + description: The opportunity's name. + example: Needs Integrations + description: + type: string + nullable: true + description: The opportunity's description. + example: Needs a Unified API for Integrations! + amount: + type: integer + maximum: 2147483647 + minimum: -2147483648 + nullable: true + description: The opportunity's amount. + example: 100000 + owner: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/User' + nullable: true + description: The opportunity's owner. + example: 0358cbc6-2040-430a-848e-aafacbadf3aa + x-merge-expands-to: User + account: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Account' + nullable: true + description: The account of the opportunity. + example: 0958cbc6-6040-430a-848e-aafacbadf4ae + x-merge-expands-to: Account + stage: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Stage' + nullable: true + description: The stage of the opportunity. + example: 1968cbc6-6040-430a-848e-aafacbadf4ad + x-merge-expands-to: Stage + status: + oneOf: + - $ref: '#/components/schemas/OpportunityStatusEnum' + - type: string + nullable: true + description: |- + The opportunity's status. + + * `OPEN` - OPEN + * `WON` - WON + * `LOST` - LOST + example: WON + last_activity_at: + type: string + format: date-time + nullable: true + description: When the opportunity's last activity occurred. + example: '2022-02-10T00:00:00Z' + close_date: + type: string + format: date-time + nullable: true + description: When the opportunity was closed. + example: '2022-02-10T00:00:00Z' + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + remote_fields: + type: array + items: + $ref: '#/components/schemas/RemoteFieldRequest' + writeOnly: true + x-merge-expands: '{"account": "Account", "owner": "User", "stage": "Stage"}' + x-merge-category: crm + OpportunityResponse: + type: object + properties: + model: + $ref: '#/components/schemas/Opportunity' + warnings: + type: array + items: + $ref: '#/components/schemas/WarningValidationProblem' + errors: + type: array + items: + $ref: '#/components/schemas/ErrorValidationProblem' + logs: + type: array + items: + $ref: '#/components/schemas/DebugModeLog' + required: + - errors + - model + - warnings + x-merge-category: crm + OpportunityStatusEnum: + enum: + - OPEN + - WON + - LOST + type: string + description: |- + * `OPEN` - OPEN + * `WON` - WON + * `LOST` - LOST + x-merge-category: crm + OriginTypeEnum: + enum: + - CUSTOM_OBJECT + - COMMON_MODEL + - REMOTE_ONLY_MODEL + type: string + description: |- + * `CUSTOM_OBJECT` - CUSTOM_OBJECT + * `COMMON_MODEL` - COMMON_MODEL + * `REMOTE_ONLY_MODEL` - REMOTE_ONLY_MODEL + x-merge-category: crm + PaginatedAccountDetailsAndActionsList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/AccountDetailsAndActions' + x-merge-category: crm + PaginatedAccountList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Account' + x-merge-category: crm + PaginatedAssociationList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Association' + x-merge-category: crm + PaginatedAssociationTypeList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/AssociationType' + x-merge-category: crm + PaginatedAuditLogEventList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/AuditLogEvent' + x-merge-category: crm + PaginatedContactList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Contact' + x-merge-category: crm + PaginatedCustomObjectClassList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/CustomObjectClass' + x-merge-category: crm + PaginatedCustomObjectList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/CustomObject' + x-merge-category: crm + PaginatedEngagementList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Engagement' + x-merge-category: crm + PaginatedEngagementTypeList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/EngagementType' + x-merge-category: crm + PaginatedIssueList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Issue' + x-merge-category: crm + PaginatedLeadList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Lead' + x-merge-category: crm + PaginatedNoteList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Note' + x-merge-category: crm + PaginatedOpportunityList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Opportunity' + x-merge-category: crm + PaginatedRemoteFieldClassList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/RemoteFieldClass' + x-merge-category: crm + PaginatedStageList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Stage' + x-merge-category: crm + PaginatedSyncStatusList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/SyncStatus' + x-merge-category: crm + PaginatedTaskList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Task' + x-merge-category: crm + PaginatedUserList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/User' + x-merge-category: crm + PatchedAccountRequest: + type: object + description: |- + # The Account Object + ### Description + The `Account` object is used to represent a company in a CRM system. + ### Usage Example + TODO + properties: + owner: + type: string + format: uuid + nullable: true + description: The account's owner. + example: 0258cbc6-6020-430a-848e-aafacbadf4ae + name: + type: string + nullable: true + description: The account's name. + example: Merge API + description: + type: string + nullable: true + description: The account's description. + example: One API for all integrations + industry: + type: string + nullable: true + description: The account's industry. + example: API's + website: + type: string + format: uri + nullable: true + description: The account's website. + maxLength: 2000 + example: https://merge.dev/ + number_of_employees: + type: integer + maximum: 2147483647 + minimum: -2147483648 + nullable: true + description: The account's number of employees. + example: 276000 + addresses: + type: array + items: + $ref: '#/components/schemas/AddressRequest' + example: + - street_1: 50 Bowling Green Dr + street_2: Golden Gate Park + city: San Francisco + state: CA + postal_code: '94122' + country: US + address_type: Shipping + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + last_activity_at: + type: string + format: date-time + nullable: true + description: The last date (either most recent or furthest in the future) + of when an activity occurs in an account. + example: '2022-02-10T00:00:00Z' + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + remote_fields: + type: array + items: + $ref: '#/components/schemas/RemoteFieldRequest' + writeOnly: true + x-merge-category: crm + PatchedCRMAccountEndpointRequest: + type: object + properties: + model: + $ref: '#/components/schemas/PatchedAccountRequest' + required: + - model + x-merge-category: crm + PatchedCRMContactEndpointRequest: + type: object + properties: + model: + $ref: '#/components/schemas/PatchedContactRequest' + required: + - model + x-merge-category: crm + PatchedContactRequest: + type: object + description: |- + # The Contact Object + ### Description + The `Contact` object is used to represent an existing point of contact at a company in a CRM system. + ### Usage Example + TODO + properties: + first_name: + type: string + nullable: true + description: The contact's first name. + example: Gil + last_name: + type: string + nullable: true + description: The contact's last name. + example: Feig + account: + type: string + format: uuid + nullable: true + description: The contact's account. + example: 0958cbc6-6040-430a-848e-aafacbadf4ae + owner: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/User' + nullable: true + description: The contact's owner. + example: b8fbfc30-0982-420e-8c20-dab07b70b9d6 + addresses: + type: array + items: + $ref: '#/components/schemas/AddressRequest' + example: + - street_1: 50 Bowling Green Dr + street_2: Golden Gate Park + city: San Francisco + state: CA + postal_code: '94122' + country: US + address_type: Shipping + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + email_addresses: + type: array + items: + $ref: '#/components/schemas/EmailAddressRequest' + example: + - email_address: hello@merge.dev + email_address_type: Work + phone_numbers: + type: array + items: + $ref: '#/components/schemas/PhoneNumberRequest' + example: + - phone_number: '+13785579223' + phone_number_type: Mobile + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + last_activity_at: + type: string + format: date-time + nullable: true + description: When the contact's last activity occurred. + example: '2022-02-10T00:00:00Z' + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + remote_fields: + type: array + items: + $ref: '#/components/schemas/RemoteFieldRequest' + writeOnly: true + x-merge-category: crm + PatchedEditFieldMappingRequest: + type: object + properties: + remote_field_traversal_path: + type: array + items: {} + description: The field traversal path of the remote field listed when you + hit the GET /remote-fields endpoint. + example: + - example_remote_field_name + remote_method: + type: string + minLength: 1 + description: The method of the remote endpoint where the remote field is + coming from. + example: GET + remote_url_path: + type: string + minLength: 1 + description: The path of the remote endpoint where the remote field is coming + from. + example: /example-url-path + x-merge-category: crm + PatchedEngagementEndpointRequest: + type: object + properties: + model: + $ref: '#/components/schemas/PatchedEngagementRequest' + required: + - model + x-merge-category: crm + PatchedEngagementRequest: + type: object + description: |- + # The Engagement Object + ### Description + The `Engagement` object is used to represent an interaction noted in a CRM system. + ### Usage Example + TODO + properties: + owner: + type: string + format: uuid + nullable: true + description: The engagement's owner. + example: 0358cbc6-2040-430a-848e-aafacbadf3aa + content: + type: string + nullable: true + description: The engagement's content. + example: Call for negotiation + subject: + type: string + nullable: true + description: The engagement's subject. + example: Call from customer + direction: + oneOf: + - $ref: '#/components/schemas/DirectionEnum' + - type: string + nullable: true + description: |- + The engagement's direction. + + * `INBOUND` - INBOUND + * `OUTBOUND` - OUTBOUND + example: INBOUND + engagement_type: + type: string + format: uuid + nullable: true + description: The engagement type of the engagement. + example: 0358cbc6-2040-430a-848e-aafacbadf3aa + start_time: + type: string + format: date-time + nullable: true + description: The time at which the engagement started. + example: '2022-02-10T00:00:00Z' + end_time: + type: string + format: date-time + nullable: true + description: The time at which the engagement ended. + example: '2022-02-10T00:05:00Z' + account: + type: string + format: uuid + nullable: true + description: The account of the engagement. + example: 025fjlc6-6000-430a-848e-aafacbadf4fe + contacts: + type: array + items: + type: string + format: uuid + nullable: true + example: + - a7c55bc6-2940-c80a-848e-bbfacbfdf4fg + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + remote_fields: + type: array + items: + $ref: '#/components/schemas/RemoteFieldRequest' + writeOnly: true + x-merge-category: crm + PatchedOpportunityEndpointRequest: + type: object + properties: + model: + $ref: '#/components/schemas/PatchedOpportunityRequest' + required: + - model + x-merge-category: crm + PatchedOpportunityRequest: + type: object + description: |- + # The Opportunity Object + ### Description + The `Opportunity` object is used to represent a deal opportunity in a CRM system. + ### Usage Example + TODO + properties: + name: + type: string + nullable: true + description: The opportunity's name. + example: Needs Integrations + description: + type: string + nullable: true + description: The opportunity's description. + example: Needs a Unified API for Integrations! + amount: + type: integer + maximum: 2147483647 + minimum: -2147483648 + nullable: true + description: The opportunity's amount. + example: 100000 + owner: + type: string + format: uuid + nullable: true + description: The opportunity's owner. + example: 0358cbc6-2040-430a-848e-aafacbadf3aa + account: + type: string + format: uuid + nullable: true + description: The account of the opportunity. + example: 0958cbc6-6040-430a-848e-aafacbadf4ae + stage: + type: string + format: uuid + nullable: true + description: The stage of the opportunity. + example: 1968cbc6-6040-430a-848e-aafacbadf4ad + status: + oneOf: + - $ref: '#/components/schemas/OpportunityStatusEnum' + - type: string + nullable: true + description: |- + The opportunity's status. + + * `OPEN` - OPEN + * `WON` - WON + * `LOST` - LOST + example: WON + last_activity_at: + type: string + format: date-time + nullable: true + description: When the opportunity's last activity occurred. + example: '2022-02-10T00:00:00Z' + close_date: + type: string + format: date-time + nullable: true + description: When the opportunity was closed. + example: '2022-02-10T00:00:00Z' + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + remote_fields: + type: array + items: + $ref: '#/components/schemas/RemoteFieldRequest' + writeOnly: true + x-merge-category: crm + PatchedTaskEndpointRequest: + type: object + properties: + model: + $ref: '#/components/schemas/PatchedTaskRequest' + required: + - model + x-merge-category: crm + PatchedTaskRequest: + type: object + description: |- + # The Task Object + ### Description + The `Task` object is used to represent a task, such as a to-do item. + ### Usage Example + TODO + properties: + subject: + type: string + nullable: true + description: The task's subject. + example: Contact about Integration Strategy + content: + type: string + nullable: true + description: The task's content. + example: Follow up to see whether they need integrations + owner: + type: string + format: uuid + nullable: true + description: The task's owner. + example: 0358cbc6-2040-430a-848e-aafacbadf3aa + account: + type: string + format: uuid + nullable: true + description: The task's account. + example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + opportunity: + type: string + format: uuid + nullable: true + description: The task's opportunity. + example: 550e8400-e29b-41d4-a716-446655440000 + completed_date: + type: string + format: date-time + nullable: true + description: When the task is completed. + example: '2022-02-11T00:00:00Z' + due_date: + type: string + format: date-time + nullable: true + description: When the task is due. + example: '2022-02-10T00:00:00Z' + status: + oneOf: + - $ref: '#/components/schemas/TaskStatusEnum' + - type: string + nullable: true + description: |- + The task's status. + + * `OPEN` - OPEN + * `CLOSED` - CLOSED + example: OPEN + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + remote_fields: + type: array + items: + $ref: '#/components/schemas/RemoteFieldRequest' + writeOnly: true + x-merge-category: crm + PhoneNumber: + type: object + description: |- + # The PhoneNumber Object + ### Description + The `PhoneNumber` object is used to represent an entity's phone number. + ### Usage Example + Fetch from the `GET Contact` endpoint and view their phone numbers. + properties: + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + phone_number: + type: string + nullable: true + description: The phone number. + example: '+3198675309' + phone_number_type: + type: string + nullable: true + description: The phone number's type. + example: Mobile + x-merge-nested-write-allowed: true + x-merge-category: crm + PhoneNumberRequest: + type: object + description: |- + # The PhoneNumber Object + ### Description + The `PhoneNumber` object is used to represent an entity's phone number. + ### Usage Example + Fetch from the `GET Contact` endpoint and view their phone numbers. + properties: + phone_number: + type: string + nullable: true + description: The phone number. + example: '+3198675309' + phone_number_type: + type: string + nullable: true + description: The phone number's type. + example: Mobile + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + x-merge-category: crm + ReasonEnum: + enum: + - GENERAL_CUSTOMER_REQUEST + - GDPR + - OTHER + type: string + description: |- + * `GENERAL_CUSTOMER_REQUEST` - GENERAL_CUSTOMER_REQUEST + * `GDPR` - GDPR + * `OTHER` - OTHER + x-merge-category: crm + RemoteData: + type: object + description: |- + # The RemoteData Object + ### Description + The `RemoteData` object is used to represent the full data pulled from the third-party API for an object. + + ### Usage Example + TODO + properties: + path: + type: string + description: The third-party API path that is being called. + example: /platform-endpoint + data: + readOnly: true + description: The data returned from the third-party for this object in its + original, unnormalized format. + example: + - Varies by platform + required: + - path + x-merge-category: crm + RemoteEndpointInfo: + type: object + properties: + method: + type: string + example: GET + url_path: + type: string + example: /example-url-path + field_traversal_path: + type: array + items: {} + example: + - example_key_name + required: + - field_traversal_path + - method + - url_path + x-merge-category: crm + RemoteField: + type: object + properties: + remote_field_class: + oneOf: + - type: string + - $ref: '#/components/schemas/RemoteFieldClass' + x-merge-expands-to: RemoteFieldClass + value: + nullable: true + example: string + required: + - remote_field_class + x-merge-expands: '{"remote_field_class": "RemoteFieldClass"}' + x-merge-category: crm + RemoteFieldAPI: + type: object + properties: + schema: + type: object + additionalProperties: {} + example: + type: string + remote_key_name: + type: string + example: example_remote_key_name + remote_endpoint_info: + $ref: '#/components/schemas/RemoteEndpointInfo' + example: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + type: array + items: {} + nullable: true + example: + - example + advanced_metadata: + allOf: + - $ref: '#/components/schemas/AdvancedMetadata' + nullable: true + coverage: + oneOf: + - type: integer + - type: number + format: double + nullable: true + readOnly: true + example: 0.33 + required: + - advanced_metadata + - remote_endpoint_info + - remote_key_name + - schema + x-merge-category: crm + RemoteFieldAPIResponse: + type: object + properties: + Account: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + Contact: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + Lead: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + Note: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + Opportunity: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + Stage: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + User: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + Task: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + Engagement: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + x-merge-category: crm + RemoteFieldClass: + type: object + properties: + id: + type: string + display_name: + type: string + remote_key_name: + type: string + description: + type: string + is_custom: + type: boolean + is_required: + type: boolean + field_type: + $ref: '#/components/schemas/FieldTypeEnum' + field_format: + $ref: '#/components/schemas/FieldFormatEnum' + field_choices: + type: array + items: + type: object + properties: + value: + nullable: true + display_name: + type: string + nullable: true + nullable: true + item_schema: + $ref: '#/components/schemas/ItemSchema' + x-merge-category: crm + RemoteFieldClassForCustomObjectClass: + type: object + properties: + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + display_name: + type: string + nullable: true + remote_key_name: + type: string + nullable: true + description: + type: string + nullable: true + is_required: + type: boolean + field_type: + oneOf: + - $ref: '#/components/schemas/FieldTypeEnum' + - type: string + readOnly: true + field_format: + oneOf: + - $ref: '#/components/schemas/FieldFormatEnum' + - type: string + readOnly: true + field_choices: + type: array + items: + type: object + properties: + value: + nullable: true + display_name: + type: string + nullable: true + nullable: true + readOnly: true + item_schema: + type: object + properties: + item_type: + type: string + nullable: true + item_format: + type: string + nullable: true + item_choices: + type: array + items: + type: string + nullable: true + nullable: true + required: + - item_choices + - item_format + - item_type + nullable: true + readOnly: true + x-merge-category: crm + RemoteFieldRequest: + type: object + properties: + remote_field_class: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/RemoteFieldClass' + example: b057d1d2-c204-4da8-a74c-c91d1a260614 + x-merge-expands-to: RemoteFieldClass + value: + nullable: true + example: string + required: + - remote_field_class + x-merge-expands: '{"remote_field_class": "RemoteFieldClass"}' + x-merge-category: crm + RemoteKey: + type: object + description: |- + # The RemoteKey Object + ### Description + The `RemoteKey` object is used to represent a request for a new remote key. + + ### Usage Example + Post a `GenerateRemoteKey` to receive a new `RemoteKey`. + properties: + name: + type: string + example: Remote Deployment Key 1 + key: + type: string + example: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA + required: + - key + - name + x-merge-category: crm + RemoteKeyForRegenerationRequest: + type: object + description: |- + # The RemoteKeyForRegeneration Object + ### Description + The `RemoteKeyForRegeneration` object is used to exchange an old remote key for a new one + + ### Usage Example + Post a `RemoteKeyForRegeneration` to swap out an old remote key for a new one + properties: + name: + type: string + minLength: 1 + description: The name of the remote key + example: Remote Deployment Key 1 + required: + - name + x-merge-category: crm + RemoteResponse: + type: object + description: |- + # The RemoteResponse Object + ### Description + The `RemoteResponse` object is used to represent information returned from a third-party endpoint. + + ### Usage Example + View the `RemoteResponse` returned from your `DataPassthrough`. + properties: + method: + type: string + example: GET + path: + type: string + example: /scooters + status: + type: integer + example: 200 + response: + example: + scooters: + - company: Lime + model: Gen 2.5 + - company: Bird + model: Bird Zero + response_headers: + type: object + additionalProperties: {} + example: + X-Page-Token: value + response_type: + oneOf: + - $ref: '#/components/schemas/ResponseTypeEnum' + - type: string + example: JSON + headers: + type: object + additionalProperties: {} + example: + EXTRA-HEADER: value + Authorization: + required: + - method + - path + - response + - status + x-merge-category: crm + RequestFormatEnum: + enum: + - JSON + - XML + - MULTIPART + type: string + description: |- + * `JSON` - JSON + * `XML` - XML + * `MULTIPART` - MULTIPART + x-merge-category: crm + ResponseTypeEnum: + enum: + - JSON + - BASE64_GZIP + type: string + description: |- + * `JSON` - JSON + * `BASE64_GZIP` - BASE64_GZIP + x-merge-category: crm + RoleEnum: + enum: + - ADMIN + - DEVELOPER + - MEMBER + - API + - SYSTEM + - MERGE_TEAM + type: string + description: |- + * `ADMIN` - ADMIN + * `DEVELOPER` - DEVELOPER + * `MEMBER` - MEMBER + * `API` - API + * `SYSTEM` - SYSTEM + * `MERGE_TEAM` - MERGE_TEAM + x-merge-category: crm + SelectiveSyncConfigurationsUsageEnum: + enum: + - IN_NEXT_SYNC + - IN_LAST_SYNC + type: string + description: |- + * `IN_NEXT_SYNC` - IN_NEXT_SYNC + * `IN_LAST_SYNC` - IN_LAST_SYNC + x-merge-category: crm + Stage: + type: object + description: |- + # The Stage Object + ### Description + The `Stage` object is used to represent the stage of an opportunity. + ### Usage Example + TODO + properties: + id: + type: string + format: uuid + readOnly: true + example: 0358cbc6-2040-430a-848e-aafacbadf3aa + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '19202938' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + name: + type: string + nullable: true + description: The stage's name. + example: Closed Won + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /stages + data: + - Varies by platform + remote_fields: + type: array + items: + $ref: '#/components/schemas/RemoteField' + readOnly: true + x-merge-category: crm + StatusFd5Enum: + enum: + - SYNCING + - DONE + - FAILED + - DISABLED + - PAUSED + - PARTIALLY_SYNCED + type: string + description: |- + * `SYNCING` - SYNCING + * `DONE` - DONE + * `FAILED` - FAILED + * `DISABLED` - DISABLED + * `PAUSED` - PAUSED + * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED + x-merge-category: crm + SyncStatus: + type: object + description: |- + # The SyncStatus Object + ### Description + The `SyncStatus` object is used to represent the syncing state of an account + + ### Usage Example + View the `SyncStatus` for an account to see how recently its models were synced. + properties: + model_name: + type: string + example: Account + model_id: + type: string + example: crm.Account + last_sync_start: + type: string + format: date-time + example: '2021-03-30T19:44:18.695973Z' + next_sync_start: + type: string + format: date-time + example: '2021-03-30T20:44:18.662942Z' + last_sync_result: + oneOf: + - $ref: '#/components/schemas/LastSyncResultEnum' + - type: string + example: DONE + last_sync_finished: + type: string + format: date-time + example: '2021-03-30T19:55:18.695973Z' + status: + oneOf: + - $ref: '#/components/schemas/StatusFd5Enum' + - type: string + example: SYNCING + is_initial_sync: + type: boolean + example: true + selective_sync_configurations_usage: + $ref: '#/components/schemas/SelectiveSyncConfigurationsUsageEnum' + required: + - is_initial_sync + - model_id + - model_name + - status + x-merge-sample-json: '{"model_name": "Candidate", "model_id": "ats.Candidate", + "last_sync_start": "2021-03-30T19:44:18.695973Z", "next_sync_start": "2021-03-30T20:44:18.662942Z", + "status": "SYNCING", "is_initial_sync": true}' + x-merge-category: crm + Task: + type: object + description: |- + # The Task Object + ### Description + The `Task` object is used to represent a task, such as a to-do item. + ### Usage Example + TODO + properties: + id: + type: string + format: uuid + readOnly: true + example: 550e8400-e29b-41d4-a716-446655440000 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '19202938' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + subject: + type: string + nullable: true + description: The task's subject. + example: Contact about Integration Strategy + content: + type: string + nullable: true + description: The task's content. + example: Follow up to see whether they need integrations + owner: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/User' + nullable: true + description: The task's owner. + example: 0358cbc6-2040-430a-848e-aafacbadf3aa + x-merge-expands-to: User + account: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Account' + nullable: true + description: The task's account. + example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + x-merge-expands-to: Account + opportunity: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Opportunity' + nullable: true + description: The task's opportunity. + example: 550e8400-e29b-41d4-a716-446655440000 + x-merge-expands-to: Opportunity + completed_date: + type: string + format: date-time + nullable: true + description: When the task is completed. + example: '2022-02-11T00:00:00Z' + due_date: + type: string + format: date-time + nullable: true + description: When the task is due. + example: '2022-02-10T00:00:00Z' + status: + oneOf: + - $ref: '#/components/schemas/TaskStatusEnum' + - type: string + nullable: true + description: |- + The task's status. + + * `OPEN` - OPEN + * `CLOSED` - CLOSED + example: OPEN + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /tasks + data: + - Varies by platform + remote_fields: + type: array + items: + $ref: '#/components/schemas/RemoteField' + readOnly: true + x-merge-expands: '{"account": "Account", "opportunity": "Opportunity", "owner": + "User"}' + x-merge-category: crm + TaskEndpointRequest: + type: object + properties: + model: + $ref: '#/components/schemas/TaskRequest' + required: + - model + x-merge-category: crm + TaskRequest: + type: object + description: |- + # The Task Object + ### Description + The `Task` object is used to represent a task, such as a to-do item. + ### Usage Example + TODO + properties: + subject: + type: string + nullable: true + description: The task's subject. + example: Contact about Integration Strategy + content: + type: string + nullable: true + description: The task's content. + example: Follow up to see whether they need integrations + owner: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/User' + nullable: true + description: The task's owner. + example: 0358cbc6-2040-430a-848e-aafacbadf3aa + x-merge-expands-to: User + account: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Account' + nullable: true + description: The task's account. + example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + x-merge-expands-to: Account + opportunity: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Opportunity' + nullable: true + description: The task's opportunity. + example: 550e8400-e29b-41d4-a716-446655440000 + x-merge-expands-to: Opportunity + completed_date: + type: string + format: date-time + nullable: true + description: When the task is completed. + example: '2022-02-11T00:00:00Z' + due_date: + type: string + format: date-time + nullable: true + description: When the task is due. + example: '2022-02-10T00:00:00Z' + status: + oneOf: + - $ref: '#/components/schemas/TaskStatusEnum' + - type: string + nullable: true + description: |- + The task's status. + + * `OPEN` - OPEN + * `CLOSED` - CLOSED + example: OPEN + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + remote_fields: + type: array + items: + $ref: '#/components/schemas/RemoteFieldRequest' + writeOnly: true + x-merge-expands: '{"account": "Account", "opportunity": "Opportunity", "owner": + "User"}' + x-merge-category: crm + TaskResponse: + type: object + properties: + model: + $ref: '#/components/schemas/Task' + warnings: + type: array + items: + $ref: '#/components/schemas/WarningValidationProblem' + errors: + type: array + items: + $ref: '#/components/schemas/ErrorValidationProblem' + logs: + type: array + items: + $ref: '#/components/schemas/DebugModeLog' + required: + - errors + - model + - warnings + x-merge-category: crm + TaskStatusEnum: + enum: + - OPEN + - CLOSED + type: string + description: |- + * `OPEN` - OPEN + * `CLOSED` - CLOSED + x-merge-category: crm + User: + type: object + description: |- + # The User Object + ### Description + The `User` object is used to represent a user with a login to the CRM system. + ### Usage Example + TODO + properties: + id: + type: string + format: uuid + readOnly: true + example: 0358cbc6-2040-430a-848e-aafacbadf3aa + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '19202938' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + name: + type: string + nullable: true + description: The user's name. + example: Gil Feig + email: + type: string + nullable: true + description: The user's email address. + example: merge_is_hiring@merge.dev + is_active: + type: boolean + nullable: true + description: Whether or not the user is active. + example: true + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /users + data: + - Varies by platform + remote_fields: + type: array + items: + $ref: '#/components/schemas/RemoteField' + readOnly: true + x-merge-expands: '{"roles": "Role", "teams": "Team"}' + x-merge-category: crm + ValidationProblemSource: + type: object + properties: + pointer: + type: string + required: + - pointer + x-merge-category: crm + WarningValidationProblem: + type: object + properties: + source: + $ref: '#/components/schemas/ValidationProblemSource' + example: + pointer: /age + title: + type: string + example: Unrecognized Field + detail: + type: string + example: An unrecognized field, age, was passed in with request data. + problem_type: + type: string + example: UNRECOGNIZED_FIELD + required: + - detail + - problem_type + - title + x-merge-category: crm + WebhookReceiver: + type: object + properties: + event: + type: string + is_active: + type: boolean + key: + type: string + required: + - event + - is_active + x-merge-category: crm + WebhookReceiverRequest: + type: object + properties: + event: + type: string + minLength: 1 + is_active: + type: boolean + key: + type: string + minLength: 1 + required: + - event + - is_active + x-merge-category: crm + securitySchemes: + tokenAuth: + type: http + scheme: bearer + description: Token-based authentication with required prefix "Bearer" + x-fern-token-variable-name: api_key +servers: +- url: https://api.merge.dev/api/crm/v1 + description: Production + x-fern-server-name: Production +- url: https://api-sandbox.merge.dev/api/crm/v1 + description: Sandbox + x-fern-server-name: Sandbox +- url: https://api-eu.merge.dev/api/crm/v1 + description: Production EU + x-fern-server-name: ProductionEU +- url: https://api-ap.merge.dev/api/crm/v1 + description: Production APSE1 + x-fern-server-name: ProductionAPSE1 diff --git a/.mock/definition/ATS/__package__.yml b/.mock/definition/ATS/__package__.yml new file mode 100644 index 000000000..791d099f4 --- /dev/null +++ b/.mock/definition/ATS/__package__.yml @@ -0,0 +1,4734 @@ +types: + AccessRoleEnum: + enum: + - SUPER_ADMIN + - ADMIN + - TEAM_MEMBER + - LIMITED_TEAM_MEMBER + - INTERVIEWER + docs: |- + * `SUPER_ADMIN` - SUPER_ADMIN + * `ADMIN` - ADMIN + * `TEAM_MEMBER` - TEAM_MEMBER + * `LIMITED_TEAM_MEMBER` - LIMITED_TEAM_MEMBER + * `INTERVIEWER` - INTERVIEWER + source: + openapi: ats_v3.yml + AccountDetailsCategory: + discriminated: false + union: + - CategoryEnum + - string + source: + openapi: ats_v3.yml + inline: true + AccountDetails: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + integration: + type: optional + access: read-only + integration_slug: + type: optional + access: read-only + category: optional + end_user_origin_id: + type: optional + access: read-only + end_user_organization_name: + type: optional + access: read-only + end_user_email_address: + type: optional + validation: + format: email + access: read-only + status: + type: optional + access: read-only + webhook_listener_url: + type: optional + validation: + format: uri + access: read-only + is_duplicate: + type: optional + docs: >- + Whether a Production Linked Account's credentials match another + existing Production Linked Account. This field is `null` for Test + Linked Accounts, incomplete Production Linked Accounts, and ignored + duplicate Production Linked Account sets. + access: read-only + account_type: + type: optional + access: read-only + completed_at: + type: optional + docs: The time at which account completes the linking flow. + source: + openapi: ats_v3.yml + AccountDetailsAndActionsCategory: + discriminated: false + union: + - CategoryEnum + - string + source: + openapi: ats_v3.yml + inline: true + AccountDetailsAndActionsStatus: + discriminated: false + union: + - AccountDetailsAndActionsStatusEnum + - string + source: + openapi: ats_v3.yml + inline: true + AccountDetailsAndActions: + docs: >- + # The LinkedAccount Object + + ### Description + + The `LinkedAccount` object is used to represent an end user's link with a + specific integration. + + + ### Usage Example + + View a list of your organization's `LinkedAccount` objects. + properties: + id: string + category: optional + status: AccountDetailsAndActionsStatus + status_detail: optional + end_user_origin_id: optional + end_user_organization_name: string + end_user_email_address: string + subdomain: + type: optional + docs: The tenant or domain the customer has provided access to. + webhook_listener_url: string + is_duplicate: + type: optional + docs: >- + Whether a Production Linked Account's credentials match another + existing Production Linked Account. This field is `null` for Test + Linked Accounts, incomplete Production Linked Accounts, and ignored + duplicate Production Linked Account sets. + integration: optional + account_type: string + completed_at: datetime + source: + openapi: ats_v3.yml + AccountDetailsAndActionsIntegration: + properties: + name: string + categories: list + image: optional + square_image: optional + color: string + slug: string + passthrough_available: boolean + available_model_operations: optional> + source: + openapi: ats_v3.yml + AccountDetailsAndActionsStatusEnum: + enum: + - COMPLETE + - INCOMPLETE + - RELINK_NEEDED + - IDLE + docs: |- + * `COMPLETE` - COMPLETE + * `INCOMPLETE` - INCOMPLETE + * `RELINK_NEEDED` - RELINK_NEEDED + * `IDLE` - IDLE + source: + openapi: ats_v3.yml + AccountIntegration: + properties: + name: + type: string + docs: Company name. + abbreviated_name: + type: optional + docs: >- + Optional. This shortened name appears in places with limited space, + usually in conjunction with the platform's logo (e.g., Merge Link + menu).

Example: Workforce Now (in lieu of ADP Workforce + Now), SuccessFactors (in lieu of SAP SuccessFactors) + categories: + type: optional> + docs: >- + Category or categories this integration belongs to. Multiple + categories should be comma separated, i.e. [ats, hris]. + access: read-only + image: + type: optional + docs: Company logo in rectangular shape. + validation: + format: uri + square_image: + type: optional + docs: Company logo in square shape. + validation: + format: uri + color: + type: optional + docs: >- + The color of this integration used for buttons and text throughout the + app and landing pages. Choose a darker, saturated color. + validation: + pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ + maxLength: 18 + slug: + type: optional + access: read-only + api_endpoints_to_documentation_urls: + type: optional> + docs: >- + Mapping of API endpoints to documentation urls for support. Example: + {'GET': [['/common-model-scopes', + 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', + 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], + 'POST': []} + webhook_setup_guide_url: + type: optional + docs: >- + Setup guide URL for third party webhook creation. Exposed in Merge + Docs. + category_beta_status: + type: optional> + docs: Category or categories this integration is in beta status for. + access: read-only + source: + openapi: ats_v3.yml + AccountToken: + properties: + account_token: string + integration: AccountIntegration + id: string + source: + openapi: ats_v3.yml + ActivityUser: + discriminated: false + docs: The user that performed the action. + union: + - type: string + validation: + format: uuid + - RemoteUser + source: + openapi: ats_v3.yml + inline: true + ActivityActivityType: + discriminated: false + docs: |- + The activity's type. + + * `NOTE` - NOTE + * `EMAIL` - EMAIL + * `OTHER` - OTHER + union: + - ActivityTypeEnum + - string + source: + openapi: ats_v3.yml + inline: true + ActivityVisibility: + discriminated: false + docs: |- + The activity's visibility. + + * `ADMIN_ONLY` - ADMIN_ONLY + * `PUBLIC` - PUBLIC + * `PRIVATE` - PRIVATE + union: + - VisibilityEnum + - string + source: + openapi: ats_v3.yml + inline: true + Activity: + docs: >- + # The Activity Object + + ### Description + + The `Activity` object is used to represent an activity for a candidate + performed by a user. + + ### Usage Example + + Fetch from the `LIST Activities` endpoint and filter by `ID` to show all + activities. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + user: + type: optional + docs: The user that performed the action. + remote_created_at: + type: optional + docs: When the third party's activity was created. + activity_type: + type: optional + docs: |- + The activity's type. + + * `NOTE` - NOTE + * `EMAIL` - EMAIL + * `OTHER` - OTHER + subject: + type: optional + docs: The activity's subject. + body: + type: optional + docs: The activity's body. + visibility: + type: optional + docs: |- + The activity's visibility. + + * `ADMIN_ONLY` - ADMIN_ONLY + * `PUBLIC` - PUBLIC + * `PRIVATE` - PRIVATE + candidate: + type: optional + validation: + format: uuid + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: ats_v3.yml + ActivityRequestUser: + discriminated: false + docs: The user that performed the action. + union: + - type: string + validation: + format: uuid + - RemoteUser + source: + openapi: ats_v3.yml + inline: true + ActivityRequestVisibility: + discriminated: false + docs: |- + The activity's visibility. + + * `ADMIN_ONLY` - ADMIN_ONLY + * `PUBLIC` - PUBLIC + * `PRIVATE` - PRIVATE + union: + - VisibilityEnum + - string + source: + openapi: ats_v3.yml + inline: true + ActivityRequest: + docs: >- + # The Activity Object + + ### Description + + The `Activity` object is used to represent an activity for a candidate + performed by a user. + + ### Usage Example + + Fetch from the `LIST Activities` endpoint and filter by `ID` to show all + activities. + properties: + user: + type: optional + docs: The user that performed the action. + activity_type: + type: optional + docs: |- + The activity's type. + + * `NOTE` - NOTE + * `EMAIL` - EMAIL + * `OTHER` - OTHER + subject: + type: optional + docs: The activity's subject. + body: + type: optional + docs: The activity's body. + visibility: + type: optional + docs: |- + The activity's visibility. + + * `ADMIN_ONLY` - ADMIN_ONLY + * `PUBLIC` - PUBLIC + * `PRIVATE` - PRIVATE + candidate: + type: optional + validation: + format: uuid + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: ats_v3.yml + ActivityResponse: + properties: + model: Activity + warnings: list + errors: list + logs: optional> + source: + openapi: ats_v3.yml + ActivityTypeEnum: + enum: + - NOTE + - EMAIL + - OTHER + docs: |- + * `NOTE` - NOTE + * `EMAIL` - EMAIL + * `OTHER` - OTHER + source: + openapi: ats_v3.yml + AdvancedMetadata: + properties: + id: + type: string + validation: + format: uuid + display_name: optional + description: optional + is_required: optional + is_custom: optional + field_choices: optional> + source: + openapi: ats_v3.yml + ApplicationCandidate: + discriminated: false + docs: The candidate applying. + union: + - type: string + validation: + format: uuid + - Candidate + source: + openapi: ats_v3.yml + inline: true + ApplicationJob: + discriminated: false + docs: The job being applied for. + union: + - type: string + validation: + format: uuid + - Job + source: + openapi: ats_v3.yml + inline: true + ApplicationOffersItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Offer + source: + openapi: ats_v3.yml + inline: true + ApplicationCreditedTo: + discriminated: false + docs: The user credited for this application. + union: + - type: string + validation: + format: uuid + - RemoteUser + source: + openapi: ats_v3.yml + inline: true + ApplicationScreeningQuestionAnswersItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - ScreeningQuestionAnswer + source: + openapi: ats_v3.yml + inline: true + ApplicationCurrentStage: + discriminated: false + docs: The application's current stage. + union: + - type: string + validation: + format: uuid + - JobInterviewStage + source: + openapi: ats_v3.yml + inline: true + ApplicationRejectReason: + discriminated: false + docs: The application's reason for rejection. + union: + - type: string + validation: + format: uuid + - RejectReason + source: + openapi: ats_v3.yml + inline: true + Application: + docs: >- + # The Application Object + + ### Description + + The Application Object is used to represent a candidate's journey through + a particular Job's recruiting process. If a Candidate applies for multiple + Jobs, there will be a separate Application for each Job if the third-party + integration allows it. + + + ### Usage Example + + Fetch from the `LIST Applications` endpoint and filter by `ID` to show all + applications. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + candidate: + type: optional + docs: The candidate applying. + job: + type: optional + docs: The job being applied for. + applied_at: + type: optional + docs: When the application was submitted. + rejected_at: + type: optional + docs: When the application was rejected. + offers: optional>> + source: + type: optional + docs: The application's source. + credited_to: + type: optional + docs: The user credited for this application. + screening_question_answers: optional> + current_stage: + type: optional + docs: The application's current stage. + reject_reason: + type: optional + docs: The application's reason for rejection. + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: ats_v3.yml + ApplicationRequestCandidate: + discriminated: false + docs: The candidate applying. + union: + - type: string + validation: + format: uuid + - Candidate + source: + openapi: ats_v3.yml + inline: true + ApplicationRequestJob: + discriminated: false + docs: The job being applied for. + union: + - type: string + validation: + format: uuid + - Job + source: + openapi: ats_v3.yml + inline: true + ApplicationRequestOffersItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Offer + source: + openapi: ats_v3.yml + inline: true + ApplicationRequestCreditedTo: + discriminated: false + docs: The user credited for this application. + union: + - type: string + validation: + format: uuid + - RemoteUser + source: + openapi: ats_v3.yml + inline: true + ApplicationRequestScreeningQuestionAnswersItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - ScreeningQuestionAnswerRequest + source: + openapi: ats_v3.yml + inline: true + ApplicationRequestCurrentStage: + discriminated: false + docs: The application's current stage. + union: + - type: string + validation: + format: uuid + - JobInterviewStage + source: + openapi: ats_v3.yml + inline: true + ApplicationRequestRejectReason: + discriminated: false + docs: The application's reason for rejection. + union: + - type: string + validation: + format: uuid + - RejectReason + source: + openapi: ats_v3.yml + inline: true + ApplicationRequest: + docs: >- + # The Application Object + + ### Description + + The Application Object is used to represent a candidate's journey through + a particular Job's recruiting process. If a Candidate applies for multiple + Jobs, there will be a separate Application for each Job if the third-party + integration allows it. + + + ### Usage Example + + Fetch from the `LIST Applications` endpoint and filter by `ID` to show all + applications. + properties: + candidate: + type: optional + docs: The candidate applying. + job: + type: optional + docs: The job being applied for. + applied_at: + type: optional + docs: When the application was submitted. + rejected_at: + type: optional + docs: When the application was rejected. + offers: optional>> + source: + type: optional + docs: The application's source. + credited_to: + type: optional + docs: The user credited for this application. + screening_question_answers: optional> + current_stage: + type: optional + docs: The application's current stage. + reject_reason: + type: optional + docs: The application's reason for rejection. + remote_template_id: + type: optional + validation: + minLength: 1 + access: write-only + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: ats_v3.yml + ApplicationResponse: + properties: + model: Application + warnings: list + errors: list + logs: optional> + source: + openapi: ats_v3.yml + AsyncPassthroughReciept: + properties: + async_passthrough_receipt_id: + type: string + validation: + format: uuid + source: + openapi: ats_v3.yml + AttachmentAttachmentType: + discriminated: false + docs: |- + The attachment's type. + + * `RESUME` - RESUME + * `COVER_LETTER` - COVER_LETTER + * `OFFER_LETTER` - OFFER_LETTER + * `OTHER` - OTHER + union: + - AttachmentTypeEnum + - string + source: + openapi: ats_v3.yml + inline: true + Attachment: + docs: >- + # The Attachment Object + + ### Description + + The `Attachment` object is used to represent a file attached to a + candidate. + + ### Usage Example + + Fetch from the `LIST Attachments` endpoint and view attachments accessible + by a company. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + file_name: + type: optional + docs: The attachment's name. + file_url: + type: optional + docs: The attachment's url. + validation: + format: uri + maxLength: 2000 + candidate: + type: optional + docs: '' + validation: + format: uuid + attachment_type: + type: optional + docs: |- + The attachment's type. + + * `RESUME` - RESUME + * `COVER_LETTER` - COVER_LETTER + * `OFFER_LETTER` - OFFER_LETTER + * `OTHER` - OTHER + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: ats_v3.yml + AttachmentRequestAttachmentType: + discriminated: false + docs: |- + The attachment's type. + + * `RESUME` - RESUME + * `COVER_LETTER` - COVER_LETTER + * `OFFER_LETTER` - OFFER_LETTER + * `OTHER` - OTHER + union: + - AttachmentTypeEnum + - string + source: + openapi: ats_v3.yml + inline: true + AttachmentRequest: + docs: >- + # The Attachment Object + + ### Description + + The `Attachment` object is used to represent a file attached to a + candidate. + + ### Usage Example + + Fetch from the `LIST Attachments` endpoint and view attachments accessible + by a company. + properties: + file_name: + type: optional + docs: The attachment's name. + file_url: + type: optional + docs: The attachment's url. + validation: + format: uri + maxLength: 2000 + candidate: + type: optional + docs: '' + validation: + format: uuid + attachment_type: + type: optional + docs: |- + The attachment's type. + + * `RESUME` - RESUME + * `COVER_LETTER` - COVER_LETTER + * `OFFER_LETTER` - OFFER_LETTER + * `OTHER` - OTHER + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: ats_v3.yml + AttachmentResponse: + properties: + model: Attachment + warnings: list + errors: list + logs: optional> + source: + openapi: ats_v3.yml + AttachmentTypeEnum: + enum: + - RESUME + - COVER_LETTER + - OFFER_LETTER + - OTHER + docs: |- + * `RESUME` - RESUME + * `COVER_LETTER` - COVER_LETTER + * `OFFER_LETTER` - OFFER_LETTER + * `OTHER` - OTHER + source: + openapi: ats_v3.yml + AuditLogEventRole: + discriminated: false + docs: >- + Designates the role of the user (or SYSTEM/API if action not taken by a + user) at the time of this Event occurring. + + + * `ADMIN` - ADMIN + + * `DEVELOPER` - DEVELOPER + + * `MEMBER` - MEMBER + + * `API` - API + + * `SYSTEM` - SYSTEM + + * `MERGE_TEAM` - MERGE_TEAM + union: + - RoleEnum + - string + source: + openapi: ats_v3.yml + inline: true + AuditLogEventEventType: + discriminated: false + docs: >- + Designates the type of event that occurred. + + + * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + + * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + + * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + + * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + + * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + + * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + + * `INVITED_USER` - INVITED_USER + + * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + + * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + + * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + + * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - + DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + + * `CREATED_DESTINATION` - CREATED_DESTINATION + + * `DELETED_DESTINATION` - DELETED_DESTINATION + + * `CHANGED_DESTINATION` - CHANGED_DESTINATION + + * `CHANGED_SCOPES` - CHANGED_SCOPES + + * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + + * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + + * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + + * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + + * `ENABLED_CATEGORY` - ENABLED_CATEGORY + + * `DISABLED_CATEGORY` - DISABLED_CATEGORY + + * `CHANGED_PASSWORD` - CHANGED_PASSWORD + + * `RESET_PASSWORD` - RESET_PASSWORD + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - + CREATED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - + CREATED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - + CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - + CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + + * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - + DELETED_INTEGRATION_WIDE_FIELD_MAPPING + + * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - + DELETED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + + * `MUTED_ISSUE` - MUTED_ISSUE + + * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + + * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + + * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + + * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + + * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + union: + - EventTypeEnum + - string + source: + openapi: ats_v3.yml + inline: true + AuditLogEvent: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + user_name: + type: optional + docs: The User's full name at the time of this Event occurring. + validation: + maxLength: 200 + user_email: + type: optional + docs: The User's email at the time of this Event occurring. + validation: + format: email + maxLength: 254 + role: + type: AuditLogEventRole + docs: >- + Designates the role of the user (or SYSTEM/API if action not taken by + a user) at the time of this Event occurring. + + + * `ADMIN` - ADMIN + + * `DEVELOPER` - DEVELOPER + + * `MEMBER` - MEMBER + + * `API` - API + + * `SYSTEM` - SYSTEM + + * `MERGE_TEAM` - MERGE_TEAM + ip_address: + type: string + validation: + maxLength: 45 + event_type: + type: AuditLogEventEventType + docs: >- + Designates the type of event that occurred. + + + * `CREATED_REMOTE_PRODUCTION_API_KEY` - + CREATED_REMOTE_PRODUCTION_API_KEY + + * `DELETED_REMOTE_PRODUCTION_API_KEY` - + DELETED_REMOTE_PRODUCTION_API_KEY + + * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + + * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + + * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + + * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + + * `INVITED_USER` - INVITED_USER + + * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + + * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + + * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + + * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - + DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + + * `CREATED_DESTINATION` - CREATED_DESTINATION + + * `DELETED_DESTINATION` - DELETED_DESTINATION + + * `CHANGED_DESTINATION` - CHANGED_DESTINATION + + * `CHANGED_SCOPES` - CHANGED_SCOPES + + * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + + * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + + * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + + * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + + * `ENABLED_CATEGORY` - ENABLED_CATEGORY + + * `DISABLED_CATEGORY` - DISABLED_CATEGORY + + * `CHANGED_PASSWORD` - CHANGED_PASSWORD + + * `RESET_PASSWORD` - RESET_PASSWORD + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - + CREATED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - + CREATED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - + CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - + CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + + * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - + DELETED_INTEGRATION_WIDE_FIELD_MAPPING + + * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - + DELETED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + + * `MUTED_ISSUE` - MUTED_ISSUE + + * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + + * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + + * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + + * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + + * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + event_description: string + created_at: + type: optional + access: read-only + source: + openapi: ats_v3.yml + AvailableActions: + docs: >- + # The AvailableActions Object + + ### Description + + The `Activity` object is used to see all available model/operation + combinations for an integration. + + + ### Usage Example + + Fetch all the actions available for the `Zenefits` integration. + properties: + integration: AccountIntegration + passthrough_available: boolean + available_model_operations: optional> + source: + openapi: ats_v3.yml + CandidateApplicationsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Application + source: + openapi: ats_v3.yml + inline: true + CandidateAttachmentsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Attachment + source: + openapi: ats_v3.yml + inline: true + Candidate: + docs: >- + # The Candidate Object + + ### Description + + The `Candidate` object is used to represent profile information about a + given Candidate. Because it is specific to a Candidate, this information + stays constant across applications. + + ### Usage Example + + Fetch from the `LIST Candidates` endpoint and filter by `ID` to show all + candidates. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + first_name: + type: optional + docs: The candidate's first name. + last_name: + type: optional + docs: The candidate's last name. + company: + type: optional + docs: The candidate's current company. + title: + type: optional + docs: The candidate's current title. + remote_created_at: + type: optional + docs: When the third party's candidate was created. + remote_updated_at: + type: optional + docs: When the third party's candidate was updated. + last_interaction_at: + type: optional + docs: When the most recent interaction with the candidate occurred. + is_private: + type: optional + docs: Whether or not the candidate is private. + can_email: + type: optional + docs: Whether or not the candidate can be emailed. + locations: + type: optional>> + docs: The candidate's locations. + phone_numbers: optional> + email_addresses: optional> + urls: optional> + tags: + type: optional>> + docs: Array of `Tag` names as strings. + applications: + type: optional>> + docs: Array of `Application` object IDs. + attachments: + type: optional>> + docs: Array of `Attachment` object IDs. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: ats_v3.yml + CandidateRequestApplicationsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Application + source: + openapi: ats_v3.yml + inline: true + CandidateRequestAttachmentsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Attachment + source: + openapi: ats_v3.yml + inline: true + CandidateRequest: + docs: >- + # The Candidate Object + + ### Description + + The `Candidate` object is used to represent profile information about a + given Candidate. Because it is specific to a Candidate, this information + stays constant across applications. + + ### Usage Example + + Fetch from the `LIST Candidates` endpoint and filter by `ID` to show all + candidates. + properties: + first_name: + type: optional + docs: The candidate's first name. + last_name: + type: optional + docs: The candidate's last name. + company: + type: optional + docs: The candidate's current company. + title: + type: optional + docs: The candidate's current title. + last_interaction_at: + type: optional + docs: When the most recent interaction with the candidate occurred. + is_private: + type: optional + docs: Whether or not the candidate is private. + can_email: + type: optional + docs: Whether or not the candidate can be emailed. + locations: + type: optional>> + docs: The candidate's locations. + phone_numbers: optional> + email_addresses: optional> + urls: optional> + tags: + type: optional>> + docs: Array of `Tag` names as strings. + applications: + type: optional>> + docs: Array of `Application` object IDs. + attachments: + type: optional>> + docs: Array of `Attachment` object IDs. + remote_template_id: + type: optional + validation: + minLength: 1 + access: write-only + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: ats_v3.yml + CandidateResponse: + properties: + model: Candidate + warnings: list + errors: list + logs: optional> + source: + openapi: ats_v3.yml + CategoriesEnum: + enum: + - hris + - ats + - accounting + - ticketing + - crm + - mktg + - filestorage + docs: |- + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + source: + openapi: ats_v3.yml + CategoryEnum: + enum: + - hris + - ats + - accounting + - ticketing + - crm + - mktg + - filestorage + docs: |- + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + source: + openapi: ats_v3.yml + CommonModelScopeApi: + properties: + common_models: + docs: The common models you want to update the scopes for + type: list + source: + openapi: ats_v3.yml + CommonModelScopesBodyRequest: + properties: + model_id: + type: string + validation: + minLength: 1 + enabled_actions: list + disabled_fields: list + source: + openapi: ats_v3.yml + DataPassthroughRequest: + docs: >- + # The DataPassthrough Object + + ### Description + + The `DataPassthrough` object is used to send information to an + otherwise-unsupported third-party endpoint. + + + ### Usage Example + + Create a `DataPassthrough` to get team hierarchies from your Rippling + integration. + properties: + method: MethodEnum + path: + type: string + docs: The path of the request in the third party's platform. + validation: + minLength: 1 + base_url_override: + type: optional + docs: An optional override of the third party's base url for the request. + validation: + minLength: 1 + data: + type: optional + docs: >- + The data with the request. You must include a `request_format` + parameter matching the data's format + validation: + minLength: 1 + multipart_form_data: + type: optional> + docs: >- + Pass an array of `MultipartFormField` objects in here instead of using + the `data` param if `request_format` is set to `MULTIPART`. + headers: + type: optional> + docs: >- + The headers to use for the request (Merge will handle the account's + authorization headers). `Content-Type` header is required for + passthrough. Choose content type corresponding to expected format of + receiving server. + request_format: optional + normalize_response: + type: optional + docs: >- + Optional. If true, the response will always be an object of the form + `{"type": T, "value": ...}` where `T` will be one of `string, boolean, + number, null, array, object`. + source: + openapi: ats_v3.yml + DebugModeLog: + properties: + log_id: string + dashboard_view: string + log_summary: DebugModelLogSummary + source: + openapi: ats_v3.yml + DebugModelLogSummary: + properties: + url: string + method: string + status_code: integer + source: + openapi: ats_v3.yml + Department: + docs: >- + # The Department Object + + ### Description + + The `Department` object is used to represent a department within a + company. + + ### Usage Example + + Fetch from the `LIST Departments` endpoint and view the departments within + a company. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The department's name. + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: ats_v3.yml + DisabilityStatusEnum: + enum: + - YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY + - NO_I_DONT_HAVE_A_DISABILITY + - I_DONT_WISH_TO_ANSWER + docs: >- + * `YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY` - + YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY + + * `NO_I_DONT_HAVE_A_DISABILITY` - NO_I_DONT_HAVE_A_DISABILITY + + * `I_DONT_WISH_TO_ANSWER` - I_DONT_WISH_TO_ANSWER + source: + openapi: ats_v3.yml + EeocCandidate: + discriminated: false + docs: The candidate being represented. + union: + - type: string + validation: + format: uuid + - Candidate + source: + openapi: ats_v3.yml + inline: true + EeocRace: + discriminated: false + docs: >- + The candidate's race. + + + * `AMERICAN_INDIAN_OR_ALASKAN_NATIVE` - AMERICAN_INDIAN_OR_ALASKAN_NATIVE + + * `ASIAN` - ASIAN + + * `BLACK_OR_AFRICAN_AMERICAN` - BLACK_OR_AFRICAN_AMERICAN + + * `HISPANIC_OR_LATINO` - HISPANIC_OR_LATINO + + * `WHITE` - WHITE + + * `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER` - + NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER + + * `TWO_OR_MORE_RACES` - TWO_OR_MORE_RACES + + * `DECLINE_TO_SELF_IDENTIFY` - DECLINE_TO_SELF_IDENTIFY + union: + - RaceEnum + - string + source: + openapi: ats_v3.yml + inline: true + EeocGender: + discriminated: false + docs: |- + The candidate's gender. + + * `MALE` - MALE + * `FEMALE` - FEMALE + * `NON-BINARY` - NON-BINARY + * `OTHER` - OTHER + * `DECLINE_TO_SELF_IDENTIFY` - DECLINE_TO_SELF_IDENTIFY + union: + - GenderEnum + - string + source: + openapi: ats_v3.yml + inline: true + EeocVeteranStatus: + discriminated: false + docs: >- + The candidate's veteran status. + + + * `I_AM_NOT_A_PROTECTED_VETERAN` - I_AM_NOT_A_PROTECTED_VETERAN + + * + `I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN` + - I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN + + * `I_DONT_WISH_TO_ANSWER` - I_DONT_WISH_TO_ANSWER + union: + - VeteranStatusEnum + - string + source: + openapi: ats_v3.yml + inline: true + EeocDisabilityStatus: + discriminated: false + docs: >- + The candidate's disability status. + + + * `YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY` - + YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY + + * `NO_I_DONT_HAVE_A_DISABILITY` - NO_I_DONT_HAVE_A_DISABILITY + + * `I_DONT_WISH_TO_ANSWER` - I_DONT_WISH_TO_ANSWER + union: + - DisabilityStatusEnum + - string + source: + openapi: ats_v3.yml + inline: true + Eeoc: + docs: >- + # The EEOC Object + + ### Description + + The `EEOC` object is used to represent the Equal Employment Opportunity + Commission information for a candidate (race, gender, veteran status, + disability status). + + ### Usage Example + + Fetch from the `LIST EEOCs` endpoint and filter by `candidate` to show all + EEOC information for a candidate. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + candidate: + type: optional + docs: The candidate being represented. + submitted_at: + type: optional + docs: When the information was submitted. + race: + type: optional + docs: >- + The candidate's race. + + + * `AMERICAN_INDIAN_OR_ALASKAN_NATIVE` - + AMERICAN_INDIAN_OR_ALASKAN_NATIVE + + * `ASIAN` - ASIAN + + * `BLACK_OR_AFRICAN_AMERICAN` - BLACK_OR_AFRICAN_AMERICAN + + * `HISPANIC_OR_LATINO` - HISPANIC_OR_LATINO + + * `WHITE` - WHITE + + * `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER` - + NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER + + * `TWO_OR_MORE_RACES` - TWO_OR_MORE_RACES + + * `DECLINE_TO_SELF_IDENTIFY` - DECLINE_TO_SELF_IDENTIFY + gender: + type: optional + docs: |- + The candidate's gender. + + * `MALE` - MALE + * `FEMALE` - FEMALE + * `NON-BINARY` - NON-BINARY + * `OTHER` - OTHER + * `DECLINE_TO_SELF_IDENTIFY` - DECLINE_TO_SELF_IDENTIFY + veteran_status: + type: optional + docs: >- + The candidate's veteran status. + + + * `I_AM_NOT_A_PROTECTED_VETERAN` - I_AM_NOT_A_PROTECTED_VETERAN + + * + `I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN` + - + I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN + + * `I_DONT_WISH_TO_ANSWER` - I_DONT_WISH_TO_ANSWER + disability_status: + type: optional + docs: >- + The candidate's disability status. + + + * `YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY` - + YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY + + * `NO_I_DONT_HAVE_A_DISABILITY` - NO_I_DONT_HAVE_A_DISABILITY + + * `I_DONT_WISH_TO_ANSWER` - I_DONT_WISH_TO_ANSWER + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: ats_v3.yml + EmailAddressEmailAddressType: + discriminated: false + docs: |- + The type of email address. + + * `PERSONAL` - PERSONAL + * `WORK` - WORK + * `OTHER` - OTHER + union: + - EmailAddressTypeEnum + - string + source: + openapi: ats_v3.yml + inline: true + EmailAddress: + docs: >- + # The EmailAddress Object + + ### Description + + The `EmailAddress` object is used to represent a candidate's email + address. + + ### Usage Example + + Fetch from the `GET Candidate` endpoint and view their email addresses. + properties: + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + value: + type: optional + docs: The email address. + validation: + format: email + maxLength: 254 + email_address_type: + type: optional + docs: |- + The type of email address. + + * `PERSONAL` - PERSONAL + * `WORK` - WORK + * `OTHER` - OTHER + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + source: + openapi: ats_v3.yml + EmailAddressRequestEmailAddressType: + discriminated: false + docs: |- + The type of email address. + + * `PERSONAL` - PERSONAL + * `WORK` - WORK + * `OTHER` - OTHER + union: + - EmailAddressTypeEnum + - string + source: + openapi: ats_v3.yml + inline: true + EmailAddressRequest: + docs: >- + # The EmailAddress Object + + ### Description + + The `EmailAddress` object is used to represent a candidate's email + address. + + ### Usage Example + + Fetch from the `GET Candidate` endpoint and view their email addresses. + properties: + value: + type: optional + docs: The email address. + validation: + format: email + maxLength: 254 + email_address_type: + type: optional + docs: |- + The type of email address. + + * `PERSONAL` - PERSONAL + * `WORK` - WORK + * `OTHER` - OTHER + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: ats_v3.yml + EmailAddressTypeEnum: + enum: + - PERSONAL + - WORK + - OTHER + docs: |- + * `PERSONAL` - PERSONAL + * `WORK` - WORK + * `OTHER` - OTHER + source: + openapi: ats_v3.yml + EnabledActionsEnum: + enum: + - READ + - WRITE + docs: |- + * `READ` - READ + * `WRITE` - WRITE + source: + openapi: ats_v3.yml + EncodingEnum: + enum: + - RAW + - BASE64 + - GZIP_BASE64 + docs: |- + * `RAW` - RAW + * `BASE64` - BASE64 + * `GZIP_BASE64` - GZIP_BASE64 + source: + openapi: ats_v3.yml + ErrorValidationProblem: + properties: + source: optional + title: string + detail: string + problem_type: string + source: + openapi: ats_v3.yml + EventTypeEnum: + enum: + - 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 + docs: >- + * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + + * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + + * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + + * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + + * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + + * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + + * `INVITED_USER` - INVITED_USER + + * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + + * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + + * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + + * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - + DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + + * `CREATED_DESTINATION` - CREATED_DESTINATION + + * `DELETED_DESTINATION` - DELETED_DESTINATION + + * `CHANGED_DESTINATION` - CHANGED_DESTINATION + + * `CHANGED_SCOPES` - CHANGED_SCOPES + + * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + + * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + + * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + + * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + + * `ENABLED_CATEGORY` - ENABLED_CATEGORY + + * `DISABLED_CATEGORY` - DISABLED_CATEGORY + + * `CHANGED_PASSWORD` - CHANGED_PASSWORD + + * `RESET_PASSWORD` - RESET_PASSWORD + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - + CREATED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - + CREATED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - + CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - + CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + + * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - + DELETED_INTEGRATION_WIDE_FIELD_MAPPING + + * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - + DELETED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + + * `MUTED_ISSUE` - MUTED_ISSUE + + * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + + * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + + * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + + * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + + * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + source: + openapi: ats_v3.yml + ExternalTargetFieldApi: + properties: + name: + type: optional + access: read-only + description: + type: optional + access: read-only + is_mapped: + type: optional + access: read-only + source: + openapi: ats_v3.yml + ExternalTargetFieldApiResponse: + properties: + Activity: optional> + Application: optional> + Attachment: optional> + Candidate: optional> + Department: optional> + EEOC: optional> + ScheduledInterview: optional> + Job: optional> + JobPosting: optional> + JobInterviewStage: optional> + Offer: optional> + Office: optional> + RejectReason: optional> + Scorecard: optional> + Tag: optional> + RemoteUser: optional> + source: + openapi: ats_v3.yml + FieldMappingApiInstanceTargetField: + properties: + name: string + description: string + is_organization_wide: boolean + source: + openapi: ats_v3.yml + inline: true + FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo: + properties: + method: optional + url_path: optional + field_traversal_path: optional> + source: + openapi: ats_v3.yml + inline: true + FieldMappingApiInstanceRemoteField: + properties: + remote_key_name: optional + schema: optional> + remote_endpoint_info: FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo + source: + openapi: ats_v3.yml + inline: true + FieldMappingApiInstance: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + is_integration_wide: + type: optional + access: read-only + target_field: + type: optional + access: read-only + remote_field: + type: optional + access: read-only + source: + openapi: ats_v3.yml + FieldMappingApiInstanceResponse: + properties: + Activity: optional> + Application: optional> + Attachment: optional> + Candidate: optional> + Department: optional> + EEOC: optional> + ScheduledInterview: optional> + Job: optional> + JobPosting: optional> + JobInterviewStage: optional> + Offer: optional> + Office: optional> + RejectReason: optional> + Scorecard: optional> + Tag: optional> + RemoteUser: optional> + source: + openapi: ats_v3.yml + FieldMappingInstanceResponse: + properties: + model: FieldMappingApiInstance + warnings: list + errors: list + logs: optional> + source: + openapi: ats_v3.yml + FieldPermissionDeserializer: + properties: + enabled_fields: optional> + disabled_fields: optional> + source: + openapi: ats_v3.yml + FieldPermissionDeserializerRequest: + properties: + enabled_fields: optional> + disabled_fields: optional> + source: + openapi: ats_v3.yml + GenderEnum: + enum: + - MALE + - FEMALE + - value: NON-BINARY + name: NonBinary + - OTHER + - DECLINE_TO_SELF_IDENTIFY + docs: |- + * `MALE` - MALE + * `FEMALE` - FEMALE + * `NON-BINARY` - NON-BINARY + * `OTHER` - OTHER + * `DECLINE_TO_SELF_IDENTIFY` - DECLINE_TO_SELF_IDENTIFY + source: + openapi: ats_v3.yml + IgnoreCommonModelRequestReason: + discriminated: false + union: + - ReasonEnum + - string + source: + openapi: ats_v3.yml + inline: true + IgnoreCommonModelRequest: + properties: + reason: IgnoreCommonModelRequestReason + message: + type: optional + validation: + minLength: 1 + maxLength: 256 + source: + openapi: ats_v3.yml + IndividualCommonModelScopeDeserializer: + properties: + model_name: string + model_permissions: optional> + field_permissions: optional + source: + openapi: ats_v3.yml + IndividualCommonModelScopeDeserializerRequest: + properties: + model_name: + type: string + validation: + minLength: 1 + model_permissions: optional> + field_permissions: optional + source: + openapi: ats_v3.yml + IssueStatus: + discriminated: false + docs: |- + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + union: + - IssueStatusEnum + - string + source: + openapi: ats_v3.yml + inline: true + Issue: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + status: + type: optional + docs: |- + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + error_description: string + end_user: + type: optional> + access: read-only + first_incident_time: optional + last_incident_time: optional + is_muted: + type: optional + access: read-only + error_details: + type: optional> + access: read-only + source: + openapi: ats_v3.yml + IssueStatusEnum: + enum: + - ONGOING + - RESOLVED + docs: |- + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + source: + openapi: ats_v3.yml + JobStatus: + discriminated: false + docs: |- + The job's status. + + * `OPEN` - OPEN + * `CLOSED` - CLOSED + * `DRAFT` - DRAFT + * `ARCHIVED` - ARCHIVED + * `PENDING` - PENDING + union: + - JobStatusEnum + - string + source: + openapi: ats_v3.yml + inline: true + JobType: + discriminated: false + docs: |- + The job's type. + + * `POSTING` - POSTING + * `REQUISITION` - REQUISITION + * `PROFILE` - PROFILE + union: + - JobTypeEnum + - string + source: + openapi: ats_v3.yml + inline: true + JobDepartmentsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Department + source: + openapi: ats_v3.yml + inline: true + JobOfficesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Office + source: + openapi: ats_v3.yml + inline: true + JobHiringManagersItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - RemoteUser + source: + openapi: ats_v3.yml + inline: true + JobRecruitersItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - RemoteUser + source: + openapi: ats_v3.yml + inline: true + Job: + docs: >- + # The Job Object + + ### Description + + The `Job` object can be used to track any jobs that are currently or will + be open/closed for applications. + + ### Usage Example + + Fetch from the `LIST Jobs` endpoint to show all job postings. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The job's name. + description: + type: optional + docs: The job's description. + code: + type: optional + docs: >- + The job's code. Typically an additional identifier used to reference + the particular job that is displayed on the ATS. + status: + type: optional + docs: |- + The job's status. + + * `OPEN` - OPEN + * `CLOSED` - CLOSED + * `DRAFT` - DRAFT + * `ARCHIVED` - ARCHIVED + * `PENDING` - PENDING + type: + type: optional + docs: |- + The job's type. + + * `POSTING` - POSTING + * `REQUISITION` - REQUISITION + * `PROFILE` - PROFILE + job_postings: + type: optional>> + docs: IDs of `JobPosting` objects that serve as job postings for this `Job`. + job_posting_urls: optional> + remote_created_at: + type: optional + docs: When the third party's job was created. + remote_updated_at: + type: optional + docs: When the third party's job was updated. + confidential: + type: optional + docs: Whether the job is confidential. + departments: + type: optional>> + docs: IDs of `Department` objects for this `Job`. + offices: + type: optional>> + docs: IDs of `Office` objects for this `Job`. + hiring_managers: + type: optional>> + docs: >- + IDs of `RemoteUser` objects that serve as hiring managers for this + `Job`. + recruiters: + type: optional>> + docs: IDs of `RemoteUser` objects that serve as recruiters for this `Job`. + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: ats_v3.yml + JobInterviewStageJob: + discriminated: false + docs: >- + This field is populated only if the stage is specific to a particular job. + If the stage is generic, this field will not be populated. + union: + - type: string + validation: + format: uuid + - Job + source: + openapi: ats_v3.yml + inline: true + JobInterviewStage: + docs: >- + # The JobInterviewStage Object + + ### Description + + The `JobInterviewStage` object is used to represent a particular + recruiting stage for an `Application`. A given `Application` typically has + the `JobInterviewStage` object represented in the current_stage field. + + ### Usage Example + + Fetch from the `LIST JobInterviewStages` endpoint and view the job + interview stages used by a company. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: >- + Standard stage names are offered by ATS systems but can be modified by + users. + job: + type: optional + docs: >- + This field is populated only if the stage is specific to a particular + job. If the stage is generic, this field will not be populated. + stage_order: + type: optional + docs: >- + The stage’s order, with the lowest values ordered first. If the + third-party does not return details on the order of stages, this field + will not be populated. + validation: + min: -2147483648 + max: 2147483647 + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: ats_v3.yml + JobPostingJobPostingUrlsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Url + source: + openapi: ats_v3.yml + inline: true + JobPostingJob: + discriminated: false + docs: ID of `Job` object for this `JobPosting`. + union: + - type: string + validation: + format: uuid + - Job + source: + openapi: ats_v3.yml + inline: true + JobPostingStatus: + discriminated: false + docs: |- + The job posting's status. + + * `PUBLISHED` - PUBLISHED + * `CLOSED` - CLOSED + * `DRAFT` - DRAFT + * `INTERNAL` - INTERNAL + * `PENDING` - PENDING + union: + - JobPostingStatusEnum + - string + source: + openapi: ats_v3.yml + inline: true + JobPosting: + docs: >- + # The JobPosting Object + + ### Description + + The `JobPosting` object represents an external announcement on a job board + created by an organization to attract qualified candidates to apply for a + specific `Job` opening + + ### Usage Example + + Fetch from the `LIST JobPostings` endpoint to show all job postings. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + title: + type: optional + docs: The job posting’s title. + job_posting_urls: + type: optional> + docs: >- + The Url object is used to represent hyperlinks for a candidate to + apply to a given job. + job: + type: optional + docs: ID of `Job` object for this `JobPosting`. + status: + type: optional + docs: |- + The job posting's status. + + * `PUBLISHED` - PUBLISHED + * `CLOSED` - CLOSED + * `DRAFT` - DRAFT + * `INTERNAL` - INTERNAL + * `PENDING` - PENDING + content: + type: optional + docs: The job posting’s content. + remote_created_at: + type: optional + docs: When the third party's job posting was created. + remote_updated_at: + type: optional + docs: When the third party's job posting was updated. + is_internal: + type: optional + docs: Indicates whether the job posting is internal or external. + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: ats_v3.yml + JobPostingStatusEnum: + enum: + - PUBLISHED + - CLOSED + - DRAFT + - INTERNAL + - PENDING + docs: |- + * `PUBLISHED` - PUBLISHED + * `CLOSED` - CLOSED + * `DRAFT` - DRAFT + * `INTERNAL` - INTERNAL + * `PENDING` - PENDING + source: + openapi: ats_v3.yml + JobStatusEnum: + enum: + - OPEN + - CLOSED + - DRAFT + - ARCHIVED + - PENDING + docs: |- + * `OPEN` - OPEN + * `CLOSED` - CLOSED + * `DRAFT` - DRAFT + * `ARCHIVED` - ARCHIVED + * `PENDING` - PENDING + source: + openapi: ats_v3.yml + JobTypeEnum: + enum: + - POSTING + - REQUISITION + - PROFILE + docs: |- + * `POSTING` - POSTING + * `REQUISITION` - REQUISITION + * `PROFILE` - PROFILE + source: + openapi: ats_v3.yml + LanguageEnum: + enum: + - en + - de + docs: |- + * `en` - en + * `de` - de + source: + openapi: ats_v3.yml + LastSyncResultEnum: + enum: + - SYNCING + - DONE + - FAILED + - DISABLED + - PAUSED + - PARTIALLY_SYNCED + docs: |- + * `SYNCING` - SYNCING + * `DONE` - DONE + * `FAILED` - FAILED + * `DISABLED` - DISABLED + * `PAUSED` - PAUSED + * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED + source: + openapi: ats_v3.yml + LinkToken: + properties: + link_token: string + integration_name: optional + magic_link_url: optional + source: + openapi: ats_v3.yml + LinkedAccountStatus: + properties: + linked_account_status: string + can_make_request: boolean + source: + openapi: ats_v3.yml + MetaResponse: + properties: + request_schema: map + remote_field_classes: optional> + status: optional + has_conditional_params: boolean + has_required_linked_account_params: boolean + source: + openapi: ats_v3.yml + MethodEnum: + enum: + - GET + - OPTIONS + - HEAD + - POST + - PUT + - PATCH + - DELETE + docs: |- + * `GET` - GET + * `OPTIONS` - OPTIONS + * `HEAD` - HEAD + * `POST` - POST + * `PUT` - PUT + * `PATCH` - PATCH + * `DELETE` - DELETE + source: + openapi: ats_v3.yml + ModelOperation: + docs: >- + # The ModelOperation Object + + ### Description + + The `ModelOperation` object is used to represent the operations that are + currently supported for a given model. + + + ### Usage Example + + View what operations are supported for the `Candidate` endpoint. + properties: + model_name: string + available_operations: list + required_post_parameters: list + supported_fields: list + source: + openapi: ats_v3.yml + ModelPermissionDeserializer: + properties: + is_enabled: optional + source: + openapi: ats_v3.yml + ModelPermissionDeserializerRequest: + properties: + is_enabled: optional + source: + openapi: ats_v3.yml + MultipartFormFieldRequestEncoding: + discriminated: false + docs: |- + The encoding of the value of `data`. Defaults to `RAW` if not defined. + + * `RAW` - RAW + * `BASE64` - BASE64 + * `GZIP_BASE64` - GZIP_BASE64 + union: + - EncodingEnum + - string + source: + openapi: ats_v3.yml + inline: true + MultipartFormFieldRequest: + docs: >- + # The MultipartFormField Object + + ### Description + + The `MultipartFormField` object is used to represent fields in an HTTP + request using `multipart/form-data`. + + + ### Usage Example + + Create a `MultipartFormField` to define a multipart form entry. + properties: + name: + type: string + docs: The name of the form field + validation: + minLength: 1 + data: + type: string + docs: The data for the form field. + validation: + minLength: 1 + encoding: + type: optional + docs: |- + The encoding of the value of `data`. Defaults to `RAW` if not defined. + + * `RAW` - RAW + * `BASE64` - BASE64 + * `GZIP_BASE64` - GZIP_BASE64 + file_name: + type: optional + docs: The file name of the form field, if the field is for a file. + validation: + minLength: 1 + content_type: + type: optional + docs: The MIME type of the file, if the field is for a file. + validation: + minLength: 1 + source: + openapi: ats_v3.yml + OfferApplication: + discriminated: false + docs: The application who is receiving the offer. + union: + - type: string + validation: + format: uuid + - Application + source: + openapi: ats_v3.yml + inline: true + OfferCreator: + discriminated: false + docs: The user who created the offer. + union: + - type: string + validation: + format: uuid + - RemoteUser + source: + openapi: ats_v3.yml + inline: true + OfferStatus: + discriminated: false + docs: |- + The offer's status. + + * `DRAFT` - DRAFT + * `APPROVAL-SENT` - APPROVAL-SENT + * `APPROVED` - APPROVED + * `SENT` - SENT + * `SENT-MANUALLY` - SENT-MANUALLY + * `OPENED` - OPENED + * `DENIED` - DENIED + * `SIGNED` - SIGNED + * `DEPRECATED` - DEPRECATED + union: + - OfferStatusEnum + - string + source: + openapi: ats_v3.yml + inline: true + Offer: + docs: >- + # The Offer Object + + ### Description + + The `Offer` object is used to represent an offer for a candidate's + application specific to a job. + + ### Usage Example + + Fetch from the `LIST Offers` endpoint and filter by `ID` to show all + offers. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + application: + type: optional + docs: The application who is receiving the offer. + creator: + type: optional + docs: The user who created the offer. + remote_created_at: + type: optional + docs: When the third party's offer was created. + closed_at: + type: optional + docs: When the offer was closed. + sent_at: + type: optional + docs: When the offer was sent. + start_date: + type: optional + docs: The employment start date on the offer. + status: + type: optional + docs: |- + The offer's status. + + * `DRAFT` - DRAFT + * `APPROVAL-SENT` - APPROVAL-SENT + * `APPROVED` - APPROVED + * `SENT` - SENT + * `SENT-MANUALLY` - SENT-MANUALLY + * `OPENED` - OPENED + * `DENIED` - DENIED + * `SIGNED` - SIGNED + * `DEPRECATED` - DEPRECATED + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: ats_v3.yml + OfferStatusEnum: + enum: + - DRAFT + - value: APPROVAL-SENT + name: ApprovalSent + - APPROVED + - SENT + - value: SENT-MANUALLY + name: SentManually + - OPENED + - DENIED + - SIGNED + - DEPRECATED + docs: |- + * `DRAFT` - DRAFT + * `APPROVAL-SENT` - APPROVAL-SENT + * `APPROVED` - APPROVED + * `SENT` - SENT + * `SENT-MANUALLY` - SENT-MANUALLY + * `OPENED` - OPENED + * `DENIED` - DENIED + * `SIGNED` - SIGNED + * `DEPRECATED` - DEPRECATED + source: + openapi: ats_v3.yml + Office: + docs: >- + # The Office Object + + ### Description + + The `Office` object is used to represent an office within a company. A + given `Job` has the `Office` ID in its offices field. + + ### Usage Example + + Fetch from the `LIST Offices` endpoint and view the offices within a + company. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The office's name. + location: + type: optional + docs: The office's location. + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: ats_v3.yml + OverallRecommendationEnum: + enum: + - DEFINITELY_NO + - 'NO' + - 'YES' + - STRONG_YES + - NO_DECISION + docs: |- + * `DEFINITELY_NO` - DEFINITELY_NO + * `NO` - NO + * `YES` - YES + * `STRONG_YES` - STRONG_YES + * `NO_DECISION` - NO_DECISION + source: + openapi: ats_v3.yml + PaginatedAccountDetailsAndActionsList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: ats_v3.yml + PaginatedActivityList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: ats_v3.yml + PaginatedApplicationList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: ats_v3.yml + PaginatedAttachmentList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: ats_v3.yml + PaginatedAuditLogEventList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: ats_v3.yml + PaginatedCandidateList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: ats_v3.yml + PaginatedDepartmentList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: ats_v3.yml + PaginatedEeocList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: ats_v3.yml + PaginatedIssueList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: ats_v3.yml + PaginatedJobInterviewStageList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: ats_v3.yml + PaginatedJobList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: ats_v3.yml + PaginatedJobPostingList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: ats_v3.yml + PaginatedOfferList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: ats_v3.yml + PaginatedOfficeList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: ats_v3.yml + PaginatedRejectReasonList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: ats_v3.yml + PaginatedRemoteUserList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: ats_v3.yml + PaginatedScheduledInterviewList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: ats_v3.yml + PaginatedScorecardList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: ats_v3.yml + PaginatedScreeningQuestionList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: ats_v3.yml + PaginatedSyncStatusList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: ats_v3.yml + PaginatedTagList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: ats_v3.yml + PatchedCandidateRequest: + docs: >- + # The Candidate Object + + ### Description + + The `Candidate` object is used to represent profile information about a + given Candidate. Because it is specific to a Candidate, this information + stays constant across applications. + + ### Usage Example + + Fetch from the `LIST Candidates` endpoint and filter by `ID` to show all + candidates. + properties: + first_name: + type: optional + docs: The candidate's first name. + last_name: + type: optional + docs: The candidate's last name. + company: + type: optional + docs: The candidate's current company. + title: + type: optional + docs: The candidate's current title. + last_interaction_at: + type: optional + docs: When the most recent interaction with the candidate occurred. + is_private: + type: optional + docs: Whether or not the candidate is private. + can_email: + type: optional + docs: Whether or not the candidate can be emailed. + locations: + type: optional>> + docs: The candidate's locations. + phone_numbers: optional> + email_addresses: optional> + urls: optional> + tags: + type: optional>> + docs: Array of `Tag` names as strings. + applications: + type: optional>> + docs: Array of `Application` object IDs. + attachments: + type: optional>> + docs: Array of `Attachment` object IDs. + remote_template_id: + type: optional + validation: + minLength: 1 + access: write-only + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: ats_v3.yml + PhoneNumberPhoneNumberType: + discriminated: false + docs: |- + The type of phone number. + + * `HOME` - HOME + * `WORK` - WORK + * `MOBILE` - MOBILE + * `SKYPE` - SKYPE + * `OTHER` - OTHER + union: + - PhoneNumberTypeEnum + - string + source: + openapi: ats_v3.yml + inline: true + PhoneNumber: + docs: |- + # The PhoneNumber Object + ### Description + The `PhoneNumber` object is used to represent a candidate's phone number. + ### Usage Example + Fetch from the `GET Candidate` endpoint and view their phone numbers. + properties: + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + value: + type: optional + docs: The phone number. + phone_number_type: + type: optional + docs: |- + The type of phone number. + + * `HOME` - HOME + * `WORK` - WORK + * `MOBILE` - MOBILE + * `SKYPE` - SKYPE + * `OTHER` - OTHER + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + source: + openapi: ats_v3.yml + PhoneNumberRequestPhoneNumberType: + discriminated: false + docs: |- + The type of phone number. + + * `HOME` - HOME + * `WORK` - WORK + * `MOBILE` - MOBILE + * `SKYPE` - SKYPE + * `OTHER` - OTHER + union: + - PhoneNumberTypeEnum + - string + source: + openapi: ats_v3.yml + inline: true + PhoneNumberRequest: + docs: |- + # The PhoneNumber Object + ### Description + The `PhoneNumber` object is used to represent a candidate's phone number. + ### Usage Example + Fetch from the `GET Candidate` endpoint and view their phone numbers. + properties: + value: + type: optional + docs: The phone number. + phone_number_type: + type: optional + docs: |- + The type of phone number. + + * `HOME` - HOME + * `WORK` - WORK + * `MOBILE` - MOBILE + * `SKYPE` - SKYPE + * `OTHER` - OTHER + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: ats_v3.yml + PhoneNumberTypeEnum: + enum: + - HOME + - WORK + - MOBILE + - SKYPE + - OTHER + docs: |- + * `HOME` - HOME + * `WORK` - WORK + * `MOBILE` - MOBILE + * `SKYPE` - SKYPE + * `OTHER` - OTHER + source: + openapi: ats_v3.yml + RaceEnum: + enum: + - AMERICAN_INDIAN_OR_ALASKAN_NATIVE + - ASIAN + - BLACK_OR_AFRICAN_AMERICAN + - HISPANIC_OR_LATINO + - WHITE + - NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER + - TWO_OR_MORE_RACES + - DECLINE_TO_SELF_IDENTIFY + docs: >- + * `AMERICAN_INDIAN_OR_ALASKAN_NATIVE` - AMERICAN_INDIAN_OR_ALASKAN_NATIVE + + * `ASIAN` - ASIAN + + * `BLACK_OR_AFRICAN_AMERICAN` - BLACK_OR_AFRICAN_AMERICAN + + * `HISPANIC_OR_LATINO` - HISPANIC_OR_LATINO + + * `WHITE` - WHITE + + * `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER` - + NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER + + * `TWO_OR_MORE_RACES` - TWO_OR_MORE_RACES + + * `DECLINE_TO_SELF_IDENTIFY` - DECLINE_TO_SELF_IDENTIFY + source: + openapi: ats_v3.yml + ReasonEnum: + enum: + - GENERAL_CUSTOMER_REQUEST + - GDPR + - OTHER + docs: |- + * `GENERAL_CUSTOMER_REQUEST` - GENERAL_CUSTOMER_REQUEST + * `GDPR` - GDPR + * `OTHER` - OTHER + source: + openapi: ats_v3.yml + RejectReason: + docs: >- + # The RejectReason Object + + ### Description + + The `RejectReason` object is used to represent a reason for rejecting an + application. These can typically be configured within an ATS system. + + ### Usage Example + + Fetch from the `LIST RejectReasons` endpoint and filter by `ID` to show + all reasons. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The rejection reason’s name. + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: ats_v3.yml + RemoteData: + docs: >- + # The RemoteData Object + + ### Description + + The `RemoteData` object is used to represent the full data pulled from the + third-party API for an object. + + + ### Usage Example + + TODO + properties: + path: + type: string + docs: The third-party API path that is being called. + data: + type: optional + access: read-only + source: + openapi: ats_v3.yml + RemoteEndpointInfo: + properties: + method: string + url_path: string + field_traversal_path: list + source: + openapi: ats_v3.yml + RemoteFieldApiCoverage: + discriminated: false + union: + - integer + - double + source: + openapi: ats_v3.yml + inline: true + RemoteFieldApi: + properties: + schema: map + remote_key_name: string + remote_endpoint_info: RemoteEndpointInfo + example_values: optional> + advanced_metadata: optional + coverage: + type: optional + access: read-only + source: + openapi: ats_v3.yml + RemoteFieldApiResponse: + properties: + Activity: optional> + Application: optional> + Attachment: optional> + Candidate: optional> + Department: optional> + EEOC: optional> + ScheduledInterview: optional> + Job: optional> + JobPosting: optional> + JobInterviewStage: optional> + Offer: optional> + Office: optional> + RejectReason: optional> + Scorecard: optional> + Tag: optional> + RemoteUser: optional> + source: + openapi: ats_v3.yml + RemoteKey: + docs: >- + # The RemoteKey Object + + ### Description + + The `RemoteKey` object is used to represent a request for a new remote + key. + + + ### Usage Example + + Post a `GenerateRemoteKey` to receive a new `RemoteKey`. + properties: + name: string + key: string + source: + openapi: ats_v3.yml + RemoteResponseResponseType: + discriminated: false + union: + - ResponseTypeEnum + - string + source: + openapi: ats_v3.yml + inline: true + RemoteResponse: + docs: >- + # The RemoteResponse Object + + ### Description + + The `RemoteResponse` object is used to represent information returned from + a third-party endpoint. + + + ### Usage Example + + View the `RemoteResponse` returned from your `DataPassthrough`. + properties: + method: string + path: string + status: integer + response: unknown + response_headers: optional> + response_type: optional + headers: optional> + source: + openapi: ats_v3.yml + RemoteUserAccessRole: + discriminated: false + docs: |- + The user's role. + + * `SUPER_ADMIN` - SUPER_ADMIN + * `ADMIN` - ADMIN + * `TEAM_MEMBER` - TEAM_MEMBER + * `LIMITED_TEAM_MEMBER` - LIMITED_TEAM_MEMBER + * `INTERVIEWER` - INTERVIEWER + union: + - AccessRoleEnum + - string + source: + openapi: ats_v3.yml + inline: true + RemoteUser: + docs: >- + # The RemoteUser Object + + ### Description + + The `RemoteUser` object is used to represent a user with a login to the + ATS system. + + ### Usage Example + + Fetch from the `LIST RemoteUsers` endpoint to show all users for a third + party. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + first_name: + type: optional + docs: The user's first name. + last_name: + type: optional + docs: The user's last name. + email: + type: optional + docs: The user's email. + validation: + format: email + maxLength: 254 + disabled: + type: optional + docs: Whether the user's account had been disabled. + remote_created_at: + type: optional + docs: When the third party's user was created. + access_role: + type: optional + docs: |- + The user's role. + + * `SUPER_ADMIN` - SUPER_ADMIN + * `ADMIN` - ADMIN + * `TEAM_MEMBER` - TEAM_MEMBER + * `LIMITED_TEAM_MEMBER` - LIMITED_TEAM_MEMBER + * `INTERVIEWER` - INTERVIEWER + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: ats_v3.yml + RequestFormatEnum: + enum: + - JSON + - XML + - MULTIPART + docs: |- + * `JSON` - JSON + * `XML` - XML + * `MULTIPART` - MULTIPART + source: + openapi: ats_v3.yml + ResponseTypeEnum: + enum: + - JSON + - BASE64_GZIP + docs: |- + * `JSON` - JSON + * `BASE64_GZIP` - BASE64_GZIP + source: + openapi: ats_v3.yml + RoleEnum: + enum: + - ADMIN + - DEVELOPER + - MEMBER + - API + - SYSTEM + - MERGE_TEAM + docs: |- + * `ADMIN` - ADMIN + * `DEVELOPER` - DEVELOPER + * `MEMBER` - MEMBER + * `API` - API + * `SYSTEM` - SYSTEM + * `MERGE_TEAM` - MERGE_TEAM + source: + openapi: ats_v3.yml + ScheduledInterviewApplication: + discriminated: false + docs: The application being interviewed. + union: + - type: string + validation: + format: uuid + - Application + source: + openapi: ats_v3.yml + inline: true + ScheduledInterviewJobInterviewStage: + discriminated: false + docs: The stage of the interview. + union: + - type: string + validation: + format: uuid + - JobInterviewStage + source: + openapi: ats_v3.yml + inline: true + ScheduledInterviewOrganizer: + discriminated: false + docs: The user organizing the interview. + union: + - type: string + validation: + format: uuid + - RemoteUser + source: + openapi: ats_v3.yml + inline: true + ScheduledInterviewInterviewersItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - RemoteUser + source: + openapi: ats_v3.yml + inline: true + ScheduledInterviewStatus: + discriminated: false + docs: |- + The interview's status. + + * `SCHEDULED` - SCHEDULED + * `AWAITING_FEEDBACK` - AWAITING_FEEDBACK + * `COMPLETE` - COMPLETE + union: + - ScheduledInterviewStatusEnum + - string + source: + openapi: ats_v3.yml + inline: true + ScheduledInterview: + docs: >- + # The ScheduledInterview Object + + ### Description + + The `ScheduledInterview` object is used to represent a scheduled interview + for a given candidate’s application to a job. An `Application` can have + multiple `ScheduledInterview`s depending on the particular hiring process. + + ### Usage Example + + Fetch from the `LIST ScheduledInterviews` endpoint and filter by + `interviewers` to show all office locations. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + application: + type: optional + docs: The application being interviewed. + job_interview_stage: + type: optional + docs: The stage of the interview. + organizer: + type: optional + docs: The user organizing the interview. + interviewers: + type: optional>> + docs: Array of `RemoteUser` IDs. + location: + type: optional + docs: The interview's location. + start_at: + type: optional + docs: When the interview was started. + end_at: + type: optional + docs: When the interview was ended. + remote_created_at: + type: optional + docs: When the third party's interview was created. + remote_updated_at: + type: optional + docs: When the third party's interview was updated. + status: + type: optional + docs: |- + The interview's status. + + * `SCHEDULED` - SCHEDULED + * `AWAITING_FEEDBACK` - AWAITING_FEEDBACK + * `COMPLETE` - COMPLETE + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: ats_v3.yml + ScheduledInterviewRequestApplication: + discriminated: false + docs: The application being interviewed. + union: + - type: string + validation: + format: uuid + - Application + source: + openapi: ats_v3.yml + inline: true + ScheduledInterviewRequestJobInterviewStage: + discriminated: false + docs: The stage of the interview. + union: + - type: string + validation: + format: uuid + - JobInterviewStage + source: + openapi: ats_v3.yml + inline: true + ScheduledInterviewRequestOrganizer: + discriminated: false + docs: The user organizing the interview. + union: + - type: string + validation: + format: uuid + - RemoteUser + source: + openapi: ats_v3.yml + inline: true + ScheduledInterviewRequestInterviewersItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - RemoteUser + source: + openapi: ats_v3.yml + inline: true + ScheduledInterviewRequestStatus: + discriminated: false + docs: |- + The interview's status. + + * `SCHEDULED` - SCHEDULED + * `AWAITING_FEEDBACK` - AWAITING_FEEDBACK + * `COMPLETE` - COMPLETE + union: + - ScheduledInterviewStatusEnum + - string + source: + openapi: ats_v3.yml + inline: true + ScheduledInterviewRequest: + docs: >- + # The ScheduledInterview Object + + ### Description + + The `ScheduledInterview` object is used to represent a scheduled interview + for a given candidate’s application to a job. An `Application` can have + multiple `ScheduledInterview`s depending on the particular hiring process. + + ### Usage Example + + Fetch from the `LIST ScheduledInterviews` endpoint and filter by + `interviewers` to show all office locations. + properties: + application: + type: optional + docs: The application being interviewed. + job_interview_stage: + type: optional + docs: The stage of the interview. + organizer: + type: optional + docs: The user organizing the interview. + interviewers: + type: optional>> + docs: Array of `RemoteUser` IDs. + location: + type: optional + docs: The interview's location. + start_at: + type: optional + docs: When the interview was started. + end_at: + type: optional + docs: When the interview was ended. + status: + type: optional + docs: |- + The interview's status. + + * `SCHEDULED` - SCHEDULED + * `AWAITING_FEEDBACK` - AWAITING_FEEDBACK + * `COMPLETE` - COMPLETE + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: ats_v3.yml + ScheduledInterviewResponse: + properties: + model: ScheduledInterview + warnings: list + errors: list + logs: optional> + source: + openapi: ats_v3.yml + ScheduledInterviewStatusEnum: + enum: + - SCHEDULED + - AWAITING_FEEDBACK + - COMPLETE + docs: |- + * `SCHEDULED` - SCHEDULED + * `AWAITING_FEEDBACK` - AWAITING_FEEDBACK + * `COMPLETE` - COMPLETE + source: + openapi: ats_v3.yml + ScorecardApplication: + discriminated: false + docs: The application being scored. + union: + - type: string + validation: + format: uuid + - Application + source: + openapi: ats_v3.yml + inline: true + ScorecardInterview: + discriminated: false + docs: The interview being scored. + union: + - type: string + validation: + format: uuid + - ScheduledInterview + source: + openapi: ats_v3.yml + inline: true + ScorecardInterviewer: + discriminated: false + docs: The interviewer doing the scoring. + union: + - type: string + validation: + format: uuid + - RemoteUser + source: + openapi: ats_v3.yml + inline: true + ScorecardOverallRecommendation: + discriminated: false + docs: |- + The inteviewer's recommendation. + + * `DEFINITELY_NO` - DEFINITELY_NO + * `NO` - NO + * `YES` - YES + * `STRONG_YES` - STRONG_YES + * `NO_DECISION` - NO_DECISION + union: + - OverallRecommendationEnum + - string + source: + openapi: ats_v3.yml + inline: true + Scorecard: + docs: >- + # The Scorecard Object + + ### Description + + The `Scorecard` object is used to represent an interviewer's candidate + recommendation based on a particular interview. + + ### Usage Example + + Fetch from the `LIST Scorecards` endpoint and filter by `application` to + show all scorecard for an applicant. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + application: + type: optional + docs: The application being scored. + interview: + type: optional + docs: The interview being scored. + interviewer: + type: optional + docs: The interviewer doing the scoring. + remote_created_at: + type: optional + docs: When the third party's scorecard was created. + submitted_at: + type: optional + docs: When the scorecard was submitted. + overall_recommendation: + type: optional + docs: |- + The inteviewer's recommendation. + + * `DEFINITELY_NO` - DEFINITELY_NO + * `NO` - NO + * `YES` - YES + * `STRONG_YES` - STRONG_YES + * `NO_DECISION` - NO_DECISION + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: ats_v3.yml + ScreeningQuestionJob: + discriminated: false + docs: The job associated with the screening question. + union: + - type: string + validation: + format: uuid + - Job + source: + openapi: ats_v3.yml + inline: true + ScreeningQuestionType: + discriminated: false + docs: |- + The data type for the screening question. + + * `DATE` - DATE + * `FILE` - FILE + * `SINGLE_SELECT` - SINGLE_SELECT + * `MULTI_SELECT` - MULTI_SELECT + * `SINGLE_LINE_TEXT` - SINGLE_LINE_TEXT + * `MULTI_LINE_TEXT` - MULTI_LINE_TEXT + * `NUMERIC` - NUMERIC + * `BOOLEAN` - BOOLEAN + union: + - ScreeningQuestionTypeEnum + - string + source: + openapi: ats_v3.yml + inline: true + ScreeningQuestion: + docs: >- + # The ScreeningQuestion Object + + ### Description + + The `ScreeningQuestion` object is used to represent questions asked to + screen candidates for a job. + + + ### Usage Example + + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + job: + type: optional + docs: The job associated with the screening question. + description: + type: optional + docs: The description of the screening question + validation: + maxLength: 500 + title: + type: optional + docs: The title of the screening question + validation: + maxLength: 2500 + type: + type: optional + docs: |- + The data type for the screening question. + + * `DATE` - DATE + * `FILE` - FILE + * `SINGLE_SELECT` - SINGLE_SELECT + * `MULTI_SELECT` - MULTI_SELECT + * `SINGLE_LINE_TEXT` - SINGLE_LINE_TEXT + * `MULTI_LINE_TEXT` - MULTI_LINE_TEXT + * `NUMERIC` - NUMERIC + * `BOOLEAN` - BOOLEAN + required: + type: optional + docs: Whether or not the screening question is required. + options: optional> + remote_was_deleted: + type: optional + docs: >- + 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/). + source: + openapi: ats_v3.yml + ScreeningQuestionAnswerQuestion: + discriminated: false + docs: >- + The screening question associated with the candidate’s answer. To + determine the data type of the answer, you can expand on the screening + question by adding `screening_question_answers.question` to the `expand` + query parameter. + union: + - type: string + validation: + format: uuid + - ScreeningQuestion + source: + openapi: ats_v3.yml + inline: true + ScreeningQuestionAnswer: + docs: >- + # The ScreeningQuestionAnswer Object + + ### Description + + The `ScreeningQuestionAnswer` object is used to represent candidate + responses to a screening question, for a specific application. + + + ### Usage Example + + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + question: + type: optional + docs: >- + The screening question associated with the candidate’s answer. To + determine the data type of the answer, you can expand on the screening + question by adding `screening_question_answers.question` to the + `expand` query parameter. + answer: + type: optional + docs: The candidate’s response to the screening question. + validation: + maxLength: 10000 + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + source: + openapi: ats_v3.yml + ScreeningQuestionAnswerRequestQuestion: + discriminated: false + docs: >- + The screening question associated with the candidate’s answer. To + determine the data type of the answer, you can expand on the screening + question by adding `screening_question_answers.question` to the `expand` + query parameter. + union: + - type: string + validation: + format: uuid + - ScreeningQuestion + source: + openapi: ats_v3.yml + inline: true + ScreeningQuestionAnswerRequest: + docs: >- + # The ScreeningQuestionAnswer Object + + ### Description + + The `ScreeningQuestionAnswer` object is used to represent candidate + responses to a screening question, for a specific application. + + + ### Usage Example + + TODO + properties: + remote_id: + type: optional + docs: The third-party API ID of the matching object. + question: + type: optional + docs: >- + The screening question associated with the candidate’s answer. To + determine the data type of the answer, you can expand on the screening + question by adding `screening_question_answers.question` to the + `expand` query parameter. + answer: + type: optional + docs: The candidate’s response to the screening question. + validation: + maxLength: 10000 + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: ats_v3.yml + ScreeningQuestionOption: + docs: >- + # The ScreeningQuestionOption Object + + ### Description + + The `ScreeningQuestionOption` object is used to represent options for a + `ScreeningQuestion` object + + + ### Usage Example + + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + label: + type: optional + docs: Available response options + validation: + maxLength: 300 + remote_was_deleted: + type: optional + docs: >- + 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/). + source: + openapi: ats_v3.yml + ScreeningQuestionTypeEnum: + enum: + - DATE + - FILE + - SINGLE_SELECT + - MULTI_SELECT + - SINGLE_LINE_TEXT + - MULTI_LINE_TEXT + - NUMERIC + - BOOLEAN + docs: |- + * `DATE` - DATE + * `FILE` - FILE + * `SINGLE_SELECT` - SINGLE_SELECT + * `MULTI_SELECT` - MULTI_SELECT + * `SINGLE_LINE_TEXT` - SINGLE_LINE_TEXT + * `MULTI_LINE_TEXT` - MULTI_LINE_TEXT + * `NUMERIC` - NUMERIC + * `BOOLEAN` - BOOLEAN + source: + openapi: ats_v3.yml + SelectiveSyncConfigurationsUsageEnum: + enum: + - IN_NEXT_SYNC + - IN_LAST_SYNC + docs: |- + * `IN_NEXT_SYNC` - IN_NEXT_SYNC + * `IN_LAST_SYNC` - IN_LAST_SYNC + source: + openapi: ats_v3.yml + StatusFd5Enum: + enum: + - SYNCING + - DONE + - FAILED + - DISABLED + - PAUSED + - PARTIALLY_SYNCED + docs: |- + * `SYNCING` - SYNCING + * `DONE` - DONE + * `FAILED` - FAILED + * `DISABLED` - DISABLED + * `PAUSED` - PAUSED + * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED + source: + openapi: ats_v3.yml + SyncStatusLastSyncResult: + discriminated: false + union: + - LastSyncResultEnum + - string + source: + openapi: ats_v3.yml + inline: true + SyncStatusStatus: + discriminated: false + union: + - StatusFd5Enum + - string + source: + openapi: ats_v3.yml + inline: true + SyncStatus: + docs: >- + # The SyncStatus Object + + ### Description + + The `SyncStatus` object is used to represent the syncing state of an + account + + + ### Usage Example + + View the `SyncStatus` for an account to see how recently its models were + synced. + properties: + model_name: string + model_id: string + last_sync_start: optional + next_sync_start: optional + last_sync_result: optional + last_sync_finished: optional + status: SyncStatusStatus + is_initial_sync: boolean + selective_sync_configurations_usage: optional + source: + openapi: ats_v3.yml + Tag: + docs: >- + # The Tag Object + + ### Description + + The `Tag` object is used to represent a tag for a candidate. + + ### Usage Example + + Fetch from the `LIST Tags` endpoint and view the tags used within a + company. + properties: + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The tag's name. + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: optional>>> + source: + openapi: ats_v3.yml + UrlUrlType: + discriminated: false + docs: |- + The type of site. + + * `PERSONAL` - PERSONAL + * `COMPANY` - COMPANY + * `PORTFOLIO` - PORTFOLIO + * `BLOG` - BLOG + * `SOCIAL_MEDIA` - SOCIAL_MEDIA + * `OTHER` - OTHER + * `JOB_POSTING` - JOB_POSTING + union: + - UrlTypeEnum + - string + source: + openapi: ats_v3.yml + inline: true + Url: + docs: >- + # The Url Object + + ### Description + + The `Url` object is used to represent hyperlinks associated with the + parent model. + + ### Usage Example + + Fetch from the `GET Candidate` endpoint and view their website urls. + properties: + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + value: + type: optional + docs: The site's url. + validation: + format: uri + maxLength: 2000 + url_type: + type: optional + docs: |- + The type of site. + + * `PERSONAL` - PERSONAL + * `COMPANY` - COMPANY + * `PORTFOLIO` - PORTFOLIO + * `BLOG` - BLOG + * `SOCIAL_MEDIA` - SOCIAL_MEDIA + * `OTHER` - OTHER + * `JOB_POSTING` - JOB_POSTING + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + source: + openapi: ats_v3.yml + UrlRequestUrlType: + discriminated: false + docs: |- + The type of site. + + * `PERSONAL` - PERSONAL + * `COMPANY` - COMPANY + * `PORTFOLIO` - PORTFOLIO + * `BLOG` - BLOG + * `SOCIAL_MEDIA` - SOCIAL_MEDIA + * `OTHER` - OTHER + * `JOB_POSTING` - JOB_POSTING + union: + - UrlTypeEnum + - string + source: + openapi: ats_v3.yml + inline: true + UrlRequest: + docs: >- + # The Url Object + + ### Description + + The `Url` object is used to represent hyperlinks associated with the + parent model. + + ### Usage Example + + Fetch from the `GET Candidate` endpoint and view their website urls. + properties: + value: + type: optional + docs: The site's url. + validation: + format: uri + maxLength: 2000 + url_type: + type: optional + docs: |- + The type of site. + + * `PERSONAL` - PERSONAL + * `COMPANY` - COMPANY + * `PORTFOLIO` - PORTFOLIO + * `BLOG` - BLOG + * `SOCIAL_MEDIA` - SOCIAL_MEDIA + * `OTHER` - OTHER + * `JOB_POSTING` - JOB_POSTING + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: ats_v3.yml + UrlTypeEnum: + enum: + - PERSONAL + - COMPANY + - PORTFOLIO + - BLOG + - SOCIAL_MEDIA + - OTHER + - JOB_POSTING + docs: |- + * `PERSONAL` - PERSONAL + * `COMPANY` - COMPANY + * `PORTFOLIO` - PORTFOLIO + * `BLOG` - BLOG + * `SOCIAL_MEDIA` - SOCIAL_MEDIA + * `OTHER` - OTHER + * `JOB_POSTING` - JOB_POSTING + source: + openapi: ats_v3.yml + ValidationProblemSource: + properties: + pointer: string + source: + openapi: ats_v3.yml + VeteranStatusEnum: + enum: + - I_AM_NOT_A_PROTECTED_VETERAN + - I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN + - I_DONT_WISH_TO_ANSWER + docs: >- + * `I_AM_NOT_A_PROTECTED_VETERAN` - I_AM_NOT_A_PROTECTED_VETERAN + + * + `I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN` + - I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN + + * `I_DONT_WISH_TO_ANSWER` - I_DONT_WISH_TO_ANSWER + source: + openapi: ats_v3.yml + VisibilityEnum: + enum: + - ADMIN_ONLY + - PUBLIC + - PRIVATE + docs: |- + * `ADMIN_ONLY` - ADMIN_ONLY + * `PUBLIC` - PUBLIC + * `PRIVATE` - PRIVATE + source: + openapi: ats_v3.yml + WarningValidationProblem: + properties: + source: optional + title: string + detail: string + problem_type: string + source: + openapi: ats_v3.yml + WebhookReceiver: + properties: + event: string + is_active: boolean + key: optional + source: + openapi: ats_v3.yml diff --git a/.mock/definition/ATS/accountDetails.yml b/.mock/definition/ATS/accountDetails.yml new file mode 100644 index 000000000..812b16432 --- /dev/null +++ b/.mock/definition/ATS/accountDetails.yml @@ -0,0 +1,36 @@ +imports: + atsRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + retrieve: + path: /ats/v1/account-details + method: GET + auth: true + docs: Get details for a linked account. + source: + openapi: ats_v3.yml + response: + docs: '' + type: atsRoot.AccountDetails + status-code: 200 + examples: + - headers: {} + response: + body: + id: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd + integration: BambooHR + integration_slug: bamboohr + category: hris + end_user_origin_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + end_user_organization_name: Waystar Royco + end_user_email_address: kendall.roy@waystar-royco.com + status: COMPLETE + webhook_listener_url: >- + https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 + is_duplicate: true + account_type: PRODUCTION + completed_at: '2024-08-26T20:11:19Z' + source: + openapi: ats_v3.yml diff --git a/.mock/definition/ATS/accountToken.yml b/.mock/definition/ATS/accountToken.yml new file mode 100644 index 000000000..5155cd0e2 --- /dev/null +++ b/.mock/definition/ATS/accountToken.yml @@ -0,0 +1,44 @@ +imports: + atsRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + retrieve: + path: /ats/v1/account-token/{public_token} + method: GET + auth: true + docs: >- + Returns the account token for the end user with the provided public + token. + source: + openapi: ats_v3.yml + path-parameters: + public_token: string + response: + docs: '' + type: atsRoot.AccountToken + status-code: 200 + examples: + - path-parameters: + public_token: public_token + response: + body: + account_token: T9klMDQrcHdm9jrtHuOS2Nf06BIHwMNjpPXPMB + integration: + name: name + abbreviated_name: abbreviated_name + categories: + - hris + image: image + square_image: square_image + color: color + slug: slug + api_endpoints_to_documentation_urls: + key: value + webhook_setup_guide_url: webhook_setup_guide_url + category_beta_status: + key: value + id: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd + source: + openapi: ats_v3.yml diff --git a/.mock/definition/ATS/activities.yml b/.mock/definition/ATS/activities.yml new file mode 100644 index 000000000..69030cc81 --- /dev/null +++ b/.mock/definition/ATS/activities.yml @@ -0,0 +1,480 @@ +types: + ActivitiesListRequestRemoteFields: + enum: + - activity_type + - value: activity_type,visibility + name: ActivityTypeVisibility + - visibility + source: + openapi: ats_v3.yml + ActivitiesListRequestShowEnumOrigins: + enum: + - activity_type + - value: activity_type,visibility + name: ActivityTypeVisibility + - visibility + source: + openapi: ats_v3.yml + ActivitiesRetrieveRequestRemoteFields: + enum: + - activity_type + - value: activity_type,visibility + name: ActivityTypeVisibility + - visibility + source: + openapi: ats_v3.yml + ActivitiesRetrieveRequestShowEnumOrigins: + enum: + - activity_type + - value: activity_type,visibility + name: ActivityTypeVisibility + - visibility + source: + openapi: ats_v3.yml +imports: + atsRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ats/v1/activities + method: GET + auth: true + docs: Returns a list of `Activity` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: ats_v3.yml + request: + name: ActivitiesListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional> + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_fields: + type: optional + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + show_enum_origins: + type: optional + docs: >- + A comma separated list of enum field names for which you'd like + the original values to be returned, instead of Merge's normalized + enum values. [Learn + more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) + user_id: + type: optional + docs: If provided, will only return activities done by this user. + response: + docs: '' + type: atsRoot.PaginatedActivityList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '198123' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + user: user + remote_created_at: '2021-10-15T00:00:00Z' + activity_type: NOTE + subject: Gil Feig's interview + body: Candidate loves integrations! + visibility: ADMIN_ONLY + candidate: 550e8400-e29b-41d4-a716-446655440000 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + create: + path: /ats/v1/activities + method: POST + auth: true + docs: Creates an `Activity` object with the given values. + source: + openapi: ats_v3.yml + request: + name: ActivityEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: atsRoot.ActivityRequest + remote_user_id: string + content-type: application/json + response: + docs: '' + type: atsRoot.ActivityResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + remote_user_id: remote_user_id + response: + body: + model: + id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '198123' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + user: user + remote_created_at: '2021-10-15T00:00:00Z' + activity_type: NOTE + subject: Gil Feig's interview + body: Candidate loves integrations! + visibility: ADMIN_ONLY + candidate: 550e8400-e29b-41d4-a716-446655440000 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /ats/v1/activities/{id} + method: GET + auth: true + docs: Returns an `Activity` object with the given `id`. + source: + openapi: ats_v3.yml + path-parameters: + id: string + request: + name: ActivitiesRetrieveRequest + query-parameters: + expand: + type: optional> + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional + docs: >- + 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) + response: + docs: '' + type: atsRoot.Activity + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '198123' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + user: user + remote_created_at: '2021-10-15T00:00:00Z' + activity_type: NOTE + subject: Gil Feig's interview + body: Candidate loves integrations! + visibility: ADMIN_ONLY + candidate: 550e8400-e29b-41d4-a716-446655440000 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + metaPostRetrieve: + path: /ats/v1/activities/meta/post + method: GET + auth: true + docs: Returns metadata for `Activity` POSTs. + source: + openapi: ats_v3.yml + response: + docs: '' + type: atsRoot.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + source: + openapi: ats_v3.yml diff --git a/.mock/definition/ATS/applications.yml b/.mock/definition/ATS/applications.yml new file mode 100644 index 000000000..9e9930a13 --- /dev/null +++ b/.mock/definition/ATS/applications.yml @@ -0,0 +1,601 @@ +types: + ApplicationsListRequestExpandItem: + enum: + - candidate + - credited_to + - current_stage + - job + - offers + - reject_reason + - screening_question_answers + - value: screening_question_answers.question + name: ScreeningQuestionAnswersQuestion + source: + openapi: ats_v3.yml + ApplicationsRetrieveRequestExpandItem: + enum: + - candidate + - credited_to + - current_stage + - job + - offers + - reject_reason + - screening_question_answers + - value: screening_question_answers.question + name: ScreeningQuestionAnswersQuestion + source: + openapi: ats_v3.yml +imports: + atsRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ats/v1/applications + method: GET + auth: true + docs: Returns a list of `Application` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: ats_v3.yml + request: + name: ApplicationsListRequest + query-parameters: + candidate_id: + type: optional + docs: If provided, will only return applications for this candidate. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + credited_to_id: + type: optional + docs: If provided, will only return applications credited to this user. + current_stage_id: + type: optional + docs: >- + If provided, will only return applications at this interview + stage. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + job_id: + type: optional + docs: If provided, will only return applications for this job. + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + reject_reason_id: + type: optional + docs: >- + If provided, will only return applications with this reject + reason. + remote_id: + type: optional + docs: The API provider's ID for the given object. + source: + type: optional + docs: If provided, will only return applications with this source. + response: + docs: '' + type: atsRoot.PaginatedApplicationList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 92e8a369-fffe-430d-b93a-f7e8a16563f1 + remote_id: '98796' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + candidate: candidate + job: job + applied_at: '2021-10-15T00:00:00Z' + rejected_at: '2021-11-15T00:00:00Z' + offers: + - e9b5c11d-c588-468e-8567-cd6992e42b62 + source: Campus recruiting event + credited_to: credited_to + screening_question_answers: + - screening_question_answers + - screening_question_answers + current_stage: current_stage + reject_reason: reject_reason + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /candidacies + data: + - Varies by platform + create: + path: /ats/v1/applications + method: POST + auth: true + docs: > + Creates an `Application` object with the given values. + + For certain integrations, but not all, our API detects duplicate + candidates and will associate applications with existing records in the + third-party. New candidates are created and automatically linked to the + application. + + + See our [Help Center + article](https://help.merge.dev/en/articles/10012366-updates-to-post-applications-oct-2024) + for detailed support per integration. + source: + openapi: ats_v3.yml + request: + name: ApplicationEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: atsRoot.ApplicationRequest + remote_user_id: string + content-type: application/json + response: + docs: '' + type: atsRoot.ApplicationResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + remote_user_id: remote_user_id + response: + body: + model: + id: 92e8a369-fffe-430d-b93a-f7e8a16563f1 + remote_id: '98796' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + candidate: candidate + job: job + applied_at: '2021-10-15T00:00:00Z' + rejected_at: '2021-11-15T00:00:00Z' + offers: + - e9b5c11d-c588-468e-8567-cd6992e42b62 + source: Campus recruiting event + credited_to: credited_to + screening_question_answers: + - screening_question_answers + - screening_question_answers + current_stage: current_stage + reject_reason: reject_reason + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /candidacies + data: + - Varies by platform + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /ats/v1/applications/{id} + method: GET + auth: true + docs: Returns an `Application` object with the given `id`. + source: + openapi: ats_v3.yml + path-parameters: + id: string + request: + name: ApplicationsRetrieveRequest + query-parameters: + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: atsRoot.Application + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 92e8a369-fffe-430d-b93a-f7e8a16563f1 + remote_id: '98796' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + candidate: candidate + job: job + applied_at: '2021-10-15T00:00:00Z' + rejected_at: '2021-11-15T00:00:00Z' + offers: + - e9b5c11d-c588-468e-8567-cd6992e42b62 + source: Campus recruiting event + credited_to: credited_to + screening_question_answers: + - screening_question_answers + - screening_question_answers + current_stage: current_stage + reject_reason: reject_reason + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /candidacies + data: + - Varies by platform + changeStageCreate: + path: /ats/v1/applications/{id}/change-stage + method: POST + auth: true + docs: Updates the `current_stage` field of an `Application` object + source: + openapi: ats_v3.yml + path-parameters: + id: string + request: + name: UpdateApplicationStageRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + job_interview_stage: + type: optional + docs: The interview stage to move the application to. + validation: + format: uuid + remote_user_id: + type: optional + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: atsRoot.ApplicationResponse + status-code: 201 + examples: + - path-parameters: + id: id + headers: {} + request: {} + response: + body: + model: + id: 92e8a369-fffe-430d-b93a-f7e8a16563f1 + remote_id: '98796' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + candidate: candidate + job: job + applied_at: '2021-10-15T00:00:00Z' + rejected_at: '2021-11-15T00:00:00Z' + offers: + - e9b5c11d-c588-468e-8567-cd6992e42b62 + source: Campus recruiting event + credited_to: credited_to + screening_question_answers: + - screening_question_answers + - screening_question_answers + current_stage: current_stage + reject_reason: reject_reason + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /candidacies + data: + - Varies by platform + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + metaPostRetrieve: + path: /ats/v1/applications/meta/post + method: GET + auth: true + docs: Returns metadata for `Application` POSTs. + source: + openapi: ats_v3.yml + request: + name: ApplicationsMetaPostRetrieveRequest + query-parameters: + application_remote_template_id: + type: optional + docs: >- + The template ID associated with the nested application in the + request. + response: + docs: '' + type: atsRoot.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + source: + openapi: ats_v3.yml diff --git a/.mock/definition/ATS/asyncPassthrough.yml b/.mock/definition/ATS/asyncPassthrough.yml new file mode 100644 index 000000000..26c270543 --- /dev/null +++ b/.mock/definition/ATS/asyncPassthrough.yml @@ -0,0 +1,70 @@ +imports: + atsRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /ats/v1/async-passthrough + method: POST + auth: true + docs: >- + Asynchronously pull data from an endpoint not currently supported by + Merge. + source: + openapi: ats_v3.yml + request: + body: atsRoot.DataPassthroughRequest + content-type: application/json + response: + docs: '' + type: atsRoot.AsyncPassthroughReciept + status-code: 200 + examples: + - headers: {} + request: + method: GET + path: /scooters + response: + body: + async_passthrough_receipt_id: fd29020f-2695-445e-922e-dcd5e81903fd + retrieve: + path: /ats/v1/async-passthrough/{async_passthrough_receipt_id} + method: GET + auth: true + docs: Retrieves data from earlier async-passthrough POST request + source: + openapi: ats_v3.yml + path-parameters: + async_passthrough_receipt_id: string + response: + docs: '' + type: AsyncPassthroughRetrieveResponse + status-code: 200 + examples: + - path-parameters: + async_passthrough_receipt_id: async_passthrough_receipt_id + headers: {} + response: + body: + method: GET + path: /scooters + status: 200 + response: + key: value + response_headers: + X-Page-Token: value + response_type: JSON + headers: + EXTRA-HEADER: value + Authorization: + source: + openapi: ats_v3.yml +types: + AsyncPassthroughRetrieveResponse: + discriminated: false + union: + - atsRoot.RemoteResponse + - string + source: + openapi: ats_v3.yml diff --git a/.mock/definition/ATS/attachments.yml b/.mock/definition/ATS/attachments.yml new file mode 100644 index 000000000..20de5912b --- /dev/null +++ b/.mock/definition/ATS/attachments.yml @@ -0,0 +1,438 @@ +imports: + atsRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ats/v1/attachments + method: GET + auth: true + docs: Returns a list of `Attachment` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: ats_v3.yml + request: + name: AttachmentsListRequest + query-parameters: + candidate_id: + type: optional + docs: If provided, will only return attachments for this candidate. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional> + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: atsRoot.PaginatedAttachmentList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: c640b80b-fac9-409f-aa19-1f9221aec445 + remote_id: '11167' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + file_name: Candidate Resume + file_url: http://alturl.com/p749b + candidate: 2872ba14-4084-492b-be96-e5eee6fc33ef + attachment_type: RESUME + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /attachments + data: + - Varies by platform + create: + path: /ats/v1/attachments + method: POST + auth: true + docs: Creates an `Attachment` object with the given values. + source: + openapi: ats_v3.yml + request: + name: AttachmentEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: atsRoot.AttachmentRequest + remote_user_id: string + content-type: application/json + response: + docs: '' + type: atsRoot.AttachmentResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + remote_user_id: remote_user_id + response: + body: + model: + id: c640b80b-fac9-409f-aa19-1f9221aec445 + remote_id: '11167' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + file_name: Candidate Resume + file_url: http://alturl.com/p749b + candidate: 2872ba14-4084-492b-be96-e5eee6fc33ef + attachment_type: RESUME + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /attachments + data: + - Varies by platform + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /ats/v1/attachments/{id} + method: GET + auth: true + docs: Returns an `Attachment` object with the given `id`. + source: + openapi: ats_v3.yml + path-parameters: + id: string + request: + name: AttachmentsRetrieveRequest + query-parameters: + expand: + type: optional> + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: atsRoot.Attachment + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: c640b80b-fac9-409f-aa19-1f9221aec445 + remote_id: '11167' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + file_name: Candidate Resume + file_url: http://alturl.com/p749b + candidate: 2872ba14-4084-492b-be96-e5eee6fc33ef + attachment_type: RESUME + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /attachments + data: + - Varies by platform + metaPostRetrieve: + path: /ats/v1/attachments/meta/post + method: GET + auth: true + docs: Returns metadata for `Attachment` POSTs. + source: + openapi: ats_v3.yml + response: + docs: '' + type: atsRoot.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + source: + openapi: ats_v3.yml diff --git a/.mock/definition/ATS/auditTrail.yml b/.mock/definition/ATS/auditTrail.yml new file mode 100644 index 000000000..f63c23ff9 --- /dev/null +++ b/.mock/definition/ATS/auditTrail.yml @@ -0,0 +1,98 @@ +imports: + atsRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ats/v1/audit-trail + method: GET + auth: true + docs: Gets a list of audit trail events. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: ats_v3.yml + request: + name: AuditTrailListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + end_date: + type: optional + docs: >- + If included, will only include audit trail events that occurred + before this time + event_type: + type: optional + docs: >- + 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: + type: optional + docs: Number of results to return per page. + start_date: + type: optional + docs: >- + If included, will only include audit trail events that occurred + after this time + user_email: + type: optional + docs: >- + 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. + response: + docs: '' + type: atsRoot.PaginatedAuditLogEventList + status-code: 200 + examples: + - response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: b5ceea2a-7171-47ce-8090-165cfce5572c + user_name: Gil Feig + user_email: hello@merge.dev + role: ADMIN + ip_address: 192.0.2.123 + event_type: CREATED_REMOTE_PRODUCTION_API_KEY + event_description: >- + Organization-wide Scopes for model hris.Employee updated + from Read to Read+Write + created_at: '2024-01-15T09:30:00Z' + source: + openapi: ats_v3.yml diff --git a/.mock/definition/ATS/availableActions.yml b/.mock/definition/ATS/availableActions.yml new file mode 100644 index 000000000..11d2ac1c8 --- /dev/null +++ b/.mock/definition/ATS/availableActions.yml @@ -0,0 +1,50 @@ +imports: + atsRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + retrieve: + path: /ats/v1/available-actions + method: GET + auth: true + docs: Returns a list of models and actions available for an account. + source: + openapi: ats_v3.yml + response: + docs: '' + type: atsRoot.AvailableActions + status-code: 200 + examples: + - headers: {} + response: + body: + integration: + name: name + abbreviated_name: abbreviated_name + categories: + - hris + image: image + square_image: square_image + color: color + slug: slug + api_endpoints_to_documentation_urls: + key: value + webhook_setup_guide_url: webhook_setup_guide_url + category_beta_status: + key: value + passthrough_available: true + available_model_operations: + - model_name: Candidate + available_operations: + - FETCH + - CREATE + required_post_parameters: + - remote_user_id + supported_fields: + - first_name + - last_name + - company + - title + source: + openapi: ats_v3.yml diff --git a/.mock/definition/ATS/candidates.yml b/.mock/definition/ATS/candidates.yml new file mode 100644 index 000000000..504a363e1 --- /dev/null +++ b/.mock/definition/ATS/candidates.yml @@ -0,0 +1,862 @@ +types: + CandidatesListRequestExpandItem: + enum: + - applications + - attachments + source: + openapi: ats_v3.yml + CandidatesRetrieveRequestExpandItem: + enum: + - applications + - attachments + source: + openapi: ats_v3.yml +imports: + atsRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ats/v1/candidates + method: GET + auth: true + docs: Returns a list of `Candidate` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: ats_v3.yml + request: + name: CandidatesListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + email_addresses: + type: optional + docs: >- + If provided, will only return candidates with these email + addresses; multiple addresses can be separated by commas. + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + first_name: + type: optional + docs: If provided, will only return candidates with this first name. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + last_name: + type: optional + docs: If provided, will only return candidates with this last name. + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + tags: + type: optional + docs: >- + If provided, will only return candidates with these tags; multiple + tags can be separated by commas. + response: + docs: '' + type: atsRoot.PaginatedCandidateList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 521b18c2-4d01-4297-b451-19858d07c133 + remote_id: '21198' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + first_name: Gil + last_name: Feig + company: Columbia Dining App. + title: Software Engineer + remote_created_at: '2021-10-15T00:00:00Z' + remote_updated_at: '2021-10-16T00:00:00Z' + last_interaction_at: '2021-10-17T00:00:00Z' + is_private: true + can_email: true + locations: + - San Francisco + - New York + - Miami + phone_numbers: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + value: '+1234567890' + phone_number_type: MOBILE + email_addresses: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + value: hello@merge.dev + email_address_type: PERSONAL + urls: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + value: http://alturl.com/p749b + url_type: BLOG + tags: + - High-Priority + applications: + - 29eb9867-ce2a-403f-b8ce-f2844b89f078 + - b4d08e5c-de00-4d64-a29f-66addac9af99 + - 4ff877d2-fb3e-4a5b-a7a5-168ddf2ffa56 + attachments: + - bea08964-32b4-4a20-8bb4-2612ba09de1d + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /candidates + data: + - Varies by platform + create: + path: /ats/v1/candidates + method: POST + auth: true + docs: Creates a `Candidate` object with the given values. + source: + openapi: ats_v3.yml + request: + name: CandidateEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: atsRoot.CandidateRequest + remote_user_id: string + content-type: application/json + response: + docs: '' + type: atsRoot.CandidateResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + remote_user_id: remote_user_id + response: + body: + model: + id: 521b18c2-4d01-4297-b451-19858d07c133 + remote_id: '21198' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + first_name: Gil + last_name: Feig + company: Columbia Dining App. + title: Software Engineer + remote_created_at: '2021-10-15T00:00:00Z' + remote_updated_at: '2021-10-16T00:00:00Z' + last_interaction_at: '2021-10-17T00:00:00Z' + is_private: true + can_email: true + locations: + - San Francisco + - New York + - Miami + phone_numbers: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + value: '+1234567890' + phone_number_type: MOBILE + email_addresses: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + value: hello@merge.dev + email_address_type: PERSONAL + urls: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + value: http://alturl.com/p749b + url_type: BLOG + tags: + - High-Priority + applications: + - 29eb9867-ce2a-403f-b8ce-f2844b89f078 + - b4d08e5c-de00-4d64-a29f-66addac9af99 + - 4ff877d2-fb3e-4a5b-a7a5-168ddf2ffa56 + attachments: + - bea08964-32b4-4a20-8bb4-2612ba09de1d + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /candidates + data: + - Varies by platform + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /ats/v1/candidates/{id} + method: GET + auth: true + docs: Returns a `Candidate` object with the given `id`. + source: + openapi: ats_v3.yml + path-parameters: + id: string + request: + name: CandidatesRetrieveRequest + query-parameters: + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: atsRoot.Candidate + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 521b18c2-4d01-4297-b451-19858d07c133 + remote_id: '21198' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + first_name: Gil + last_name: Feig + company: Columbia Dining App. + title: Software Engineer + remote_created_at: '2021-10-15T00:00:00Z' + remote_updated_at: '2021-10-16T00:00:00Z' + last_interaction_at: '2021-10-17T00:00:00Z' + is_private: true + can_email: true + locations: + - San Francisco + - New York + - Miami + phone_numbers: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + value: '+1234567890' + phone_number_type: MOBILE + remote_was_deleted: true + email_addresses: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + value: hello@merge.dev + email_address_type: PERSONAL + remote_was_deleted: true + urls: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + value: http://alturl.com/p749b + url_type: BLOG + remote_was_deleted: true + tags: + - High-Priority + applications: + - 29eb9867-ce2a-403f-b8ce-f2844b89f078 + - b4d08e5c-de00-4d64-a29f-66addac9af99 + - 4ff877d2-fb3e-4a5b-a7a5-168ddf2ffa56 + attachments: + - bea08964-32b4-4a20-8bb4-2612ba09de1d + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /candidates + data: + - Varies by platform + partialUpdate: + path: /ats/v1/candidates/{id} + method: PATCH + auth: true + docs: Updates a `Candidate` object with the given `id`. + source: + openapi: ats_v3.yml + path-parameters: + id: string + request: + name: PatchedCandidateEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: atsRoot.PatchedCandidateRequest + remote_user_id: string + content-type: application/json + response: + docs: '' + type: atsRoot.CandidateResponse + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + request: + model: {} + remote_user_id: remote_user_id + response: + body: + model: + id: 521b18c2-4d01-4297-b451-19858d07c133 + remote_id: '21198' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + first_name: Gil + last_name: Feig + company: Columbia Dining App. + title: Software Engineer + remote_created_at: '2021-10-15T00:00:00Z' + remote_updated_at: '2021-10-16T00:00:00Z' + last_interaction_at: '2021-10-17T00:00:00Z' + is_private: true + can_email: true + locations: + - San Francisco + - New York + - Miami + phone_numbers: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + value: '+1234567890' + phone_number_type: MOBILE + email_addresses: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + value: hello@merge.dev + email_address_type: PERSONAL + urls: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + value: http://alturl.com/p749b + url_type: BLOG + tags: + - High-Priority + applications: + - 29eb9867-ce2a-403f-b8ce-f2844b89f078 + - b4d08e5c-de00-4d64-a29f-66addac9af99 + - 4ff877d2-fb3e-4a5b-a7a5-168ddf2ffa56 + attachments: + - bea08964-32b4-4a20-8bb4-2612ba09de1d + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /candidates + data: + - Varies by platform + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + ignoreCreate: + path: /ats/v1/candidates/ignore/{model_id} + method: POST + auth: true + docs: >- + 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. + source: + openapi: ats_v3.yml + path-parameters: + model_id: string + request: + body: atsRoot.IgnoreCommonModelRequest + content-type: application/json + examples: + - path-parameters: + model_id: model_id + headers: {} + request: + reason: GENERAL_CUSTOMER_REQUEST + metaPatchRetrieve: + path: /ats/v1/candidates/meta/patch/{id} + method: GET + auth: true + docs: Returns metadata for `Candidate` PATCHs. + source: + openapi: ats_v3.yml + path-parameters: + id: string + response: + docs: '' + type: atsRoot.MetaResponse + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + metaPostRetrieve: + path: /ats/v1/candidates/meta/post + method: GET + auth: true + docs: Returns metadata for `Candidate` POSTs. + source: + openapi: ats_v3.yml + response: + docs: '' + type: atsRoot.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + source: + openapi: ats_v3.yml diff --git a/.mock/definition/ATS/deleteAccount.yml b/.mock/definition/ATS/deleteAccount.yml new file mode 100644 index 000000000..02ae3ce75 --- /dev/null +++ b/.mock/definition/ATS/deleteAccount.yml @@ -0,0 +1,15 @@ +service: + auth: false + base-path: '' + endpoints: + delete: + path: /ats/v1/delete-account + method: POST + auth: true + docs: Delete a linked account. + source: + openapi: ats_v3.yml + examples: + - headers: {} + source: + openapi: ats_v3.yml diff --git a/.mock/definition/ATS/departments.yml b/.mock/definition/ATS/departments.yml new file mode 100644 index 000000000..41672b303 --- /dev/null +++ b/.mock/definition/ATS/departments.yml @@ -0,0 +1,140 @@ +imports: + atsRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ats/v1/departments + method: GET + auth: true + docs: Returns a list of `Department` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: ats_v3.yml + request: + name: DepartmentsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: atsRoot.PaginatedDepartmentList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + remote_id: '23456' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Engineering + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /departments + data: + - Varies by platform + retrieve: + path: /ats/v1/departments/{id} + method: GET + auth: true + docs: Returns a `Department` object with the given `id`. + source: + openapi: ats_v3.yml + path-parameters: + id: string + request: + name: DepartmentsRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: atsRoot.Department + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + remote_id: '23456' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Engineering + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /departments + data: + - Varies by platform + source: + openapi: ats_v3.yml diff --git a/.mock/definition/ATS/eeocs.yml b/.mock/definition/ATS/eeocs.yml new file mode 100644 index 000000000..2492ffbd5 --- /dev/null +++ b/.mock/definition/ATS/eeocs.yml @@ -0,0 +1,306 @@ +types: + EeocsListRequestRemoteFields: + enum: + - disability_status + - value: disability_status,gender + name: DisabilityStatusGender + - value: disability_status,gender,race + name: DisabilityStatusGenderRace + - value: disability_status,gender,race,veteran_status + name: DisabilityStatusGenderRaceVeteranStatus + - value: disability_status,gender,veteran_status + name: DisabilityStatusGenderVeteranStatus + - value: disability_status,race + name: DisabilityStatusRace + - value: disability_status,race,veteran_status + name: DisabilityStatusRaceVeteranStatus + - value: disability_status,veteran_status + name: DisabilityStatusVeteranStatus + - gender + - value: gender,race + name: GenderRace + - value: gender,race,veteran_status + name: GenderRaceVeteranStatus + - value: gender,veteran_status + name: GenderVeteranStatus + - race + - value: race,veteran_status + name: RaceVeteranStatus + - veteran_status + source: + openapi: ats_v3.yml + EeocsListRequestShowEnumOrigins: + enum: + - disability_status + - value: disability_status,gender + name: DisabilityStatusGender + - value: disability_status,gender,race + name: DisabilityStatusGenderRace + - value: disability_status,gender,race,veteran_status + name: DisabilityStatusGenderRaceVeteranStatus + - value: disability_status,gender,veteran_status + name: DisabilityStatusGenderVeteranStatus + - value: disability_status,race + name: DisabilityStatusRace + - value: disability_status,race,veteran_status + name: DisabilityStatusRaceVeteranStatus + - value: disability_status,veteran_status + name: DisabilityStatusVeteranStatus + - gender + - value: gender,race + name: GenderRace + - value: gender,race,veteran_status + name: GenderRaceVeteranStatus + - value: gender,veteran_status + name: GenderVeteranStatus + - race + - value: race,veteran_status + name: RaceVeteranStatus + - veteran_status + source: + openapi: ats_v3.yml + EeocsRetrieveRequestRemoteFields: + enum: + - disability_status + - value: disability_status,gender + name: DisabilityStatusGender + - value: disability_status,gender,race + name: DisabilityStatusGenderRace + - value: disability_status,gender,race,veteran_status + name: DisabilityStatusGenderRaceVeteranStatus + - value: disability_status,gender,veteran_status + name: DisabilityStatusGenderVeteranStatus + - value: disability_status,race + name: DisabilityStatusRace + - value: disability_status,race,veteran_status + name: DisabilityStatusRaceVeteranStatus + - value: disability_status,veteran_status + name: DisabilityStatusVeteranStatus + - gender + - value: gender,race + name: GenderRace + - value: gender,race,veteran_status + name: GenderRaceVeteranStatus + - value: gender,veteran_status + name: GenderVeteranStatus + - race + - value: race,veteran_status + name: RaceVeteranStatus + - veteran_status + source: + openapi: ats_v3.yml + EeocsRetrieveRequestShowEnumOrigins: + enum: + - disability_status + - value: disability_status,gender + name: DisabilityStatusGender + - value: disability_status,gender,race + name: DisabilityStatusGenderRace + - value: disability_status,gender,race,veteran_status + name: DisabilityStatusGenderRaceVeteranStatus + - value: disability_status,gender,veteran_status + name: DisabilityStatusGenderVeteranStatus + - value: disability_status,race + name: DisabilityStatusRace + - value: disability_status,race,veteran_status + name: DisabilityStatusRaceVeteranStatus + - value: disability_status,veteran_status + name: DisabilityStatusVeteranStatus + - gender + - value: gender,race + name: GenderRace + - value: gender,race,veteran_status + name: GenderRaceVeteranStatus + - value: gender,veteran_status + name: GenderVeteranStatus + - race + - value: race,veteran_status + name: RaceVeteranStatus + - veteran_status + source: + openapi: ats_v3.yml +imports: + atsRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ats/v1/eeocs + method: GET + auth: true + docs: Returns a list of `EEOC` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: ats_v3.yml + request: + name: EeocsListRequest + query-parameters: + candidate_id: + type: optional + docs: If provided, will only return EEOC info for this candidate. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional> + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_fields: + type: optional + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + show_enum_origins: + type: optional + docs: >- + 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) + response: + docs: '' + type: atsRoot.PaginatedEeocList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: f7dd7b4f-237e-4772-8bd4-3246384c6c58 + remote_id: '76' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + candidate: candidate + submitted_at: '2021-10-15T00:00:00Z' + race: AMERICAN_INDIAN_OR_ALASKAN_NATIVE + gender: MALE + veteran_status: I_AM_NOT_A_PROTECTED_VETERAN + disability_status: YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /eeoc + data: + - Varies by platform + retrieve: + path: /ats/v1/eeocs/{id} + method: GET + auth: true + docs: Returns an `EEOC` object with the given `id`. + source: + openapi: ats_v3.yml + path-parameters: + id: string + request: + name: EeocsRetrieveRequest + query-parameters: + expand: + type: optional> + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional + docs: >- + 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) + response: + docs: '' + type: atsRoot.Eeoc + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: f7dd7b4f-237e-4772-8bd4-3246384c6c58 + remote_id: '76' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + candidate: candidate + submitted_at: '2021-10-15T00:00:00Z' + race: AMERICAN_INDIAN_OR_ALASKAN_NATIVE + gender: MALE + veteran_status: I_AM_NOT_A_PROTECTED_VETERAN + disability_status: YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /eeoc + data: + - Varies by platform + source: + openapi: ats_v3.yml diff --git a/.mock/definition/ATS/fieldMapping.yml b/.mock/definition/ATS/fieldMapping.yml new file mode 100644 index 000000000..6f8cf0a70 --- /dev/null +++ b/.mock/definition/ATS/fieldMapping.yml @@ -0,0 +1,892 @@ +imports: + atsRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + field_mappings_retrieve: + path: /ats/v1/field-mappings + method: GET + auth: true + docs: >- + 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/). + source: + openapi: ats_v3.yml + request: + name: FieldMappingsRetrieveRequest + query-parameters: + exclude_remote_field_metadata: + type: optional + docs: >- + 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. + response: + docs: '' + type: atsRoot.FieldMappingApiInstanceResponse + status-code: 200 + examples: + - headers: {} + response: + body: + Activity: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Application: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Attachment: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Candidate: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Department: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + EEOC: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + ScheduledInterview: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Job: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + JobPosting: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + JobInterviewStage: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Offer: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Office: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + RejectReason: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Scorecard: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Tag: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + RemoteUser: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + field_mappings_create: + path: /ats/v1/field-mappings + method: POST + auth: true + docs: >- + 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. + source: + openapi: ats_v3.yml + request: + name: CreateFieldMappingRequest + query-parameters: + exclude_remote_field_metadata: + type: optional + docs: >- + 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. + body: + properties: + target_field_name: + type: string + docs: >- + The name of the target field you want this remote field to map + to. + validation: + minLength: 1 + target_field_description: + type: string + docs: >- + The description of the target field you want this remote field + to map to. + validation: + minLength: 1 + remote_field_traversal_path: + docs: >- + The field traversal path of the remote field listed when you hit + the GET /remote-fields endpoint. + type: list + remote_method: + type: string + docs: >- + The method of the remote endpoint where the remote field is + coming from. + validation: + minLength: 1 + remote_url_path: + type: string + docs: >- + The path of the remote endpoint where the remote field is coming + from. + validation: + minLength: 1 + common_model_name: + type: string + docs: >- + The name of the Common Model that the remote field corresponds + to in a given category. + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: atsRoot.FieldMappingInstanceResponse + status-code: 201 + examples: + - headers: {} + request: + 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 + response: + body: + model: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + field_mappings_destroy: + path: /ats/v1/field-mappings/{field_mapping_id} + method: DELETE + auth: true + docs: >- + 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. + source: + openapi: ats_v3.yml + path-parameters: + field_mapping_id: string + response: + docs: '' + type: atsRoot.FieldMappingInstanceResponse + status-code: 204 + examples: + - path-parameters: + field_mapping_id: field_mapping_id + headers: {} + response: + body: + model: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + field_mappings_partial_update: + path: /ats/v1/field-mappings/{field_mapping_id} + method: PATCH + auth: true + docs: >- + 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. + source: + openapi: ats_v3.yml + path-parameters: + field_mapping_id: string + request: + name: PatchedEditFieldMappingRequest + body: + properties: + remote_field_traversal_path: + type: optional> + docs: >- + The field traversal path of the remote field listed when you hit + the GET /remote-fields endpoint. + remote_method: + type: optional + docs: >- + The method of the remote endpoint where the remote field is + coming from. + validation: + minLength: 1 + remote_url_path: + type: optional + docs: >- + The path of the remote endpoint where the remote field is coming + from. + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: atsRoot.FieldMappingInstanceResponse + status-code: 200 + examples: + - path-parameters: + field_mapping_id: field_mapping_id + headers: {} + request: {} + response: + body: + model: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + remote_fields_retrieve: + path: /ats/v1/remote-fields + method: GET + auth: true + docs: >- + 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/). + source: + openapi: ats_v3.yml + request: + name: RemoteFieldsRetrieveRequest + query-parameters: + common_models: + type: optional + docs: >- + A comma seperated list of Common Model names. If included, will + only return Remote Fields for those Common Models. + include_example_values: + type: optional + docs: >- + 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. + response: + docs: '' + type: atsRoot.RemoteFieldApiResponse + status-code: 200 + examples: + - headers: {} + response: + body: + Activity: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Application: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Attachment: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Candidate: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Department: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + EEOC: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + ScheduledInterview: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Job: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + JobPosting: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + JobInterviewStage: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Offer: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Office: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + RejectReason: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Scorecard: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Tag: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + RemoteUser: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + target_fields_retrieve: + path: /ats/v1/target-fields + method: GET + auth: true + docs: >- + 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/). + source: + openapi: ats_v3.yml + response: + docs: '' + type: atsRoot.ExternalTargetFieldApiResponse + status-code: 200 + examples: + - headers: {} + response: + body: + Activity: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Application: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Attachment: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Candidate: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Department: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + EEOC: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + ScheduledInterview: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Job: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + JobPosting: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + JobInterviewStage: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Offer: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Office: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + RejectReason: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Scorecard: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Tag: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + RemoteUser: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + source: + openapi: ats_v3.yml diff --git a/.mock/definition/ATS/forceResync.yml b/.mock/definition/ATS/forceResync.yml new file mode 100644 index 000000000..be7ea616b --- /dev/null +++ b/.mock/definition/ATS/forceResync.yml @@ -0,0 +1,37 @@ +imports: + atsRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + sync_status_resync_create: + path: /ats/v1/sync-status/resync + method: POST + auth: true + docs: >- + 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. + source: + openapi: ats_v3.yml + response: + docs: '' + type: list + status-code: 200 + examples: + - headers: {} + response: + body: + - model_name: Candidate + model_id: ats.Candidate + last_sync_start: '2021-03-30T19:44:18Z' + next_sync_start: '2021-03-30T20:44:18Z' + last_sync_result: SYNCING + last_sync_finished: '2021-03-30T19:55:18Z' + status: SYNCING + is_initial_sync: true + selective_sync_configurations_usage: IN_NEXT_SYNC + source: + openapi: ats_v3.yml diff --git a/.mock/definition/ATS/generateKey.yml b/.mock/definition/ATS/generateKey.yml new file mode 100644 index 000000000..6f190298c --- /dev/null +++ b/.mock/definition/ATS/generateKey.yml @@ -0,0 +1,36 @@ +imports: + atsRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /ats/v1/generate-key + method: POST + auth: true + docs: Create a remote key. + source: + openapi: ats_v3.yml + request: + name: GenerateRemoteKeyRequest + body: + properties: + name: + type: string + docs: The name of the remote key + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: atsRoot.RemoteKey + status-code: 200 + examples: + - request: + name: Remote Deployment Key 1 + response: + body: + name: Remote Deployment Key 1 + key: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA + source: + openapi: ats_v3.yml diff --git a/.mock/definition/ATS/interviews.yml b/.mock/definition/ATS/interviews.yml new file mode 100644 index 000000000..05bfb0d37 --- /dev/null +++ b/.mock/definition/ATS/interviews.yml @@ -0,0 +1,488 @@ +types: + InterviewsListRequestExpandItem: + enum: + - application + - interviewers + - job_interview_stage + - organizer + source: + openapi: ats_v3.yml + InterviewsRetrieveRequestExpandItem: + enum: + - application + - interviewers + - job_interview_stage + - organizer + source: + openapi: ats_v3.yml +imports: + atsRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ats/v1/interviews + method: GET + auth: true + docs: Returns a list of `ScheduledInterview` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: ats_v3.yml + request: + name: InterviewsListRequest + query-parameters: + application_id: + type: optional + docs: If provided, will only return interviews for this application. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + job_id: + type: optional + docs: If provided, wll only return interviews organized for this job. + job_interview_stage_id: + type: optional + docs: If provided, will only return interviews at this stage. + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + organizer_id: + type: optional + docs: If provided, will only return interviews organized by this user. + page_size: + type: optional + docs: Number of results to return per page. + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: atsRoot.PaginatedScheduledInterviewList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: b8faf072-98b9-4445-8a9a-6b4950efca19 + remote_id: '3' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + application: application + job_interview_stage: job_interview_stage + organizer: organizer + interviewers: + - f9813dd5-e70b-484c-91d8-00acd6065b07 + - 89a86fcf-d540-4e6b-ac3d-ce07c4ec9b3c + location: Embarcadero Center 2 + start_at: '2021-10-15T00:00:00Z' + end_at: '2021-10-15T02:00:00Z' + remote_created_at: '2021-10-15T00:00:00Z' + remote_updated_at: '2021-10-15T00:00:00Z' + status: SCHEDULED + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /interviews + data: + - Varies by platform + create: + path: /ats/v1/interviews + method: POST + auth: true + docs: Creates a `ScheduledInterview` object with the given values. + source: + openapi: ats_v3.yml + request: + name: ScheduledInterviewEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: atsRoot.ScheduledInterviewRequest + remote_user_id: string + content-type: application/json + response: + docs: '' + type: atsRoot.ScheduledInterviewResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + remote_user_id: remote_user_id + response: + body: + model: + id: b8faf072-98b9-4445-8a9a-6b4950efca19 + remote_id: '3' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + application: application + job_interview_stage: job_interview_stage + organizer: organizer + interviewers: + - f9813dd5-e70b-484c-91d8-00acd6065b07 + - 89a86fcf-d540-4e6b-ac3d-ce07c4ec9b3c + location: Embarcadero Center 2 + start_at: '2021-10-15T00:00:00Z' + end_at: '2021-10-15T02:00:00Z' + remote_created_at: '2021-10-15T00:00:00Z' + remote_updated_at: '2021-10-15T00:00:00Z' + status: SCHEDULED + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /interviews + data: + - Varies by platform + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /ats/v1/interviews/{id} + method: GET + auth: true + docs: Returns a `ScheduledInterview` object with the given `id`. + source: + openapi: ats_v3.yml + path-parameters: + id: string + request: + name: InterviewsRetrieveRequest + query-parameters: + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: atsRoot.ScheduledInterview + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: b8faf072-98b9-4445-8a9a-6b4950efca19 + remote_id: '3' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + application: application + job_interview_stage: job_interview_stage + organizer: organizer + interviewers: + - f9813dd5-e70b-484c-91d8-00acd6065b07 + - 89a86fcf-d540-4e6b-ac3d-ce07c4ec9b3c + location: Embarcadero Center 2 + start_at: '2021-10-15T00:00:00Z' + end_at: '2021-10-15T02:00:00Z' + remote_created_at: '2021-10-15T00:00:00Z' + remote_updated_at: '2021-10-15T00:00:00Z' + status: SCHEDULED + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /interviews + data: + - Varies by platform + metaPostRetrieve: + path: /ats/v1/interviews/meta/post + method: GET + auth: true + docs: Returns metadata for `ScheduledInterview` POSTs. + source: + openapi: ats_v3.yml + response: + docs: '' + type: atsRoot.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + source: + openapi: ats_v3.yml diff --git a/.mock/definition/ATS/issues.yml b/.mock/definition/ATS/issues.yml new file mode 100644 index 000000000..188bd7792 --- /dev/null +++ b/.mock/definition/ATS/issues.yml @@ -0,0 +1,133 @@ +types: + IssuesListRequestStatus: + enum: + - ONGOING + - RESOLVED + source: + openapi: ats_v3.yml +imports: + atsRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ats/v1/issues + method: GET + auth: true + docs: Gets all issues for Organization. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: ats_v3.yml + request: + name: IssuesListRequest + query-parameters: + account_token: optional + cursor: + type: optional + docs: The pagination cursor value. + end_date: + type: optional + docs: >- + If included, will only include issues whose most recent action + occurred before this time + end_user_organization_name: optional + first_incident_time_after: + type: optional + docs: >- + If provided, will only return issues whose first incident time was + after this datetime. + first_incident_time_before: + type: optional + docs: >- + If provided, will only return issues whose first incident time was + before this datetime. + include_muted: + type: optional + docs: If true, will include muted issues + integration_name: optional + last_incident_time_after: + type: optional + docs: >- + If provided, will only return issues whose last incident time was + after this datetime. + last_incident_time_before: + type: optional + docs: >- + If provided, will only return issues whose last incident time was + before this datetime. + linked_account_id: + type: optional + docs: >- + If provided, will only include issues pertaining to the linked + account passed in. + page_size: + type: optional + docs: Number of results to return per page. + start_date: + type: optional + docs: >- + If included, will only include issues whose most recent action + occurred after this time + status: + type: optional + docs: |- + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + response: + docs: '' + type: atsRoot.PaginatedIssueList + status-code: 200 + examples: + - response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + status: ONGOING + error_description: Missing Permissions + end_user: + key: value + first_incident_time: '2022-12-05T16:19:15Z' + last_incident_time: '2022-12-05T16:19:15Z' + is_muted: true + error_details: + - Missing employee permissions. + - Missing time off permissions. + retrieve: + path: /ats/v1/issues/{id} + method: GET + auth: true + docs: Get a specific issue. + source: + openapi: ats_v3.yml + path-parameters: + id: string + response: + docs: '' + type: atsRoot.Issue + status-code: 200 + examples: + - path-parameters: + id: id + response: + body: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + status: ONGOING + error_description: Missing Permissions + end_user: + key: value + first_incident_time: '2022-12-05T16:19:15Z' + last_incident_time: '2022-12-05T16:19:15Z' + is_muted: true + error_details: + - Missing employee permissions. + - Missing time off permissions. + source: + openapi: ats_v3.yml diff --git a/.mock/definition/ATS/jobInterviewStages.yml b/.mock/definition/ATS/jobInterviewStages.yml new file mode 100644 index 000000000..83acd43b3 --- /dev/null +++ b/.mock/definition/ATS/jobInterviewStages.yml @@ -0,0 +1,159 @@ +imports: + atsRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ats/v1/job-interview-stages + method: GET + auth: true + docs: Returns a list of `JobInterviewStage` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: ats_v3.yml + request: + name: JobInterviewStagesListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional> + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + job_id: + type: optional + docs: If provided, will only return interview stages for this job. + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: atsRoot.PaginatedJobInterviewStageList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: f9813dd5-e70b-484c-91d8-00acd6065b07 + remote_id: '876556788' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Phone Screen + job: job + stage_order: 2 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /interview-stages + data: + - Varies by platform + retrieve: + path: /ats/v1/job-interview-stages/{id} + method: GET + auth: true + docs: Returns a `JobInterviewStage` object with the given `id`. + source: + openapi: ats_v3.yml + path-parameters: + id: string + request: + name: JobInterviewStagesRetrieveRequest + query-parameters: + expand: + type: optional> + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: atsRoot.JobInterviewStage + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: f9813dd5-e70b-484c-91d8-00acd6065b07 + remote_id: '876556788' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Phone Screen + job: job + stage_order: 2 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /interview-stages + data: + - Varies by platform + source: + openapi: ats_v3.yml diff --git a/.mock/definition/ATS/jobPostings.yml b/.mock/definition/ATS/jobPostings.yml new file mode 100644 index 000000000..92bc20988 --- /dev/null +++ b/.mock/definition/ATS/jobPostings.yml @@ -0,0 +1,201 @@ +types: + JobPostingsListRequestStatus: + enum: + - CLOSED + - DRAFT + - INTERNAL + - PENDING + - PUBLISHED + source: + openapi: ats_v3.yml +imports: + atsRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ats/v1/job-postings + method: GET + auth: true + docs: Returns a list of `JobPosting` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: ats_v3.yml + request: + name: JobPostingsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional> + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + status: + type: optional + docs: >- + If provided, will only return Job Postings with this status. + Options: ('PUBLISHED', 'CLOSED', 'DRAFT', 'INTERNAL', 'PENDING') + + + * `PUBLISHED` - PUBLISHED + + * `CLOSED` - CLOSED + + * `DRAFT` - DRAFT + + * `INTERNAL` - INTERNAL + + * `PENDING` - PENDING + response: + docs: '' + type: atsRoot.PaginatedJobPostingList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 156a2bef-57e5-4def-8ed2-7c41bd9a554t + remote_id: '1341324' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + title: Platform - NYC + job_posting_urls: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + value: https://merge.dev/careers + url_type: JOB_POSTING + job: job + status: PUBLISHED + content: Apply at https://merge.dev/careers + remote_created_at: '2021-10-15T00:00:00Z' + remote_updated_at: '2021-10-16T00:00:00Z' + is_internal: true + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /positions + data: + - Varies by platform + retrieve: + path: /ats/v1/job-postings/{id} + method: GET + auth: true + docs: Returns a `JobPosting` object with the given `id`. + source: + openapi: ats_v3.yml + path-parameters: + id: string + request: + name: JobPostingsRetrieveRequest + query-parameters: + expand: + type: optional> + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: atsRoot.JobPosting + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 156a2bef-57e5-4def-8ed2-7c41bd9a554t + remote_id: '1341324' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + title: Platform - NYC + job_posting_urls: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + value: https://merge.dev/careers + url_type: JOB_POSTING + remote_was_deleted: true + job: job + status: PUBLISHED + content: Apply at https://merge.dev/careers + remote_created_at: '2021-10-15T00:00:00Z' + remote_updated_at: '2021-10-16T00:00:00Z' + is_internal: true + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /positions + data: + - Varies by platform + source: + openapi: ats_v3.yml diff --git a/.mock/definition/ATS/jobs.yml b/.mock/definition/ATS/jobs.yml new file mode 100644 index 000000000..6f370d80f --- /dev/null +++ b/.mock/definition/ATS/jobs.yml @@ -0,0 +1,359 @@ +types: + JobsListRequestExpandItem: + enum: + - departments + - hiring_managers + - job_postings + - offices + - recruiters + source: + openapi: ats_v3.yml + JobsListRequestStatus: + enum: + - ARCHIVED + - CLOSED + - DRAFT + - OPEN + - PENDING + source: + openapi: ats_v3.yml + JobsRetrieveRequestExpandItem: + enum: + - departments + - hiring_managers + - job_postings + - offices + - recruiters + source: + openapi: ats_v3.yml + JobsScreeningQuestionsListRequestExpandItem: + enum: + - job + - options + source: + openapi: ats_v3.yml +imports: + atsRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ats/v1/jobs + method: GET + auth: true + docs: Returns a list of `Job` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: ats_v3.yml + request: + name: JobsListRequest + query-parameters: + code: + type: optional + docs: If provided, will only return jobs with this code. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + offices: + type: optional + docs: >- + If provided, will only return jobs for this office; multiple + offices can be separated by commas. + page_size: + type: optional + docs: Number of results to return per page. + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + show_enum_origins: + type: optional> + docs: >- + A comma separated list of enum field names for which you'd like + the original values to be returned, instead of Merge's normalized + enum values. [Learn + more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) + status: + type: optional + docs: >- + If provided, will only return jobs with this status. Options: + ('OPEN', 'CLOSED', 'DRAFT', 'ARCHIVED', 'PENDING') + + + * `OPEN` - OPEN + + * `CLOSED` - CLOSED + + * `DRAFT` - DRAFT + + * `ARCHIVED` - ARCHIVED + + * `PENDING` - PENDING + response: + docs: '' + type: atsRoot.PaginatedJobList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 022a2bef-57e5-4def-8ed2-7c41bd9a5ed8 + remote_id: '8765432' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Software Engineer (Merge is actually hiring btw) + description: >- + If you're reading this documentation, you might be a good + fit for Merge! + code: C0025 + status: OPEN + type: POSTING + job_postings: + - 2r3c1341-a20f-4e51-b72c-f3830a16c97b + - 543ed912-33ec-444e-a215-8d71cc42fc12 + job_posting_urls: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + value: https://merge.dev/careers + url_type: JOB_POSTING + remote_created_at: '2021-10-15T00:00:00Z' + remote_updated_at: '2021-10-16T00:00:00Z' + confidential: true + departments: + - 5b3c1341-a20f-4e51-b72c-f3830a16c97b + - d6e687d6-0c36-48a1-8114-35324b5cb38f + offices: + - 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 + hiring_managers: + - 787ed912-33ec-444e-a215-8d71cc42fc12 + recruiters: + - 787ed912-33ec-444e-a215-8d71cc42fc12 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /positions + data: + - Varies by platform + retrieve: + path: /ats/v1/jobs/{id} + method: GET + auth: true + docs: Returns a `Job` object with the given `id`. + source: + openapi: ats_v3.yml + path-parameters: + id: string + request: + name: JobsRetrieveRequest + query-parameters: + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: atsRoot.Job + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 022a2bef-57e5-4def-8ed2-7c41bd9a5ed8 + remote_id: '8765432' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Software Engineer (Merge is actually hiring btw) + description: >- + If you're reading this documentation, you might be a good fit + for Merge! + code: C0025 + status: OPEN + type: POSTING + job_postings: + - 2r3c1341-a20f-4e51-b72c-f3830a16c97b + - 543ed912-33ec-444e-a215-8d71cc42fc12 + job_posting_urls: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + value: https://merge.dev/careers + url_type: JOB_POSTING + remote_was_deleted: true + remote_created_at: '2021-10-15T00:00:00Z' + remote_updated_at: '2021-10-16T00:00:00Z' + confidential: true + departments: + - 5b3c1341-a20f-4e51-b72c-f3830a16c97b + - d6e687d6-0c36-48a1-8114-35324b5cb38f + offices: + - 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 + hiring_managers: + - 787ed912-33ec-444e-a215-8d71cc42fc12 + recruiters: + - 787ed912-33ec-444e-a215-8d71cc42fc12 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /positions + data: + - Varies by platform + screeningQuestionsList: + path: /ats/v1/jobs/{job_id}/screening-questions + method: GET + auth: true + docs: Returns a list of `ScreeningQuestion` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: ats_v3.yml + path-parameters: + job_id: string + request: + name: JobsScreeningQuestionsListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: atsRoot.PaginatedScreeningQuestionList + status-code: 200 + examples: + - path-parameters: + job_id: job_id + headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 0238cbc6-6040-430a-848e-aaiehfhdbadf4ae + remote_id: '23729392' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + job: job + description: >- + Are you currently authorized to work for any employer in the + country outlined for this role? + title: Work Authorisation + type: DATE + required: true + options: + - remote_id: '19281' + label: I am currently authorised + - remote_id: '38372' + label: I am currently not eligible + remote_was_deleted: true + source: + openapi: ats_v3.yml diff --git a/.mock/definition/ATS/linkToken.yml b/.mock/definition/ATS/linkToken.yml new file mode 100644 index 000000000..6fc93968a --- /dev/null +++ b/.mock/definition/ATS/linkToken.yml @@ -0,0 +1,152 @@ +imports: + atsRoot: __package__.yml +types: + EndUserDetailsRequestLanguage: + discriminated: false + docs: >- + The following subset of IETF language tags can be used to configure + localization. + + + * `en` - en + + * `de` - de + union: + - atsRoot.LanguageEnum + - string + source: + openapi: ats_v3.yml + inline: true +service: + auth: false + base-path: '' + endpoints: + create: + path: /ats/v1/link-token + method: POST + auth: true + docs: Creates a link token to be used when linking a new end user. + source: + openapi: ats_v3.yml + request: + name: EndUserDetailsRequest + body: + properties: + end_user_email_address: + type: string + docs: >- + Your end user's email address. This is purely for identification + purposes - setting this value will not cause any emails to be + sent. + validation: + minLength: 1 + maxLength: 100 + end_user_organization_name: + type: string + docs: Your end user's organization. + validation: + minLength: 1 + maxLength: 100 + end_user_origin_id: + type: string + docs: >- + 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. + validation: + minLength: 1 + maxLength: 100 + categories: + docs: The integration categories to show in Merge Link. + type: list + integration: + type: optional + docs: >- + 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/. + validation: + minLength: 1 + link_expiry_mins: + type: optional + docs: >- + 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. + default: 30 + validation: + min: 30 + max: 10080 + should_create_magic_link_url: + type: optional + docs: >- + 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. + default: false + hide_admin_magic_link: + type: optional + docs: >- + 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. + default: false + common_models: + type: optional> + docs: >- + An array of objects to specify the models and fields that will + be disabled for a given Linked Account. Each object uses + model_id, enabled_actions, and disabled_fields to specify the + model, method, and fields that are scoped for a given Linked + Account. + category_common_model_scopes: + type: >- + optional>>> + docs: >- + When creating a Link Token, you can set permissions for Common + Models that will apply to the account that is going to be + linked. Any model or field not specified in link token payload + will default to existing settings. + language: + type: optional + docs: >- + The following subset of IETF language tags can be used to + configure localization. + + + * `en` - en + + * `de` - de + are_syncs_disabled: + type: optional + docs: >- + The boolean that indicates whether initial, periodic, and force + syncs will be disabled. + default: false + integration_specific_config: + type: optional> + docs: >- + A JSON object containing integration-specific configuration + options. + content-type: application/json + response: + docs: '' + type: atsRoot.LinkToken + status-code: 200 + examples: + - request: + end_user_email_address: example@gmail.com + end_user_organization_name: Test Organization + end_user_origin_id: '12345' + categories: + - hris + - ats + response: + body: + link_token: necdP7FtdASl1fQwm62be2_dM4wBG8_GactqoUV0 + integration_name: Lever + magic_link_url: https://link.merge.dev/asdfjkl12345jsndfgi2i83n + source: + openapi: ats_v3.yml diff --git a/.mock/definition/ATS/linkedAccounts.yml b/.mock/definition/ATS/linkedAccounts.yml new file mode 100644 index 000000000..03a9bd074 --- /dev/null +++ b/.mock/definition/ATS/linkedAccounts.yml @@ -0,0 +1,152 @@ +types: + LinkedAccountsListRequestCategory: + enum: + - accounting + - ats + - crm + - filestorage + - hris + - mktg + - ticketing + source: + openapi: ats_v3.yml +imports: + atsRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ats/v1/linked-accounts + method: GET + auth: true + docs: List linked accounts for your organization. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: ats_v3.yml + request: + name: LinkedAccountsListRequest + query-parameters: + category: + type: optional + docs: >- + Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, + `mktg`, `ticketing` + + + * `hris` - hris + + * `ats` - ats + + * `accounting` - accounting + + * `ticketing` - ticketing + + * `crm` - crm + + * `mktg` - mktg + + * `filestorage` - filestorage + cursor: + type: optional + docs: The pagination cursor value. + end_user_email_address: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given email address. + end_user_organization_name: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given organization name. + end_user_origin_id: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given origin ID. + end_user_origin_ids: + type: optional + docs: >- + Comma-separated list of EndUser origin IDs, making it possible to + specify multiple EndUsers at once. + id: + type: optional + validation: + format: uuid + ids: + type: optional + docs: >- + Comma-separated list of LinkedAccount IDs, making it possible to + specify multiple LinkedAccounts at once. + include_duplicates: + type: optional + docs: >- + 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: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given integration name. + is_test_account: + type: optional + docs: >- + If included, will only include test linked accounts. If not + included, will only include non-test linked accounts. + page_size: + type: optional + docs: Number of results to return per page. + status: + type: optional + docs: >- + Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, + `RELINK_NEEDED` + response: + docs: '' + type: atsRoot.PaginatedAccountDetailsAndActionsList + status-code: 200 + examples: + - response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: e59b1821-f85c-4e28-a6b3-1804156f3563 + category: hris + status: COMPLETE + status_detail: Invalid login credentials + end_user_origin_id: 3ac95cde-6c7f-4eef-afec-be710b42308d + end_user_organization_name: Foo Bar, LLC + end_user_email_address: hradmin@foobar.dev + subdomain: foobar + webhook_listener_url: >- + https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 + is_duplicate: true + integration: + name: name + categories: + - hris + color: color + slug: slug + passthrough_available: true + available_model_operations: + - model_name: Candidate + available_operations: + - FETCH + - CREATE + required_post_parameters: + - remote_user_id + supported_fields: + - first_name + - last_name + - company + - title + account_type: PRODUCTION + completed_at: '2024-08-26T20:11:19Z' + source: + openapi: ats_v3.yml diff --git a/.mock/definition/ATS/offers.yml b/.mock/definition/ATS/offers.yml new file mode 100644 index 000000000..2fc1f67e4 --- /dev/null +++ b/.mock/definition/ATS/offers.yml @@ -0,0 +1,203 @@ +types: + OffersListRequestExpandItem: + enum: + - application + - creator + source: + openapi: ats_v3.yml + OffersRetrieveRequestExpandItem: + enum: + - application + - creator + source: + openapi: ats_v3.yml +imports: + atsRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ats/v1/offers + method: GET + auth: true + docs: Returns a list of `Offer` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: ats_v3.yml + request: + name: OffersListRequest + query-parameters: + application_id: + type: optional + docs: If provided, will only return offers for this application. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + creator_id: + type: optional + docs: If provided, will only return offers created by this user. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: atsRoot.PaginatedOfferList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: dd85625c-6a59-446f-a317-6de64d83bae7 + remote_id: '9876' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + application: application + creator: creator + remote_created_at: '2021-10-15T00:00:00Z' + closed_at: '2021-10-16T00:00:00Z' + sent_at: '2021-10-15T00:00:00Z' + start_date: '2021-11-15T00:00:00Z' + status: DRAFT + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /offers + data: + - Varies by platform + retrieve: + path: /ats/v1/offers/{id} + method: GET + auth: true + docs: Returns an `Offer` object with the given `id`. + source: + openapi: ats_v3.yml + path-parameters: + id: string + request: + name: OffersRetrieveRequest + query-parameters: + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: atsRoot.Offer + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: dd85625c-6a59-446f-a317-6de64d83bae7 + remote_id: '9876' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + application: application + creator: creator + remote_created_at: '2021-10-15T00:00:00Z' + closed_at: '2021-10-16T00:00:00Z' + sent_at: '2021-10-15T00:00:00Z' + start_date: '2021-11-15T00:00:00Z' + status: DRAFT + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /offers + data: + - Varies by platform + source: + openapi: ats_v3.yml diff --git a/.mock/definition/ATS/offices.yml b/.mock/definition/ATS/offices.yml new file mode 100644 index 000000000..2ed7047f7 --- /dev/null +++ b/.mock/definition/ATS/offices.yml @@ -0,0 +1,142 @@ +imports: + atsRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ats/v1/offices + method: GET + auth: true + docs: Returns a list of `Office` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: ats_v3.yml + request: + name: OfficesListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: atsRoot.PaginatedOfficeList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 + remote_id: '876556788' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: SF Office + location: Embarcadero Center 2 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /locations + data: + - Varies by platform + retrieve: + path: /ats/v1/offices/{id} + method: GET + auth: true + docs: Returns an `Office` object with the given `id`. + source: + openapi: ats_v3.yml + path-parameters: + id: string + request: + name: OfficesRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: atsRoot.Office + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 + remote_id: '876556788' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: SF Office + location: Embarcadero Center 2 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /locations + data: + - Varies by platform + source: + openapi: ats_v3.yml diff --git a/.mock/definition/ATS/passthrough.yml b/.mock/definition/ATS/passthrough.yml new file mode 100644 index 000000000..4388a16ff --- /dev/null +++ b/.mock/definition/ATS/passthrough.yml @@ -0,0 +1,40 @@ +imports: + atsRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /ats/v1/passthrough + method: POST + auth: true + docs: Pull data from an endpoint not currently supported by Merge. + source: + openapi: ats_v3.yml + request: + body: atsRoot.DataPassthroughRequest + content-type: application/json + response: + docs: '' + type: atsRoot.RemoteResponse + status-code: 200 + examples: + - headers: {} + request: + method: GET + path: /scooters + response: + body: + method: GET + path: /scooters + status: 200 + response: + key: value + response_headers: + X-Page-Token: value + response_type: JSON + headers: + EXTRA-HEADER: value + Authorization: + source: + openapi: ats_v3.yml diff --git a/.mock/definition/ATS/regenerateKey.yml b/.mock/definition/ATS/regenerateKey.yml new file mode 100644 index 000000000..03679991e --- /dev/null +++ b/.mock/definition/ATS/regenerateKey.yml @@ -0,0 +1,36 @@ +imports: + atsRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /ats/v1/regenerate-key + method: POST + auth: true + docs: Exchange remote keys. + source: + openapi: ats_v3.yml + request: + name: RemoteKeyForRegenerationRequest + body: + properties: + name: + type: string + docs: The name of the remote key + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: atsRoot.RemoteKey + status-code: 200 + examples: + - request: + name: Remote Deployment Key 1 + response: + body: + name: Remote Deployment Key 1 + key: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA + source: + openapi: ats_v3.yml diff --git a/.mock/definition/ATS/rejectReasons.yml b/.mock/definition/ATS/rejectReasons.yml new file mode 100644 index 000000000..446984f75 --- /dev/null +++ b/.mock/definition/ATS/rejectReasons.yml @@ -0,0 +1,140 @@ +imports: + atsRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ats/v1/reject-reasons + method: GET + auth: true + docs: Returns a list of `RejectReason` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: ats_v3.yml + request: + name: RejectReasonsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: atsRoot.PaginatedRejectReasonList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 8be99a4a-f8d4-4339-bf1e-30eac970e217 + remote_id: '876556788' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Not passionate enough about APIs. + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /rejection-reasons + data: + - Varies by platform + retrieve: + path: /ats/v1/reject-reasons/{id} + method: GET + auth: true + docs: Returns a `RejectReason` object with the given `id`. + source: + openapi: ats_v3.yml + path-parameters: + id: string + request: + name: RejectReasonsRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: atsRoot.RejectReason + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 8be99a4a-f8d4-4339-bf1e-30eac970e217 + remote_id: '876556788' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Not passionate enough about APIs. + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /rejection-reasons + data: + - Varies by platform + source: + openapi: ats_v3.yml diff --git a/.mock/definition/ATS/scopes.yml b/.mock/definition/ATS/scopes.yml new file mode 100644 index 000000000..20262a71f --- /dev/null +++ b/.mock/definition/ATS/scopes.yml @@ -0,0 +1,160 @@ +imports: + atsRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + default_scopes_retrieve: + path: /ats/v1/default-scopes + method: GET + auth: true + docs: >- + 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). + source: + openapi: ats_v3.yml + response: + docs: '' + type: atsRoot.CommonModelScopeApi + status-code: 200 + examples: + - response: + body: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - created_at + - custom_fields + - date_of_birth + - first_name + - gender + - remote_created_at + - remote_data + disabled_fields: + - company + - employments + - groups + - home_location + - manager + - work_location + linked_account_scopes_retrieve: + path: /ats/v1/linked-account-scopes + method: GET + auth: true + docs: >- + 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). + source: + openapi: ats_v3.yml + response: + docs: '' + type: atsRoot.CommonModelScopeApi + status-code: 200 + examples: + - headers: {} + response: + body: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - created_at + - custom_fields + - date_of_birth + - first_name + - gender + - remote_created_at + - remote_data + disabled_fields: + - company + - employments + - groups + - home_location + - manager + - work_location + linked_account_scopes_create: + path: /ats/v1/linked-account-scopes + method: POST + auth: true + docs: >- + 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) + source: + openapi: ats_v3.yml + request: + name: LinkedAccountCommonModelScopeDeserializerRequest + body: + properties: + common_models: + docs: The common models you want to update the scopes for + type: list + content-type: application/json + response: + docs: '' + type: atsRoot.CommonModelScopeApi + status-code: 200 + examples: + - headers: {} + request: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - home_location + disabled_fields: + - work_location + - model_name: Benefit + model_permissions: + WRITE: + is_enabled: false + response: + body: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - created_at + - custom_fields + - date_of_birth + - first_name + - gender + - remote_created_at + - remote_data + disabled_fields: + - company + - employments + - groups + - home_location + - manager + - work_location + source: + openapi: ats_v3.yml diff --git a/.mock/definition/ATS/scorecards.yml b/.mock/definition/ATS/scorecards.yml new file mode 100644 index 000000000..c984b9738 --- /dev/null +++ b/.mock/definition/ATS/scorecards.yml @@ -0,0 +1,206 @@ +types: + ScorecardsListRequestExpandItem: + enum: + - application + - interview + - interviewer + source: + openapi: ats_v3.yml + ScorecardsRetrieveRequestExpandItem: + enum: + - application + - interview + - interviewer + source: + openapi: ats_v3.yml +imports: + atsRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ats/v1/scorecards + method: GET + auth: true + docs: Returns a list of `Scorecard` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: ats_v3.yml + request: + name: ScorecardsListRequest + query-parameters: + application_id: + type: optional + docs: If provided, will only return scorecards for this application. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + interview_id: + type: optional + docs: If provided, will only return scorecards for this interview. + interviewer_id: + type: optional + docs: If provided, will only return scorecards for this interviewer. + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: atsRoot.PaginatedScorecardList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 3eab2f17-eeb1-450d-97f0-029d8be1e06f + remote_id: '22234' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + application: application + interview: interview + interviewer: interviewer + remote_created_at: '2021-10-15T00:00:00Z' + submitted_at: '2021-10-15T00:00:00Z' + overall_recommendation: DEFINITELY_NO + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /ratings + data: + - Varies by platform + retrieve: + path: /ats/v1/scorecards/{id} + method: GET + auth: true + docs: Returns a `Scorecard` object with the given `id`. + source: + openapi: ats_v3.yml + path-parameters: + id: string + request: + name: ScorecardsRetrieveRequest + query-parameters: + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: atsRoot.Scorecard + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 3eab2f17-eeb1-450d-97f0-029d8be1e06f + remote_id: '22234' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + application: application + interview: interview + interviewer: interviewer + remote_created_at: '2021-10-15T00:00:00Z' + submitted_at: '2021-10-15T00:00:00Z' + overall_recommendation: DEFINITELY_NO + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /ratings + data: + - Varies by platform + source: + openapi: ats_v3.yml diff --git a/.mock/definition/ATS/syncStatus.yml b/.mock/definition/ATS/syncStatus.yml new file mode 100644 index 000000000..345d698c5 --- /dev/null +++ b/.mock/definition/ATS/syncStatus.yml @@ -0,0 +1,59 @@ +imports: + atsRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ats/v1/sync-status + method: GET + auth: true + docs: >- + 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). + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: ats_v3.yml + request: + name: SyncStatusListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: atsRoot.PaginatedSyncStatusList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - model_name: Candidate + model_id: ats.Candidate + last_sync_start: '2021-03-30T19:44:18Z' + next_sync_start: '2021-03-30T20:44:18Z' + last_sync_result: SYNCING + last_sync_finished: '2021-03-30T19:55:18Z' + status: SYNCING + is_initial_sync: true + selective_sync_configurations_usage: IN_NEXT_SYNC + source: + openapi: ats_v3.yml diff --git a/.mock/definition/ATS/tags.yml b/.mock/definition/ATS/tags.yml new file mode 100644 index 000000000..0b5ff362d --- /dev/null +++ b/.mock/definition/ATS/tags.yml @@ -0,0 +1,92 @@ +imports: + atsRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ats/v1/tags + method: GET + auth: true + docs: Returns a list of `Tag` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: ats_v3.yml + request: + name: TagsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: atsRoot.PaginatedTagList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - remote_id: '4567' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: High-Priority + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /tags + data: + - Varies by platform + source: + openapi: ats_v3.yml diff --git a/.mock/definition/ATS/users.yml b/.mock/definition/ATS/users.yml new file mode 100644 index 000000000..a76e47630 --- /dev/null +++ b/.mock/definition/ATS/users.yml @@ -0,0 +1,177 @@ +imports: + atsRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ats/v1/users + method: GET + auth: true + docs: Returns a list of `RemoteUser` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: ats_v3.yml + request: + name: UsersListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + email: + type: optional + docs: >- + If provided, will only return remote users with the given email + address + validation: + format: email + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: atsRoot.PaginatedRemoteUserList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: b82302de-852e-4e60-b050-edf9da3b7c02 + remote_id: '344321' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + first_name: Shensi + last_name: Ding + email: hello@merge.dev + disabled: true + remote_created_at: '2020-11-10T00:00:00Z' + access_role: SUPER_ADMIN + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /users + data: + - Varies by platform + retrieve: + path: /ats/v1/users/{id} + method: GET + auth: true + docs: Returns a `RemoteUser` object with the given `id`. + source: + openapi: ats_v3.yml + path-parameters: + id: string + request: + name: UsersRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: atsRoot.RemoteUser + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: b82302de-852e-4e60-b050-edf9da3b7c02 + remote_id: '344321' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + first_name: Shensi + last_name: Ding + email: hello@merge.dev + disabled: true + remote_created_at: '2020-11-10T00:00:00Z' + access_role: SUPER_ADMIN + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /users + data: + - Varies by platform + source: + openapi: ats_v3.yml diff --git a/.mock/definition/ATS/webhookReceivers.yml b/.mock/definition/ATS/webhookReceivers.yml new file mode 100644 index 000000000..c79220f86 --- /dev/null +++ b/.mock/definition/ATS/webhookReceivers.yml @@ -0,0 +1,61 @@ +imports: + atsRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ats/v1/webhook-receivers + method: GET + auth: true + docs: Returns a list of `WebhookReceiver` objects. + source: + openapi: ats_v3.yml + response: + docs: '' + type: list + status-code: 200 + examples: + - headers: {} + response: + body: + - event: event + is_active: true + key: key + create: + path: /ats/v1/webhook-receivers + method: POST + auth: true + docs: Creates a `WebhookReceiver` object with the given values. + source: + openapi: ats_v3.yml + request: + name: WebhookReceiverRequest + body: + properties: + event: + type: string + validation: + minLength: 1 + is_active: boolean + key: + type: optional + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: atsRoot.WebhookReceiver + status-code: 201 + examples: + - headers: {} + request: + event: event + is_active: true + response: + body: + event: event + is_active: true + key: key + source: + openapi: ats_v3.yml diff --git a/.mock/definition/Accounting/__package__.yml b/.mock/definition/Accounting/__package__.yml new file mode 100644 index 000000000..231b8311f --- /dev/null +++ b/.mock/definition/Accounting/__package__.yml @@ -0,0 +1,52736 @@ +types: + AccountClassification: + discriminated: false + docs: |- + The account's broadest grouping. + + * `ASSET` - ASSET + * `EQUITY` - EQUITY + * `EXPENSE` - EXPENSE + * `LIABILITY` - LIABILITY + * `REVENUE` - REVENUE + union: + - ClassificationEnum + - string + source: + openapi: accounting_v3.yml + inline: true + AccountAccountType: + discriminated: false + docs: >- + Normalized account type- which is a narrower and more specific grouping + within the account's classification. + + + * `BANK` - BANK + + * `CREDIT_CARD` - CREDIT_CARD + + * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE + + * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE + + * `FIXED_ASSET` - FIXED_ASSET + + * `OTHER_ASSET` - OTHER_ASSET + + * `OTHER_CURRENT_ASSET` - OTHER_CURRENT_ASSET + + * `OTHER_EXPENSE` - OTHER_EXPENSE + + * `OTHER_INCOME` - OTHER_INCOME + + * `COST_OF_GOODS_SOLD` - COST_OF_GOODS_SOLD + + * `OTHER_CURRENT_LIABILITY` - OTHER_CURRENT_LIABILITY + + * `LONG_TERM_LIABILITY` - LONG_TERM_LIABILITY + + * `NON_POSTING` - NON_POSTING + union: + - AccountAccountTypeEnum + - string + source: + openapi: accounting_v3.yml + inline: true + AccountStatus: + discriminated: false + docs: |- + The account's status. + + * `ACTIVE` - ACTIVE + * `PENDING` - PENDING + * `INACTIVE` - INACTIVE + union: + - AccountStatusEnum + - string + source: + openapi: accounting_v3.yml + inline: true + AccountCurrency: + discriminated: false + docs: >- + The account's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + union: + - TransactionCurrencyEnum + - string + source: + openapi: accounting_v3.yml + inline: true + Account: + docs: >- + # The Account Object + + ### Description + + An `Account` represents a category in a company’s ledger in which a + financial transaction is recorded against. The aggregation of each + `Account` object is often referred to as the **Chart of Accounts**. + + + An `Account` can be classified into one of the following categories, + determined through the `classification` field: + + * __Asset:__ Accounts Receivable and Bank Accounts + + * __Liability:__ Accounts Payable and Credit Card Accounts + + * __Equity:__ Treasury Accounts and Retained Earnings + + * __Revenue:__ Income and Other Income + + * __Expense:__ Cost of Goods Sold and Office Expenses + + + ### Usage Example + + Fetch from the `LIST Accounts` endpoint and view a company's accounts. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The account's name. + description: + type: optional + docs: The account's description. + classification: + type: optional + docs: |- + The account's broadest grouping. + + * `ASSET` - ASSET + * `EQUITY` - EQUITY + * `EXPENSE` - EXPENSE + * `LIABILITY` - LIABILITY + * `REVENUE` - REVENUE + type: + type: optional + docs: >- + The account's type is a narrower and more specific grouping within the + account's classification. + account_type: + type: optional + docs: >- + Normalized account type- which is a narrower and more specific + grouping within the account's classification. + + + * `BANK` - BANK + + * `CREDIT_CARD` - CREDIT_CARD + + * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE + + * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE + + * `FIXED_ASSET` - FIXED_ASSET + + * `OTHER_ASSET` - OTHER_ASSET + + * `OTHER_CURRENT_ASSET` - OTHER_CURRENT_ASSET + + * `OTHER_EXPENSE` - OTHER_EXPENSE + + * `OTHER_INCOME` - OTHER_INCOME + + * `COST_OF_GOODS_SOLD` - COST_OF_GOODS_SOLD + + * `OTHER_CURRENT_LIABILITY` - OTHER_CURRENT_LIABILITY + + * `LONG_TERM_LIABILITY` - LONG_TERM_LIABILITY + + * `NON_POSTING` - NON_POSTING + status: + type: optional + docs: |- + The account's status. + + * `ACTIVE` - ACTIVE + * `PENDING` - PENDING + * `INACTIVE` - INACTIVE + current_balance: + type: optional + docs: The account's current balance. + currency: + type: optional + docs: >- + The account's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + account_number: + type: optional + docs: The account's number. + parent_account: + type: optional + docs: ID of the parent account. + validation: + format: uuid + company: + type: optional + docs: The company the account belongs to. + validation: + format: uuid + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: accounting_v3.yml + AccountAccountTypeEnum: + enum: + - BANK + - CREDIT_CARD + - ACCOUNTS_PAYABLE + - ACCOUNTS_RECEIVABLE + - FIXED_ASSET + - OTHER_ASSET + - OTHER_CURRENT_ASSET + - OTHER_EXPENSE + - OTHER_INCOME + - COST_OF_GOODS_SOLD + - OTHER_CURRENT_LIABILITY + - LONG_TERM_LIABILITY + - NON_POSTING + docs: |- + * `BANK` - BANK + * `CREDIT_CARD` - CREDIT_CARD + * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE + * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE + * `FIXED_ASSET` - FIXED_ASSET + * `OTHER_ASSET` - OTHER_ASSET + * `OTHER_CURRENT_ASSET` - OTHER_CURRENT_ASSET + * `OTHER_EXPENSE` - OTHER_EXPENSE + * `OTHER_INCOME` - OTHER_INCOME + * `COST_OF_GOODS_SOLD` - COST_OF_GOODS_SOLD + * `OTHER_CURRENT_LIABILITY` - OTHER_CURRENT_LIABILITY + * `LONG_TERM_LIABILITY` - LONG_TERM_LIABILITY + * `NON_POSTING` - NON_POSTING + source: + openapi: accounting_v3.yml + AccountDetails: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + integration: + type: optional + access: read-only + integration_slug: + type: optional + access: read-only + category: optional + end_user_origin_id: + type: optional + access: read-only + end_user_organization_name: + type: optional + access: read-only + end_user_email_address: + type: optional + validation: + format: email + access: read-only + status: + type: optional + access: read-only + webhook_listener_url: + type: optional + validation: + format: uri + access: read-only + is_duplicate: + type: optional + docs: >- + Whether a Production Linked Account's credentials match another + existing Production Linked Account. This field is `null` for Test + Linked Accounts, incomplete Production Linked Accounts, and ignored + duplicate Production Linked Account sets. + access: read-only + account_type: + type: optional + access: read-only + completed_at: + type: optional + docs: The time at which account completes the linking flow. + source: + openapi: accounting_v3.yml + AccountDetailsAndActionsCategory: + discriminated: false + union: + - CategoryEnum + - string + source: + openapi: accounting_v3.yml + inline: true + AccountDetailsAndActionsStatus: + discriminated: false + union: + - AccountDetailsAndActionsStatusEnum + - string + source: + openapi: accounting_v3.yml + inline: true + AccountDetailsAndActions: + docs: >- + # The LinkedAccount Object + + ### Description + + The `LinkedAccount` object is used to represent an end user's link with a + specific integration. + + + ### Usage Example + + View a list of your organization's `LinkedAccount` objects. + properties: + id: string + category: optional + status: AccountDetailsAndActionsStatus + status_detail: optional + end_user_origin_id: optional + end_user_organization_name: string + end_user_email_address: string + subdomain: + type: optional + docs: The tenant or domain the customer has provided access to. + webhook_listener_url: string + is_duplicate: + type: optional + docs: >- + Whether a Production Linked Account's credentials match another + existing Production Linked Account. This field is `null` for Test + Linked Accounts, incomplete Production Linked Accounts, and ignored + duplicate Production Linked Account sets. + integration: optional + account_type: string + completed_at: datetime + source: + openapi: accounting_v3.yml + AccountDetailsAndActionsIntegration: + properties: + name: string + categories: list + image: optional + square_image: optional + color: string + slug: string + passthrough_available: boolean + available_model_operations: optional> + source: + openapi: accounting_v3.yml + AccountDetailsAndActionsStatusEnum: + enum: + - COMPLETE + - INCOMPLETE + - RELINK_NEEDED + - IDLE + docs: |- + * `COMPLETE` - COMPLETE + * `INCOMPLETE` - INCOMPLETE + * `RELINK_NEEDED` - RELINK_NEEDED + * `IDLE` - IDLE + source: + openapi: accounting_v3.yml + AccountIntegration: + properties: + name: + type: string + docs: Company name. + abbreviated_name: + type: optional + docs: >- + Optional. This shortened name appears in places with limited space, + usually in conjunction with the platform's logo (e.g., Merge Link + menu).

Example: Workforce Now (in lieu of ADP Workforce + Now), SuccessFactors (in lieu of SAP SuccessFactors) + categories: + type: optional> + docs: >- + Category or categories this integration belongs to. Multiple + categories should be comma separated, i.e. [ats, hris]. + access: read-only + image: + type: optional + docs: Company logo in rectangular shape. + validation: + format: uri + square_image: + type: optional + docs: Company logo in square shape. + validation: + format: uri + color: + type: optional + docs: >- + The color of this integration used for buttons and text throughout the + app and landing pages. Choose a darker, saturated color. + validation: + pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ + maxLength: 18 + slug: + type: optional + access: read-only + api_endpoints_to_documentation_urls: + type: optional> + docs: >- + Mapping of API endpoints to documentation urls for support. Example: + {'GET': [['/common-model-scopes', + 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', + 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], + 'POST': []} + webhook_setup_guide_url: + type: optional + docs: >- + Setup guide URL for third party webhook creation. Exposed in Merge + Docs. + category_beta_status: + type: optional> + docs: Category or categories this integration is in beta status for. + access: read-only + source: + openapi: accounting_v3.yml + AccountRequestClassification: + discriminated: false + docs: |- + The account's broadest grouping. + + * `ASSET` - ASSET + * `EQUITY` - EQUITY + * `EXPENSE` - EXPENSE + * `LIABILITY` - LIABILITY + * `REVENUE` - REVENUE + union: + - ClassificationEnum + - string + source: + openapi: accounting_v3.yml + inline: true + AccountRequestAccountType: + discriminated: false + docs: >- + Normalized account type- which is a narrower and more specific grouping + within the account's classification. + + + * `BANK` - BANK + + * `CREDIT_CARD` - CREDIT_CARD + + * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE + + * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE + + * `FIXED_ASSET` - FIXED_ASSET + + * `OTHER_ASSET` - OTHER_ASSET + + * `OTHER_CURRENT_ASSET` - OTHER_CURRENT_ASSET + + * `OTHER_EXPENSE` - OTHER_EXPENSE + + * `OTHER_INCOME` - OTHER_INCOME + + * `COST_OF_GOODS_SOLD` - COST_OF_GOODS_SOLD + + * `OTHER_CURRENT_LIABILITY` - OTHER_CURRENT_LIABILITY + + * `LONG_TERM_LIABILITY` - LONG_TERM_LIABILITY + + * `NON_POSTING` - NON_POSTING + union: + - AccountAccountTypeEnum + - string + source: + openapi: accounting_v3.yml + inline: true + AccountRequestStatus: + discriminated: false + docs: |- + The account's status. + + * `ACTIVE` - ACTIVE + * `PENDING` - PENDING + * `INACTIVE` - INACTIVE + union: + - AccountStatusEnum + - string + source: + openapi: accounting_v3.yml + inline: true + AccountRequestCurrency: + discriminated: false + docs: >- + The account's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + union: + - TransactionCurrencyEnum + - string + source: + openapi: accounting_v3.yml + inline: true + AccountRequest: + docs: >- + # The Account Object + + ### Description + + An `Account` represents a category in a company’s ledger in which a + financial transaction is recorded against. The aggregation of each + `Account` object is often referred to as the **Chart of Accounts**. + + + An `Account` can be classified into one of the following categories, + determined through the `classification` field: + + * __Asset:__ Accounts Receivable and Bank Accounts + + * __Liability:__ Accounts Payable and Credit Card Accounts + + * __Equity:__ Treasury Accounts and Retained Earnings + + * __Revenue:__ Income and Other Income + + * __Expense:__ Cost of Goods Sold and Office Expenses + + + ### Usage Example + + Fetch from the `LIST Accounts` endpoint and view a company's accounts. + properties: + name: + type: optional + docs: The account's name. + description: + type: optional + docs: The account's description. + classification: + type: optional + docs: |- + The account's broadest grouping. + + * `ASSET` - ASSET + * `EQUITY` - EQUITY + * `EXPENSE` - EXPENSE + * `LIABILITY` - LIABILITY + * `REVENUE` - REVENUE + type: + type: optional + docs: >- + The account's type is a narrower and more specific grouping within the + account's classification. + account_type: + type: optional + docs: >- + Normalized account type- which is a narrower and more specific + grouping within the account's classification. + + + * `BANK` - BANK + + * `CREDIT_CARD` - CREDIT_CARD + + * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE + + * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE + + * `FIXED_ASSET` - FIXED_ASSET + + * `OTHER_ASSET` - OTHER_ASSET + + * `OTHER_CURRENT_ASSET` - OTHER_CURRENT_ASSET + + * `OTHER_EXPENSE` - OTHER_EXPENSE + + * `OTHER_INCOME` - OTHER_INCOME + + * `COST_OF_GOODS_SOLD` - COST_OF_GOODS_SOLD + + * `OTHER_CURRENT_LIABILITY` - OTHER_CURRENT_LIABILITY + + * `LONG_TERM_LIABILITY` - LONG_TERM_LIABILITY + + * `NON_POSTING` - NON_POSTING + status: + type: optional + docs: |- + The account's status. + + * `ACTIVE` - ACTIVE + * `PENDING` - PENDING + * `INACTIVE` - INACTIVE + current_balance: + type: optional + docs: The account's current balance. + currency: + type: optional + docs: >- + The account's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + account_number: + type: optional + docs: The account's number. + parent_account: + type: optional + docs: ID of the parent account. + validation: + format: uuid + company: + type: optional + docs: The company the account belongs to. + validation: + format: uuid + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: accounting_v3.yml + AccountResponse: + properties: + model: Account + warnings: list + errors: list + logs: optional> + source: + openapi: accounting_v3.yml + AccountStatusEnum: + enum: + - ACTIVE + - PENDING + - INACTIVE + docs: |- + * `ACTIVE` - ACTIVE + * `PENDING` - PENDING + * `INACTIVE` - INACTIVE + source: + openapi: accounting_v3.yml + AccountToken: + properties: + account_token: string + integration: AccountIntegration + id: string + source: + openapi: accounting_v3.yml + AccountingAttachment: + docs: >- + # The Accounting Attachment Object + + ### Description + + The `AccountingAttachment` object is used to represent a company's + attachments. + + + ### Usage Example + + Fetch from the `LIST AccountingAttachments` endpoint and view a company's + attachments. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + file_name: + type: optional + docs: The attachment's name. + file_url: + type: optional + docs: The attachment's url. + validation: + format: uri + maxLength: 2000 + company: + type: optional + docs: The company the accounting attachment belongs to. + validation: + format: uuid + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: accounting_v3.yml + AccountingAttachmentRequest: + docs: >- + # The Accounting Attachment Object + + ### Description + + The `AccountingAttachment` object is used to represent a company's + attachments. + + + ### Usage Example + + Fetch from the `LIST AccountingAttachments` endpoint and view a company's + attachments. + properties: + file_name: + type: optional + docs: The attachment's name. + file_url: + type: optional + docs: The attachment's url. + validation: + format: uri + maxLength: 2000 + company: + type: optional + docs: The company the accounting attachment belongs to. + validation: + format: uuid + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: accounting_v3.yml + AccountingAttachmentResponse: + properties: + model: AccountingAttachment + warnings: list + errors: list + logs: optional> + source: + openapi: accounting_v3.yml + AccountingPeriodStatus: + discriminated: false + union: + - Status895Enum + - string + source: + openapi: accounting_v3.yml + inline: true + AccountingPeriod: + docs: >- + # The AccountingPeriod Object + + ### Description + + The `AccountingPeriod` object is used to define a period of time in which + events occurred. + + + ### Usage Example + + Common models like `Invoice` and `Transaction` will have + `AccountingPeriod` objects which will denote when they occurred. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: Name of the accounting period. + validation: + maxLength: 100 + status: optional + start_date: + type: optional + docs: Beginning date of the period + end_date: + type: optional + docs: End date of the period + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: accounting_v3.yml + AccountingPhoneNumber: + docs: >- + # The AccountingPhoneNumber Object + + ### Description + + The `AccountingPhoneNumber` object is used to represent a contact's or + company's phone number. + + + ### Usage Example + + Fetch from the `GET CompanyInfo` endpoint and view the company's phone + numbers. + properties: + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + number: + type: optional + docs: The phone number. + type: + type: optional + docs: The phone number's type. + source: + openapi: accounting_v3.yml + AccountingPhoneNumberRequest: + docs: >- + # The AccountingPhoneNumber Object + + ### Description + + The `AccountingPhoneNumber` object is used to represent a contact's or + company's phone number. + + + ### Usage Example + + Fetch from the `GET CompanyInfo` endpoint and view the company's phone + numbers. + properties: + number: + type: optional + docs: The phone number. + type: + type: optional + docs: The phone number's type. + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: accounting_v3.yml + AddressType: + discriminated: false + docs: |- + The address type. + + * `BILLING` - BILLING + * `SHIPPING` - SHIPPING + union: + - AddressTypeEnum + - string + source: + openapi: accounting_v3.yml + inline: true + AddressCountry: + discriminated: false + docs: |- + The address's country. + + * `AF` - Afghanistan + * `AX` - Åland Islands + * `AL` - Albania + * `DZ` - Algeria + * `AS` - American Samoa + * `AD` - Andorra + * `AO` - Angola + * `AI` - Anguilla + * `AQ` - Antarctica + * `AG` - Antigua and Barbuda + * `AR` - Argentina + * `AM` - Armenia + * `AW` - Aruba + * `AU` - Australia + * `AT` - Austria + * `AZ` - Azerbaijan + * `BS` - Bahamas + * `BH` - Bahrain + * `BD` - Bangladesh + * `BB` - Barbados + * `BY` - Belarus + * `BE` - Belgium + * `BZ` - Belize + * `BJ` - Benin + * `BM` - Bermuda + * `BT` - Bhutan + * `BO` - Bolivia + * `BQ` - Bonaire, Sint Eustatius and Saba + * `BA` - Bosnia and Herzegovina + * `BW` - Botswana + * `BV` - Bouvet Island + * `BR` - Brazil + * `IO` - British Indian Ocean Territory + * `BN` - Brunei + * `BG` - Bulgaria + * `BF` - Burkina Faso + * `BI` - Burundi + * `CV` - Cabo Verde + * `KH` - Cambodia + * `CM` - Cameroon + * `CA` - Canada + * `KY` - Cayman Islands + * `CF` - Central African Republic + * `TD` - Chad + * `CL` - Chile + * `CN` - China + * `CX` - Christmas Island + * `CC` - Cocos (Keeling) Islands + * `CO` - Colombia + * `KM` - Comoros + * `CG` - Congo + * `CD` - Congo (the Democratic Republic of the) + * `CK` - Cook Islands + * `CR` - Costa Rica + * `CI` - Côte d'Ivoire + * `HR` - Croatia + * `CU` - Cuba + * `CW` - Curaçao + * `CY` - Cyprus + * `CZ` - Czechia + * `DK` - Denmark + * `DJ` - Djibouti + * `DM` - Dominica + * `DO` - Dominican Republic + * `EC` - Ecuador + * `EG` - Egypt + * `SV` - El Salvador + * `GQ` - Equatorial Guinea + * `ER` - Eritrea + * `EE` - Estonia + * `SZ` - Eswatini + * `ET` - Ethiopia + * `FK` - Falkland Islands (Malvinas) + * `FO` - Faroe Islands + * `FJ` - Fiji + * `FI` - Finland + * `FR` - France + * `GF` - French Guiana + * `PF` - French Polynesia + * `TF` - French Southern Territories + * `GA` - Gabon + * `GM` - Gambia + * `GE` - Georgia + * `DE` - Germany + * `GH` - Ghana + * `GI` - Gibraltar + * `GR` - Greece + * `GL` - Greenland + * `GD` - Grenada + * `GP` - Guadeloupe + * `GU` - Guam + * `GT` - Guatemala + * `GG` - Guernsey + * `GN` - Guinea + * `GW` - Guinea-Bissau + * `GY` - Guyana + * `HT` - Haiti + * `HM` - Heard Island and McDonald Islands + * `VA` - Holy See + * `HN` - Honduras + * `HK` - Hong Kong + * `HU` - Hungary + * `IS` - Iceland + * `IN` - India + * `ID` - Indonesia + * `IR` - Iran + * `IQ` - Iraq + * `IE` - Ireland + * `IM` - Isle of Man + * `IL` - Israel + * `IT` - Italy + * `JM` - Jamaica + * `JP` - Japan + * `JE` - Jersey + * `JO` - Jordan + * `KZ` - Kazakhstan + * `KE` - Kenya + * `KI` - Kiribati + * `KW` - Kuwait + * `KG` - Kyrgyzstan + * `LA` - Laos + * `LV` - Latvia + * `LB` - Lebanon + * `LS` - Lesotho + * `LR` - Liberia + * `LY` - Libya + * `LI` - Liechtenstein + * `LT` - Lithuania + * `LU` - Luxembourg + * `MO` - Macao + * `MG` - Madagascar + * `MW` - Malawi + * `MY` - Malaysia + * `MV` - Maldives + * `ML` - Mali + * `MT` - Malta + * `MH` - Marshall Islands + * `MQ` - Martinique + * `MR` - Mauritania + * `MU` - Mauritius + * `YT` - Mayotte + * `MX` - Mexico + * `FM` - Micronesia (Federated States of) + * `MD` - Moldova + * `MC` - Monaco + * `MN` - Mongolia + * `ME` - Montenegro + * `MS` - Montserrat + * `MA` - Morocco + * `MZ` - Mozambique + * `MM` - Myanmar + * `NA` - Namibia + * `NR` - Nauru + * `NP` - Nepal + * `NL` - Netherlands + * `NC` - New Caledonia + * `NZ` - New Zealand + * `NI` - Nicaragua + * `NE` - Niger + * `NG` - Nigeria + * `NU` - Niue + * `NF` - Norfolk Island + * `KP` - North Korea + * `MK` - North Macedonia + * `MP` - Northern Mariana Islands + * `NO` - Norway + * `OM` - Oman + * `PK` - Pakistan + * `PW` - Palau + * `PS` - Palestine, State of + * `PA` - Panama + * `PG` - Papua New Guinea + * `PY` - Paraguay + * `PE` - Peru + * `PH` - Philippines + * `PN` - Pitcairn + * `PL` - Poland + * `PT` - Portugal + * `PR` - Puerto Rico + * `QA` - Qatar + * `RE` - Réunion + * `RO` - Romania + * `RU` - Russia + * `RW` - Rwanda + * `BL` - Saint Barthélemy + * `SH` - Saint Helena, Ascension and Tristan da Cunha + * `KN` - Saint Kitts and Nevis + * `LC` - Saint Lucia + * `MF` - Saint Martin (French part) + * `PM` - Saint Pierre and Miquelon + * `VC` - Saint Vincent and the Grenadines + * `WS` - Samoa + * `SM` - San Marino + * `ST` - Sao Tome and Principe + * `SA` - Saudi Arabia + * `SN` - Senegal + * `RS` - Serbia + * `SC` - Seychelles + * `SL` - Sierra Leone + * `SG` - Singapore + * `SX` - Sint Maarten (Dutch part) + * `SK` - Slovakia + * `SI` - Slovenia + * `SB` - Solomon Islands + * `SO` - Somalia + * `ZA` - South Africa + * `GS` - South Georgia and the South Sandwich Islands + * `KR` - South Korea + * `SS` - South Sudan + * `ES` - Spain + * `LK` - Sri Lanka + * `SD` - Sudan + * `SR` - Suriname + * `SJ` - Svalbard and Jan Mayen + * `SE` - Sweden + * `CH` - Switzerland + * `SY` - Syria + * `TW` - Taiwan + * `TJ` - Tajikistan + * `TZ` - Tanzania + * `TH` - Thailand + * `TL` - Timor-Leste + * `TG` - Togo + * `TK` - Tokelau + * `TO` - Tonga + * `TT` - Trinidad and Tobago + * `TN` - Tunisia + * `TR` - Turkey + * `TM` - Turkmenistan + * `TC` - Turks and Caicos Islands + * `TV` - Tuvalu + * `UG` - Uganda + * `UA` - Ukraine + * `AE` - United Arab Emirates + * `GB` - United Kingdom + * `UM` - United States Minor Outlying Islands + * `US` - United States of America + * `UY` - Uruguay + * `UZ` - Uzbekistan + * `VU` - Vanuatu + * `VE` - Venezuela + * `VN` - Vietnam + * `VG` - Virgin Islands (British) + * `VI` - Virgin Islands (U.S.) + * `WF` - Wallis and Futuna + * `EH` - Western Sahara + * `YE` - Yemen + * `ZM` - Zambia + * `ZW` - Zimbabwe + union: + - CountryEnum + - string + source: + openapi: accounting_v3.yml + inline: true + Address: + docs: >- + # The Address Object + + ### Description + + The `Address` object is used to represent a contact's or company's + address. + + + ### Usage Example + + Fetch from the `GET CompanyInfo` endpoint and view the company's + addresses. + properties: + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + type: + type: optional + docs: |- + The address type. + + * `BILLING` - BILLING + * `SHIPPING` - SHIPPING + street_1: + type: optional + docs: Line 1 of the address's street. + street_2: + type: optional + docs: Line 2 of the address's street. + city: + type: optional + docs: The address's city. + state: + type: optional + access: read-only + country_subdivision: + type: optional + docs: The address's state or region. + country: + type: optional + docs: |- + The address's country. + + * `AF` - Afghanistan + * `AX` - Åland Islands + * `AL` - Albania + * `DZ` - Algeria + * `AS` - American Samoa + * `AD` - Andorra + * `AO` - Angola + * `AI` - Anguilla + * `AQ` - Antarctica + * `AG` - Antigua and Barbuda + * `AR` - Argentina + * `AM` - Armenia + * `AW` - Aruba + * `AU` - Australia + * `AT` - Austria + * `AZ` - Azerbaijan + * `BS` - Bahamas + * `BH` - Bahrain + * `BD` - Bangladesh + * `BB` - Barbados + * `BY` - Belarus + * `BE` - Belgium + * `BZ` - Belize + * `BJ` - Benin + * `BM` - Bermuda + * `BT` - Bhutan + * `BO` - Bolivia + * `BQ` - Bonaire, Sint Eustatius and Saba + * `BA` - Bosnia and Herzegovina + * `BW` - Botswana + * `BV` - Bouvet Island + * `BR` - Brazil + * `IO` - British Indian Ocean Territory + * `BN` - Brunei + * `BG` - Bulgaria + * `BF` - Burkina Faso + * `BI` - Burundi + * `CV` - Cabo Verde + * `KH` - Cambodia + * `CM` - Cameroon + * `CA` - Canada + * `KY` - Cayman Islands + * `CF` - Central African Republic + * `TD` - Chad + * `CL` - Chile + * `CN` - China + * `CX` - Christmas Island + * `CC` - Cocos (Keeling) Islands + * `CO` - Colombia + * `KM` - Comoros + * `CG` - Congo + * `CD` - Congo (the Democratic Republic of the) + * `CK` - Cook Islands + * `CR` - Costa Rica + * `CI` - Côte d'Ivoire + * `HR` - Croatia + * `CU` - Cuba + * `CW` - Curaçao + * `CY` - Cyprus + * `CZ` - Czechia + * `DK` - Denmark + * `DJ` - Djibouti + * `DM` - Dominica + * `DO` - Dominican Republic + * `EC` - Ecuador + * `EG` - Egypt + * `SV` - El Salvador + * `GQ` - Equatorial Guinea + * `ER` - Eritrea + * `EE` - Estonia + * `SZ` - Eswatini + * `ET` - Ethiopia + * `FK` - Falkland Islands (Malvinas) + * `FO` - Faroe Islands + * `FJ` - Fiji + * `FI` - Finland + * `FR` - France + * `GF` - French Guiana + * `PF` - French Polynesia + * `TF` - French Southern Territories + * `GA` - Gabon + * `GM` - Gambia + * `GE` - Georgia + * `DE` - Germany + * `GH` - Ghana + * `GI` - Gibraltar + * `GR` - Greece + * `GL` - Greenland + * `GD` - Grenada + * `GP` - Guadeloupe + * `GU` - Guam + * `GT` - Guatemala + * `GG` - Guernsey + * `GN` - Guinea + * `GW` - Guinea-Bissau + * `GY` - Guyana + * `HT` - Haiti + * `HM` - Heard Island and McDonald Islands + * `VA` - Holy See + * `HN` - Honduras + * `HK` - Hong Kong + * `HU` - Hungary + * `IS` - Iceland + * `IN` - India + * `ID` - Indonesia + * `IR` - Iran + * `IQ` - Iraq + * `IE` - Ireland + * `IM` - Isle of Man + * `IL` - Israel + * `IT` - Italy + * `JM` - Jamaica + * `JP` - Japan + * `JE` - Jersey + * `JO` - Jordan + * `KZ` - Kazakhstan + * `KE` - Kenya + * `KI` - Kiribati + * `KW` - Kuwait + * `KG` - Kyrgyzstan + * `LA` - Laos + * `LV` - Latvia + * `LB` - Lebanon + * `LS` - Lesotho + * `LR` - Liberia + * `LY` - Libya + * `LI` - Liechtenstein + * `LT` - Lithuania + * `LU` - Luxembourg + * `MO` - Macao + * `MG` - Madagascar + * `MW` - Malawi + * `MY` - Malaysia + * `MV` - Maldives + * `ML` - Mali + * `MT` - Malta + * `MH` - Marshall Islands + * `MQ` - Martinique + * `MR` - Mauritania + * `MU` - Mauritius + * `YT` - Mayotte + * `MX` - Mexico + * `FM` - Micronesia (Federated States of) + * `MD` - Moldova + * `MC` - Monaco + * `MN` - Mongolia + * `ME` - Montenegro + * `MS` - Montserrat + * `MA` - Morocco + * `MZ` - Mozambique + * `MM` - Myanmar + * `NA` - Namibia + * `NR` - Nauru + * `NP` - Nepal + * `NL` - Netherlands + * `NC` - New Caledonia + * `NZ` - New Zealand + * `NI` - Nicaragua + * `NE` - Niger + * `NG` - Nigeria + * `NU` - Niue + * `NF` - Norfolk Island + * `KP` - North Korea + * `MK` - North Macedonia + * `MP` - Northern Mariana Islands + * `NO` - Norway + * `OM` - Oman + * `PK` - Pakistan + * `PW` - Palau + * `PS` - Palestine, State of + * `PA` - Panama + * `PG` - Papua New Guinea + * `PY` - Paraguay + * `PE` - Peru + * `PH` - Philippines + * `PN` - Pitcairn + * `PL` - Poland + * `PT` - Portugal + * `PR` - Puerto Rico + * `QA` - Qatar + * `RE` - Réunion + * `RO` - Romania + * `RU` - Russia + * `RW` - Rwanda + * `BL` - Saint Barthélemy + * `SH` - Saint Helena, Ascension and Tristan da Cunha + * `KN` - Saint Kitts and Nevis + * `LC` - Saint Lucia + * `MF` - Saint Martin (French part) + * `PM` - Saint Pierre and Miquelon + * `VC` - Saint Vincent and the Grenadines + * `WS` - Samoa + * `SM` - San Marino + * `ST` - Sao Tome and Principe + * `SA` - Saudi Arabia + * `SN` - Senegal + * `RS` - Serbia + * `SC` - Seychelles + * `SL` - Sierra Leone + * `SG` - Singapore + * `SX` - Sint Maarten (Dutch part) + * `SK` - Slovakia + * `SI` - Slovenia + * `SB` - Solomon Islands + * `SO` - Somalia + * `ZA` - South Africa + * `GS` - South Georgia and the South Sandwich Islands + * `KR` - South Korea + * `SS` - South Sudan + * `ES` - Spain + * `LK` - Sri Lanka + * `SD` - Sudan + * `SR` - Suriname + * `SJ` - Svalbard and Jan Mayen + * `SE` - Sweden + * `CH` - Switzerland + * `SY` - Syria + * `TW` - Taiwan + * `TJ` - Tajikistan + * `TZ` - Tanzania + * `TH` - Thailand + * `TL` - Timor-Leste + * `TG` - Togo + * `TK` - Tokelau + * `TO` - Tonga + * `TT` - Trinidad and Tobago + * `TN` - Tunisia + * `TR` - Turkey + * `TM` - Turkmenistan + * `TC` - Turks and Caicos Islands + * `TV` - Tuvalu + * `UG` - Uganda + * `UA` - Ukraine + * `AE` - United Arab Emirates + * `GB` - United Kingdom + * `UM` - United States Minor Outlying Islands + * `US` - United States of America + * `UY` - Uruguay + * `UZ` - Uzbekistan + * `VU` - Vanuatu + * `VE` - Venezuela + * `VN` - Vietnam + * `VG` - Virgin Islands (British) + * `VI` - Virgin Islands (U.S.) + * `WF` - Wallis and Futuna + * `EH` - Western Sahara + * `YE` - Yemen + * `ZM` - Zambia + * `ZW` - Zimbabwe + zip_code: + type: optional + docs: The address's zip code. + source: + openapi: accounting_v3.yml + AddressRequestType: + discriminated: false + docs: |- + The address type. + + * `BILLING` - BILLING + * `SHIPPING` - SHIPPING + union: + - AddressTypeEnum + - string + source: + openapi: accounting_v3.yml + inline: true + AddressRequestCountry: + discriminated: false + docs: |- + The address's country. + + * `AF` - Afghanistan + * `AX` - Åland Islands + * `AL` - Albania + * `DZ` - Algeria + * `AS` - American Samoa + * `AD` - Andorra + * `AO` - Angola + * `AI` - Anguilla + * `AQ` - Antarctica + * `AG` - Antigua and Barbuda + * `AR` - Argentina + * `AM` - Armenia + * `AW` - Aruba + * `AU` - Australia + * `AT` - Austria + * `AZ` - Azerbaijan + * `BS` - Bahamas + * `BH` - Bahrain + * `BD` - Bangladesh + * `BB` - Barbados + * `BY` - Belarus + * `BE` - Belgium + * `BZ` - Belize + * `BJ` - Benin + * `BM` - Bermuda + * `BT` - Bhutan + * `BO` - Bolivia + * `BQ` - Bonaire, Sint Eustatius and Saba + * `BA` - Bosnia and Herzegovina + * `BW` - Botswana + * `BV` - Bouvet Island + * `BR` - Brazil + * `IO` - British Indian Ocean Territory + * `BN` - Brunei + * `BG` - Bulgaria + * `BF` - Burkina Faso + * `BI` - Burundi + * `CV` - Cabo Verde + * `KH` - Cambodia + * `CM` - Cameroon + * `CA` - Canada + * `KY` - Cayman Islands + * `CF` - Central African Republic + * `TD` - Chad + * `CL` - Chile + * `CN` - China + * `CX` - Christmas Island + * `CC` - Cocos (Keeling) Islands + * `CO` - Colombia + * `KM` - Comoros + * `CG` - Congo + * `CD` - Congo (the Democratic Republic of the) + * `CK` - Cook Islands + * `CR` - Costa Rica + * `CI` - Côte d'Ivoire + * `HR` - Croatia + * `CU` - Cuba + * `CW` - Curaçao + * `CY` - Cyprus + * `CZ` - Czechia + * `DK` - Denmark + * `DJ` - Djibouti + * `DM` - Dominica + * `DO` - Dominican Republic + * `EC` - Ecuador + * `EG` - Egypt + * `SV` - El Salvador + * `GQ` - Equatorial Guinea + * `ER` - Eritrea + * `EE` - Estonia + * `SZ` - Eswatini + * `ET` - Ethiopia + * `FK` - Falkland Islands (Malvinas) + * `FO` - Faroe Islands + * `FJ` - Fiji + * `FI` - Finland + * `FR` - France + * `GF` - French Guiana + * `PF` - French Polynesia + * `TF` - French Southern Territories + * `GA` - Gabon + * `GM` - Gambia + * `GE` - Georgia + * `DE` - Germany + * `GH` - Ghana + * `GI` - Gibraltar + * `GR` - Greece + * `GL` - Greenland + * `GD` - Grenada + * `GP` - Guadeloupe + * `GU` - Guam + * `GT` - Guatemala + * `GG` - Guernsey + * `GN` - Guinea + * `GW` - Guinea-Bissau + * `GY` - Guyana + * `HT` - Haiti + * `HM` - Heard Island and McDonald Islands + * `VA` - Holy See + * `HN` - Honduras + * `HK` - Hong Kong + * `HU` - Hungary + * `IS` - Iceland + * `IN` - India + * `ID` - Indonesia + * `IR` - Iran + * `IQ` - Iraq + * `IE` - Ireland + * `IM` - Isle of Man + * `IL` - Israel + * `IT` - Italy + * `JM` - Jamaica + * `JP` - Japan + * `JE` - Jersey + * `JO` - Jordan + * `KZ` - Kazakhstan + * `KE` - Kenya + * `KI` - Kiribati + * `KW` - Kuwait + * `KG` - Kyrgyzstan + * `LA` - Laos + * `LV` - Latvia + * `LB` - Lebanon + * `LS` - Lesotho + * `LR` - Liberia + * `LY` - Libya + * `LI` - Liechtenstein + * `LT` - Lithuania + * `LU` - Luxembourg + * `MO` - Macao + * `MG` - Madagascar + * `MW` - Malawi + * `MY` - Malaysia + * `MV` - Maldives + * `ML` - Mali + * `MT` - Malta + * `MH` - Marshall Islands + * `MQ` - Martinique + * `MR` - Mauritania + * `MU` - Mauritius + * `YT` - Mayotte + * `MX` - Mexico + * `FM` - Micronesia (Federated States of) + * `MD` - Moldova + * `MC` - Monaco + * `MN` - Mongolia + * `ME` - Montenegro + * `MS` - Montserrat + * `MA` - Morocco + * `MZ` - Mozambique + * `MM` - Myanmar + * `NA` - Namibia + * `NR` - Nauru + * `NP` - Nepal + * `NL` - Netherlands + * `NC` - New Caledonia + * `NZ` - New Zealand + * `NI` - Nicaragua + * `NE` - Niger + * `NG` - Nigeria + * `NU` - Niue + * `NF` - Norfolk Island + * `KP` - North Korea + * `MK` - North Macedonia + * `MP` - Northern Mariana Islands + * `NO` - Norway + * `OM` - Oman + * `PK` - Pakistan + * `PW` - Palau + * `PS` - Palestine, State of + * `PA` - Panama + * `PG` - Papua New Guinea + * `PY` - Paraguay + * `PE` - Peru + * `PH` - Philippines + * `PN` - Pitcairn + * `PL` - Poland + * `PT` - Portugal + * `PR` - Puerto Rico + * `QA` - Qatar + * `RE` - Réunion + * `RO` - Romania + * `RU` - Russia + * `RW` - Rwanda + * `BL` - Saint Barthélemy + * `SH` - Saint Helena, Ascension and Tristan da Cunha + * `KN` - Saint Kitts and Nevis + * `LC` - Saint Lucia + * `MF` - Saint Martin (French part) + * `PM` - Saint Pierre and Miquelon + * `VC` - Saint Vincent and the Grenadines + * `WS` - Samoa + * `SM` - San Marino + * `ST` - Sao Tome and Principe + * `SA` - Saudi Arabia + * `SN` - Senegal + * `RS` - Serbia + * `SC` - Seychelles + * `SL` - Sierra Leone + * `SG` - Singapore + * `SX` - Sint Maarten (Dutch part) + * `SK` - Slovakia + * `SI` - Slovenia + * `SB` - Solomon Islands + * `SO` - Somalia + * `ZA` - South Africa + * `GS` - South Georgia and the South Sandwich Islands + * `KR` - South Korea + * `SS` - South Sudan + * `ES` - Spain + * `LK` - Sri Lanka + * `SD` - Sudan + * `SR` - Suriname + * `SJ` - Svalbard and Jan Mayen + * `SE` - Sweden + * `CH` - Switzerland + * `SY` - Syria + * `TW` - Taiwan + * `TJ` - Tajikistan + * `TZ` - Tanzania + * `TH` - Thailand + * `TL` - Timor-Leste + * `TG` - Togo + * `TK` - Tokelau + * `TO` - Tonga + * `TT` - Trinidad and Tobago + * `TN` - Tunisia + * `TR` - Turkey + * `TM` - Turkmenistan + * `TC` - Turks and Caicos Islands + * `TV` - Tuvalu + * `UG` - Uganda + * `UA` - Ukraine + * `AE` - United Arab Emirates + * `GB` - United Kingdom + * `UM` - United States Minor Outlying Islands + * `US` - United States of America + * `UY` - Uruguay + * `UZ` - Uzbekistan + * `VU` - Vanuatu + * `VE` - Venezuela + * `VN` - Vietnam + * `VG` - Virgin Islands (British) + * `VI` - Virgin Islands (U.S.) + * `WF` - Wallis and Futuna + * `EH` - Western Sahara + * `YE` - Yemen + * `ZM` - Zambia + * `ZW` - Zimbabwe + union: + - CountryEnum + - string + source: + openapi: accounting_v3.yml + inline: true + AddressRequest: + docs: >- + # The Address Object + + ### Description + + The `Address` object is used to represent a contact's or company's + address. + + + ### Usage Example + + Fetch from the `GET CompanyInfo` endpoint and view the company's + addresses. + properties: + type: + type: optional + docs: |- + The address type. + + * `BILLING` - BILLING + * `SHIPPING` - SHIPPING + street_1: + type: optional + docs: Line 1 of the address's street. + street_2: + type: optional + docs: Line 2 of the address's street. + city: + type: optional + docs: The address's city. + country_subdivision: + type: optional + docs: The address's state or region. + country: + type: optional + docs: |- + The address's country. + + * `AF` - Afghanistan + * `AX` - Åland Islands + * `AL` - Albania + * `DZ` - Algeria + * `AS` - American Samoa + * `AD` - Andorra + * `AO` - Angola + * `AI` - Anguilla + * `AQ` - Antarctica + * `AG` - Antigua and Barbuda + * `AR` - Argentina + * `AM` - Armenia + * `AW` - Aruba + * `AU` - Australia + * `AT` - Austria + * `AZ` - Azerbaijan + * `BS` - Bahamas + * `BH` - Bahrain + * `BD` - Bangladesh + * `BB` - Barbados + * `BY` - Belarus + * `BE` - Belgium + * `BZ` - Belize + * `BJ` - Benin + * `BM` - Bermuda + * `BT` - Bhutan + * `BO` - Bolivia + * `BQ` - Bonaire, Sint Eustatius and Saba + * `BA` - Bosnia and Herzegovina + * `BW` - Botswana + * `BV` - Bouvet Island + * `BR` - Brazil + * `IO` - British Indian Ocean Territory + * `BN` - Brunei + * `BG` - Bulgaria + * `BF` - Burkina Faso + * `BI` - Burundi + * `CV` - Cabo Verde + * `KH` - Cambodia + * `CM` - Cameroon + * `CA` - Canada + * `KY` - Cayman Islands + * `CF` - Central African Republic + * `TD` - Chad + * `CL` - Chile + * `CN` - China + * `CX` - Christmas Island + * `CC` - Cocos (Keeling) Islands + * `CO` - Colombia + * `KM` - Comoros + * `CG` - Congo + * `CD` - Congo (the Democratic Republic of the) + * `CK` - Cook Islands + * `CR` - Costa Rica + * `CI` - Côte d'Ivoire + * `HR` - Croatia + * `CU` - Cuba + * `CW` - Curaçao + * `CY` - Cyprus + * `CZ` - Czechia + * `DK` - Denmark + * `DJ` - Djibouti + * `DM` - Dominica + * `DO` - Dominican Republic + * `EC` - Ecuador + * `EG` - Egypt + * `SV` - El Salvador + * `GQ` - Equatorial Guinea + * `ER` - Eritrea + * `EE` - Estonia + * `SZ` - Eswatini + * `ET` - Ethiopia + * `FK` - Falkland Islands (Malvinas) + * `FO` - Faroe Islands + * `FJ` - Fiji + * `FI` - Finland + * `FR` - France + * `GF` - French Guiana + * `PF` - French Polynesia + * `TF` - French Southern Territories + * `GA` - Gabon + * `GM` - Gambia + * `GE` - Georgia + * `DE` - Germany + * `GH` - Ghana + * `GI` - Gibraltar + * `GR` - Greece + * `GL` - Greenland + * `GD` - Grenada + * `GP` - Guadeloupe + * `GU` - Guam + * `GT` - Guatemala + * `GG` - Guernsey + * `GN` - Guinea + * `GW` - Guinea-Bissau + * `GY` - Guyana + * `HT` - Haiti + * `HM` - Heard Island and McDonald Islands + * `VA` - Holy See + * `HN` - Honduras + * `HK` - Hong Kong + * `HU` - Hungary + * `IS` - Iceland + * `IN` - India + * `ID` - Indonesia + * `IR` - Iran + * `IQ` - Iraq + * `IE` - Ireland + * `IM` - Isle of Man + * `IL` - Israel + * `IT` - Italy + * `JM` - Jamaica + * `JP` - Japan + * `JE` - Jersey + * `JO` - Jordan + * `KZ` - Kazakhstan + * `KE` - Kenya + * `KI` - Kiribati + * `KW` - Kuwait + * `KG` - Kyrgyzstan + * `LA` - Laos + * `LV` - Latvia + * `LB` - Lebanon + * `LS` - Lesotho + * `LR` - Liberia + * `LY` - Libya + * `LI` - Liechtenstein + * `LT` - Lithuania + * `LU` - Luxembourg + * `MO` - Macao + * `MG` - Madagascar + * `MW` - Malawi + * `MY` - Malaysia + * `MV` - Maldives + * `ML` - Mali + * `MT` - Malta + * `MH` - Marshall Islands + * `MQ` - Martinique + * `MR` - Mauritania + * `MU` - Mauritius + * `YT` - Mayotte + * `MX` - Mexico + * `FM` - Micronesia (Federated States of) + * `MD` - Moldova + * `MC` - Monaco + * `MN` - Mongolia + * `ME` - Montenegro + * `MS` - Montserrat + * `MA` - Morocco + * `MZ` - Mozambique + * `MM` - Myanmar + * `NA` - Namibia + * `NR` - Nauru + * `NP` - Nepal + * `NL` - Netherlands + * `NC` - New Caledonia + * `NZ` - New Zealand + * `NI` - Nicaragua + * `NE` - Niger + * `NG` - Nigeria + * `NU` - Niue + * `NF` - Norfolk Island + * `KP` - North Korea + * `MK` - North Macedonia + * `MP` - Northern Mariana Islands + * `NO` - Norway + * `OM` - Oman + * `PK` - Pakistan + * `PW` - Palau + * `PS` - Palestine, State of + * `PA` - Panama + * `PG` - Papua New Guinea + * `PY` - Paraguay + * `PE` - Peru + * `PH` - Philippines + * `PN` - Pitcairn + * `PL` - Poland + * `PT` - Portugal + * `PR` - Puerto Rico + * `QA` - Qatar + * `RE` - Réunion + * `RO` - Romania + * `RU` - Russia + * `RW` - Rwanda + * `BL` - Saint Barthélemy + * `SH` - Saint Helena, Ascension and Tristan da Cunha + * `KN` - Saint Kitts and Nevis + * `LC` - Saint Lucia + * `MF` - Saint Martin (French part) + * `PM` - Saint Pierre and Miquelon + * `VC` - Saint Vincent and the Grenadines + * `WS` - Samoa + * `SM` - San Marino + * `ST` - Sao Tome and Principe + * `SA` - Saudi Arabia + * `SN` - Senegal + * `RS` - Serbia + * `SC` - Seychelles + * `SL` - Sierra Leone + * `SG` - Singapore + * `SX` - Sint Maarten (Dutch part) + * `SK` - Slovakia + * `SI` - Slovenia + * `SB` - Solomon Islands + * `SO` - Somalia + * `ZA` - South Africa + * `GS` - South Georgia and the South Sandwich Islands + * `KR` - South Korea + * `SS` - South Sudan + * `ES` - Spain + * `LK` - Sri Lanka + * `SD` - Sudan + * `SR` - Suriname + * `SJ` - Svalbard and Jan Mayen + * `SE` - Sweden + * `CH` - Switzerland + * `SY` - Syria + * `TW` - Taiwan + * `TJ` - Tajikistan + * `TZ` - Tanzania + * `TH` - Thailand + * `TL` - Timor-Leste + * `TG` - Togo + * `TK` - Tokelau + * `TO` - Tonga + * `TT` - Trinidad and Tobago + * `TN` - Tunisia + * `TR` - Turkey + * `TM` - Turkmenistan + * `TC` - Turks and Caicos Islands + * `TV` - Tuvalu + * `UG` - Uganda + * `UA` - Ukraine + * `AE` - United Arab Emirates + * `GB` - United Kingdom + * `UM` - United States Minor Outlying Islands + * `US` - United States of America + * `UY` - Uruguay + * `UZ` - Uzbekistan + * `VU` - Vanuatu + * `VE` - Venezuela + * `VN` - Vietnam + * `VG` - Virgin Islands (British) + * `VI` - Virgin Islands (U.S.) + * `WF` - Wallis and Futuna + * `EH` - Western Sahara + * `YE` - Yemen + * `ZM` - Zambia + * `ZW` - Zimbabwe + zip_code: + type: optional + docs: The address's zip code. + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: accounting_v3.yml + AddressTypeEnum: + enum: + - BILLING + - SHIPPING + docs: |- + * `BILLING` - BILLING + * `SHIPPING` - SHIPPING + source: + openapi: accounting_v3.yml + AdvancedMetadata: + properties: + id: + type: string + validation: + format: uuid + display_name: optional + description: optional + is_required: optional + is_custom: optional + field_choices: optional> + source: + openapi: accounting_v3.yml + AsyncPassthroughReciept: + properties: + async_passthrough_receipt_id: + type: string + validation: + format: uuid + source: + openapi: accounting_v3.yml + AsyncPostTaskStatus: + discriminated: false + union: + - AsyncPostTaskStatusEnum + - string + source: + openapi: accounting_v3.yml + inline: true + AsyncPostTask: + properties: + status: AsyncPostTaskStatus + result: AsyncPostTaskResult + source: + openapi: accounting_v3.yml + AsyncPostTaskResult: + properties: + status_code: optional + response: optional> + source: + openapi: accounting_v3.yml + AsyncPostTaskStatusEnum: + enum: + - QUEUED + - IN_PROGRESS + - COMPLETED + - FAILURE + docs: |- + * `QUEUED` - QUEUED + * `IN_PROGRESS` - IN_PROGRESS + * `COMPLETED` - COMPLETED + * `FAILURE` - FAILURE + source: + openapi: accounting_v3.yml + AuditLogEventRole: + discriminated: false + docs: >- + Designates the role of the user (or SYSTEM/API if action not taken by a + user) at the time of this Event occurring. + + + * `ADMIN` - ADMIN + + * `DEVELOPER` - DEVELOPER + + * `MEMBER` - MEMBER + + * `API` - API + + * `SYSTEM` - SYSTEM + + * `MERGE_TEAM` - MERGE_TEAM + union: + - RoleEnum + - string + source: + openapi: accounting_v3.yml + inline: true + AuditLogEventEventType: + discriminated: false + docs: >- + Designates the type of event that occurred. + + + * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + + * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + + * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + + * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + + * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + + * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + + * `INVITED_USER` - INVITED_USER + + * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + + * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + + * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + + * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - + DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + + * `CREATED_DESTINATION` - CREATED_DESTINATION + + * `DELETED_DESTINATION` - DELETED_DESTINATION + + * `CHANGED_DESTINATION` - CHANGED_DESTINATION + + * `CHANGED_SCOPES` - CHANGED_SCOPES + + * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + + * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + + * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + + * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + + * `ENABLED_CATEGORY` - ENABLED_CATEGORY + + * `DISABLED_CATEGORY` - DISABLED_CATEGORY + + * `CHANGED_PASSWORD` - CHANGED_PASSWORD + + * `RESET_PASSWORD` - RESET_PASSWORD + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - + CREATED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - + CREATED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - + CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - + CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + + * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - + DELETED_INTEGRATION_WIDE_FIELD_MAPPING + + * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - + DELETED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + + * `MUTED_ISSUE` - MUTED_ISSUE + + * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + + * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + + * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + + * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + + * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + union: + - EventTypeEnum + - string + source: + openapi: accounting_v3.yml + inline: true + AuditLogEvent: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + user_name: + type: optional + docs: The User's full name at the time of this Event occurring. + validation: + maxLength: 200 + user_email: + type: optional + docs: The User's email at the time of this Event occurring. + validation: + format: email + maxLength: 254 + role: + type: AuditLogEventRole + docs: >- + Designates the role of the user (or SYSTEM/API if action not taken by + a user) at the time of this Event occurring. + + + * `ADMIN` - ADMIN + + * `DEVELOPER` - DEVELOPER + + * `MEMBER` - MEMBER + + * `API` - API + + * `SYSTEM` - SYSTEM + + * `MERGE_TEAM` - MERGE_TEAM + ip_address: + type: string + validation: + maxLength: 45 + event_type: + type: AuditLogEventEventType + docs: >- + Designates the type of event that occurred. + + + * `CREATED_REMOTE_PRODUCTION_API_KEY` - + CREATED_REMOTE_PRODUCTION_API_KEY + + * `DELETED_REMOTE_PRODUCTION_API_KEY` - + DELETED_REMOTE_PRODUCTION_API_KEY + + * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + + * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + + * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + + * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + + * `INVITED_USER` - INVITED_USER + + * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + + * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + + * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + + * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - + DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + + * `CREATED_DESTINATION` - CREATED_DESTINATION + + * `DELETED_DESTINATION` - DELETED_DESTINATION + + * `CHANGED_DESTINATION` - CHANGED_DESTINATION + + * `CHANGED_SCOPES` - CHANGED_SCOPES + + * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + + * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + + * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + + * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + + * `ENABLED_CATEGORY` - ENABLED_CATEGORY + + * `DISABLED_CATEGORY` - DISABLED_CATEGORY + + * `CHANGED_PASSWORD` - CHANGED_PASSWORD + + * `RESET_PASSWORD` - RESET_PASSWORD + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - + CREATED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - + CREATED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - + CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - + CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + + * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - + DELETED_INTEGRATION_WIDE_FIELD_MAPPING + + * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - + DELETED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + + * `MUTED_ISSUE` - MUTED_ISSUE + + * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + + * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + + * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + + * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + + * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + event_description: string + created_at: + type: optional + access: read-only + source: + openapi: accounting_v3.yml + AvailableActions: + docs: >- + # The AvailableActions Object + + ### Description + + The `Activity` object is used to see all available model/operation + combinations for an integration. + + + ### Usage Example + + Fetch all the actions available for the `Zenefits` integration. + properties: + integration: AccountIntegration + passthrough_available: boolean + available_model_operations: optional> + source: + openapi: accounting_v3.yml + BalanceSheetCurrency: + discriminated: false + docs: >- + The balance sheet's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + union: + - TransactionCurrencyEnum + - string + source: + openapi: accounting_v3.yml + inline: true + BalanceSheetCompany: + discriminated: false + docs: '`Company` object for the given `BalanceSheet` object.' + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: accounting_v3.yml + inline: true + BalanceSheet: + docs: >- + # The BalanceSheet Object + + ### Description + + The `BalanceSheet` object shows a company’s assets, liabilities, and + equity. Assets should be equal to liability and equity combined. This + shows the company’s financial health at a specific point in time. + + + ### Usage Example + + Fetch from the `LIST BalanceSheets` endpoint and view a company's balance + sheets. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The balance sheet's name. + currency: + type: optional + docs: >- + The balance sheet's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + company: + type: optional + docs: '`Company` object for the given `BalanceSheet` object.' + date: + type: optional + docs: >- + The balance sheet's date. The balance sheet data will reflect the + company's financial position this point in time. + net_assets: + type: optional + docs: The balance sheet's net assets. + assets: + type: optional> + access: read-only + liabilities: + type: optional> + access: read-only + equity: + type: optional> + access: read-only + remote_generated_at: + type: optional + docs: The time that balance sheet was generated by the accounting system. + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: accounting_v3.yml + BankFeedAccountCurrency: + discriminated: false + docs: >- + The currency code of the bank feed. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + union: + - TransactionCurrencyEnum + - string + source: + openapi: accounting_v3.yml + inline: true + BankFeedAccountFeedStatus: + discriminated: false + docs: |- + The status of the bank feed. + + * `ACTIVE` - ACTIVE + * `INACTIVE` - INACTIVE + union: + - FeedStatusEnum + - string + source: + openapi: accounting_v3.yml + inline: true + BankFeedAccountAccountType: + discriminated: false + docs: |- + The type of the account. + + * `BANK` - BANK + * `CREDIT_CARD` - CREDIT_CARD + union: + - BankFeedAccountAccountTypeEnum + - string + source: + openapi: accounting_v3.yml + inline: true + BankFeedAccount: + docs: >- + # The BankFeedAccount Object + + ### Description + + The `BankFeedAccount` object represents a bank feed account, detailing + various attributes including account identifiers, names, currency, and + balance information. This object is central to managing and tracking bank + feed accounts within the system. + + + ### Usage Example + + Fetch from the `GET BankFeedAccount` endpoint to view details of a bank + feed account. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + source_account_id: + type: optional + docs: >- + The unique identifier of the source account from our customer’s + platform. + validation: + maxLength: 1024 + target_account_id: + type: optional + docs: >- + The unique identifier of the target account from the third party + software. + validation: + maxLength: 1024 + source_account_name: + type: optional + docs: The name of the source account as stored in our customer’s platform. + validation: + maxLength: 1024 + source_account_number: + type: optional + docs: >- + The human-readable account number of the source account as stored in + our customer’s platform. + validation: + maxLength: 1024 + target_account_name: + type: optional + docs: The name of the target account from the third party software. + validation: + maxLength: 1024 + currency: + type: optional + docs: >- + The currency code of the bank feed. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + feed_status: + type: optional + docs: |- + The status of the bank feed. + + * `ACTIVE` - ACTIVE + * `INACTIVE` - INACTIVE + feed_start_date: + type: optional + docs: The start date of the bank feed’s transactions. + source_account_balance: + type: optional + docs: The current balance of funds in the source account. + account_type: + type: optional + docs: |- + The type of the account. + + * `BANK` - BANK + * `CREDIT_CARD` - CREDIT_CARD + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: optional> + access: read-only + remote_data: optional>>> + source: + openapi: accounting_v3.yml + BankFeedAccountAccountTypeEnum: + enum: + - BANK + - CREDIT_CARD + docs: |- + * `BANK` - BANK + * `CREDIT_CARD` - CREDIT_CARD + source: + openapi: accounting_v3.yml + BankFeedAccountRequestCurrency: + discriminated: false + docs: >- + The currency code of the bank feed. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + union: + - TransactionCurrencyEnum + - string + source: + openapi: accounting_v3.yml + inline: true + BankFeedAccountRequestFeedStatus: + discriminated: false + docs: |- + The status of the bank feed. + + * `ACTIVE` - ACTIVE + * `INACTIVE` - INACTIVE + union: + - FeedStatusEnum + - string + source: + openapi: accounting_v3.yml + inline: true + BankFeedAccountRequestAccountType: + discriminated: false + docs: |- + The type of the account. + + * `BANK` - BANK + * `CREDIT_CARD` - CREDIT_CARD + union: + - BankFeedAccountAccountTypeEnum + - string + source: + openapi: accounting_v3.yml + inline: true + BankFeedAccountRequest: + docs: >- + # The BankFeedAccount Object + + ### Description + + The `BankFeedAccount` object represents a bank feed account, detailing + various attributes including account identifiers, names, currency, and + balance information. This object is central to managing and tracking bank + feed accounts within the system. + + + ### Usage Example + + Fetch from the `GET BankFeedAccount` endpoint to view details of a bank + feed account. + properties: + source_account_id: + type: optional + docs: >- + The unique identifier of the source account from our customer’s + platform. + validation: + maxLength: 1024 + target_account_id: + type: optional + docs: >- + The unique identifier of the target account from the third party + software. + validation: + maxLength: 1024 + source_account_name: + type: optional + docs: The name of the source account as stored in our customer’s platform. + validation: + maxLength: 1024 + source_account_number: + type: optional + docs: >- + The human-readable account number of the source account as stored in + our customer’s platform. + validation: + maxLength: 1024 + target_account_name: + type: optional + docs: The name of the target account from the third party software. + validation: + maxLength: 1024 + currency: + type: optional + docs: >- + The currency code of the bank feed. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + feed_status: + type: optional + docs: |- + The status of the bank feed. + + * `ACTIVE` - ACTIVE + * `INACTIVE` - INACTIVE + feed_start_date: + type: optional + docs: The start date of the bank feed’s transactions. + source_account_balance: + type: optional + docs: The current balance of funds in the source account. + account_type: + type: optional + docs: |- + The type of the account. + + * `BANK` - BANK + * `CREDIT_CARD` - CREDIT_CARD + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: accounting_v3.yml + BankFeedAccountResponse: + properties: + model: BankFeedAccount + warnings: list + errors: list + logs: optional> + source: + openapi: accounting_v3.yml + BankFeedTransactionBankFeedAccount: + discriminated: false + docs: The bank feed account associated with the transaction. + union: + - type: string + validation: + format: uuid + - BankFeedAccount + source: + openapi: accounting_v3.yml + inline: true + BankFeedTransactionCreditOrDebit: + discriminated: false + docs: |- + If the transaction is of type debit or credit. + + * `CREDIT` - CREDIT + * `DEBIT` - DEBIT + union: + - CreditOrDebitEnum + - string + source: + openapi: accounting_v3.yml + inline: true + BankFeedTransaction: + docs: >- + # The BankFeedTransaction Object + + ### Description + + The `BankFeedTransaction` object is used to represent transactions linked + to a bank feed account. This includes details about the transaction such + as the date, amount, description, and type. + + + ### Usage Example + + Fetch from the `GET BankFeedTransaction` endpoint to view details of a + transaction associated with a bank feed account. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + bank_feed_account: + type: optional + docs: The bank feed account associated with the transaction. + transaction_date: + type: optional + docs: The date that the transaction occurred. + posted_date: + type: optional + docs: The date the transaction was posted to the bank account. + amount: + type: optional + docs: The amount of the transaction. + description: + type: optional + docs: The description of the transaction. + validation: + maxLength: 1024 + transaction_type: + type: optional + docs: The underlying type of the transaction. + validation: + maxLength: 1024 + payee: + type: optional + docs: >- + The person or merchant who initiated the transaction, or + alternatively, to whom the transaction was paid. + validation: + maxLength: 1024 + credit_or_debit: + type: optional + docs: |- + If the transaction is of type debit or credit. + + * `CREDIT` - CREDIT + * `DEBIT` - DEBIT + source_transaction_id: + type: optional + docs: The customer’s identifier for the transaction. + validation: + maxLength: 1024 + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + is_processed: + type: optional + docs: >- + Whether or not this transaction has been processed by the external + system. For example, NetSuite writes this field as True when the + SuiteApp has processed the transaction. + access: read-only + source: + openapi: accounting_v3.yml + BankFeedTransactionRequestRequestBankFeedAccount: + discriminated: false + docs: The bank feed account associated with the transaction. + union: + - type: string + validation: + format: uuid + - BankFeedAccount + source: + openapi: accounting_v3.yml + inline: true + BankFeedTransactionRequestRequestCreditOrDebit: + discriminated: false + docs: |- + If the transaction is of type debit or credit. + + * `CREDIT` - CREDIT + * `DEBIT` - DEBIT + union: + - CreditOrDebitEnum + - string + source: + openapi: accounting_v3.yml + inline: true + BankFeedTransactionRequestRequest: + docs: >- + # The BankFeedTransaction Object + + ### Description + + The `BankFeedTransaction` object is used to represent transactions linked + to a bank feed account. This includes details about the transaction such + as the date, amount, description, and type. + + + ### Usage Example + + Fetch from the `GET BankFeedTransaction` endpoint to view details of a + transaction associated with a bank feed account. + properties: + bank_feed_account: + type: optional + docs: The bank feed account associated with the transaction. + transaction_date: + type: optional + docs: The date that the transaction occurred. + posted_date: + type: optional + docs: The date the transaction was posted to the bank account. + amount: + type: optional + docs: The amount of the transaction. + description: + type: optional + docs: The description of the transaction. + validation: + maxLength: 1024 + transaction_type: + type: optional + docs: The underlying type of the transaction. + validation: + maxLength: 1024 + payee: + type: optional + docs: >- + The person or merchant who initiated the transaction, or + alternatively, to whom the transaction was paid. + validation: + maxLength: 1024 + credit_or_debit: + type: optional + docs: |- + If the transaction is of type debit or credit. + + * `CREDIT` - CREDIT + * `DEBIT` - DEBIT + source_transaction_id: + type: optional + docs: The customer’s identifier for the transaction. + validation: + maxLength: 1024 + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: accounting_v3.yml + BankFeedTransactionResponse: + properties: + model: BankFeedTransaction + warnings: list + errors: list + logs: optional> + source: + openapi: accounting_v3.yml + CashFlowStatementCurrency: + discriminated: false + docs: >- + The cash flow statement's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + union: + - TransactionCurrencyEnum + - string + source: + openapi: accounting_v3.yml + inline: true + CashFlowStatementCompany: + discriminated: false + docs: The company the cash flow statement belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: accounting_v3.yml + inline: true + CashFlowStatement: + docs: >- + # The CashFlowStatement Object + + ### Description + + The `CashFlowStatement` object shows operating activities, investing + activities, and financing activities over a period of time (month, + quarter, or year). + + + ### Usage Example + + Fetch from the `LIST CashFlowStatements` endpoint and view a company's + cash flow statements. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The cash flow statement's name. + currency: + type: optional + docs: >- + The cash flow statement's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + company: + type: optional + docs: The company the cash flow statement belongs to. + start_period: + type: optional + docs: The cash flow statement's start period. + end_period: + type: optional + docs: The cash flow statement's end period. + cash_at_beginning_of_period: + type: optional + docs: >- + Cash and cash equivalents at the beginning of the cash flow + statement's period. + cash_at_end_of_period: + type: optional + docs: >- + Cash and cash equivalents at the beginning of the cash flow + statement's period. + operating_activities: + type: optional> + access: read-only + investing_activities: + type: optional> + access: read-only + financing_activities: + type: optional> + access: read-only + remote_generated_at: + type: optional + docs: >- + The time that cash flow statement was generated by the accounting + system. + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: accounting_v3.yml + CategoriesEnum: + enum: + - hris + - ats + - accounting + - ticketing + - crm + - mktg + - filestorage + docs: |- + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + source: + openapi: accounting_v3.yml + CategoryEnum: + enum: + - hris + - ats + - accounting + - ticketing + - crm + - mktg + - filestorage + docs: |- + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + source: + openapi: accounting_v3.yml + CategoryTypeEnum: + enum: + - CLASS + - DEPARTMENT + docs: |- + * `CLASS` - CLASS + * `DEPARTMENT` - DEPARTMENT + source: + openapi: accounting_v3.yml + ClassificationEnum: + enum: + - ASSET + - EQUITY + - EXPENSE + - LIABILITY + - REVENUE + docs: |- + * `ASSET` - ASSET + * `EQUITY` - EQUITY + * `EXPENSE` - EXPENSE + * `LIABILITY` - LIABILITY + * `REVENUE` - REVENUE + source: + openapi: accounting_v3.yml + CommonModelScopeApi: + properties: + common_models: + docs: The common models you want to update the scopes for + type: list + source: + openapi: accounting_v3.yml + CommonModelScopesBodyRequest: + properties: + model_id: + type: string + validation: + minLength: 1 + enabled_actions: list + disabled_fields: list + source: + openapi: accounting_v3.yml + CompanyInfo: + docs: >- + # The CompanyInfo Object + + ### Description + + The `CompanyInfo` object contains information about the company of the + linked account. If the company has multiple entities (also known as + subsidiaries), each entity may show up as a single `CompanyInfo` record. + + + ### Usage Example + + Fetch from the `GET CompanyInfo` endpoint and view a company's + information. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The company's name. + legal_name: + type: optional + docs: The company's legal name. + tax_number: + type: optional + docs: The company's tax number. + fiscal_year_end_month: + type: optional + docs: The company's fiscal year end month. + validation: + min: 1 + max: 12 + fiscal_year_end_day: + type: optional + docs: The company's fiscal year end day. + validation: + min: 1 + max: 31 + currency: optional + remote_created_at: + type: optional + docs: When the third party's company was created. + urls: + type: optional>> + docs: The company's urls. + addresses: optional> + phone_numbers: optional> + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: accounting_v3.yml + ComponentTypeEnum: + enum: + - SALES + - PURCHASE + docs: |- + * `SALES` - SALES + * `PURCHASE` - PURCHASE + source: + openapi: accounting_v3.yml + ContactStatus: + discriminated: false + docs: |- + The contact's status + + * `ACTIVE` - ACTIVE + * `ARCHIVED` - ARCHIVED + union: + - Status7D1Enum + - string + source: + openapi: accounting_v3.yml + inline: true + ContactAddressesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Address + source: + openapi: accounting_v3.yml + inline: true + Contact: + docs: >- + # The Contact Object + + ### Description + + A `Contact` is an individual or business entity to which products and + services are sold to or purchased from. The `Contact` model contains both + Customers, in which products and services are sold to, and Vendors (or + Suppliers), in which products and services are purchased from. + + * A `Contact` is a Vendor/Supplier if the `is_supplier` property is true. + + * A `Contact` is a customer if the `is_customer` property is true. + + + ### Usage Example + + Fetch from the `LIST Contacts` endpoint and view a company's contacts. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The contact's name. + is_supplier: + type: optional + docs: Whether the contact is a supplier. + is_customer: + type: optional + docs: Whether the contact is a customer. + email_address: + type: optional + docs: The contact's email address. + tax_number: + type: optional + docs: The contact's tax number. + status: + type: optional + docs: |- + The contact's status + + * `ACTIVE` - ACTIVE + * `ARCHIVED` - ARCHIVED + currency: + type: optional + docs: The currency the contact's transactions are in. + remote_updated_at: + type: optional + docs: When the third party's contact was updated. + company: + type: optional + docs: The company the contact belongs to. + validation: + format: uuid + addresses: + type: optional>> + docs: '`Address` object IDs for the given `Contacts` object.' + phone_numbers: + type: optional> + docs: '`AccountingPhoneNumber` object for the given `Contacts` object.' + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + remote_fields: + type: optional> + access: read-only + source: + openapi: accounting_v3.yml + ContactRequestStatus: + discriminated: false + docs: |- + The contact's status + + * `ACTIVE` - ACTIVE + * `ARCHIVED` - ARCHIVED + union: + - Status7D1Enum + - string + source: + openapi: accounting_v3.yml + inline: true + ContactRequestAddressesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Address + source: + openapi: accounting_v3.yml + inline: true + ContactRequest: + docs: >- + # The Contact Object + + ### Description + + A `Contact` is an individual or business entity to which products and + services are sold to or purchased from. The `Contact` model contains both + Customers, in which products and services are sold to, and Vendors (or + Suppliers), in which products and services are purchased from. + + * A `Contact` is a Vendor/Supplier if the `is_supplier` property is true. + + * A `Contact` is a customer if the `is_customer` property is true. + + + ### Usage Example + + Fetch from the `LIST Contacts` endpoint and view a company's contacts. + properties: + name: + type: optional + docs: The contact's name. + is_supplier: + type: optional + docs: Whether the contact is a supplier. + is_customer: + type: optional + docs: Whether the contact is a customer. + email_address: + type: optional + docs: The contact's email address. + tax_number: + type: optional + docs: The contact's tax number. + status: + type: optional + docs: |- + The contact's status + + * `ACTIVE` - ACTIVE + * `ARCHIVED` - ARCHIVED + currency: + type: optional + docs: The currency the contact's transactions are in. + company: + type: optional + docs: The company the contact belongs to. + validation: + format: uuid + addresses: + type: optional>> + docs: '`Address` object IDs for the given `Contacts` object.' + phone_numbers: + type: optional> + docs: '`AccountingPhoneNumber` object for the given `Contacts` object.' + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: accounting_v3.yml + ContactResponse: + properties: + model: Contact + warnings: list + errors: list + logs: optional> + source: + openapi: accounting_v3.yml + CountryEnum: + enum: + - AF + - AX + - AL + - DZ + - AS + - AD + - AO + - AI + - AQ + - AG + - AR + - AM + - AW + - AU + - AT + - AZ + - BS + - BH + - BD + - BB + - BY + - BE + - BZ + - BJ + - BM + - BT + - BO + - BQ + - BA + - BW + - BV + - BR + - IO + - BN + - BG + - BF + - BI + - CV + - KH + - CM + - CA + - KY + - CF + - TD + - CL + - CN + - CX + - CC + - CO + - KM + - CG + - CD + - CK + - CR + - CI + - HR + - CU + - CW + - CY + - CZ + - DK + - DJ + - DM + - DO + - EC + - EG + - SV + - GQ + - ER + - EE + - SZ + - ET + - FK + - FO + - FJ + - FI + - FR + - GF + - PF + - TF + - GA + - GM + - GE + - DE + - GH + - GI + - GR + - GL + - GD + - GP + - GU + - GT + - GG + - GN + - GW + - GY + - HT + - HM + - VA + - HN + - HK + - HU + - IS + - IN + - ID + - IR + - IQ + - IE + - IM + - IL + - IT + - JM + - JP + - JE + - JO + - KZ + - KE + - KI + - KW + - KG + - LA + - LV + - LB + - LS + - LR + - LY + - LI + - LT + - LU + - MO + - MG + - MW + - MY + - MV + - ML + - MT + - MH + - MQ + - MR + - MU + - YT + - MX + - FM + - MD + - MC + - MN + - ME + - MS + - MA + - MZ + - MM + - NA + - NR + - NP + - NL + - NC + - NZ + - NI + - NE + - NG + - NU + - NF + - KP + - MK + - MP + - 'NO' + - OM + - PK + - PW + - PS + - PA + - PG + - PY + - PE + - PH + - PN + - PL + - PT + - PR + - QA + - RE + - RO + - RU + - RW + - BL + - SH + - KN + - LC + - MF + - PM + - VC + - WS + - SM + - ST + - SA + - SN + - RS + - SC + - SL + - SG + - SX + - SK + - SI + - SB + - SO + - ZA + - GS + - KR + - SS + - ES + - LK + - SD + - SR + - SJ + - SE + - CH + - SY + - TW + - TJ + - TZ + - TH + - TL + - TG + - TK + - TO + - TT + - TN + - TR + - TM + - TC + - TV + - UG + - UA + - AE + - GB + - UM + - US + - UY + - UZ + - VU + - VE + - VN + - VG + - VI + - WF + - EH + - YE + - ZM + - ZW + docs: |- + * `AF` - Afghanistan + * `AX` - Åland Islands + * `AL` - Albania + * `DZ` - Algeria + * `AS` - American Samoa + * `AD` - Andorra + * `AO` - Angola + * `AI` - Anguilla + * `AQ` - Antarctica + * `AG` - Antigua and Barbuda + * `AR` - Argentina + * `AM` - Armenia + * `AW` - Aruba + * `AU` - Australia + * `AT` - Austria + * `AZ` - Azerbaijan + * `BS` - Bahamas + * `BH` - Bahrain + * `BD` - Bangladesh + * `BB` - Barbados + * `BY` - Belarus + * `BE` - Belgium + * `BZ` - Belize + * `BJ` - Benin + * `BM` - Bermuda + * `BT` - Bhutan + * `BO` - Bolivia + * `BQ` - Bonaire, Sint Eustatius and Saba + * `BA` - Bosnia and Herzegovina + * `BW` - Botswana + * `BV` - Bouvet Island + * `BR` - Brazil + * `IO` - British Indian Ocean Territory + * `BN` - Brunei + * `BG` - Bulgaria + * `BF` - Burkina Faso + * `BI` - Burundi + * `CV` - Cabo Verde + * `KH` - Cambodia + * `CM` - Cameroon + * `CA` - Canada + * `KY` - Cayman Islands + * `CF` - Central African Republic + * `TD` - Chad + * `CL` - Chile + * `CN` - China + * `CX` - Christmas Island + * `CC` - Cocos (Keeling) Islands + * `CO` - Colombia + * `KM` - Comoros + * `CG` - Congo + * `CD` - Congo (the Democratic Republic of the) + * `CK` - Cook Islands + * `CR` - Costa Rica + * `CI` - Côte d'Ivoire + * `HR` - Croatia + * `CU` - Cuba + * `CW` - Curaçao + * `CY` - Cyprus + * `CZ` - Czechia + * `DK` - Denmark + * `DJ` - Djibouti + * `DM` - Dominica + * `DO` - Dominican Republic + * `EC` - Ecuador + * `EG` - Egypt + * `SV` - El Salvador + * `GQ` - Equatorial Guinea + * `ER` - Eritrea + * `EE` - Estonia + * `SZ` - Eswatini + * `ET` - Ethiopia + * `FK` - Falkland Islands (Malvinas) + * `FO` - Faroe Islands + * `FJ` - Fiji + * `FI` - Finland + * `FR` - France + * `GF` - French Guiana + * `PF` - French Polynesia + * `TF` - French Southern Territories + * `GA` - Gabon + * `GM` - Gambia + * `GE` - Georgia + * `DE` - Germany + * `GH` - Ghana + * `GI` - Gibraltar + * `GR` - Greece + * `GL` - Greenland + * `GD` - Grenada + * `GP` - Guadeloupe + * `GU` - Guam + * `GT` - Guatemala + * `GG` - Guernsey + * `GN` - Guinea + * `GW` - Guinea-Bissau + * `GY` - Guyana + * `HT` - Haiti + * `HM` - Heard Island and McDonald Islands + * `VA` - Holy See + * `HN` - Honduras + * `HK` - Hong Kong + * `HU` - Hungary + * `IS` - Iceland + * `IN` - India + * `ID` - Indonesia + * `IR` - Iran + * `IQ` - Iraq + * `IE` - Ireland + * `IM` - Isle of Man + * `IL` - Israel + * `IT` - Italy + * `JM` - Jamaica + * `JP` - Japan + * `JE` - Jersey + * `JO` - Jordan + * `KZ` - Kazakhstan + * `KE` - Kenya + * `KI` - Kiribati + * `KW` - Kuwait + * `KG` - Kyrgyzstan + * `LA` - Laos + * `LV` - Latvia + * `LB` - Lebanon + * `LS` - Lesotho + * `LR` - Liberia + * `LY` - Libya + * `LI` - Liechtenstein + * `LT` - Lithuania + * `LU` - Luxembourg + * `MO` - Macao + * `MG` - Madagascar + * `MW` - Malawi + * `MY` - Malaysia + * `MV` - Maldives + * `ML` - Mali + * `MT` - Malta + * `MH` - Marshall Islands + * `MQ` - Martinique + * `MR` - Mauritania + * `MU` - Mauritius + * `YT` - Mayotte + * `MX` - Mexico + * `FM` - Micronesia (Federated States of) + * `MD` - Moldova + * `MC` - Monaco + * `MN` - Mongolia + * `ME` - Montenegro + * `MS` - Montserrat + * `MA` - Morocco + * `MZ` - Mozambique + * `MM` - Myanmar + * `NA` - Namibia + * `NR` - Nauru + * `NP` - Nepal + * `NL` - Netherlands + * `NC` - New Caledonia + * `NZ` - New Zealand + * `NI` - Nicaragua + * `NE` - Niger + * `NG` - Nigeria + * `NU` - Niue + * `NF` - Norfolk Island + * `KP` - North Korea + * `MK` - North Macedonia + * `MP` - Northern Mariana Islands + * `NO` - Norway + * `OM` - Oman + * `PK` - Pakistan + * `PW` - Palau + * `PS` - Palestine, State of + * `PA` - Panama + * `PG` - Papua New Guinea + * `PY` - Paraguay + * `PE` - Peru + * `PH` - Philippines + * `PN` - Pitcairn + * `PL` - Poland + * `PT` - Portugal + * `PR` - Puerto Rico + * `QA` - Qatar + * `RE` - Réunion + * `RO` - Romania + * `RU` - Russia + * `RW` - Rwanda + * `BL` - Saint Barthélemy + * `SH` - Saint Helena, Ascension and Tristan da Cunha + * `KN` - Saint Kitts and Nevis + * `LC` - Saint Lucia + * `MF` - Saint Martin (French part) + * `PM` - Saint Pierre and Miquelon + * `VC` - Saint Vincent and the Grenadines + * `WS` - Samoa + * `SM` - San Marino + * `ST` - Sao Tome and Principe + * `SA` - Saudi Arabia + * `SN` - Senegal + * `RS` - Serbia + * `SC` - Seychelles + * `SL` - Sierra Leone + * `SG` - Singapore + * `SX` - Sint Maarten (Dutch part) + * `SK` - Slovakia + * `SI` - Slovenia + * `SB` - Solomon Islands + * `SO` - Somalia + * `ZA` - South Africa + * `GS` - South Georgia and the South Sandwich Islands + * `KR` - South Korea + * `SS` - South Sudan + * `ES` - Spain + * `LK` - Sri Lanka + * `SD` - Sudan + * `SR` - Suriname + * `SJ` - Svalbard and Jan Mayen + * `SE` - Sweden + * `CH` - Switzerland + * `SY` - Syria + * `TW` - Taiwan + * `TJ` - Tajikistan + * `TZ` - Tanzania + * `TH` - Thailand + * `TL` - Timor-Leste + * `TG` - Togo + * `TK` - Tokelau + * `TO` - Tonga + * `TT` - Trinidad and Tobago + * `TN` - Tunisia + * `TR` - Turkey + * `TM` - Turkmenistan + * `TC` - Turks and Caicos Islands + * `TV` - Tuvalu + * `UG` - Uganda + * `UA` - Ukraine + * `AE` - United Arab Emirates + * `GB` - United Kingdom + * `UM` - United States Minor Outlying Islands + * `US` - United States of America + * `UY` - Uruguay + * `UZ` - Uzbekistan + * `VU` - Vanuatu + * `VE` - Venezuela + * `VN` - Vietnam + * `VG` - Virgin Islands (British) + * `VI` - Virgin Islands (U.S.) + * `WF` - Wallis and Futuna + * `EH` - Western Sahara + * `YE` - Yemen + * `ZM` - Zambia + * `ZW` - Zimbabwe + source: + openapi: accounting_v3.yml + CreditNoteStatus: + discriminated: false + docs: |- + The credit note's status. + + * `SUBMITTED` - SUBMITTED + * `AUTHORIZED` - AUTHORIZED + * `PAID` - PAID + union: + - CreditNoteStatusEnum + - string + source: + openapi: accounting_v3.yml + inline: true + CreditNoteContact: + discriminated: false + docs: The credit note's contact. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: accounting_v3.yml + inline: true + CreditNoteCompany: + discriminated: false + docs: The company the credit note belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: accounting_v3.yml + inline: true + CreditNoteTrackingCategoriesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: accounting_v3.yml + inline: true + CreditNoteCurrency: + discriminated: false + docs: >- + The credit note's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + union: + - TransactionCurrencyEnum + - string + source: + openapi: accounting_v3.yml + inline: true + CreditNotePaymentsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Payment + source: + openapi: accounting_v3.yml + inline: true + CreditNoteAppliedPaymentsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - PaymentLineItem + source: + openapi: accounting_v3.yml + inline: true + CreditNoteAccountingPeriod: + discriminated: false + docs: The accounting period that the CreditNote was generated in. + union: + - type: string + validation: + format: uuid + - AccountingPeriod + source: + openapi: accounting_v3.yml + inline: true + CreditNote: + docs: >- + # The CreditNote Object + + ### Description + + A `CreditNote` is transaction issued to a customer, indicating a reduction + or cancellation of the amount owed by the customer. It is most generally + used as an adjustment note used to rectify errors, returns, or + overpayments related to a sales transaction. A `CreditNote` can be applied + to *Accounts Receivable* Invoices to decrease the overall amount of the + Invoice. + + + ### Usage Example + + Fetch from the `LIST CreditNotes` endpoint and view a company's credit + notes. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + transaction_date: + type: optional + docs: The credit note's transaction date. + status: + type: optional + docs: |- + The credit note's status. + + * `SUBMITTED` - SUBMITTED + * `AUTHORIZED` - AUTHORIZED + * `PAID` - PAID + number: + type: optional + docs: The credit note's number. + contact: + type: optional + docs: The credit note's contact. + company: + type: optional + docs: The company the credit note belongs to. + exchange_rate: + type: optional + docs: The credit note's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + total_amount: + type: optional + docs: The credit note's total amount. + remaining_credit: + type: optional + docs: >- + The amount of value remaining in the credit note that the customer can + use. + inclusive_of_tax: + type: optional + docs: >- + If the transaction is inclusive or exclusive of tax. `True` if + inclusive, `False` if exclusive. + line_items: + type: optional> + access: read-only + tracking_categories: optional>> + currency: + type: optional + docs: >- + The credit note's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + remote_created_at: + type: optional + docs: When the third party's credit note was created. + remote_updated_at: + type: optional + docs: When the third party's credit note was updated. + payments: + type: optional>> + docs: Array of `Payment` object IDs + applied_payments: + type: optional>> + docs: >- + A list of the Payment Applied to Lines common models related to a + given Invoice, Credit Note, or Journal Entry. + accounting_period: + type: optional + docs: The accounting period that the CreditNote was generated in. + applied_to_lines: + type: optional> + docs: >- + A list of the CreditNote Applied to Lines common models related to a + given Credit Note + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: accounting_v3.yml + CreditNoteApplyLineForCreditNoteInvoice: + discriminated: false + union: + - type: string + validation: + format: uuid + - Invoice + source: + openapi: accounting_v3.yml + inline: true + CreditNoteApplyLineForCreditNote: + docs: >- + # The CreditNoteApplyLine Object + + ### Description + + The `CreditNoteApplyLine` is attached to the CreditNote model. + + + ### Usage Example + + Fetch from the `GET CreditNote` endpoint and view the invoice's applied to + lines. + properties: + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + invoice: optional + applied_date: + type: optional + docs: Date that the credit note is applied to the invoice. + applied_amount: + type: optional + docs: The amount of the Credit Note applied to the invoice. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + source: + openapi: accounting_v3.yml + CreditNoteApplyLineForCreditNoteRequestInvoice: + discriminated: false + union: + - type: string + validation: + format: uuid + - Invoice + source: + openapi: accounting_v3.yml + inline: true + CreditNoteApplyLineForCreditNoteRequest: + docs: >- + # The CreditNoteApplyLine Object + + ### Description + + The `CreditNoteApplyLine` is attached to the CreditNote model. + + + ### Usage Example + + Fetch from the `GET CreditNote` endpoint and view the invoice's applied to + lines. + properties: + remote_id: + type: optional + docs: The third-party API ID of the matching object. + invoice: optional + applied_date: + type: optional + docs: Date that the credit note is applied to the invoice. + applied_amount: + type: optional + docs: The amount of the Credit Note applied to the invoice. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: accounting_v3.yml + CreditNoteApplyLineForInvoiceCreditNote: + discriminated: false + union: + - type: string + validation: + format: uuid + - CreditNote + source: + openapi: accounting_v3.yml + inline: true + CreditNoteApplyLineForInvoice: + docs: >- + # The CreditNoteApplyLine Object + + ### Description + + The `CreditNoteApplyLine` is attached to the CreditNote model. + + + ### Usage Example + + Fetch from the `GET CreditNote` endpoint and view the invoice's applied to + lines. + properties: + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + credit_note: optional + applied_date: + type: optional + docs: Date that the credit note is applied to the invoice. + applied_amount: + type: optional + docs: The amount of the Credit Note applied to the invoice. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + source: + openapi: accounting_v3.yml + CreditNoteLineItemItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Item + source: + openapi: accounting_v3.yml + inline: true + CreditNoteLineItemCompany: + discriminated: false + docs: The company the credit note belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: accounting_v3.yml + inline: true + CreditNoteLineItemContact: + discriminated: false + docs: The credit note's contact. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: accounting_v3.yml + inline: true + CreditNoteLineItemProject: + discriminated: false + union: + - type: string + validation: + format: uuid + - Project + source: + openapi: accounting_v3.yml + inline: true + CreditNoteLineItem: + docs: >- + # The CreditNoteLineItem Object + + ### Description + + The `CreditNoteLineItem` object is used to represent a credit note's line + items. + + + ### Usage Example + + Fetch from the `GET CreditNote` endpoint and view the credit note's line + items. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + item: optional + name: + type: optional + docs: The credit note line item's name. + description: + type: optional + docs: The description of the item that is owed. + quantity: + type: optional + docs: The credit note line item's quantity. + validation: + pattern: ^-?\d{0,24}(?:\.\d{0,8})?$ + memo: + type: optional + docs: The credit note line item's memo. + unit_price: + type: optional + docs: The credit note line item's unit price. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + tax_rate: + type: optional + docs: The tax rate that applies to this line item. + validation: + format: uuid + total_line_amount: + type: optional + docs: The credit note line item's total. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + tracking_category: + type: optional + docs: The credit note line item's associated tracking category. + validation: + format: uuid + availability: deprecated + tracking_categories: + type: optional>> + docs: The credit note line item's associated tracking categories. + account: + type: optional + docs: The credit note line item's account. + validation: + format: uuid + company: + type: optional + docs: The company the credit note belongs to. + contact: + type: optional + docs: The credit note's contact. + project: optional + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + source: + openapi: accounting_v3.yml + CreditNoteLineItemRequestItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Item + source: + openapi: accounting_v3.yml + inline: true + CreditNoteLineItemRequestCompany: + discriminated: false + docs: The company the credit note belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: accounting_v3.yml + inline: true + CreditNoteLineItemRequestContact: + discriminated: false + docs: The credit note's contact. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: accounting_v3.yml + inline: true + CreditNoteLineItemRequestProject: + discriminated: false + union: + - type: string + validation: + format: uuid + - Project + source: + openapi: accounting_v3.yml + inline: true + CreditNoteLineItemRequest: + docs: >- + # The CreditNoteLineItem Object + + ### Description + + The `CreditNoteLineItem` object is used to represent a credit note's line + items. + + + ### Usage Example + + Fetch from the `GET CreditNote` endpoint and view the credit note's line + items. + properties: + remote_id: + type: optional + docs: The third-party API ID of the matching object. + item: optional + name: + type: optional + docs: The credit note line item's name. + description: + type: optional + docs: The description of the item that is owed. + quantity: + type: optional + docs: The credit note line item's quantity. + validation: + pattern: ^-?\d{0,24}(?:\.\d{0,8})?$ + memo: + type: optional + docs: The credit note line item's memo. + unit_price: + type: optional + docs: The credit note line item's unit price. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + tax_rate: + type: optional + docs: The tax rate that applies to this line item. + validation: + format: uuid + total_line_amount: + type: optional + docs: The credit note line item's total. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + tracking_category: + type: optional + docs: The credit note line item's associated tracking category. + validation: + format: uuid + availability: deprecated + tracking_categories: + type: optional>> + docs: The credit note line item's associated tracking categories. + account: + type: optional + docs: The credit note line item's account. + validation: + format: uuid + company: + type: optional + docs: The company the credit note belongs to. + contact: + type: optional + docs: The credit note's contact. + project: optional + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: accounting_v3.yml + CreditNoteRequestStatus: + discriminated: false + docs: |- + The credit note's status. + + * `SUBMITTED` - SUBMITTED + * `AUTHORIZED` - AUTHORIZED + * `PAID` - PAID + union: + - CreditNoteStatusEnum + - string + source: + openapi: accounting_v3.yml + inline: true + CreditNoteRequestContact: + discriminated: false + docs: The credit note's contact. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: accounting_v3.yml + inline: true + CreditNoteRequestCompany: + discriminated: false + docs: The company the credit note belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: accounting_v3.yml + inline: true + CreditNoteRequestLineItemsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - CreditNoteLineItemRequest + source: + openapi: accounting_v3.yml + inline: true + CreditNoteRequestTrackingCategoriesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: accounting_v3.yml + inline: true + CreditNoteRequestCurrency: + discriminated: false + docs: >- + The credit note's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + union: + - TransactionCurrencyEnum + - string + source: + openapi: accounting_v3.yml + inline: true + CreditNoteRequestPaymentsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Payment + source: + openapi: accounting_v3.yml + inline: true + CreditNoteRequestAppliedPaymentsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - PaymentLineItem + source: + openapi: accounting_v3.yml + inline: true + CreditNoteRequestAccountingPeriod: + discriminated: false + docs: The accounting period that the CreditNote was generated in. + union: + - type: string + validation: + format: uuid + - AccountingPeriod + source: + openapi: accounting_v3.yml + inline: true + CreditNoteRequest: + docs: >- + # The CreditNote Object + + ### Description + + A `CreditNote` is transaction issued to a customer, indicating a reduction + or cancellation of the amount owed by the customer. It is most generally + used as an adjustment note used to rectify errors, returns, or + overpayments related to a sales transaction. A `CreditNote` can be applied + to *Accounts Receivable* Invoices to decrease the overall amount of the + Invoice. + + + ### Usage Example + + Fetch from the `LIST CreditNotes` endpoint and view a company's credit + notes. + properties: + transaction_date: + type: optional + docs: The credit note's transaction date. + status: + type: optional + docs: |- + The credit note's status. + + * `SUBMITTED` - SUBMITTED + * `AUTHORIZED` - AUTHORIZED + * `PAID` - PAID + number: + type: optional + docs: The credit note's number. + contact: + type: optional + docs: The credit note's contact. + company: + type: optional + docs: The company the credit note belongs to. + exchange_rate: + type: optional + docs: The credit note's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + total_amount: + type: optional + docs: The credit note's total amount. + remaining_credit: + type: optional + docs: >- + The amount of value remaining in the credit note that the customer can + use. + inclusive_of_tax: + type: optional + docs: >- + If the transaction is inclusive or exclusive of tax. `True` if + inclusive, `False` if exclusive. + line_items: optional> + tracking_categories: optional>> + currency: + type: optional + docs: >- + The credit note's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + payments: + type: optional>> + docs: Array of `Payment` object IDs + applied_payments: + type: optional>> + docs: >- + A list of the Payment Applied to Lines common models related to a + given Invoice, Credit Note, or Journal Entry. + accounting_period: + type: optional + docs: The accounting period that the CreditNote was generated in. + applied_to_lines: + type: optional> + docs: >- + A list of the CreditNote Applied to Lines common models related to a + given Credit Note + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: accounting_v3.yml + CreditNoteResponse: + properties: + model: CreditNote + warnings: list + errors: list + logs: optional> + source: + openapi: accounting_v3.yml + CreditNoteStatusEnum: + enum: + - SUBMITTED + - AUTHORIZED + - PAID + docs: |- + * `SUBMITTED` - SUBMITTED + * `AUTHORIZED` - AUTHORIZED + * `PAID` - PAID + source: + openapi: accounting_v3.yml + CreditOrDebitEnum: + enum: + - CREDIT + - DEBIT + docs: |- + * `CREDIT` - CREDIT + * `DEBIT` - DEBIT + source: + openapi: accounting_v3.yml + DataPassthroughRequest: + docs: >- + # The DataPassthrough Object + + ### Description + + The `DataPassthrough` object is used to send information to an + otherwise-unsupported third-party endpoint. + + + ### Usage Example + + Create a `DataPassthrough` to get team hierarchies from your Rippling + integration. + properties: + method: MethodEnum + path: + type: string + docs: The path of the request in the third party's platform. + validation: + minLength: 1 + base_url_override: + type: optional + docs: An optional override of the third party's base url for the request. + validation: + minLength: 1 + data: + type: optional + docs: >- + The data with the request. You must include a `request_format` + parameter matching the data's format + validation: + minLength: 1 + multipart_form_data: + type: optional> + docs: >- + Pass an array of `MultipartFormField` objects in here instead of using + the `data` param if `request_format` is set to `MULTIPART`. + headers: + type: optional> + docs: >- + The headers to use for the request (Merge will handle the account's + authorization headers). `Content-Type` header is required for + passthrough. Choose content type corresponding to expected format of + receiving server. + request_format: optional + normalize_response: + type: optional + docs: >- + Optional. If true, the response will always be an object of the form + `{"type": T, "value": ...}` where `T` will be one of `string, boolean, + number, null, array, object`. + source: + openapi: accounting_v3.yml + DebugModeLog: + properties: + log_id: string + dashboard_view: string + log_summary: DebugModelLogSummary + source: + openapi: accounting_v3.yml + DebugModelLogSummary: + properties: + url: string + method: string + status_code: integer + source: + openapi: accounting_v3.yml + EmployeeCompany: + discriminated: false + docs: The subsidiary that the employee belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: accounting_v3.yml + inline: true + EmployeeStatus: + discriminated: false + docs: |- + The employee's status in the accounting system. + + * `ACTIVE` - ACTIVE + * `INACTIVE` - INACTIVE + union: + - Status895Enum + - string + source: + openapi: accounting_v3.yml + inline: true + Employee: + docs: >- + # The Employee Object + + ### Description + + An `Employee` is an individual who works for the company of the linked + account. The `Employee` model contains both contractors and full time + employees. + + * An `Employee` is a contractor if `is_contractor` property is `True` + + * An `Employee` is a full time employee if `is_contractor` property is + `False` + + + ### Usage Example + + Fetch from the `LIST Employees` endpoint and view a company's employees. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + first_name: + type: optional + docs: The employee's first name. + validation: + maxLength: 255 + last_name: + type: optional + docs: The employee's last name. + validation: + maxLength: 255 + is_contractor: + type: optional + docs: '`True` if the employee is a contractor, `False` if not.' + employee_number: + type: optional + docs: The employee's internal identification number. + validation: + maxLength: 50 + email_address: + type: optional + docs: The employee's email address. + company: + type: optional + docs: The subsidiary that the employee belongs to. + status: + type: EmployeeStatus + docs: |- + The employee's status in the accounting system. + + * `ACTIVE` - ACTIVE + * `INACTIVE` - INACTIVE + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: accounting_v3.yml + EnabledActionsEnum: + enum: + - READ + - WRITE + docs: |- + * `READ` - READ + * `WRITE` - WRITE + source: + openapi: accounting_v3.yml + EncodingEnum: + enum: + - RAW + - BASE64 + - GZIP_BASE64 + docs: |- + * `RAW` - RAW + * `BASE64` - BASE64 + * `GZIP_BASE64` - GZIP_BASE64 + source: + openapi: accounting_v3.yml + ErrorValidationProblem: + properties: + source: optional + title: string + detail: string + problem_type: string + source: + openapi: accounting_v3.yml + EventTypeEnum: + enum: + - 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 + docs: >- + * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + + * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + + * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + + * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + + * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + + * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + + * `INVITED_USER` - INVITED_USER + + * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + + * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + + * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + + * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - + DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + + * `CREATED_DESTINATION` - CREATED_DESTINATION + + * `DELETED_DESTINATION` - DELETED_DESTINATION + + * `CHANGED_DESTINATION` - CHANGED_DESTINATION + + * `CHANGED_SCOPES` - CHANGED_SCOPES + + * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + + * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + + * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + + * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + + * `ENABLED_CATEGORY` - ENABLED_CATEGORY + + * `DISABLED_CATEGORY` - DISABLED_CATEGORY + + * `CHANGED_PASSWORD` - CHANGED_PASSWORD + + * `RESET_PASSWORD` - RESET_PASSWORD + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - + CREATED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - + CREATED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - + CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - + CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + + * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - + DELETED_INTEGRATION_WIDE_FIELD_MAPPING + + * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - + DELETED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + + * `MUTED_ISSUE` - MUTED_ISSUE + + * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + + * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + + * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + + * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + + * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + source: + openapi: accounting_v3.yml + ExpenseAccount: + discriminated: false + docs: The expense's payment account. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: accounting_v3.yml + inline: true + ExpenseContact: + discriminated: false + docs: The expense's contact. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: accounting_v3.yml + inline: true + ExpenseCurrency: + discriminated: false + docs: >- + The expense's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + union: + - TransactionCurrencyEnum + - string + source: + openapi: accounting_v3.yml + inline: true + ExpenseCompany: + discriminated: false + docs: The company the expense belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: accounting_v3.yml + inline: true + ExpenseEmployee: + discriminated: false + docs: The employee this overall transaction relates to. + union: + - type: string + validation: + format: uuid + - Employee + source: + openapi: accounting_v3.yml + inline: true + ExpenseTrackingCategoriesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: accounting_v3.yml + inline: true + ExpenseAccountingPeriod: + discriminated: false + docs: The accounting period that the Expense was generated in. + union: + - type: string + validation: + format: uuid + - AccountingPeriod + source: + openapi: accounting_v3.yml + inline: true + Expense: + docs: >- + # The Expense Object + + ### Description + + The `Expense` object is used to represent a direct purchase by a business, + typically made with a check, credit card, or cash. Each `Expense` object + is dedicated to a grouping of expenses, with each expense recorded in the + lines object. + + + The `Expense` object is used also used to represent refunds to direct + purchases. Refunds can be distinguished from purchases by the amount sign + of the records. Expense objects with a negative amount are purchases and + `Expense` objects with a positive amount are refunds to those purchases. + + + ### Usage Example + + Fetch from the `GET Expense` endpoint and view a company's expense. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + transaction_date: + type: optional + docs: When the transaction occurred. + remote_created_at: + type: optional + docs: When the expense was created. + account: + type: optional + docs: The expense's payment account. + contact: + type: optional + docs: The expense's contact. + total_amount: + type: optional + docs: The expense's total amount. + sub_total: + type: optional + docs: The expense's total amount before tax. + total_tax_amount: + type: optional + docs: The expense's total tax amount. + currency: + type: optional + docs: >- + The expense's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + exchange_rate: + type: optional + docs: The expense's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + inclusive_of_tax: + type: optional + docs: >- + If the transaction is inclusive or exclusive of tax. `True` if + inclusive, `False` if exclusive. + company: + type: optional + docs: The company the expense belongs to. + employee: + type: optional + docs: The employee this overall transaction relates to. + memo: + type: optional + docs: The expense's private note. + lines: optional> + tracking_categories: optional>> + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + accounting_period: + type: optional + docs: The accounting period that the Expense was generated in. + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + remote_fields: + type: optional> + access: read-only + source: + openapi: accounting_v3.yml + ExpenseLineItem: + discriminated: false + docs: The line's item. + union: + - type: string + validation: + format: uuid + - Item + source: + openapi: accounting_v3.yml + inline: true + ExpenseLineTrackingCategory: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: accounting_v3.yml + inline: true + ExpenseLineTrackingCategoriesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: accounting_v3.yml + inline: true + ExpenseLineEmployee: + discriminated: false + docs: The employee this overall transaction relates to. + union: + - type: string + validation: + format: uuid + - Employee + source: + openapi: accounting_v3.yml + inline: true + ExpenseLineAccount: + discriminated: false + docs: The expense's payment account. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: accounting_v3.yml + inline: true + ExpenseLineContact: + discriminated: false + docs: The expense's contact. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: accounting_v3.yml + inline: true + ExpenseLineProject: + discriminated: false + union: + - type: string + validation: + format: uuid + - Project + source: + openapi: accounting_v3.yml + inline: true + ExpenseLine: + docs: |- + # The ExpenseLine Object + ### Description + The `ExpenseLine` object is used to represent an expense's line items. + + ### Usage Example + Fetch from the `GET Expense` endpoint and view the expense's line items. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + item: + type: optional + docs: The line's item. + net_amount: + type: optional + docs: The line's net amount. + tracking_category: + type: optional + availability: deprecated + tracking_categories: + type: optional>> + docs: The expense line item's associated tracking categories. + company: + type: optional + docs: The company the expense belongs to. + validation: + format: uuid + employee: + type: optional + docs: The employee this overall transaction relates to. + currency: + type: optional + docs: >- + The expense line item's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + account: + type: optional + docs: The expense's payment account. + contact: + type: optional + docs: The expense's contact. + project: optional + description: + type: optional + docs: The description of the item that was purchased by the company. + exchange_rate: + type: optional + docs: The expense line item's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + tax_rate: + type: optional + docs: The tax rate that applies to this line item. + validation: + format: uuid + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + source: + openapi: accounting_v3.yml + ExpenseLineRequestItem: + discriminated: false + docs: The line's item. + union: + - type: string + validation: + format: uuid + - Item + source: + openapi: accounting_v3.yml + inline: true + ExpenseLineRequestTrackingCategory: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: accounting_v3.yml + inline: true + ExpenseLineRequestTrackingCategoriesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: accounting_v3.yml + inline: true + ExpenseLineRequestEmployee: + discriminated: false + docs: The employee this overall transaction relates to. + union: + - type: string + validation: + format: uuid + - Employee + source: + openapi: accounting_v3.yml + inline: true + ExpenseLineRequestCurrency: + discriminated: false + docs: >- + The expense line item's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + union: + - TransactionCurrencyEnum + - string + source: + openapi: accounting_v3.yml + inline: true + ExpenseLineRequestAccount: + discriminated: false + docs: The expense's payment account. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: accounting_v3.yml + inline: true + ExpenseLineRequestContact: + discriminated: false + docs: The expense's contact. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: accounting_v3.yml + inline: true + ExpenseLineRequestProject: + discriminated: false + union: + - type: string + validation: + format: uuid + - Project + source: + openapi: accounting_v3.yml + inline: true + ExpenseLineRequest: + docs: |- + # The ExpenseLine Object + ### Description + The `ExpenseLine` object is used to represent an expense's line items. + + ### Usage Example + Fetch from the `GET Expense` endpoint and view the expense's line items. + properties: + remote_id: + type: optional + docs: The third-party API ID of the matching object. + item: + type: optional + docs: The line's item. + net_amount: + type: optional + docs: The line's net amount. + tracking_category: + type: optional + availability: deprecated + tracking_categories: + type: optional>> + docs: The expense line item's associated tracking categories. + company: + type: optional + docs: The company the expense belongs to. + validation: + format: uuid + employee: + type: optional + docs: The employee this overall transaction relates to. + currency: + type: optional + docs: >- + The expense line item's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + account: + type: optional + docs: The expense's payment account. + contact: + type: optional + docs: The expense's contact. + project: optional + description: + type: optional + docs: The description of the item that was purchased by the company. + exchange_rate: + type: optional + docs: The expense line item's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + tax_rate: + type: optional + docs: The tax rate that applies to this line item. + validation: + format: uuid + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: accounting_v3.yml + ExpenseRequestAccount: + discriminated: false + docs: The expense's payment account. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: accounting_v3.yml + inline: true + ExpenseRequestContact: + discriminated: false + docs: The expense's contact. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: accounting_v3.yml + inline: true + ExpenseRequestCompany: + discriminated: false + docs: The company the expense belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: accounting_v3.yml + inline: true + ExpenseRequestEmployee: + discriminated: false + docs: The employee this overall transaction relates to. + union: + - type: string + validation: + format: uuid + - Employee + source: + openapi: accounting_v3.yml + inline: true + ExpenseRequestTrackingCategoriesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: accounting_v3.yml + inline: true + ExpenseRequestAccountingPeriod: + discriminated: false + docs: The accounting period that the Expense was generated in. + union: + - type: string + validation: + format: uuid + - AccountingPeriod + source: + openapi: accounting_v3.yml + inline: true + ExpenseRequest: + docs: >- + # The Expense Object + + ### Description + + The `Expense` object is used to represent a direct purchase by a business, + typically made with a check, credit card, or cash. Each `Expense` object + is dedicated to a grouping of expenses, with each expense recorded in the + lines object. + + + The `Expense` object is used also used to represent refunds to direct + purchases. Refunds can be distinguished from purchases by the amount sign + of the records. Expense objects with a negative amount are purchases and + `Expense` objects with a positive amount are refunds to those purchases. + + + ### Usage Example + + Fetch from the `GET Expense` endpoint and view a company's expense. + properties: + transaction_date: + type: optional + docs: When the transaction occurred. + account: + type: optional + docs: The expense's payment account. + contact: + type: optional + docs: The expense's contact. + total_amount: + type: optional + docs: The expense's total amount. + sub_total: + type: optional + docs: The expense's total amount before tax. + total_tax_amount: + type: optional + docs: The expense's total tax amount. + currency: + type: optional + docs: >- + The expense's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + exchange_rate: + type: optional + docs: The expense's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + inclusive_of_tax: + type: optional + docs: >- + If the transaction is inclusive or exclusive of tax. `True` if + inclusive, `False` if exclusive. + company: + type: optional + docs: The company the expense belongs to. + employee: + type: optional + docs: The employee this overall transaction relates to. + memo: + type: optional + docs: The expense's private note. + lines: optional> + tracking_categories: optional>> + accounting_period: + type: optional + docs: The accounting period that the Expense was generated in. + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: accounting_v3.yml + ExpenseResponse: + properties: + model: Expense + warnings: list + errors: list + logs: optional> + source: + openapi: accounting_v3.yml + ExternalTargetFieldApi: + properties: + name: + type: optional + access: read-only + description: + type: optional + access: read-only + is_mapped: + type: optional + access: read-only + source: + openapi: accounting_v3.yml + ExternalTargetFieldApiResponse: + properties: + Account: optional> + AccountingAttachment: optional> + BalanceSheet: optional> + CashFlowStatement: optional> + CompanyInfo: optional> + Contact: optional> + IncomeStatement: optional> + CreditNote: optional> + Item: optional> + PurchaseOrder: optional> + TrackingCategory: optional> + JournalEntry: optional> + TaxRate: optional> + Invoice: optional> + Payment: optional> + Expense: optional> + VendorCredit: optional> + Transaction: optional> + AccountingPeriod: optional> + GeneralLedgerTransaction: optional> + BankFeedAccount: optional> + Employee: optional> + PaymentMethod: optional> + Project: optional> + PaymentTerm: optional> + source: + openapi: accounting_v3.yml + FeedStatusEnum: + enum: + - ACTIVE + - INACTIVE + docs: |- + * `ACTIVE` - ACTIVE + * `INACTIVE` - INACTIVE + source: + openapi: accounting_v3.yml + FieldFormatEnum: + enum: + - string + - number + - date + - datetime + - bool + - list + docs: |- + * `string` - string + * `number` - number + * `date` - date + * `datetime` - datetime + * `bool` - bool + * `list` - list + source: + openapi: accounting_v3.yml + FieldMappingApiInstanceTargetField: + properties: + name: string + description: string + is_organization_wide: boolean + source: + openapi: accounting_v3.yml + inline: true + FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo: + properties: + method: optional + url_path: optional + field_traversal_path: optional> + source: + openapi: accounting_v3.yml + inline: true + FieldMappingApiInstanceRemoteField: + properties: + remote_key_name: optional + schema: optional> + remote_endpoint_info: FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo + source: + openapi: accounting_v3.yml + inline: true + FieldMappingApiInstance: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + is_integration_wide: + type: optional + access: read-only + target_field: + type: optional + access: read-only + remote_field: + type: optional + access: read-only + source: + openapi: accounting_v3.yml + FieldMappingApiInstanceResponse: + properties: + Account: optional> + AccountingAttachment: optional> + BalanceSheet: optional> + CashFlowStatement: optional> + CompanyInfo: optional> + Contact: optional> + IncomeStatement: optional> + CreditNote: optional> + Item: optional> + PurchaseOrder: optional> + TrackingCategory: optional> + JournalEntry: optional> + TaxRate: optional> + Invoice: optional> + Payment: optional> + Expense: optional> + VendorCredit: optional> + Transaction: optional> + AccountingPeriod: optional> + GeneralLedgerTransaction: optional> + BankFeedAccount: optional> + Employee: optional> + PaymentMethod: optional> + Project: optional> + PaymentTerm: optional> + source: + openapi: accounting_v3.yml + FieldMappingInstanceResponse: + properties: + model: FieldMappingApiInstance + warnings: list + errors: list + logs: optional> + source: + openapi: accounting_v3.yml + FieldPermissionDeserializer: + properties: + enabled_fields: optional> + disabled_fields: optional> + source: + openapi: accounting_v3.yml + FieldPermissionDeserializerRequest: + properties: + enabled_fields: optional> + disabled_fields: optional> + source: + openapi: accounting_v3.yml + FieldTypeEnum: + enum: + - string + - number + - date + - datetime + - bool + - list + docs: |- + * `string` - string + * `number` - number + * `date` - date + * `datetime` - datetime + * `bool` - bool + * `list` - list + source: + openapi: accounting_v3.yml + GeneralLedgerTransactionUnderlyingTransactionType: + discriminated: false + docs: |- + The type of the underlying transaction. + + * `INVOICE` - INVOICE + * `EXPENSE` - EXPENSE + * `TRANSACTION` - TRANSACTION + * `JOURNAL_ENTRY` - JOURNAL_ENTRY + * `PAYMENT` - PAYMENT + * `VENDOR_CREDIT` - VENDOR_CREDIT + * `CREDIT_NOTE` - CREDIT_NOTE + union: + - UnderlyingTransactionTypeEnum + - string + source: + openapi: accounting_v3.yml + inline: true + GeneralLedgerTransactionAccountingPeriod: + discriminated: false + docs: The accounting period that the GeneralLedgerTransaction was generated in. + union: + - type: string + validation: + format: uuid + - AccountingPeriod + source: + openapi: accounting_v3.yml + inline: true + GeneralLedgerTransactionCompany: + discriminated: false + docs: The company the GeneralLedgerTransaction belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: accounting_v3.yml + inline: true + GeneralLedgerTransactionTrackingCategoriesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: accounting_v3.yml + inline: true + GeneralLedgerTransactionGeneralLedgerTransactionLinesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - GeneralLedgerTransactionLine + source: + openapi: accounting_v3.yml + inline: true + GeneralLedgerTransaction: + docs: >- + # The GeneralLedgerTransaction Object + + ### Description + + A General Ledger Entry is a record of a financial transaction that is + posted to the general ledger, the central repository of a company’s + financial data. + + + The `GeneralLedgerTransaction` object is a singular endpoint to pull all + transactions posted to a company’s general ledger. The transaction that + generated the `GeneralLedgerTransaction` can be found by referencing the + `underlying_transaction_type` and `underlying_transaction_remote_id` + fields. + + + The lines of a `GeneralLedgerTransaction` object will always have equal + amounts of debits and credits. + + + ### Usage Example + + Fetch from the `GET GeneralLedgerTransaction` endpoint and view a general + ledger transaction. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + underlying_transaction_remote_id: + type: optional + docs: The third party remote ID of the underlying transaction. + validation: + maxLength: 50 + underlying_transaction_type: + type: optional + docs: |- + The type of the underlying transaction. + + * `INVOICE` - INVOICE + * `EXPENSE` - EXPENSE + * `TRANSACTION` - TRANSACTION + * `JOURNAL_ENTRY` - JOURNAL_ENTRY + * `PAYMENT` - PAYMENT + * `VENDOR_CREDIT` - VENDOR_CREDIT + * `CREDIT_NOTE` - CREDIT_NOTE + accounting_period: + type: optional + docs: >- + The accounting period that the GeneralLedgerTransaction was generated + in. + company: + type: optional + docs: The company the GeneralLedgerTransaction belongs to. + remote_updated_at: + type: optional + docs: When the third party's GeneralLedgerTransaction entry was updated. + remote_created_at: + type: optional + docs: When the third party's GeneralLedgerTransaction entry was created. + tracking_categories: optional>> + posting_date: + type: optional + docs: The date that the transaction was posted to the general ledger. + general_ledger_transaction_lines: + type: >- + optional> + docs: A list of “General Ledger Transaction Applied to Lines” objects. + access: read-only + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: accounting_v3.yml + GeneralLedgerTransactionLineAccount: + discriminated: false + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: accounting_v3.yml + inline: true + GeneralLedgerTransactionLineCompany: + discriminated: false + docs: The company the GeneralLedgerTransaction belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: accounting_v3.yml + inline: true + GeneralLedgerTransactionLineEmployee: + discriminated: false + union: + - type: string + validation: + format: uuid + - Employee + source: + openapi: accounting_v3.yml + inline: true + GeneralLedgerTransactionLineContact: + discriminated: false + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: accounting_v3.yml + inline: true + GeneralLedgerTransactionLineProject: + discriminated: false + union: + - type: string + validation: + format: uuid + - Project + source: + openapi: accounting_v3.yml + inline: true + GeneralLedgerTransactionLineTransactionCurrency: + discriminated: false + docs: >- + The transaction currency that the transaction is made in. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + union: + - TransactionCurrencyEnum + - string + source: + openapi: accounting_v3.yml + inline: true + GeneralLedgerTransactionLineTrackingCategoriesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: accounting_v3.yml + inline: true + GeneralLedgerTransactionLineItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Item + source: + openapi: accounting_v3.yml + inline: true + GeneralLedgerTransactionLine: + docs: >- + # The GeneralLedgerTransactionLineSerializer Object + + ### Description + + The `GeneralLedgerTransactionLineSerializer` object represents general + ledger transaction line item. + + + ### Usage Example Fetch from the `GET + GeneralLedgerTransactionLineSerializer` endpoint and view an + + `GeneralLedgerTransaction` line item. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + account: optional + company: + type: optional + docs: The company the GeneralLedgerTransaction belongs to. + employee: optional + contact: optional + project: optional + base_currency: + type: optional + docs: >- + The base currency of the transaction + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + transaction_currency: + type: optional + docs: >- + The transaction currency that the transaction is made in. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + exchange_rate: + type: optional + docs: >- + The exchange rate between the base currency and the transaction + currency. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + description: + type: optional + docs: A description of the line item. + tracking_categories: + type: optional> + access: read-only + debit_amount: string + credit_amount: string + item: optional + foreign_debit_amount: string + foreign_credit_amount: string + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + source: + openapi: accounting_v3.yml + IncomeStatementCurrency: + discriminated: false + docs: >- + The income statement's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + union: + - TransactionCurrencyEnum + - string + source: + openapi: accounting_v3.yml + inline: true + IncomeStatementCompany: + discriminated: false + docs: The company the income statement belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: accounting_v3.yml + inline: true + IncomeStatement: + docs: >- + # The IncomeStatement Object + + ### Description + + The `IncomeStatement` object is used to represent a company’s income, the + cost of sales, operating expenses, and other non-operating expenses. The + object also includes other important values like gross profit, gross + operating profit, and net income. This represents a period of time (month, + quarter, or year). + + + ### Usage Example + + Fetch from the `GET IncomeStatement` endpoint and view a company's income + statement for a given period. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The income statement's name. + currency: + type: optional + docs: >- + The income statement's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + company: + type: optional + docs: The company the income statement belongs to. + start_period: + type: optional + docs: The income statement's start period. + end_period: + type: optional + docs: The income statement's end period. + income: + type: optional> + access: read-only + cost_of_sales: + type: optional> + access: read-only + gross_profit: + type: optional + docs: The revenue minus the cost of sale. + operating_expenses: + type: optional> + access: read-only + net_operating_income: + type: optional + docs: The revenue minus the operating expenses. + non_operating_expenses: + type: optional> + access: read-only + net_income: + type: optional + docs: The gross profit minus the total expenses. + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: accounting_v3.yml + IndividualCommonModelScopeDeserializer: + properties: + model_name: string + model_permissions: optional> + field_permissions: optional + source: + openapi: accounting_v3.yml + IndividualCommonModelScopeDeserializerRequest: + properties: + model_name: + type: string + validation: + minLength: 1 + model_permissions: optional> + field_permissions: optional + source: + openapi: accounting_v3.yml + InvoiceContact: + discriminated: false + docs: The invoice's contact. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: accounting_v3.yml + inline: true + InvoiceCompany: + discriminated: false + docs: The company the invoice belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: accounting_v3.yml + inline: true + InvoiceEmployee: + discriminated: false + docs: The employee this overall transaction relates to. + union: + - type: string + validation: + format: uuid + - Employee + source: + openapi: accounting_v3.yml + inline: true + InvoiceCurrency: + discriminated: false + docs: >- + The invoice's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + union: + - TransactionCurrencyEnum + - string + source: + openapi: accounting_v3.yml + inline: true + InvoicePaymentTerm: + discriminated: false + docs: The payment term that applies to this transaction. + union: + - type: string + validation: + format: uuid + - PaymentTerm + source: + openapi: accounting_v3.yml + inline: true + InvoiceStatus: + discriminated: false + docs: |- + The status of the invoice. + + * `PAID` - PAID + * `DRAFT` - DRAFT + * `SUBMITTED` - SUBMITTED + * `PARTIALLY_PAID` - PARTIALLY_PAID + * `OPEN` - OPEN + * `VOID` - VOID + union: + - InvoiceStatusEnum + - string + source: + openapi: accounting_v3.yml + inline: true + InvoiceTrackingCategoriesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: accounting_v3.yml + inline: true + InvoiceAccountingPeriod: + discriminated: false + docs: The accounting period that the Invoice was generated in. + union: + - type: string + validation: + format: uuid + - AccountingPeriod + source: + openapi: accounting_v3.yml + inline: true + InvoicePurchaseOrdersItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - PurchaseOrder + source: + openapi: accounting_v3.yml + inline: true + InvoicePaymentsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Payment + source: + openapi: accounting_v3.yml + inline: true + InvoiceAppliedPaymentsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - PaymentLineItem + source: + openapi: accounting_v3.yml + inline: true + InvoiceAppliedCreditNotesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - CreditNoteApplyLineForInvoice + source: + openapi: accounting_v3.yml + inline: true + InvoiceAppliedVendorCreditsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - VendorCreditApplyLineForInvoice + source: + openapi: accounting_v3.yml + inline: true + Invoice: + docs: >- + # The Invoice Object + + ### Description + + The `Invoice` object represents an itemized record of goods and/or + services sold to a customer or bought from a vendor. + + + + Represents a Bill when the `Invoice` type is `ACCOUNTS_PAYABLE`. + References an Invoice when the `Invoice` type is `ACCOUNTS_RECEIVABLE`. + + + ### Usage Example + + Fetch from the `LIST Invoices` endpoint and view a company's invoices. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + type: + type: optional + docs: >- + Whether the invoice is an accounts receivable or accounts payable. If + `type` is `ACCOUNTS_PAYABLE`, the invoice is a bill. If `type` is + `ACCOUNTS_RECEIVABLE`, it is an invoice. + + + * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE + + * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE + contact: + type: optional + docs: The invoice's contact. + number: + type: optional + docs: The invoice's number. + issue_date: + type: optional + docs: The invoice's issue date. + due_date: + type: optional + docs: The invoice's due date. + paid_on_date: + type: optional + docs: The invoice's paid date. + memo: + type: optional + docs: The invoice's private note. + company: + type: optional + docs: The company the invoice belongs to. + employee: + type: optional + docs: The employee this overall transaction relates to. + currency: + type: optional + docs: >- + The invoice's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + exchange_rate: + type: optional + docs: The invoice's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + payment_term: + type: optional + docs: The payment term that applies to this transaction. + total_discount: + type: optional + docs: The total discounts applied to the total cost. + sub_total: + type: optional + docs: The total amount being paid before taxes. + status: + type: optional + docs: |- + The status of the invoice. + + * `PAID` - PAID + * `DRAFT` - DRAFT + * `SUBMITTED` - SUBMITTED + * `PARTIALLY_PAID` - PARTIALLY_PAID + * `OPEN` - OPEN + * `VOID` - VOID + total_tax_amount: + type: optional + docs: The total amount being paid in taxes. + total_amount: + type: optional + docs: The invoice's total amount. + balance: + type: optional + docs: The invoice's remaining balance. + remote_updated_at: + type: optional + docs: When the third party's invoice entry was updated. + tracking_categories: optional>> + accounting_period: + type: optional + docs: The accounting period that the Invoice was generated in. + purchase_orders: optional>> + payments: + type: optional>> + docs: Array of `Payment` object IDs. + applied_payments: + type: optional>> + docs: >- + A list of the Payment Applied to Lines common models related to a + given Invoice, Credit Note, or Journal Entry. + line_items: + type: optional> + access: read-only + applied_credit_notes: + type: optional> + docs: '`CreditNoteApplyLines` applied to the Invoice.' + access: read-only + applied_vendor_credits: + type: optional> + docs: '`VendorCreditApplyLines` applied to the Invoice.' + access: read-only + inclusive_of_tax: + type: optional + docs: >- + If the transaction is inclusive or exclusive of tax. `True` if + inclusive, `False` if exclusive. + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + remote_fields: + type: optional> + access: read-only + source: + openapi: accounting_v3.yml + InvoiceLineItemEmployee: + discriminated: false + docs: The employee this overall transaction relates to. + union: + - type: string + validation: + format: uuid + - Employee + source: + openapi: accounting_v3.yml + inline: true + InvoiceLineItemProject: + discriminated: false + union: + - type: string + validation: + format: uuid + - Project + source: + openapi: accounting_v3.yml + inline: true + InvoiceLineItemContact: + discriminated: false + docs: The invoice's contact. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: accounting_v3.yml + inline: true + InvoiceLineItemCurrency: + discriminated: false + docs: >- + The line item's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + union: + - TransactionCurrencyEnum + - string + source: + openapi: accounting_v3.yml + inline: true + InvoiceLineItemItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Item + source: + openapi: accounting_v3.yml + inline: true + InvoiceLineItemAccount: + discriminated: false + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: accounting_v3.yml + inline: true + InvoiceLineItemTrackingCategory: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: accounting_v3.yml + inline: true + InvoiceLineItemTrackingCategoriesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: accounting_v3.yml + inline: true + InvoiceLineItem: + docs: >- + # The InvoiceLineItem Object + + ### Description + + The `InvoiceLineItem` object represents an itemized record of goods and/or + services sold to a customer. + + + ### Usage Example + + Fetch from the `GET Invoice` endpoint and view the invoice's line items. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + description: + type: optional + docs: The line item's description. + unit_price: + type: optional + docs: The line item's unit price. + quantity: + type: optional + docs: The line item's quantity. + total_amount: + type: optional + docs: The line item's total amount. + employee: + type: optional + docs: The employee this overall transaction relates to. + project: optional + contact: + type: optional + docs: The invoice's contact. + currency: + type: optional + docs: >- + The line item's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + exchange_rate: + type: optional + docs: The line item's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + item: optional + account: optional + tax_rate: + type: optional + docs: The tax rate that applies to this line item. + validation: + format: uuid + tracking_category: + type: optional + availability: deprecated + tracking_categories: + type: optional>> + docs: The invoice line item's associated tracking categories. + company: + type: optional + docs: The company the invoice belongs to. + validation: + format: uuid + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_fields: + type: optional> + access: read-only + source: + openapi: accounting_v3.yml + InvoiceLineItemRequestEmployee: + discriminated: false + docs: The employee this overall transaction relates to. + union: + - type: string + validation: + format: uuid + - Employee + source: + openapi: accounting_v3.yml + inline: true + InvoiceLineItemRequestProject: + discriminated: false + union: + - type: string + validation: + format: uuid + - Project + source: + openapi: accounting_v3.yml + inline: true + InvoiceLineItemRequestContact: + discriminated: false + docs: The invoice's contact. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: accounting_v3.yml + inline: true + InvoiceLineItemRequestCurrency: + discriminated: false + docs: >- + The line item's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + union: + - TransactionCurrencyEnum + - string + source: + openapi: accounting_v3.yml + inline: true + InvoiceLineItemRequestItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Item + source: + openapi: accounting_v3.yml + inline: true + InvoiceLineItemRequestAccount: + discriminated: false + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: accounting_v3.yml + inline: true + InvoiceLineItemRequestTrackingCategory: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: accounting_v3.yml + inline: true + InvoiceLineItemRequestTrackingCategoriesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: accounting_v3.yml + inline: true + InvoiceLineItemRequest: + docs: >- + # The InvoiceLineItem Object + + ### Description + + The `InvoiceLineItem` object represents an itemized record of goods and/or + services sold to a customer. + + + ### Usage Example + + Fetch from the `GET Invoice` endpoint and view the invoice's line items. + properties: + remote_id: + type: optional + docs: The third-party API ID of the matching object. + description: + type: optional + docs: The line item's description. + unit_price: + type: optional + docs: The line item's unit price. + quantity: + type: optional + docs: The line item's quantity. + total_amount: + type: optional + docs: The line item's total amount. + employee: + type: optional + docs: The employee this overall transaction relates to. + project: optional + contact: + type: optional + docs: The invoice's contact. + currency: + type: optional + docs: >- + The line item's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + exchange_rate: + type: optional + docs: The line item's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + item: optional + account: optional + tax_rate: + type: optional + docs: The tax rate that applies to this line item. + validation: + format: uuid + tracking_category: + type: optional + availability: deprecated + tracking_categories: + type: optional>> + docs: The invoice line item's associated tracking categories. + company: + type: optional + docs: The company the invoice belongs to. + validation: + format: uuid + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: accounting_v3.yml + InvoiceRequestType: + discriminated: false + docs: >- + Whether the invoice is an accounts receivable or accounts payable. If + `type` is `ACCOUNTS_PAYABLE`, the invoice is a bill. If `type` is + `ACCOUNTS_RECEIVABLE`, it is an invoice. + + + * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE + + * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE + union: + - InvoiceTypeEnum + - string + source: + openapi: accounting_v3.yml + inline: true + InvoiceRequestContact: + discriminated: false + docs: The invoice's contact. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: accounting_v3.yml + inline: true + InvoiceRequestEmployee: + discriminated: false + docs: The employee this overall transaction relates to. + union: + - type: string + validation: + format: uuid + - Employee + source: + openapi: accounting_v3.yml + inline: true + InvoiceRequestStatus: + discriminated: false + docs: |- + The status of the invoice. + + * `PAID` - PAID + * `DRAFT` - DRAFT + * `SUBMITTED` - SUBMITTED + * `PARTIALLY_PAID` - PARTIALLY_PAID + * `OPEN` - OPEN + * `VOID` - VOID + union: + - InvoiceStatusEnum + - string + source: + openapi: accounting_v3.yml + inline: true + InvoiceRequestCompany: + discriminated: false + docs: The company the invoice belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: accounting_v3.yml + inline: true + InvoiceRequestCurrency: + discriminated: false + docs: >- + The invoice's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + union: + - TransactionCurrencyEnum + - string + source: + openapi: accounting_v3.yml + inline: true + InvoiceRequestPaymentTerm: + discriminated: false + docs: The payment term that applies to this transaction. + union: + - type: string + validation: + format: uuid + - PaymentTerm + source: + openapi: accounting_v3.yml + inline: true + InvoiceRequestPaymentsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Payment + source: + openapi: accounting_v3.yml + inline: true + InvoiceRequestTrackingCategoriesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: accounting_v3.yml + inline: true + InvoiceRequestPurchaseOrdersItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - PurchaseOrder + source: + openapi: accounting_v3.yml + inline: true + InvoiceRequest: + docs: >- + # The Invoice Object + + ### Description + + The `Invoice` object represents an itemized record of goods and/or + services sold to a customer or bought from a vendor. + + + + Represents a Bill when the `Invoice` type is `ACCOUNTS_PAYABLE`. + References an Invoice when the `Invoice` type is `ACCOUNTS_RECEIVABLE`. + + + ### Usage Example + + Fetch from the `LIST Invoices` endpoint and view a company's invoices. + properties: + type: + type: optional + docs: >- + Whether the invoice is an accounts receivable or accounts payable. If + `type` is `ACCOUNTS_PAYABLE`, the invoice is a bill. If `type` is + `ACCOUNTS_RECEIVABLE`, it is an invoice. + + + * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE + + * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE + contact: + type: optional + docs: The invoice's contact. + number: + type: optional + docs: The invoice's number. + issue_date: + type: optional + docs: The invoice's issue date. + due_date: + type: optional + docs: The invoice's due date. + paid_on_date: + type: optional + docs: The invoice's paid date. + employee: + type: optional + docs: The employee this overall transaction relates to. + memo: + type: optional + docs: The invoice's private note. + status: + type: optional + docs: |- + The status of the invoice. + + * `PAID` - PAID + * `DRAFT` - DRAFT + * `SUBMITTED` - SUBMITTED + * `PARTIALLY_PAID` - PARTIALLY_PAID + * `OPEN` - OPEN + * `VOID` - VOID + company: + type: optional + docs: The company the invoice belongs to. + currency: + type: optional + docs: >- + The invoice's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + exchange_rate: + type: optional + docs: The invoice's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + total_discount: + type: optional + docs: The total discounts applied to the total cost. + sub_total: + type: optional + docs: The total amount being paid before taxes. + payment_term: + type: optional + docs: The payment term that applies to this transaction. + total_tax_amount: + type: optional + docs: The total amount being paid in taxes. + inclusive_of_tax: + type: optional + docs: >- + If the transaction is inclusive or exclusive of tax. `True` if + inclusive, `False` if exclusive. + total_amount: + type: optional + docs: The invoice's total amount. + balance: + type: optional + docs: The invoice's remaining balance. + payments: + type: optional>> + docs: Array of `Payment` object IDs. + tracking_categories: optional>> + line_items: optional> + purchase_orders: optional>> + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: accounting_v3.yml + InvoiceResponse: + properties: + model: Invoice + warnings: list + errors: list + logs: optional> + source: + openapi: accounting_v3.yml + InvoiceStatusEnum: + enum: + - PAID + - DRAFT + - SUBMITTED + - PARTIALLY_PAID + - OPEN + - VOID + docs: |- + * `PAID` - PAID + * `DRAFT` - DRAFT + * `SUBMITTED` - SUBMITTED + * `PARTIALLY_PAID` - PARTIALLY_PAID + * `OPEN` - OPEN + * `VOID` - VOID + source: + openapi: accounting_v3.yml + InvoiceTypeEnum: + enum: + - ACCOUNTS_RECEIVABLE + - ACCOUNTS_PAYABLE + docs: |- + * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE + * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE + source: + openapi: accounting_v3.yml + IssueStatus: + discriminated: false + docs: |- + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + union: + - IssueStatusEnum + - string + source: + openapi: accounting_v3.yml + inline: true + Issue: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + status: + type: optional + docs: |- + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + error_description: string + end_user: + type: optional> + access: read-only + first_incident_time: optional + last_incident_time: optional + is_muted: + type: optional + access: read-only + error_details: + type: optional> + access: read-only + source: + openapi: accounting_v3.yml + IssueStatusEnum: + enum: + - ONGOING + - RESOLVED + docs: |- + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + source: + openapi: accounting_v3.yml + ItemStatus: + discriminated: false + docs: |- + The item's status. + + * `ACTIVE` - ACTIVE + * `ARCHIVED` - ARCHIVED + union: + - Status7D1Enum + - string + source: + openapi: accounting_v3.yml + inline: true + ItemType: + discriminated: false + docs: |- + The item's type. + + * `INVENTORY` - INVENTORY + * `NON_INVENTORY` - NON_INVENTORY + * `SERVICE` - SERVICE + * `UNKNOWN` - UNKNOWN + union: + - Type2BbEnum + - string + source: + openapi: accounting_v3.yml + inline: true + ItemPurchaseAccount: + discriminated: false + docs: References the default account used to record a purchase of the item. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: accounting_v3.yml + inline: true + ItemSalesAccount: + discriminated: false + docs: References the default account used to record a sale. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: accounting_v3.yml + inline: true + ItemCompany: + discriminated: false + docs: The company the item belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: accounting_v3.yml + inline: true + ItemPurchaseTaxRate: + discriminated: false + docs: The default purchase tax rate for this item. + union: + - type: string + validation: + format: uuid + - TaxRate + source: + openapi: accounting_v3.yml + inline: true + ItemSalesTaxRate: + discriminated: false + docs: The default sales tax rate for this item. + union: + - type: string + validation: + format: uuid + - TaxRate + source: + openapi: accounting_v3.yml + inline: true + Item: + docs: |- + # The Item Object + ### Description + The `Item` object refers to the goods involved in a transaction. + + ### Usage Example + Fetch from the `LIST Items` endpoint and view a company's items. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The item's name. + status: + type: optional + docs: |- + The item's status. + + * `ACTIVE` - ACTIVE + * `ARCHIVED` - ARCHIVED + type: + type: optional + docs: |- + The item's type. + + * `INVENTORY` - INVENTORY + * `NON_INVENTORY` - NON_INVENTORY + * `SERVICE` - SERVICE + * `UNKNOWN` - UNKNOWN + unit_price: + type: optional + docs: The item's unit price. + purchase_price: + type: optional + docs: The price at which the item is purchased from a vendor. + purchase_account: + type: optional + docs: References the default account used to record a purchase of the item. + sales_account: + type: optional + docs: References the default account used to record a sale. + company: + type: optional + docs: The company the item belongs to. + purchase_tax_rate: + type: optional + docs: The default purchase tax rate for this item. + sales_tax_rate: + type: optional + docs: The default sales tax rate for this item. + remote_updated_at: + type: optional + docs: When the third party's item note was updated. + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: accounting_v3.yml + ItemFormatEnum: + enum: + - string + - number + - date + - datetime + - bool + - list + docs: |- + * `string` - uuid + * `number` - url + * `date` - email + * `datetime` - phone + * `bool` - currency + * `list` - decimal + source: + openapi: accounting_v3.yml + ItemRequestRequestStatus: + discriminated: false + docs: |- + The item's status. + + * `ACTIVE` - ACTIVE + * `ARCHIVED` - ARCHIVED + union: + - Status7D1Enum + - string + source: + openapi: accounting_v3.yml + inline: true + ItemRequestRequestType: + discriminated: false + docs: |- + The item's type. + + * `INVENTORY` - INVENTORY + * `NON_INVENTORY` - NON_INVENTORY + * `SERVICE` - SERVICE + * `UNKNOWN` - UNKNOWN + union: + - Type2BbEnum + - string + source: + openapi: accounting_v3.yml + inline: true + ItemRequestRequestPurchaseAccount: + discriminated: false + docs: References the default account used to record a purchase of the item. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: accounting_v3.yml + inline: true + ItemRequestRequestSalesAccount: + discriminated: false + docs: References the default account used to record a sale. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: accounting_v3.yml + inline: true + ItemRequestRequestCompany: + discriminated: false + docs: The company the item belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: accounting_v3.yml + inline: true + ItemRequestRequestPurchaseTaxRate: + discriminated: false + docs: The default purchase tax rate for this item. + union: + - type: string + validation: + format: uuid + - TaxRate + source: + openapi: accounting_v3.yml + inline: true + ItemRequestRequestSalesTaxRate: + discriminated: false + docs: The default sales tax rate for this item. + union: + - type: string + validation: + format: uuid + - TaxRate + source: + openapi: accounting_v3.yml + inline: true + ItemRequestRequest: + docs: |- + # The Item Object + ### Description + The `Item` object refers to the goods involved in a transaction. + + ### Usage Example + Fetch from the `LIST Items` endpoint and view a company's items. + properties: + name: + type: optional + docs: The item's name. + status: + type: optional + docs: |- + The item's status. + + * `ACTIVE` - ACTIVE + * `ARCHIVED` - ARCHIVED + type: + type: optional + docs: |- + The item's type. + + * `INVENTORY` - INVENTORY + * `NON_INVENTORY` - NON_INVENTORY + * `SERVICE` - SERVICE + * `UNKNOWN` - UNKNOWN + unit_price: + type: optional + docs: The item's unit price. + purchase_price: + type: optional + docs: The price at which the item is purchased from a vendor. + purchase_account: + type: optional + docs: References the default account used to record a purchase of the item. + sales_account: + type: optional + docs: References the default account used to record a sale. + company: + type: optional + docs: The company the item belongs to. + purchase_tax_rate: + type: optional + docs: The default purchase tax rate for this item. + sales_tax_rate: + type: optional + docs: The default sales tax rate for this item. + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: accounting_v3.yml + ItemResponse: + properties: + model: Item + warnings: list + errors: list + logs: optional> + source: + openapi: accounting_v3.yml + ItemSchema: + properties: + item_type: optional + item_format: optional + item_choices: optional> + source: + openapi: accounting_v3.yml + ItemTypeEnum: + enum: + - string + - number + - date + - datetime + - bool + - list + docs: |- + * `string` - string + * `number` - number + * `date` - date + * `datetime` - datetime + * `bool` - bool + * `list` - list + source: + openapi: accounting_v3.yml + JournalEntryPaymentsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Payment + source: + openapi: accounting_v3.yml + inline: true + JournalEntryAppliedPaymentsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - PaymentLineItem + source: + openapi: accounting_v3.yml + inline: true + JournalEntryCurrency: + discriminated: false + docs: >- + The journal's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + union: + - TransactionCurrencyEnum + - string + source: + openapi: accounting_v3.yml + inline: true + JournalEntryCompany: + discriminated: false + docs: The company the journal entry belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: accounting_v3.yml + inline: true + JournalEntryTrackingCategoriesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: accounting_v3.yml + inline: true + JournalEntryPostingStatus: + discriminated: false + docs: |- + The journal's posting status. + + * `UNPOSTED` - UNPOSTED + * `POSTED` - POSTED + union: + - PostingStatusEnum + - string + source: + openapi: accounting_v3.yml + inline: true + JournalEntryAccountingPeriod: + discriminated: false + docs: The accounting period that the JournalEntry was generated in. + union: + - type: string + validation: + format: uuid + - AccountingPeriod + source: + openapi: accounting_v3.yml + inline: true + JournalEntry: + docs: >- + # The JournalEntry Object + + ### Description + + A `JournalEntry` is a record of a transaction or event that is entered + into a company's accounting system. + + + The `JournalEntry` common model contains records that are automatically + created as a result of a certain type of transaction, like an Invoice, and + records that are manually created against a company’s ledger. + + + The lines of a given `JournalEntry` object should always sum to 0. A + positive `net_amount` means the line represents a debit and a negative + net_amount represents a credit. + + + ### Usage Example + + Fetch from the `GET JournalEntry` endpoint and view a company's journey + entry. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + transaction_date: + type: optional + docs: The journal entry's transaction date. + payments: + type: optional>> + docs: Array of `Payment` object IDs. + applied_payments: + type: optional>> + docs: >- + A list of the Payment Applied to Lines common models related to a + given Invoice, Credit Note, or Journal Entry. + memo: + type: optional + docs: The journal entry's private note. + currency: + type: optional + docs: >- + The journal's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + exchange_rate: + type: optional + docs: The journal entry's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + company: + type: optional + docs: The company the journal entry belongs to. + inclusive_of_tax: + type: optional + docs: >- + If the transaction is inclusive or exclusive of tax. `True` if + inclusive, `False` if exclusive. + lines: + type: optional> + access: read-only + journal_number: + type: optional + docs: Reference number for identifying journal entries. + validation: + maxLength: 70 + tracking_categories: optional>> + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + posting_status: + type: optional + docs: |- + The journal's posting status. + + * `UNPOSTED` - UNPOSTED + * `POSTED` - POSTED + accounting_period: + type: optional + docs: The accounting period that the JournalEntry was generated in. + remote_created_at: + type: optional + docs: When the third party's journal entry was created. + remote_updated_at: + type: optional + docs: When the third party's journal entry was updated. + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + remote_fields: + type: optional> + access: read-only + source: + openapi: accounting_v3.yml + JournalEntryRequestPaymentsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Payment + source: + openapi: accounting_v3.yml + inline: true + JournalEntryRequestCurrency: + discriminated: false + docs: >- + The journal's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + union: + - TransactionCurrencyEnum + - string + source: + openapi: accounting_v3.yml + inline: true + JournalEntryRequestCompany: + discriminated: false + docs: The company the journal entry belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: accounting_v3.yml + inline: true + JournalEntryRequestTrackingCategoriesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: accounting_v3.yml + inline: true + JournalEntryRequestPostingStatus: + discriminated: false + docs: |- + The journal's posting status. + + * `UNPOSTED` - UNPOSTED + * `POSTED` - POSTED + union: + - PostingStatusEnum + - string + source: + openapi: accounting_v3.yml + inline: true + JournalEntryRequest: + docs: >- + # The JournalEntry Object + + ### Description + + The `JournalEntry` object is used to get a record of all manually created + entries made in a company’s general ledger. The journal line items for + each journal entry should sum to zero. + + + ### Usage Example + + Fetch from the `GET JournalEntry` endpoint and view a company's journey + entry. + properties: + transaction_date: + type: optional + docs: The journal entry's transaction date. + payments: + type: optional>> + docs: Array of `Payment` object IDs. + memo: + type: optional + docs: The journal entry's private note. + currency: + type: optional + docs: >- + The journal's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + exchange_rate: + type: optional + docs: The journal entry's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + company: + type: optional + docs: The company the journal entry belongs to. + tracking_categories: optional>> + inclusive_of_tax: + type: optional + docs: >- + If the transaction is inclusive or exclusive of tax. `True` if + inclusive, `False` if exclusive. + lines: optional> + journal_number: + type: optional + docs: Reference number for identifying journal entries. + validation: + maxLength: 70 + posting_status: + type: optional + docs: |- + The journal's posting status. + + * `UNPOSTED` - UNPOSTED + * `POSTED` - POSTED + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: accounting_v3.yml + JournalEntryResponse: + properties: + model: JournalEntry + warnings: list + errors: list + logs: optional> + source: + openapi: accounting_v3.yml + JournalLineAccount: + discriminated: false + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: accounting_v3.yml + inline: true + JournalLineTrackingCategory: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: accounting_v3.yml + inline: true + JournalLineTrackingCategoriesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: accounting_v3.yml + inline: true + JournalLineCurrency: + discriminated: false + docs: >- + The journal line item's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + union: + - TransactionCurrencyEnum + - string + source: + openapi: accounting_v3.yml + inline: true + JournalLineProject: + discriminated: false + union: + - type: string + validation: + format: uuid + - Project + source: + openapi: accounting_v3.yml + inline: true + JournalLine: + docs: >- + # The JournalLine Object + + ### Description + + The `JournalLine` object is used to represent a journal entry's line + items. + + + ### Usage Example + + Fetch from the `GET JournalEntry` endpoint and view the journal entry's + line items. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + account: optional + net_amount: + type: optional + docs: The value of the line item including taxes and other fees. + tracking_category: + type: optional + availability: deprecated + tracking_categories: + type: optional>> + docs: The journal line item's associated tracking categories. + currency: + type: optional + docs: >- + The journal line item's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + company: + type: optional + docs: The company the journal entry belongs to. + validation: + format: uuid + employee: + type: optional + validation: + format: uuid + project: optional + contact: + type: optional + validation: + format: uuid + tax_rate: + type: optional + docs: The tax rate that applies to this line item. + validation: + format: uuid + description: + type: optional + docs: The line's description. + exchange_rate: + type: optional + docs: The journal line item's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + remote_fields: + type: optional> + access: read-only + source: + openapi: accounting_v3.yml + JournalLineRequestAccount: + discriminated: false + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: accounting_v3.yml + inline: true + JournalLineRequestTrackingCategory: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: accounting_v3.yml + inline: true + JournalLineRequestTrackingCategoriesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: accounting_v3.yml + inline: true + JournalLineRequestCurrency: + discriminated: false + docs: >- + The journal line item's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + union: + - TransactionCurrencyEnum + - string + source: + openapi: accounting_v3.yml + inline: true + JournalLineRequestProject: + discriminated: false + union: + - type: string + validation: + format: uuid + - Project + source: + openapi: accounting_v3.yml + inline: true + JournalLineRequest: + docs: >- + # The JournalLine Object + + ### Description + + The `JournalLine` object is used to represent a journal entry's line + items. + + + ### Usage Example + + Fetch from the `GET JournalEntry` endpoint and view the journal entry's + line items. + properties: + remote_id: + type: optional + docs: The third-party API ID of the matching object. + account: optional + net_amount: + type: optional + docs: The value of the line item including taxes and other fees. + tracking_category: + type: optional + availability: deprecated + tracking_categories: + type: optional>> + docs: The journal line item's associated tracking categories. + currency: + type: optional + docs: >- + The journal line item's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + company: + type: optional + docs: The company the journal entry belongs to. + validation: + format: uuid + employee: + type: optional + validation: + format: uuid + project: optional + contact: + type: optional + validation: + format: uuid + tax_rate: + type: optional + docs: The tax rate that applies to this line item. + validation: + format: uuid + description: + type: optional + docs: The line's description. + exchange_rate: + type: optional + docs: The journal line item's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: accounting_v3.yml + LanguageEnum: + enum: + - en + - de + docs: |- + * `en` - en + * `de` - de + source: + openapi: accounting_v3.yml + LastSyncResultEnum: + enum: + - SYNCING + - DONE + - FAILED + - DISABLED + - PAUSED + - PARTIALLY_SYNCED + docs: |- + * `SYNCING` - SYNCING + * `DONE` - DONE + * `FAILED` - FAILED + * `DISABLED` - DISABLED + * `PAUSED` - PAUSED + * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED + source: + openapi: accounting_v3.yml + LinkToken: + properties: + link_token: string + integration_name: optional + magic_link_url: optional + source: + openapi: accounting_v3.yml + LinkedAccountStatus: + properties: + linked_account_status: string + can_make_request: boolean + source: + openapi: accounting_v3.yml + MetaResponse: + properties: + request_schema: map + remote_field_classes: optional> + status: optional + has_conditional_params: boolean + has_required_linked_account_params: boolean + source: + openapi: accounting_v3.yml + MethodEnum: + enum: + - GET + - OPTIONS + - HEAD + - POST + - PUT + - PATCH + - DELETE + docs: |- + * `GET` - GET + * `OPTIONS` - OPTIONS + * `HEAD` - HEAD + * `POST` - POST + * `PUT` - PUT + * `PATCH` - PATCH + * `DELETE` - DELETE + source: + openapi: accounting_v3.yml + MethodTypeEnum: + enum: + - CREDIT_CARD + - DEBIT_CARD + - ACH + - CASH + - CHECK + docs: |- + * `CREDIT_CARD` - CREDIT_CARD + * `DEBIT_CARD` - DEBIT_CARD + * `ACH` - ACH + * `CASH` - CASH + * `CHECK` - CHECK + source: + openapi: accounting_v3.yml + ModelOperation: + docs: >- + # The ModelOperation Object + + ### Description + + The `ModelOperation` object is used to represent the operations that are + currently supported for a given model. + + + ### Usage Example + + View what operations are supported for the `Candidate` endpoint. + properties: + model_name: string + available_operations: list + required_post_parameters: list + supported_fields: list + source: + openapi: accounting_v3.yml + ModelPermissionDeserializer: + properties: + is_enabled: optional + source: + openapi: accounting_v3.yml + ModelPermissionDeserializerRequest: + properties: + is_enabled: optional + source: + openapi: accounting_v3.yml + MultipartFormFieldRequest: + docs: >- + # The MultipartFormField Object + + ### Description + + The `MultipartFormField` object is used to represent fields in an HTTP + request using `multipart/form-data`. + + + ### Usage Example + + Create a `MultipartFormField` to define a multipart form entry. + properties: + name: + type: string + docs: The name of the form field + validation: + minLength: 1 + data: + type: string + docs: The data for the form field. + validation: + minLength: 1 + encoding: + type: optional + docs: |- + The encoding of the value of `data`. Defaults to `RAW` if not defined. + + * `RAW` - RAW + * `BASE64` - BASE64 + * `GZIP_BASE64` - GZIP_BASE64 + file_name: + type: optional + docs: The file name of the form field, if the field is for a file. + validation: + minLength: 1 + content_type: + type: optional + docs: The MIME type of the file, if the field is for a file. + validation: + minLength: 1 + source: + openapi: accounting_v3.yml + PaginatedAccountDetailsAndActionsList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: accounting_v3.yml + PaginatedAccountList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: accounting_v3.yml + PaginatedAccountingAttachmentList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: accounting_v3.yml + PaginatedAccountingPeriodList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: accounting_v3.yml + PaginatedAuditLogEventList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: accounting_v3.yml + PaginatedBalanceSheetList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: accounting_v3.yml + PaginatedBankFeedAccountList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: accounting_v3.yml + PaginatedBankFeedTransactionList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: accounting_v3.yml + PaginatedCashFlowStatementList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: accounting_v3.yml + PaginatedCompanyInfoList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: accounting_v3.yml + PaginatedContactList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: accounting_v3.yml + PaginatedCreditNoteList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: accounting_v3.yml + PaginatedEmployeeList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: accounting_v3.yml + PaginatedExpenseList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: accounting_v3.yml + PaginatedGeneralLedgerTransactionList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: accounting_v3.yml + PaginatedIncomeStatementList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: accounting_v3.yml + PaginatedInvoiceList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: accounting_v3.yml + PaginatedIssueList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: accounting_v3.yml + PaginatedItemList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: accounting_v3.yml + PaginatedJournalEntryList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: accounting_v3.yml + PaginatedPaymentList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: accounting_v3.yml + PaginatedPaymentMethodList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: accounting_v3.yml + PaginatedPaymentTermList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: accounting_v3.yml + PaginatedProjectList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: accounting_v3.yml + PaginatedPurchaseOrderList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: accounting_v3.yml + PaginatedRemoteFieldClassList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: accounting_v3.yml + PaginatedSyncStatusList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: accounting_v3.yml + PaginatedTaxRateList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: accounting_v3.yml + PaginatedTrackingCategoryList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: accounting_v3.yml + PaginatedTransactionList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: accounting_v3.yml + PaginatedVendorCreditList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: accounting_v3.yml + PatchedItemRequestRequestStatus: + discriminated: false + docs: |- + The item's status. + + * `ACTIVE` - ACTIVE + * `ARCHIVED` - ARCHIVED + union: + - Status7D1Enum + - string + source: + openapi: accounting_v3.yml + inline: true + PatchedItemRequestRequestType: + discriminated: false + docs: |- + The item's type. + + * `INVENTORY` - INVENTORY + * `NON_INVENTORY` - NON_INVENTORY + * `SERVICE` - SERVICE + * `UNKNOWN` - UNKNOWN + union: + - Type2BbEnum + - string + source: + openapi: accounting_v3.yml + inline: true + PatchedItemRequestRequest: + docs: |- + # The Item Object + ### Description + The `Item` object refers to the goods involved in a transaction. + + ### Usage Example + Fetch from the `LIST Items` endpoint and view a company's items. + properties: + name: + type: optional + docs: The item's name. + status: + type: optional + docs: |- + The item's status. + + * `ACTIVE` - ACTIVE + * `ARCHIVED` - ARCHIVED + type: + type: optional + docs: |- + The item's type. + + * `INVENTORY` - INVENTORY + * `NON_INVENTORY` - NON_INVENTORY + * `SERVICE` - SERVICE + * `UNKNOWN` - UNKNOWN + unit_price: + type: optional + docs: The item's unit price. + purchase_price: + type: optional + docs: The price at which the item is purchased from a vendor. + purchase_account: + type: optional + docs: References the default account used to record a purchase of the item. + validation: + format: uuid + sales_account: + type: optional + docs: References the default account used to record a sale. + validation: + format: uuid + company: + type: optional + docs: The company the item belongs to. + validation: + format: uuid + purchase_tax_rate: + type: optional + docs: The default purchase tax rate for this item. + validation: + format: uuid + sales_tax_rate: + type: optional + docs: The default sales tax rate for this item. + validation: + format: uuid + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: accounting_v3.yml + PatchedPaymentRequestContact: + discriminated: false + docs: The supplier, or customer involved in the payment. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: accounting_v3.yml + inline: true + PatchedPaymentRequestAccount: + discriminated: false + docs: The supplier’s or customer’s account in which the payment is made. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: accounting_v3.yml + inline: true + PatchedPaymentRequestPaymentMethod: + discriminated: false + docs: The method which this payment was made by. + union: + - type: string + validation: + format: uuid + - PaymentMethod + source: + openapi: accounting_v3.yml + inline: true + PatchedPaymentRequestCurrency: + discriminated: false + docs: >- + The payment's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + union: + - TransactionCurrencyEnum + - string + source: + openapi: accounting_v3.yml + inline: true + PatchedPaymentRequestCompany: + discriminated: false + docs: The company the payment belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: accounting_v3.yml + inline: true + PatchedPaymentRequestType: + discriminated: false + docs: |- + The type of the invoice. + + * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE + * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE + union: + - PaymentTypeEnum + - string + source: + openapi: accounting_v3.yml + inline: true + PatchedPaymentRequestTrackingCategoriesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: accounting_v3.yml + inline: true + PatchedPaymentRequestAccountingPeriod: + discriminated: false + docs: The accounting period that the Payment was generated in. + union: + - type: string + validation: + format: uuid + - AccountingPeriod + source: + openapi: accounting_v3.yml + inline: true + PatchedPaymentRequestAppliedToLinesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - PaymentLineItemRequest + source: + openapi: accounting_v3.yml + inline: true + PatchedPaymentRequest: + docs: >- + # The Payment Object + + ### Description + + The `Payment` object represents general payments made towards a specific + transaction. + + + ### Usage Example + + Fetch from the `GET Payment` endpoint and view an invoice's payment. + properties: + transaction_date: + type: optional + docs: The payment's transaction date. + contact: + type: optional + docs: The supplier, or customer involved in the payment. + account: + type: optional + docs: The supplier’s or customer’s account in which the payment is made. + payment_method: + type: optional + docs: The method which this payment was made by. + currency: + type: optional + docs: >- + The payment's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + exchange_rate: + type: optional + docs: The payment's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + company: + type: optional + docs: The company the payment belongs to. + total_amount: + type: optional + docs: >- + The total amount of money being paid to the supplier, or customer, + after taxes. + type: + type: optional + docs: |- + The type of the invoice. + + * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE + * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE + tracking_categories: optional>> + accounting_period: + type: optional + docs: The accounting period that the Payment was generated in. + applied_to_lines: + type: optional> + docs: A list of “Payment Applied to Lines” objects. + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: accounting_v3.yml + PaymentContact: + discriminated: false + docs: The supplier, or customer involved in the payment. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: accounting_v3.yml + inline: true + PaymentAccount: + discriminated: false + docs: The supplier’s or customer’s account in which the payment is made. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: accounting_v3.yml + inline: true + PaymentPaymentMethod: + discriminated: false + docs: The method which this payment was made by. + union: + - type: string + validation: + format: uuid + - PaymentMethod + source: + openapi: accounting_v3.yml + inline: true + PaymentCurrency: + discriminated: false + docs: >- + The payment's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + union: + - TransactionCurrencyEnum + - string + source: + openapi: accounting_v3.yml + inline: true + PaymentCompany: + discriminated: false + docs: The company the payment belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: accounting_v3.yml + inline: true + PaymentType: + discriminated: false + docs: |- + The type of the invoice. + + * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE + * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE + union: + - PaymentTypeEnum + - string + source: + openapi: accounting_v3.yml + inline: true + PaymentTrackingCategoriesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: accounting_v3.yml + inline: true + PaymentAccountingPeriod: + discriminated: false + docs: The accounting period that the Payment was generated in. + union: + - type: string + validation: + format: uuid + - AccountingPeriod + source: + openapi: accounting_v3.yml + inline: true + PaymentAppliedToLinesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - PaymentLineItem + source: + openapi: accounting_v3.yml + inline: true + Payment: + docs: >- + # The Payment Object + + ### Description + + The `Payment` object represents general payments made towards a specific + transaction. + + + ### Usage Example + + Fetch from the `GET Payment` endpoint and view an invoice's payment. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + transaction_date: + type: optional + docs: The payment's transaction date. + contact: + type: optional + docs: The supplier, or customer involved in the payment. + account: + type: optional + docs: The supplier’s or customer’s account in which the payment is made. + payment_method: + type: optional + docs: The method which this payment was made by. + currency: + type: optional + docs: >- + The payment's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + exchange_rate: + type: optional + docs: The payment's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + company: + type: optional + docs: The company the payment belongs to. + total_amount: + type: optional + docs: >- + The total amount of money being paid to the supplier, or customer, + after taxes. + type: + type: optional + docs: |- + The type of the invoice. + + * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE + * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE + tracking_categories: optional>> + accounting_period: + type: optional + docs: The accounting period that the Payment was generated in. + applied_to_lines: + type: optional> + docs: A list of “Payment Applied to Lines” objects. + remote_updated_at: + type: optional + docs: When the third party's payment entry was updated. + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + remote_fields: + type: optional> + access: read-only + source: + openapi: accounting_v3.yml + PaymentLineItem: + docs: >- + # The PaymentLineItem Object + + ### Description + + The `PaymentLineItem` object is an applied-to-line on a `Payment` that can + either be a `Invoice`, `CreditNote`, or `JournalEntry`. + + + ### Usage Example + + `Payment` will have a field called `applied-to-lines` which will be an + array of `PaymentLineItemInternalMappingSerializer` objects that can + either be a `Invoice`, `CreditNote`, or `JournalEntry`. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + applied_amount: + type: optional + docs: The amount being applied to the transaction. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + applied_date: + type: optional + docs: The date the payment portion is applied. + related_object_id: + type: optional + docs: >- + The Merge ID of the transaction the payment portion is being applied + to. + validation: + format: uuid + related_object_type: + type: optional + docs: >- + The type of transaction the payment portion is being applied to. + Possible values include: INVOICE, JOURNAL_ENTRY, or CREDIT_NOTE. + source: + openapi: accounting_v3.yml + PaymentLineItemRequest: + docs: >- + # The PaymentLineItem Object + + ### Description + + The `PaymentLineItem` object is an applied-to-line on a `Payment` that can + either be a `Invoice`, `CreditNote`, or `JournalEntry`. + + + ### Usage Example + + `Payment` will have a field called `applied-to-lines` which will be an + array of `PaymentLineItemInternalMappingSerializer` objects that can + either be a `Invoice`, `CreditNote`, or `JournalEntry`. + properties: + remote_id: + type: optional + docs: The third-party API ID of the matching object. + applied_amount: + type: optional + docs: The amount being applied to the transaction. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + applied_date: + type: optional + docs: The date the payment portion is applied. + related_object_id: + type: optional + docs: >- + The Merge ID of the transaction the payment portion is being applied + to. + validation: + format: uuid + related_object_type: + type: optional + docs: >- + The type of transaction the payment portion is being applied to. + Possible values include: INVOICE, JOURNAL_ENTRY, or CREDIT_NOTE. + validation: + minLength: 1 + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: accounting_v3.yml + PaymentMethodMethodType: + discriminated: false + docs: |- + The type of the payment method. + + * `CREDIT_CARD` - CREDIT_CARD + * `DEBIT_CARD` - DEBIT_CARD + * `ACH` - ACH + * `CASH` - CASH + * `CHECK` - CHECK + union: + - MethodTypeEnum + - string + source: + openapi: accounting_v3.yml + inline: true + PaymentMethod: + docs: >- + # The PaymentMethod Object + + ### Description + + The `PaymentMethod` object defines how a payment against an invoice is + made. + + + ### Usage Example + + Fetch from the `GET PaymentMethod` endpoint and view payment method + information. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + method_type: + type: PaymentMethodMethodType + docs: |- + The type of the payment method. + + * `CREDIT_CARD` - CREDIT_CARD + * `DEBIT_CARD` - DEBIT_CARD + * `ACH` - ACH + * `CASH` - CASH + * `CHECK` - CHECK + name: + type: string + docs: The payment method’s name + validation: + maxLength: 255 + is_active: + type: optional + docs: '`True` if the payment method is active, `False` if not.' + remote_updated_at: + type: optional + docs: When the third party's payment method was updated. + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: accounting_v3.yml + PaymentRequestContact: + discriminated: false + docs: The supplier, or customer involved in the payment. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: accounting_v3.yml + inline: true + PaymentRequestAccount: + discriminated: false + docs: The supplier’s or customer’s account in which the payment is made. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: accounting_v3.yml + inline: true + PaymentRequestPaymentMethod: + discriminated: false + docs: The method which this payment was made by. + union: + - type: string + validation: + format: uuid + - PaymentMethod + source: + openapi: accounting_v3.yml + inline: true + PaymentRequestCurrency: + discriminated: false + docs: >- + The payment's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + union: + - TransactionCurrencyEnum + - string + source: + openapi: accounting_v3.yml + inline: true + PaymentRequestCompany: + discriminated: false + docs: The company the payment belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: accounting_v3.yml + inline: true + PaymentRequestType: + discriminated: false + docs: |- + The type of the invoice. + + * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE + * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE + union: + - PaymentTypeEnum + - string + source: + openapi: accounting_v3.yml + inline: true + PaymentRequestTrackingCategoriesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: accounting_v3.yml + inline: true + PaymentRequestAccountingPeriod: + discriminated: false + docs: The accounting period that the Payment was generated in. + union: + - type: string + validation: + format: uuid + - AccountingPeriod + source: + openapi: accounting_v3.yml + inline: true + PaymentRequestAppliedToLinesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - PaymentLineItemRequest + source: + openapi: accounting_v3.yml + inline: true + PaymentRequest: + docs: >- + # The Payment Object + + ### Description + + The `Payment` object represents general payments made towards a specific + transaction. + + + ### Usage Example + + Fetch from the `GET Payment` endpoint and view an invoice's payment. + properties: + transaction_date: + type: optional + docs: The payment's transaction date. + contact: + type: optional + docs: The supplier, or customer involved in the payment. + account: + type: optional + docs: The supplier’s or customer’s account in which the payment is made. + payment_method: + type: optional + docs: The method which this payment was made by. + currency: + type: optional + docs: >- + The payment's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + exchange_rate: + type: optional + docs: The payment's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + company: + type: optional + docs: The company the payment belongs to. + total_amount: + type: optional + docs: >- + The total amount of money being paid to the supplier, or customer, + after taxes. + type: + type: optional + docs: |- + The type of the invoice. + + * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE + * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE + tracking_categories: optional>> + accounting_period: + type: optional + docs: The accounting period that the Payment was generated in. + applied_to_lines: + type: optional> + docs: A list of “Payment Applied to Lines” objects. + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: accounting_v3.yml + PaymentResponse: + properties: + model: Payment + warnings: list + errors: list + logs: optional> + source: + openapi: accounting_v3.yml + PaymentTermCompany: + discriminated: false + docs: The subsidiary that the payment term belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: accounting_v3.yml + inline: true + PaymentTerm: + docs: >- + # The PaymentTerm Object + + ### Description + + The `PaymentTerm` object is the agreed-upon conditions between a buyer and + a seller that define the timing, + + amount, and conditions under which payment for goods or services must be + made. + + + ### Usage Example + + Fetch from the `GET PaymentTerm` endpoint and view payment term + information. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: string + docs: The name of the payment term. + validation: + maxLength: 255 + is_active: + type: optional + docs: '`True` if the payment term is active, `False` if not.' + company: + type: optional + docs: The subsidiary that the payment term belongs to. + days_until_due: + type: optional + docs: The number of days after the invoice date that payment is due. + validation: + min: -2147483648 + max: 2147483647 + discount_days: + type: optional + docs: The number of days the invoice must be paid before discounts expire. + validation: + min: -2147483648 + max: 2147483647 + remote_last_modified_at: + type: optional + docs: When the third party's payment term was modified. + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: accounting_v3.yml + PaymentTypeEnum: + enum: + - ACCOUNTS_PAYABLE + - ACCOUNTS_RECEIVABLE + docs: |- + * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE + * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE + source: + openapi: accounting_v3.yml + PostingStatusEnum: + enum: + - UNPOSTED + - POSTED + docs: |- + * `UNPOSTED` - UNPOSTED + * `POSTED` - POSTED + source: + openapi: accounting_v3.yml + ProjectCompany: + discriminated: false + docs: The subsidiary that the project belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: accounting_v3.yml + inline: true + ProjectContact: + discriminated: false + docs: The supplier, or customer involved in the project. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: accounting_v3.yml + inline: true + Project: + docs: >- + # The Project Object + + ### Description + + The `Project` object is used to track and manage time, costs, resources, + and revenue for specific initiatives or work efforts. + + It provides classification on transactions for allocating expenses, + revenue, and activities to a specific project for financial reporting. + + + ### Usage Example + + Fetch from the `GET Project` endpoint and view project information. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: string + docs: The project’s name + validation: + maxLength: 255 + is_active: + type: optional + docs: '`True` if the project is active, `False` if the project is not active.' + company: + type: optional + docs: The subsidiary that the project belongs to. + contact: + type: optional + docs: The supplier, or customer involved in the project. + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: accounting_v3.yml + PurchaseOrderStatus: + discriminated: false + docs: |- + The purchase order's status. + + * `DRAFT` - DRAFT + * `SUBMITTED` - SUBMITTED + * `AUTHORIZED` - AUTHORIZED + * `BILLED` - BILLED + * `DELETED` - DELETED + union: + - PurchaseOrderStatusEnum + - string + source: + openapi: accounting_v3.yml + inline: true + PurchaseOrderDeliveryAddress: + discriminated: false + docs: The purchase order's delivery address. + union: + - type: string + validation: + format: uuid + - Address + source: + openapi: accounting_v3.yml + inline: true + PurchaseOrderVendor: + discriminated: false + docs: The party fulfilling the purchase order. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: accounting_v3.yml + inline: true + PurchaseOrderCompany: + discriminated: false + docs: The company the purchase order belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: accounting_v3.yml + inline: true + PurchaseOrderCurrency: + discriminated: false + docs: >- + The purchase order's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + union: + - TransactionCurrencyEnum + - string + source: + openapi: accounting_v3.yml + inline: true + PurchaseOrderPaymentTerm: + discriminated: false + docs: The payment term that applies to this transaction. + union: + - type: string + validation: + format: uuid + - PaymentTerm + source: + openapi: accounting_v3.yml + inline: true + PurchaseOrderTrackingCategoriesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: accounting_v3.yml + inline: true + PurchaseOrderAccountingPeriod: + discriminated: false + docs: The accounting period that the PurchaseOrder was generated in. + union: + - type: string + validation: + format: uuid + - AccountingPeriod + source: + openapi: accounting_v3.yml + inline: true + PurchaseOrder: + docs: >- + # The PurchaseOrder Object + + ### Description + + A `PurchaseOrder` represents a request to purchase goods or services from + a vendor. It outlines the details of the purchase, such as the items or + services requested, quantities, prices, and delivery details. + + + A `PurchaseOrder` is a crucial component of the procurement process, but + does not typically result in any impact on the company’s general ledger. + The general ledger is typically only affected when the `PurchaseOrder` is + fulfilled as an *Accounts Payable* `Invoice` object (also known as a + Bill). + + + ### Usage Example + + Fetch from the `LIST PurchaseOrders` endpoint and view a company's + purchase orders. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + status: + type: optional + docs: |- + The purchase order's status. + + * `DRAFT` - DRAFT + * `SUBMITTED` - SUBMITTED + * `AUTHORIZED` - AUTHORIZED + * `BILLED` - BILLED + * `DELETED` - DELETED + issue_date: + type: optional + docs: The purchase order's issue date. + purchase_order_number: + type: optional + docs: The human-readable number of the purchase order. + validation: + maxLength: 100 + delivery_date: + type: optional + docs: The purchase order's delivery date. + delivery_address: + type: optional + docs: The purchase order's delivery address. + customer: + type: optional + docs: The contact making the purchase order. + validation: + format: uuid + vendor: + type: optional + docs: The party fulfilling the purchase order. + memo: + type: optional + docs: A memo attached to the purchase order. + company: + type: optional + docs: The company the purchase order belongs to. + total_amount: + type: optional + docs: The purchase order's total amount. + currency: + type: optional + docs: >- + The purchase order's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + exchange_rate: + type: optional + docs: The purchase order's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + payment_term: + type: optional + docs: The payment term that applies to this transaction. + line_items: + type: optional> + access: read-only + inclusive_of_tax: + type: optional + docs: >- + If the transaction is inclusive or exclusive of tax. `True` if + inclusive, `False` if exclusive. + tracking_categories: optional>> + accounting_period: + type: optional + docs: The accounting period that the PurchaseOrder was generated in. + remote_created_at: + type: optional + docs: When the third party's purchase order note was created. + remote_updated_at: + type: optional + docs: When the third party's purchase order note was updated. + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + remote_fields: + type: optional> + access: read-only + source: + openapi: accounting_v3.yml + PurchaseOrderLineItemItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Item + source: + openapi: accounting_v3.yml + inline: true + PurchaseOrderLineItemCurrency: + discriminated: false + docs: >- + The purchase order line item's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + union: + - TransactionCurrencyEnum + - string + source: + openapi: accounting_v3.yml + inline: true + PurchaseOrderLineItem: + docs: >- + # The PurchaseOrderLineItem Object + + ### Description + + The `PurchaseOrderLineItem` object is used to represent a purchase order's + line item. + + + ### Usage Example + + Fetch from the `GET PurchaseOrder` endpoint and view a company's purchase + orders. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + description: + type: optional + docs: A description of the good being purchased. + unit_price: + type: optional + docs: The line item's unit price. + quantity: + type: optional + docs: The line item's quantity. + item: optional + account: + type: optional + docs: The purchase order line item's account. + validation: + format: uuid + tracking_category: + type: optional + docs: The purchase order line item's associated tracking category. + validation: + format: uuid + availability: deprecated + tracking_categories: + type: optional>> + docs: The purchase order line item's associated tracking categories. + tax_amount: + type: optional + docs: The purchase order line item's tax amount. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + total_line_amount: + type: optional + docs: The purchase order line item's total amount. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + currency: + type: optional + docs: >- + The purchase order line item's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + tax_rate: + type: optional + docs: The tax rate that applies to this line item. + validation: + format: uuid + exchange_rate: + type: optional + docs: The purchase order line item's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + company: + type: optional + docs: The company the purchase order line item belongs to. + validation: + format: uuid + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + remote_fields: + type: optional> + access: read-only + source: + openapi: accounting_v3.yml + PurchaseOrderLineItemRequestItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Item + source: + openapi: accounting_v3.yml + inline: true + PurchaseOrderLineItemRequestCurrency: + discriminated: false + docs: >- + The purchase order line item's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + union: + - TransactionCurrencyEnum + - string + source: + openapi: accounting_v3.yml + inline: true + PurchaseOrderLineItemRequest: + docs: >- + # The PurchaseOrderLineItem Object + + ### Description + + The `PurchaseOrderLineItem` object is used to represent a purchase order's + line item. + + + ### Usage Example + + Fetch from the `GET PurchaseOrder` endpoint and view a company's purchase + orders. + properties: + remote_id: + type: optional + docs: The third-party API ID of the matching object. + description: + type: optional + docs: A description of the good being purchased. + unit_price: + type: optional + docs: The line item's unit price. + quantity: + type: optional + docs: The line item's quantity. + item: optional + account: + type: optional + docs: The purchase order line item's account. + validation: + format: uuid + tracking_category: + type: optional + docs: The purchase order line item's associated tracking category. + validation: + format: uuid + availability: deprecated + tracking_categories: + type: optional>> + docs: The purchase order line item's associated tracking categories. + tax_amount: + type: optional + docs: The purchase order line item's tax amount. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + total_line_amount: + type: optional + docs: The purchase order line item's total amount. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + currency: + type: optional + docs: >- + The purchase order line item's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + tax_rate: + type: optional + docs: The tax rate that applies to this line item. + validation: + format: uuid + exchange_rate: + type: optional + docs: The purchase order line item's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + company: + type: optional + docs: The company the purchase order line item belongs to. + validation: + format: uuid + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: accounting_v3.yml + PurchaseOrderRequestStatus: + discriminated: false + docs: |- + The purchase order's status. + + * `DRAFT` - DRAFT + * `SUBMITTED` - SUBMITTED + * `AUTHORIZED` - AUTHORIZED + * `BILLED` - BILLED + * `DELETED` - DELETED + union: + - PurchaseOrderStatusEnum + - string + source: + openapi: accounting_v3.yml + inline: true + PurchaseOrderRequestDeliveryAddress: + discriminated: false + docs: The purchase order's delivery address. + union: + - type: string + validation: + format: uuid + - Address + source: + openapi: accounting_v3.yml + inline: true + PurchaseOrderRequestVendor: + discriminated: false + docs: The party fulfilling the purchase order. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: accounting_v3.yml + inline: true + PurchaseOrderRequestCompany: + discriminated: false + docs: The company the purchase order belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: accounting_v3.yml + inline: true + PurchaseOrderRequestPaymentTerm: + discriminated: false + docs: The payment term that applies to this transaction. + union: + - type: string + validation: + format: uuid + - PaymentTerm + source: + openapi: accounting_v3.yml + inline: true + PurchaseOrderRequestCurrency: + discriminated: false + docs: >- + The purchase order's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + union: + - TransactionCurrencyEnum + - string + source: + openapi: accounting_v3.yml + inline: true + PurchaseOrderRequestTrackingCategoriesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: accounting_v3.yml + inline: true + PurchaseOrderRequest: + docs: >- + # The PurchaseOrder Object + + ### Description + + The `PurchaseOrder` object is a record of request for a product or service + between a buyer and seller. + + + ### Usage Example + + Fetch from the `LIST PurchaseOrders` endpoint and view a company's + purchase orders. + properties: + status: + type: optional + docs: |- + The purchase order's status. + + * `DRAFT` - DRAFT + * `SUBMITTED` - SUBMITTED + * `AUTHORIZED` - AUTHORIZED + * `BILLED` - BILLED + * `DELETED` - DELETED + issue_date: + type: optional + docs: The purchase order's issue date. + delivery_date: + type: optional + docs: The purchase order's delivery date. + delivery_address: + type: optional + docs: The purchase order's delivery address. + customer: + type: optional + docs: The contact making the purchase order. + validation: + format: uuid + vendor: + type: optional + docs: The party fulfilling the purchase order. + memo: + type: optional + docs: A memo attached to the purchase order. + company: + type: optional + docs: The company the purchase order belongs to. + total_amount: + type: optional + docs: The purchase order's total amount. + payment_term: + type: optional + docs: The payment term that applies to this transaction. + currency: + type: optional + docs: >- + The purchase order's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + inclusive_of_tax: + type: optional + docs: >- + If the transaction is inclusive or exclusive of tax. `True` if + inclusive, `False` if exclusive. + exchange_rate: + type: optional + docs: The purchase order's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + tracking_categories: optional>> + line_items: optional> + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: accounting_v3.yml + PurchaseOrderResponse: + properties: + model: PurchaseOrder + warnings: list + errors: list + logs: optional> + source: + openapi: accounting_v3.yml + PurchaseOrderStatusEnum: + enum: + - DRAFT + - SUBMITTED + - AUTHORIZED + - BILLED + - DELETED + docs: |- + * `DRAFT` - DRAFT + * `SUBMITTED` - SUBMITTED + * `AUTHORIZED` - AUTHORIZED + * `BILLED` - BILLED + * `DELETED` - DELETED + source: + openapi: accounting_v3.yml + RemoteData: + docs: >- + # The RemoteData Object + + ### Description + + The `RemoteData` object is used to represent the full data pulled from the + third-party API for an object. + + + ### Usage Example + + TODO + properties: + path: + type: string + docs: The third-party API path that is being called. + data: + type: optional + access: read-only + source: + openapi: accounting_v3.yml + RemoteEndpointInfo: + properties: + method: string + url_path: string + field_traversal_path: list + source: + openapi: accounting_v3.yml + RemoteFieldRemoteFieldClass: + discriminated: false + union: + - string + - RemoteFieldClass + source: + openapi: accounting_v3.yml + inline: true + RemoteField: + properties: + remote_field_class: RemoteFieldRemoteFieldClass + value: optional + source: + openapi: accounting_v3.yml + RemoteFieldApiCoverage: + discriminated: false + union: + - integer + - double + source: + openapi: accounting_v3.yml + inline: true + RemoteFieldApi: + properties: + schema: map + remote_key_name: string + remote_endpoint_info: RemoteEndpointInfo + example_values: optional> + advanced_metadata: optional + coverage: + type: optional + access: read-only + source: + openapi: accounting_v3.yml + RemoteFieldApiResponse: + properties: + Account: optional> + AccountingAttachment: optional> + BalanceSheet: optional> + CashFlowStatement: optional> + CompanyInfo: optional> + Contact: optional> + IncomeStatement: optional> + CreditNote: optional> + Item: optional> + PurchaseOrder: optional> + TrackingCategory: optional> + JournalEntry: optional> + TaxRate: optional> + Invoice: optional> + Payment: optional> + Expense: optional> + VendorCredit: optional> + Transaction: optional> + AccountingPeriod: optional> + GeneralLedgerTransaction: optional> + BankFeedAccount: optional> + Employee: optional> + PaymentMethod: optional> + Project: optional> + PaymentTerm: optional> + source: + openapi: accounting_v3.yml + RemoteFieldClass: + properties: + id: optional + display_name: optional + remote_key_name: optional + description: optional + is_custom: optional + is_required: optional + field_type: optional + field_format: optional + field_choices: optional> + item_schema: optional + source: + openapi: accounting_v3.yml + RemoteFieldRequestRemoteFieldClass: + discriminated: false + union: + - type: string + validation: + format: uuid + - RemoteFieldClass + source: + openapi: accounting_v3.yml + inline: true + RemoteFieldRequest: + properties: + remote_field_class: RemoteFieldRequestRemoteFieldClass + value: optional + source: + openapi: accounting_v3.yml + RemoteKey: + docs: >- + # The RemoteKey Object + + ### Description + + The `RemoteKey` object is used to represent a request for a new remote + key. + + + ### Usage Example + + Post a `GenerateRemoteKey` to receive a new `RemoteKey`. + properties: + name: string + key: string + source: + openapi: accounting_v3.yml + RemoteResponse: + docs: >- + # The RemoteResponse Object + + ### Description + + The `RemoteResponse` object is used to represent information returned from + a third-party endpoint. + + + ### Usage Example + + View the `RemoteResponse` returned from your `DataPassthrough`. + properties: + method: string + path: string + status: integer + response: unknown + response_headers: optional> + response_type: optional + headers: optional> + source: + openapi: accounting_v3.yml + ReportItem: + docs: >- + # The ReportItem Object + + ### Description + + The `ReportItem` object is used to represent a report item for a Balance + Sheet, Cash Flow Statement or Profit and Loss Report. + + + ### Usage Example + + Fetch from the `GET BalanceSheet` endpoint and view the balance sheet's + report items. + properties: + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The report item's name. + value: + type: optional + docs: The report item's value. + sub_items: + type: optional>> + access: read-only + company: + type: optional + docs: The company the report item belongs to. + validation: + format: uuid + remote_was_deleted: + type: optional + docs: >- + 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/). + source: + openapi: accounting_v3.yml + RequestFormatEnum: + enum: + - JSON + - XML + - MULTIPART + docs: |- + * `JSON` - JSON + * `XML` - XML + * `MULTIPART` - MULTIPART + source: + openapi: accounting_v3.yml + ResponseTypeEnum: + enum: + - JSON + - BASE64_GZIP + docs: |- + * `JSON` - JSON + * `BASE64_GZIP` - BASE64_GZIP + source: + openapi: accounting_v3.yml + RoleEnum: + enum: + - ADMIN + - DEVELOPER + - MEMBER + - API + - SYSTEM + - MERGE_TEAM + docs: |- + * `ADMIN` - ADMIN + * `DEVELOPER` - DEVELOPER + * `MEMBER` - MEMBER + * `API` - API + * `SYSTEM` - SYSTEM + * `MERGE_TEAM` - MERGE_TEAM + source: + openapi: accounting_v3.yml + SelectiveSyncConfigurationsUsageEnum: + enum: + - IN_NEXT_SYNC + - IN_LAST_SYNC + docs: |- + * `IN_NEXT_SYNC` - IN_NEXT_SYNC + * `IN_LAST_SYNC` - IN_LAST_SYNC + source: + openapi: accounting_v3.yml + Status7D1Enum: + enum: + - ACTIVE + - ARCHIVED + docs: |- + * `ACTIVE` - ACTIVE + * `ARCHIVED` - ARCHIVED + source: + openapi: accounting_v3.yml + Status895Enum: + enum: + - ACTIVE + - INACTIVE + docs: |- + * `ACTIVE` - ACTIVE + * `INACTIVE` - INACTIVE + source: + openapi: accounting_v3.yml + StatusFd5Enum: + enum: + - SYNCING + - DONE + - FAILED + - DISABLED + - PAUSED + - PARTIALLY_SYNCED + docs: |- + * `SYNCING` - SYNCING + * `DONE` - DONE + * `FAILED` - FAILED + * `DISABLED` - DISABLED + * `PAUSED` - PAUSED + * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED + source: + openapi: accounting_v3.yml + SyncStatusLastSyncResult: + discriminated: false + union: + - LastSyncResultEnum + - string + source: + openapi: accounting_v3.yml + inline: true + SyncStatusStatus: + discriminated: false + union: + - StatusFd5Enum + - string + source: + openapi: accounting_v3.yml + inline: true + SyncStatus: + docs: >- + # The SyncStatus Object + + ### Description + + The `SyncStatus` object is used to represent the syncing state of an + account + + + ### Usage Example + + View the `SyncStatus` for an account to see how recently its models were + synced. + properties: + model_name: string + model_id: string + last_sync_start: optional + next_sync_start: optional + last_sync_result: optional + last_sync_finished: optional + status: SyncStatusStatus + is_initial_sync: boolean + selective_sync_configurations_usage: optional + source: + openapi: accounting_v3.yml + TaxComponentComponentType: + discriminated: false + docs: >- + Returns PURCHASE if the tax component corresponds to a purchase tax or + SALES if the tax component corresponds to a sales tax. + + + * `SALES` - SALES + + * `PURCHASE` - PURCHASE + union: + - ComponentTypeEnum + - string + source: + openapi: accounting_v3.yml + inline: true + TaxComponent: + docs: >- + # The TaxRate Object + + ### Description + + The `TaxComponent` object is used to represent any sub-taxes that make up + the `TaxRate`. + + + ### Usage Example + + Fetch from the `LIST TaxRates` endpoint and view tax components relevant + to a tax rate. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The tax rate’s name. + validation: + maxLength: 100 + rate: + type: optional + docs: The tax component’s rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + is_compound: + type: optional + docs: Returns True if the tax component is compound, False if not. + component_type: + type: optional + docs: >- + Returns PURCHASE if the tax component corresponds to a purchase tax or + SALES if the tax component corresponds to a sales tax. + + + * `SALES` - SALES + + * `PURCHASE` - PURCHASE + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + source: + openapi: accounting_v3.yml + TaxRateCompany: + discriminated: false + docs: >- + The subsidiary that the tax rate belongs to (in the case of multi-entity + systems). + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: accounting_v3.yml + inline: true + TaxRateStatus: + discriminated: false + docs: >- + The tax rate’s status - `ACTIVE` if an active tax rate, `ARCHIVED` if not + active. + + + * `ACTIVE` - ACTIVE + + * `ARCHIVED` - ARCHIVED + union: + - Status7D1Enum + - string + source: + openapi: accounting_v3.yml + inline: true + TaxRateTaxComponentsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - TaxComponent + source: + openapi: accounting_v3.yml + inline: true + TaxRate: + docs: >- + # The TaxRate Object + + ### Description + + The `TaxRate` object is used to represent a tax rate. + + + ### Usage Example + + Fetch from the `LIST TaxRates` endpoint and view tax rates relevant to a + company. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + company: + type: optional + docs: >- + The subsidiary that the tax rate belongs to (in the case of + multi-entity systems). + code: + type: optional + docs: >- + The tax code associated with this tax rate or group of tax rates from + the third-party platform. + validation: + maxLength: 100 + name: + type: optional + docs: The tax rate’s name. + validation: + maxLength: 100 + description: + type: optional + docs: The tax rate's description. + status: + type: optional + docs: >- + The tax rate’s status - `ACTIVE` if an active tax rate, `ARCHIVED` if + not active. + + + * `ACTIVE` - ACTIVE + + * `ARCHIVED` - ARCHIVED + country: + type: optional + docs: The country the tax rate is associated with. + validation: + maxLength: 100 + total_tax_rate: + type: optional + docs: The tax’s total tax rate - sum of the tax components (not compounded). + effective_tax_rate: + type: optional + docs: >- + The tax rate’s effective tax rate - total amount of tax with + compounding. + tax_components: + type: optional> + docs: The related tax components of the tax rate. + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: accounting_v3.yml + TrackingCategoryStatus: + discriminated: false + docs: |- + The tracking category's status. + + * `ACTIVE` - ACTIVE + * `ARCHIVED` - ARCHIVED + union: + - Status7D1Enum + - string + source: + openapi: accounting_v3.yml + inline: true + TrackingCategoryCategoryType: + discriminated: false + docs: |- + The tracking category’s type. + + * `CLASS` - CLASS + * `DEPARTMENT` - DEPARTMENT + union: + - CategoryTypeEnum + - string + source: + openapi: accounting_v3.yml + inline: true + TrackingCategoryCompany: + discriminated: false + docs: The company the GeneralLedgerTransaction belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: accounting_v3.yml + inline: true + TrackingCategory: + docs: >- + # The TrackingCategory Object + + ### Description + + A `TrackingCategory` object represents a categorization method used to + classify transactions within an accounting platform. They are often used + to group records for reporting and analysis purposes. The most common + types of `TrackingCategories` are Classes and Departments. + + + ### Usage Example + + Fetch from the `GET TrackingCategory` endpoint and view a company's + tracking category. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The tracking category's name. + status: + type: optional + docs: |- + The tracking category's status. + + * `ACTIVE` - ACTIVE + * `ARCHIVED` - ARCHIVED + category_type: + type: optional + docs: |- + The tracking category’s type. + + * `CLASS` - CLASS + * `DEPARTMENT` - DEPARTMENT + parent_category: + type: optional + validation: + format: uuid + company: + type: optional + docs: The company the GeneralLedgerTransaction belongs to. + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + source: + openapi: accounting_v3.yml + TransactionAccount: + discriminated: false + docs: The transaction's account. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: accounting_v3.yml + inline: true + TransactionContact: + discriminated: false + docs: The contact to whom the transaction relates to. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: accounting_v3.yml + inline: true + TransactionCurrency: + discriminated: false + docs: >- + The transaction's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + union: + - TransactionCurrencyEnum + - string + source: + openapi: accounting_v3.yml + inline: true + TransactionTrackingCategoriesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: accounting_v3.yml + inline: true + TransactionAccountingPeriod: + discriminated: false + docs: The accounting period that the Transaction was generated in. + union: + - type: string + validation: + format: uuid + - AccountingPeriod + source: + openapi: accounting_v3.yml + inline: true + Transaction: + docs: >- + # The Transaction Object + + ### Description + + The `Transaction` common model includes records of all types of + transactions that do not appear in other common models. The type of + transaction can be identified through the type field. More specifically, + it will contain all types of transactions outside of: + + * __Credit Notes__ + + * __Expenses__ + + * __Invoices__ + + * __Journal Entries__ + + * __Payments__ + + * __Purchase Orders__ + + * __Vendor Credits__ + + + ### Usage Example + + Fetch from the `GET Transaction` endpoint and view a company's + transactions. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + transaction_type: + type: optional + docs: >- + The type of transaction, which can by any transaction object not + already included in Merge’s common model. + number: + type: optional + docs: The transaction's number used for identifying purposes. + transaction_date: + type: optional + docs: The date upon which the transaction occurred. + account: + type: optional + docs: The transaction's account. + contact: + type: optional + docs: The contact to whom the transaction relates to. + inclusive_of_tax: + type: optional + docs: >- + If the transaction is inclusive or exclusive of tax. `True` if + inclusive, `False` if exclusive. + total_amount: + type: optional + docs: The total amount being paid after taxes. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + currency: + type: optional + docs: >- + The transaction's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + exchange_rate: + type: optional + docs: The transaction's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + company: + type: optional + docs: The company the transaction belongs to. + validation: + format: uuid + tracking_categories: optional>> + line_items: + type: optional> + access: read-only + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + accounting_period: + type: optional + docs: The accounting period that the Transaction was generated in. + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: accounting_v3.yml + TransactionCurrencyEnum: + enum: + - XUA + - AFN + - AFA + - ALL + - ALK + - DZD + - ADP + - AOA + - AOK + - AON + - AOR + - ARA + - ARS + - ARM + - ARP + - ARL + - AMD + - AWG + - AUD + - ATS + - AZN + - AZM + - BSD + - BHD + - BDT + - BBD + - BYN + - BYB + - BYR + - BEF + - BEC + - BEL + - BZD + - BMD + - BTN + - BOB + - BOL + - BOV + - BOP + - BAM + - BAD + - BAN + - BWP + - BRC + - BRZ + - BRE + - BRR + - BRN + - BRB + - BRL + - GBP + - BND + - BGL + - BGN + - BGO + - BGM + - BUK + - BIF + - XPF + - KHR + - CAD + - CVE + - KYD + - XAF + - CLE + - CLP + - CLF + - CNX + - CNY + - CNH + - COP + - COU + - KMF + - CDF + - CRC + - HRD + - HRK + - CUC + - CUP + - CYP + - CZK + - CSK + - DKK + - DJF + - DOP + - NLG + - XCD + - DDM + - ECS + - ECV + - EGP + - GQE + - ERN + - EEK + - ETB + - EUR + - XBA + - XEU + - XBB + - XBC + - XBD + - FKP + - FJD + - FIM + - FRF + - XFO + - XFU + - GMD + - GEK + - GEL + - DEM + - GHS + - GHC + - GIP + - XAU + - GRD + - GTQ + - GWP + - GNF + - GNS + - GYD + - HTG + - HNL + - HKD + - HUF + - IMP + - ISK + - ISJ + - INR + - IDR + - IRR + - IQD + - IEP + - ILS + - ILP + - ILR + - ITL + - JMD + - JPY + - JOD + - KZT + - KES + - KWD + - KGS + - LAK + - LVL + - LVR + - LBP + - LSL + - LRD + - LYD + - LTL + - LTT + - LUL + - LUC + - LUF + - MOP + - MKD + - MKN + - MGA + - MGF + - MWK + - MYR + - MVR + - MVP + - MLF + - MTL + - MTP + - MRU + - MRO + - MUR + - MXV + - MXN + - MXP + - MDC + - MDL + - MCF + - MNT + - MAD + - MAF + - MZE + - MZN + - MZM + - MMK + - NAD + - NPR + - ANG + - TWD + - NZD + - NIO + - NIC + - NGN + - KPW + - NOK + - OMR + - PKR + - XPD + - PAB + - PGK + - PYG + - PEI + - PEN + - PES + - PHP + - XPT + - PLN + - PLZ + - PTE + - GWE + - QAR + - XRE + - RHD + - RON + - ROL + - RUB + - RUR + - RWF + - SVC + - WST + - SAR + - RSD + - CSD + - SCR + - SLL + - XAG + - SGD + - SKK + - SIT + - SBD + - SOS + - ZAR + - ZAL + - KRH + - KRW + - KRO + - SSP + - SUR + - ESP + - ESA + - ESB + - XDR + - LKR + - SHP + - XSU + - SDD + - SDG + - SDP + - SRD + - SRG + - SZL + - SEK + - CHF + - SYP + - STN + - STD + - TVD + - TJR + - TJS + - TZS + - XTS + - THB + - XXX + - TPE + - TOP + - TTD + - TND + - TRY + - TRL + - TMT + - TMM + - USD + - USN + - USS + - UGX + - UGS + - UAH + - UAK + - AED + - UYW + - UYU + - UYP + - UYI + - UZS + - VUV + - VES + - VEB + - VEF + - VND + - VNN + - CHE + - CHW + - XOF + - YDD + - YER + - YUN + - YUD + - YUM + - YUR + - ZWN + - ZRN + - ZRZ + - ZMW + - ZMK + - ZWD + - ZWR + - ZWL + docs: >- + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + source: + openapi: accounting_v3.yml + TransactionLineItemItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Item + source: + openapi: accounting_v3.yml + inline: true + TransactionLineItemCurrency: + discriminated: false + docs: >- + The line item's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + union: + - TransactionCurrencyEnum + - string + source: + openapi: accounting_v3.yml + inline: true + TransactionLineItem: + docs: >- + # The TransactionLineItem Object + + ### Description + + The `TransactionLineItem` object is used to represent a transaction's line + items. + + + ### Usage Example + + Fetch from the `GET TransactionLineItem` endpoint and view the + transaction's line items. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + memo: + type: optional + docs: >- + An internal note used by the business to clarify purpose of the + transaction. + unit_price: + type: optional + docs: The line item's unit price. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + quantity: + type: optional + docs: The line item's quantity. + validation: + pattern: ^-?\d{0,24}(?:\.\d{0,8})?$ + item: optional + account: + type: optional + docs: The line item's account. + validation: + format: uuid + tracking_category: + type: optional + docs: The line's associated tracking category. + validation: + format: uuid + availability: deprecated + tracking_categories: + type: optional>> + docs: The transaction line item's associated tracking categories. + total_line_amount: + type: optional + docs: The line item's total. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + tax_rate: + type: optional + docs: The tax rate that applies to this line item. + validation: + format: uuid + currency: + type: optional + docs: >- + The line item's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + exchange_rate: + type: optional + docs: The line item's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + company: + type: optional + docs: The company the line belongs to. + validation: + format: uuid + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + source: + openapi: accounting_v3.yml + Type2BbEnum: + enum: + - INVENTORY + - NON_INVENTORY + - SERVICE + - UNKNOWN + docs: |- + * `INVENTORY` - INVENTORY + * `NON_INVENTORY` - NON_INVENTORY + * `SERVICE` - SERVICE + * `UNKNOWN` - UNKNOWN + source: + openapi: accounting_v3.yml + UnderlyingTransactionTypeEnum: + enum: + - INVOICE + - EXPENSE + - TRANSACTION + - JOURNAL_ENTRY + - PAYMENT + - VENDOR_CREDIT + - CREDIT_NOTE + docs: |- + * `INVOICE` - INVOICE + * `EXPENSE` - EXPENSE + * `TRANSACTION` - TRANSACTION + * `JOURNAL_ENTRY` - JOURNAL_ENTRY + * `PAYMENT` - PAYMENT + * `VENDOR_CREDIT` - VENDOR_CREDIT + * `CREDIT_NOTE` - CREDIT_NOTE + source: + openapi: accounting_v3.yml + ValidationProblemSource: + properties: + pointer: string + source: + openapi: accounting_v3.yml + VendorCreditVendor: + discriminated: false + docs: The vendor that owes the gift or refund. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: accounting_v3.yml + inline: true + VendorCreditCurrency: + discriminated: false + docs: >- + The vendor credit's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + union: + - TransactionCurrencyEnum + - string + source: + openapi: accounting_v3.yml + inline: true + VendorCreditCompany: + discriminated: false + docs: The company the vendor credit belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: accounting_v3.yml + inline: true + VendorCreditTrackingCategoriesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: accounting_v3.yml + inline: true + VendorCreditAccountingPeriod: + discriminated: false + docs: The accounting period that the VendorCredit was generated in. + union: + - type: string + validation: + format: uuid + - AccountingPeriod + source: + openapi: accounting_v3.yml + inline: true + VendorCredit: + docs: >- + # The VendorCredit Object + + ### Description + + A `VendorCredit` is transaction issued by a vendor to the accounting + company, indicating a reduction or cancellation of the amount owed to the + vendor. It is most generally used as an adjustment note used to rectify + errors, returns, or overpayments related to a purchasing transaction. A + `VendorCredit` can be applied to `Accounts Payable` Invoices to decrease + the overall amount of the `Invoice`. + + + ### Usage Example + + Fetch from the `GET VendorCredit` endpoint and view a company's vendor + credits. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + number: + type: optional + docs: The vendor credit's number. + transaction_date: + type: optional + docs: The vendor credit's transaction date. + vendor: + type: optional + docs: The vendor that owes the gift or refund. + total_amount: + type: optional + docs: The vendor credit's total amount. + currency: + type: optional + docs: >- + The vendor credit's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + exchange_rate: + type: optional + docs: The vendor credit's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + inclusive_of_tax: + type: optional + docs: >- + If the transaction is inclusive or exclusive of tax. `True` if + inclusive, `False` if exclusive. + company: + type: optional + docs: The company the vendor credit belongs to. + lines: + type: optional> + access: read-only + tracking_categories: optional>> + applied_to_lines: + type: optional> + docs: A list of VendorCredit Applied to Lines objects. + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + accounting_period: + type: optional + docs: The accounting period that the VendorCredit was generated in. + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: accounting_v3.yml + VendorCreditApplyLineForInvoiceVendorCredit: + discriminated: false + union: + - type: string + validation: + format: uuid + - VendorCredit + source: + openapi: accounting_v3.yml + inline: true + VendorCreditApplyLineForInvoice: + docs: >- + # The VendorCreditApplyLine Object + + ### Description + + The `VendorCreditApplyLine` object is used to represent a applied vendor + credit. + + + ### Usage Example + + Fetch from the `GET VendorCredit` endpoint and view the vendor credit's + applied to lines. + properties: + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + vendor_credit: optional + applied_date: + type: optional + docs: Date that the vendor credit is applied to the invoice. + applied_amount: + type: optional + docs: The amount of the VendorCredit applied to the invoice. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + source: + openapi: accounting_v3.yml + VendorCreditApplyLineForVendorCreditInvoice: + discriminated: false + union: + - type: string + validation: + format: uuid + - Invoice + source: + openapi: accounting_v3.yml + inline: true + VendorCreditApplyLineForVendorCredit: + docs: >- + # The VendorCreditApplyLine Object + + ### Description + + The `VendorCreditApplyLine` object is used to represent a applied vendor + credit. + + + ### Usage Example + + Fetch from the `GET VendorCredit` endpoint and view the vendor credit's + applied to lines. + properties: + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + invoice: optional + applied_date: + type: optional + docs: Date that the vendor credit is applied to the invoice. + applied_amount: + type: optional + docs: The amount of the VendorCredit applied to the invoice. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + source: + openapi: accounting_v3.yml + VendorCreditApplyLineForVendorCreditRequestInvoice: + discriminated: false + union: + - type: string + validation: + format: uuid + - Invoice + source: + openapi: accounting_v3.yml + inline: true + VendorCreditApplyLineForVendorCreditRequest: + docs: >- + # The VendorCreditApplyLine Object + + ### Description + + The `VendorCreditApplyLine` object is used to represent a applied vendor + credit. + + + ### Usage Example + + Fetch from the `GET VendorCredit` endpoint and view the vendor credit's + applied to lines. + properties: + remote_id: + type: optional + docs: The third-party API ID of the matching object. + invoice: optional + applied_date: + type: optional + docs: Date that the vendor credit is applied to the invoice. + applied_amount: + type: optional + docs: The amount of the VendorCredit applied to the invoice. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: accounting_v3.yml + VendorCreditLineAccount: + discriminated: false + docs: The line's account. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: accounting_v3.yml + inline: true + VendorCreditLineProject: + discriminated: false + union: + - type: string + validation: + format: uuid + - Project + source: + openapi: accounting_v3.yml + inline: true + VendorCreditLineContact: + discriminated: false + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: accounting_v3.yml + inline: true + VendorCreditLine: + docs: >- + # The VendorCreditLine Object + + ### Description + + The `VendorCreditLine` object is used to represent a vendor credit's line + items. + + + ### Usage Example + + Fetch from the `GET VendorCredit` endpoint and view the vendor credit's + line items. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + net_amount: + type: optional + docs: The full value of the credit. + tracking_category: + type: optional + docs: The line's associated tracking category. + validation: + format: uuid + availability: deprecated + tracking_categories: + type: optional>> + docs: The vendor credit line item's associated tracking categories. + description: + type: optional + docs: The line's description. + account: + type: optional + docs: The line's account. + company: + type: optional + docs: The company the line belongs to. + validation: + format: uuid + project: optional + contact: optional + tax_rate: + type: optional + docs: The tax rate that applies to this line item. + validation: + format: uuid + exchange_rate: + type: optional + docs: The vendor credit line item's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + source: + openapi: accounting_v3.yml + VendorCreditLineRequestAccount: + discriminated: false + docs: The line's account. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: accounting_v3.yml + inline: true + VendorCreditLineRequestProject: + discriminated: false + union: + - type: string + validation: + format: uuid + - Project + source: + openapi: accounting_v3.yml + inline: true + VendorCreditLineRequestContact: + discriminated: false + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: accounting_v3.yml + inline: true + VendorCreditLineRequest: + docs: >- + # The VendorCreditLine Object + + ### Description + + The `VendorCreditLine` object is used to represent a vendor credit's line + items. + + + ### Usage Example + + Fetch from the `GET VendorCredit` endpoint and view the vendor credit's + line items. + properties: + remote_id: + type: optional + docs: The third-party API ID of the matching object. + net_amount: + type: optional + docs: The full value of the credit. + tracking_category: + type: optional + docs: The line's associated tracking category. + validation: + format: uuid + availability: deprecated + tracking_categories: + type: optional>> + docs: The vendor credit line item's associated tracking categories. + description: + type: optional + docs: The line's description. + account: + type: optional + docs: The line's account. + company: + type: optional + docs: The company the line belongs to. + validation: + format: uuid + project: optional + contact: optional + tax_rate: + type: optional + docs: The tax rate that applies to this line item. + validation: + format: uuid + exchange_rate: + type: optional + docs: The vendor credit line item's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: accounting_v3.yml + VendorCreditRequestVendor: + discriminated: false + docs: The vendor that owes the gift or refund. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: accounting_v3.yml + inline: true + VendorCreditRequestCurrency: + discriminated: false + docs: >- + The vendor credit's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + union: + - TransactionCurrencyEnum + - string + source: + openapi: accounting_v3.yml + inline: true + VendorCreditRequestCompany: + discriminated: false + docs: The company the vendor credit belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: accounting_v3.yml + inline: true + VendorCreditRequestTrackingCategoriesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: accounting_v3.yml + inline: true + VendorCreditRequestAccountingPeriod: + discriminated: false + docs: The accounting period that the VendorCredit was generated in. + union: + - type: string + validation: + format: uuid + - AccountingPeriod + source: + openapi: accounting_v3.yml + inline: true + VendorCreditRequest: + docs: >- + # The VendorCredit Object + + ### Description + + A `VendorCredit` is transaction issued by a vendor to the accounting + company, indicating a reduction or cancellation of the amount owed to the + vendor. It is most generally used as an adjustment note used to rectify + errors, returns, or overpayments related to a purchasing transaction. A + `VendorCredit` can be applied to `Accounts Payable` Invoices to decrease + the overall amount of the `Invoice`. + + + ### Usage Example + + Fetch from the `GET VendorCredit` endpoint and view a company's vendor + credits. + properties: + number: + type: optional + docs: The vendor credit's number. + transaction_date: + type: optional + docs: The vendor credit's transaction date. + vendor: + type: optional + docs: The vendor that owes the gift or refund. + total_amount: + type: optional + docs: The vendor credit's total amount. + currency: + type: optional + docs: >- + The vendor credit's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + exchange_rate: + type: optional + docs: The vendor credit's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + inclusive_of_tax: + type: optional + docs: >- + If the transaction is inclusive or exclusive of tax. `True` if + inclusive, `False` if exclusive. + company: + type: optional + docs: The company the vendor credit belongs to. + tracking_categories: optional>> + applied_to_lines: + type: optional> + docs: A list of VendorCredit Applied to Lines objects. + accounting_period: + type: optional + docs: The accounting period that the VendorCredit was generated in. + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: accounting_v3.yml + VendorCreditResponse: + properties: + model: VendorCredit + warnings: list + errors: list + logs: optional> + source: + openapi: accounting_v3.yml + WarningValidationProblem: + properties: + source: optional + title: string + detail: string + problem_type: string + source: + openapi: accounting_v3.yml + WebhookReceiver: + properties: + event: string + is_active: boolean + key: optional + source: + openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/accountDetails.yml b/.mock/definition/Accounting/accountDetails.yml new file mode 100644 index 000000000..2ed0ac3ab --- /dev/null +++ b/.mock/definition/Accounting/accountDetails.yml @@ -0,0 +1,36 @@ +imports: + accountingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + retrieve: + path: /accounting/v1/account-details + method: GET + auth: true + docs: Get details for a linked account. + source: + openapi: accounting_v3.yml + response: + docs: '' + type: accountingRoot.AccountDetails + status-code: 200 + examples: + - headers: {} + response: + body: + id: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd + integration: BambooHR + integration_slug: bamboohr + category: hris + end_user_origin_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + end_user_organization_name: Waystar Royco + end_user_email_address: kendall.roy@waystar-royco.com + status: COMPLETE + webhook_listener_url: >- + https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 + is_duplicate: true + account_type: PRODUCTION + completed_at: '2024-08-26T20:11:19Z' + source: + openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/accountToken.yml b/.mock/definition/Accounting/accountToken.yml new file mode 100644 index 000000000..3e8083ad8 --- /dev/null +++ b/.mock/definition/Accounting/accountToken.yml @@ -0,0 +1,44 @@ +imports: + accountingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + retrieve: + path: /accounting/v1/account-token/{public_token} + method: GET + auth: true + docs: >- + Returns the account token for the end user with the provided public + token. + source: + openapi: accounting_v3.yml + path-parameters: + public_token: string + response: + docs: '' + type: accountingRoot.AccountToken + status-code: 200 + examples: + - path-parameters: + public_token: public_token + response: + body: + account_token: T9klMDQrcHdm9jrtHuOS2Nf06BIHwMNjpPXPMB + integration: + name: name + abbreviated_name: abbreviated_name + categories: + - hris + image: image + square_image: square_image + color: color + slug: slug + api_endpoints_to_documentation_urls: + key: value + webhook_setup_guide_url: webhook_setup_guide_url + category_beta_status: + key: value + id: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd + source: + openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/accountingPeriods.yml b/.mock/definition/Accounting/accountingPeriods.yml new file mode 100644 index 000000000..95e74f284 --- /dev/null +++ b/.mock/definition/Accounting/accountingPeriods.yml @@ -0,0 +1,123 @@ +imports: + accountingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/accounting-periods + method: GET + auth: true + docs: Returns a list of `AccountingPeriod` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: accounting_v3.yml + request: + name: AccountingPeriodsListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: accountingRoot.PaginatedAccountingPeriodList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 3015f7b1-4d01-460d-bfab-02a52d16cbd0 + remote_id: '2804580' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: April 2020 Financials + status: ACTIVE + start_date: '2020-03-31T00:00:00Z' + end_date: '2020-05-01T00:00:00Z' + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + retrieve: + path: /accounting/v1/accounting-periods/{id} + method: GET + auth: true + docs: Returns an `AccountingPeriod` object with the given `id`. + source: + openapi: accounting_v3.yml + path-parameters: + id: string + request: + name: AccountingPeriodsRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: accountingRoot.AccountingPeriod + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 3015f7b1-4d01-460d-bfab-02a52d16cbd0 + remote_id: '2804580' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: April 2020 Financials + status: ACTIVE + start_date: '2020-03-31T00:00:00Z' + end_date: '2020-05-01T00:00:00Z' + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + source: + openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/accounts.yml b/.mock/definition/Accounting/accounts.yml new file mode 100644 index 000000000..b08c143dd --- /dev/null +++ b/.mock/definition/Accounting/accounts.yml @@ -0,0 +1,502 @@ +types: + AccountsListRequestRemoteFields: + enum: + - classification + - value: classification,status + name: ClassificationStatus + - status + source: + openapi: accounting_v3.yml + AccountsListRequestShowEnumOrigins: + enum: + - classification + - value: classification,status + name: ClassificationStatus + - status + source: + openapi: accounting_v3.yml + AccountsRetrieveRequestRemoteFields: + enum: + - classification + - value: classification,status + name: ClassificationStatus + - status + source: + openapi: accounting_v3.yml + AccountsRetrieveRequestShowEnumOrigins: + enum: + - classification + - value: classification,status + name: ClassificationStatus + - status + source: + openapi: accounting_v3.yml +imports: + accountingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/accounts + method: GET + auth: true + docs: Returns a list of `Account` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: accounting_v3.yml + request: + name: AccountsListRequest + query-parameters: + account_type: + type: optional + docs: If provided, will only return accounts with the passed in enum. + classification: + type: optional + docs: If provided, will only return accounts with this classification. + company_id: + type: optional + docs: If provided, will only return accounts for this company. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional> + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + name: + type: optional + docs: If provided, will only return Accounts with this name. + page_size: + type: optional + docs: Number of results to return per page. + remote_fields: + type: optional + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + show_enum_origins: + type: optional + docs: >- + A comma separated list of enum field names for which you'd like + the original values to be returned, instead of Merge's normalized + enum values. [Learn + more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) + status: + type: optional + docs: If provided, will only return accounts with this status. + response: + docs: '' + type: accountingRoot.PaginatedAccountList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '21' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Cash + description: Cash + classification: ASSET + type: Asset + account_type: BANK + status: ACTIVE + current_balance: 1.1 + currency: XUA + account_number: X12Y9AB + parent_account: 22d92d6c-22f9-11ed-861d-0242ac120002 + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + create: + path: /accounting/v1/accounts + method: POST + auth: true + docs: Creates an `Account` object with the given values. + source: + openapi: accounting_v3.yml + request: + name: AccountEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: accountingRoot.AccountRequest + content-type: application/json + response: + docs: '' + type: accountingRoot.AccountResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '21' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Cash + description: Cash + classification: ASSET + type: Asset + account_type: BANK + status: ACTIVE + current_balance: 1.1 + currency: XUA + account_number: X12Y9AB + parent_account: 22d92d6c-22f9-11ed-861d-0242ac120002 + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /accounting/v1/accounts/{id} + method: GET + auth: true + docs: Returns an `Account` object with the given `id`. + source: + openapi: accounting_v3.yml + path-parameters: + id: string + request: + name: AccountsRetrieveRequest + query-parameters: + expand: + type: optional> + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional + docs: >- + 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) + response: + docs: '' + type: accountingRoot.Account + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '21' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Cash + description: Cash + classification: ASSET + type: Asset + account_type: BANK + status: ACTIVE + current_balance: 1.1 + currency: XUA + account_number: X12Y9AB + parent_account: 22d92d6c-22f9-11ed-861d-0242ac120002 + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + metaPostRetrieve: + path: /accounting/v1/accounts/meta/post + method: GET + auth: true + docs: Returns metadata for `Account` POSTs. + source: + openapi: accounting_v3.yml + response: + docs: '' + type: accountingRoot.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + source: + openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/addresses.yml b/.mock/definition/Accounting/addresses.yml new file mode 100644 index 000000000..8841ef7fb --- /dev/null +++ b/.mock/definition/Accounting/addresses.yml @@ -0,0 +1,61 @@ +imports: + accountingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + retrieve: + path: /accounting/v1/addresses/{id} + method: GET + auth: true + docs: Returns an `Address` object with the given `id`. + source: + openapi: accounting_v3.yml + path-parameters: + id: string + request: + name: AddressesRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: accountingRoot.Address + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + type: BILLING + street_1: 2920 Broadway + street_2: 2nd Floor + city: New York + state: + key: value + country_subdivision: NY + country: AF + zip_code: '10027' + source: + openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/asyncPassthrough.yml b/.mock/definition/Accounting/asyncPassthrough.yml new file mode 100644 index 000000000..e1fd037b5 --- /dev/null +++ b/.mock/definition/Accounting/asyncPassthrough.yml @@ -0,0 +1,70 @@ +imports: + accountingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /accounting/v1/async-passthrough + method: POST + auth: true + docs: >- + Asynchronously pull data from an endpoint not currently supported by + Merge. + source: + openapi: accounting_v3.yml + request: + body: accountingRoot.DataPassthroughRequest + content-type: application/json + response: + docs: '' + type: accountingRoot.AsyncPassthroughReciept + status-code: 200 + examples: + - headers: {} + request: + method: GET + path: /scooters + response: + body: + async_passthrough_receipt_id: fd29020f-2695-445e-922e-dcd5e81903fd + retrieve: + path: /accounting/v1/async-passthrough/{async_passthrough_receipt_id} + method: GET + auth: true + docs: Retrieves data from earlier async-passthrough POST request + source: + openapi: accounting_v3.yml + path-parameters: + async_passthrough_receipt_id: string + response: + docs: '' + type: AsyncPassthroughRetrieveResponse + status-code: 200 + examples: + - path-parameters: + async_passthrough_receipt_id: async_passthrough_receipt_id + headers: {} + response: + body: + method: GET + path: /scooters + status: 200 + response: + key: value + response_headers: + X-Page-Token: value + response_type: JSON + headers: + EXTRA-HEADER: value + Authorization: + source: + openapi: accounting_v3.yml +types: + AsyncPassthroughRetrieveResponse: + discriminated: false + union: + - accountingRoot.RemoteResponse + - string + source: + openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/asyncTasks.yml b/.mock/definition/Accounting/asyncTasks.yml new file mode 100644 index 000000000..c9126d810 --- /dev/null +++ b/.mock/definition/Accounting/asyncTasks.yml @@ -0,0 +1,81 @@ +imports: + accountingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + retrieve: + path: /accounting/v1/async-tasks/{id} + method: GET + auth: true + docs: Returns an `AsyncPostTask` object with the given `id`. + source: + openapi: accounting_v3.yml + path-parameters: + id: string + response: + docs: '' + type: accountingRoot.AsyncPostTask + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + status: QUEUED + result: + status_code: 201 + response: + model: + id: 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 + remote_id: '990110' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + integration_params: + unique_integration_field: unique_integration_field_value + linked_account_params: + unique_linked_account_field: unique_linked_account_field_value + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + type: ACCOUNTS_RECEIVABLE + contact: 022a2bef-57e5-4def-8ed2-7c41bd9a5ed8 + number: AIQ12546 + issue_date: '2020-03-31T00:00:00Z' + due_date: '2020-04-15T00:00:00Z' + memo: Weekly Payment + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + employee: 7442f0d5-722d-45bd-b807-6e38489d37fe + paid_on_date: '2020-04-01T00:00:00Z' + currency: USD + exchange_rate: '2.9' + status: DRAFT + total_discount: 0 + sub_total: 100 + total_tax_amount: 5 + total_amount: 105 + balance: 105 + inclusive_of_tax: false + remote_updated_at: '2020-04-01T00:00:00Z' + tracking_categories: + - 7dc5ca17-d311-44cd-9ce0-333080367a18 + - 6aa0700c-48e1-4c4a-8162-02e6a582df05 + - 8c933d61-8f5b-4360-ac0c-c9dc87bee763 + purchase_orders: + - e7378d8f-3992-4c2a-8417-ebdc4f2bfeb7 + - dd70ca2f-b120-46fa-889a-9604037f45fd + - 889b281d-739c-4759-95b8-0aedb3947131 + accounting_period: 7dc5ca17-d311-44cd-9ce0-333080367a18 + payments: + - b26fd49a-cbae-470a-a8f8-bcbc119e0390 + applied_payments: + - 9017594e-dc33-4113-a5d2-b0f928e34fdd + remote_data: + - path: /actions + data: + - Varies by platform + source: + openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/attachments.yml b/.mock/definition/Accounting/attachments.yml new file mode 100644 index 000000000..5db063ede --- /dev/null +++ b/.mock/definition/Accounting/attachments.yml @@ -0,0 +1,406 @@ +imports: + accountingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/attachments + method: GET + auth: true + docs: Returns a list of `AccountingAttachment` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: accounting_v3.yml + request: + name: AttachmentsListRequest + query-parameters: + company_id: + type: optional + docs: >- + If provided, will only return accounting attachments for this + company. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: accountingRoot.PaginatedAccountingAttachmentList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '1018270' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + file_name: invoice.png + file_url: >- + https://merge-brand.s3.amazonaws.com/20210315/rect-logo-270x80%402x.png + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + create: + path: /accounting/v1/attachments + method: POST + auth: true + docs: Creates an `AccountingAttachment` object with the given values. + source: + openapi: accounting_v3.yml + request: + name: AccountingAttachmentEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: accountingRoot.AccountingAttachmentRequest + content-type: application/json + response: + docs: '' + type: accountingRoot.AccountingAttachmentResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '1018270' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + file_name: invoice.png + file_url: >- + https://merge-brand.s3.amazonaws.com/20210315/rect-logo-270x80%402x.png + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /accounting/v1/attachments/{id} + method: GET + auth: true + docs: Returns an `AccountingAttachment` object with the given `id`. + source: + openapi: accounting_v3.yml + path-parameters: + id: string + request: + name: AttachmentsRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: accountingRoot.AccountingAttachment + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '1018270' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + file_name: invoice.png + file_url: >- + https://merge-brand.s3.amazonaws.com/20210315/rect-logo-270x80%402x.png + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + metaPostRetrieve: + path: /accounting/v1/attachments/meta/post + method: GET + auth: true + docs: Returns metadata for `AccountingAttachment` POSTs. + source: + openapi: accounting_v3.yml + response: + docs: '' + type: accountingRoot.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + source: + openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/auditTrail.yml b/.mock/definition/Accounting/auditTrail.yml new file mode 100644 index 000000000..906d228f1 --- /dev/null +++ b/.mock/definition/Accounting/auditTrail.yml @@ -0,0 +1,98 @@ +imports: + accountingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/audit-trail + method: GET + auth: true + docs: Gets a list of audit trail events. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: accounting_v3.yml + request: + name: AuditTrailListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + end_date: + type: optional + docs: >- + If included, will only include audit trail events that occurred + before this time + event_type: + type: optional + docs: >- + 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: + type: optional + docs: Number of results to return per page. + start_date: + type: optional + docs: >- + If included, will only include audit trail events that occurred + after this time + user_email: + type: optional + docs: >- + 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. + response: + docs: '' + type: accountingRoot.PaginatedAuditLogEventList + status-code: 200 + examples: + - response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: b5ceea2a-7171-47ce-8090-165cfce5572c + user_name: Gil Feig + user_email: hello@merge.dev + role: ADMIN + ip_address: 192.0.2.123 + event_type: CREATED_REMOTE_PRODUCTION_API_KEY + event_description: >- + Organization-wide Scopes for model hris.Employee updated + from Read to Read+Write + created_at: '2024-01-15T09:30:00Z' + source: + openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/availableActions.yml b/.mock/definition/Accounting/availableActions.yml new file mode 100644 index 000000000..0d5918894 --- /dev/null +++ b/.mock/definition/Accounting/availableActions.yml @@ -0,0 +1,50 @@ +imports: + accountingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + retrieve: + path: /accounting/v1/available-actions + method: GET + auth: true + docs: Returns a list of models and actions available for an account. + source: + openapi: accounting_v3.yml + response: + docs: '' + type: accountingRoot.AvailableActions + status-code: 200 + examples: + - headers: {} + response: + body: + integration: + name: name + abbreviated_name: abbreviated_name + categories: + - hris + image: image + square_image: square_image + color: color + slug: slug + api_endpoints_to_documentation_urls: + key: value + webhook_setup_guide_url: webhook_setup_guide_url + category_beta_status: + key: value + passthrough_available: true + available_model_operations: + - model_name: Candidate + available_operations: + - FETCH + - CREATE + required_post_parameters: + - remote_user_id + supported_fields: + - first_name + - last_name + - company + - title + source: + openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/balanceSheets.yml b/.mock/definition/Accounting/balanceSheets.yml new file mode 100644 index 000000000..fd97b5a2a --- /dev/null +++ b/.mock/definition/Accounting/balanceSheets.yml @@ -0,0 +1,247 @@ +imports: + accountingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/balance-sheets + method: GET + auth: true + docs: Returns a list of `BalanceSheet` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: accounting_v3.yml + request: + name: BalanceSheetsListRequest + query-parameters: + company_id: + type: optional + docs: If provided, will only return balance sheets for this company. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional> + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: accountingRoot.PaginatedBalanceSheetList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 + remote_id: '8937018' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: BalanceSheet + currency: XUA + company: company + date: '2021-10-01T00:00:00Z' + net_assets: 1000 + assets: + - remote_id: '10010' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Assets + value: 1000 + sub_items: + - remote_id: '10300' + name: Revenue - San Francisco + value: 500 + - remote_id: '10301' + name: Revenue - New York + value: 500 + liabilities: + - remote_id: '10011' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Liabilities + value: 500 + sub_items: + - remote_id: '10300' + name: Revenue - San Francisco + value: 500 + - remote_id: '10301' + name: Revenue - New York + value: 500 + equity: + - remote_id: '10012' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Equity + value: 500 + sub_items: + - remote_id: '10300' + name: Revenue - San Francisco + value: 500 + - remote_id: '10301' + name: Revenue - New York + value: 500 + remote_generated_at: '2021-10-01T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + retrieve: + path: /accounting/v1/balance-sheets/{id} + method: GET + auth: true + docs: Returns a `BalanceSheet` object with the given `id`. + source: + openapi: accounting_v3.yml + path-parameters: + id: string + request: + name: BalanceSheetsRetrieveRequest + query-parameters: + expand: + type: optional> + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: accountingRoot.BalanceSheet + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 + remote_id: '8937018' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: BalanceSheet + currency: XUA + company: company + date: '2021-10-01T00:00:00Z' + net_assets: 1000 + assets: + - remote_id: '10010' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Assets + value: 1000 + sub_items: + - remote_id: '10300' + name: Revenue - San Francisco + value: 500 + - remote_id: '10301' + name: Revenue - New York + value: 500 + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: true + liabilities: + - remote_id: '10011' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Liabilities + value: 500 + sub_items: + - remote_id: '10300' + name: Revenue - San Francisco + value: 500 + - remote_id: '10301' + name: Revenue - New York + value: 500 + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: true + equity: + - remote_id: '10012' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Equity + value: 500 + sub_items: + - remote_id: '10300' + name: Revenue - San Francisco + value: 500 + - remote_id: '10301' + name: Revenue - New York + value: 500 + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: true + remote_generated_at: '2021-10-01T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + data: + key: value + source: + openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/bankFeedAccounts.yml b/.mock/definition/Accounting/bankFeedAccounts.yml new file mode 100644 index 000000000..7cb1c3bbd --- /dev/null +++ b/.mock/definition/Accounting/bankFeedAccounts.yml @@ -0,0 +1,390 @@ +imports: + accountingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/bank-feed-accounts + method: GET + auth: true + docs: Returns a list of `BankFeedAccount` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: accounting_v3.yml + request: + name: BankFeedAccountsListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: accountingRoot.PaginatedBankFeedAccountList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: b26fd49a-cbae-470a-a8f8-bcbc119e0390 + remote_id: '987300' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + source_account_id: '123566909' + target_account_id: 49cd5a42-b311-4750-9361-52e2ed1d4653 + source_account_name: Travel Bank Account + source_account_number: '12567' + target_account_name: Netsuite Travel Bank Account + currency: XUA + feed_status: ACTIVE + feed_start_date: '2024-02-02T00:00:00Z' + source_account_balance: 123.94 + account_type: BANK + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + create: + path: /accounting/v1/bank-feed-accounts + method: POST + auth: true + docs: Creates a `BankFeedAccount` object with the given values. + source: + openapi: accounting_v3.yml + request: + name: BankFeedAccountEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: accountingRoot.BankFeedAccountRequest + content-type: application/json + response: + docs: '' + type: accountingRoot.BankFeedAccountResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: b26fd49a-cbae-470a-a8f8-bcbc119e0390 + remote_id: '987300' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + source_account_id: '123566909' + target_account_id: 49cd5a42-b311-4750-9361-52e2ed1d4653 + source_account_name: Travel Bank Account + source_account_number: '12567' + target_account_name: Netsuite Travel Bank Account + currency: XUA + feed_status: ACTIVE + feed_start_date: '2024-02-02T00:00:00Z' + source_account_balance: 123.94 + account_type: BANK + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - key: value + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /accounting/v1/bank-feed-accounts/{id} + method: GET + auth: true + docs: Returns a `BankFeedAccount` object with the given `id`. + source: + openapi: accounting_v3.yml + path-parameters: + id: string + request: + name: BankFeedAccountsRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: accountingRoot.BankFeedAccount + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: b26fd49a-cbae-470a-a8f8-bcbc119e0390 + remote_id: '987300' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + source_account_id: '123566909' + target_account_id: 49cd5a42-b311-4750-9361-52e2ed1d4653 + source_account_name: Travel Bank Account + source_account_number: '12567' + target_account_name: Netsuite Travel Bank Account + currency: XUA + feed_status: ACTIVE + feed_start_date: '2024-02-02T00:00:00Z' + source_account_balance: 123.94 + account_type: BANK + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - key: value + metaPostRetrieve: + path: /accounting/v1/bank-feed-accounts/meta/post + method: GET + auth: true + docs: Returns metadata for `BankFeedAccount` POSTs. + source: + openapi: accounting_v3.yml + response: + docs: '' + type: accountingRoot.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + source: + openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/bankFeedTransactions.yml b/.mock/definition/Accounting/bankFeedTransactions.yml new file mode 100644 index 000000000..3411602c1 --- /dev/null +++ b/.mock/definition/Accounting/bankFeedTransactions.yml @@ -0,0 +1,409 @@ +imports: + accountingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/bank-feed-transactions + method: GET + auth: true + docs: Returns a list of `BankFeedTransaction` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: accounting_v3.yml + request: + name: BankFeedTransactionsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional> + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_processed: + type: optional + docs: >- + If provided, will only return bank feed transactions with this + is_processed value + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: accountingRoot.PaginatedBankFeedTransactionList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: b26fd49a-cbae-470a-a8f8-bcbc119e0390 + remote_id: '987300' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + bank_feed_account: bank_feed_account + transaction_date: '2024-02-02T00:00:00Z' + posted_date: '2024-02-03T00:00:00Z' + amount: 100.1 + description: Lunch expense + transaction_type: payment + payee: Elmo's diner + credit_or_debit: CREDIT + source_transaction_id: '124569' + remote_was_deleted: true + is_processed: true + create: + path: /accounting/v1/bank-feed-transactions + method: POST + auth: true + docs: Creates a `BankFeedTransaction` object with the given values. + source: + openapi: accounting_v3.yml + request: + name: BankFeedTransactionEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: accountingRoot.BankFeedTransactionRequestRequest + content-type: application/json + response: + docs: '' + type: accountingRoot.BankFeedTransactionResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: b26fd49a-cbae-470a-a8f8-bcbc119e0390 + remote_id: '987300' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + bank_feed_account: bank_feed_account + transaction_date: '2024-02-02T00:00:00Z' + posted_date: '2024-02-03T00:00:00Z' + amount: 100.1 + description: Lunch expense + transaction_type: payment + payee: Elmo's diner + credit_or_debit: CREDIT + source_transaction_id: '124569' + remote_was_deleted: true + is_processed: true + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /accounting/v1/bank-feed-transactions/{id} + method: GET + auth: true + docs: Returns a `BankFeedTransaction` object with the given `id`. + source: + openapi: accounting_v3.yml + path-parameters: + id: string + request: + name: BankFeedTransactionsRetrieveRequest + query-parameters: + expand: + type: optional> + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: accountingRoot.BankFeedTransaction + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: b26fd49a-cbae-470a-a8f8-bcbc119e0390 + remote_id: '987300' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + bank_feed_account: bank_feed_account + transaction_date: '2024-02-02T00:00:00Z' + posted_date: '2024-02-03T00:00:00Z' + amount: 100.1 + description: Lunch expense + transaction_type: payment + payee: Elmo's diner + credit_or_debit: CREDIT + source_transaction_id: '124569' + remote_was_deleted: true + is_processed: true + metaPostRetrieve: + path: /accounting/v1/bank-feed-transactions/meta/post + method: GET + auth: true + docs: Returns metadata for `BankFeedTransaction` POSTs. + source: + openapi: accounting_v3.yml + response: + docs: '' + type: accountingRoot.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + source: + openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/cashFlowStatements.yml b/.mock/definition/Accounting/cashFlowStatements.yml new file mode 100644 index 000000000..a5f0900d2 --- /dev/null +++ b/.mock/definition/Accounting/cashFlowStatements.yml @@ -0,0 +1,247 @@ +imports: + accountingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/cash-flow-statements + method: GET + auth: true + docs: Returns a list of `CashFlowStatement` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: accounting_v3.yml + request: + name: CashFlowStatementsListRequest + query-parameters: + company_id: + type: optional + docs: >- + If provided, will only return cash flow statements for this + company. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional> + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: accountingRoot.PaginatedCashFlowStatementList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + remote_id: '8211088' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: CashFlow + currency: XUA + company: company + start_period: '2020-01-01T00:00:00Z' + end_period: '2020-03-31T00:00:00Z' + cash_at_beginning_of_period: 5000 + cash_at_end_of_period: 4063.52 + operating_activities: + - remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-09-18T00:00:00Z' + name: Operating Activities + value: 1000 + sub_items: + - remote_id: '23042938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-09-18T00:00:00Z' + name: Net Income + value: 1097.13 + investing_activities: + - remote_id: '192406939' + created_at: '2021-11-15T00:00:00Z' + modified_at: '2021-11-18T00:00:00Z' + name: Equipment + value: 1000 + sub_items: + - created_at: '2021-11-15T00:00:00Z' + modified_at: '2021-09-18T00:00:00Z' + name: Equipment + value: 1000 + financing_activities: + - remote_id: '192406939' + created_at: '2021-11-15T00:00:00Z' + modified_at: '2021-11-15T00:00:00Z' + sub_items: + - remote_id: '10300' + name: Revenue - San Francisco + value: 500 + - remote_id: '10301' + name: Revenue - New York + value: 500 + remote_generated_at: '2020-04-01T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + retrieve: + path: /accounting/v1/cash-flow-statements/{id} + method: GET + auth: true + docs: Returns a `CashFlowStatement` object with the given `id`. + source: + openapi: accounting_v3.yml + path-parameters: + id: string + request: + name: CashFlowStatementsRetrieveRequest + query-parameters: + expand: + type: optional> + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: accountingRoot.CashFlowStatement + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + remote_id: '8211088' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: CashFlow + currency: XUA + company: company + start_period: '2020-01-01T00:00:00Z' + end_period: '2020-03-31T00:00:00Z' + cash_at_beginning_of_period: 5000 + cash_at_end_of_period: 4063.52 + operating_activities: + - remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-09-18T00:00:00Z' + name: Operating Activities + value: 1000 + sub_items: + - remote_id: '23042938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-09-18T00:00:00Z' + name: Net Income + value: 1097.13 + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: true + investing_activities: + - remote_id: '192406939' + created_at: '2021-11-15T00:00:00Z' + modified_at: '2021-11-18T00:00:00Z' + name: Equipment + value: 1000 + sub_items: + - created_at: '2021-11-15T00:00:00Z' + modified_at: '2021-09-18T00:00:00Z' + name: Equipment + value: 1000 + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: true + financing_activities: + - remote_id: '192406939' + created_at: '2021-11-15T00:00:00Z' + modified_at: '2021-11-15T00:00:00Z' + name: Revenue + value: 1000 + sub_items: + - remote_id: '10300' + name: Revenue - San Francisco + value: 500 + - remote_id: '10301' + name: Revenue - New York + value: 500 + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: true + remote_generated_at: '2020-04-01T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + source: + openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/companyInfo.yml b/.mock/definition/Accounting/companyInfo.yml new file mode 100644 index 000000000..7add92f28 --- /dev/null +++ b/.mock/definition/Accounting/companyInfo.yml @@ -0,0 +1,209 @@ +types: + CompanyInfoListRequestExpandItem: + enum: + - addresses + - phone_numbers + source: + openapi: accounting_v3.yml + CompanyInfoRetrieveRequestExpandItem: + enum: + - addresses + - phone_numbers + source: + openapi: accounting_v3.yml +imports: + accountingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/company-info + method: GET + auth: true + docs: Returns a list of `CompanyInfo` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: accounting_v3.yml + request: + name: CompanyInfoListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: accountingRoot.PaginatedCompanyInfoList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 65d8ffd0-211b-4ba4-b85a-fbe2ce220982 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Merge Pickleball Company + legal_name: Merge Pickleball Company Inc. + tax_number: 11-0011000 + fiscal_year_end_month: 12 + fiscal_year_end_day: 31 + currency: + key: value + remote_created_at: '2020-03-31T00:00:00Z' + addresses: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + street_1: 2920 Broadway + street_2: 2nd Floor + city: New York + state: NY + country: US + zip_code: '10027' + phone_numbers: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + retrieve: + path: /accounting/v1/company-info/{id} + method: GET + auth: true + docs: Returns a `CompanyInfo` object with the given `id`. + source: + openapi: accounting_v3.yml + path-parameters: + id: string + request: + name: CompanyInfoRetrieveRequest + query-parameters: + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: accountingRoot.CompanyInfo + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 65d8ffd0-211b-4ba4-b85a-fbe2ce220982 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Merge Pickleball Company + legal_name: Merge Pickleball Company Inc. + tax_number: 11-0011000 + fiscal_year_end_month: 12 + fiscal_year_end_day: 31 + currency: + key: value + remote_created_at: '2020-03-31T00:00:00Z' + urls: + - urls + addresses: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + type: BILLING + street_1: 2920 Broadway + street_2: 2nd Floor + city: New York + state: NY + country_subdivision: NY + country: US + zip_code: '10027' + phone_numbers: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + number: '+3198675309' + type: Mobile + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + source: + openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/contacts.yml b/.mock/definition/Accounting/contacts.yml new file mode 100644 index 000000000..fe7919956 --- /dev/null +++ b/.mock/definition/Accounting/contacts.yml @@ -0,0 +1,596 @@ +types: + ContactsListRequestExpandItem: + enum: + - addresses + - company + - phone_numbers + source: + openapi: accounting_v3.yml + ContactsRetrieveRequestExpandItem: + enum: + - addresses + - company + - phone_numbers + source: + openapi: accounting_v3.yml +imports: + accountingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/contacts + method: GET + auth: true + docs: Returns a list of `Contact` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: accounting_v3.yml + request: + name: ContactsListRequest + query-parameters: + company_id: + type: optional + docs: If provided, will only return contacts for this company. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + email_address: + type: optional + docs: If provided, will only return Contacts that match this email. + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_customer: + type: optional + docs: >- + If provided, will only return Contacts that are denoted as + customers. + is_supplier: + type: optional + docs: >- + If provided, will only return Contacts that are denoted as + suppliers. + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + name: + type: optional + docs: If provided, will only return Contacts that match this name. + page_size: + type: optional + docs: Number of results to return per page. + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + show_enum_origins: + type: optional> + docs: >- + A comma separated list of enum field names for which you'd like + the original values to be returned, instead of Merge's normalized + enum values. [Learn + more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) + status: + type: optional + docs: If provided, will only return Contacts that match this status. + response: + docs: '' + type: accountingRoot.PaginatedContactList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: c640b80b-fac9-409f-aa19-1f9221aec445 + remote_id: '11167' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Gil Feig's pickleball store + is_supplier: true + is_customer: true + email_address: pickleball@merge.dev + tax_number: 12-3456789 + status: ACTIVE + currency: USD + remote_updated_at: '2020-03-31T00:00:00Z' + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + addresses: + - 2f2702aa-8948-492b-a412-2acdf6d2c499 + - d98c7428-8dda-48a8-a1da-c570f65e2375 + phone_numbers: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + number: '+3198675309' + type: Mobile + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + create: + path: /accounting/v1/contacts + method: POST + auth: true + docs: Creates a `Contact` object with the given values. + source: + openapi: accounting_v3.yml + request: + name: ContactEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: accountingRoot.ContactRequest + content-type: application/json + response: + docs: '' + type: accountingRoot.ContactResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: c640b80b-fac9-409f-aa19-1f9221aec445 + remote_id: '11167' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Gil Feig's pickleball store + is_supplier: true + is_customer: true + email_address: pickleball@merge.dev + tax_number: 12-3456789 + status: ACTIVE + currency: USD + remote_updated_at: '2020-03-31T00:00:00Z' + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + addresses: + - 2f2702aa-8948-492b-a412-2acdf6d2c499 + - d98c7428-8dda-48a8-a1da-c570f65e2375 + phone_numbers: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + number: '+3198675309' + type: Mobile + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /accounting/v1/contacts/{id} + method: GET + auth: true + docs: Returns a `Contact` object with the given `id`. + source: + openapi: accounting_v3.yml + path-parameters: + id: string + request: + name: ContactsRetrieveRequest + query-parameters: + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: accountingRoot.Contact + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: c640b80b-fac9-409f-aa19-1f9221aec445 + remote_id: '11167' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Gil Feig's pickleball store + is_supplier: true + is_customer: true + email_address: pickleball@merge.dev + tax_number: 12-3456789 + status: ACTIVE + currency: USD + remote_updated_at: '2020-03-31T00:00:00Z' + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + addresses: + - 2f2702aa-8948-492b-a412-2acdf6d2c499 + - d98c7428-8dda-48a8-a1da-c570f65e2375 + phone_numbers: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + number: '+3198675309' + type: Mobile + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + value: + key: value + metaPostRetrieve: + path: /accounting/v1/contacts/meta/post + method: GET + auth: true + docs: Returns metadata for `Contact` POSTs. + source: + openapi: accounting_v3.yml + response: + docs: '' + type: accountingRoot.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + remoteFieldClassesList: + path: /accounting/v1/contacts/remote-field-classes + method: GET + auth: true + docs: Returns a list of `RemoteFieldClass` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: accounting_v3.yml + request: + name: ContactsRemoteFieldClassesListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_common_model_field: + type: optional + docs: >- + If provided, will only return remote field classes with this + is_common_model_field value + is_custom: + type: optional + docs: >- + If provided, will only return remote fields classes with this + is_custom value + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: accountingRoot.PaginatedRemoteFieldClassList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: id + display_name: display_name + remote_key_name: remote_key_name + description: description + is_custom: true + is_required: true + field_type: string + field_format: string + field_choices: + - field_choices + source: + openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/creditNotes.yml b/.mock/definition/Accounting/creditNotes.yml new file mode 100644 index 000000000..2fd4e08e0 --- /dev/null +++ b/.mock/definition/Accounting/creditNotes.yml @@ -0,0 +1,637 @@ +types: + CreditNotesListRequestExpandItem: + enum: + - accounting_period + - applied_payments + - company + - contact + - line_items + - payments + - tracking_categories + source: + openapi: accounting_v3.yml + CreditNotesListRequestRemoteFields: + enum: + - status + - value: status,type + name: StatusType + - type + source: + openapi: accounting_v3.yml + CreditNotesListRequestShowEnumOrigins: + enum: + - status + - value: status,type + name: StatusType + - type + source: + openapi: accounting_v3.yml + CreditNotesRetrieveRequestExpandItem: + enum: + - accounting_period + - applied_payments + - company + - contact + - line_items + - payments + - tracking_categories + source: + openapi: accounting_v3.yml + CreditNotesRetrieveRequestRemoteFields: + enum: + - status + - value: status,type + name: StatusType + - type + source: + openapi: accounting_v3.yml + CreditNotesRetrieveRequestShowEnumOrigins: + enum: + - status + - value: status,type + name: StatusType + - type + source: + openapi: accounting_v3.yml +imports: + accountingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/credit-notes + method: GET + auth: true + docs: Returns a list of `CreditNote` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: accounting_v3.yml + request: + name: CreditNotesListRequest + query-parameters: + company_id: + type: optional + docs: If provided, will only return credit notes for this company. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_fields: + type: optional + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + show_enum_origins: + type: optional + docs: >- + A comma separated list of enum field names for which you'd like + the original values to be returned, instead of Merge's normalized + enum values. [Learn + more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) + transaction_date_after: + type: optional + docs: If provided, will only return objects created after this datetime. + transaction_date_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + response: + docs: '' + type: accountingRoot.PaginatedCreditNoteList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 8d9fd929-436c-4fd4-a48b-0c61f68d6178 + remote_id: '123877' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + transaction_date: '2020-03-31T00:00:00Z' + status: SUBMITTED + number: CN-29 + contact: contact + company: company + exchange_rate: '2.9' + total_amount: 50 + remaining_credit: 20 + inclusive_of_tax: true + line_items: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121222' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + item: 0e3fd929-436c-4fd4-a48b-0c61f68d6178 + name: Basic Monthly + description: prorated amount for items + quantity: quantity + memo: privNote + unit_price: '5.0' + tax_rate: 8d9fd929-436c-4fd4-a48b-0c61f68d6178 + total_line_amount: '5.0' + tracking_categories: + - 8d9fd929-436c-4fd4-a48b-0c61f68d6178 + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + account: 8d9fd929-436c-4fd4-a48b-0c61f68d6178 + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + contact: 908934-49j9-093f-0989-908923908 + project: 22e65a5d-2df5-4e6e-884a-e538d0339000 + remote_was_deleted: true + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + currency: XUA + remote_created_at: '2020-03-31T00:00:00Z' + remote_updated_at: '2020-03-31T00:00:00Z' + payments: + - b26fd49a-cbae-470a-a8f8-bcbc119e0390 + applied_payments: + - a9a94a75-19c1-41fe-90d8-d9ba959c38e5 + accounting_period: accounting_period + applied_to_lines: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + invoice: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + applied_date: '2020-03-31T00:00:00Z' + applied_amount: '2.9' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + create: + path: /accounting/v1/credit-notes + method: POST + auth: true + docs: Creates a `CreditNote` object with the given values. + source: + openapi: accounting_v3.yml + request: + name: CreditNoteEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: accountingRoot.CreditNoteRequest + content-type: application/json + response: + docs: '' + type: accountingRoot.CreditNoteResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: 8d9fd929-436c-4fd4-a48b-0c61f68d6178 + remote_id: '123877' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + transaction_date: '2020-03-31T00:00:00Z' + status: SUBMITTED + number: CN-29 + contact: contact + company: company + exchange_rate: '2.9' + total_amount: 50 + remaining_credit: 20 + inclusive_of_tax: true + line_items: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121222' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + item: 0e3fd929-436c-4fd4-a48b-0c61f68d6178 + name: Basic Monthly + description: prorated amount for items + quantity: quantity + memo: privNote + unit_price: '5.0' + tax_rate: 8d9fd929-436c-4fd4-a48b-0c61f68d6178 + total_line_amount: '5.0' + tracking_categories: + - 8d9fd929-436c-4fd4-a48b-0c61f68d6178 + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + account: 8d9fd929-436c-4fd4-a48b-0c61f68d6178 + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + contact: 908934-49j9-093f-0989-908923908 + project: 22e65a5d-2df5-4e6e-884a-e538d0339000 + remote_was_deleted: true + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + currency: XUA + remote_created_at: '2020-03-31T00:00:00Z' + remote_updated_at: '2020-03-31T00:00:00Z' + payments: + - b26fd49a-cbae-470a-a8f8-bcbc119e0390 + applied_payments: + - a9a94a75-19c1-41fe-90d8-d9ba959c38e5 + accounting_period: accounting_period + applied_to_lines: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + invoice: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + applied_date: '2020-03-31T00:00:00Z' + applied_amount: '2.9' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /accounting/v1/credit-notes/{id} + method: GET + auth: true + docs: Returns a `CreditNote` object with the given `id`. + source: + openapi: accounting_v3.yml + path-parameters: + id: string + request: + name: CreditNotesRetrieveRequest + query-parameters: + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional + docs: >- + 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) + response: + docs: '' + type: accountingRoot.CreditNote + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 8d9fd929-436c-4fd4-a48b-0c61f68d6178 + remote_id: '123877' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + transaction_date: '2020-03-31T00:00:00Z' + status: SUBMITTED + number: CN-29 + contact: contact + company: company + exchange_rate: '2.9' + total_amount: 50 + remaining_credit: 20 + inclusive_of_tax: true + line_items: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121222' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + item: 0e3fd929-436c-4fd4-a48b-0c61f68d6178 + name: Basic Monthly + description: prorated amount for items + quantity: quantity + memo: privNote + unit_price: '5.0' + tax_rate: 8d9fd929-436c-4fd4-a48b-0c61f68d6178 + total_line_amount: '5.0' + tracking_category: tracking_category + tracking_categories: + - 8d9fd929-436c-4fd4-a48b-0c61f68d6178 + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + account: 8d9fd929-436c-4fd4-a48b-0c61f68d6178 + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + contact: 908934-49j9-093f-0989-908923908 + project: 22e65a5d-2df5-4e6e-884a-e538d0339000 + remote_was_deleted: true + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + currency: XUA + remote_created_at: '2020-03-31T00:00:00Z' + remote_updated_at: '2020-03-31T00:00:00Z' + payments: + - b26fd49a-cbae-470a-a8f8-bcbc119e0390 + applied_payments: + - a9a94a75-19c1-41fe-90d8-d9ba959c38e5 + accounting_period: accounting_period + applied_to_lines: + - remote_id: '088899' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + invoice: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + applied_date: '2020-03-31T00:00:00Z' + applied_amount: '2.9' + remote_was_deleted: true + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + metaPostRetrieve: + path: /accounting/v1/credit-notes/meta/post + method: GET + auth: true + docs: Returns metadata for `CreditNote` POSTs. + source: + openapi: accounting_v3.yml + response: + docs: '' + type: accountingRoot.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + source: + openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/deleteAccount.yml b/.mock/definition/Accounting/deleteAccount.yml new file mode 100644 index 000000000..2706d9b8d --- /dev/null +++ b/.mock/definition/Accounting/deleteAccount.yml @@ -0,0 +1,15 @@ +service: + auth: false + base-path: '' + endpoints: + delete: + path: /accounting/v1/delete-account + method: POST + auth: true + docs: Delete a linked account. + source: + openapi: accounting_v3.yml + examples: + - headers: {} + source: + openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/employees.yml b/.mock/definition/Accounting/employees.yml new file mode 100644 index 000000000..7ada0e1e0 --- /dev/null +++ b/.mock/definition/Accounting/employees.yml @@ -0,0 +1,143 @@ +imports: + accountingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/employees + method: GET + auth: true + docs: Returns a list of `Employee` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: accounting_v3.yml + request: + name: EmployeesListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional> + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: accountingRoot.PaginatedEmployeeList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: c640b80b-fac9-409f-aa19-1f9221aec445 + remote_id: '11167' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + first_name: John + last_name: Smith + is_contractor: true + employee_number: '325462' + email_address: johnsmith@merge.dev + company: company + status: ACTIVE + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + retrieve: + path: /accounting/v1/employees/{id} + method: GET + auth: true + docs: Returns an `Employee` object with the given `id`. + source: + openapi: accounting_v3.yml + path-parameters: + id: string + request: + name: EmployeesRetrieveRequest + query-parameters: + expand: + type: optional> + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: accountingRoot.Employee + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: c640b80b-fac9-409f-aa19-1f9221aec445 + remote_id: '11167' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + first_name: John + last_name: Smith + is_contractor: true + employee_number: '325462' + email_address: johnsmith@merge.dev + company: company + status: ACTIVE + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + source: + openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/expenses.yml b/.mock/definition/Accounting/expenses.yml new file mode 100644 index 000000000..212585dcf --- /dev/null +++ b/.mock/definition/Accounting/expenses.yml @@ -0,0 +1,750 @@ +types: + ExpensesListRequestExpandItem: + enum: + - account + - accounting_period + - company + - contact + - employee + - tracking_categories + source: + openapi: accounting_v3.yml + ExpensesRetrieveRequestExpandItem: + enum: + - account + - accounting_period + - company + - contact + - employee + - tracking_categories + source: + openapi: accounting_v3.yml +imports: + accountingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/expenses + method: GET + auth: true + docs: Returns a list of `Expense` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: accounting_v3.yml + request: + name: ExpensesListRequest + query-parameters: + company_id: + type: optional + docs: If provided, will only return expenses for this company. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + transaction_date_after: + type: optional + docs: If provided, will only return objects created after this datetime. + transaction_date_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + response: + docs: '' + type: accountingRoot.PaginatedExpenseList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '088899' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + transaction_date: '2024-01-15T09:30:00Z' + remote_created_at: '2020-03-31T00:00:00Z' + account: account + contact: contact + total_amount: 10000 + sub_total: 1.1 + total_tax_amount: 1.1 + currency: XUA + exchange_rate: '2.9' + inclusive_of_tax: true + company: company + employee: employee + memo: New employee supplies + lines: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121222' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + item: b38c59b0-a9d7-4740-b1ee-5436c6751e3d + net_amount: 25.54 + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + employee: 7442f0d5-722d-45bd-b807-6e38489d37fe + account: 2a56344a-a491-11ec-b909-0242ac120002 + contact: c640b80b-fac9-409f-aa19-1f9221aec445 + project: 22e65a5d-2df5-4e6e-884a-e538d0339000 + description: MacBook Pro + exchange_rate: '2.9' + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + remote_was_deleted: false + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121223' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + item: b38c59b0-a9d7-4740-b1ee-5436c6751e3d + net_amount: 10 + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + account: 2a56344a-a491-11ec-b909-0242ac120002 + description: Desk Lamp + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + remote_was_deleted: true + accounting_period: accounting_period + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + create: + path: /accounting/v1/expenses + method: POST + auth: true + docs: Creates an `Expense` object with the given values. + source: + openapi: accounting_v3.yml + request: + name: ExpenseEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: accountingRoot.ExpenseRequest + content-type: application/json + response: + docs: '' + type: accountingRoot.ExpenseResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '088899' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + transaction_date: '2024-01-15T09:30:00Z' + remote_created_at: '2020-03-31T00:00:00Z' + account: account + contact: contact + total_amount: 10000 + sub_total: 1.1 + total_tax_amount: 1.1 + currency: XUA + exchange_rate: '2.9' + inclusive_of_tax: true + company: company + employee: employee + memo: New employee supplies + lines: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121222' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + item: b38c59b0-a9d7-4740-b1ee-5436c6751e3d + net_amount: 25.54 + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + employee: 7442f0d5-722d-45bd-b807-6e38489d37fe + account: 2a56344a-a491-11ec-b909-0242ac120002 + contact: c640b80b-fac9-409f-aa19-1f9221aec445 + project: 22e65a5d-2df5-4e6e-884a-e538d0339000 + description: MacBook Pro + exchange_rate: '2.9' + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + remote_was_deleted: false + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121223' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + item: b38c59b0-a9d7-4740-b1ee-5436c6751e3d + net_amount: 10 + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + account: 2a56344a-a491-11ec-b909-0242ac120002 + description: Desk Lamp + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + remote_was_deleted: true + accounting_period: accounting_period + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /accounting/v1/expenses/{id} + method: GET + auth: true + docs: Returns an `Expense` object with the given `id`. + source: + openapi: accounting_v3.yml + path-parameters: + id: string + request: + name: ExpensesRetrieveRequest + query-parameters: + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: accountingRoot.Expense + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '088899' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + transaction_date: '2024-01-15T09:30:00Z' + remote_created_at: '2020-03-31T00:00:00Z' + account: account + contact: contact + total_amount: 10000 + sub_total: 1.1 + total_tax_amount: 1.1 + currency: XUA + exchange_rate: '2.9' + inclusive_of_tax: true + company: company + employee: employee + memo: New employee supplies + lines: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121222' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + item: b38c59b0-a9d7-4740-b1ee-5436c6751e3d + net_amount: 25.54 + tracking_category: tracking_category + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + employee: 7442f0d5-722d-45bd-b807-6e38489d37fe + currency: XUA + account: 2a56344a-a491-11ec-b909-0242ac120002 + contact: c640b80b-fac9-409f-aa19-1f9221aec445 + project: 22e65a5d-2df5-4e6e-884a-e538d0339000 + description: MacBook Pro + exchange_rate: '2.9' + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + remote_was_deleted: false + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121223' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + item: b38c59b0-a9d7-4740-b1ee-5436c6751e3d + net_amount: 10 + tracking_category: tracking_category + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + employee: employee + currency: XUA + account: 2a56344a-a491-11ec-b909-0242ac120002 + contact: contact + project: project + description: Desk Lamp + exchange_rate: '2.9' + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + remote_was_deleted: true + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + remote_was_deleted: true + accounting_period: accounting_period + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + value: + key: value + linesRemoteFieldClassesList: + path: /accounting/v1/expenses/lines/remote-field-classes + method: GET + auth: true + docs: Returns a list of `RemoteFieldClass` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: accounting_v3.yml + request: + name: ExpensesLinesRemoteFieldClassesListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_common_model_field: + type: optional + docs: >- + If provided, will only return remote field classes with this + is_common_model_field value + is_custom: + type: optional + docs: >- + If provided, will only return remote fields classes with this + is_custom value + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: accountingRoot.PaginatedRemoteFieldClassList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: id + display_name: display_name + remote_key_name: remote_key_name + description: description + is_custom: true + is_required: true + field_type: string + field_format: string + field_choices: + - field_choices + metaPostRetrieve: + path: /accounting/v1/expenses/meta/post + method: GET + auth: true + docs: Returns metadata for `Expense` POSTs. + source: + openapi: accounting_v3.yml + response: + docs: '' + type: accountingRoot.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + remoteFieldClassesList: + path: /accounting/v1/expenses/remote-field-classes + method: GET + auth: true + docs: Returns a list of `RemoteFieldClass` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: accounting_v3.yml + request: + name: ExpensesRemoteFieldClassesListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_common_model_field: + type: optional + docs: >- + If provided, will only return remote field classes with this + is_common_model_field value + is_custom: + type: optional + docs: >- + If provided, will only return remote fields classes with this + is_custom value + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: accountingRoot.PaginatedRemoteFieldClassList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: id + display_name: display_name + remote_key_name: remote_key_name + description: description + is_custom: true + is_required: true + field_type: string + field_format: string + field_choices: + - field_choices + source: + openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/fieldMapping.yml b/.mock/definition/Accounting/fieldMapping.yml new file mode 100644 index 000000000..fbdcd0e06 --- /dev/null +++ b/.mock/definition/Accounting/fieldMapping.yml @@ -0,0 +1,1198 @@ +imports: + accountingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + field_mappings_retrieve: + path: /accounting/v1/field-mappings + method: GET + auth: true + docs: >- + 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/). + source: + openapi: accounting_v3.yml + request: + name: FieldMappingsRetrieveRequest + query-parameters: + exclude_remote_field_metadata: + type: optional + docs: >- + 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. + response: + docs: '' + type: accountingRoot.FieldMappingApiInstanceResponse + status-code: 200 + examples: + - headers: {} + response: + body: + Account: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + AccountingAttachment: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + BalanceSheet: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + CashFlowStatement: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + CompanyInfo: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Contact: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + IncomeStatement: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + CreditNote: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Item: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + PurchaseOrder: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + TrackingCategory: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + JournalEntry: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + TaxRate: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Invoice: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Payment: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Expense: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + VendorCredit: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Transaction: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + AccountingPeriod: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + GeneralLedgerTransaction: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + BankFeedAccount: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Employee: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + PaymentMethod: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Project: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + PaymentTerm: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + field_mappings_create: + path: /accounting/v1/field-mappings + method: POST + auth: true + docs: >- + 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. + source: + openapi: accounting_v3.yml + request: + name: CreateFieldMappingRequest + query-parameters: + exclude_remote_field_metadata: + type: optional + docs: >- + 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. + body: + properties: + target_field_name: + type: string + docs: >- + The name of the target field you want this remote field to map + to. + validation: + minLength: 1 + target_field_description: + type: string + docs: >- + The description of the target field you want this remote field + to map to. + validation: + minLength: 1 + remote_field_traversal_path: + docs: >- + The field traversal path of the remote field listed when you hit + the GET /remote-fields endpoint. + type: list + remote_method: + type: string + docs: >- + The method of the remote endpoint where the remote field is + coming from. + validation: + minLength: 1 + remote_url_path: + type: string + docs: >- + The path of the remote endpoint where the remote field is coming + from. + validation: + minLength: 1 + common_model_name: + type: string + docs: >- + The name of the Common Model that the remote field corresponds + to in a given category. + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: accountingRoot.FieldMappingInstanceResponse + status-code: 201 + examples: + - headers: {} + request: + 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 + response: + body: + model: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + field_mappings_destroy: + path: /accounting/v1/field-mappings/{field_mapping_id} + method: DELETE + auth: true + docs: >- + 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. + source: + openapi: accounting_v3.yml + path-parameters: + field_mapping_id: string + response: + docs: '' + type: accountingRoot.FieldMappingInstanceResponse + status-code: 204 + examples: + - path-parameters: + field_mapping_id: field_mapping_id + headers: {} + response: + body: + model: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + field_mappings_partial_update: + path: /accounting/v1/field-mappings/{field_mapping_id} + method: PATCH + auth: true + docs: >- + 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. + source: + openapi: accounting_v3.yml + path-parameters: + field_mapping_id: string + request: + name: PatchedEditFieldMappingRequest + body: + properties: + remote_field_traversal_path: + type: optional> + docs: >- + The field traversal path of the remote field listed when you hit + the GET /remote-fields endpoint. + remote_method: + type: optional + docs: >- + The method of the remote endpoint where the remote field is + coming from. + validation: + minLength: 1 + remote_url_path: + type: optional + docs: >- + The path of the remote endpoint where the remote field is coming + from. + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: accountingRoot.FieldMappingInstanceResponse + status-code: 200 + examples: + - path-parameters: + field_mapping_id: field_mapping_id + headers: {} + request: {} + response: + body: + model: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + remote_fields_retrieve: + path: /accounting/v1/remote-fields + method: GET + auth: true + docs: >- + 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/). + source: + openapi: accounting_v3.yml + request: + name: RemoteFieldsRetrieveRequest + query-parameters: + common_models: + type: optional + docs: >- + A comma seperated list of Common Model names. If included, will + only return Remote Fields for those Common Models. + include_example_values: + type: optional + docs: >- + 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. + response: + docs: '' + type: accountingRoot.RemoteFieldApiResponse + status-code: 200 + examples: + - headers: {} + response: + body: + Account: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + AccountingAttachment: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + BalanceSheet: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + CashFlowStatement: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + CompanyInfo: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Contact: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + IncomeStatement: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + CreditNote: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Item: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + PurchaseOrder: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + TrackingCategory: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + JournalEntry: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + TaxRate: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Invoice: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Payment: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Expense: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + VendorCredit: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Transaction: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + AccountingPeriod: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + GeneralLedgerTransaction: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + BankFeedAccount: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Employee: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + PaymentMethod: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Project: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + PaymentTerm: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + target_fields_retrieve: + path: /accounting/v1/target-fields + method: GET + auth: true + docs: >- + 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/). + source: + openapi: accounting_v3.yml + response: + docs: '' + type: accountingRoot.ExternalTargetFieldApiResponse + status-code: 200 + examples: + - headers: {} + response: + body: + Account: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + AccountingAttachment: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + BalanceSheet: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + CashFlowStatement: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + CompanyInfo: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Contact: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + IncomeStatement: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + CreditNote: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Item: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + PurchaseOrder: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + TrackingCategory: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + JournalEntry: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + TaxRate: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Invoice: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Payment: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Expense: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + VendorCredit: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Transaction: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + AccountingPeriod: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + GeneralLedgerTransaction: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + BankFeedAccount: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Employee: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + PaymentMethod: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Project: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + PaymentTerm: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + source: + openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/forceResync.yml b/.mock/definition/Accounting/forceResync.yml new file mode 100644 index 000000000..519177e12 --- /dev/null +++ b/.mock/definition/Accounting/forceResync.yml @@ -0,0 +1,37 @@ +imports: + accountingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + sync_status_resync_create: + path: /accounting/v1/sync-status/resync + method: POST + auth: true + docs: >- + 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. + source: + openapi: accounting_v3.yml + response: + docs: '' + type: list + status-code: 200 + examples: + - headers: {} + response: + body: + - model_name: Invoice + model_id: accounting.Invoices + last_sync_start: '2021-03-30T19:44:18Z' + next_sync_start: '2021-03-30T20:44:18Z' + last_sync_result: SYNCING + last_sync_finished: '2021-03-30T19:55:18Z' + status: SYNCING + is_initial_sync: true + selective_sync_configurations_usage: IN_NEXT_SYNC + source: + openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/generalLedgerTransactions.yml b/.mock/definition/Accounting/generalLedgerTransactions.yml new file mode 100644 index 000000000..837920e6e --- /dev/null +++ b/.mock/definition/Accounting/generalLedgerTransactions.yml @@ -0,0 +1,249 @@ +types: + GeneralLedgerTransactionsListRequestExpandItem: + enum: + - accounting_period + - company + - general_ledger_transaction_lines + - tracking_categories + source: + openapi: accounting_v3.yml + GeneralLedgerTransactionsRetrieveRequestExpandItem: + enum: + - accounting_period + - company + - general_ledger_transaction_lines + - tracking_categories + source: + openapi: accounting_v3.yml +imports: + accountingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/general-ledger-transactions + method: GET + auth: true + docs: Returns a list of `GeneralLedgerTransaction` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: accounting_v3.yml + request: + name: GeneralLedgerTransactionsListRequest + query-parameters: + company_id: + type: optional + docs: >- + If provided, will only return general ledger transactions for this + company. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + posted_date_after: + type: optional + docs: If provided, will only return objects posted after this datetime. + posted_date_before: + type: optional + docs: If provided, will only return objects posted before this datetime. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: accountingRoot.PaginatedGeneralLedgerTransactionList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: b26fd49a-cbae-470a-a8f8-bcbc119e0390 + remote_id: '987300' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + underlying_transaction_remote_id: '1234' + underlying_transaction_type: INVOICE + accounting_period: accounting_period + company: company + remote_updated_at: '2020-03-31T00:00:00Z' + remote_created_at: '2020-03-31T00:00:00Z' + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + posting_date: '2020-03-31T00:00:00Z' + general_ledger_transaction_lines: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '123' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + account: a47e11b6-c73b-4a0c-be31-130fc48177fa + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + contact: d6e687d6-0c36-48a1-8114-35324b5cb38f + base_currency: USD + transaction_currency: USD + exchange_rate: exchange_rate + description: Invoice created + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + debit_amount: debit_amount + credit_amount: credit_amount + item: a47e11b6-c73b-4a0c-be31-130fc48177fa + foreign_debit_amount: foreign_debit_amount + foreign_credit_amount: foreign_credit_amount + remote_was_deleted: false + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + retrieve: + path: /accounting/v1/general-ledger-transactions/{id} + method: GET + auth: true + docs: Returns a `GeneralLedgerTransaction` object with the given `id`. + source: + openapi: accounting_v3.yml + path-parameters: + id: string + request: + name: GeneralLedgerTransactionsRetrieveRequest + query-parameters: + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: accountingRoot.GeneralLedgerTransaction + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: b26fd49a-cbae-470a-a8f8-bcbc119e0390 + remote_id: '987300' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + underlying_transaction_remote_id: '1234' + underlying_transaction_type: INVOICE + accounting_period: accounting_period + company: company + remote_updated_at: '2020-03-31T00:00:00Z' + remote_created_at: '2020-03-31T00:00:00Z' + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + posting_date: '2020-03-31T00:00:00Z' + general_ledger_transaction_lines: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '123' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + account: a47e11b6-c73b-4a0c-be31-130fc48177fa + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + employee: employee + contact: d6e687d6-0c36-48a1-8114-35324b5cb38f + project: project + base_currency: USD + transaction_currency: USD + exchange_rate: exchange_rate + description: Invoice created + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + debit_amount: debit_amount + credit_amount: credit_amount + item: a47e11b6-c73b-4a0c-be31-130fc48177fa + foreign_debit_amount: foreign_debit_amount + foreign_credit_amount: foreign_credit_amount + remote_was_deleted: false + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + data: + key: value + source: + openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/generateKey.yml b/.mock/definition/Accounting/generateKey.yml new file mode 100644 index 000000000..53f0f60d8 --- /dev/null +++ b/.mock/definition/Accounting/generateKey.yml @@ -0,0 +1,36 @@ +imports: + accountingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /accounting/v1/generate-key + method: POST + auth: true + docs: Create a remote key. + source: + openapi: accounting_v3.yml + request: + name: GenerateRemoteKeyRequest + body: + properties: + name: + type: string + docs: The name of the remote key + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: accountingRoot.RemoteKey + status-code: 200 + examples: + - request: + name: Remote Deployment Key 1 + response: + body: + name: Remote Deployment Key 1 + key: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA + source: + openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/incomeStatements.yml b/.mock/definition/Accounting/incomeStatements.yml new file mode 100644 index 000000000..1b452c9ad --- /dev/null +++ b/.mock/definition/Accounting/incomeStatements.yml @@ -0,0 +1,275 @@ +imports: + accountingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/income-statements + method: GET + auth: true + docs: Returns a list of `IncomeStatement` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: accounting_v3.yml + request: + name: IncomeStatementsListRequest + query-parameters: + company_id: + type: optional + docs: If provided, will only return income statements for this company. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional> + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: accountingRoot.PaginatedIncomeStatementList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 0958cbc6-6040-430a-848e-aafacbadf4ae + remote_id: '1342348' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: IncomeStatement + currency: XUA + company: company + start_period: '2024-01-15T09:30:00Z' + end_period: '2024-01-15T09:30:00Z' + income: + - remote_id: '10299' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Total Income + value: 325 + sub_items: + - remote_id: '10200' + name: Landscaping Services + value: 425 + - remote_id: '10201' + name: Pest Control Services + value: -100 + cost_of_sales: + - remote_id: '10299' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Total COGS + value: 25 + sub_items: + - remote_id: '10200' + name: Supplies + value: 10 + gross_profit: 300 + operating_expenses: + - remote_id: '10299' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Total Operating Expenses + value: 100 + sub_items: + - remote_id: '10300' + name: Revenue - San Francisco + value: 500 + - remote_id: '10301' + name: Revenue - New York + value: 500 + net_operating_income: 200 + non_operating_expenses: + - remote_id: '10299' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Total Non-Operating Expenses + value: 100 + sub_items: + - remote_id: '10300' + name: Revenue - San Francisco + value: 500 + - remote_id: '10301' + name: Revenue - New York + value: 500 + net_income: 100 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + retrieve: + path: /accounting/v1/income-statements/{id} + method: GET + auth: true + docs: Returns an `IncomeStatement` object with the given `id`. + source: + openapi: accounting_v3.yml + path-parameters: + id: string + request: + name: IncomeStatementsRetrieveRequest + query-parameters: + expand: + type: optional> + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: accountingRoot.IncomeStatement + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 0958cbc6-6040-430a-848e-aafacbadf4ae + remote_id: '1342348' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: IncomeStatement + currency: XUA + company: company + start_period: '2024-01-15T09:30:00Z' + end_period: '2024-01-15T09:30:00Z' + income: + - remote_id: '10299' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Total Income + value: 325 + sub_items: + - remote_id: '10200' + name: Landscaping Services + value: 425 + - remote_id: '10201' + name: Pest Control Services + value: -100 + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: true + cost_of_sales: + - remote_id: '10299' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Total COGS + value: 25 + sub_items: + - remote_id: '10200' + name: Supplies + value: 10 + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: true + gross_profit: 300 + operating_expenses: + - remote_id: '10299' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Total Operating Expenses + value: 100 + sub_items: + - remote_id: '10300' + name: Revenue - San Francisco + value: 500 + - remote_id: '10301' + name: Revenue - New York + value: 500 + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: true + net_operating_income: 200 + non_operating_expenses: + - remote_id: '10299' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Total Non-Operating Expenses + value: 100 + sub_items: + - remote_id: '10300' + name: Revenue - San Francisco + value: 500 + - remote_id: '10301' + name: Revenue - New York + value: 500 + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: true + net_income: 100 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + source: + openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/invoices.yml b/.mock/definition/Accounting/invoices.yml new file mode 100644 index 000000000..7af527999 --- /dev/null +++ b/.mock/definition/Accounting/invoices.yml @@ -0,0 +1,1206 @@ +types: + InvoicesListRequestExpandItem: + enum: + - accounting_period + - applied_credit_notes + - applied_payments + - applied_vendor_credits + - company + - contact + - employee + - line_items + - payment_term + - payments + - purchase_orders + - tracking_categories + source: + openapi: accounting_v3.yml + InvoicesListRequestStatus: + enum: + - DRAFT + - OPEN + - PAID + - PARTIALLY_PAID + - SUBMITTED + - VOID + source: + openapi: accounting_v3.yml + InvoicesListRequestType: + enum: + - ACCOUNTS_PAYABLE + - ACCOUNTS_RECEIVABLE + source: + openapi: accounting_v3.yml + InvoicesRetrieveRequestExpandItem: + enum: + - accounting_period + - applied_credit_notes + - applied_payments + - applied_vendor_credits + - company + - contact + - employee + - line_items + - payment_term + - payments + - purchase_orders + - tracking_categories + source: + openapi: accounting_v3.yml +imports: + accountingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/invoices + method: GET + auth: true + docs: Returns a list of `Invoice` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: accounting_v3.yml + request: + name: InvoicesListRequest + query-parameters: + company_id: + type: optional + docs: If provided, will only return invoices for this company. + contact_id: + type: optional + docs: If provided, will only return invoices for this contact. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + issue_date_after: + type: optional + docs: If provided, will only return objects created after this datetime. + issue_date_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + number: + type: optional + docs: If provided, will only return Invoices with this number. + page_size: + type: optional + docs: Number of results to return per page. + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + show_enum_origins: + type: optional> + docs: >- + A comma separated list of enum field names for which you'd like + the original values to be returned, instead of Merge's normalized + enum values. [Learn + more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) + status: + type: optional + docs: |- + If provided, will only return Invoices with this status. + + * `PAID` - PAID + * `DRAFT` - DRAFT + * `SUBMITTED` - SUBMITTED + * `PARTIALLY_PAID` - PARTIALLY_PAID + * `OPEN` - OPEN + * `VOID` - VOID + type: + type: optional + docs: |- + If provided, will only return Invoices with this type. + + * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE + * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE + response: + docs: '' + type: accountingRoot.PaginatedInvoiceList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 + remote_id: '990110' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + type: ACCOUNTS_RECEIVABLE + contact: contact + number: AIQ12546 + issue_date: '2020-03-31T00:00:00Z' + due_date: '2020-04-15T00:00:00Z' + paid_on_date: '2020-04-01T00:00:00Z' + memo: Weekly Payment + company: company + employee: employee + currency: XUA + exchange_rate: '2.9' + payment_term: payment_term + total_discount: 1.1 + sub_total: 100 + status: PAID + total_tax_amount: 5 + total_amount: 105 + balance: 105 + remote_updated_at: '2020-04-01T00:00:00Z' + tracking_categories: + - 7dc5ca17-d311-44cd-9ce0-333080367a18 + - 6aa0700c-48e1-4c4a-8162-02e6a582df05 + - 8c933d61-8f5b-4360-ac0c-c9dc87bee763 + accounting_period: accounting_period + purchase_orders: + - e7378d8f-3992-4c2a-8417-ebdc4f2bfeb7 + - dd70ca2f-b120-46fa-889a-9604037f45fd + - 889b281d-739c-4759-95b8-0aedb3947131 + payments: + - b26fd49a-cbae-470a-a8f8-bcbc119e0390 + applied_payments: + - 9017594e-dc33-4113-a5d2-b0f928e34fdd + line_items: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '8765432' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + description: Pickleball lessons + unit_price: 50 + quantity: 1 + total_amount: 50 + employee: 7442f0d5-722d-45bd-b807-6e38489d37fe + project: 22e65a5d-2df5-4e6e-884a-e538d0339000 + contact: 908934-49j9-093f-0989-908923908 + currency: USD + exchange_rate: '2.9' + item: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + account: cd0f32d4-a493-11ec-b909-0242ac120002 + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + applied_credit_notes: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + credit_note: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + applied_date: '2020-03-31T00:00:00Z' + applied_amount: '2.9' + applied_vendor_credits: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + vendor_credit: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + applied_date: '2020-03-31T00:00:00Z' + applied_amount: '2.9' + inclusive_of_tax: true + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + create: + path: /accounting/v1/invoices + method: POST + auth: true + docs: |- + Creates an `Invoice` object with the given values. + Including a `PurchaseOrder` id in the `purchase_orders` property will generate an Accounts Payable Invoice from the specified Purchase Order(s). + + source: + openapi: accounting_v3.yml + request: + name: InvoiceEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: accountingRoot.InvoiceRequest + content-type: application/json + response: + docs: '' + type: accountingRoot.InvoiceResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 + remote_id: '990110' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + type: ACCOUNTS_RECEIVABLE + contact: contact + number: AIQ12546 + issue_date: '2020-03-31T00:00:00Z' + due_date: '2020-04-15T00:00:00Z' + paid_on_date: '2020-04-01T00:00:00Z' + memo: Weekly Payment + company: company + employee: employee + currency: XUA + exchange_rate: '2.9' + payment_term: payment_term + total_discount: 1.1 + sub_total: 100 + status: PAID + total_tax_amount: 5 + total_amount: 105 + balance: 105 + remote_updated_at: '2020-04-01T00:00:00Z' + tracking_categories: + - 7dc5ca17-d311-44cd-9ce0-333080367a18 + - 6aa0700c-48e1-4c4a-8162-02e6a582df05 + - 8c933d61-8f5b-4360-ac0c-c9dc87bee763 + accounting_period: accounting_period + purchase_orders: + - e7378d8f-3992-4c2a-8417-ebdc4f2bfeb7 + - dd70ca2f-b120-46fa-889a-9604037f45fd + - 889b281d-739c-4759-95b8-0aedb3947131 + payments: + - b26fd49a-cbae-470a-a8f8-bcbc119e0390 + applied_payments: + - 9017594e-dc33-4113-a5d2-b0f928e34fdd + line_items: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '8765432' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + description: Pickleball lessons + unit_price: 50 + quantity: 1 + total_amount: 50 + employee: 7442f0d5-722d-45bd-b807-6e38489d37fe + project: 22e65a5d-2df5-4e6e-884a-e538d0339000 + contact: 908934-49j9-093f-0989-908923908 + currency: USD + exchange_rate: '2.9' + item: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + account: cd0f32d4-a493-11ec-b909-0242ac120002 + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + applied_credit_notes: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + credit_note: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + applied_date: '2020-03-31T00:00:00Z' + applied_amount: '2.9' + applied_vendor_credits: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + vendor_credit: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + applied_date: '2020-03-31T00:00:00Z' + applied_amount: '2.9' + inclusive_of_tax: true + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /accounting/v1/invoices/{id} + method: GET + auth: true + docs: Returns an `Invoice` object with the given `id`. + source: + openapi: accounting_v3.yml + path-parameters: + id: string + request: + name: InvoicesRetrieveRequest + query-parameters: + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: accountingRoot.Invoice + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 + remote_id: '990110' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + type: ACCOUNTS_RECEIVABLE + contact: contact + number: AIQ12546 + issue_date: '2020-03-31T00:00:00Z' + due_date: '2020-04-15T00:00:00Z' + paid_on_date: '2020-04-01T00:00:00Z' + memo: Weekly Payment + company: company + employee: employee + currency: XUA + exchange_rate: '2.9' + payment_term: payment_term + total_discount: 1.1 + sub_total: 100 + status: PAID + total_tax_amount: 5 + total_amount: 105 + balance: 105 + remote_updated_at: '2020-04-01T00:00:00Z' + tracking_categories: + - 7dc5ca17-d311-44cd-9ce0-333080367a18 + - 6aa0700c-48e1-4c4a-8162-02e6a582df05 + - 8c933d61-8f5b-4360-ac0c-c9dc87bee763 + accounting_period: accounting_period + purchase_orders: + - e7378d8f-3992-4c2a-8417-ebdc4f2bfeb7 + - dd70ca2f-b120-46fa-889a-9604037f45fd + - 889b281d-739c-4759-95b8-0aedb3947131 + payments: + - b26fd49a-cbae-470a-a8f8-bcbc119e0390 + applied_payments: + - 9017594e-dc33-4113-a5d2-b0f928e34fdd + line_items: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '8765432' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + description: Pickleball lessons + unit_price: 50 + quantity: 1 + total_amount: 50 + employee: 7442f0d5-722d-45bd-b807-6e38489d37fe + project: 22e65a5d-2df5-4e6e-884a-e538d0339000 + contact: 908934-49j9-093f-0989-908923908 + currency: USD + exchange_rate: '2.9' + item: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + account: cd0f32d4-a493-11ec-b909-0242ac120002 + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + tracking_category: tracking_category + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_fields: + - remote_field_class: remote_field_class + applied_credit_notes: + - remote_id: '088899' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + credit_note: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + applied_date: '2020-03-31T00:00:00Z' + applied_amount: '2.9' + remote_was_deleted: true + applied_vendor_credits: + - remote_id: '088899' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + vendor_credit: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + applied_date: '2020-03-31T00:00:00Z' + applied_amount: '2.9' + remote_was_deleted: true + inclusive_of_tax: true + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + value: + key: value + partialUpdate: + path: /accounting/v1/invoices/{id} + method: PATCH + auth: true + docs: Updates an `Invoice` object with the given `id`. + source: + openapi: accounting_v3.yml + path-parameters: + id: string + request: + name: PatchedInvoiceEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: accountingRoot.InvoiceRequest + content-type: application/json + response: + docs: '' + type: accountingRoot.InvoiceResponse + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + request: + model: {} + response: + body: + model: + id: 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 + remote_id: '990110' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + type: ACCOUNTS_RECEIVABLE + contact: contact + number: AIQ12546 + issue_date: '2020-03-31T00:00:00Z' + due_date: '2020-04-15T00:00:00Z' + paid_on_date: '2020-04-01T00:00:00Z' + memo: Weekly Payment + company: company + employee: employee + currency: XUA + exchange_rate: '2.9' + payment_term: payment_term + total_discount: 1.1 + sub_total: 100 + status: PAID + total_tax_amount: 5 + total_amount: 105 + balance: 105 + remote_updated_at: '2020-04-01T00:00:00Z' + tracking_categories: + - 7dc5ca17-d311-44cd-9ce0-333080367a18 + - 6aa0700c-48e1-4c4a-8162-02e6a582df05 + - 8c933d61-8f5b-4360-ac0c-c9dc87bee763 + accounting_period: accounting_period + purchase_orders: + - e7378d8f-3992-4c2a-8417-ebdc4f2bfeb7 + - dd70ca2f-b120-46fa-889a-9604037f45fd + - 889b281d-739c-4759-95b8-0aedb3947131 + payments: + - b26fd49a-cbae-470a-a8f8-bcbc119e0390 + applied_payments: + - 9017594e-dc33-4113-a5d2-b0f928e34fdd + line_items: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '8765432' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + description: Pickleball lessons + unit_price: 50 + quantity: 1 + total_amount: 50 + employee: 7442f0d5-722d-45bd-b807-6e38489d37fe + project: 22e65a5d-2df5-4e6e-884a-e538d0339000 + contact: 908934-49j9-093f-0989-908923908 + currency: USD + exchange_rate: '2.9' + item: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + account: cd0f32d4-a493-11ec-b909-0242ac120002 + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + applied_credit_notes: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + credit_note: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + applied_date: '2020-03-31T00:00:00Z' + applied_amount: '2.9' + applied_vendor_credits: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + vendor_credit: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + applied_date: '2020-03-31T00:00:00Z' + applied_amount: '2.9' + inclusive_of_tax: true + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + lineItemsRemoteFieldClassesList: + path: /accounting/v1/invoices/line-items/remote-field-classes + method: GET + auth: true + docs: Returns a list of `RemoteFieldClass` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: accounting_v3.yml + request: + name: InvoicesLineItemsRemoteFieldClassesListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_common_model_field: + type: optional + docs: >- + If provided, will only return remote field classes with this + is_common_model_field value + is_custom: + type: optional + docs: >- + If provided, will only return remote fields classes with this + is_custom value + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: accountingRoot.PaginatedRemoteFieldClassList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: id + display_name: display_name + remote_key_name: remote_key_name + description: description + is_custom: true + is_required: true + field_type: string + field_format: string + field_choices: + - field_choices + metaPatchRetrieve: + path: /accounting/v1/invoices/meta/patch/{id} + method: GET + auth: true + docs: Returns metadata for `Invoice` PATCHs. + source: + openapi: accounting_v3.yml + path-parameters: + id: string + response: + docs: '' + type: accountingRoot.MetaResponse + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + metaPostRetrieve: + path: /accounting/v1/invoices/meta/post + method: GET + auth: true + docs: Returns metadata for `Invoice` POSTs. + source: + openapi: accounting_v3.yml + response: + docs: '' + type: accountingRoot.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + remoteFieldClassesList: + path: /accounting/v1/invoices/remote-field-classes + method: GET + auth: true + docs: Returns a list of `RemoteFieldClass` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: accounting_v3.yml + request: + name: InvoicesRemoteFieldClassesListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_common_model_field: + type: optional + docs: >- + If provided, will only return remote field classes with this + is_common_model_field value + is_custom: + type: optional + docs: >- + If provided, will only return remote fields classes with this + is_custom value + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: accountingRoot.PaginatedRemoteFieldClassList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: id + display_name: display_name + remote_key_name: remote_key_name + description: description + is_custom: true + is_required: true + field_type: string + field_format: string + field_choices: + - field_choices + source: + openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/issues.yml b/.mock/definition/Accounting/issues.yml new file mode 100644 index 000000000..aaef5a354 --- /dev/null +++ b/.mock/definition/Accounting/issues.yml @@ -0,0 +1,133 @@ +types: + IssuesListRequestStatus: + enum: + - ONGOING + - RESOLVED + source: + openapi: accounting_v3.yml +imports: + accountingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/issues + method: GET + auth: true + docs: Gets all issues for Organization. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: accounting_v3.yml + request: + name: IssuesListRequest + query-parameters: + account_token: optional + cursor: + type: optional + docs: The pagination cursor value. + end_date: + type: optional + docs: >- + If included, will only include issues whose most recent action + occurred before this time + end_user_organization_name: optional + first_incident_time_after: + type: optional + docs: >- + If provided, will only return issues whose first incident time was + after this datetime. + first_incident_time_before: + type: optional + docs: >- + If provided, will only return issues whose first incident time was + before this datetime. + include_muted: + type: optional + docs: If true, will include muted issues + integration_name: optional + last_incident_time_after: + type: optional + docs: >- + If provided, will only return issues whose last incident time was + after this datetime. + last_incident_time_before: + type: optional + docs: >- + If provided, will only return issues whose last incident time was + before this datetime. + linked_account_id: + type: optional + docs: >- + If provided, will only include issues pertaining to the linked + account passed in. + page_size: + type: optional + docs: Number of results to return per page. + start_date: + type: optional + docs: >- + If included, will only include issues whose most recent action + occurred after this time + status: + type: optional + docs: |- + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + response: + docs: '' + type: accountingRoot.PaginatedIssueList + status-code: 200 + examples: + - response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + status: ONGOING + error_description: Missing Permissions + end_user: + key: value + first_incident_time: '2022-12-05T16:19:15Z' + last_incident_time: '2022-12-05T16:19:15Z' + is_muted: true + error_details: + - Missing employee permissions. + - Missing time off permissions. + retrieve: + path: /accounting/v1/issues/{id} + method: GET + auth: true + docs: Get a specific issue. + source: + openapi: accounting_v3.yml + path-parameters: + id: string + response: + docs: '' + type: accountingRoot.Issue + status-code: 200 + examples: + - path-parameters: + id: id + response: + body: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + status: ONGOING + error_description: Missing Permissions + end_user: + key: value + first_incident_time: '2022-12-05T16:19:15Z' + last_incident_time: '2022-12-05T16:19:15Z' + is_muted: true + error_details: + - Missing employee permissions. + - Missing time off permissions. + source: + openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/items.yml b/.mock/definition/Accounting/items.yml new file mode 100644 index 000000000..276001a86 --- /dev/null +++ b/.mock/definition/Accounting/items.yml @@ -0,0 +1,746 @@ +types: + ItemsListRequestExpandItem: + enum: + - company + - purchase_account + - purchase_tax_rate + - sales_account + - sales_tax_rate + source: + openapi: accounting_v3.yml + ItemsRetrieveRequestExpandItem: + enum: + - company + - purchase_account + - purchase_tax_rate + - sales_account + - sales_tax_rate + source: + openapi: accounting_v3.yml +imports: + accountingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/items + method: GET + auth: true + docs: Returns a list of `Item` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: accounting_v3.yml + request: + name: ItemsListRequest + query-parameters: + company_id: + type: optional + docs: If provided, will only return items for this company. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: accountingRoot.PaginatedItemList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: d2f972d0-2526-434b-9409-4c3b468e08f0 + remote_id: '12374' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Pickleball Paddle + status: ACTIVE + type: INVENTORY + unit_price: 10 + purchase_price: 25 + purchase_account: purchase_account + sales_account: sales_account + company: company + purchase_tax_rate: purchase_tax_rate + sales_tax_rate: sales_tax_rate + remote_updated_at: '2020-03-31T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + create: + path: /accounting/v1/items + method: POST + auth: true + docs: Creates an `Item` object with the given values. + source: + openapi: accounting_v3.yml + request: + name: ItemEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: accountingRoot.ItemRequestRequest + content-type: application/json + response: + docs: '' + type: accountingRoot.ItemResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: d2f972d0-2526-434b-9409-4c3b468e08f0 + remote_id: '12374' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Pickleball Paddle + status: ACTIVE + type: INVENTORY + unit_price: 10 + purchase_price: 25 + purchase_account: purchase_account + sales_account: sales_account + company: company + purchase_tax_rate: purchase_tax_rate + sales_tax_rate: sales_tax_rate + remote_updated_at: '2020-03-31T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /accounting/v1/items/{id} + method: GET + auth: true + docs: Returns an `Item` object with the given `id`. + source: + openapi: accounting_v3.yml + path-parameters: + id: string + request: + name: ItemsRetrieveRequest + query-parameters: + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: accountingRoot.Item + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: d2f972d0-2526-434b-9409-4c3b468e08f0 + remote_id: '12374' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Pickleball Paddle + status: ACTIVE + type: INVENTORY + unit_price: 10 + purchase_price: 25 + purchase_account: purchase_account + sales_account: sales_account + company: company + purchase_tax_rate: purchase_tax_rate + sales_tax_rate: sales_tax_rate + remote_updated_at: '2020-03-31T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + partialUpdate: + path: /accounting/v1/items/{id} + method: PATCH + auth: true + docs: Updates an `Item` object with the given `id`. + source: + openapi: accounting_v3.yml + path-parameters: + id: string + request: + name: PatchedItemEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: accountingRoot.PatchedItemRequestRequest + content-type: application/json + response: + docs: '' + type: accountingRoot.ItemResponse + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + request: + model: {} + response: + body: + model: + id: d2f972d0-2526-434b-9409-4c3b468e08f0 + remote_id: '12374' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Pickleball Paddle + status: ACTIVE + type: INVENTORY + unit_price: 10 + purchase_price: 25 + purchase_account: purchase_account + sales_account: sales_account + company: company + purchase_tax_rate: purchase_tax_rate + sales_tax_rate: sales_tax_rate + remote_updated_at: '2020-03-31T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + metaPatchRetrieve: + path: /accounting/v1/items/meta/patch/{id} + method: GET + auth: true + docs: Returns metadata for `Item` PATCHs. + source: + openapi: accounting_v3.yml + path-parameters: + id: string + response: + docs: '' + type: accountingRoot.MetaResponse + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + metaPostRetrieve: + path: /accounting/v1/items/meta/post + method: GET + auth: true + docs: Returns metadata for `Item` POSTs. + source: + openapi: accounting_v3.yml + response: + docs: '' + type: accountingRoot.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + source: + openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/journalEntries.yml b/.mock/definition/Accounting/journalEntries.yml new file mode 100644 index 000000000..e9c87803f --- /dev/null +++ b/.mock/definition/Accounting/journalEntries.yml @@ -0,0 +1,741 @@ +types: + JournalEntriesListRequestExpandItem: + enum: + - accounting_period + - applied_payments + - company + - lines + - payments + - tracking_categories + source: + openapi: accounting_v3.yml + JournalEntriesRetrieveRequestExpandItem: + enum: + - accounting_period + - applied_payments + - company + - lines + - payments + - tracking_categories + source: + openapi: accounting_v3.yml +imports: + accountingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/journal-entries + method: GET + auth: true + docs: Returns a list of `JournalEntry` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: accounting_v3.yml + request: + name: JournalEntriesListRequest + query-parameters: + company_id: + type: optional + docs: If provided, will only return journal entries for this company. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + transaction_date_after: + type: optional + docs: If provided, will only return objects created after this datetime. + transaction_date_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + response: + docs: '' + type: accountingRoot.PaginatedJournalEntryList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '088899' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + transaction_date: '2020-03-31T00:00:00Z' + payments: + - b26fd49a-cbae-470a-a8f8-bcbc119e0390 + applied_payments: + - 4311155d-f236-4a5d-9e0f-1cb167e38f95 + memo: Weekly Payment + currency: XUA + exchange_rate: '2.9' + company: company + inclusive_of_tax: true + lines: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121222' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + account: 9d892439-5fab-4dbb-8bd8-34f7f96c7912 + net_amount: 25.54 + tracking_categories: + - d25d609b-945f-4762-b55a-1c8fb220c43c + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + employee: 123c8r35-5kf5-12x5-r833-99bwf35210b5 + project: 22e65a5d-2df5-4e6e-884a-e538d0339000 + contact: d2d5ea3c-b032-11ec-b909-0242ac120002 + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + description: Cash payment for lunch + exchange_rate: '2.9' + remote_was_deleted: false + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121223' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + account: f963f34d-3d2f-4f77-b557-cf36bc7e6498 + net_amount: 10 + journal_number: '42' + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + remote_was_deleted: true + posting_status: UNPOSTED + accounting_period: accounting_period + remote_created_at: '2020-03-31T00:00:00Z' + remote_updated_at: '2020-03-31T00:00:00Z' + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + create: + path: /accounting/v1/journal-entries + method: POST + auth: true + docs: Creates a `JournalEntry` object with the given values. + source: + openapi: accounting_v3.yml + request: + name: JournalEntryEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: accountingRoot.JournalEntryRequest + content-type: application/json + response: + docs: '' + type: accountingRoot.JournalEntryResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '088899' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + transaction_date: '2020-03-31T00:00:00Z' + payments: + - b26fd49a-cbae-470a-a8f8-bcbc119e0390 + applied_payments: + - 4311155d-f236-4a5d-9e0f-1cb167e38f95 + memo: Weekly Payment + currency: XUA + exchange_rate: '2.9' + company: company + inclusive_of_tax: true + lines: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121222' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + account: 9d892439-5fab-4dbb-8bd8-34f7f96c7912 + net_amount: 25.54 + tracking_categories: + - d25d609b-945f-4762-b55a-1c8fb220c43c + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + employee: 123c8r35-5kf5-12x5-r833-99bwf35210b5 + project: 22e65a5d-2df5-4e6e-884a-e538d0339000 + contact: d2d5ea3c-b032-11ec-b909-0242ac120002 + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + description: Cash payment for lunch + exchange_rate: '2.9' + remote_was_deleted: false + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121223' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + account: f963f34d-3d2f-4f77-b557-cf36bc7e6498 + net_amount: 10 + journal_number: '42' + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + remote_was_deleted: true + posting_status: UNPOSTED + accounting_period: accounting_period + remote_created_at: '2020-03-31T00:00:00Z' + remote_updated_at: '2020-03-31T00:00:00Z' + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /accounting/v1/journal-entries/{id} + method: GET + auth: true + docs: Returns a `JournalEntry` object with the given `id`. + source: + openapi: accounting_v3.yml + path-parameters: + id: string + request: + name: JournalEntriesRetrieveRequest + query-parameters: + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: accountingRoot.JournalEntry + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '088899' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + transaction_date: '2020-03-31T00:00:00Z' + payments: + - b26fd49a-cbae-470a-a8f8-bcbc119e0390 + applied_payments: + - 4311155d-f236-4a5d-9e0f-1cb167e38f95 + memo: Weekly Payment + currency: XUA + exchange_rate: '2.9' + company: company + inclusive_of_tax: true + lines: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121222' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + account: 9d892439-5fab-4dbb-8bd8-34f7f96c7912 + net_amount: 25.54 + tracking_category: tracking_category + tracking_categories: + - d25d609b-945f-4762-b55a-1c8fb220c43c + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + currency: XUA + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + employee: 123c8r35-5kf5-12x5-r833-99bwf35210b5 + project: 22e65a5d-2df5-4e6e-884a-e538d0339000 + contact: d2d5ea3c-b032-11ec-b909-0242ac120002 + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + description: Cash payment for lunch + exchange_rate: '2.9' + remote_was_deleted: false + remote_fields: + - remote_field_class: remote_field_class + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121223' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + account: f963f34d-3d2f-4f77-b557-cf36bc7e6498 + net_amount: 10 + tracking_category: tracking_category + tracking_categories: + - d25d609b-945f-4762-b55a-1c8fb220c43c + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + currency: XUA + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + employee: 123c8r35-5kf5-12x5-r833-99bwf35210b5 + project: project + contact: d2d5ea3c-b032-11ec-b909-0242ac120002 + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + description: Cash payment for lunch + exchange_rate: '2.9' + remote_was_deleted: true + remote_fields: + - remote_field_class: remote_field_class + journal_number: '42' + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + remote_was_deleted: true + posting_status: UNPOSTED + accounting_period: accounting_period + remote_created_at: '2020-03-31T00:00:00Z' + remote_updated_at: '2020-03-31T00:00:00Z' + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + value: + key: value + linesRemoteFieldClassesList: + path: /accounting/v1/journal-entries/lines/remote-field-classes + method: GET + auth: true + docs: Returns a list of `RemoteFieldClass` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: accounting_v3.yml + request: + name: JournalEntriesLinesRemoteFieldClassesListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_common_model_field: + type: optional + docs: >- + If provided, will only return remote field classes with this + is_common_model_field value + is_custom: + type: optional + docs: >- + If provided, will only return remote fields classes with this + is_custom value + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: accountingRoot.PaginatedRemoteFieldClassList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: id + display_name: display_name + remote_key_name: remote_key_name + description: description + is_custom: true + is_required: true + field_type: string + field_format: string + field_choices: + - field_choices + metaPostRetrieve: + path: /accounting/v1/journal-entries/meta/post + method: GET + auth: true + docs: Returns metadata for `JournalEntry` POSTs. + source: + openapi: accounting_v3.yml + response: + docs: '' + type: accountingRoot.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + remoteFieldClassesList: + path: /accounting/v1/journal-entries/remote-field-classes + method: GET + auth: true + docs: Returns a list of `RemoteFieldClass` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: accounting_v3.yml + request: + name: JournalEntriesRemoteFieldClassesListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_common_model_field: + type: optional + docs: >- + If provided, will only return remote field classes with this + is_common_model_field value + is_custom: + type: optional + docs: >- + If provided, will only return remote fields classes with this + is_custom value + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: accountingRoot.PaginatedRemoteFieldClassList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: id + display_name: display_name + remote_key_name: remote_key_name + description: description + is_custom: true + is_required: true + field_type: string + field_format: string + field_choices: + - field_choices + source: + openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/linkToken.yml b/.mock/definition/Accounting/linkToken.yml new file mode 100644 index 000000000..acdb8bb46 --- /dev/null +++ b/.mock/definition/Accounting/linkToken.yml @@ -0,0 +1,152 @@ +imports: + accountingRoot: __package__.yml +types: + EndUserDetailsRequestLanguage: + discriminated: false + docs: >- + The following subset of IETF language tags can be used to configure + localization. + + + * `en` - en + + * `de` - de + union: + - accountingRoot.LanguageEnum + - string + source: + openapi: accounting_v3.yml + inline: true +service: + auth: false + base-path: '' + endpoints: + create: + path: /accounting/v1/link-token + method: POST + auth: true + docs: Creates a link token to be used when linking a new end user. + source: + openapi: accounting_v3.yml + request: + name: EndUserDetailsRequest + body: + properties: + end_user_email_address: + type: string + docs: >- + Your end user's email address. This is purely for identification + purposes - setting this value will not cause any emails to be + sent. + validation: + minLength: 1 + maxLength: 100 + end_user_organization_name: + type: string + docs: Your end user's organization. + validation: + minLength: 1 + maxLength: 100 + end_user_origin_id: + type: string + docs: >- + 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. + validation: + minLength: 1 + maxLength: 100 + categories: + docs: The integration categories to show in Merge Link. + type: list + integration: + type: optional + docs: >- + 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/. + validation: + minLength: 1 + link_expiry_mins: + type: optional + docs: >- + 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. + default: 30 + validation: + min: 30 + max: 10080 + should_create_magic_link_url: + type: optional + docs: >- + 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. + default: false + hide_admin_magic_link: + type: optional + docs: >- + 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. + default: false + common_models: + type: optional> + docs: >- + An array of objects to specify the models and fields that will + be disabled for a given Linked Account. Each object uses + model_id, enabled_actions, and disabled_fields to specify the + model, method, and fields that are scoped for a given Linked + Account. + category_common_model_scopes: + type: >- + optional>>> + docs: >- + When creating a Link Token, you can set permissions for Common + Models that will apply to the account that is going to be + linked. Any model or field not specified in link token payload + will default to existing settings. + language: + type: optional + docs: >- + The following subset of IETF language tags can be used to + configure localization. + + + * `en` - en + + * `de` - de + are_syncs_disabled: + type: optional + docs: >- + The boolean that indicates whether initial, periodic, and force + syncs will be disabled. + default: false + integration_specific_config: + type: optional> + docs: >- + A JSON object containing integration-specific configuration + options. + content-type: application/json + response: + docs: '' + type: accountingRoot.LinkToken + status-code: 200 + examples: + - request: + end_user_email_address: example@gmail.com + end_user_organization_name: Test Organization + end_user_origin_id: '12345' + categories: + - hris + - ats + response: + body: + link_token: necdP7FtdASl1fQwm62be2_dM4wBG8_GactqoUV0 + integration_name: Lever + magic_link_url: https://link.merge.dev/asdfjkl12345jsndfgi2i83n + source: + openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/linkedAccounts.yml b/.mock/definition/Accounting/linkedAccounts.yml new file mode 100644 index 000000000..228511b13 --- /dev/null +++ b/.mock/definition/Accounting/linkedAccounts.yml @@ -0,0 +1,152 @@ +types: + LinkedAccountsListRequestCategory: + enum: + - accounting + - ats + - crm + - filestorage + - hris + - mktg + - ticketing + source: + openapi: accounting_v3.yml +imports: + accountingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/linked-accounts + method: GET + auth: true + docs: List linked accounts for your organization. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: accounting_v3.yml + request: + name: LinkedAccountsListRequest + query-parameters: + category: + type: optional + docs: >- + Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, + `mktg`, `ticketing` + + + * `hris` - hris + + * `ats` - ats + + * `accounting` - accounting + + * `ticketing` - ticketing + + * `crm` - crm + + * `mktg` - mktg + + * `filestorage` - filestorage + cursor: + type: optional + docs: The pagination cursor value. + end_user_email_address: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given email address. + end_user_organization_name: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given organization name. + end_user_origin_id: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given origin ID. + end_user_origin_ids: + type: optional + docs: >- + Comma-separated list of EndUser origin IDs, making it possible to + specify multiple EndUsers at once. + id: + type: optional + validation: + format: uuid + ids: + type: optional + docs: >- + Comma-separated list of LinkedAccount IDs, making it possible to + specify multiple LinkedAccounts at once. + include_duplicates: + type: optional + docs: >- + 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: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given integration name. + is_test_account: + type: optional + docs: >- + If included, will only include test linked accounts. If not + included, will only include non-test linked accounts. + page_size: + type: optional + docs: Number of results to return per page. + status: + type: optional + docs: >- + Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, + `RELINK_NEEDED` + response: + docs: '' + type: accountingRoot.PaginatedAccountDetailsAndActionsList + status-code: 200 + examples: + - response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: e59b1821-f85c-4e28-a6b3-1804156f3563 + category: hris + status: COMPLETE + status_detail: Invalid login credentials + end_user_origin_id: 3ac95cde-6c7f-4eef-afec-be710b42308d + end_user_organization_name: Foo Bar, LLC + end_user_email_address: hradmin@foobar.dev + subdomain: foobar + webhook_listener_url: >- + https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 + is_duplicate: true + integration: + name: name + categories: + - hris + color: color + slug: slug + passthrough_available: true + available_model_operations: + - model_name: Candidate + available_operations: + - FETCH + - CREATE + required_post_parameters: + - remote_user_id + supported_fields: + - first_name + - last_name + - company + - title + account_type: PRODUCTION + completed_at: '2024-08-26T20:11:19Z' + source: + openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/passthrough.yml b/.mock/definition/Accounting/passthrough.yml new file mode 100644 index 000000000..04acc055f --- /dev/null +++ b/.mock/definition/Accounting/passthrough.yml @@ -0,0 +1,40 @@ +imports: + accountingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /accounting/v1/passthrough + method: POST + auth: true + docs: Pull data from an endpoint not currently supported by Merge. + source: + openapi: accounting_v3.yml + request: + body: accountingRoot.DataPassthroughRequest + content-type: application/json + response: + docs: '' + type: accountingRoot.RemoteResponse + status-code: 200 + examples: + - headers: {} + request: + method: GET + path: /scooters + response: + body: + method: GET + path: /scooters + status: 200 + response: + key: value + response_headers: + X-Page-Token: value + response_type: JSON + headers: + EXTRA-HEADER: value + Authorization: + source: + openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/paymentMethods.yml b/.mock/definition/Accounting/paymentMethods.yml new file mode 100644 index 000000000..9e3b60b84 --- /dev/null +++ b/.mock/definition/Accounting/paymentMethods.yml @@ -0,0 +1,123 @@ +imports: + accountingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/payment-methods + method: GET + auth: true + docs: Returns a list of `PaymentMethod` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: accounting_v3.yml + request: + name: PaymentMethodsListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: accountingRoot.PaginatedPaymentMethodList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '088899' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + method_type: CREDIT_CARD + name: John Smith's Credit Card + is_active: true + remote_updated_at: '2021-09-15T00:00:00Z' + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + retrieve: + path: /accounting/v1/payment-methods/{id} + method: GET + auth: true + docs: Returns a `PaymentMethod` object with the given `id`. + source: + openapi: accounting_v3.yml + path-parameters: + id: string + request: + name: PaymentMethodsRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: accountingRoot.PaymentMethod + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '088899' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + method_type: CREDIT_CARD + name: John Smith's Credit Card + is_active: true + remote_updated_at: '2021-09-15T00:00:00Z' + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + source: + openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/paymentTerms.yml b/.mock/definition/Accounting/paymentTerms.yml new file mode 100644 index 000000000..ea5a10547 --- /dev/null +++ b/.mock/definition/Accounting/paymentTerms.yml @@ -0,0 +1,139 @@ +imports: + accountingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/payment-terms + method: GET + auth: true + docs: Returns a list of `PaymentTerm` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: accounting_v3.yml + request: + name: PaymentTermsListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional> + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: accountingRoot.PaginatedPaymentTermList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '088899' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Net 30 + is_active: true + company: company + days_until_due: 30 + discount_days: 15 + remote_last_modified_at: '2024-10-16T00:00:00Z' + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + retrieve: + path: /accounting/v1/payment-terms/{id} + method: GET + auth: true + docs: Returns a `PaymentTerm` object with the given `id`. + source: + openapi: accounting_v3.yml + path-parameters: + id: string + request: + name: PaymentTermsRetrieveRequest + query-parameters: + expand: + type: optional> + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: accountingRoot.PaymentTerm + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '088899' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Net 30 + is_active: true + company: company + days_until_due: 30 + discount_days: 15 + remote_last_modified_at: '2024-10-16T00:00:00Z' + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + source: + openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/payments.yml b/.mock/definition/Accounting/payments.yml new file mode 100644 index 000000000..c91a3e650 --- /dev/null +++ b/.mock/definition/Accounting/payments.yml @@ -0,0 +1,986 @@ +types: + PaymentsListRequestExpandItem: + enum: + - account + - accounting_period + - applied_to_lines + - company + - contact + - payment_method + - tracking_categories + source: + openapi: accounting_v3.yml + PaymentsRetrieveRequestExpandItem: + enum: + - account + - accounting_period + - applied_to_lines + - company + - contact + - payment_method + - tracking_categories + source: + openapi: accounting_v3.yml +imports: + accountingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/payments + method: GET + auth: true + docs: Returns a list of `Payment` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: accounting_v3.yml + request: + name: PaymentsListRequest + query-parameters: + account_id: + type: optional + docs: If provided, will only return payments for this account. + company_id: + type: optional + docs: If provided, will only return payments for this company. + contact_id: + type: optional + docs: If provided, will only return payments for this contact. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + transaction_date_after: + type: optional + docs: If provided, will only return objects created after this datetime. + transaction_date_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + response: + docs: '' + type: accountingRoot.PaginatedPaymentList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: b26fd49a-cbae-470a-a8f8-bcbc119e0390 + remote_id: '987300' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + transaction_date: '2020-03-31T00:00:00Z' + contact: contact + account: account + payment_method: payment_method + currency: XUA + exchange_rate: '2.9' + company: company + total_amount: 50 + type: ACCOUNTS_PAYABLE + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + accounting_period: accounting_period + applied_to_lines: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '234' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + applied_amount: '25' + applied_date: '2020-03-31T00:00:00Z' + related_object_id: a47e11b6-c73b-4a0c-be31-130fc48177fa + related_object_type: INVOICE + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '235' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + applied_amount: '25' + applied_date: '2020-03-31T00:00:00Z' + related_object_id: 9b96a886-29a5-452b-8733-2a1e03497cf4 + related_object_type: CREDIT_NOTE + remote_updated_at: '2020-03-31T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + create: + path: /accounting/v1/payments + method: POST + auth: true + docs: Creates a `Payment` object with the given values. + source: + openapi: accounting_v3.yml + request: + name: PaymentEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: accountingRoot.PaymentRequest + content-type: application/json + response: + docs: '' + type: accountingRoot.PaymentResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: b26fd49a-cbae-470a-a8f8-bcbc119e0390 + remote_id: '987300' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + transaction_date: '2020-03-31T00:00:00Z' + contact: contact + account: account + payment_method: payment_method + currency: XUA + exchange_rate: '2.9' + company: company + total_amount: 50 + type: ACCOUNTS_PAYABLE + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + accounting_period: accounting_period + applied_to_lines: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '234' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + applied_amount: '25' + applied_date: '2020-03-31T00:00:00Z' + related_object_id: a47e11b6-c73b-4a0c-be31-130fc48177fa + related_object_type: INVOICE + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '235' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + applied_amount: '25' + applied_date: '2020-03-31T00:00:00Z' + related_object_id: 9b96a886-29a5-452b-8733-2a1e03497cf4 + related_object_type: CREDIT_NOTE + remote_updated_at: '2020-03-31T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /accounting/v1/payments/{id} + method: GET + auth: true + docs: Returns a `Payment` object with the given `id`. + source: + openapi: accounting_v3.yml + path-parameters: + id: string + request: + name: PaymentsRetrieveRequest + query-parameters: + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: accountingRoot.Payment + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: b26fd49a-cbae-470a-a8f8-bcbc119e0390 + remote_id: '987300' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + transaction_date: '2020-03-31T00:00:00Z' + contact: contact + account: account + payment_method: payment_method + currency: XUA + exchange_rate: '2.9' + company: company + total_amount: 50 + type: ACCOUNTS_PAYABLE + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + accounting_period: accounting_period + applied_to_lines: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '234' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + applied_amount: '25' + applied_date: '2020-03-31T00:00:00Z' + related_object_id: a47e11b6-c73b-4a0c-be31-130fc48177fa + related_object_type: INVOICE + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '235' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + applied_amount: '25' + applied_date: '2020-03-31T00:00:00Z' + related_object_id: 9b96a886-29a5-452b-8733-2a1e03497cf4 + related_object_type: CREDIT_NOTE + remote_updated_at: '2020-03-31T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + value: + key: value + partialUpdate: + path: /accounting/v1/payments/{id} + method: PATCH + auth: true + docs: Updates a `Payment` object with the given `id`. + source: + openapi: accounting_v3.yml + path-parameters: + id: string + request: + name: PatchedPaymentEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: accountingRoot.PatchedPaymentRequest + content-type: application/json + response: + docs: '' + type: accountingRoot.PaymentResponse + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + request: + model: {} + response: + body: + model: + id: b26fd49a-cbae-470a-a8f8-bcbc119e0390 + remote_id: '987300' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + transaction_date: '2020-03-31T00:00:00Z' + contact: contact + account: account + payment_method: payment_method + currency: XUA + exchange_rate: '2.9' + company: company + total_amount: 50 + type: ACCOUNTS_PAYABLE + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + accounting_period: accounting_period + applied_to_lines: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '234' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + applied_amount: '25' + applied_date: '2020-03-31T00:00:00Z' + related_object_id: a47e11b6-c73b-4a0c-be31-130fc48177fa + related_object_type: INVOICE + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '235' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + applied_amount: '25' + applied_date: '2020-03-31T00:00:00Z' + related_object_id: 9b96a886-29a5-452b-8733-2a1e03497cf4 + related_object_type: CREDIT_NOTE + remote_updated_at: '2020-03-31T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + lineItemsRemoteFieldClassesList: + path: /accounting/v1/payments/line-items/remote-field-classes + method: GET + auth: true + docs: Returns a list of `RemoteFieldClass` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: accounting_v3.yml + request: + name: PaymentsLineItemsRemoteFieldClassesListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_common_model_field: + type: optional + docs: >- + If provided, will only return remote field classes with this + is_common_model_field value + is_custom: + type: optional + docs: >- + If provided, will only return remote fields classes with this + is_custom value + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: accountingRoot.PaginatedRemoteFieldClassList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: id + display_name: display_name + remote_key_name: remote_key_name + description: description + is_custom: true + is_required: true + field_type: string + field_format: string + field_choices: + - field_choices + metaPatchRetrieve: + path: /accounting/v1/payments/meta/patch/{id} + method: GET + auth: true + docs: Returns metadata for `Payment` PATCHs. + source: + openapi: accounting_v3.yml + path-parameters: + id: string + response: + docs: '' + type: accountingRoot.MetaResponse + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + metaPostRetrieve: + path: /accounting/v1/payments/meta/post + method: GET + auth: true + docs: Returns metadata for `Payment` POSTs. + source: + openapi: accounting_v3.yml + response: + docs: '' + type: accountingRoot.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + remoteFieldClassesList: + path: /accounting/v1/payments/remote-field-classes + method: GET + auth: true + docs: Returns a list of `RemoteFieldClass` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: accounting_v3.yml + request: + name: PaymentsRemoteFieldClassesListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_common_model_field: + type: optional + docs: >- + If provided, will only return remote field classes with this + is_common_model_field value + is_custom: + type: optional + docs: >- + If provided, will only return remote fields classes with this + is_custom value + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: accountingRoot.PaginatedRemoteFieldClassList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: id + display_name: display_name + remote_key_name: remote_key_name + description: description + is_custom: true + is_required: true + field_type: string + field_format: string + field_choices: + - field_choices + source: + openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/phoneNumbers.yml b/.mock/definition/Accounting/phoneNumbers.yml new file mode 100644 index 000000000..293ef8aec --- /dev/null +++ b/.mock/definition/Accounting/phoneNumbers.yml @@ -0,0 +1,44 @@ +imports: + accountingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + retrieve: + path: /accounting/v1/phone-numbers/{id} + method: GET + auth: true + docs: Returns an `AccountingPhoneNumber` object with the given `id`. + source: + openapi: accounting_v3.yml + path-parameters: + id: string + request: + name: PhoneNumbersRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: accountingRoot.AccountingPhoneNumber + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + number: '+3198675309' + type: Mobile + source: + openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/projects.yml b/.mock/definition/Accounting/projects.yml new file mode 100644 index 000000000..0aa5d634b --- /dev/null +++ b/.mock/definition/Accounting/projects.yml @@ -0,0 +1,144 @@ +types: + ProjectsListRequestExpandItem: + enum: + - company + - contact + source: + openapi: accounting_v3.yml + ProjectsRetrieveRequestExpandItem: + enum: + - company + - contact + source: + openapi: accounting_v3.yml +imports: + accountingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/projects + method: GET + auth: true + docs: Returns a list of `Project` objects. + source: + openapi: accounting_v3.yml + request: + name: ProjectsListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: accountingRoot.PaginatedProjectList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '088899' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Permissions Mapping + is_active: true + company: company + contact: contact + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + retrieve: + path: /accounting/v1/projects/{id} + method: GET + auth: true + docs: Returns a `Project` object with the given `id`. + source: + openapi: accounting_v3.yml + path-parameters: + id: string + request: + name: ProjectsRetrieveRequest + query-parameters: + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: accountingRoot.Project + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '088899' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Permissions Mapping + is_active: true + company: company + contact: contact + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + source: + openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/purchaseOrders.yml b/.mock/definition/Accounting/purchaseOrders.yml new file mode 100644 index 000000000..f85a771d1 --- /dev/null +++ b/.mock/definition/Accounting/purchaseOrders.yml @@ -0,0 +1,787 @@ +types: + PurchaseOrdersListRequestExpandItem: + enum: + - accounting_period + - company + - delivery_address + - line_items + - payment_term + - tracking_categories + - vendor + source: + openapi: accounting_v3.yml + PurchaseOrdersRetrieveRequestExpandItem: + enum: + - accounting_period + - company + - delivery_address + - line_items + - payment_term + - tracking_categories + - vendor + source: + openapi: accounting_v3.yml +imports: + accountingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/purchase-orders + method: GET + auth: true + docs: Returns a list of `PurchaseOrder` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: accounting_v3.yml + request: + name: PurchaseOrdersListRequest + query-parameters: + company_id: + type: optional + docs: If provided, will only return purchase orders for this company. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + issue_date_after: + type: optional + docs: If provided, will only return objects created after this datetime. + issue_date_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: accountingRoot.PaginatedPurchaseOrderList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 0048ea5b-911e-4dff-9364-92070dea62ff + remote_id: '239741' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + status: DRAFT + issue_date: '2020-03-31T00:00:00Z' + purchase_order_number: PO1234 + delivery_date: '2020-04-15T00:00:00Z' + delivery_address: delivery_address + customer: 3e442c5d-8f51-4103-b5c9-dcee39c30a08 + vendor: vendor + memo: private note + company: company + total_amount: 260 + currency: XUA + exchange_rate: '2.9' + payment_term: payment_term + line_items: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121222' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + description: Pickleball paddles + unit_price: 25 + quantity: 10 + item: 0958cbc6-6040-430a-848e-aafacbadf4ae + tracking_categories: + - f1214c24-2702-4617-b74b-3ddecfc0d384 + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + tax_amount: tax_amount + total_line_amount: total_line_amount + currency: USD + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + exchange_rate: '2.9' + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: false + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + description: Pickleball Balls + unit_price: 1 + quantity: 10 + item: 249c9faa-3045-4a31-953b-8f22d3613301 + tracking_categories: + - f1214c24-2702-4617-b74b-3ddecfc0d384 + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + tax_amount: tax_amount + total_line_amount: total_line_amount + inclusive_of_tax: true + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + accounting_period: accounting_period + remote_created_at: '2020-03-31T00:00:00Z' + remote_updated_at: '2020-03-31T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + create: + path: /accounting/v1/purchase-orders + method: POST + auth: true + docs: Creates a `PurchaseOrder` object with the given values. + source: + openapi: accounting_v3.yml + request: + name: PurchaseOrderEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: accountingRoot.PurchaseOrderRequest + content-type: application/json + response: + docs: '' + type: accountingRoot.PurchaseOrderResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: 0048ea5b-911e-4dff-9364-92070dea62ff + remote_id: '239741' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + status: DRAFT + issue_date: '2020-03-31T00:00:00Z' + purchase_order_number: PO1234 + delivery_date: '2020-04-15T00:00:00Z' + delivery_address: delivery_address + customer: 3e442c5d-8f51-4103-b5c9-dcee39c30a08 + vendor: vendor + memo: private note + company: company + total_amount: 260 + currency: XUA + exchange_rate: '2.9' + payment_term: payment_term + line_items: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121222' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + description: Pickleball paddles + unit_price: 25 + quantity: 10 + item: 0958cbc6-6040-430a-848e-aafacbadf4ae + tracking_categories: + - f1214c24-2702-4617-b74b-3ddecfc0d384 + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + tax_amount: tax_amount + total_line_amount: total_line_amount + currency: USD + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + exchange_rate: '2.9' + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: false + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + description: Pickleball Balls + unit_price: 1 + quantity: 10 + item: 249c9faa-3045-4a31-953b-8f22d3613301 + tracking_categories: + - f1214c24-2702-4617-b74b-3ddecfc0d384 + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + tax_amount: tax_amount + total_line_amount: total_line_amount + inclusive_of_tax: true + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + accounting_period: accounting_period + remote_created_at: '2020-03-31T00:00:00Z' + remote_updated_at: '2020-03-31T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /accounting/v1/purchase-orders/{id} + method: GET + auth: true + docs: Returns a `PurchaseOrder` object with the given `id`. + source: + openapi: accounting_v3.yml + path-parameters: + id: string + request: + name: PurchaseOrdersRetrieveRequest + query-parameters: + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: accountingRoot.PurchaseOrder + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 0048ea5b-911e-4dff-9364-92070dea62ff + remote_id: '239741' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + status: DRAFT + issue_date: '2020-03-31T00:00:00Z' + purchase_order_number: PO1234 + delivery_date: '2020-04-15T00:00:00Z' + delivery_address: delivery_address + customer: 3e442c5d-8f51-4103-b5c9-dcee39c30a08 + vendor: vendor + memo: private note + company: company + total_amount: 260 + currency: XUA + exchange_rate: '2.9' + payment_term: payment_term + line_items: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121222' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + description: Pickleball paddles + unit_price: 25 + quantity: 10 + item: 0958cbc6-6040-430a-848e-aafacbadf4ae + account: account + tracking_category: tracking_category + tracking_categories: + - f1214c24-2702-4617-b74b-3ddecfc0d384 + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + tax_amount: tax_amount + total_line_amount: total_line_amount + currency: USD + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + exchange_rate: '2.9' + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: false + remote_fields: + - remote_field_class: remote_field_class + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121222' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + description: Pickleball Balls + unit_price: 1 + quantity: 10 + item: 249c9faa-3045-4a31-953b-8f22d3613301 + account: account + tracking_category: tracking_category + tracking_categories: + - f1214c24-2702-4617-b74b-3ddecfc0d384 + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + tax_amount: tax_amount + total_line_amount: total_line_amount + currency: XUA + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + exchange_rate: '2.9' + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: true + remote_fields: + - remote_field_class: remote_field_class + inclusive_of_tax: true + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + accounting_period: accounting_period + remote_created_at: '2020-03-31T00:00:00Z' + remote_updated_at: '2020-03-31T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + value: + key: value + lineItemsRemoteFieldClassesList: + path: /accounting/v1/purchase-orders/line-items/remote-field-classes + method: GET + auth: true + docs: Returns a list of `RemoteFieldClass` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: accounting_v3.yml + request: + name: PurchaseOrdersLineItemsRemoteFieldClassesListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_common_model_field: + type: optional + docs: >- + If provided, will only return remote field classes with this + is_common_model_field value + is_custom: + type: optional + docs: >- + If provided, will only return remote fields classes with this + is_custom value + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: accountingRoot.PaginatedRemoteFieldClassList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: id + display_name: display_name + remote_key_name: remote_key_name + description: description + is_custom: true + is_required: true + field_type: string + field_format: string + field_choices: + - field_choices + metaPostRetrieve: + path: /accounting/v1/purchase-orders/meta/post + method: GET + auth: true + docs: Returns metadata for `PurchaseOrder` POSTs. + source: + openapi: accounting_v3.yml + response: + docs: '' + type: accountingRoot.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + remoteFieldClassesList: + path: /accounting/v1/purchase-orders/remote-field-classes + method: GET + auth: true + docs: Returns a list of `RemoteFieldClass` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: accounting_v3.yml + request: + name: PurchaseOrdersRemoteFieldClassesListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_common_model_field: + type: optional + docs: >- + If provided, will only return remote field classes with this + is_common_model_field value + is_custom: + type: optional + docs: >- + If provided, will only return remote fields classes with this + is_custom value + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: accountingRoot.PaginatedRemoteFieldClassList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: id + display_name: display_name + remote_key_name: remote_key_name + description: description + is_custom: true + is_required: true + field_type: string + field_format: string + field_choices: + - field_choices + source: + openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/regenerateKey.yml b/.mock/definition/Accounting/regenerateKey.yml new file mode 100644 index 000000000..578850324 --- /dev/null +++ b/.mock/definition/Accounting/regenerateKey.yml @@ -0,0 +1,36 @@ +imports: + accountingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /accounting/v1/regenerate-key + method: POST + auth: true + docs: Exchange remote keys. + source: + openapi: accounting_v3.yml + request: + name: RemoteKeyForRegenerationRequest + body: + properties: + name: + type: string + docs: The name of the remote key + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: accountingRoot.RemoteKey + status-code: 200 + examples: + - request: + name: Remote Deployment Key 1 + response: + body: + name: Remote Deployment Key 1 + key: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA + source: + openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/scopes.yml b/.mock/definition/Accounting/scopes.yml new file mode 100644 index 000000000..5bed6a262 --- /dev/null +++ b/.mock/definition/Accounting/scopes.yml @@ -0,0 +1,161 @@ +imports: + accountingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + default_scopes_retrieve: + path: /accounting/v1/default-scopes + method: GET + auth: true + docs: >- + 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). + source: + openapi: accounting_v3.yml + response: + docs: '' + type: accountingRoot.CommonModelScopeApi + status-code: 200 + examples: + - response: + body: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - created_at + - custom_fields + - date_of_birth + - first_name + - gender + - remote_created_at + - remote_data + disabled_fields: + - company + - employments + - groups + - home_location + - manager + - work_location + linked_account_scopes_retrieve: + path: /accounting/v1/linked-account-scopes + method: GET + auth: true + docs: >- + 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). + source: + openapi: accounting_v3.yml + response: + docs: '' + type: accountingRoot.CommonModelScopeApi + status-code: 200 + examples: + - headers: {} + response: + body: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - created_at + - custom_fields + - date_of_birth + - first_name + - gender + - remote_created_at + - remote_data + disabled_fields: + - company + - employments + - groups + - home_location + - manager + - work_location + linked_account_scopes_create: + path: /accounting/v1/linked-account-scopes + method: POST + auth: true + docs: >- + 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) + source: + openapi: accounting_v3.yml + request: + name: LinkedAccountCommonModelScopeDeserializerRequest + body: + properties: + common_models: + docs: The common models you want to update the scopes for + type: >- + list + content-type: application/json + response: + docs: '' + type: accountingRoot.CommonModelScopeApi + status-code: 200 + examples: + - headers: {} + request: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - home_location + disabled_fields: + - work_location + - model_name: Benefit + model_permissions: + WRITE: + is_enabled: false + response: + body: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - created_at + - custom_fields + - date_of_birth + - first_name + - gender + - remote_created_at + - remote_data + disabled_fields: + - company + - employments + - groups + - home_location + - manager + - work_location + source: + openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/syncStatus.yml b/.mock/definition/Accounting/syncStatus.yml new file mode 100644 index 000000000..2872af19f --- /dev/null +++ b/.mock/definition/Accounting/syncStatus.yml @@ -0,0 +1,59 @@ +imports: + accountingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/sync-status + method: GET + auth: true + docs: >- + 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). + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: accounting_v3.yml + request: + name: SyncStatusListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: accountingRoot.PaginatedSyncStatusList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - model_name: Invoice + model_id: accounting.Invoices + last_sync_start: '2021-03-30T19:44:18Z' + next_sync_start: '2021-03-30T20:44:18Z' + last_sync_result: SYNCING + last_sync_finished: '2021-03-30T19:55:18Z' + status: SYNCING + is_initial_sync: true + selective_sync_configurations_usage: IN_NEXT_SYNC + source: + openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/taxRates.yml b/.mock/definition/Accounting/taxRates.yml new file mode 100644 index 000000000..8f3ccfb34 --- /dev/null +++ b/.mock/definition/Accounting/taxRates.yml @@ -0,0 +1,191 @@ +imports: + accountingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/tax-rates + method: GET + auth: true + docs: Returns a list of `TaxRate` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: accounting_v3.yml + request: + name: TaxRatesListRequest + query-parameters: + company_id: + type: optional + docs: If provided, will only return tax rates for this company. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional> + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + name: + type: optional + docs: If provided, will only return TaxRates with this name. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: accountingRoot.PaginatedTaxRateList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: b82302de-852e-4e60-b050-edf9da3b7c02 + remote_id: '039111' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + company: company + code: '890' + name: State tax rate + description: Sales Tax + status: ACTIVE + country: US + total_tax_rate: 15 + effective_tax_rate: 15 + tax_components: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '039111' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Drink Tax Component + rate: rate + is_compound: true + component_type: SALES + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + retrieve: + path: /accounting/v1/tax-rates/{id} + method: GET + auth: true + docs: Returns a `TaxRate` object with the given `id`. + source: + openapi: accounting_v3.yml + path-parameters: + id: string + request: + name: TaxRatesRetrieveRequest + query-parameters: + expand: + type: optional> + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: accountingRoot.TaxRate + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: b82302de-852e-4e60-b050-edf9da3b7c02 + remote_id: '039111' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + company: company + code: '890' + name: State tax rate + description: Sales Tax + status: ACTIVE + country: US + total_tax_rate: 15 + effective_tax_rate: 15 + tax_components: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '039111' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Drink Tax Component + rate: rate + is_compound: true + component_type: SALES + remote_was_deleted: true + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + source: + openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/trackingCategories.yml b/.mock/definition/Accounting/trackingCategories.yml new file mode 100644 index 000000000..50c47e8e1 --- /dev/null +++ b/.mock/definition/Accounting/trackingCategories.yml @@ -0,0 +1,188 @@ +imports: + accountingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/tracking-categories + method: GET + auth: true + docs: Returns a list of `TrackingCategory` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: accounting_v3.yml + request: + name: TrackingCategoriesListRequest + query-parameters: + category_type: + type: optional + docs: If provided, will only return tracking categories with this type. + company_id: + type: optional + docs: >- + If provided, will only return tracking categories for this + company. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional> + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + name: + type: optional + docs: If provided, will only return tracking categories with this name. + page_size: + type: optional + docs: Number of results to return per page. + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + show_enum_origins: + type: optional> + docs: >- + A comma separated list of enum field names for which you'd like + the original values to be returned, instead of Merge's normalized + enum values. [Learn + more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) + status: + type: optional + docs: >- + If provided, will only return tracking categories with this + status. + response: + docs: '' + type: accountingRoot.PaginatedTrackingCategoryList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '948201' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Marketing Department + status: ACTIVE + category_type: CLASS + parent_category: d25d609b-945f-4762-b55a-1c8fb220c43c + company: company + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + retrieve: + path: /accounting/v1/tracking-categories/{id} + method: GET + auth: true + docs: Returns a `TrackingCategory` object with the given `id`. + source: + openapi: accounting_v3.yml + path-parameters: + id: string + request: + name: TrackingCategoriesRetrieveRequest + query-parameters: + expand: + type: optional> + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: accountingRoot.TrackingCategory + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '948201' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Marketing Department + status: ACTIVE + category_type: CLASS + parent_category: d25d609b-945f-4762-b55a-1c8fb220c43c + company: company + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + source: + openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/transactions.yml b/.mock/definition/Accounting/transactions.yml new file mode 100644 index 000000000..de2a13f6f --- /dev/null +++ b/.mock/definition/Accounting/transactions.yml @@ -0,0 +1,287 @@ +types: + TransactionsListRequestExpandItem: + enum: + - account + - accounting_period + - contact + - line_items + - tracking_categories + source: + openapi: accounting_v3.yml + TransactionsRetrieveRequestExpandItem: + enum: + - account + - accounting_period + - contact + - line_items + - tracking_categories + source: + openapi: accounting_v3.yml +imports: + accountingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/transactions + method: GET + auth: true + docs: Returns a list of `Transaction` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: accounting_v3.yml + request: + name: TransactionsListRequest + query-parameters: + company_id: + type: optional + docs: >- + If provided, will only return accounting transactions for this + company. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + transaction_date_after: + type: optional + docs: If provided, will only return objects created after this datetime. + transaction_date_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + response: + docs: '' + type: accountingRoot.PaginatedTransactionList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 0048ea5b-911e-4dff-9364-92070dea62ff + remote_id: '239741' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + transaction_type: estimate + number: '122' + transaction_date: '2020-03-31T00:00:00Z' + account: account + contact: contact + inclusive_of_tax: true + total_amount: total_amount + currency: XUA + exchange_rate: '2.9' + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + line_items: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121222' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + memo: Pickleball paddles + unit_price: '25.0' + quantity: '10.0' + item: 0958cbc6-6040-430a-848e-aafacbadf4ae + account: 2b38c085-2620-4269-b5ec-75dd9095ed2c + tracking_categories: + - f1214c24-2702-4617-b74b-3ddecfc0d384 + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + total_line_amount: total_line_amount + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + currency: USD + exchange_rate: '2.9' + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: false + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + memo: Pickleball balls + unit_price: '25.0' + quantity: '10.0' + item: 249c9faa-3045-4a31-953b-8f22d3613301 + account: 3e442c5d-8f51-4103-b5c9-dcee39c30a08 + tracking_categories: + - f1214c24-2702-4617-b74b-3ddecfc0d384 + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + total_line_amount: total_line_amount + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + remote_was_deleted: true + accounting_period: accounting_period + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + retrieve: + path: /accounting/v1/transactions/{id} + method: GET + auth: true + docs: Returns a `Transaction` object with the given `id`. + source: + openapi: accounting_v3.yml + path-parameters: + id: string + request: + name: TransactionsRetrieveRequest + query-parameters: + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: accountingRoot.Transaction + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 0048ea5b-911e-4dff-9364-92070dea62ff + remote_id: '239741' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + transaction_type: estimate + number: '122' + transaction_date: '2020-03-31T00:00:00Z' + account: account + contact: contact + inclusive_of_tax: true + total_amount: total_amount + currency: XUA + exchange_rate: '2.9' + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + line_items: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121222' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + memo: Pickleball paddles + unit_price: '25.0' + quantity: '10.0' + item: 0958cbc6-6040-430a-848e-aafacbadf4ae + account: 2b38c085-2620-4269-b5ec-75dd9095ed2c + tracking_category: tracking_category + tracking_categories: + - f1214c24-2702-4617-b74b-3ddecfc0d384 + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + total_line_amount: total_line_amount + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + currency: USD + exchange_rate: '2.9' + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: false + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121222' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + memo: Pickleball balls + unit_price: '25.0' + quantity: '10.0' + item: 249c9faa-3045-4a31-953b-8f22d3613301 + account: 3e442c5d-8f51-4103-b5c9-dcee39c30a08 + tracking_category: tracking_category + tracking_categories: + - f1214c24-2702-4617-b74b-3ddecfc0d384 + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + total_line_amount: total_line_amount + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + currency: XUA + exchange_rate: '2.9' + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: true + remote_was_deleted: true + accounting_period: accounting_period + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + source: + openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/vendorCredits.yml b/.mock/definition/Accounting/vendorCredits.yml new file mode 100644 index 000000000..6c91ef165 --- /dev/null +++ b/.mock/definition/Accounting/vendorCredits.yml @@ -0,0 +1,585 @@ +types: + VendorCreditsListRequestExpandItem: + enum: + - accounting_period + - company + - lines + - tracking_categories + - vendor + source: + openapi: accounting_v3.yml + VendorCreditsRetrieveRequestExpandItem: + enum: + - accounting_period + - company + - lines + - tracking_categories + - vendor + source: + openapi: accounting_v3.yml +imports: + accountingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/vendor-credits + method: GET + auth: true + docs: Returns a list of `VendorCredit` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: accounting_v3.yml + request: + name: VendorCreditsListRequest + query-parameters: + company_id: + type: optional + docs: If provided, will only return vendor credits for this company. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + transaction_date_after: + type: optional + docs: If provided, will only return objects created after this datetime. + transaction_date_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + response: + docs: '' + type: accountingRoot.PaginatedVendorCreditList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '088899' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + number: '6' + transaction_date: '2020-03-31T00:00:00Z' + vendor: vendor + total_amount: 10000 + currency: XUA + exchange_rate: '2.9' + inclusive_of_tax: true + company: company + lines: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121222' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + net_amount: 25.54 + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + description: Gifted Merge Credit + account: 9d892439-5fab-4dbb-8bd8-34f7f96c7912 + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + project: 22e65a5d-2df5-4e6e-884a-e538d0339000 + contact: 908934-49j9-093f-0989-908923908 + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + exchange_rate: '2.9' + remote_was_deleted: false + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121223' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + net_amount: 10 + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + description: Refund for overpayment + account: 9d892439-5fab-4dbb-8bd8-34f7f96c7912 + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + applied_to_lines: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + invoice: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + applied_date: '2020-03-31T00:00:00Z' + applied_amount: '2.9' + remote_was_deleted: true + accounting_period: accounting_period + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + create: + path: /accounting/v1/vendor-credits + method: POST + auth: true + docs: Creates a `VendorCredit` object with the given values. + source: + openapi: accounting_v3.yml + request: + name: VendorCreditEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: accountingRoot.VendorCreditRequest + content-type: application/json + response: + docs: '' + type: accountingRoot.VendorCreditResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '088899' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + number: '6' + transaction_date: '2020-03-31T00:00:00Z' + vendor: vendor + total_amount: 10000 + currency: XUA + exchange_rate: '2.9' + inclusive_of_tax: true + company: company + lines: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121222' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + net_amount: 25.54 + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + description: Gifted Merge Credit + account: 9d892439-5fab-4dbb-8bd8-34f7f96c7912 + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + project: 22e65a5d-2df5-4e6e-884a-e538d0339000 + contact: 908934-49j9-093f-0989-908923908 + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + exchange_rate: '2.9' + remote_was_deleted: false + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121223' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + net_amount: 10 + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + description: Refund for overpayment + account: 9d892439-5fab-4dbb-8bd8-34f7f96c7912 + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + applied_to_lines: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + invoice: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + applied_date: '2020-03-31T00:00:00Z' + applied_amount: '2.9' + remote_was_deleted: true + accounting_period: accounting_period + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /accounting/v1/vendor-credits/{id} + method: GET + auth: true + docs: Returns a `VendorCredit` object with the given `id`. + source: + openapi: accounting_v3.yml + path-parameters: + id: string + request: + name: VendorCreditsRetrieveRequest + query-parameters: + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: accountingRoot.VendorCredit + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '088899' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + number: '6' + transaction_date: '2020-03-31T00:00:00Z' + vendor: vendor + total_amount: 10000 + currency: XUA + exchange_rate: '2.9' + inclusive_of_tax: true + company: company + lines: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121222' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + net_amount: 25.54 + tracking_category: tracking_category + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + description: Gifted Merge Credit + account: 9d892439-5fab-4dbb-8bd8-34f7f96c7912 + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + project: 22e65a5d-2df5-4e6e-884a-e538d0339000 + contact: 908934-49j9-093f-0989-908923908 + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + exchange_rate: '2.9' + remote_was_deleted: false + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121223' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + net_amount: 10 + tracking_category: tracking_category + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + description: Refund for overpayment + account: 9d892439-5fab-4dbb-8bd8-34f7f96c7912 + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + project: project + contact: contact + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + exchange_rate: '2.9' + remote_was_deleted: true + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + applied_to_lines: + - remote_id: '088899' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + invoice: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + applied_date: '2020-03-31T00:00:00Z' + applied_amount: '2.9' + remote_was_deleted: true + remote_was_deleted: true + accounting_period: accounting_period + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + metaPostRetrieve: + path: /accounting/v1/vendor-credits/meta/post + method: GET + auth: true + docs: Returns metadata for `VendorCredit` POSTs. + source: + openapi: accounting_v3.yml + response: + docs: '' + type: accountingRoot.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + source: + openapi: accounting_v3.yml diff --git a/.mock/definition/Accounting/webhookReceivers.yml b/.mock/definition/Accounting/webhookReceivers.yml new file mode 100644 index 000000000..bb5e70aa8 --- /dev/null +++ b/.mock/definition/Accounting/webhookReceivers.yml @@ -0,0 +1,61 @@ +imports: + accountingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/webhook-receivers + method: GET + auth: true + docs: Returns a list of `WebhookReceiver` objects. + source: + openapi: accounting_v3.yml + response: + docs: '' + type: list + status-code: 200 + examples: + - headers: {} + response: + body: + - event: event + is_active: true + key: key + create: + path: /accounting/v1/webhook-receivers + method: POST + auth: true + docs: Creates a `WebhookReceiver` object with the given values. + source: + openapi: accounting_v3.yml + request: + name: WebhookReceiverRequest + body: + properties: + event: + type: string + validation: + minLength: 1 + is_active: boolean + key: + type: optional + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: accountingRoot.WebhookReceiver + status-code: 201 + examples: + - headers: {} + request: + event: event + is_active: true + response: + body: + event: event + is_active: true + key: key + source: + openapi: accounting_v3.yml diff --git a/.mock/definition/CRM/__package__.yml b/.mock/definition/CRM/__package__.yml new file mode 100644 index 000000000..d5382cc71 --- /dev/null +++ b/.mock/definition/CRM/__package__.yml @@ -0,0 +1,5733 @@ +types: + AccountOwner: + discriminated: false + docs: The account's owner. + union: + - type: string + validation: + format: uuid + - User + source: + openapi: crm_v3.yml + inline: true + Account: + docs: |- + # The Account Object + ### Description + The `Account` object is used to represent a company in a CRM system. + ### Usage Example + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + owner: + type: optional + docs: The account's owner. + name: + type: optional + docs: The account's name. + description: + type: optional + docs: The account's description. + industry: + type: optional + docs: The account's industry. + website: + type: optional + docs: The account's website. + validation: + format: uri + maxLength: 2000 + number_of_employees: + type: optional + docs: The account's number of employees. + validation: + min: -2147483648 + max: 2147483647 + addresses: optional> + phone_numbers: + type: optional> + access: read-only + last_activity_at: + type: optional + docs: >- + The last date (either most recent or furthest in the future) of when + an activity occurs in an account. + remote_updated_at: + type: optional + docs: >- + When the CRM system account data was last modified by a user with a + login. + remote_created_at: + type: optional + docs: When the third party's account was created. + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + remote_fields: + type: optional> + access: read-only + source: + openapi: crm_v3.yml + AccountDetailsCategory: + discriminated: false + union: + - CategoryEnum + - string + source: + openapi: crm_v3.yml + inline: true + AccountDetails: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + integration: + type: optional + access: read-only + integration_slug: + type: optional + access: read-only + category: optional + end_user_origin_id: + type: optional + access: read-only + end_user_organization_name: + type: optional + access: read-only + end_user_email_address: + type: optional + validation: + format: email + access: read-only + status: + type: optional + access: read-only + webhook_listener_url: + type: optional + validation: + format: uri + access: read-only + is_duplicate: + type: optional + docs: >- + Whether a Production Linked Account's credentials match another + existing Production Linked Account. This field is `null` for Test + Linked Accounts, incomplete Production Linked Accounts, and ignored + duplicate Production Linked Account sets. + access: read-only + account_type: + type: optional + access: read-only + completed_at: + type: optional + docs: The time at which account completes the linking flow. + source: + openapi: crm_v3.yml + AccountDetailsAndActionsCategory: + discriminated: false + union: + - CategoryEnum + - string + source: + openapi: crm_v3.yml + inline: true + AccountDetailsAndActionsStatus: + discriminated: false + union: + - AccountDetailsAndActionsStatusEnum + - string + source: + openapi: crm_v3.yml + inline: true + AccountDetailsAndActions: + docs: >- + # The LinkedAccount Object + + ### Description + + The `LinkedAccount` object is used to represent an end user's link with a + specific integration. + + + ### Usage Example + + View a list of your organization's `LinkedAccount` objects. + properties: + id: string + category: optional + status: AccountDetailsAndActionsStatus + status_detail: optional + end_user_origin_id: optional + end_user_organization_name: string + end_user_email_address: string + subdomain: + type: optional + docs: The tenant or domain the customer has provided access to. + webhook_listener_url: string + is_duplicate: + type: optional + docs: >- + Whether a Production Linked Account's credentials match another + existing Production Linked Account. This field is `null` for Test + Linked Accounts, incomplete Production Linked Accounts, and ignored + duplicate Production Linked Account sets. + integration: optional + account_type: string + completed_at: datetime + source: + openapi: crm_v3.yml + AccountDetailsAndActionsIntegration: + properties: + name: string + categories: list + image: optional + square_image: optional + color: string + slug: string + passthrough_available: boolean + available_model_operations: optional> + source: + openapi: crm_v3.yml + AccountDetailsAndActionsStatusEnum: + enum: + - COMPLETE + - INCOMPLETE + - RELINK_NEEDED + - IDLE + docs: |- + * `COMPLETE` - COMPLETE + * `INCOMPLETE` - INCOMPLETE + * `RELINK_NEEDED` - RELINK_NEEDED + * `IDLE` - IDLE + source: + openapi: crm_v3.yml + AccountIntegration: + properties: + name: + type: string + docs: Company name. + abbreviated_name: + type: optional + docs: >- + Optional. This shortened name appears in places with limited space, + usually in conjunction with the platform's logo (e.g., Merge Link + menu).

Example: Workforce Now (in lieu of ADP Workforce + Now), SuccessFactors (in lieu of SAP SuccessFactors) + categories: + type: optional> + docs: >- + Category or categories this integration belongs to. Multiple + categories should be comma separated, i.e. [ats, hris]. + access: read-only + image: + type: optional + docs: Company logo in rectangular shape. + validation: + format: uri + square_image: + type: optional + docs: Company logo in square shape. + validation: + format: uri + color: + type: optional + docs: >- + The color of this integration used for buttons and text throughout the + app and landing pages. Choose a darker, saturated color. + validation: + pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ + maxLength: 18 + slug: + type: optional + access: read-only + api_endpoints_to_documentation_urls: + type: optional> + docs: >- + Mapping of API endpoints to documentation urls for support. Example: + {'GET': [['/common-model-scopes', + 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', + 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], + 'POST': []} + webhook_setup_guide_url: + type: optional + docs: >- + Setup guide URL for third party webhook creation. Exposed in Merge + Docs. + category_beta_status: + type: optional> + docs: Category or categories this integration is in beta status for. + access: read-only + source: + openapi: crm_v3.yml + AccountRequestOwner: + discriminated: false + docs: The account's owner. + union: + - type: string + validation: + format: uuid + - User + source: + openapi: crm_v3.yml + inline: true + AccountRequest: + docs: |- + # The Account Object + ### Description + The `Account` object is used to represent a company in a CRM system. + ### Usage Example + TODO + properties: + owner: + type: optional + docs: The account's owner. + name: + type: optional + docs: The account's name. + description: + type: optional + docs: The account's description. + industry: + type: optional + docs: The account's industry. + website: + type: optional + docs: The account's website. + validation: + format: uri + maxLength: 2000 + number_of_employees: + type: optional + docs: The account's number of employees. + validation: + min: -2147483648 + max: 2147483647 + addresses: optional> + last_activity_at: + type: optional + docs: >- + The last date (either most recent or furthest in the future) of when + an activity occurs in an account. + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: crm_v3.yml + AccountToken: + properties: + account_token: string + integration: AccountIntegration + id: string + source: + openapi: crm_v3.yml + ActivityTypeEnum: + enum: + - CALL + - MEETING + - EMAIL + docs: |- + * `CALL` - CALL + * `MEETING` - MEETING + * `EMAIL` - EMAIL + source: + openapi: crm_v3.yml + AddressCountry: + discriminated: false + docs: |- + The address's country. + + * `AF` - Afghanistan + * `AX` - Åland Islands + * `AL` - Albania + * `DZ` - Algeria + * `AS` - American Samoa + * `AD` - Andorra + * `AO` - Angola + * `AI` - Anguilla + * `AQ` - Antarctica + * `AG` - Antigua and Barbuda + * `AR` - Argentina + * `AM` - Armenia + * `AW` - Aruba + * `AU` - Australia + * `AT` - Austria + * `AZ` - Azerbaijan + * `BS` - Bahamas + * `BH` - Bahrain + * `BD` - Bangladesh + * `BB` - Barbados + * `BY` - Belarus + * `BE` - Belgium + * `BZ` - Belize + * `BJ` - Benin + * `BM` - Bermuda + * `BT` - Bhutan + * `BO` - Bolivia + * `BQ` - Bonaire, Sint Eustatius and Saba + * `BA` - Bosnia and Herzegovina + * `BW` - Botswana + * `BV` - Bouvet Island + * `BR` - Brazil + * `IO` - British Indian Ocean Territory + * `BN` - Brunei + * `BG` - Bulgaria + * `BF` - Burkina Faso + * `BI` - Burundi + * `CV` - Cabo Verde + * `KH` - Cambodia + * `CM` - Cameroon + * `CA` - Canada + * `KY` - Cayman Islands + * `CF` - Central African Republic + * `TD` - Chad + * `CL` - Chile + * `CN` - China + * `CX` - Christmas Island + * `CC` - Cocos (Keeling) Islands + * `CO` - Colombia + * `KM` - Comoros + * `CG` - Congo + * `CD` - Congo (the Democratic Republic of the) + * `CK` - Cook Islands + * `CR` - Costa Rica + * `CI` - Côte d'Ivoire + * `HR` - Croatia + * `CU` - Cuba + * `CW` - Curaçao + * `CY` - Cyprus + * `CZ` - Czechia + * `DK` - Denmark + * `DJ` - Djibouti + * `DM` - Dominica + * `DO` - Dominican Republic + * `EC` - Ecuador + * `EG` - Egypt + * `SV` - El Salvador + * `GQ` - Equatorial Guinea + * `ER` - Eritrea + * `EE` - Estonia + * `SZ` - Eswatini + * `ET` - Ethiopia + * `FK` - Falkland Islands (Malvinas) + * `FO` - Faroe Islands + * `FJ` - Fiji + * `FI` - Finland + * `FR` - France + * `GF` - French Guiana + * `PF` - French Polynesia + * `TF` - French Southern Territories + * `GA` - Gabon + * `GM` - Gambia + * `GE` - Georgia + * `DE` - Germany + * `GH` - Ghana + * `GI` - Gibraltar + * `GR` - Greece + * `GL` - Greenland + * `GD` - Grenada + * `GP` - Guadeloupe + * `GU` - Guam + * `GT` - Guatemala + * `GG` - Guernsey + * `GN` - Guinea + * `GW` - Guinea-Bissau + * `GY` - Guyana + * `HT` - Haiti + * `HM` - Heard Island and McDonald Islands + * `VA` - Holy See + * `HN` - Honduras + * `HK` - Hong Kong + * `HU` - Hungary + * `IS` - Iceland + * `IN` - India + * `ID` - Indonesia + * `IR` - Iran + * `IQ` - Iraq + * `IE` - Ireland + * `IM` - Isle of Man + * `IL` - Israel + * `IT` - Italy + * `JM` - Jamaica + * `JP` - Japan + * `JE` - Jersey + * `JO` - Jordan + * `KZ` - Kazakhstan + * `KE` - Kenya + * `KI` - Kiribati + * `KW` - Kuwait + * `KG` - Kyrgyzstan + * `LA` - Laos + * `LV` - Latvia + * `LB` - Lebanon + * `LS` - Lesotho + * `LR` - Liberia + * `LY` - Libya + * `LI` - Liechtenstein + * `LT` - Lithuania + * `LU` - Luxembourg + * `MO` - Macao + * `MG` - Madagascar + * `MW` - Malawi + * `MY` - Malaysia + * `MV` - Maldives + * `ML` - Mali + * `MT` - Malta + * `MH` - Marshall Islands + * `MQ` - Martinique + * `MR` - Mauritania + * `MU` - Mauritius + * `YT` - Mayotte + * `MX` - Mexico + * `FM` - Micronesia (Federated States of) + * `MD` - Moldova + * `MC` - Monaco + * `MN` - Mongolia + * `ME` - Montenegro + * `MS` - Montserrat + * `MA` - Morocco + * `MZ` - Mozambique + * `MM` - Myanmar + * `NA` - Namibia + * `NR` - Nauru + * `NP` - Nepal + * `NL` - Netherlands + * `NC` - New Caledonia + * `NZ` - New Zealand + * `NI` - Nicaragua + * `NE` - Niger + * `NG` - Nigeria + * `NU` - Niue + * `NF` - Norfolk Island + * `KP` - North Korea + * `MK` - North Macedonia + * `MP` - Northern Mariana Islands + * `NO` - Norway + * `OM` - Oman + * `PK` - Pakistan + * `PW` - Palau + * `PS` - Palestine, State of + * `PA` - Panama + * `PG` - Papua New Guinea + * `PY` - Paraguay + * `PE` - Peru + * `PH` - Philippines + * `PN` - Pitcairn + * `PL` - Poland + * `PT` - Portugal + * `PR` - Puerto Rico + * `QA` - Qatar + * `RE` - Réunion + * `RO` - Romania + * `RU` - Russia + * `RW` - Rwanda + * `BL` - Saint Barthélemy + * `SH` - Saint Helena, Ascension and Tristan da Cunha + * `KN` - Saint Kitts and Nevis + * `LC` - Saint Lucia + * `MF` - Saint Martin (French part) + * `PM` - Saint Pierre and Miquelon + * `VC` - Saint Vincent and the Grenadines + * `WS` - Samoa + * `SM` - San Marino + * `ST` - Sao Tome and Principe + * `SA` - Saudi Arabia + * `SN` - Senegal + * `RS` - Serbia + * `SC` - Seychelles + * `SL` - Sierra Leone + * `SG` - Singapore + * `SX` - Sint Maarten (Dutch part) + * `SK` - Slovakia + * `SI` - Slovenia + * `SB` - Solomon Islands + * `SO` - Somalia + * `ZA` - South Africa + * `GS` - South Georgia and the South Sandwich Islands + * `KR` - South Korea + * `SS` - South Sudan + * `ES` - Spain + * `LK` - Sri Lanka + * `SD` - Sudan + * `SR` - Suriname + * `SJ` - Svalbard and Jan Mayen + * `SE` - Sweden + * `CH` - Switzerland + * `SY` - Syria + * `TW` - Taiwan + * `TJ` - Tajikistan + * `TZ` - Tanzania + * `TH` - Thailand + * `TL` - Timor-Leste + * `TG` - Togo + * `TK` - Tokelau + * `TO` - Tonga + * `TT` - Trinidad and Tobago + * `TN` - Tunisia + * `TR` - Turkey + * `TM` - Turkmenistan + * `TC` - Turks and Caicos Islands + * `TV` - Tuvalu + * `UG` - Uganda + * `UA` - Ukraine + * `AE` - United Arab Emirates + * `GB` - United Kingdom + * `UM` - United States Minor Outlying Islands + * `US` - United States of America + * `UY` - Uruguay + * `UZ` - Uzbekistan + * `VU` - Vanuatu + * `VE` - Venezuela + * `VN` - Vietnam + * `VG` - Virgin Islands (British) + * `VI` - Virgin Islands (U.S.) + * `WF` - Wallis and Futuna + * `EH` - Western Sahara + * `YE` - Yemen + * `ZM` - Zambia + * `ZW` - Zimbabwe + union: + - CountryEnum + - string + source: + openapi: crm_v3.yml + inline: true + AddressAddressType: + discriminated: false + docs: |- + The address type. + + * `BILLING` - BILLING + * `SHIPPING` - SHIPPING + union: + - AddressTypeEnum + - string + source: + openapi: crm_v3.yml + inline: true + Address: + docs: |- + # The Address Object + ### Description + The `Address` object is used to represent an entity's address. + ### Usage Example + TODO + properties: + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + street_1: + type: optional + docs: Line 1 of the address's street. + street_2: + type: optional + docs: Line 2 of the address's street. + city: + type: optional + docs: The address's city. + state: + type: optional + docs: The address's state. + postal_code: + type: optional + docs: The address's postal code. + country: + type: optional + docs: |- + The address's country. + + * `AF` - Afghanistan + * `AX` - Åland Islands + * `AL` - Albania + * `DZ` - Algeria + * `AS` - American Samoa + * `AD` - Andorra + * `AO` - Angola + * `AI` - Anguilla + * `AQ` - Antarctica + * `AG` - Antigua and Barbuda + * `AR` - Argentina + * `AM` - Armenia + * `AW` - Aruba + * `AU` - Australia + * `AT` - Austria + * `AZ` - Azerbaijan + * `BS` - Bahamas + * `BH` - Bahrain + * `BD` - Bangladesh + * `BB` - Barbados + * `BY` - Belarus + * `BE` - Belgium + * `BZ` - Belize + * `BJ` - Benin + * `BM` - Bermuda + * `BT` - Bhutan + * `BO` - Bolivia + * `BQ` - Bonaire, Sint Eustatius and Saba + * `BA` - Bosnia and Herzegovina + * `BW` - Botswana + * `BV` - Bouvet Island + * `BR` - Brazil + * `IO` - British Indian Ocean Territory + * `BN` - Brunei + * `BG` - Bulgaria + * `BF` - Burkina Faso + * `BI` - Burundi + * `CV` - Cabo Verde + * `KH` - Cambodia + * `CM` - Cameroon + * `CA` - Canada + * `KY` - Cayman Islands + * `CF` - Central African Republic + * `TD` - Chad + * `CL` - Chile + * `CN` - China + * `CX` - Christmas Island + * `CC` - Cocos (Keeling) Islands + * `CO` - Colombia + * `KM` - Comoros + * `CG` - Congo + * `CD` - Congo (the Democratic Republic of the) + * `CK` - Cook Islands + * `CR` - Costa Rica + * `CI` - Côte d'Ivoire + * `HR` - Croatia + * `CU` - Cuba + * `CW` - Curaçao + * `CY` - Cyprus + * `CZ` - Czechia + * `DK` - Denmark + * `DJ` - Djibouti + * `DM` - Dominica + * `DO` - Dominican Republic + * `EC` - Ecuador + * `EG` - Egypt + * `SV` - El Salvador + * `GQ` - Equatorial Guinea + * `ER` - Eritrea + * `EE` - Estonia + * `SZ` - Eswatini + * `ET` - Ethiopia + * `FK` - Falkland Islands (Malvinas) + * `FO` - Faroe Islands + * `FJ` - Fiji + * `FI` - Finland + * `FR` - France + * `GF` - French Guiana + * `PF` - French Polynesia + * `TF` - French Southern Territories + * `GA` - Gabon + * `GM` - Gambia + * `GE` - Georgia + * `DE` - Germany + * `GH` - Ghana + * `GI` - Gibraltar + * `GR` - Greece + * `GL` - Greenland + * `GD` - Grenada + * `GP` - Guadeloupe + * `GU` - Guam + * `GT` - Guatemala + * `GG` - Guernsey + * `GN` - Guinea + * `GW` - Guinea-Bissau + * `GY` - Guyana + * `HT` - Haiti + * `HM` - Heard Island and McDonald Islands + * `VA` - Holy See + * `HN` - Honduras + * `HK` - Hong Kong + * `HU` - Hungary + * `IS` - Iceland + * `IN` - India + * `ID` - Indonesia + * `IR` - Iran + * `IQ` - Iraq + * `IE` - Ireland + * `IM` - Isle of Man + * `IL` - Israel + * `IT` - Italy + * `JM` - Jamaica + * `JP` - Japan + * `JE` - Jersey + * `JO` - Jordan + * `KZ` - Kazakhstan + * `KE` - Kenya + * `KI` - Kiribati + * `KW` - Kuwait + * `KG` - Kyrgyzstan + * `LA` - Laos + * `LV` - Latvia + * `LB` - Lebanon + * `LS` - Lesotho + * `LR` - Liberia + * `LY` - Libya + * `LI` - Liechtenstein + * `LT` - Lithuania + * `LU` - Luxembourg + * `MO` - Macao + * `MG` - Madagascar + * `MW` - Malawi + * `MY` - Malaysia + * `MV` - Maldives + * `ML` - Mali + * `MT` - Malta + * `MH` - Marshall Islands + * `MQ` - Martinique + * `MR` - Mauritania + * `MU` - Mauritius + * `YT` - Mayotte + * `MX` - Mexico + * `FM` - Micronesia (Federated States of) + * `MD` - Moldova + * `MC` - Monaco + * `MN` - Mongolia + * `ME` - Montenegro + * `MS` - Montserrat + * `MA` - Morocco + * `MZ` - Mozambique + * `MM` - Myanmar + * `NA` - Namibia + * `NR` - Nauru + * `NP` - Nepal + * `NL` - Netherlands + * `NC` - New Caledonia + * `NZ` - New Zealand + * `NI` - Nicaragua + * `NE` - Niger + * `NG` - Nigeria + * `NU` - Niue + * `NF` - Norfolk Island + * `KP` - North Korea + * `MK` - North Macedonia + * `MP` - Northern Mariana Islands + * `NO` - Norway + * `OM` - Oman + * `PK` - Pakistan + * `PW` - Palau + * `PS` - Palestine, State of + * `PA` - Panama + * `PG` - Papua New Guinea + * `PY` - Paraguay + * `PE` - Peru + * `PH` - Philippines + * `PN` - Pitcairn + * `PL` - Poland + * `PT` - Portugal + * `PR` - Puerto Rico + * `QA` - Qatar + * `RE` - Réunion + * `RO` - Romania + * `RU` - Russia + * `RW` - Rwanda + * `BL` - Saint Barthélemy + * `SH` - Saint Helena, Ascension and Tristan da Cunha + * `KN` - Saint Kitts and Nevis + * `LC` - Saint Lucia + * `MF` - Saint Martin (French part) + * `PM` - Saint Pierre and Miquelon + * `VC` - Saint Vincent and the Grenadines + * `WS` - Samoa + * `SM` - San Marino + * `ST` - Sao Tome and Principe + * `SA` - Saudi Arabia + * `SN` - Senegal + * `RS` - Serbia + * `SC` - Seychelles + * `SL` - Sierra Leone + * `SG` - Singapore + * `SX` - Sint Maarten (Dutch part) + * `SK` - Slovakia + * `SI` - Slovenia + * `SB` - Solomon Islands + * `SO` - Somalia + * `ZA` - South Africa + * `GS` - South Georgia and the South Sandwich Islands + * `KR` - South Korea + * `SS` - South Sudan + * `ES` - Spain + * `LK` - Sri Lanka + * `SD` - Sudan + * `SR` - Suriname + * `SJ` - Svalbard and Jan Mayen + * `SE` - Sweden + * `CH` - Switzerland + * `SY` - Syria + * `TW` - Taiwan + * `TJ` - Tajikistan + * `TZ` - Tanzania + * `TH` - Thailand + * `TL` - Timor-Leste + * `TG` - Togo + * `TK` - Tokelau + * `TO` - Tonga + * `TT` - Trinidad and Tobago + * `TN` - Tunisia + * `TR` - Turkey + * `TM` - Turkmenistan + * `TC` - Turks and Caicos Islands + * `TV` - Tuvalu + * `UG` - Uganda + * `UA` - Ukraine + * `AE` - United Arab Emirates + * `GB` - United Kingdom + * `UM` - United States Minor Outlying Islands + * `US` - United States of America + * `UY` - Uruguay + * `UZ` - Uzbekistan + * `VU` - Vanuatu + * `VE` - Venezuela + * `VN` - Vietnam + * `VG` - Virgin Islands (British) + * `VI` - Virgin Islands (U.S.) + * `WF` - Wallis and Futuna + * `EH` - Western Sahara + * `YE` - Yemen + * `ZM` - Zambia + * `ZW` - Zimbabwe + address_type: + type: optional + docs: |- + The address type. + + * `BILLING` - BILLING + * `SHIPPING` - SHIPPING + source: + openapi: crm_v3.yml + AddressRequestCountry: + discriminated: false + docs: |- + The address's country. + + * `AF` - Afghanistan + * `AX` - Åland Islands + * `AL` - Albania + * `DZ` - Algeria + * `AS` - American Samoa + * `AD` - Andorra + * `AO` - Angola + * `AI` - Anguilla + * `AQ` - Antarctica + * `AG` - Antigua and Barbuda + * `AR` - Argentina + * `AM` - Armenia + * `AW` - Aruba + * `AU` - Australia + * `AT` - Austria + * `AZ` - Azerbaijan + * `BS` - Bahamas + * `BH` - Bahrain + * `BD` - Bangladesh + * `BB` - Barbados + * `BY` - Belarus + * `BE` - Belgium + * `BZ` - Belize + * `BJ` - Benin + * `BM` - Bermuda + * `BT` - Bhutan + * `BO` - Bolivia + * `BQ` - Bonaire, Sint Eustatius and Saba + * `BA` - Bosnia and Herzegovina + * `BW` - Botswana + * `BV` - Bouvet Island + * `BR` - Brazil + * `IO` - British Indian Ocean Territory + * `BN` - Brunei + * `BG` - Bulgaria + * `BF` - Burkina Faso + * `BI` - Burundi + * `CV` - Cabo Verde + * `KH` - Cambodia + * `CM` - Cameroon + * `CA` - Canada + * `KY` - Cayman Islands + * `CF` - Central African Republic + * `TD` - Chad + * `CL` - Chile + * `CN` - China + * `CX` - Christmas Island + * `CC` - Cocos (Keeling) Islands + * `CO` - Colombia + * `KM` - Comoros + * `CG` - Congo + * `CD` - Congo (the Democratic Republic of the) + * `CK` - Cook Islands + * `CR` - Costa Rica + * `CI` - Côte d'Ivoire + * `HR` - Croatia + * `CU` - Cuba + * `CW` - Curaçao + * `CY` - Cyprus + * `CZ` - Czechia + * `DK` - Denmark + * `DJ` - Djibouti + * `DM` - Dominica + * `DO` - Dominican Republic + * `EC` - Ecuador + * `EG` - Egypt + * `SV` - El Salvador + * `GQ` - Equatorial Guinea + * `ER` - Eritrea + * `EE` - Estonia + * `SZ` - Eswatini + * `ET` - Ethiopia + * `FK` - Falkland Islands (Malvinas) + * `FO` - Faroe Islands + * `FJ` - Fiji + * `FI` - Finland + * `FR` - France + * `GF` - French Guiana + * `PF` - French Polynesia + * `TF` - French Southern Territories + * `GA` - Gabon + * `GM` - Gambia + * `GE` - Georgia + * `DE` - Germany + * `GH` - Ghana + * `GI` - Gibraltar + * `GR` - Greece + * `GL` - Greenland + * `GD` - Grenada + * `GP` - Guadeloupe + * `GU` - Guam + * `GT` - Guatemala + * `GG` - Guernsey + * `GN` - Guinea + * `GW` - Guinea-Bissau + * `GY` - Guyana + * `HT` - Haiti + * `HM` - Heard Island and McDonald Islands + * `VA` - Holy See + * `HN` - Honduras + * `HK` - Hong Kong + * `HU` - Hungary + * `IS` - Iceland + * `IN` - India + * `ID` - Indonesia + * `IR` - Iran + * `IQ` - Iraq + * `IE` - Ireland + * `IM` - Isle of Man + * `IL` - Israel + * `IT` - Italy + * `JM` - Jamaica + * `JP` - Japan + * `JE` - Jersey + * `JO` - Jordan + * `KZ` - Kazakhstan + * `KE` - Kenya + * `KI` - Kiribati + * `KW` - Kuwait + * `KG` - Kyrgyzstan + * `LA` - Laos + * `LV` - Latvia + * `LB` - Lebanon + * `LS` - Lesotho + * `LR` - Liberia + * `LY` - Libya + * `LI` - Liechtenstein + * `LT` - Lithuania + * `LU` - Luxembourg + * `MO` - Macao + * `MG` - Madagascar + * `MW` - Malawi + * `MY` - Malaysia + * `MV` - Maldives + * `ML` - Mali + * `MT` - Malta + * `MH` - Marshall Islands + * `MQ` - Martinique + * `MR` - Mauritania + * `MU` - Mauritius + * `YT` - Mayotte + * `MX` - Mexico + * `FM` - Micronesia (Federated States of) + * `MD` - Moldova + * `MC` - Monaco + * `MN` - Mongolia + * `ME` - Montenegro + * `MS` - Montserrat + * `MA` - Morocco + * `MZ` - Mozambique + * `MM` - Myanmar + * `NA` - Namibia + * `NR` - Nauru + * `NP` - Nepal + * `NL` - Netherlands + * `NC` - New Caledonia + * `NZ` - New Zealand + * `NI` - Nicaragua + * `NE` - Niger + * `NG` - Nigeria + * `NU` - Niue + * `NF` - Norfolk Island + * `KP` - North Korea + * `MK` - North Macedonia + * `MP` - Northern Mariana Islands + * `NO` - Norway + * `OM` - Oman + * `PK` - Pakistan + * `PW` - Palau + * `PS` - Palestine, State of + * `PA` - Panama + * `PG` - Papua New Guinea + * `PY` - Paraguay + * `PE` - Peru + * `PH` - Philippines + * `PN` - Pitcairn + * `PL` - Poland + * `PT` - Portugal + * `PR` - Puerto Rico + * `QA` - Qatar + * `RE` - Réunion + * `RO` - Romania + * `RU` - Russia + * `RW` - Rwanda + * `BL` - Saint Barthélemy + * `SH` - Saint Helena, Ascension and Tristan da Cunha + * `KN` - Saint Kitts and Nevis + * `LC` - Saint Lucia + * `MF` - Saint Martin (French part) + * `PM` - Saint Pierre and Miquelon + * `VC` - Saint Vincent and the Grenadines + * `WS` - Samoa + * `SM` - San Marino + * `ST` - Sao Tome and Principe + * `SA` - Saudi Arabia + * `SN` - Senegal + * `RS` - Serbia + * `SC` - Seychelles + * `SL` - Sierra Leone + * `SG` - Singapore + * `SX` - Sint Maarten (Dutch part) + * `SK` - Slovakia + * `SI` - Slovenia + * `SB` - Solomon Islands + * `SO` - Somalia + * `ZA` - South Africa + * `GS` - South Georgia and the South Sandwich Islands + * `KR` - South Korea + * `SS` - South Sudan + * `ES` - Spain + * `LK` - Sri Lanka + * `SD` - Sudan + * `SR` - Suriname + * `SJ` - Svalbard and Jan Mayen + * `SE` - Sweden + * `CH` - Switzerland + * `SY` - Syria + * `TW` - Taiwan + * `TJ` - Tajikistan + * `TZ` - Tanzania + * `TH` - Thailand + * `TL` - Timor-Leste + * `TG` - Togo + * `TK` - Tokelau + * `TO` - Tonga + * `TT` - Trinidad and Tobago + * `TN` - Tunisia + * `TR` - Turkey + * `TM` - Turkmenistan + * `TC` - Turks and Caicos Islands + * `TV` - Tuvalu + * `UG` - Uganda + * `UA` - Ukraine + * `AE` - United Arab Emirates + * `GB` - United Kingdom + * `UM` - United States Minor Outlying Islands + * `US` - United States of America + * `UY` - Uruguay + * `UZ` - Uzbekistan + * `VU` - Vanuatu + * `VE` - Venezuela + * `VN` - Vietnam + * `VG` - Virgin Islands (British) + * `VI` - Virgin Islands (U.S.) + * `WF` - Wallis and Futuna + * `EH` - Western Sahara + * `YE` - Yemen + * `ZM` - Zambia + * `ZW` - Zimbabwe + union: + - CountryEnum + - string + source: + openapi: crm_v3.yml + inline: true + AddressRequestAddressType: + discriminated: false + docs: |- + The address type. + + * `BILLING` - BILLING + * `SHIPPING` - SHIPPING + union: + - AddressTypeEnum + - string + source: + openapi: crm_v3.yml + inline: true + AddressRequest: + docs: |- + # The Address Object + ### Description + The `Address` object is used to represent an entity's address. + ### Usage Example + TODO + properties: + street_1: + type: optional + docs: Line 1 of the address's street. + street_2: + type: optional + docs: Line 2 of the address's street. + city: + type: optional + docs: The address's city. + state: + type: optional + docs: The address's state. + postal_code: + type: optional + docs: The address's postal code. + country: + type: optional + docs: |- + The address's country. + + * `AF` - Afghanistan + * `AX` - Åland Islands + * `AL` - Albania + * `DZ` - Algeria + * `AS` - American Samoa + * `AD` - Andorra + * `AO` - Angola + * `AI` - Anguilla + * `AQ` - Antarctica + * `AG` - Antigua and Barbuda + * `AR` - Argentina + * `AM` - Armenia + * `AW` - Aruba + * `AU` - Australia + * `AT` - Austria + * `AZ` - Azerbaijan + * `BS` - Bahamas + * `BH` - Bahrain + * `BD` - Bangladesh + * `BB` - Barbados + * `BY` - Belarus + * `BE` - Belgium + * `BZ` - Belize + * `BJ` - Benin + * `BM` - Bermuda + * `BT` - Bhutan + * `BO` - Bolivia + * `BQ` - Bonaire, Sint Eustatius and Saba + * `BA` - Bosnia and Herzegovina + * `BW` - Botswana + * `BV` - Bouvet Island + * `BR` - Brazil + * `IO` - British Indian Ocean Territory + * `BN` - Brunei + * `BG` - Bulgaria + * `BF` - Burkina Faso + * `BI` - Burundi + * `CV` - Cabo Verde + * `KH` - Cambodia + * `CM` - Cameroon + * `CA` - Canada + * `KY` - Cayman Islands + * `CF` - Central African Republic + * `TD` - Chad + * `CL` - Chile + * `CN` - China + * `CX` - Christmas Island + * `CC` - Cocos (Keeling) Islands + * `CO` - Colombia + * `KM` - Comoros + * `CG` - Congo + * `CD` - Congo (the Democratic Republic of the) + * `CK` - Cook Islands + * `CR` - Costa Rica + * `CI` - Côte d'Ivoire + * `HR` - Croatia + * `CU` - Cuba + * `CW` - Curaçao + * `CY` - Cyprus + * `CZ` - Czechia + * `DK` - Denmark + * `DJ` - Djibouti + * `DM` - Dominica + * `DO` - Dominican Republic + * `EC` - Ecuador + * `EG` - Egypt + * `SV` - El Salvador + * `GQ` - Equatorial Guinea + * `ER` - Eritrea + * `EE` - Estonia + * `SZ` - Eswatini + * `ET` - Ethiopia + * `FK` - Falkland Islands (Malvinas) + * `FO` - Faroe Islands + * `FJ` - Fiji + * `FI` - Finland + * `FR` - France + * `GF` - French Guiana + * `PF` - French Polynesia + * `TF` - French Southern Territories + * `GA` - Gabon + * `GM` - Gambia + * `GE` - Georgia + * `DE` - Germany + * `GH` - Ghana + * `GI` - Gibraltar + * `GR` - Greece + * `GL` - Greenland + * `GD` - Grenada + * `GP` - Guadeloupe + * `GU` - Guam + * `GT` - Guatemala + * `GG` - Guernsey + * `GN` - Guinea + * `GW` - Guinea-Bissau + * `GY` - Guyana + * `HT` - Haiti + * `HM` - Heard Island and McDonald Islands + * `VA` - Holy See + * `HN` - Honduras + * `HK` - Hong Kong + * `HU` - Hungary + * `IS` - Iceland + * `IN` - India + * `ID` - Indonesia + * `IR` - Iran + * `IQ` - Iraq + * `IE` - Ireland + * `IM` - Isle of Man + * `IL` - Israel + * `IT` - Italy + * `JM` - Jamaica + * `JP` - Japan + * `JE` - Jersey + * `JO` - Jordan + * `KZ` - Kazakhstan + * `KE` - Kenya + * `KI` - Kiribati + * `KW` - Kuwait + * `KG` - Kyrgyzstan + * `LA` - Laos + * `LV` - Latvia + * `LB` - Lebanon + * `LS` - Lesotho + * `LR` - Liberia + * `LY` - Libya + * `LI` - Liechtenstein + * `LT` - Lithuania + * `LU` - Luxembourg + * `MO` - Macao + * `MG` - Madagascar + * `MW` - Malawi + * `MY` - Malaysia + * `MV` - Maldives + * `ML` - Mali + * `MT` - Malta + * `MH` - Marshall Islands + * `MQ` - Martinique + * `MR` - Mauritania + * `MU` - Mauritius + * `YT` - Mayotte + * `MX` - Mexico + * `FM` - Micronesia (Federated States of) + * `MD` - Moldova + * `MC` - Monaco + * `MN` - Mongolia + * `ME` - Montenegro + * `MS` - Montserrat + * `MA` - Morocco + * `MZ` - Mozambique + * `MM` - Myanmar + * `NA` - Namibia + * `NR` - Nauru + * `NP` - Nepal + * `NL` - Netherlands + * `NC` - New Caledonia + * `NZ` - New Zealand + * `NI` - Nicaragua + * `NE` - Niger + * `NG` - Nigeria + * `NU` - Niue + * `NF` - Norfolk Island + * `KP` - North Korea + * `MK` - North Macedonia + * `MP` - Northern Mariana Islands + * `NO` - Norway + * `OM` - Oman + * `PK` - Pakistan + * `PW` - Palau + * `PS` - Palestine, State of + * `PA` - Panama + * `PG` - Papua New Guinea + * `PY` - Paraguay + * `PE` - Peru + * `PH` - Philippines + * `PN` - Pitcairn + * `PL` - Poland + * `PT` - Portugal + * `PR` - Puerto Rico + * `QA` - Qatar + * `RE` - Réunion + * `RO` - Romania + * `RU` - Russia + * `RW` - Rwanda + * `BL` - Saint Barthélemy + * `SH` - Saint Helena, Ascension and Tristan da Cunha + * `KN` - Saint Kitts and Nevis + * `LC` - Saint Lucia + * `MF` - Saint Martin (French part) + * `PM` - Saint Pierre and Miquelon + * `VC` - Saint Vincent and the Grenadines + * `WS` - Samoa + * `SM` - San Marino + * `ST` - Sao Tome and Principe + * `SA` - Saudi Arabia + * `SN` - Senegal + * `RS` - Serbia + * `SC` - Seychelles + * `SL` - Sierra Leone + * `SG` - Singapore + * `SX` - Sint Maarten (Dutch part) + * `SK` - Slovakia + * `SI` - Slovenia + * `SB` - Solomon Islands + * `SO` - Somalia + * `ZA` - South Africa + * `GS` - South Georgia and the South Sandwich Islands + * `KR` - South Korea + * `SS` - South Sudan + * `ES` - Spain + * `LK` - Sri Lanka + * `SD` - Sudan + * `SR` - Suriname + * `SJ` - Svalbard and Jan Mayen + * `SE` - Sweden + * `CH` - Switzerland + * `SY` - Syria + * `TW` - Taiwan + * `TJ` - Tajikistan + * `TZ` - Tanzania + * `TH` - Thailand + * `TL` - Timor-Leste + * `TG` - Togo + * `TK` - Tokelau + * `TO` - Tonga + * `TT` - Trinidad and Tobago + * `TN` - Tunisia + * `TR` - Turkey + * `TM` - Turkmenistan + * `TC` - Turks and Caicos Islands + * `TV` - Tuvalu + * `UG` - Uganda + * `UA` - Ukraine + * `AE` - United Arab Emirates + * `GB` - United Kingdom + * `UM` - United States Minor Outlying Islands + * `US` - United States of America + * `UY` - Uruguay + * `UZ` - Uzbekistan + * `VU` - Vanuatu + * `VE` - Venezuela + * `VN` - Vietnam + * `VG` - Virgin Islands (British) + * `VI` - Virgin Islands (U.S.) + * `WF` - Wallis and Futuna + * `EH` - Western Sahara + * `YE` - Yemen + * `ZM` - Zambia + * `ZW` - Zimbabwe + address_type: + type: optional + docs: |- + The address type. + + * `BILLING` - BILLING + * `SHIPPING` - SHIPPING + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: crm_v3.yml + AddressTypeEnum: + enum: + - BILLING + - SHIPPING + docs: |- + * `BILLING` - BILLING + * `SHIPPING` - SHIPPING + source: + openapi: crm_v3.yml + AdvancedMetadata: + properties: + id: + type: string + validation: + format: uuid + display_name: optional + description: optional + is_required: optional + is_custom: optional + field_choices: optional> + source: + openapi: crm_v3.yml + AssociationAssociationType: + discriminated: false + docs: The association type the association belongs to. + union: + - type: string + validation: + format: uuid + - AssociationType + source: + openapi: crm_v3.yml + inline: true + Association: + docs: |- + # The Association Object + ### Description + The `Association` record refers to an instance of an Association Type. + ### Usage Example + TODO + properties: + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + source_object: + type: optional + validation: + format: uuid + access: read-only + target_object: + type: optional + validation: + format: uuid + access: read-only + association_type: + type: optional + docs: The association type the association belongs to. + source: + openapi: crm_v3.yml + AssociationSubType: + properties: + id: + type: optional + access: read-only + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + origin_type: + type: optional + access: read-only + source: + openapi: crm_v3.yml + AssociationTypeCardinality: + discriminated: false + union: + - CardinalityEnum + - string + source: + openapi: crm_v3.yml + inline: true + AssociationType: + docs: >- + # The AssociationType Object + + ### Description + + The `Association Type` object represents the relationship between two + objects. + + ### Usage Example + + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + source_object_class: + type: optional> + docs: >- + The class of the source object (Custom Object or Common Model) for the + association type. + access: read-only + target_object_classes: + type: optional> + access: read-only + remote_key_name: optional + display_name: optional + cardinality: optional + is_required: optional + source: + openapi: crm_v3.yml + AssociationTypeRequestRequest: + properties: + source_object_class: ObjectClassDescriptionRequest + target_object_classes: list + remote_key_name: + type: string + validation: + minLength: 1 + display_name: + type: optional + validation: + minLength: 1 + cardinality: optional + is_required: + type: optional + default: false + source: + openapi: crm_v3.yml + AsyncPassthroughReciept: + properties: + async_passthrough_receipt_id: + type: string + validation: + format: uuid + source: + openapi: crm_v3.yml + AuditLogEventRole: + discriminated: false + docs: >- + Designates the role of the user (or SYSTEM/API if action not taken by a + user) at the time of this Event occurring. + + + * `ADMIN` - ADMIN + + * `DEVELOPER` - DEVELOPER + + * `MEMBER` - MEMBER + + * `API` - API + + * `SYSTEM` - SYSTEM + + * `MERGE_TEAM` - MERGE_TEAM + union: + - RoleEnum + - string + source: + openapi: crm_v3.yml + inline: true + AuditLogEventEventType: + discriminated: false + docs: >- + Designates the type of event that occurred. + + + * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + + * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + + * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + + * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + + * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + + * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + + * `INVITED_USER` - INVITED_USER + + * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + + * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + + * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + + * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - + DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + + * `CREATED_DESTINATION` - CREATED_DESTINATION + + * `DELETED_DESTINATION` - DELETED_DESTINATION + + * `CHANGED_DESTINATION` - CHANGED_DESTINATION + + * `CHANGED_SCOPES` - CHANGED_SCOPES + + * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + + * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + + * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + + * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + + * `ENABLED_CATEGORY` - ENABLED_CATEGORY + + * `DISABLED_CATEGORY` - DISABLED_CATEGORY + + * `CHANGED_PASSWORD` - CHANGED_PASSWORD + + * `RESET_PASSWORD` - RESET_PASSWORD + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - + CREATED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - + CREATED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - + CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - + CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + + * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - + DELETED_INTEGRATION_WIDE_FIELD_MAPPING + + * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - + DELETED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + + * `MUTED_ISSUE` - MUTED_ISSUE + + * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + + * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + + * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + + * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + + * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + union: + - EventTypeEnum + - string + source: + openapi: crm_v3.yml + inline: true + AuditLogEvent: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + user_name: + type: optional + docs: The User's full name at the time of this Event occurring. + validation: + maxLength: 200 + user_email: + type: optional + docs: The User's email at the time of this Event occurring. + validation: + format: email + maxLength: 254 + role: + type: AuditLogEventRole + docs: >- + Designates the role of the user (or SYSTEM/API if action not taken by + a user) at the time of this Event occurring. + + + * `ADMIN` - ADMIN + + * `DEVELOPER` - DEVELOPER + + * `MEMBER` - MEMBER + + * `API` - API + + * `SYSTEM` - SYSTEM + + * `MERGE_TEAM` - MERGE_TEAM + ip_address: + type: string + validation: + maxLength: 45 + event_type: + type: AuditLogEventEventType + docs: >- + Designates the type of event that occurred. + + + * `CREATED_REMOTE_PRODUCTION_API_KEY` - + CREATED_REMOTE_PRODUCTION_API_KEY + + * `DELETED_REMOTE_PRODUCTION_API_KEY` - + DELETED_REMOTE_PRODUCTION_API_KEY + + * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + + * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + + * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + + * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + + * `INVITED_USER` - INVITED_USER + + * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + + * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + + * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + + * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - + DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + + * `CREATED_DESTINATION` - CREATED_DESTINATION + + * `DELETED_DESTINATION` - DELETED_DESTINATION + + * `CHANGED_DESTINATION` - CHANGED_DESTINATION + + * `CHANGED_SCOPES` - CHANGED_SCOPES + + * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + + * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + + * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + + * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + + * `ENABLED_CATEGORY` - ENABLED_CATEGORY + + * `DISABLED_CATEGORY` - DISABLED_CATEGORY + + * `CHANGED_PASSWORD` - CHANGED_PASSWORD + + * `RESET_PASSWORD` - RESET_PASSWORD + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - + CREATED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - + CREATED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - + CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - + CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + + * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - + DELETED_INTEGRATION_WIDE_FIELD_MAPPING + + * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - + DELETED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + + * `MUTED_ISSUE` - MUTED_ISSUE + + * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + + * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + + * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + + * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + + * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + event_description: string + created_at: + type: optional + access: read-only + source: + openapi: crm_v3.yml + AvailableActions: + docs: >- + # The AvailableActions Object + + ### Description + + The `Activity` object is used to see all available model/operation + combinations for an integration. + + + ### Usage Example + + Fetch all the actions available for the `Zenefits` integration. + properties: + integration: AccountIntegration + passthrough_available: boolean + available_model_operations: optional> + source: + openapi: crm_v3.yml + CrmAccountResponse: + properties: + model: Account + warnings: list + errors: list + logs: optional> + source: + openapi: crm_v3.yml + CrmAssociationTypeResponse: + properties: + model: AssociationType + warnings: list + errors: list + logs: optional> + source: + openapi: crm_v3.yml + CrmContactResponse: + properties: + model: Contact + warnings: list + errors: list + logs: optional> + source: + openapi: crm_v3.yml + CrmCustomObjectResponse: + properties: + model: CustomObject + warnings: list + errors: list + logs: optional> + source: + openapi: crm_v3.yml + CardinalityEnum: + enum: + - ONE_TO_ONE + - MANY_TO_ONE + - MANY_TO_MANY + - ONE_TO_MANY + docs: |- + * `ONE_TO_ONE` - ONE_TO_ONE + * `MANY_TO_ONE` - MANY_TO_ONE + * `MANY_TO_MANY` - MANY_TO_MANY + * `ONE_TO_MANY` - ONE_TO_MANY + source: + openapi: crm_v3.yml + CategoriesEnum: + enum: + - hris + - ats + - accounting + - ticketing + - crm + - mktg + - filestorage + docs: |- + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + source: + openapi: crm_v3.yml + CategoryEnum: + enum: + - hris + - ats + - accounting + - ticketing + - crm + - mktg + - filestorage + docs: |- + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + source: + openapi: crm_v3.yml + CommonModelScopeApi: + properties: + common_models: + docs: The common models you want to update the scopes for + type: list + source: + openapi: crm_v3.yml + CommonModelScopesBodyRequest: + properties: + model_id: + type: string + validation: + minLength: 1 + enabled_actions: list + disabled_fields: list + source: + openapi: crm_v3.yml + ContactAccount: + discriminated: false + docs: The contact's account. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: crm_v3.yml + inline: true + ContactOwner: + discriminated: false + docs: The contact's owner. + union: + - type: string + validation: + format: uuid + - User + source: + openapi: crm_v3.yml + inline: true + Contact: + docs: >- + # The Contact Object + + ### Description + + The `Contact` object is used to represent an existing point of contact at + a company in a CRM system. + + ### Usage Example + + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + first_name: + type: optional + docs: The contact's first name. + last_name: + type: optional + docs: The contact's last name. + account: + type: optional + docs: The contact's account. + owner: + type: optional + docs: The contact's owner. + addresses: optional> + email_addresses: optional> + phone_numbers: optional> + last_activity_at: + type: optional + docs: When the contact's last activity occurred. + remote_created_at: + type: optional + docs: When the third party's contact was created. + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + remote_fields: + type: optional> + access: read-only + source: + openapi: crm_v3.yml + ContactRequestAccount: + discriminated: false + docs: The contact's account. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: crm_v3.yml + inline: true + ContactRequestOwner: + discriminated: false + docs: The contact's owner. + union: + - type: string + validation: + format: uuid + - User + source: + openapi: crm_v3.yml + inline: true + ContactRequest: + docs: >- + # The Contact Object + + ### Description + + The `Contact` object is used to represent an existing point of contact at + a company in a CRM system. + + ### Usage Example + + TODO + properties: + first_name: + type: optional + docs: The contact's first name. + last_name: + type: optional + docs: The contact's last name. + account: + type: optional + docs: The contact's account. + owner: + type: optional + docs: The contact's owner. + addresses: optional> + email_addresses: optional> + phone_numbers: optional> + last_activity_at: + type: optional + docs: When the contact's last activity occurred. + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: crm_v3.yml + CountryEnum: + enum: + - AF + - AX + - AL + - DZ + - AS + - AD + - AO + - AI + - AQ + - AG + - AR + - AM + - AW + - AU + - AT + - AZ + - BS + - BH + - BD + - BB + - BY + - BE + - BZ + - BJ + - BM + - BT + - BO + - BQ + - BA + - BW + - BV + - BR + - IO + - BN + - BG + - BF + - BI + - CV + - KH + - CM + - CA + - KY + - CF + - TD + - CL + - CN + - CX + - CC + - CO + - KM + - CG + - CD + - CK + - CR + - CI + - HR + - CU + - CW + - CY + - CZ + - DK + - DJ + - DM + - DO + - EC + - EG + - SV + - GQ + - ER + - EE + - SZ + - ET + - FK + - FO + - FJ + - FI + - FR + - GF + - PF + - TF + - GA + - GM + - GE + - DE + - GH + - GI + - GR + - GL + - GD + - GP + - GU + - GT + - GG + - GN + - GW + - GY + - HT + - HM + - VA + - HN + - HK + - HU + - IS + - IN + - ID + - IR + - IQ + - IE + - IM + - IL + - IT + - JM + - JP + - JE + - JO + - KZ + - KE + - KI + - KW + - KG + - LA + - LV + - LB + - LS + - LR + - LY + - LI + - LT + - LU + - MO + - MG + - MW + - MY + - MV + - ML + - MT + - MH + - MQ + - MR + - MU + - YT + - MX + - FM + - MD + - MC + - MN + - ME + - MS + - MA + - MZ + - MM + - NA + - NR + - NP + - NL + - NC + - NZ + - NI + - NE + - NG + - NU + - NF + - KP + - MK + - MP + - 'NO' + - OM + - PK + - PW + - PS + - PA + - PG + - PY + - PE + - PH + - PN + - PL + - PT + - PR + - QA + - RE + - RO + - RU + - RW + - BL + - SH + - KN + - LC + - MF + - PM + - VC + - WS + - SM + - ST + - SA + - SN + - RS + - SC + - SL + - SG + - SX + - SK + - SI + - SB + - SO + - ZA + - GS + - KR + - SS + - ES + - LK + - SD + - SR + - SJ + - SE + - CH + - SY + - TW + - TJ + - TZ + - TH + - TL + - TG + - TK + - TO + - TT + - TN + - TR + - TM + - TC + - TV + - UG + - UA + - AE + - GB + - UM + - US + - UY + - UZ + - VU + - VE + - VN + - VG + - VI + - WF + - EH + - YE + - ZM + - ZW + docs: |- + * `AF` - Afghanistan + * `AX` - Åland Islands + * `AL` - Albania + * `DZ` - Algeria + * `AS` - American Samoa + * `AD` - Andorra + * `AO` - Angola + * `AI` - Anguilla + * `AQ` - Antarctica + * `AG` - Antigua and Barbuda + * `AR` - Argentina + * `AM` - Armenia + * `AW` - Aruba + * `AU` - Australia + * `AT` - Austria + * `AZ` - Azerbaijan + * `BS` - Bahamas + * `BH` - Bahrain + * `BD` - Bangladesh + * `BB` - Barbados + * `BY` - Belarus + * `BE` - Belgium + * `BZ` - Belize + * `BJ` - Benin + * `BM` - Bermuda + * `BT` - Bhutan + * `BO` - Bolivia + * `BQ` - Bonaire, Sint Eustatius and Saba + * `BA` - Bosnia and Herzegovina + * `BW` - Botswana + * `BV` - Bouvet Island + * `BR` - Brazil + * `IO` - British Indian Ocean Territory + * `BN` - Brunei + * `BG` - Bulgaria + * `BF` - Burkina Faso + * `BI` - Burundi + * `CV` - Cabo Verde + * `KH` - Cambodia + * `CM` - Cameroon + * `CA` - Canada + * `KY` - Cayman Islands + * `CF` - Central African Republic + * `TD` - Chad + * `CL` - Chile + * `CN` - China + * `CX` - Christmas Island + * `CC` - Cocos (Keeling) Islands + * `CO` - Colombia + * `KM` - Comoros + * `CG` - Congo + * `CD` - Congo (the Democratic Republic of the) + * `CK` - Cook Islands + * `CR` - Costa Rica + * `CI` - Côte d'Ivoire + * `HR` - Croatia + * `CU` - Cuba + * `CW` - Curaçao + * `CY` - Cyprus + * `CZ` - Czechia + * `DK` - Denmark + * `DJ` - Djibouti + * `DM` - Dominica + * `DO` - Dominican Republic + * `EC` - Ecuador + * `EG` - Egypt + * `SV` - El Salvador + * `GQ` - Equatorial Guinea + * `ER` - Eritrea + * `EE` - Estonia + * `SZ` - Eswatini + * `ET` - Ethiopia + * `FK` - Falkland Islands (Malvinas) + * `FO` - Faroe Islands + * `FJ` - Fiji + * `FI` - Finland + * `FR` - France + * `GF` - French Guiana + * `PF` - French Polynesia + * `TF` - French Southern Territories + * `GA` - Gabon + * `GM` - Gambia + * `GE` - Georgia + * `DE` - Germany + * `GH` - Ghana + * `GI` - Gibraltar + * `GR` - Greece + * `GL` - Greenland + * `GD` - Grenada + * `GP` - Guadeloupe + * `GU` - Guam + * `GT` - Guatemala + * `GG` - Guernsey + * `GN` - Guinea + * `GW` - Guinea-Bissau + * `GY` - Guyana + * `HT` - Haiti + * `HM` - Heard Island and McDonald Islands + * `VA` - Holy See + * `HN` - Honduras + * `HK` - Hong Kong + * `HU` - Hungary + * `IS` - Iceland + * `IN` - India + * `ID` - Indonesia + * `IR` - Iran + * `IQ` - Iraq + * `IE` - Ireland + * `IM` - Isle of Man + * `IL` - Israel + * `IT` - Italy + * `JM` - Jamaica + * `JP` - Japan + * `JE` - Jersey + * `JO` - Jordan + * `KZ` - Kazakhstan + * `KE` - Kenya + * `KI` - Kiribati + * `KW` - Kuwait + * `KG` - Kyrgyzstan + * `LA` - Laos + * `LV` - Latvia + * `LB` - Lebanon + * `LS` - Lesotho + * `LR` - Liberia + * `LY` - Libya + * `LI` - Liechtenstein + * `LT` - Lithuania + * `LU` - Luxembourg + * `MO` - Macao + * `MG` - Madagascar + * `MW` - Malawi + * `MY` - Malaysia + * `MV` - Maldives + * `ML` - Mali + * `MT` - Malta + * `MH` - Marshall Islands + * `MQ` - Martinique + * `MR` - Mauritania + * `MU` - Mauritius + * `YT` - Mayotte + * `MX` - Mexico + * `FM` - Micronesia (Federated States of) + * `MD` - Moldova + * `MC` - Monaco + * `MN` - Mongolia + * `ME` - Montenegro + * `MS` - Montserrat + * `MA` - Morocco + * `MZ` - Mozambique + * `MM` - Myanmar + * `NA` - Namibia + * `NR` - Nauru + * `NP` - Nepal + * `NL` - Netherlands + * `NC` - New Caledonia + * `NZ` - New Zealand + * `NI` - Nicaragua + * `NE` - Niger + * `NG` - Nigeria + * `NU` - Niue + * `NF` - Norfolk Island + * `KP` - North Korea + * `MK` - North Macedonia + * `MP` - Northern Mariana Islands + * `NO` - Norway + * `OM` - Oman + * `PK` - Pakistan + * `PW` - Palau + * `PS` - Palestine, State of + * `PA` - Panama + * `PG` - Papua New Guinea + * `PY` - Paraguay + * `PE` - Peru + * `PH` - Philippines + * `PN` - Pitcairn + * `PL` - Poland + * `PT` - Portugal + * `PR` - Puerto Rico + * `QA` - Qatar + * `RE` - Réunion + * `RO` - Romania + * `RU` - Russia + * `RW` - Rwanda + * `BL` - Saint Barthélemy + * `SH` - Saint Helena, Ascension and Tristan da Cunha + * `KN` - Saint Kitts and Nevis + * `LC` - Saint Lucia + * `MF` - Saint Martin (French part) + * `PM` - Saint Pierre and Miquelon + * `VC` - Saint Vincent and the Grenadines + * `WS` - Samoa + * `SM` - San Marino + * `ST` - Sao Tome and Principe + * `SA` - Saudi Arabia + * `SN` - Senegal + * `RS` - Serbia + * `SC` - Seychelles + * `SL` - Sierra Leone + * `SG` - Singapore + * `SX` - Sint Maarten (Dutch part) + * `SK` - Slovakia + * `SI` - Slovenia + * `SB` - Solomon Islands + * `SO` - Somalia + * `ZA` - South Africa + * `GS` - South Georgia and the South Sandwich Islands + * `KR` - South Korea + * `SS` - South Sudan + * `ES` - Spain + * `LK` - Sri Lanka + * `SD` - Sudan + * `SR` - Suriname + * `SJ` - Svalbard and Jan Mayen + * `SE` - Sweden + * `CH` - Switzerland + * `SY` - Syria + * `TW` - Taiwan + * `TJ` - Tajikistan + * `TZ` - Tanzania + * `TH` - Thailand + * `TL` - Timor-Leste + * `TG` - Togo + * `TK` - Tokelau + * `TO` - Tonga + * `TT` - Trinidad and Tobago + * `TN` - Tunisia + * `TR` - Turkey + * `TM` - Turkmenistan + * `TC` - Turks and Caicos Islands + * `TV` - Tuvalu + * `UG` - Uganda + * `UA` - Ukraine + * `AE` - United Arab Emirates + * `GB` - United Kingdom + * `UM` - United States Minor Outlying Islands + * `US` - United States of America + * `UY` - Uruguay + * `UZ` - Uzbekistan + * `VU` - Vanuatu + * `VE` - Venezuela + * `VN` - Vietnam + * `VG` - Virgin Islands (British) + * `VI` - Virgin Islands (U.S.) + * `WF` - Wallis and Futuna + * `EH` - Western Sahara + * `YE` - Yemen + * `ZM` - Zambia + * `ZW` - Zimbabwe + source: + openapi: crm_v3.yml + CustomObject: + docs: |- + # The CustomObject Object + ### Description + The `Custom Object` record refers to an instance of a Custom Object Class. + ### Usage Example + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + object_class: + type: optional + docs: The custom object class the custom object record belongs to. + validation: + format: uuid + fields: + type: optional> + docs: The fields and values contained within the custom object record. + access: read-only + remote_fields: + type: optional> + access: read-only + source: + openapi: crm_v3.yml + CustomObjectClass: + docs: >- + # The Custom Object Class Object + + ### Description + + The `Custom Object Class` object is used to represent a Custom Object + Schema in the remote system. + + ### Usage Example + + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + access: read-only + modified_at: + type: optional + access: read-only + name: + type: optional + docs: The custom object class's name. + description: + type: optional + docs: The custom object class's description. + labels: + type: optional>> + docs: The custom object class's singular and plural labels. + access: read-only + fields: + type: optional> + access: read-only + association_types: + type: optional>> + docs: >- + The types of associations with other models that the custom object + class can have. + access: read-only + source: + openapi: crm_v3.yml + CustomObjectRequest: + properties: + fields: map + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: crm_v3.yml + DataPassthroughRequest: + docs: >- + # The DataPassthrough Object + + ### Description + + The `DataPassthrough` object is used to send information to an + otherwise-unsupported third-party endpoint. + + + ### Usage Example + + Create a `DataPassthrough` to get team hierarchies from your Rippling + integration. + properties: + method: MethodEnum + path: + type: string + docs: The path of the request in the third party's platform. + validation: + minLength: 1 + base_url_override: + type: optional + docs: An optional override of the third party's base url for the request. + validation: + minLength: 1 + data: + type: optional + docs: >- + The data with the request. You must include a `request_format` + parameter matching the data's format + validation: + minLength: 1 + multipart_form_data: + type: optional> + docs: >- + Pass an array of `MultipartFormField` objects in here instead of using + the `data` param if `request_format` is set to `MULTIPART`. + headers: + type: optional> + docs: >- + The headers to use for the request (Merge will handle the account's + authorization headers). `Content-Type` header is required for + passthrough. Choose content type corresponding to expected format of + receiving server. + request_format: optional + normalize_response: + type: optional + docs: >- + Optional. If true, the response will always be an object of the form + `{"type": T, "value": ...}` where `T` will be one of `string, boolean, + number, null, array, object`. + source: + openapi: crm_v3.yml + DebugModeLog: + properties: + log_id: string + dashboard_view: string + log_summary: DebugModelLogSummary + source: + openapi: crm_v3.yml + DebugModelLogSummary: + properties: + url: string + method: string + status_code: integer + source: + openapi: crm_v3.yml + DirectionEnum: + enum: + - INBOUND + - OUTBOUND + docs: |- + * `INBOUND` - INBOUND + * `OUTBOUND` - OUTBOUND + source: + openapi: crm_v3.yml + EmailAddress: + docs: |- + # The EmailAddress Object + ### Description + The `EmailAddress` object is used to represent an entity's email address. + ### Usage Example + Fetch from the `GET Contact` endpoint and view their email addresses. + properties: + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + email_address: + type: optional + docs: The email address. + email_address_type: + type: optional + docs: The email address's type. + source: + openapi: crm_v3.yml + EmailAddressRequest: + docs: |- + # The EmailAddress Object + ### Description + The `EmailAddress` object is used to represent an entity's email address. + ### Usage Example + Fetch from the `GET Contact` endpoint and view their email addresses. + properties: + email_address: + type: optional + docs: The email address. + email_address_type: + type: optional + docs: The email address's type. + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: crm_v3.yml + EnabledActionsEnum: + enum: + - READ + - WRITE + docs: |- + * `READ` - READ + * `WRITE` - WRITE + source: + openapi: crm_v3.yml + EncodingEnum: + enum: + - RAW + - BASE64 + - GZIP_BASE64 + docs: |- + * `RAW` - RAW + * `BASE64` - BASE64 + * `GZIP_BASE64` - GZIP_BASE64 + source: + openapi: crm_v3.yml + EngagementOwner: + discriminated: false + docs: The engagement's owner. + union: + - type: string + validation: + format: uuid + - User + source: + openapi: crm_v3.yml + inline: true + EngagementDirection: + discriminated: false + docs: |- + The engagement's direction. + + * `INBOUND` - INBOUND + * `OUTBOUND` - OUTBOUND + union: + - DirectionEnum + - string + source: + openapi: crm_v3.yml + inline: true + EngagementEngagementType: + discriminated: false + docs: The engagement type of the engagement. + union: + - type: string + validation: + format: uuid + - EngagementType + source: + openapi: crm_v3.yml + inline: true + EngagementAccount: + discriminated: false + docs: The account of the engagement. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: crm_v3.yml + inline: true + EngagementContactsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: crm_v3.yml + inline: true + Engagement: + docs: >- + # The Engagement Object + + ### Description + + The `Engagement` object is used to represent an interaction noted in a CRM + system. + + ### Usage Example + + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + owner: + type: optional + docs: The engagement's owner. + content: + type: optional + docs: The engagement's content. + subject: + type: optional + docs: The engagement's subject. + direction: + type: optional + docs: |- + The engagement's direction. + + * `INBOUND` - INBOUND + * `OUTBOUND` - OUTBOUND + engagement_type: + type: optional + docs: The engagement type of the engagement. + start_time: + type: optional + docs: The time at which the engagement started. + end_time: + type: optional + docs: The time at which the engagement ended. + account: + type: optional + docs: The account of the engagement. + contacts: optional>> + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + remote_fields: + type: optional> + access: read-only + source: + openapi: crm_v3.yml + EngagementRequestOwner: + discriminated: false + docs: The engagement's owner. + union: + - type: string + validation: + format: uuid + - User + source: + openapi: crm_v3.yml + inline: true + EngagementRequestDirection: + discriminated: false + docs: |- + The engagement's direction. + + * `INBOUND` - INBOUND + * `OUTBOUND` - OUTBOUND + union: + - DirectionEnum + - string + source: + openapi: crm_v3.yml + inline: true + EngagementRequestEngagementType: + discriminated: false + docs: The engagement type of the engagement. + union: + - type: string + validation: + format: uuid + - EngagementType + source: + openapi: crm_v3.yml + inline: true + EngagementRequestAccount: + discriminated: false + docs: The account of the engagement. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: crm_v3.yml + inline: true + EngagementRequestContactsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: crm_v3.yml + inline: true + EngagementRequest: + docs: >- + # The Engagement Object + + ### Description + + The `Engagement` object is used to represent an interaction noted in a CRM + system. + + ### Usage Example + + TODO + properties: + owner: + type: optional + docs: The engagement's owner. + content: + type: optional + docs: The engagement's content. + subject: + type: optional + docs: The engagement's subject. + direction: + type: optional + docs: |- + The engagement's direction. + + * `INBOUND` - INBOUND + * `OUTBOUND` - OUTBOUND + engagement_type: + type: optional + docs: The engagement type of the engagement. + start_time: + type: optional + docs: The time at which the engagement started. + end_time: + type: optional + docs: The time at which the engagement ended. + account: + type: optional + docs: The account of the engagement. + contacts: optional>> + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: crm_v3.yml + EngagementResponse: + properties: + model: Engagement + warnings: list + errors: list + logs: optional> + source: + openapi: crm_v3.yml + EngagementTypeActivityType: + discriminated: false + docs: |- + The engagement type's activity type. + + * `CALL` - CALL + * `MEETING` - MEETING + * `EMAIL` - EMAIL + union: + - ActivityTypeEnum + - string + source: + openapi: crm_v3.yml + inline: true + EngagementType: + docs: >- + # The Engagement Type Object + + ### Description + + The `Engagement Type` object is used to represent an interaction activity. + A given `Engagement` typically has an `Engagement Type` object represented + in the engagement_type field. + + ### Usage Example + + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + activity_type: + type: optional + docs: |- + The engagement type's activity type. + + * `CALL` - CALL + * `MEETING` - MEETING + * `EMAIL` - EMAIL + name: + type: optional + docs: The engagement type's name. + remote_fields: + type: optional> + access: read-only + source: + openapi: crm_v3.yml + ErrorValidationProblem: + properties: + source: optional + title: string + detail: string + problem_type: string + source: + openapi: crm_v3.yml + EventTypeEnum: + enum: + - 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 + docs: >- + * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + + * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + + * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + + * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + + * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + + * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + + * `INVITED_USER` - INVITED_USER + + * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + + * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + + * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + + * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - + DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + + * `CREATED_DESTINATION` - CREATED_DESTINATION + + * `DELETED_DESTINATION` - DELETED_DESTINATION + + * `CHANGED_DESTINATION` - CHANGED_DESTINATION + + * `CHANGED_SCOPES` - CHANGED_SCOPES + + * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + + * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + + * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + + * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + + * `ENABLED_CATEGORY` - ENABLED_CATEGORY + + * `DISABLED_CATEGORY` - DISABLED_CATEGORY + + * `CHANGED_PASSWORD` - CHANGED_PASSWORD + + * `RESET_PASSWORD` - RESET_PASSWORD + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - + CREATED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - + CREATED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - + CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - + CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + + * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - + DELETED_INTEGRATION_WIDE_FIELD_MAPPING + + * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - + DELETED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + + * `MUTED_ISSUE` - MUTED_ISSUE + + * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + + * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + + * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + + * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + + * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + source: + openapi: crm_v3.yml + ExternalTargetFieldApi: + properties: + name: + type: optional + access: read-only + description: + type: optional + access: read-only + is_mapped: + type: optional + access: read-only + source: + openapi: crm_v3.yml + ExternalTargetFieldApiResponse: + properties: + Account: optional> + Contact: optional> + Lead: optional> + Note: optional> + Opportunity: optional> + Stage: optional> + User: optional> + Task: optional> + Engagement: optional> + source: + openapi: crm_v3.yml + FieldFormatEnum: + enum: + - string + - number + - date + - datetime + - bool + - list + docs: |- + * `string` - string + * `number` - number + * `date` - date + * `datetime` - datetime + * `bool` - bool + * `list` - list + source: + openapi: crm_v3.yml + FieldMappingApiInstanceTargetField: + properties: + name: string + description: string + is_organization_wide: boolean + source: + openapi: crm_v3.yml + inline: true + FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo: + properties: + method: optional + url_path: optional + field_traversal_path: optional> + source: + openapi: crm_v3.yml + inline: true + FieldMappingApiInstanceRemoteField: + properties: + remote_key_name: optional + schema: optional> + remote_endpoint_info: FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo + source: + openapi: crm_v3.yml + inline: true + FieldMappingApiInstance: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + is_integration_wide: + type: optional + access: read-only + target_field: + type: optional + access: read-only + remote_field: + type: optional + access: read-only + source: + openapi: crm_v3.yml + FieldMappingApiInstanceResponse: + properties: + Account: optional> + Contact: optional> + Lead: optional> + Note: optional> + Opportunity: optional> + Stage: optional> + User: optional> + Task: optional> + Engagement: optional> + source: + openapi: crm_v3.yml + FieldMappingInstanceResponse: + properties: + model: FieldMappingApiInstance + warnings: list + errors: list + logs: optional> + source: + openapi: crm_v3.yml + FieldPermissionDeserializer: + properties: + enabled_fields: optional> + disabled_fields: optional> + source: + openapi: crm_v3.yml + FieldPermissionDeserializerRequest: + properties: + enabled_fields: optional> + disabled_fields: optional> + source: + openapi: crm_v3.yml + FieldTypeEnum: + enum: + - string + - number + - date + - datetime + - bool + - list + docs: |- + * `string` - string + * `number` - number + * `date` - date + * `datetime` - datetime + * `bool` - bool + * `list` - list + source: + openapi: crm_v3.yml + IgnoreCommonModelRequestReason: + discriminated: false + union: + - ReasonEnum + - string + source: + openapi: crm_v3.yml + inline: true + IgnoreCommonModelRequest: + properties: + reason: IgnoreCommonModelRequestReason + message: + type: optional + validation: + minLength: 1 + maxLength: 256 + source: + openapi: crm_v3.yml + IndividualCommonModelScopeDeserializer: + properties: + model_name: string + model_permissions: optional> + field_permissions: optional + source: + openapi: crm_v3.yml + IndividualCommonModelScopeDeserializerRequest: + properties: + model_name: + type: string + validation: + minLength: 1 + model_permissions: optional> + field_permissions: optional + source: + openapi: crm_v3.yml + IssueStatus: + discriminated: false + docs: |- + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + union: + - IssueStatusEnum + - string + source: + openapi: crm_v3.yml + inline: true + Issue: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + status: + type: optional + docs: |- + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + error_description: string + end_user: + type: optional> + access: read-only + first_incident_time: optional + last_incident_time: optional + is_muted: + type: optional + access: read-only + error_details: + type: optional> + access: read-only + source: + openapi: crm_v3.yml + IssueStatusEnum: + enum: + - ONGOING + - RESOLVED + docs: |- + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + source: + openapi: crm_v3.yml + ItemFormatEnum: + enum: + - string + - number + - date + - datetime + - bool + - list + docs: |- + * `string` - uuid + * `number` - url + * `date` - email + * `datetime` - phone + * `bool` - currency + * `list` - decimal + source: + openapi: crm_v3.yml + ItemSchema: + properties: + item_type: optional + item_format: optional + item_choices: optional> + source: + openapi: crm_v3.yml + ItemTypeEnum: + enum: + - string + - number + - date + - datetime + - bool + - list + docs: |- + * `string` - string + * `number` - number + * `date` - date + * `datetime` - datetime + * `bool` - bool + * `list` - list + source: + openapi: crm_v3.yml + LanguageEnum: + enum: + - en + - de + docs: |- + * `en` - en + * `de` - de + source: + openapi: crm_v3.yml + LastSyncResultEnum: + enum: + - SYNCING + - DONE + - FAILED + - DISABLED + - PAUSED + - PARTIALLY_SYNCED + docs: |- + * `SYNCING` - SYNCING + * `DONE` - DONE + * `FAILED` - FAILED + * `DISABLED` - DISABLED + * `PAUSED` - PAUSED + * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED + source: + openapi: crm_v3.yml + LeadOwner: + discriminated: false + docs: The lead's owner. + union: + - type: string + validation: + format: uuid + - User + source: + openapi: crm_v3.yml + inline: true + LeadConvertedContact: + discriminated: false + docs: The contact of the converted lead. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: crm_v3.yml + inline: true + LeadConvertedAccount: + discriminated: false + docs: The account of the converted lead. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: crm_v3.yml + inline: true + Lead: + docs: >- + # The Lead Object + + ### Description + + The `Lead` object is used to represent an individual who is a potential + customer. + + ### Usage Example + + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + owner: + type: optional + docs: The lead's owner. + lead_source: + type: optional + docs: The lead's source. + title: + type: optional + docs: The lead's title. + company: + type: optional + docs: The lead's company. + first_name: + type: optional + docs: The lead's first name. + last_name: + type: optional + docs: The lead's last name. + addresses: + type: optional> + access: read-only + email_addresses: + type: optional> + access: read-only + phone_numbers: + type: optional> + access: read-only + remote_updated_at: + type: optional + docs: When the third party's lead was updated. + remote_created_at: + type: optional + docs: When the third party's lead was created. + converted_date: + type: optional + docs: When the lead was converted. + converted_contact: + type: optional + docs: The contact of the converted lead. + converted_account: + type: optional + docs: The account of the converted lead. + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + remote_fields: + type: optional> + access: read-only + source: + openapi: crm_v3.yml + LeadRequestOwner: + discriminated: false + docs: The lead's owner. + union: + - type: string + validation: + format: uuid + - User + source: + openapi: crm_v3.yml + inline: true + LeadRequestConvertedContact: + discriminated: false + docs: The contact of the converted lead. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: crm_v3.yml + inline: true + LeadRequestConvertedAccount: + discriminated: false + docs: The account of the converted lead. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: crm_v3.yml + inline: true + LeadRequest: + docs: >- + # The Lead Object + + ### Description + + The `Lead` object is used to represent an individual who is a potential + customer. + + ### Usage Example + + TODO + properties: + owner: + type: optional + docs: The lead's owner. + lead_source: + type: optional + docs: The lead's source. + title: + type: optional + docs: The lead's title. + company: + type: optional + docs: The lead's company. + first_name: + type: optional + docs: The lead's first name. + last_name: + type: optional + docs: The lead's last name. + addresses: optional> + email_addresses: optional> + phone_numbers: optional> + converted_date: + type: optional + docs: When the lead was converted. + converted_contact: + type: optional + docs: The contact of the converted lead. + converted_account: + type: optional + docs: The account of the converted lead. + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: crm_v3.yml + LeadResponse: + properties: + model: Lead + warnings: list + errors: list + logs: optional> + source: + openapi: crm_v3.yml + LinkToken: + properties: + link_token: string + integration_name: optional + magic_link_url: optional + source: + openapi: crm_v3.yml + LinkedAccountStatus: + properties: + linked_account_status: string + can_make_request: boolean + source: + openapi: crm_v3.yml + MetaResponse: + properties: + request_schema: map + remote_field_classes: optional> + status: optional + has_conditional_params: boolean + has_required_linked_account_params: boolean + source: + openapi: crm_v3.yml + MethodEnum: + enum: + - GET + - OPTIONS + - HEAD + - POST + - PUT + - PATCH + - DELETE + docs: |- + * `GET` - GET + * `OPTIONS` - OPTIONS + * `HEAD` - HEAD + * `POST` - POST + * `PUT` - PUT + * `PATCH` - PATCH + * `DELETE` - DELETE + source: + openapi: crm_v3.yml + ModelOperation: + docs: >- + # The ModelOperation Object + + ### Description + + The `ModelOperation` object is used to represent the operations that are + currently supported for a given model. + + + ### Usage Example + + View what operations are supported for the `Candidate` endpoint. + properties: + model_name: string + available_operations: list + required_post_parameters: list + supported_fields: list + source: + openapi: crm_v3.yml + ModelPermissionDeserializer: + properties: + is_enabled: optional + source: + openapi: crm_v3.yml + ModelPermissionDeserializerRequest: + properties: + is_enabled: optional + source: + openapi: crm_v3.yml + MultipartFormFieldRequestEncoding: + discriminated: false + docs: |- + The encoding of the value of `data`. Defaults to `RAW` if not defined. + + * `RAW` - RAW + * `BASE64` - BASE64 + * `GZIP_BASE64` - GZIP_BASE64 + union: + - EncodingEnum + - string + source: + openapi: crm_v3.yml + inline: true + MultipartFormFieldRequest: + docs: >- + # The MultipartFormField Object + + ### Description + + The `MultipartFormField` object is used to represent fields in an HTTP + request using `multipart/form-data`. + + + ### Usage Example + + Create a `MultipartFormField` to define a multipart form entry. + properties: + name: + type: string + docs: The name of the form field + validation: + minLength: 1 + data: + type: string + docs: The data for the form field. + validation: + minLength: 1 + encoding: + type: optional + docs: |- + The encoding of the value of `data`. Defaults to `RAW` if not defined. + + * `RAW` - RAW + * `BASE64` - BASE64 + * `GZIP_BASE64` - GZIP_BASE64 + file_name: + type: optional + docs: The file name of the form field, if the field is for a file. + validation: + minLength: 1 + content_type: + type: optional + docs: The MIME type of the file, if the field is for a file. + validation: + minLength: 1 + source: + openapi: crm_v3.yml + NoteOwner: + discriminated: false + docs: The note's owner. + union: + - type: string + validation: + format: uuid + - User + source: + openapi: crm_v3.yml + inline: true + NoteContact: + discriminated: false + docs: The note's contact. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: crm_v3.yml + inline: true + NoteAccount: + discriminated: false + docs: The note's account. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: crm_v3.yml + inline: true + NoteOpportunity: + discriminated: false + docs: The note's opportunity. + union: + - type: string + validation: + format: uuid + - Opportunity + source: + openapi: crm_v3.yml + inline: true + Note: + docs: |- + # The Note Object + ### Description + The `Note` object is used to represent a note on another object. + ### Usage Example + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + owner: + type: optional + docs: The note's owner. + content: + type: optional + docs: The note's content. + contact: + type: optional + docs: The note's contact. + account: + type: optional + docs: The note's account. + opportunity: + type: optional + docs: The note's opportunity. + remote_updated_at: + type: optional + docs: When the third party's lead was updated. + remote_created_at: + type: optional + docs: When the third party's lead was created. + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + remote_fields: + type: optional> + access: read-only + source: + openapi: crm_v3.yml + NoteRequestOwner: + discriminated: false + docs: The note's owner. + union: + - type: string + validation: + format: uuid + - User + source: + openapi: crm_v3.yml + inline: true + NoteRequestContact: + discriminated: false + docs: The note's contact. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: crm_v3.yml + inline: true + NoteRequestAccount: + discriminated: false + docs: The note's account. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: crm_v3.yml + inline: true + NoteRequestOpportunity: + discriminated: false + docs: The note's opportunity. + union: + - type: string + validation: + format: uuid + - Opportunity + source: + openapi: crm_v3.yml + inline: true + NoteRequest: + docs: |- + # The Note Object + ### Description + The `Note` object is used to represent a note on another object. + ### Usage Example + TODO + properties: + owner: + type: optional + docs: The note's owner. + content: + type: optional + docs: The note's content. + contact: + type: optional + docs: The note's contact. + account: + type: optional + docs: The note's account. + opportunity: + type: optional + docs: The note's opportunity. + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: crm_v3.yml + NoteResponse: + properties: + model: Note + warnings: list + errors: list + logs: optional> + source: + openapi: crm_v3.yml + ObjectClassDescriptionRequest: + properties: + id: + type: string + validation: + minLength: 1 + origin_type: OriginTypeEnum + source: + openapi: crm_v3.yml + OpportunityOwner: + discriminated: false + docs: The opportunity's owner. + union: + - type: string + validation: + format: uuid + - User + source: + openapi: crm_v3.yml + inline: true + OpportunityAccount: + discriminated: false + docs: The account of the opportunity. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: crm_v3.yml + inline: true + OpportunityStage: + discriminated: false + docs: The stage of the opportunity. + union: + - type: string + validation: + format: uuid + - Stage + source: + openapi: crm_v3.yml + inline: true + OpportunityStatus: + discriminated: false + docs: |- + The opportunity's status. + + * `OPEN` - OPEN + * `WON` - WON + * `LOST` - LOST + union: + - OpportunityStatusEnum + - string + source: + openapi: crm_v3.yml + inline: true + Opportunity: + docs: >- + # The Opportunity Object + + ### Description + + The `Opportunity` object is used to represent a deal opportunity in a CRM + system. + + ### Usage Example + + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The opportunity's name. + description: + type: optional + docs: The opportunity's description. + amount: + type: optional + docs: The opportunity's amount. + validation: + min: -2147483648 + max: 2147483647 + owner: + type: optional + docs: The opportunity's owner. + account: + type: optional + docs: The account of the opportunity. + stage: + type: optional + docs: The stage of the opportunity. + status: + type: optional + docs: |- + The opportunity's status. + + * `OPEN` - OPEN + * `WON` - WON + * `LOST` - LOST + last_activity_at: + type: optional + docs: When the opportunity's last activity occurred. + close_date: + type: optional + docs: When the opportunity was closed. + remote_created_at: + type: optional + docs: When the third party's opportunity was created. + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + remote_fields: + type: optional> + access: read-only + source: + openapi: crm_v3.yml + OpportunityRequestOwner: + discriminated: false + docs: The opportunity's owner. + union: + - type: string + validation: + format: uuid + - User + source: + openapi: crm_v3.yml + inline: true + OpportunityRequestAccount: + discriminated: false + docs: The account of the opportunity. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: crm_v3.yml + inline: true + OpportunityRequestStage: + discriminated: false + docs: The stage of the opportunity. + union: + - type: string + validation: + format: uuid + - Stage + source: + openapi: crm_v3.yml + inline: true + OpportunityRequestStatus: + discriminated: false + docs: |- + The opportunity's status. + + * `OPEN` - OPEN + * `WON` - WON + * `LOST` - LOST + union: + - OpportunityStatusEnum + - string + source: + openapi: crm_v3.yml + inline: true + OpportunityRequest: + docs: >- + # The Opportunity Object + + ### Description + + The `Opportunity` object is used to represent a deal opportunity in a CRM + system. + + ### Usage Example + + TODO + properties: + name: + type: optional + docs: The opportunity's name. + description: + type: optional + docs: The opportunity's description. + amount: + type: optional + docs: The opportunity's amount. + validation: + min: -2147483648 + max: 2147483647 + owner: + type: optional + docs: The opportunity's owner. + account: + type: optional + docs: The account of the opportunity. + stage: + type: optional + docs: The stage of the opportunity. + status: + type: optional + docs: |- + The opportunity's status. + + * `OPEN` - OPEN + * `WON` - WON + * `LOST` - LOST + last_activity_at: + type: optional + docs: When the opportunity's last activity occurred. + close_date: + type: optional + docs: When the opportunity was closed. + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: crm_v3.yml + OpportunityResponse: + properties: + model: Opportunity + warnings: list + errors: list + logs: optional> + source: + openapi: crm_v3.yml + OpportunityStatusEnum: + enum: + - OPEN + - WON + - LOST + docs: |- + * `OPEN` - OPEN + * `WON` - WON + * `LOST` - LOST + source: + openapi: crm_v3.yml + OriginTypeEnum: + enum: + - CUSTOM_OBJECT + - COMMON_MODEL + - REMOTE_ONLY_MODEL + docs: |- + * `CUSTOM_OBJECT` - CUSTOM_OBJECT + * `COMMON_MODEL` - COMMON_MODEL + * `REMOTE_ONLY_MODEL` - REMOTE_ONLY_MODEL + source: + openapi: crm_v3.yml + PaginatedAccountDetailsAndActionsList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: crm_v3.yml + PaginatedAccountList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: crm_v3.yml + PaginatedAssociationList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: crm_v3.yml + PaginatedAssociationTypeList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: crm_v3.yml + PaginatedAuditLogEventList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: crm_v3.yml + PaginatedContactList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: crm_v3.yml + PaginatedCustomObjectClassList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: crm_v3.yml + PaginatedCustomObjectList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: crm_v3.yml + PaginatedEngagementList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: crm_v3.yml + PaginatedEngagementTypeList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: crm_v3.yml + PaginatedIssueList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: crm_v3.yml + PaginatedLeadList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: crm_v3.yml + PaginatedNoteList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: crm_v3.yml + PaginatedOpportunityList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: crm_v3.yml + PaginatedRemoteFieldClassList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: crm_v3.yml + PaginatedStageList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: crm_v3.yml + PaginatedSyncStatusList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: crm_v3.yml + PaginatedTaskList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: crm_v3.yml + PaginatedUserList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: crm_v3.yml + PatchedAccountRequest: + docs: |- + # The Account Object + ### Description + The `Account` object is used to represent a company in a CRM system. + ### Usage Example + TODO + properties: + owner: + type: optional + docs: The account's owner. + validation: + format: uuid + name: + type: optional + docs: The account's name. + description: + type: optional + docs: The account's description. + industry: + type: optional + docs: The account's industry. + website: + type: optional + docs: The account's website. + validation: + format: uri + maxLength: 2000 + number_of_employees: + type: optional + docs: The account's number of employees. + validation: + min: -2147483648 + max: 2147483647 + addresses: optional> + last_activity_at: + type: optional + docs: >- + The last date (either most recent or furthest in the future) of when + an activity occurs in an account. + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: crm_v3.yml + PatchedContactRequestOwner: + discriminated: false + docs: The contact's owner. + union: + - type: string + validation: + format: uuid + - User + source: + openapi: crm_v3.yml + inline: true + PatchedContactRequest: + docs: >- + # The Contact Object + + ### Description + + The `Contact` object is used to represent an existing point of contact at + a company in a CRM system. + + ### Usage Example + + TODO + properties: + first_name: + type: optional + docs: The contact's first name. + last_name: + type: optional + docs: The contact's last name. + account: + type: optional + docs: The contact's account. + validation: + format: uuid + owner: + type: optional + docs: The contact's owner. + addresses: optional> + email_addresses: optional> + phone_numbers: optional> + last_activity_at: + type: optional + docs: When the contact's last activity occurred. + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: crm_v3.yml + PatchedEngagementRequestDirection: + discriminated: false + docs: |- + The engagement's direction. + + * `INBOUND` - INBOUND + * `OUTBOUND` - OUTBOUND + union: + - DirectionEnum + - string + source: + openapi: crm_v3.yml + inline: true + PatchedEngagementRequest: + docs: >- + # The Engagement Object + + ### Description + + The `Engagement` object is used to represent an interaction noted in a CRM + system. + + ### Usage Example + + TODO + properties: + owner: + type: optional + docs: The engagement's owner. + validation: + format: uuid + content: + type: optional + docs: The engagement's content. + subject: + type: optional + docs: The engagement's subject. + direction: + type: optional + docs: |- + The engagement's direction. + + * `INBOUND` - INBOUND + * `OUTBOUND` - OUTBOUND + engagement_type: + type: optional + docs: The engagement type of the engagement. + validation: + format: uuid + start_time: + type: optional + docs: The time at which the engagement started. + end_time: + type: optional + docs: The time at which the engagement ended. + account: + type: optional + docs: The account of the engagement. + validation: + format: uuid + contacts: optional>> + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: crm_v3.yml + PatchedOpportunityRequestStatus: + discriminated: false + docs: |- + The opportunity's status. + + * `OPEN` - OPEN + * `WON` - WON + * `LOST` - LOST + union: + - OpportunityStatusEnum + - string + source: + openapi: crm_v3.yml + inline: true + PatchedOpportunityRequest: + docs: >- + # The Opportunity Object + + ### Description + + The `Opportunity` object is used to represent a deal opportunity in a CRM + system. + + ### Usage Example + + TODO + properties: + name: + type: optional + docs: The opportunity's name. + description: + type: optional + docs: The opportunity's description. + amount: + type: optional + docs: The opportunity's amount. + validation: + min: -2147483648 + max: 2147483647 + owner: + type: optional + docs: The opportunity's owner. + validation: + format: uuid + account: + type: optional + docs: The account of the opportunity. + validation: + format: uuid + stage: + type: optional + docs: The stage of the opportunity. + validation: + format: uuid + status: + type: optional + docs: |- + The opportunity's status. + + * `OPEN` - OPEN + * `WON` - WON + * `LOST` - LOST + last_activity_at: + type: optional + docs: When the opportunity's last activity occurred. + close_date: + type: optional + docs: When the opportunity was closed. + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: crm_v3.yml + PatchedTaskRequestStatus: + discriminated: false + docs: |- + The task's status. + + * `OPEN` - OPEN + * `CLOSED` - CLOSED + union: + - TaskStatusEnum + - string + source: + openapi: crm_v3.yml + inline: true + PatchedTaskRequest: + docs: |- + # The Task Object + ### Description + The `Task` object is used to represent a task, such as a to-do item. + ### Usage Example + TODO + properties: + subject: + type: optional + docs: The task's subject. + content: + type: optional + docs: The task's content. + owner: + type: optional + docs: The task's owner. + validation: + format: uuid + account: + type: optional + docs: The task's account. + validation: + format: uuid + opportunity: + type: optional + docs: The task's opportunity. + validation: + format: uuid + completed_date: + type: optional + docs: When the task is completed. + due_date: + type: optional + docs: When the task is due. + status: + type: optional + docs: |- + The task's status. + + * `OPEN` - OPEN + * `CLOSED` - CLOSED + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: crm_v3.yml + PhoneNumber: + docs: |- + # The PhoneNumber Object + ### Description + The `PhoneNumber` object is used to represent an entity's phone number. + ### Usage Example + Fetch from the `GET Contact` endpoint and view their phone numbers. + properties: + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + phone_number: + type: optional + docs: The phone number. + phone_number_type: + type: optional + docs: The phone number's type. + source: + openapi: crm_v3.yml + PhoneNumberRequest: + docs: |- + # The PhoneNumber Object + ### Description + The `PhoneNumber` object is used to represent an entity's phone number. + ### Usage Example + Fetch from the `GET Contact` endpoint and view their phone numbers. + properties: + phone_number: + type: optional + docs: The phone number. + phone_number_type: + type: optional + docs: The phone number's type. + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: crm_v3.yml + ReasonEnum: + enum: + - GENERAL_CUSTOMER_REQUEST + - GDPR + - OTHER + docs: |- + * `GENERAL_CUSTOMER_REQUEST` - GENERAL_CUSTOMER_REQUEST + * `GDPR` - GDPR + * `OTHER` - OTHER + source: + openapi: crm_v3.yml + RemoteData: + docs: >- + # The RemoteData Object + + ### Description + + The `RemoteData` object is used to represent the full data pulled from the + third-party API for an object. + + + ### Usage Example + + TODO + properties: + path: + type: string + docs: The third-party API path that is being called. + data: + type: optional + access: read-only + source: + openapi: crm_v3.yml + RemoteEndpointInfo: + properties: + method: string + url_path: string + field_traversal_path: list + source: + openapi: crm_v3.yml + RemoteFieldRemoteFieldClass: + discriminated: false + union: + - string + - RemoteFieldClass + source: + openapi: crm_v3.yml + inline: true + RemoteField: + properties: + remote_field_class: RemoteFieldRemoteFieldClass + value: optional + source: + openapi: crm_v3.yml + RemoteFieldApiCoverage: + discriminated: false + union: + - integer + - double + source: + openapi: crm_v3.yml + inline: true + RemoteFieldApi: + properties: + schema: map + remote_key_name: string + remote_endpoint_info: RemoteEndpointInfo + example_values: optional> + advanced_metadata: optional + coverage: + type: optional + access: read-only + source: + openapi: crm_v3.yml + RemoteFieldApiResponse: + properties: + Account: optional> + Contact: optional> + Lead: optional> + Note: optional> + Opportunity: optional> + Stage: optional> + User: optional> + Task: optional> + Engagement: optional> + source: + openapi: crm_v3.yml + RemoteFieldClassFieldChoicesItem: + properties: + value: optional + display_name: optional + source: + openapi: crm_v3.yml + inline: true + RemoteFieldClass: + properties: + id: optional + display_name: optional + remote_key_name: optional + description: optional + is_custom: optional + is_required: optional + field_type: optional + field_format: optional + field_choices: optional> + item_schema: optional + source: + openapi: crm_v3.yml + RemoteFieldClassForCustomObjectClassFieldType: + discriminated: false + union: + - FieldTypeEnum + - string + source: + openapi: crm_v3.yml + inline: true + RemoteFieldClassForCustomObjectClassFieldFormat: + discriminated: false + union: + - FieldFormatEnum + - string + source: + openapi: crm_v3.yml + inline: true + RemoteFieldClassForCustomObjectClassFieldChoicesItem: + properties: + value: optional + display_name: optional + source: + openapi: crm_v3.yml + inline: true + RemoteFieldClassForCustomObjectClassItemSchema: + properties: + item_type: optional + item_format: optional + item_choices: optional>> + source: + openapi: crm_v3.yml + inline: true + RemoteFieldClassForCustomObjectClass: + properties: + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + display_name: optional + remote_key_name: optional + description: optional + is_required: optional + field_type: + type: optional + access: read-only + field_format: + type: optional + access: read-only + field_choices: + type: optional> + access: read-only + item_schema: + type: optional + access: read-only + source: + openapi: crm_v3.yml + RemoteFieldRequestRemoteFieldClass: + discriminated: false + union: + - type: string + validation: + format: uuid + - RemoteFieldClass + source: + openapi: crm_v3.yml + inline: true + RemoteFieldRequest: + properties: + remote_field_class: RemoteFieldRequestRemoteFieldClass + value: optional + source: + openapi: crm_v3.yml + RemoteKey: + docs: >- + # The RemoteKey Object + + ### Description + + The `RemoteKey` object is used to represent a request for a new remote + key. + + + ### Usage Example + + Post a `GenerateRemoteKey` to receive a new `RemoteKey`. + properties: + name: string + key: string + source: + openapi: crm_v3.yml + RemoteResponseResponseType: + discriminated: false + union: + - ResponseTypeEnum + - string + source: + openapi: crm_v3.yml + inline: true + RemoteResponse: + docs: >- + # The RemoteResponse Object + + ### Description + + The `RemoteResponse` object is used to represent information returned from + a third-party endpoint. + + + ### Usage Example + + View the `RemoteResponse` returned from your `DataPassthrough`. + properties: + method: string + path: string + status: integer + response: unknown + response_headers: optional> + response_type: optional + headers: optional> + source: + openapi: crm_v3.yml + RequestFormatEnum: + enum: + - JSON + - XML + - MULTIPART + docs: |- + * `JSON` - JSON + * `XML` - XML + * `MULTIPART` - MULTIPART + source: + openapi: crm_v3.yml + ResponseTypeEnum: + enum: + - JSON + - BASE64_GZIP + docs: |- + * `JSON` - JSON + * `BASE64_GZIP` - BASE64_GZIP + source: + openapi: crm_v3.yml + RoleEnum: + enum: + - ADMIN + - DEVELOPER + - MEMBER + - API + - SYSTEM + - MERGE_TEAM + docs: |- + * `ADMIN` - ADMIN + * `DEVELOPER` - DEVELOPER + * `MEMBER` - MEMBER + * `API` - API + * `SYSTEM` - SYSTEM + * `MERGE_TEAM` - MERGE_TEAM + source: + openapi: crm_v3.yml + SelectiveSyncConfigurationsUsageEnum: + enum: + - IN_NEXT_SYNC + - IN_LAST_SYNC + docs: |- + * `IN_NEXT_SYNC` - IN_NEXT_SYNC + * `IN_LAST_SYNC` - IN_LAST_SYNC + source: + openapi: crm_v3.yml + Stage: + docs: |- + # The Stage Object + ### Description + The `Stage` object is used to represent the stage of an opportunity. + ### Usage Example + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The stage's name. + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + remote_fields: + type: optional> + access: read-only + source: + openapi: crm_v3.yml + StatusFd5Enum: + enum: + - SYNCING + - DONE + - FAILED + - DISABLED + - PAUSED + - PARTIALLY_SYNCED + docs: |- + * `SYNCING` - SYNCING + * `DONE` - DONE + * `FAILED` - FAILED + * `DISABLED` - DISABLED + * `PAUSED` - PAUSED + * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED + source: + openapi: crm_v3.yml + SyncStatusLastSyncResult: + discriminated: false + union: + - LastSyncResultEnum + - string + source: + openapi: crm_v3.yml + inline: true + SyncStatusStatus: + discriminated: false + union: + - StatusFd5Enum + - string + source: + openapi: crm_v3.yml + inline: true + SyncStatus: + docs: >- + # The SyncStatus Object + + ### Description + + The `SyncStatus` object is used to represent the syncing state of an + account + + + ### Usage Example + + View the `SyncStatus` for an account to see how recently its models were + synced. + properties: + model_name: string + model_id: string + last_sync_start: optional + next_sync_start: optional + last_sync_result: optional + last_sync_finished: optional + status: SyncStatusStatus + is_initial_sync: boolean + selective_sync_configurations_usage: optional + source: + openapi: crm_v3.yml + TaskOwner: + discriminated: false + docs: The task's owner. + union: + - type: string + validation: + format: uuid + - User + source: + openapi: crm_v3.yml + inline: true + TaskAccount: + discriminated: false + docs: The task's account. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: crm_v3.yml + inline: true + TaskOpportunity: + discriminated: false + docs: The task's opportunity. + union: + - type: string + validation: + format: uuid + - Opportunity + source: + openapi: crm_v3.yml + inline: true + TaskStatus: + discriminated: false + docs: |- + The task's status. + + * `OPEN` - OPEN + * `CLOSED` - CLOSED + union: + - TaskStatusEnum + - string + source: + openapi: crm_v3.yml + inline: true + Task: + docs: |- + # The Task Object + ### Description + The `Task` object is used to represent a task, such as a to-do item. + ### Usage Example + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + subject: + type: optional + docs: The task's subject. + content: + type: optional + docs: The task's content. + owner: + type: optional + docs: The task's owner. + account: + type: optional + docs: The task's account. + opportunity: + type: optional + docs: The task's opportunity. + completed_date: + type: optional + docs: When the task is completed. + due_date: + type: optional + docs: When the task is due. + status: + type: optional + docs: |- + The task's status. + + * `OPEN` - OPEN + * `CLOSED` - CLOSED + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + remote_fields: + type: optional> + access: read-only + source: + openapi: crm_v3.yml + TaskRequestOwner: + discriminated: false + docs: The task's owner. + union: + - type: string + validation: + format: uuid + - User + source: + openapi: crm_v3.yml + inline: true + TaskRequestAccount: + discriminated: false + docs: The task's account. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: crm_v3.yml + inline: true + TaskRequestOpportunity: + discriminated: false + docs: The task's opportunity. + union: + - type: string + validation: + format: uuid + - Opportunity + source: + openapi: crm_v3.yml + inline: true + TaskRequestStatus: + discriminated: false + docs: |- + The task's status. + + * `OPEN` - OPEN + * `CLOSED` - CLOSED + union: + - TaskStatusEnum + - string + source: + openapi: crm_v3.yml + inline: true + TaskRequest: + docs: |- + # The Task Object + ### Description + The `Task` object is used to represent a task, such as a to-do item. + ### Usage Example + TODO + properties: + subject: + type: optional + docs: The task's subject. + content: + type: optional + docs: The task's content. + owner: + type: optional + docs: The task's owner. + account: + type: optional + docs: The task's account. + opportunity: + type: optional + docs: The task's opportunity. + completed_date: + type: optional + docs: When the task is completed. + due_date: + type: optional + docs: When the task is due. + status: + type: optional + docs: |- + The task's status. + + * `OPEN` - OPEN + * `CLOSED` - CLOSED + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: crm_v3.yml + TaskResponse: + properties: + model: Task + warnings: list + errors: list + logs: optional> + source: + openapi: crm_v3.yml + TaskStatusEnum: + enum: + - OPEN + - CLOSED + docs: |- + * `OPEN` - OPEN + * `CLOSED` - CLOSED + source: + openapi: crm_v3.yml + User: + docs: >- + # The User Object + + ### Description + + The `User` object is used to represent a user with a login to the CRM + system. + + ### Usage Example + + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The user's name. + email: + type: optional + docs: The user's email address. + is_active: + type: optional + docs: Whether or not the user is active. + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + remote_fields: + type: optional> + access: read-only + source: + openapi: crm_v3.yml + ValidationProblemSource: + properties: + pointer: string + source: + openapi: crm_v3.yml + WarningValidationProblem: + properties: + source: optional + title: string + detail: string + problem_type: string + source: + openapi: crm_v3.yml + WebhookReceiver: + properties: + event: string + is_active: boolean + key: optional + source: + openapi: crm_v3.yml diff --git a/.mock/definition/CRM/accountDetails.yml b/.mock/definition/CRM/accountDetails.yml new file mode 100644 index 000000000..99cf4cd2f --- /dev/null +++ b/.mock/definition/CRM/accountDetails.yml @@ -0,0 +1,36 @@ +imports: + crmRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + retrieve: + path: /crm/v1/account-details + method: GET + auth: true + docs: Get details for a linked account. + source: + openapi: crm_v3.yml + response: + docs: '' + type: crmRoot.AccountDetails + status-code: 200 + examples: + - headers: {} + response: + body: + id: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd + integration: BambooHR + integration_slug: bamboohr + category: hris + end_user_origin_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + end_user_organization_name: Waystar Royco + end_user_email_address: kendall.roy@waystar-royco.com + status: COMPLETE + webhook_listener_url: >- + https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 + is_duplicate: true + account_type: PRODUCTION + completed_at: '2024-08-26T20:11:19Z' + source: + openapi: crm_v3.yml diff --git a/.mock/definition/CRM/accountToken.yml b/.mock/definition/CRM/accountToken.yml new file mode 100644 index 000000000..814d7a3cb --- /dev/null +++ b/.mock/definition/CRM/accountToken.yml @@ -0,0 +1,44 @@ +imports: + crmRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + retrieve: + path: /crm/v1/account-token/{public_token} + method: GET + auth: true + docs: >- + Returns the account token for the end user with the provided public + token. + source: + openapi: crm_v3.yml + path-parameters: + public_token: string + response: + docs: '' + type: crmRoot.AccountToken + status-code: 200 + examples: + - path-parameters: + public_token: public_token + response: + body: + account_token: T9klMDQrcHdm9jrtHuOS2Nf06BIHwMNjpPXPMB + integration: + name: name + abbreviated_name: abbreviated_name + categories: + - hris + image: image + square_image: square_image + color: color + slug: slug + api_endpoints_to_documentation_urls: + key: value + webhook_setup_guide_url: webhook_setup_guide_url + category_beta_status: + key: value + id: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd + source: + openapi: crm_v3.yml diff --git a/.mock/definition/CRM/accounts.yml b/.mock/definition/CRM/accounts.yml new file mode 100644 index 000000000..a304597f0 --- /dev/null +++ b/.mock/definition/CRM/accounts.yml @@ -0,0 +1,856 @@ +imports: + crmRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /crm/v1/accounts + method: GET + auth: true + docs: Returns a list of `Account` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: crm_v3.yml + request: + name: AccountsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional> + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + name: + type: optional + docs: If provided, will only return accounts with this name. + owner_id: + type: optional + docs: If provided, will only return accounts with this owner. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: crmRoot.PaginatedAccountList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 0958cbc6-6040-430a-848e-aafacbadf4ae + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + owner: owner + name: Merge API + description: One API for all integrations + industry: API's + website: https://merge.dev/ + number_of_employees: 276000 + addresses: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + street_1: 50 Bowling Green Dr + street_2: Golden Gate Park + city: San Francisco + state: CA + postal_code: '94122' + country: US + address_type: Shipping + phone_numbers: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + phone_number: '+16788879833' + phone_number_type: Mobile + last_activity_at: '2022-02-10T00:00:00Z' + remote_updated_at: '2022-01-09T00:00:00Z' + remote_created_at: '2021-11-10T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /accounts + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + create: + path: /crm/v1/accounts + method: POST + auth: true + docs: Creates an `Account` object with the given values. + source: + openapi: crm_v3.yml + request: + name: CrmAccountEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: crmRoot.AccountRequest + content-type: application/json + response: + docs: '' + type: crmRoot.CrmAccountResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: 0958cbc6-6040-430a-848e-aafacbadf4ae + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + owner: owner + name: Merge API + description: One API for all integrations + industry: API's + website: https://merge.dev/ + number_of_employees: 276000 + addresses: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + street_1: 50 Bowling Green Dr + street_2: Golden Gate Park + city: San Francisco + state: CA + postal_code: '94122' + country: US + address_type: Shipping + phone_numbers: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + phone_number: '+16788879833' + phone_number_type: Mobile + last_activity_at: '2022-02-10T00:00:00Z' + remote_updated_at: '2022-01-09T00:00:00Z' + remote_created_at: '2021-11-10T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /accounts + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /crm/v1/accounts/{id} + method: GET + auth: true + docs: Returns an `Account` object with the given `id`. + source: + openapi: crm_v3.yml + path-parameters: + id: string + request: + name: AccountsRetrieveRequest + query-parameters: + expand: + type: optional> + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: crmRoot.Account + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 0958cbc6-6040-430a-848e-aafacbadf4ae + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + owner: owner + name: Merge API + description: One API for all integrations + industry: API's + website: https://merge.dev/ + number_of_employees: 276000 + addresses: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + street_1: 50 Bowling Green Dr + street_2: Golden Gate Park + city: San Francisco + state: CA + postal_code: '94122' + country: US + address_type: Shipping + phone_numbers: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + phone_number: '+16788879833' + phone_number_type: Mobile + last_activity_at: '2022-02-10T00:00:00Z' + remote_updated_at: '2022-01-09T00:00:00Z' + remote_created_at: '2021-11-10T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /accounts + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + value: + key: value + partialUpdate: + path: /crm/v1/accounts/{id} + method: PATCH + auth: true + docs: Updates an `Account` object with the given `id`. + source: + openapi: crm_v3.yml + path-parameters: + id: string + request: + name: PatchedCrmAccountEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: crmRoot.PatchedAccountRequest + content-type: application/json + response: + docs: '' + type: crmRoot.CrmAccountResponse + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + request: + model: {} + response: + body: + model: + id: 0958cbc6-6040-430a-848e-aafacbadf4ae + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + owner: owner + name: Merge API + description: One API for all integrations + industry: API's + website: https://merge.dev/ + number_of_employees: 276000 + addresses: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + street_1: 50 Bowling Green Dr + street_2: Golden Gate Park + city: San Francisco + state: CA + postal_code: '94122' + country: US + address_type: Shipping + phone_numbers: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + phone_number: '+16788879833' + phone_number_type: Mobile + last_activity_at: '2022-02-10T00:00:00Z' + remote_updated_at: '2022-01-09T00:00:00Z' + remote_created_at: '2021-11-10T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /accounts + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + metaPatchRetrieve: + path: /crm/v1/accounts/meta/patch/{id} + method: GET + auth: true + docs: Returns metadata for `CRMAccount` PATCHs. + source: + openapi: crm_v3.yml + path-parameters: + id: string + response: + docs: '' + type: crmRoot.MetaResponse + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + metaPostRetrieve: + path: /crm/v1/accounts/meta/post + method: GET + auth: true + docs: Returns metadata for `CRMAccount` POSTs. + source: + openapi: crm_v3.yml + response: + docs: '' + type: crmRoot.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + remoteFieldClassesList: + path: /crm/v1/accounts/remote-field-classes + method: GET + auth: true + docs: Returns a list of `RemoteFieldClass` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: crm_v3.yml + request: + name: AccountsRemoteFieldClassesListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_common_model_field: + type: optional + docs: >- + If provided, will only return remote field classes with this + is_common_model_field value + is_custom: + type: optional + docs: >- + If provided, will only return remote fields classes with this + is_custom value + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: crmRoot.PaginatedRemoteFieldClassList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: id + display_name: display_name + remote_key_name: remote_key_name + description: description + is_custom: true + is_required: true + field_type: string + field_format: string + field_choices: + - {} + source: + openapi: crm_v3.yml diff --git a/.mock/definition/CRM/associationTypes.yml b/.mock/definition/CRM/associationTypes.yml new file mode 100644 index 000000000..a0560561e --- /dev/null +++ b/.mock/definition/CRM/associationTypes.yml @@ -0,0 +1,426 @@ +imports: + crmRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + custom_object_classes_association_types_list: + path: /crm/v1/custom-object-classes/{custom_object_class_id}/association-types + method: GET + auth: true + docs: Returns a list of `AssociationType` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: crm_v3.yml + path-parameters: + custom_object_class_id: string + request: + name: CustomObjectClassesAssociationTypesListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional> + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: crmRoot.PaginatedAssociationTypeList + status-code: 200 + examples: + - path-parameters: + custom_object_class_id: custom_object_class_id + headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 5bb73c32-3c6c-4757-ab7d-7d3540a1be31 + remote_id: '93' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + source_object_class: + id: ff1ff4cb-a66b-47dc-8e2a-50388049e602 + origin_type: CUSTOM_OBJECT + target_object_classes: + - id: Opportunity + origin_type: COMMON_MODEL + remote_key_name: order_to_opportunity + display_name: Order to Opportunity + cardinality: ONE_TO_ONE + is_required: true + custom_object_classes_association_types_create: + path: /crm/v1/custom-object-classes/{custom_object_class_id}/association-types + method: POST + auth: true + docs: Creates an `AssociationType` object with the given values. + source: + openapi: crm_v3.yml + path-parameters: + custom_object_class_id: string + request: + name: CrmAssociationTypeEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: crmRoot.AssociationTypeRequestRequest + content-type: application/json + response: + docs: '' + type: crmRoot.CrmAssociationTypeResponse + status-code: 201 + examples: + - path-parameters: + custom_object_class_id: custom_object_class_id + headers: {} + request: + model: + source_object_class: + id: id + origin_type: CUSTOM_OBJECT + target_object_classes: + - id: id + origin_type: CUSTOM_OBJECT + remote_key_name: remote_key_name + response: + body: + model: + id: 5bb73c32-3c6c-4757-ab7d-7d3540a1be31 + remote_id: '93' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + source_object_class: + id: ff1ff4cb-a66b-47dc-8e2a-50388049e602 + origin_type: CUSTOM_OBJECT + target_object_classes: + - id: Opportunity + origin_type: COMMON_MODEL + remote_key_name: order_to_opportunity + display_name: Order to Opportunity + cardinality: ONE_TO_ONE + is_required: true + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + custom_object_classes_association_types_retrieve: + path: >- + /crm/v1/custom-object-classes/{custom_object_class_id}/association-types/{id} + method: GET + auth: true + docs: Returns an `AssociationType` object with the given `id`. + source: + openapi: crm_v3.yml + path-parameters: + custom_object_class_id: string + id: string + request: + name: CustomObjectClassesAssociationTypesRetrieveRequest + query-parameters: + expand: + type: optional> + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: crmRoot.AssociationType + status-code: 200 + examples: + - path-parameters: + custom_object_class_id: custom_object_class_id + id: id + headers: {} + response: + body: + id: 5bb73c32-3c6c-4757-ab7d-7d3540a1be31 + remote_id: '93' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + source_object_class: + id: ff1ff4cb-a66b-47dc-8e2a-50388049e602 + origin_type: CUSTOM_OBJECT + target_object_classes: + - id: Opportunity + created_at: '2024-01-15T09:30:00Z' + modified_at: '2024-01-15T09:30:00Z' + origin_type: COMMON_MODEL + remote_key_name: order_to_opportunity + display_name: Order to Opportunity + cardinality: ONE_TO_ONE + is_required: true + custom_object_classes_association_types_meta_post_retrieve: + path: >- + /crm/v1/custom-object-classes/{custom_object_class_id}/association-types/meta/post + method: GET + auth: true + docs: Returns metadata for `CRMAssociationType` POSTs. + source: + openapi: crm_v3.yml + path-parameters: + custom_object_class_id: string + response: + docs: '' + type: crmRoot.MetaResponse + status-code: 200 + examples: + - path-parameters: + custom_object_class_id: custom_object_class_id + headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + source: + openapi: crm_v3.yml diff --git a/.mock/definition/CRM/associations.yml b/.mock/definition/CRM/associations.yml new file mode 100644 index 000000000..f4e420a9b --- /dev/null +++ b/.mock/definition/CRM/associations.yml @@ -0,0 +1,147 @@ +imports: + crmRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + custom_object_classes_custom_objects_associations_list: + path: >- + /crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects/{object_id}/associations + method: GET + auth: true + docs: Returns a list of `Association` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: crm_v3.yml + path-parameters: + custom_object_class_id: string + object_id: string + request: + name: CustomObjectClassesCustomObjectsAssociationsListRequest + query-parameters: + association_type_id: + type: optional + docs: >- + If provided, will only return opportunities with this + association_type. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional> + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: crmRoot.PaginatedAssociationList + status-code: 200 + examples: + - path-parameters: + custom_object_class_id: custom_object_class_id + object_id: object_id + headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + source_object: a8f5d29f-4e50-473f-8f12-27128ffcd37a + target_object: da0b1963-be70-469c-9f8c-06a81d0fe759 + association_type: association_type + custom_object_classes_custom_objects_associations_update: + path: >- + /crm/v1/custom-object-classes/{source_class_id}/custom-objects/{source_object_id}/associations/{target_class_id}/{target_object_id}/{association_type_id} + method: PUT + auth: true + docs: >- + Creates an Association between `source_object_id` and `target_object_id` + of type `association_type_id`. + source: + openapi: crm_v3.yml + path-parameters: + association_type_id: string + source_class_id: string + source_object_id: string + target_class_id: string + target_object_id: string + request: + name: CustomObjectClassesCustomObjectsAssociationsUpdateRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + response: + docs: '' + type: crmRoot.Association + status-code: 200 + examples: + - path-parameters: + association_type_id: association_type_id + source_class_id: source_class_id + source_object_id: source_object_id + target_class_id: target_class_id + target_object_id: target_object_id + headers: {} + response: + body: + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + source_object: a8f5d29f-4e50-473f-8f12-27128ffcd37a + target_object: da0b1963-be70-469c-9f8c-06a81d0fe759 + association_type: association_type + source: + openapi: crm_v3.yml diff --git a/.mock/definition/CRM/asyncPassthrough.yml b/.mock/definition/CRM/asyncPassthrough.yml new file mode 100644 index 000000000..8010d2c58 --- /dev/null +++ b/.mock/definition/CRM/asyncPassthrough.yml @@ -0,0 +1,70 @@ +imports: + crmRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /crm/v1/async-passthrough + method: POST + auth: true + docs: >- + Asynchronously pull data from an endpoint not currently supported by + Merge. + source: + openapi: crm_v3.yml + request: + body: crmRoot.DataPassthroughRequest + content-type: application/json + response: + docs: '' + type: crmRoot.AsyncPassthroughReciept + status-code: 200 + examples: + - headers: {} + request: + method: GET + path: /scooters + response: + body: + async_passthrough_receipt_id: fd29020f-2695-445e-922e-dcd5e81903fd + retrieve: + path: /crm/v1/async-passthrough/{async_passthrough_receipt_id} + method: GET + auth: true + docs: Retrieves data from earlier async-passthrough POST request + source: + openapi: crm_v3.yml + path-parameters: + async_passthrough_receipt_id: string + response: + docs: '' + type: AsyncPassthroughRetrieveResponse + status-code: 200 + examples: + - path-parameters: + async_passthrough_receipt_id: async_passthrough_receipt_id + headers: {} + response: + body: + method: GET + path: /scooters + status: 200 + response: + key: value + response_headers: + X-Page-Token: value + response_type: JSON + headers: + EXTRA-HEADER: value + Authorization: + source: + openapi: crm_v3.yml +types: + AsyncPassthroughRetrieveResponse: + discriminated: false + union: + - crmRoot.RemoteResponse + - string + source: + openapi: crm_v3.yml diff --git a/.mock/definition/CRM/auditTrail.yml b/.mock/definition/CRM/auditTrail.yml new file mode 100644 index 000000000..5ee5ca9cf --- /dev/null +++ b/.mock/definition/CRM/auditTrail.yml @@ -0,0 +1,98 @@ +imports: + crmRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /crm/v1/audit-trail + method: GET + auth: true + docs: Gets a list of audit trail events. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: crm_v3.yml + request: + name: AuditTrailListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + end_date: + type: optional + docs: >- + If included, will only include audit trail events that occurred + before this time + event_type: + type: optional + docs: >- + 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: + type: optional + docs: Number of results to return per page. + start_date: + type: optional + docs: >- + If included, will only include audit trail events that occurred + after this time + user_email: + type: optional + docs: >- + 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. + response: + docs: '' + type: crmRoot.PaginatedAuditLogEventList + status-code: 200 + examples: + - response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: b5ceea2a-7171-47ce-8090-165cfce5572c + user_name: Gil Feig + user_email: hello@merge.dev + role: ADMIN + ip_address: 192.0.2.123 + event_type: CREATED_REMOTE_PRODUCTION_API_KEY + event_description: >- + Organization-wide Scopes for model hris.Employee updated + from Read to Read+Write + created_at: '2024-01-15T09:30:00Z' + source: + openapi: crm_v3.yml diff --git a/.mock/definition/CRM/availableActions.yml b/.mock/definition/CRM/availableActions.yml new file mode 100644 index 000000000..59a189498 --- /dev/null +++ b/.mock/definition/CRM/availableActions.yml @@ -0,0 +1,50 @@ +imports: + crmRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + retrieve: + path: /crm/v1/available-actions + method: GET + auth: true + docs: Returns a list of models and actions available for an account. + source: + openapi: crm_v3.yml + response: + docs: '' + type: crmRoot.AvailableActions + status-code: 200 + examples: + - headers: {} + response: + body: + integration: + name: name + abbreviated_name: abbreviated_name + categories: + - hris + image: image + square_image: square_image + color: color + slug: slug + api_endpoints_to_documentation_urls: + key: value + webhook_setup_guide_url: webhook_setup_guide_url + category_beta_status: + key: value + passthrough_available: true + available_model_operations: + - model_name: Candidate + available_operations: + - FETCH + - CREATE + required_post_parameters: + - remote_user_id + supported_fields: + - first_name + - last_name + - company + - title + source: + openapi: crm_v3.yml diff --git a/.mock/definition/CRM/contacts.yml b/.mock/definition/CRM/contacts.yml new file mode 100644 index 000000000..f6363295c --- /dev/null +++ b/.mock/definition/CRM/contacts.yml @@ -0,0 +1,906 @@ +types: + ContactsListRequestExpandItem: + enum: + - account + - owner + source: + openapi: crm_v3.yml + ContactsRetrieveRequestExpandItem: + enum: + - account + - owner + source: + openapi: crm_v3.yml +imports: + crmRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /crm/v1/contacts + method: GET + auth: true + docs: Returns a list of `Contact` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: crm_v3.yml + request: + name: ContactsListRequest + query-parameters: + account_id: + type: optional + docs: If provided, will only return contacts with this account. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + email_addresses: + type: optional + docs: >- + If provided, will only return contacts matching the email + addresses; multiple email_addresses can be separated by commas. + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + phone_numbers: + type: optional + docs: >- + If provided, will only return contacts matching the phone numbers; + multiple phone numbers can be separated by commas. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: crmRoot.PaginatedContactList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 550e8400-e29b-41d4-a716-446655440000 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + first_name: Gil + last_name: Feig + account: account + owner: owner + addresses: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + street_1: 50 Bowling Green Dr + street_2: Golden Gate Park + city: San Francisco + state: CA + postal_code: '94122' + country: US + address_type: Shipping + email_addresses: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + email_address: hello@merge.dev + email_address_type: Work + phone_numbers: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + phone_number: '+13785579223' + phone_number_type: Mobile + last_activity_at: '2022-02-10T00:00:00Z' + remote_created_at: '2021-11-10T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /contacts + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + create: + path: /crm/v1/contacts + method: POST + auth: true + docs: Creates a `Contact` object with the given values. + source: + openapi: crm_v3.yml + request: + name: CrmContactEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: crmRoot.ContactRequest + content-type: application/json + response: + docs: '' + type: crmRoot.CrmContactResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: 550e8400-e29b-41d4-a716-446655440000 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + first_name: Gil + last_name: Feig + account: account + owner: owner + addresses: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + street_1: 50 Bowling Green Dr + street_2: Golden Gate Park + city: San Francisco + state: CA + postal_code: '94122' + country: US + address_type: Shipping + email_addresses: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + email_address: hello@merge.dev + email_address_type: Work + phone_numbers: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + phone_number: '+13785579223' + phone_number_type: Mobile + last_activity_at: '2022-02-10T00:00:00Z' + remote_created_at: '2021-11-10T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /contacts + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /crm/v1/contacts/{id} + method: GET + auth: true + docs: Returns a `Contact` object with the given `id`. + source: + openapi: crm_v3.yml + path-parameters: + id: string + request: + name: ContactsRetrieveRequest + query-parameters: + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: crmRoot.Contact + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 550e8400-e29b-41d4-a716-446655440000 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + first_name: Gil + last_name: Feig + account: account + owner: owner + addresses: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + street_1: 50 Bowling Green Dr + street_2: Golden Gate Park + city: San Francisco + state: CA + postal_code: '94122' + country: US + address_type: Shipping + email_addresses: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + email_address: hello@merge.dev + email_address_type: Work + phone_numbers: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + phone_number: '+13785579223' + phone_number_type: Mobile + last_activity_at: '2022-02-10T00:00:00Z' + remote_created_at: '2021-11-10T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /contacts + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + value: + key: value + partialUpdate: + path: /crm/v1/contacts/{id} + method: PATCH + auth: true + docs: Updates a `Contact` object with the given `id`. + source: + openapi: crm_v3.yml + path-parameters: + id: string + request: + name: PatchedCrmContactEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: crmRoot.PatchedContactRequest + content-type: application/json + response: + docs: '' + type: crmRoot.CrmContactResponse + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + request: + model: {} + response: + body: + model: + id: 550e8400-e29b-41d4-a716-446655440000 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + first_name: Gil + last_name: Feig + account: account + owner: owner + addresses: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + street_1: 50 Bowling Green Dr + street_2: Golden Gate Park + city: San Francisco + state: CA + postal_code: '94122' + country: US + address_type: Shipping + email_addresses: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + email_address: hello@merge.dev + email_address_type: Work + phone_numbers: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + phone_number: '+13785579223' + phone_number_type: Mobile + last_activity_at: '2022-02-10T00:00:00Z' + remote_created_at: '2021-11-10T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /contacts + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + ignoreCreate: + path: /crm/v1/contacts/ignore/{model_id} + method: POST + auth: true + docs: >- + 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. + source: + openapi: crm_v3.yml + path-parameters: + model_id: string + request: + body: crmRoot.IgnoreCommonModelRequest + content-type: application/json + examples: + - path-parameters: + model_id: model_id + headers: {} + request: + reason: GENERAL_CUSTOMER_REQUEST + metaPatchRetrieve: + path: /crm/v1/contacts/meta/patch/{id} + method: GET + auth: true + docs: Returns metadata for `CRMContact` PATCHs. + source: + openapi: crm_v3.yml + path-parameters: + id: string + response: + docs: '' + type: crmRoot.MetaResponse + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + metaPostRetrieve: + path: /crm/v1/contacts/meta/post + method: GET + auth: true + docs: Returns metadata for `CRMContact` POSTs. + source: + openapi: crm_v3.yml + response: + docs: '' + type: crmRoot.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + remoteFieldClassesList: + path: /crm/v1/contacts/remote-field-classes + method: GET + auth: true + docs: Returns a list of `RemoteFieldClass` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: crm_v3.yml + request: + name: ContactsRemoteFieldClassesListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_common_model_field: + type: optional + docs: >- + If provided, will only return remote field classes with this + is_common_model_field value + is_custom: + type: optional + docs: >- + If provided, will only return remote fields classes with this + is_custom value + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: crmRoot.PaginatedRemoteFieldClassList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: id + display_name: display_name + remote_key_name: remote_key_name + description: description + is_custom: true + is_required: true + field_type: string + field_format: string + field_choices: + - {} + source: + openapi: crm_v3.yml diff --git a/.mock/definition/CRM/customObjectClasses.yml b/.mock/definition/CRM/customObjectClasses.yml new file mode 100644 index 000000000..77c19f6c6 --- /dev/null +++ b/.mock/definition/CRM/customObjectClasses.yml @@ -0,0 +1,202 @@ +imports: + crmRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /crm/v1/custom-object-classes + method: GET + auth: true + docs: Returns a list of `CustomObjectClass` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: crm_v3.yml + request: + name: CustomObjectClassesListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional> + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: crmRoot.PaginatedCustomObjectClassList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: ff1ff4cb-a66b-47dc-8e2a-50388049e602 + remote_id: '9579977' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: order + description: Order object + labels: + singular: Order + plural: Orders + fields: + - display_name: Order ID + remote_key_name: order_id + description: The unique ID for the order. + is_required: true + field_type: string + field_format: string + field_choices: + - {} + - display_name: Order Quantity + remote_key_name: order_quantity + description: The number of items ordered. + is_required: true + field_type: number + field_format: number + field_choices: + - {} + - display_name: Customer Type + remote_key_name: customer_type + description: The type of customer. + is_required: true + field_type: string + field_format: enumeration + field_choices: + - {} + - {} + association_types: + - key: value + retrieve: + path: /crm/v1/custom-object-classes/{id} + method: GET + auth: true + docs: Returns a `CustomObjectClass` object with the given `id`. + source: + openapi: crm_v3.yml + path-parameters: + id: string + request: + name: CustomObjectClassesRetrieveRequest + query-parameters: + expand: + type: optional> + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: crmRoot.CustomObjectClass + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: ff1ff4cb-a66b-47dc-8e2a-50388049e602 + remote_id: '9579977' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: order + description: Order object + labels: + singular: Order + plural: Orders + fields: + - created_at: '2024-01-15T09:30:00Z' + modified_at: '2024-01-15T09:30:00Z' + display_name: Order ID + remote_key_name: order_id + description: The unique ID for the order. + is_required: true + field_type: string + field_format: string + field_choices: + - {} + - created_at: '2024-01-15T09:30:00Z' + modified_at: '2024-01-15T09:30:00Z' + display_name: Order Quantity + remote_key_name: order_quantity + description: The number of items ordered. + is_required: true + field_type: number + field_format: number + field_choices: + - {} + - created_at: '2024-01-15T09:30:00Z' + modified_at: '2024-01-15T09:30:00Z' + display_name: Customer Type + remote_key_name: customer_type + description: The type of customer. + is_required: true + field_type: string + field_format: enumeration + field_choices: + - {} + - {} + association_types: + - key: value + source: + openapi: crm_v3.yml diff --git a/.mock/definition/CRM/customObjects.yml b/.mock/definition/CRM/customObjects.yml new file mode 100644 index 000000000..3c0b6e2c2 --- /dev/null +++ b/.mock/definition/CRM/customObjects.yml @@ -0,0 +1,484 @@ +imports: + crmRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + custom_object_classes_custom_objects_list: + path: /crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects + method: GET + auth: true + docs: Returns a list of `CustomObject` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: crm_v3.yml + path-parameters: + custom_object_class_id: string + request: + name: CustomObjectClassesCustomObjectsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: crmRoot.PaginatedCustomObjectList + status-code: 200 + examples: + - path-parameters: + custom_object_class_id: custom_object_class_id + headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: da0b1963-be70-469c-9f8c-06a81d0fe759 + remote_id: '4183634295' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + object_class: ff1ff4cb-a66b-47dc-8e2a-50388049e602 + fields: + order_id: '4183634295' + order_quantity: 50 + customer_type: Returning + remote_fields: + - remote_field_class: remote_field_class + custom_object_classes_custom_objects_create: + path: /crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects + method: POST + auth: true + docs: Creates a `CustomObject` object with the given values. + source: + openapi: crm_v3.yml + path-parameters: + custom_object_class_id: string + request: + name: CrmCustomObjectEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: crmRoot.CustomObjectRequest + content-type: application/json + response: + docs: '' + type: crmRoot.CrmCustomObjectResponse + status-code: 201 + examples: + - path-parameters: + custom_object_class_id: custom_object_class_id + headers: {} + request: + model: + fields: + test_field: hello + response: + body: + model: + id: da0b1963-be70-469c-9f8c-06a81d0fe759 + remote_id: '4183634295' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + object_class: ff1ff4cb-a66b-47dc-8e2a-50388049e602 + fields: + order_id: '4183634295' + order_quantity: 50 + customer_type: Returning + remote_fields: + - remote_field_class: remote_field_class + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + custom_object_classes_custom_objects_retrieve: + path: >- + /crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects/{id} + method: GET + auth: true + docs: Returns a `CustomObject` object with the given `id`. + source: + openapi: crm_v3.yml + path-parameters: + custom_object_class_id: string + id: string + request: + name: CustomObjectClassesCustomObjectsRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: crmRoot.CustomObject + status-code: 200 + examples: + - path-parameters: + custom_object_class_id: custom_object_class_id + id: id + headers: {} + response: + body: + id: da0b1963-be70-469c-9f8c-06a81d0fe759 + remote_id: '4183634295' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + object_class: ff1ff4cb-a66b-47dc-8e2a-50388049e602 + fields: + order_id: '4183634295' + order_quantity: 50 + customer_type: Returning + remote_fields: + - remote_field_class: remote_field_class + value: + key: value + custom_object_classes_custom_objects_meta_post_retrieve: + path: >- + /crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects/meta/post + method: GET + auth: true + docs: Returns metadata for `CRMCustomObject` POSTs. + source: + openapi: crm_v3.yml + path-parameters: + custom_object_class_id: string + response: + docs: '' + type: crmRoot.MetaResponse + status-code: 200 + examples: + - path-parameters: + custom_object_class_id: custom_object_class_id + headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + custom_object_classes_custom_objects_remote_field_classes_list: + path: /crm/v1/custom-object-classes/custom-objects/remote-field-classes + method: GET + auth: true + docs: Returns a list of `RemoteFieldClass` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: crm_v3.yml + request: + name: CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_common_model_field: + type: optional + docs: >- + If provided, will only return remote field classes with this + is_common_model_field value + is_custom: + type: optional + docs: >- + If provided, will only return remote fields classes with this + is_custom value + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: crmRoot.PaginatedRemoteFieldClassList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: id + display_name: display_name + remote_key_name: remote_key_name + description: description + is_custom: true + is_required: true + field_type: string + field_format: string + field_choices: + - {} + source: + openapi: crm_v3.yml diff --git a/.mock/definition/CRM/deleteAccount.yml b/.mock/definition/CRM/deleteAccount.yml new file mode 100644 index 000000000..5379d1558 --- /dev/null +++ b/.mock/definition/CRM/deleteAccount.yml @@ -0,0 +1,15 @@ +service: + auth: false + base-path: '' + endpoints: + delete: + path: /crm/v1/delete-account + method: POST + auth: true + docs: Delete a linked account. + source: + openapi: crm_v3.yml + examples: + - headers: {} + source: + openapi: crm_v3.yml diff --git a/.mock/definition/CRM/engagementTypes.yml b/.mock/definition/CRM/engagementTypes.yml new file mode 100644 index 000000000..99d1d5bb0 --- /dev/null +++ b/.mock/definition/CRM/engagementTypes.yml @@ -0,0 +1,212 @@ +imports: + crmRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /crm/v1/engagement-types + method: GET + auth: true + docs: Returns a list of `EngagementType` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: crm_v3.yml + request: + name: EngagementTypesListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: crmRoot.PaginatedEngagementTypeList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 550e8400-e29b-41d4-a716-446655440000 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + activity_type: CALL + name: First Call + remote_fields: + - remote_field_class: remote_field_class + retrieve: + path: /crm/v1/engagement-types/{id} + method: GET + auth: true + docs: Returns an `EngagementType` object with the given `id`. + source: + openapi: crm_v3.yml + path-parameters: + id: string + request: + name: EngagementTypesRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: crmRoot.EngagementType + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 550e8400-e29b-41d4-a716-446655440000 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + activity_type: CALL + name: First Call + remote_fields: + - remote_field_class: remote_field_class + value: + key: value + remoteFieldClassesList: + path: /crm/v1/engagement-types/remote-field-classes + method: GET + auth: true + docs: Returns a list of `RemoteFieldClass` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: crm_v3.yml + request: + name: EngagementTypesRemoteFieldClassesListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_common_model_field: + type: optional + docs: >- + If provided, will only return remote field classes with this + is_common_model_field value + is_custom: + type: optional + docs: >- + If provided, will only return remote fields classes with this + is_custom value + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: crmRoot.PaginatedRemoteFieldClassList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: id + display_name: display_name + remote_key_name: remote_key_name + description: description + is_custom: true + is_required: true + field_type: string + field_format: string + field_choices: + - {} + source: + openapi: crm_v3.yml diff --git a/.mock/definition/CRM/engagements.yml b/.mock/definition/CRM/engagements.yml new file mode 100644 index 000000000..89883db04 --- /dev/null +++ b/.mock/definition/CRM/engagements.yml @@ -0,0 +1,821 @@ +types: + EngagementsListRequestExpandItem: + enum: + - account + - contacts + - engagement_type + - owner + source: + openapi: crm_v3.yml + EngagementsRetrieveRequestExpandItem: + enum: + - account + - contacts + - engagement_type + - owner + source: + openapi: crm_v3.yml +imports: + crmRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /crm/v1/engagements + method: GET + auth: true + docs: Returns a list of `Engagement` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: crm_v3.yml + request: + name: EngagementsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + started_after: + type: optional + docs: >- + If provided, will only return engagements started after this + datetime. + started_before: + type: optional + docs: >- + If provided, will only return engagements started before this + datetime. + response: + docs: '' + type: crmRoot.PaginatedEngagementList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 550e8400-e29b-41d4-a716-446655440000 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + owner: owner + content: Call for negotiation + subject: Call from customer + direction: INBOUND + engagement_type: engagement_type + start_time: '2022-02-10T00:00:00Z' + end_time: '2022-02-10T00:05:00Z' + account: account + contacts: + - a7c55bc6-2940-c80a-848e-bbfacbfdf4fg + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /engagements + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + create: + path: /crm/v1/engagements + method: POST + auth: true + docs: Creates an `Engagement` object with the given values. + source: + openapi: crm_v3.yml + request: + name: EngagementEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: crmRoot.EngagementRequest + content-type: application/json + response: + docs: '' + type: crmRoot.EngagementResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: 550e8400-e29b-41d4-a716-446655440000 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + owner: owner + content: Call for negotiation + subject: Call from customer + direction: INBOUND + engagement_type: engagement_type + start_time: '2022-02-10T00:00:00Z' + end_time: '2022-02-10T00:05:00Z' + account: account + contacts: + - a7c55bc6-2940-c80a-848e-bbfacbfdf4fg + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /engagements + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /crm/v1/engagements/{id} + method: GET + auth: true + docs: Returns an `Engagement` object with the given `id`. + source: + openapi: crm_v3.yml + path-parameters: + id: string + request: + name: EngagementsRetrieveRequest + query-parameters: + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: crmRoot.Engagement + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 550e8400-e29b-41d4-a716-446655440000 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + owner: owner + content: Call for negotiation + subject: Call from customer + direction: INBOUND + engagement_type: engagement_type + start_time: '2022-02-10T00:00:00Z' + end_time: '2022-02-10T00:05:00Z' + account: account + contacts: + - a7c55bc6-2940-c80a-848e-bbfacbfdf4fg + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /engagements + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + value: + key: value + partialUpdate: + path: /crm/v1/engagements/{id} + method: PATCH + auth: true + docs: Updates an `Engagement` object with the given `id`. + source: + openapi: crm_v3.yml + path-parameters: + id: string + request: + name: PatchedEngagementEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: crmRoot.PatchedEngagementRequest + content-type: application/json + response: + docs: '' + type: crmRoot.EngagementResponse + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + request: + model: {} + response: + body: + model: + id: 550e8400-e29b-41d4-a716-446655440000 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + owner: owner + content: Call for negotiation + subject: Call from customer + direction: INBOUND + engagement_type: engagement_type + start_time: '2022-02-10T00:00:00Z' + end_time: '2022-02-10T00:05:00Z' + account: account + contacts: + - a7c55bc6-2940-c80a-848e-bbfacbfdf4fg + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /engagements + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + metaPatchRetrieve: + path: /crm/v1/engagements/meta/patch/{id} + method: GET + auth: true + docs: Returns metadata for `Engagement` PATCHs. + source: + openapi: crm_v3.yml + path-parameters: + id: string + response: + docs: '' + type: crmRoot.MetaResponse + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + metaPostRetrieve: + path: /crm/v1/engagements/meta/post + method: GET + auth: true + docs: Returns metadata for `Engagement` POSTs. + source: + openapi: crm_v3.yml + response: + docs: '' + type: crmRoot.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + remoteFieldClassesList: + path: /crm/v1/engagements/remote-field-classes + method: GET + auth: true + docs: Returns a list of `RemoteFieldClass` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: crm_v3.yml + request: + name: EngagementsRemoteFieldClassesListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_common_model_field: + type: optional + docs: >- + If provided, will only return remote field classes with this + is_common_model_field value + is_custom: + type: optional + docs: >- + If provided, will only return remote fields classes with this + is_custom value + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: crmRoot.PaginatedRemoteFieldClassList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: id + display_name: display_name + remote_key_name: remote_key_name + description: description + is_custom: true + is_required: true + field_type: string + field_format: string + field_choices: + - {} + source: + openapi: crm_v3.yml diff --git a/.mock/definition/CRM/fieldMapping.yml b/.mock/definition/CRM/fieldMapping.yml new file mode 100644 index 000000000..421def33f --- /dev/null +++ b/.mock/definition/CRM/fieldMapping.yml @@ -0,0 +1,654 @@ +imports: + crmRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + field_mappings_retrieve: + path: /crm/v1/field-mappings + method: GET + auth: true + docs: >- + 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/). + source: + openapi: crm_v3.yml + request: + name: FieldMappingsRetrieveRequest + query-parameters: + exclude_remote_field_metadata: + type: optional + docs: >- + 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. + response: + docs: '' + type: crmRoot.FieldMappingApiInstanceResponse + status-code: 200 + examples: + - headers: {} + response: + body: + Account: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Contact: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Lead: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Note: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Opportunity: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Stage: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + User: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Task: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Engagement: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + field_mappings_create: + path: /crm/v1/field-mappings + method: POST + auth: true + docs: >- + 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. + source: + openapi: crm_v3.yml + request: + name: CreateFieldMappingRequest + query-parameters: + exclude_remote_field_metadata: + type: optional + docs: >- + 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. + body: + properties: + target_field_name: + type: string + docs: >- + The name of the target field you want this remote field to map + to. + validation: + minLength: 1 + target_field_description: + type: string + docs: >- + The description of the target field you want this remote field + to map to. + validation: + minLength: 1 + remote_field_traversal_path: + docs: >- + The field traversal path of the remote field listed when you hit + the GET /remote-fields endpoint. + type: list + remote_method: + type: string + docs: >- + The method of the remote endpoint where the remote field is + coming from. + validation: + minLength: 1 + remote_url_path: + type: string + docs: >- + The path of the remote endpoint where the remote field is coming + from. + validation: + minLength: 1 + common_model_name: + type: string + docs: >- + The name of the Common Model that the remote field corresponds + to in a given category. + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: crmRoot.FieldMappingInstanceResponse + status-code: 201 + examples: + - headers: {} + request: + 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 + response: + body: + model: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + field_mappings_destroy: + path: /crm/v1/field-mappings/{field_mapping_id} + method: DELETE + auth: true + docs: >- + 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. + source: + openapi: crm_v3.yml + path-parameters: + field_mapping_id: string + response: + docs: '' + type: crmRoot.FieldMappingInstanceResponse + status-code: 204 + examples: + - path-parameters: + field_mapping_id: field_mapping_id + headers: {} + response: + body: + model: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + field_mappings_partial_update: + path: /crm/v1/field-mappings/{field_mapping_id} + method: PATCH + auth: true + docs: >- + 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. + source: + openapi: crm_v3.yml + path-parameters: + field_mapping_id: string + request: + name: PatchedEditFieldMappingRequest + body: + properties: + remote_field_traversal_path: + type: optional> + docs: >- + The field traversal path of the remote field listed when you hit + the GET /remote-fields endpoint. + remote_method: + type: optional + docs: >- + The method of the remote endpoint where the remote field is + coming from. + validation: + minLength: 1 + remote_url_path: + type: optional + docs: >- + The path of the remote endpoint where the remote field is coming + from. + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: crmRoot.FieldMappingInstanceResponse + status-code: 200 + examples: + - path-parameters: + field_mapping_id: field_mapping_id + headers: {} + request: {} + response: + body: + model: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + remote_fields_retrieve: + path: /crm/v1/remote-fields + method: GET + auth: true + docs: >- + 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/). + source: + openapi: crm_v3.yml + request: + name: RemoteFieldsRetrieveRequest + query-parameters: + common_models: + type: optional + docs: >- + A comma seperated list of Common Model names. If included, will + only return Remote Fields for those Common Models. + include_example_values: + type: optional + docs: >- + 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. + response: + docs: '' + type: crmRoot.RemoteFieldApiResponse + status-code: 200 + examples: + - headers: {} + response: + body: + Account: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Contact: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Lead: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Note: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Opportunity: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Stage: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + User: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Task: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Engagement: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + target_fields_retrieve: + path: /crm/v1/target-fields + method: GET + auth: true + docs: >- + 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/). + source: + openapi: crm_v3.yml + response: + docs: '' + type: crmRoot.ExternalTargetFieldApiResponse + status-code: 200 + examples: + - headers: {} + response: + body: + Account: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Contact: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Lead: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Note: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Opportunity: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Stage: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + User: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Task: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Engagement: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + source: + openapi: crm_v3.yml diff --git a/.mock/definition/CRM/forceResync.yml b/.mock/definition/CRM/forceResync.yml new file mode 100644 index 000000000..94fc4a6d1 --- /dev/null +++ b/.mock/definition/CRM/forceResync.yml @@ -0,0 +1,37 @@ +imports: + crmRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + sync_status_resync_create: + path: /crm/v1/sync-status/resync + method: POST + auth: true + docs: >- + 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. + source: + openapi: crm_v3.yml + response: + docs: '' + type: list + status-code: 200 + examples: + - headers: {} + response: + body: + - model_name: Account + model_id: crm.Account + last_sync_start: '2021-03-30T19:44:18Z' + next_sync_start: '2021-03-30T20:44:18Z' + last_sync_result: SYNCING + last_sync_finished: '2021-03-30T19:55:18Z' + status: SYNCING + is_initial_sync: true + selective_sync_configurations_usage: IN_NEXT_SYNC + source: + openapi: crm_v3.yml diff --git a/.mock/definition/CRM/generateKey.yml b/.mock/definition/CRM/generateKey.yml new file mode 100644 index 000000000..823c5e736 --- /dev/null +++ b/.mock/definition/CRM/generateKey.yml @@ -0,0 +1,36 @@ +imports: + crmRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /crm/v1/generate-key + method: POST + auth: true + docs: Create a remote key. + source: + openapi: crm_v3.yml + request: + name: GenerateRemoteKeyRequest + body: + properties: + name: + type: string + docs: The name of the remote key + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: crmRoot.RemoteKey + status-code: 200 + examples: + - request: + name: Remote Deployment Key 1 + response: + body: + name: Remote Deployment Key 1 + key: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA + source: + openapi: crm_v3.yml diff --git a/.mock/definition/CRM/issues.yml b/.mock/definition/CRM/issues.yml new file mode 100644 index 000000000..1fb03f475 --- /dev/null +++ b/.mock/definition/CRM/issues.yml @@ -0,0 +1,133 @@ +types: + IssuesListRequestStatus: + enum: + - ONGOING + - RESOLVED + source: + openapi: crm_v3.yml +imports: + crmRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /crm/v1/issues + method: GET + auth: true + docs: Gets all issues for Organization. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: crm_v3.yml + request: + name: IssuesListRequest + query-parameters: + account_token: optional + cursor: + type: optional + docs: The pagination cursor value. + end_date: + type: optional + docs: >- + If included, will only include issues whose most recent action + occurred before this time + end_user_organization_name: optional + first_incident_time_after: + type: optional + docs: >- + If provided, will only return issues whose first incident time was + after this datetime. + first_incident_time_before: + type: optional + docs: >- + If provided, will only return issues whose first incident time was + before this datetime. + include_muted: + type: optional + docs: If true, will include muted issues + integration_name: optional + last_incident_time_after: + type: optional + docs: >- + If provided, will only return issues whose last incident time was + after this datetime. + last_incident_time_before: + type: optional + docs: >- + If provided, will only return issues whose last incident time was + before this datetime. + linked_account_id: + type: optional + docs: >- + If provided, will only include issues pertaining to the linked + account passed in. + page_size: + type: optional + docs: Number of results to return per page. + start_date: + type: optional + docs: >- + If included, will only include issues whose most recent action + occurred after this time + status: + type: optional + docs: |- + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + response: + docs: '' + type: crmRoot.PaginatedIssueList + status-code: 200 + examples: + - response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + status: ONGOING + error_description: Missing Permissions + end_user: + key: value + first_incident_time: '2022-12-05T16:19:15Z' + last_incident_time: '2022-12-05T16:19:15Z' + is_muted: true + error_details: + - Missing employee permissions. + - Missing time off permissions. + retrieve: + path: /crm/v1/issues/{id} + method: GET + auth: true + docs: Get a specific issue. + source: + openapi: crm_v3.yml + path-parameters: + id: string + response: + docs: '' + type: crmRoot.Issue + status-code: 200 + examples: + - path-parameters: + id: id + response: + body: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + status: ONGOING + error_description: Missing Permissions + end_user: + key: value + first_incident_time: '2022-12-05T16:19:15Z' + last_incident_time: '2022-12-05T16:19:15Z' + is_muted: true + error_details: + - Missing employee permissions. + - Missing time off permissions. + source: + openapi: crm_v3.yml diff --git a/.mock/definition/CRM/leads.yml b/.mock/definition/CRM/leads.yml new file mode 100644 index 000000000..24d2df661 --- /dev/null +++ b/.mock/definition/CRM/leads.yml @@ -0,0 +1,620 @@ +types: + LeadsListRequestExpandItem: + enum: + - converted_account + - converted_contact + - owner + source: + openapi: crm_v3.yml + LeadsRetrieveRequestExpandItem: + enum: + - converted_account + - converted_contact + - owner + source: + openapi: crm_v3.yml +imports: + crmRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /crm/v1/leads + method: GET + auth: true + docs: Returns a list of `Lead` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: crm_v3.yml + request: + name: LeadsListRequest + query-parameters: + converted_account_id: + type: optional + docs: If provided, will only return leads with this account. + converted_contact_id: + type: optional + docs: If provided, will only return leads with this contact. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + email_addresses: + type: optional + docs: >- + If provided, will only return contacts matching the email + addresses; multiple email_addresses can be separated by commas. + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + owner_id: + type: optional + docs: If provided, will only return leads with this owner. + page_size: + type: optional + docs: Number of results to return per page. + phone_numbers: + type: optional + docs: >- + If provided, will only return contacts matching the phone numbers; + multiple phone numbers can be separated by commas. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: crmRoot.PaginatedLeadList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 550e8400-e29b-41d4-a716-446655440000 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + owner: owner + lead_source: API Blogger + title: Co-Founder + company: Merge API + first_name: Gil + last_name: Feig + addresses: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + street_1: 50 Bowling Green Dr + street_2: Golden Gate Park + city: San Francisco + state: CA + postal_code: '94122' + country: US + address_type: Shipping + email_addresses: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + email_address: hello@merge.dev + email_address_type: Work + phone_numbers: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + phone_number: '+16789932455' + phone_number_type: Mobile + remote_updated_at: '2022-02-10T00:00:00Z' + remote_created_at: '2021-11-10T00:00:00Z' + converted_date: '2022-03-10T00:00:00Z' + converted_contact: converted_contact + converted_account: converted_account + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /leads + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + create: + path: /crm/v1/leads + method: POST + auth: true + docs: Creates a `Lead` object with the given values. + source: + openapi: crm_v3.yml + request: + name: LeadEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: crmRoot.LeadRequest + content-type: application/json + response: + docs: '' + type: crmRoot.LeadResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: 550e8400-e29b-41d4-a716-446655440000 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + owner: owner + lead_source: API Blogger + title: Co-Founder + company: Merge API + first_name: Gil + last_name: Feig + addresses: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + street_1: 50 Bowling Green Dr + street_2: Golden Gate Park + city: San Francisco + state: CA + postal_code: '94122' + country: US + address_type: Shipping + email_addresses: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + email_address: hello@merge.dev + email_address_type: Work + phone_numbers: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + phone_number: '+16789932455' + phone_number_type: Mobile + remote_updated_at: '2022-02-10T00:00:00Z' + remote_created_at: '2021-11-10T00:00:00Z' + converted_date: '2022-03-10T00:00:00Z' + converted_contact: converted_contact + converted_account: converted_account + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /leads + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /crm/v1/leads/{id} + method: GET + auth: true + docs: Returns a `Lead` object with the given `id`. + source: + openapi: crm_v3.yml + path-parameters: + id: string + request: + name: LeadsRetrieveRequest + query-parameters: + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: crmRoot.Lead + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 550e8400-e29b-41d4-a716-446655440000 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + owner: owner + lead_source: API Blogger + title: Co-Founder + company: Merge API + first_name: Gil + last_name: Feig + addresses: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + street_1: 50 Bowling Green Dr + street_2: Golden Gate Park + city: San Francisco + state: CA + postal_code: '94122' + country: US + address_type: Shipping + email_addresses: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + email_address: hello@merge.dev + email_address_type: Work + phone_numbers: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + phone_number: '+16789932455' + phone_number_type: Mobile + remote_updated_at: '2022-02-10T00:00:00Z' + remote_created_at: '2021-11-10T00:00:00Z' + converted_date: '2022-03-10T00:00:00Z' + converted_contact: converted_contact + converted_account: converted_account + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /leads + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + value: + key: value + metaPostRetrieve: + path: /crm/v1/leads/meta/post + method: GET + auth: true + docs: Returns metadata for `Lead` POSTs. + source: + openapi: crm_v3.yml + response: + docs: '' + type: crmRoot.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + remoteFieldClassesList: + path: /crm/v1/leads/remote-field-classes + method: GET + auth: true + docs: Returns a list of `RemoteFieldClass` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: crm_v3.yml + request: + name: LeadsRemoteFieldClassesListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_common_model_field: + type: optional + docs: >- + If provided, will only return remote field classes with this + is_common_model_field value + is_custom: + type: optional + docs: >- + If provided, will only return remote fields classes with this + is_custom value + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: crmRoot.PaginatedRemoteFieldClassList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: id + display_name: display_name + remote_key_name: remote_key_name + description: description + is_custom: true + is_required: true + field_type: string + field_format: string + field_choices: + - {} + source: + openapi: crm_v3.yml diff --git a/.mock/definition/CRM/linkToken.yml b/.mock/definition/CRM/linkToken.yml new file mode 100644 index 000000000..7e4b0bdb4 --- /dev/null +++ b/.mock/definition/CRM/linkToken.yml @@ -0,0 +1,152 @@ +imports: + crmRoot: __package__.yml +types: + EndUserDetailsRequestLanguage: + discriminated: false + docs: >- + The following subset of IETF language tags can be used to configure + localization. + + + * `en` - en + + * `de` - de + union: + - crmRoot.LanguageEnum + - string + source: + openapi: crm_v3.yml + inline: true +service: + auth: false + base-path: '' + endpoints: + create: + path: /crm/v1/link-token + method: POST + auth: true + docs: Creates a link token to be used when linking a new end user. + source: + openapi: crm_v3.yml + request: + name: EndUserDetailsRequest + body: + properties: + end_user_email_address: + type: string + docs: >- + Your end user's email address. This is purely for identification + purposes - setting this value will not cause any emails to be + sent. + validation: + minLength: 1 + maxLength: 100 + end_user_organization_name: + type: string + docs: Your end user's organization. + validation: + minLength: 1 + maxLength: 100 + end_user_origin_id: + type: string + docs: >- + 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. + validation: + minLength: 1 + maxLength: 100 + categories: + docs: The integration categories to show in Merge Link. + type: list + integration: + type: optional + docs: >- + 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/. + validation: + minLength: 1 + link_expiry_mins: + type: optional + docs: >- + 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. + default: 30 + validation: + min: 30 + max: 10080 + should_create_magic_link_url: + type: optional + docs: >- + 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. + default: false + hide_admin_magic_link: + type: optional + docs: >- + 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. + default: false + common_models: + type: optional> + docs: >- + An array of objects to specify the models and fields that will + be disabled for a given Linked Account. Each object uses + model_id, enabled_actions, and disabled_fields to specify the + model, method, and fields that are scoped for a given Linked + Account. + category_common_model_scopes: + type: >- + optional>>> + docs: >- + When creating a Link Token, you can set permissions for Common + Models that will apply to the account that is going to be + linked. Any model or field not specified in link token payload + will default to existing settings. + language: + type: optional + docs: >- + The following subset of IETF language tags can be used to + configure localization. + + + * `en` - en + + * `de` - de + are_syncs_disabled: + type: optional + docs: >- + The boolean that indicates whether initial, periodic, and force + syncs will be disabled. + default: false + integration_specific_config: + type: optional> + docs: >- + A JSON object containing integration-specific configuration + options. + content-type: application/json + response: + docs: '' + type: crmRoot.LinkToken + status-code: 200 + examples: + - request: + end_user_email_address: example@gmail.com + end_user_organization_name: Test Organization + end_user_origin_id: '12345' + categories: + - hris + - ats + response: + body: + link_token: necdP7FtdASl1fQwm62be2_dM4wBG8_GactqoUV0 + integration_name: Lever + magic_link_url: https://link.merge.dev/asdfjkl12345jsndfgi2i83n + source: + openapi: crm_v3.yml diff --git a/.mock/definition/CRM/linkedAccounts.yml b/.mock/definition/CRM/linkedAccounts.yml new file mode 100644 index 000000000..420c18d6e --- /dev/null +++ b/.mock/definition/CRM/linkedAccounts.yml @@ -0,0 +1,152 @@ +types: + LinkedAccountsListRequestCategory: + enum: + - accounting + - ats + - crm + - filestorage + - hris + - mktg + - ticketing + source: + openapi: crm_v3.yml +imports: + crmRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /crm/v1/linked-accounts + method: GET + auth: true + docs: List linked accounts for your organization. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: crm_v3.yml + request: + name: LinkedAccountsListRequest + query-parameters: + category: + type: optional + docs: >- + Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, + `mktg`, `ticketing` + + + * `hris` - hris + + * `ats` - ats + + * `accounting` - accounting + + * `ticketing` - ticketing + + * `crm` - crm + + * `mktg` - mktg + + * `filestorage` - filestorage + cursor: + type: optional + docs: The pagination cursor value. + end_user_email_address: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given email address. + end_user_organization_name: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given organization name. + end_user_origin_id: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given origin ID. + end_user_origin_ids: + type: optional + docs: >- + Comma-separated list of EndUser origin IDs, making it possible to + specify multiple EndUsers at once. + id: + type: optional + validation: + format: uuid + ids: + type: optional + docs: >- + Comma-separated list of LinkedAccount IDs, making it possible to + specify multiple LinkedAccounts at once. + include_duplicates: + type: optional + docs: >- + 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: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given integration name. + is_test_account: + type: optional + docs: >- + If included, will only include test linked accounts. If not + included, will only include non-test linked accounts. + page_size: + type: optional + docs: Number of results to return per page. + status: + type: optional + docs: >- + Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, + `RELINK_NEEDED` + response: + docs: '' + type: crmRoot.PaginatedAccountDetailsAndActionsList + status-code: 200 + examples: + - response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: e59b1821-f85c-4e28-a6b3-1804156f3563 + category: hris + status: COMPLETE + status_detail: Invalid login credentials + end_user_origin_id: 3ac95cde-6c7f-4eef-afec-be710b42308d + end_user_organization_name: Foo Bar, LLC + end_user_email_address: hradmin@foobar.dev + subdomain: foobar + webhook_listener_url: >- + https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 + is_duplicate: true + integration: + name: name + categories: + - hris + color: color + slug: slug + passthrough_available: true + available_model_operations: + - model_name: Candidate + available_operations: + - FETCH + - CREATE + required_post_parameters: + - remote_user_id + supported_fields: + - first_name + - last_name + - company + - title + account_type: PRODUCTION + completed_at: '2024-08-26T20:11:19Z' + source: + openapi: crm_v3.yml diff --git a/.mock/definition/CRM/notes.yml b/.mock/definition/CRM/notes.yml new file mode 100644 index 000000000..67805b2d8 --- /dev/null +++ b/.mock/definition/CRM/notes.yml @@ -0,0 +1,543 @@ +types: + NotesListRequestExpandItem: + enum: + - account + - contact + - opportunity + - owner + source: + openapi: crm_v3.yml + NotesRetrieveRequestExpandItem: + enum: + - account + - contact + - opportunity + - owner + source: + openapi: crm_v3.yml +imports: + crmRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /crm/v1/notes + method: GET + auth: true + docs: Returns a list of `Note` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: crm_v3.yml + request: + name: NotesListRequest + query-parameters: + account_id: + type: optional + docs: If provided, will only return notes with this account. + contact_id: + type: optional + docs: If provided, will only return notes with this contact. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + opportunity_id: + type: optional + docs: If provided, will only return notes with this opportunity. + owner_id: + type: optional + docs: If provided, will only return notes with this owner. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: crmRoot.PaginatedNoteList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 550e8400-e29b-41d4-a716-446655440000 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + owner: owner + content: Merge is hiring! + contact: contact + account: account + opportunity: opportunity + remote_updated_at: '2022-02-10T00:00:00Z' + remote_created_at: '2021-11-10T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /notes + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + create: + path: /crm/v1/notes + method: POST + auth: true + docs: Creates a `Note` object with the given values. + source: + openapi: crm_v3.yml + request: + name: NoteEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: crmRoot.NoteRequest + content-type: application/json + response: + docs: '' + type: crmRoot.NoteResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: 550e8400-e29b-41d4-a716-446655440000 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + owner: owner + content: Merge is hiring! + contact: contact + account: account + opportunity: opportunity + remote_updated_at: '2022-02-10T00:00:00Z' + remote_created_at: '2021-11-10T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /notes + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /crm/v1/notes/{id} + method: GET + auth: true + docs: Returns a `Note` object with the given `id`. + source: + openapi: crm_v3.yml + path-parameters: + id: string + request: + name: NotesRetrieveRequest + query-parameters: + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: crmRoot.Note + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 550e8400-e29b-41d4-a716-446655440000 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + owner: owner + content: Merge is hiring! + contact: contact + account: account + opportunity: opportunity + remote_updated_at: '2022-02-10T00:00:00Z' + remote_created_at: '2021-11-10T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /notes + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + value: + key: value + metaPostRetrieve: + path: /crm/v1/notes/meta/post + method: GET + auth: true + docs: Returns metadata for `Note` POSTs. + source: + openapi: crm_v3.yml + response: + docs: '' + type: crmRoot.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + remoteFieldClassesList: + path: /crm/v1/notes/remote-field-classes + method: GET + auth: true + docs: Returns a list of `RemoteFieldClass` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: crm_v3.yml + request: + name: NotesRemoteFieldClassesListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_common_model_field: + type: optional + docs: >- + If provided, will only return remote field classes with this + is_common_model_field value + is_custom: + type: optional + docs: >- + If provided, will only return remote fields classes with this + is_custom value + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: crmRoot.PaginatedRemoteFieldClassList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: id + display_name: display_name + remote_key_name: remote_key_name + description: description + is_custom: true + is_required: true + field_type: string + field_format: string + field_choices: + - {} + source: + openapi: crm_v3.yml diff --git a/.mock/definition/CRM/opportunities.yml b/.mock/definition/CRM/opportunities.yml new file mode 100644 index 000000000..f4816c11f --- /dev/null +++ b/.mock/definition/CRM/opportunities.yml @@ -0,0 +1,862 @@ +types: + OpportunitiesListRequestExpandItem: + enum: + - account + - owner + - stage + source: + openapi: crm_v3.yml + OpportunitiesListRequestStatus: + enum: + - LOST + - OPEN + - WON + source: + openapi: crm_v3.yml + OpportunitiesRetrieveRequestExpandItem: + enum: + - account + - owner + - stage + source: + openapi: crm_v3.yml +imports: + crmRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /crm/v1/opportunities + method: GET + auth: true + docs: Returns a list of `Opportunity` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: crm_v3.yml + request: + name: OpportunitiesListRequest + query-parameters: + account_id: + type: optional + docs: If provided, will only return opportunities with this account. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + owner_id: + type: optional + docs: If provided, will only return opportunities with this owner. + page_size: + type: optional + docs: Number of results to return per page. + remote_created_after: + type: optional + docs: >- + If provided, will only return opportunities created in the third + party platform after this datetime. + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + show_enum_origins: + type: optional> + docs: >- + A comma separated list of enum field names for which you'd like + the original values to be returned, instead of Merge's normalized + enum values. [Learn + more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) + stage_id: + type: optional + docs: If provided, will only return opportunities with this stage. + status: + type: optional + docs: >- + If provided, will only return opportunities with this status. + Options: ('OPEN', 'WON', 'LOST') + + + * `OPEN` - OPEN + + * `WON` - WON + + * `LOST` - LOST + response: + docs: '' + type: crmRoot.PaginatedOpportunityList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 550e8400-e29b-41d4-a716-446655440000 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Needs Integrations + description: Needs a Unified API for Integrations! + amount: 100000 + owner: owner + account: account + stage: stage + status: OPEN + last_activity_at: '2022-02-10T00:00:00Z' + close_date: '2022-02-10T00:00:00Z' + remote_created_at: '2021-11-10T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /opportunities + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + create: + path: /crm/v1/opportunities + method: POST + auth: true + docs: Creates an `Opportunity` object with the given values. + source: + openapi: crm_v3.yml + request: + name: OpportunityEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: crmRoot.OpportunityRequest + content-type: application/json + response: + docs: '' + type: crmRoot.OpportunityResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: 550e8400-e29b-41d4-a716-446655440000 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Needs Integrations + description: Needs a Unified API for Integrations! + amount: 100000 + owner: owner + account: account + stage: stage + status: OPEN + last_activity_at: '2022-02-10T00:00:00Z' + close_date: '2022-02-10T00:00:00Z' + remote_created_at: '2021-11-10T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /opportunities + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /crm/v1/opportunities/{id} + method: GET + auth: true + docs: Returns an `Opportunity` object with the given `id`. + source: + openapi: crm_v3.yml + path-parameters: + id: string + request: + name: OpportunitiesRetrieveRequest + query-parameters: + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: crmRoot.Opportunity + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 550e8400-e29b-41d4-a716-446655440000 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Needs Integrations + description: Needs a Unified API for Integrations! + amount: 100000 + owner: owner + account: account + stage: stage + status: OPEN + last_activity_at: '2022-02-10T00:00:00Z' + close_date: '2022-02-10T00:00:00Z' + remote_created_at: '2021-11-10T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /opportunities + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + value: + key: value + partialUpdate: + path: /crm/v1/opportunities/{id} + method: PATCH + auth: true + docs: Updates an `Opportunity` object with the given `id`. + source: + openapi: crm_v3.yml + path-parameters: + id: string + request: + name: PatchedOpportunityEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: crmRoot.PatchedOpportunityRequest + content-type: application/json + response: + docs: '' + type: crmRoot.OpportunityResponse + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + request: + model: {} + response: + body: + model: + id: 550e8400-e29b-41d4-a716-446655440000 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Needs Integrations + description: Needs a Unified API for Integrations! + amount: 100000 + owner: owner + account: account + stage: stage + status: OPEN + last_activity_at: '2022-02-10T00:00:00Z' + close_date: '2022-02-10T00:00:00Z' + remote_created_at: '2021-11-10T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /opportunities + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + metaPatchRetrieve: + path: /crm/v1/opportunities/meta/patch/{id} + method: GET + auth: true + docs: Returns metadata for `Opportunity` PATCHs. + source: + openapi: crm_v3.yml + path-parameters: + id: string + response: + docs: '' + type: crmRoot.MetaResponse + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + metaPostRetrieve: + path: /crm/v1/opportunities/meta/post + method: GET + auth: true + docs: Returns metadata for `Opportunity` POSTs. + source: + openapi: crm_v3.yml + response: + docs: '' + type: crmRoot.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + remoteFieldClassesList: + path: /crm/v1/opportunities/remote-field-classes + method: GET + auth: true + docs: Returns a list of `RemoteFieldClass` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: crm_v3.yml + request: + name: OpportunitiesRemoteFieldClassesListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_common_model_field: + type: optional + docs: >- + If provided, will only return remote field classes with this + is_common_model_field value + is_custom: + type: optional + docs: >- + If provided, will only return remote fields classes with this + is_custom value + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: crmRoot.PaginatedRemoteFieldClassList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: id + display_name: display_name + remote_key_name: remote_key_name + description: description + is_custom: true + is_required: true + field_type: string + field_format: string + field_choices: + - {} + source: + openapi: crm_v3.yml diff --git a/.mock/definition/CRM/passthrough.yml b/.mock/definition/CRM/passthrough.yml new file mode 100644 index 000000000..074a43b16 --- /dev/null +++ b/.mock/definition/CRM/passthrough.yml @@ -0,0 +1,40 @@ +imports: + crmRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /crm/v1/passthrough + method: POST + auth: true + docs: Pull data from an endpoint not currently supported by Merge. + source: + openapi: crm_v3.yml + request: + body: crmRoot.DataPassthroughRequest + content-type: application/json + response: + docs: '' + type: crmRoot.RemoteResponse + status-code: 200 + examples: + - headers: {} + request: + method: GET + path: /scooters + response: + body: + method: GET + path: /scooters + status: 200 + response: + key: value + response_headers: + X-Page-Token: value + response_type: JSON + headers: + EXTRA-HEADER: value + Authorization: + source: + openapi: crm_v3.yml diff --git a/.mock/definition/CRM/regenerateKey.yml b/.mock/definition/CRM/regenerateKey.yml new file mode 100644 index 000000000..2515182ce --- /dev/null +++ b/.mock/definition/CRM/regenerateKey.yml @@ -0,0 +1,36 @@ +imports: + crmRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /crm/v1/regenerate-key + method: POST + auth: true + docs: Exchange remote keys. + source: + openapi: crm_v3.yml + request: + name: RemoteKeyForRegenerationRequest + body: + properties: + name: + type: string + docs: The name of the remote key + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: crmRoot.RemoteKey + status-code: 200 + examples: + - request: + name: Remote Deployment Key 1 + response: + body: + name: Remote Deployment Key 1 + key: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA + source: + openapi: crm_v3.yml diff --git a/.mock/definition/CRM/scopes.yml b/.mock/definition/CRM/scopes.yml new file mode 100644 index 000000000..7091eeaf1 --- /dev/null +++ b/.mock/definition/CRM/scopes.yml @@ -0,0 +1,160 @@ +imports: + crmRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + default_scopes_retrieve: + path: /crm/v1/default-scopes + method: GET + auth: true + docs: >- + 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). + source: + openapi: crm_v3.yml + response: + docs: '' + type: crmRoot.CommonModelScopeApi + status-code: 200 + examples: + - response: + body: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - created_at + - custom_fields + - date_of_birth + - first_name + - gender + - remote_created_at + - remote_data + disabled_fields: + - company + - employments + - groups + - home_location + - manager + - work_location + linked_account_scopes_retrieve: + path: /crm/v1/linked-account-scopes + method: GET + auth: true + docs: >- + 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). + source: + openapi: crm_v3.yml + response: + docs: '' + type: crmRoot.CommonModelScopeApi + status-code: 200 + examples: + - headers: {} + response: + body: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - created_at + - custom_fields + - date_of_birth + - first_name + - gender + - remote_created_at + - remote_data + disabled_fields: + - company + - employments + - groups + - home_location + - manager + - work_location + linked_account_scopes_create: + path: /crm/v1/linked-account-scopes + method: POST + auth: true + docs: >- + 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) + source: + openapi: crm_v3.yml + request: + name: LinkedAccountCommonModelScopeDeserializerRequest + body: + properties: + common_models: + docs: The common models you want to update the scopes for + type: list + content-type: application/json + response: + docs: '' + type: crmRoot.CommonModelScopeApi + status-code: 200 + examples: + - headers: {} + request: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - home_location + disabled_fields: + - work_location + - model_name: Benefit + model_permissions: + WRITE: + is_enabled: false + response: + body: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - created_at + - custom_fields + - date_of_birth + - first_name + - gender + - remote_created_at + - remote_data + disabled_fields: + - company + - employments + - groups + - home_location + - manager + - work_location + source: + openapi: crm_v3.yml diff --git a/.mock/definition/CRM/stages.yml b/.mock/definition/CRM/stages.yml new file mode 100644 index 000000000..0c2e8eb6c --- /dev/null +++ b/.mock/definition/CRM/stages.yml @@ -0,0 +1,230 @@ +imports: + crmRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /crm/v1/stages + method: GET + auth: true + docs: Returns a list of `Stage` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: crm_v3.yml + request: + name: StagesListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: crmRoot.PaginatedStageList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 0358cbc6-2040-430a-848e-aafacbadf3aa + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Closed Won + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /stages + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + retrieve: + path: /crm/v1/stages/{id} + method: GET + auth: true + docs: Returns a `Stage` object with the given `id`. + source: + openapi: crm_v3.yml + path-parameters: + id: string + request: + name: StagesRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: crmRoot.Stage + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 0358cbc6-2040-430a-848e-aafacbadf3aa + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Closed Won + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /stages + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + value: + key: value + remoteFieldClassesList: + path: /crm/v1/stages/remote-field-classes + method: GET + auth: true + docs: Returns a list of `RemoteFieldClass` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: crm_v3.yml + request: + name: StagesRemoteFieldClassesListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_common_model_field: + type: optional + docs: >- + If provided, will only return remote field classes with this + is_common_model_field value + is_custom: + type: optional + docs: >- + If provided, will only return remote fields classes with this + is_custom value + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: crmRoot.PaginatedRemoteFieldClassList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: id + display_name: display_name + remote_key_name: remote_key_name + description: description + is_custom: true + is_required: true + field_type: string + field_format: string + field_choices: + - {} + source: + openapi: crm_v3.yml diff --git a/.mock/definition/CRM/syncStatus.yml b/.mock/definition/CRM/syncStatus.yml new file mode 100644 index 000000000..7a57c6fd5 --- /dev/null +++ b/.mock/definition/CRM/syncStatus.yml @@ -0,0 +1,55 @@ +imports: + crmRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /crm/v1/sync-status + method: GET + auth: true + docs: >- + 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). + source: + openapi: crm_v3.yml + request: + name: SyncStatusListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: crmRoot.PaginatedSyncStatusList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - model_name: Account + model_id: crm.Account + last_sync_start: '2021-03-30T19:44:18Z' + next_sync_start: '2021-03-30T20:44:18Z' + last_sync_result: SYNCING + last_sync_finished: '2021-03-30T19:55:18Z' + status: SYNCING + is_initial_sync: true + selective_sync_configurations_usage: IN_NEXT_SYNC + source: + openapi: crm_v3.yml diff --git a/.mock/definition/CRM/tasks.yml b/.mock/definition/CRM/tasks.yml new file mode 100644 index 000000000..01a7f1b4d --- /dev/null +++ b/.mock/definition/CRM/tasks.yml @@ -0,0 +1,801 @@ +types: + TasksListRequestExpandItem: + enum: + - account + - opportunity + - owner + source: + openapi: crm_v3.yml + TasksRetrieveRequestExpandItem: + enum: + - account + - opportunity + - owner + source: + openapi: crm_v3.yml +imports: + crmRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /crm/v1/tasks + method: GET + auth: true + docs: Returns a list of `Task` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: crm_v3.yml + request: + name: TasksListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: crmRoot.PaginatedTaskList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 550e8400-e29b-41d4-a716-446655440000 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + subject: Contact about Integration Strategy + content: Follow up to see whether they need integrations + owner: owner + account: account + opportunity: opportunity + completed_date: '2022-02-11T00:00:00Z' + due_date: '2022-02-10T00:00:00Z' + status: OPEN + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /tasks + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + create: + path: /crm/v1/tasks + method: POST + auth: true + docs: Creates a `Task` object with the given values. + source: + openapi: crm_v3.yml + request: + name: TaskEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: crmRoot.TaskRequest + content-type: application/json + response: + docs: '' + type: crmRoot.TaskResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: 550e8400-e29b-41d4-a716-446655440000 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + subject: Contact about Integration Strategy + content: Follow up to see whether they need integrations + owner: owner + account: account + opportunity: opportunity + completed_date: '2022-02-11T00:00:00Z' + due_date: '2022-02-10T00:00:00Z' + status: OPEN + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /tasks + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /crm/v1/tasks/{id} + method: GET + auth: true + docs: Returns a `Task` object with the given `id`. + source: + openapi: crm_v3.yml + path-parameters: + id: string + request: + name: TasksRetrieveRequest + query-parameters: + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: crmRoot.Task + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 550e8400-e29b-41d4-a716-446655440000 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + subject: Contact about Integration Strategy + content: Follow up to see whether they need integrations + owner: owner + account: account + opportunity: opportunity + completed_date: '2022-02-11T00:00:00Z' + due_date: '2022-02-10T00:00:00Z' + status: OPEN + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /tasks + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + value: + key: value + partialUpdate: + path: /crm/v1/tasks/{id} + method: PATCH + auth: true + docs: Updates a `Task` object with the given `id`. + source: + openapi: crm_v3.yml + path-parameters: + id: string + request: + name: PatchedTaskEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: crmRoot.PatchedTaskRequest + content-type: application/json + response: + docs: '' + type: crmRoot.TaskResponse + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + request: + model: {} + response: + body: + model: + id: 550e8400-e29b-41d4-a716-446655440000 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + subject: Contact about Integration Strategy + content: Follow up to see whether they need integrations + owner: owner + account: account + opportunity: opportunity + completed_date: '2022-02-11T00:00:00Z' + due_date: '2022-02-10T00:00:00Z' + status: OPEN + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /tasks + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + metaPatchRetrieve: + path: /crm/v1/tasks/meta/patch/{id} + method: GET + auth: true + docs: Returns metadata for `Task` PATCHs. + source: + openapi: crm_v3.yml + path-parameters: + id: string + response: + docs: '' + type: crmRoot.MetaResponse + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + metaPostRetrieve: + path: /crm/v1/tasks/meta/post + method: GET + auth: true + docs: Returns metadata for `Task` POSTs. + source: + openapi: crm_v3.yml + response: + docs: '' + type: crmRoot.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + remoteFieldClassesList: + path: /crm/v1/tasks/remote-field-classes + method: GET + auth: true + docs: Returns a list of `RemoteFieldClass` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: crm_v3.yml + request: + name: TasksRemoteFieldClassesListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_common_model_field: + type: optional + docs: >- + If provided, will only return remote field classes with this + is_common_model_field value + is_custom: + type: optional + docs: >- + If provided, will only return remote fields classes with this + is_custom value + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: crmRoot.PaginatedRemoteFieldClassList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: id + display_name: display_name + remote_key_name: remote_key_name + description: description + is_custom: true + is_required: true + field_type: string + field_format: string + field_choices: + - {} + source: + openapi: crm_v3.yml diff --git a/.mock/definition/CRM/users.yml b/.mock/definition/CRM/users.yml new file mode 100644 index 000000000..90719a44f --- /dev/null +++ b/.mock/definition/CRM/users.yml @@ -0,0 +1,259 @@ +imports: + crmRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /crm/v1/users + method: GET + auth: true + docs: Returns a list of `User` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: crm_v3.yml + request: + name: UsersListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + email: + type: optional + docs: If provided, will only return users with this email. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: crmRoot.PaginatedUserList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 0358cbc6-2040-430a-848e-aafacbadf3aa + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Gil Feig + email: merge_is_hiring@merge.dev + is_active: true + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /users + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + retrieve: + path: /crm/v1/users/{id} + method: GET + auth: true + docs: Returns a `User` object with the given `id`. + source: + openapi: crm_v3.yml + path-parameters: + id: string + request: + name: UsersRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: crmRoot.User + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 0358cbc6-2040-430a-848e-aafacbadf3aa + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Gil Feig + email: merge_is_hiring@merge.dev + is_active: true + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /users + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + value: + key: value + ignoreCreate: + path: /crm/v1/users/ignore/{model_id} + method: POST + auth: true + docs: >- + 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. + source: + openapi: crm_v3.yml + path-parameters: + model_id: string + request: + body: crmRoot.IgnoreCommonModelRequest + content-type: application/json + examples: + - path-parameters: + model_id: model_id + headers: {} + request: + reason: GENERAL_CUSTOMER_REQUEST + remoteFieldClassesList: + path: /crm/v1/users/remote-field-classes + method: GET + auth: true + docs: Returns a list of `RemoteFieldClass` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: crm_v3.yml + request: + name: UsersRemoteFieldClassesListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_common_model_field: + type: optional + docs: >- + If provided, will only return remote field classes with this + is_common_model_field value + is_custom: + type: optional + docs: >- + If provided, will only return remote fields classes with this + is_custom value + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: crmRoot.PaginatedRemoteFieldClassList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: id + display_name: display_name + remote_key_name: remote_key_name + description: description + is_custom: true + is_required: true + field_type: string + field_format: string + field_choices: + - {} + source: + openapi: crm_v3.yml diff --git a/.mock/definition/CRM/webhookReceivers.yml b/.mock/definition/CRM/webhookReceivers.yml new file mode 100644 index 000000000..64b2593e9 --- /dev/null +++ b/.mock/definition/CRM/webhookReceivers.yml @@ -0,0 +1,61 @@ +imports: + crmRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /crm/v1/webhook-receivers + method: GET + auth: true + docs: Returns a list of `WebhookReceiver` objects. + source: + openapi: crm_v3.yml + response: + docs: '' + type: list + status-code: 200 + examples: + - headers: {} + response: + body: + - event: event + is_active: true + key: key + create: + path: /crm/v1/webhook-receivers + method: POST + auth: true + docs: Creates a `WebhookReceiver` object with the given values. + source: + openapi: crm_v3.yml + request: + name: WebhookReceiverRequest + body: + properties: + event: + type: string + validation: + minLength: 1 + is_active: boolean + key: + type: optional + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: crmRoot.WebhookReceiver + status-code: 201 + examples: + - headers: {} + request: + event: event + is_active: true + response: + body: + event: event + is_active: true + key: key + source: + openapi: crm_v3.yml diff --git a/.mock/definition/FileStorage/__package__.yml b/.mock/definition/FileStorage/__package__.yml new file mode 100644 index 000000000..f07c96e32 --- /dev/null +++ b/.mock/definition/FileStorage/__package__.yml @@ -0,0 +1,2404 @@ +types: + AccountDetailsCategory: + discriminated: false + union: + - CategoryEnum + - string + source: + openapi: filestorage_v3.yml + inline: true + AccountDetails: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + integration: + type: optional + access: read-only + integration_slug: + type: optional + access: read-only + category: optional + end_user_origin_id: + type: optional + access: read-only + end_user_organization_name: + type: optional + access: read-only + end_user_email_address: + type: optional + validation: + format: email + access: read-only + status: + type: optional + access: read-only + webhook_listener_url: + type: optional + validation: + format: uri + access: read-only + is_duplicate: + type: optional + docs: >- + Whether a Production Linked Account's credentials match another + existing Production Linked Account. This field is `null` for Test + Linked Accounts, incomplete Production Linked Accounts, and ignored + duplicate Production Linked Account sets. + access: read-only + account_type: + type: optional + access: read-only + completed_at: + type: optional + docs: The time at which account completes the linking flow. + source: + openapi: filestorage_v3.yml + AccountDetailsAndActionsCategory: + discriminated: false + union: + - CategoryEnum + - string + source: + openapi: filestorage_v3.yml + inline: true + AccountDetailsAndActionsStatus: + discriminated: false + union: + - AccountDetailsAndActionsStatusEnum + - string + source: + openapi: filestorage_v3.yml + inline: true + AccountDetailsAndActions: + docs: >- + # The LinkedAccount Object + + ### Description + + The `LinkedAccount` object is used to represent an end user's link with a + specific integration. + + + ### Usage Example + + View a list of your organization's `LinkedAccount` objects. + properties: + id: string + category: optional + status: AccountDetailsAndActionsStatus + status_detail: optional + end_user_origin_id: optional + end_user_organization_name: string + end_user_email_address: string + subdomain: + type: optional + docs: The tenant or domain the customer has provided access to. + webhook_listener_url: string + is_duplicate: + type: optional + docs: >- + Whether a Production Linked Account's credentials match another + existing Production Linked Account. This field is `null` for Test + Linked Accounts, incomplete Production Linked Accounts, and ignored + duplicate Production Linked Account sets. + integration: optional + account_type: string + completed_at: datetime + source: + openapi: filestorage_v3.yml + AccountDetailsAndActionsIntegration: + properties: + name: string + categories: list + image: optional + square_image: optional + color: string + slug: string + passthrough_available: boolean + available_model_operations: optional> + source: + openapi: filestorage_v3.yml + AccountDetailsAndActionsStatusEnum: + enum: + - COMPLETE + - INCOMPLETE + - RELINK_NEEDED + - IDLE + docs: |- + * `COMPLETE` - COMPLETE + * `INCOMPLETE` - INCOMPLETE + * `RELINK_NEEDED` - RELINK_NEEDED + * `IDLE` - IDLE + source: + openapi: filestorage_v3.yml + AccountIntegration: + properties: + name: + type: string + docs: Company name. + abbreviated_name: + type: optional + docs: >- + Optional. This shortened name appears in places with limited space, + usually in conjunction with the platform's logo (e.g., Merge Link + menu).

Example: Workforce Now (in lieu of ADP Workforce + Now), SuccessFactors (in lieu of SAP SuccessFactors) + categories: + type: optional> + docs: >- + Category or categories this integration belongs to. Multiple + categories should be comma separated, i.e. [ats, hris]. + access: read-only + image: + type: optional + docs: Company logo in rectangular shape. + validation: + format: uri + square_image: + type: optional + docs: Company logo in square shape. + validation: + format: uri + color: + type: optional + docs: >- + The color of this integration used for buttons and text throughout the + app and landing pages. Choose a darker, saturated color. + validation: + pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ + maxLength: 18 + slug: + type: optional + access: read-only + api_endpoints_to_documentation_urls: + type: optional> + docs: >- + Mapping of API endpoints to documentation urls for support. Example: + {'GET': [['/common-model-scopes', + 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', + 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], + 'POST': []} + webhook_setup_guide_url: + type: optional + docs: >- + Setup guide URL for third party webhook creation. Exposed in Merge + Docs. + category_beta_status: + type: optional> + docs: Category or categories this integration is in beta status for. + access: read-only + source: + openapi: filestorage_v3.yml + AccountToken: + properties: + account_token: string + integration: AccountIntegration + id: string + source: + openapi: filestorage_v3.yml + AdvancedMetadata: + properties: + id: + type: string + validation: + format: uuid + display_name: optional + description: optional + is_required: optional + is_custom: optional + field_choices: optional> + source: + openapi: filestorage_v3.yml + AsyncPassthroughReciept: + properties: + async_passthrough_receipt_id: + type: string + validation: + format: uuid + source: + openapi: filestorage_v3.yml + AuditLogEventRole: + discriminated: false + docs: >- + Designates the role of the user (or SYSTEM/API if action not taken by a + user) at the time of this Event occurring. + + + * `ADMIN` - ADMIN + + * `DEVELOPER` - DEVELOPER + + * `MEMBER` - MEMBER + + * `API` - API + + * `SYSTEM` - SYSTEM + + * `MERGE_TEAM` - MERGE_TEAM + union: + - RoleEnum + - string + source: + openapi: filestorage_v3.yml + inline: true + AuditLogEventEventType: + discriminated: false + docs: >- + Designates the type of event that occurred. + + + * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + + * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + + * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + + * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + + * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + + * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + + * `INVITED_USER` - INVITED_USER + + * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + + * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + + * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + + * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - + DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + + * `CREATED_DESTINATION` - CREATED_DESTINATION + + * `DELETED_DESTINATION` - DELETED_DESTINATION + + * `CHANGED_DESTINATION` - CHANGED_DESTINATION + + * `CHANGED_SCOPES` - CHANGED_SCOPES + + * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + + * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + + * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + + * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + + * `ENABLED_CATEGORY` - ENABLED_CATEGORY + + * `DISABLED_CATEGORY` - DISABLED_CATEGORY + + * `CHANGED_PASSWORD` - CHANGED_PASSWORD + + * `RESET_PASSWORD` - RESET_PASSWORD + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - + CREATED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - + CREATED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - + CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - + CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + + * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - + DELETED_INTEGRATION_WIDE_FIELD_MAPPING + + * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - + DELETED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + + * `MUTED_ISSUE` - MUTED_ISSUE + + * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + + * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + + * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + + * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + + * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + union: + - EventTypeEnum + - string + source: + openapi: filestorage_v3.yml + inline: true + AuditLogEvent: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + user_name: + type: optional + docs: The User's full name at the time of this Event occurring. + validation: + maxLength: 200 + user_email: + type: optional + docs: The User's email at the time of this Event occurring. + validation: + format: email + maxLength: 254 + role: + type: AuditLogEventRole + docs: >- + Designates the role of the user (or SYSTEM/API if action not taken by + a user) at the time of this Event occurring. + + + * `ADMIN` - ADMIN + + * `DEVELOPER` - DEVELOPER + + * `MEMBER` - MEMBER + + * `API` - API + + * `SYSTEM` - SYSTEM + + * `MERGE_TEAM` - MERGE_TEAM + ip_address: + type: string + validation: + maxLength: 45 + event_type: + type: AuditLogEventEventType + docs: >- + Designates the type of event that occurred. + + + * `CREATED_REMOTE_PRODUCTION_API_KEY` - + CREATED_REMOTE_PRODUCTION_API_KEY + + * `DELETED_REMOTE_PRODUCTION_API_KEY` - + DELETED_REMOTE_PRODUCTION_API_KEY + + * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + + * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + + * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + + * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + + * `INVITED_USER` - INVITED_USER + + * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + + * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + + * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + + * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - + DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + + * `CREATED_DESTINATION` - CREATED_DESTINATION + + * `DELETED_DESTINATION` - DELETED_DESTINATION + + * `CHANGED_DESTINATION` - CHANGED_DESTINATION + + * `CHANGED_SCOPES` - CHANGED_SCOPES + + * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + + * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + + * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + + * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + + * `ENABLED_CATEGORY` - ENABLED_CATEGORY + + * `DISABLED_CATEGORY` - DISABLED_CATEGORY + + * `CHANGED_PASSWORD` - CHANGED_PASSWORD + + * `RESET_PASSWORD` - RESET_PASSWORD + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - + CREATED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - + CREATED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - + CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - + CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + + * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - + DELETED_INTEGRATION_WIDE_FIELD_MAPPING + + * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - + DELETED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + + * `MUTED_ISSUE` - MUTED_ISSUE + + * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + + * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + + * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + + * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + + * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + event_description: string + created_at: + type: optional + access: read-only + source: + openapi: filestorage_v3.yml + AvailableActions: + docs: >- + # The AvailableActions Object + + ### Description + + The `Activity` object is used to see all available model/operation + combinations for an integration. + + + ### Usage Example + + Fetch all the actions available for the `Zenefits` integration. + properties: + integration: AccountIntegration + passthrough_available: boolean + available_model_operations: optional> + source: + openapi: filestorage_v3.yml + CategoriesEnum: + enum: + - hris + - ats + - accounting + - ticketing + - crm + - mktg + - filestorage + docs: |- + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + source: + openapi: filestorage_v3.yml + CategoryEnum: + enum: + - hris + - ats + - accounting + - ticketing + - crm + - mktg + - filestorage + docs: |- + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + source: + openapi: filestorage_v3.yml + CommonModelScopeApi: + properties: + common_models: + docs: The common models you want to update the scopes for + type: list + source: + openapi: filestorage_v3.yml + CommonModelScopesBodyRequest: + properties: + model_id: + type: string + validation: + minLength: 1 + enabled_actions: list + disabled_fields: list + source: + openapi: filestorage_v3.yml + DataPassthroughRequest: + docs: >- + # The DataPassthrough Object + + ### Description + + The `DataPassthrough` object is used to send information to an + otherwise-unsupported third-party endpoint. + + + ### Usage Example + + Create a `DataPassthrough` to get team hierarchies from your Rippling + integration. + properties: + method: MethodEnum + path: + type: string + docs: The path of the request in the third party's platform. + validation: + minLength: 1 + base_url_override: + type: optional + docs: An optional override of the third party's base url for the request. + validation: + minLength: 1 + data: + type: optional + docs: >- + The data with the request. You must include a `request_format` + parameter matching the data's format + validation: + minLength: 1 + multipart_form_data: + type: optional> + docs: >- + Pass an array of `MultipartFormField` objects in here instead of using + the `data` param if `request_format` is set to `MULTIPART`. + headers: + type: optional> + docs: >- + The headers to use for the request (Merge will handle the account's + authorization headers). `Content-Type` header is required for + passthrough. Choose content type corresponding to expected format of + receiving server. + request_format: optional + normalize_response: + type: optional + docs: >- + Optional. If true, the response will always be an object of the form + `{"type": T, "value": ...}` where `T` will be one of `string, boolean, + number, null, array, object`. + source: + openapi: filestorage_v3.yml + DebugModeLog: + properties: + log_id: string + dashboard_view: string + log_summary: DebugModelLogSummary + source: + openapi: filestorage_v3.yml + DebugModelLogSummary: + properties: + url: string + method: string + status_code: integer + source: + openapi: filestorage_v3.yml + DownloadRequestMeta: + properties: + id: string + url: string + method: string + headers: map + source: + openapi: filestorage_v3.yml + Drive: + docs: >- + # The Drive Object + + ### Description + + The `Drive` object is used to represent a drive that contains the folders + and files in the user's workspace. + + ### Usage Example + + Fetch from the `GET /api/filestorage/v1/drives` endpoint and view their + drives. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The drive's name. + validation: + maxLength: 254 + remote_created_at: + type: optional + docs: When the third party's drive was created. + drive_url: + type: optional + docs: The drive's url. + validation: + maxLength: 2000 + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: filestorage_v3.yml + EnabledActionsEnum: + enum: + - READ + - WRITE + docs: |- + * `READ` - READ + * `WRITE` - WRITE + source: + openapi: filestorage_v3.yml + EncodingEnum: + enum: + - RAW + - BASE64 + - GZIP_BASE64 + docs: |- + * `RAW` - RAW + * `BASE64` - BASE64 + * `GZIP_BASE64` - GZIP_BASE64 + source: + openapi: filestorage_v3.yml + ErrorValidationProblem: + properties: + source: optional + title: string + detail: string + problem_type: string + source: + openapi: filestorage_v3.yml + EventTypeEnum: + enum: + - 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 + docs: >- + * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + + * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + + * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + + * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + + * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + + * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + + * `INVITED_USER` - INVITED_USER + + * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + + * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + + * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + + * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - + DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + + * `CREATED_DESTINATION` - CREATED_DESTINATION + + * `DELETED_DESTINATION` - DELETED_DESTINATION + + * `CHANGED_DESTINATION` - CHANGED_DESTINATION + + * `CHANGED_SCOPES` - CHANGED_SCOPES + + * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + + * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + + * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + + * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + + * `ENABLED_CATEGORY` - ENABLED_CATEGORY + + * `DISABLED_CATEGORY` - DISABLED_CATEGORY + + * `CHANGED_PASSWORD` - CHANGED_PASSWORD + + * `RESET_PASSWORD` - RESET_PASSWORD + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - + CREATED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - + CREATED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - + CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - + CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + + * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - + DELETED_INTEGRATION_WIDE_FIELD_MAPPING + + * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - + DELETED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + + * `MUTED_ISSUE` - MUTED_ISSUE + + * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + + * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + + * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + + * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + + * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + source: + openapi: filestorage_v3.yml + ExternalTargetFieldApi: + properties: + name: + type: optional + access: read-only + description: + type: optional + access: read-only + is_mapped: + type: optional + access: read-only + source: + openapi: filestorage_v3.yml + ExternalTargetFieldApiResponse: + properties: + File: optional> + Folder: optional> + Drive: optional> + Group: optional> + User: optional> + source: + openapi: filestorage_v3.yml + FieldMappingApiInstanceTargetField: + properties: + name: string + description: string + is_organization_wide: boolean + source: + openapi: filestorage_v3.yml + inline: true + FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo: + properties: + method: optional + url_path: optional + field_traversal_path: optional> + source: + openapi: filestorage_v3.yml + inline: true + FieldMappingApiInstanceRemoteField: + properties: + remote_key_name: optional + schema: optional> + remote_endpoint_info: FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo + source: + openapi: filestorage_v3.yml + inline: true + FieldMappingApiInstance: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + is_integration_wide: + type: optional + access: read-only + target_field: + type: optional + access: read-only + remote_field: + type: optional + access: read-only + source: + openapi: filestorage_v3.yml + FieldMappingApiInstanceResponse: + properties: + File: optional> + Folder: optional> + Drive: optional> + Group: optional> + User: optional> + source: + openapi: filestorage_v3.yml + FieldMappingInstanceResponse: + properties: + model: FieldMappingApiInstance + warnings: list + errors: list + logs: optional> + source: + openapi: filestorage_v3.yml + FieldPermissionDeserializer: + properties: + enabled_fields: optional> + disabled_fields: optional> + source: + openapi: filestorage_v3.yml + FieldPermissionDeserializerRequest: + properties: + enabled_fields: optional> + disabled_fields: optional> + source: + openapi: filestorage_v3.yml + FileFolder: + discriminated: false + docs: The folder that the file belongs to. + union: + - type: string + validation: + format: uuid + - Folder + source: + openapi: filestorage_v3.yml + inline: true + FilePermissionsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Permission + source: + openapi: filestorage_v3.yml + inline: true + FilePermissions: + discriminated: false + docs: >- + The Permission object is used to represent a user's or group's access to a + File or Folder. Permissions are unexpanded by default. Use the query param + `expand=permissions` to see more details under `GET /files`. + union: + - type: string + validation: + format: uuid + - Permission + - list + source: + openapi: filestorage_v3.yml + inline: true + FileDrive: + discriminated: false + docs: The drive that the file belongs to. + union: + - type: string + validation: + format: uuid + - Drive + source: + openapi: filestorage_v3.yml + inline: true + File: + docs: >- + # The File Object + + ### Description + + The `File` object is used to represent a file in the workspace. The Object + typically exists under a folder or drive, if it exists. + + ### Usage Example + + Fetch from the `GET /api/filestorage/v1/files` endpoint and view their + files. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The file's name. + validation: + maxLength: 254 + file_url: + type: optional + docs: The URL to access the file. + validation: + maxLength: 2000 + file_thumbnail_url: + type: optional + docs: >- + The URL that produces a thumbnail preview of the file. Typically an + image. + validation: + maxLength: 2000 + size: + type: optional + docs: The file's size, in bytes. + mime_type: + type: optional + docs: The file's mime type. + validation: + maxLength: 128 + description: + type: optional + docs: The file's description. + validation: + maxLength: 2000 + folder: + type: optional + docs: The folder that the file belongs to. + checksum: + type: optional> + docs: >- + This field stores file checksum data. 'type' indicates the algorithm + (e.g. crc_32, sha1, sha256, quickXor, or md5), and 'content_hash' is + the unique hash used to verify file integrity and detect alterations. + permissions: + type: optional + docs: >- + The Permission object is used to represent a user's or group's access + to a File or Folder. Permissions are unexpanded by default. Use the + query param `expand=permissions` to see more details under `GET + /files`. + drive: + type: optional + docs: The drive that the file belongs to. + remote_created_at: + type: optional + docs: When the third party's file was created. + remote_updated_at: + type: optional + docs: When the third party's file was updated. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: filestorage_v3.yml + FileRequestFolder: + discriminated: false + docs: The folder that the file belongs to. + union: + - type: string + validation: + format: uuid + - Folder + source: + openapi: filestorage_v3.yml + inline: true + FileRequestPermissionsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - PermissionRequest + source: + openapi: filestorage_v3.yml + inline: true + FileRequestPermissions: + discriminated: false + docs: >- + The Permission object is used to represent a user's or group's access to a + File or Folder. Permissions are unexpanded by default. Use the query param + `expand=permissions` to see more details under `GET /files`. + union: + - type: string + validation: + format: uuid + - PermissionRequest + - list + source: + openapi: filestorage_v3.yml + inline: true + FileRequestDrive: + discriminated: false + docs: The drive that the file belongs to. + union: + - type: string + validation: + format: uuid + - Drive + source: + openapi: filestorage_v3.yml + inline: true + FileRequest: + docs: >- + # The File Object + + ### Description + + The `File` object is used to represent a file in the workspace. The Object + typically exists under a folder or drive, if it exists. + + ### Usage Example + + Fetch from the `GET /api/filestorage/v1/files` endpoint and view their + files. + properties: + name: + type: optional + docs: The file's name. + validation: + maxLength: 254 + file_url: + type: optional + docs: The URL to access the file. + validation: + maxLength: 2000 + file_thumbnail_url: + type: optional + docs: >- + The URL that produces a thumbnail preview of the file. Typically an + image. + validation: + maxLength: 2000 + size: + type: optional + docs: The file's size, in bytes. + mime_type: + type: optional + docs: The file's mime type. + validation: + maxLength: 128 + description: + type: optional + docs: The file's description. + validation: + maxLength: 2000 + folder: + type: optional + docs: The folder that the file belongs to. + checksum: + type: optional> + docs: >- + This field stores file checksum data. 'type' indicates the algorithm + (e.g. crc_32, sha1, sha256, quickXor, or md5), and 'content_hash' is + the unique hash used to verify file integrity and detect alterations. + permissions: + type: optional + docs: >- + The Permission object is used to represent a user's or group's access + to a File or Folder. Permissions are unexpanded by default. Use the + query param `expand=permissions` to see more details under `GET + /files`. + drive: + type: optional + docs: The drive that the file belongs to. + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: filestorage_v3.yml + FileStorageFileResponse: + properties: + model: File + warnings: list + errors: list + logs: optional> + source: + openapi: filestorage_v3.yml + FileStorageFolderResponse: + properties: + model: Folder + warnings: list + errors: list + logs: optional> + source: + openapi: filestorage_v3.yml + FolderParentFolder: + discriminated: false + docs: The folder that the folder belongs to. + union: + - type: string + validation: + format: uuid + - Folder + source: + openapi: filestorage_v3.yml + inline: true + FolderDrive: + discriminated: false + docs: The drive that the folder belongs to. + union: + - type: string + validation: + format: uuid + - Drive + source: + openapi: filestorage_v3.yml + inline: true + FolderPermissionsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Permission + source: + openapi: filestorage_v3.yml + inline: true + FolderPermissions: + discriminated: false + docs: >- + The Permission object is used to represent a user's or group's access to a + File or Folder. Permissions are unexpanded by default. Use the query param + `expand=permissions` to see more details under `GET /folders`. + union: + - type: string + validation: + format: uuid + - Permission + - list + source: + openapi: filestorage_v3.yml + inline: true + Folder: + docs: >- + # The Folder Object + + ### Description + + The `Folder` object is used to represent a collection of files and/or + folders in the workspace. Could be within a drive, if it exists. + + ### Usage Example + + Fetch from the `GET /api/filestorage/v1/folders` endpoint and view their + folders. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The folder's name. + validation: + maxLength: 254 + folder_url: + type: optional + docs: The URL to access the folder. + validation: + maxLength: 2000 + size: + type: optional + docs: The folder's size, in bytes. + description: + type: optional + docs: The folder's description. + validation: + maxLength: 2000 + parent_folder: + type: optional + docs: The folder that the folder belongs to. + drive: + type: optional + docs: The drive that the folder belongs to. + permissions: + type: optional + docs: >- + The Permission object is used to represent a user's or group's access + to a File or Folder. Permissions are unexpanded by default. Use the + query param `expand=permissions` to see more details under `GET + /folders`. + remote_created_at: + type: optional + docs: When the third party's folder was created. + remote_updated_at: + type: optional + docs: When the third party's folder was updated. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: filestorage_v3.yml + FolderRequestParentFolder: + discriminated: false + docs: The folder that the folder belongs to. + union: + - type: string + validation: + format: uuid + - Folder + source: + openapi: filestorage_v3.yml + inline: true + FolderRequestDrive: + discriminated: false + docs: The drive that the folder belongs to. + union: + - type: string + validation: + format: uuid + - Drive + source: + openapi: filestorage_v3.yml + inline: true + FolderRequestPermissionsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - PermissionRequest + source: + openapi: filestorage_v3.yml + inline: true + FolderRequestPermissions: + discriminated: false + docs: >- + The Permission object is used to represent a user's or group's access to a + File or Folder. Permissions are unexpanded by default. Use the query param + `expand=permissions` to see more details under `GET /folders`. + union: + - type: string + validation: + format: uuid + - PermissionRequest + - list + source: + openapi: filestorage_v3.yml + inline: true + FolderRequest: + docs: >- + # The Folder Object + + ### Description + + The `Folder` object is used to represent a collection of files and/or + folders in the workspace. Could be within a drive, if it exists. + + ### Usage Example + + Fetch from the `GET /api/filestorage/v1/folders` endpoint and view their + folders. + properties: + name: + type: optional + docs: The folder's name. + validation: + maxLength: 254 + folder_url: + type: optional + docs: The URL to access the folder. + validation: + maxLength: 2000 + size: + type: optional + docs: The folder's size, in bytes. + description: + type: optional + docs: The folder's description. + validation: + maxLength: 2000 + parent_folder: + type: optional + docs: The folder that the folder belongs to. + drive: + type: optional + docs: The drive that the folder belongs to. + permissions: + type: optional + docs: >- + The Permission object is used to represent a user's or group's access + to a File or Folder. Permissions are unexpanded by default. Use the + query param `expand=permissions` to see more details under `GET + /folders`. + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: filestorage_v3.yml + GroupChildGroupsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Group + source: + openapi: filestorage_v3.yml + inline: true + Group: + docs: >- + # The Group Object + + ### Description + + The `Group` object is used to represent any subset of `Users`. This can + extend to company domains as well. + + ### Usage Example + + Fetch from the `GET /api/filestorage/v1/groups` endpoint and view their + groups. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The group's name. + validation: + maxLength: 254 + users: + docs: >- + The users that belong in the group. If null, this typically means it's + either a domain or the third-party platform does not surface this + information. + type: list + child_groups: + type: optional> + docs: Groups that inherit the permissions of the parent group. + access: read-only + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: filestorage_v3.yml + IndividualCommonModelScopeDeserializer: + properties: + model_name: string + model_permissions: optional> + field_permissions: optional + source: + openapi: filestorage_v3.yml + IndividualCommonModelScopeDeserializerRequest: + properties: + model_name: + type: string + validation: + minLength: 1 + model_permissions: optional> + field_permissions: optional + source: + openapi: filestorage_v3.yml + IssueStatus: + discriminated: false + docs: |- + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + union: + - IssueStatusEnum + - string + source: + openapi: filestorage_v3.yml + inline: true + Issue: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + status: + type: optional + docs: |- + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + error_description: string + end_user: + type: optional> + access: read-only + first_incident_time: optional + last_incident_time: optional + is_muted: + type: optional + access: read-only + error_details: + type: optional> + access: read-only + source: + openapi: filestorage_v3.yml + IssueStatusEnum: + enum: + - ONGOING + - RESOLVED + docs: |- + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + source: + openapi: filestorage_v3.yml + LanguageEnum: + enum: + - en + - de + docs: |- + * `en` - en + * `de` - de + source: + openapi: filestorage_v3.yml + LastSyncResultEnum: + enum: + - SYNCING + - DONE + - FAILED + - DISABLED + - PAUSED + - PARTIALLY_SYNCED + docs: |- + * `SYNCING` - SYNCING + * `DONE` - DONE + * `FAILED` - FAILED + * `DISABLED` - DISABLED + * `PAUSED` - PAUSED + * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED + source: + openapi: filestorage_v3.yml + LinkToken: + properties: + link_token: string + integration_name: optional + magic_link_url: optional + source: + openapi: filestorage_v3.yml + LinkedAccountStatus: + properties: + linked_account_status: string + can_make_request: boolean + source: + openapi: filestorage_v3.yml + MetaResponse: + properties: + request_schema: map + remote_field_classes: optional> + status: optional + has_conditional_params: boolean + has_required_linked_account_params: boolean + source: + openapi: filestorage_v3.yml + MethodEnum: + enum: + - GET + - OPTIONS + - HEAD + - POST + - PUT + - PATCH + - DELETE + docs: |- + * `GET` - GET + * `OPTIONS` - OPTIONS + * `HEAD` - HEAD + * `POST` - POST + * `PUT` - PUT + * `PATCH` - PATCH + * `DELETE` - DELETE + source: + openapi: filestorage_v3.yml + ModelOperation: + docs: >- + # The ModelOperation Object + + ### Description + + The `ModelOperation` object is used to represent the operations that are + currently supported for a given model. + + + ### Usage Example + + View what operations are supported for the `Candidate` endpoint. + properties: + model_name: string + available_operations: list + required_post_parameters: list + supported_fields: list + source: + openapi: filestorage_v3.yml + ModelPermissionDeserializer: + properties: + is_enabled: optional + source: + openapi: filestorage_v3.yml + ModelPermissionDeserializerRequest: + properties: + is_enabled: optional + source: + openapi: filestorage_v3.yml + MultipartFormFieldRequestEncoding: + discriminated: false + docs: |- + The encoding of the value of `data`. Defaults to `RAW` if not defined. + + * `RAW` - RAW + * `BASE64` - BASE64 + * `GZIP_BASE64` - GZIP_BASE64 + union: + - EncodingEnum + - string + source: + openapi: filestorage_v3.yml + inline: true + MultipartFormFieldRequest: + docs: >- + # The MultipartFormField Object + + ### Description + + The `MultipartFormField` object is used to represent fields in an HTTP + request using `multipart/form-data`. + + + ### Usage Example + + Create a `MultipartFormField` to define a multipart form entry. + properties: + name: + type: string + docs: The name of the form field + validation: + minLength: 1 + data: + type: string + docs: The data for the form field. + validation: + minLength: 1 + encoding: + type: optional + docs: |- + The encoding of the value of `data`. Defaults to `RAW` if not defined. + + * `RAW` - RAW + * `BASE64` - BASE64 + * `GZIP_BASE64` - GZIP_BASE64 + file_name: + type: optional + docs: The file name of the form field, if the field is for a file. + validation: + minLength: 1 + content_type: + type: optional + docs: The MIME type of the file, if the field is for a file. + validation: + minLength: 1 + source: + openapi: filestorage_v3.yml + PaginatedAccountDetailsAndActionsList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: filestorage_v3.yml + PaginatedAuditLogEventList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: filestorage_v3.yml + PaginatedDownloadRequestMetaList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: filestorage_v3.yml + PaginatedDriveList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: filestorage_v3.yml + PaginatedFileList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: filestorage_v3.yml + PaginatedFolderList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: filestorage_v3.yml + PaginatedGroupList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: filestorage_v3.yml + PaginatedIssueList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: filestorage_v3.yml + PaginatedSyncStatusList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: filestorage_v3.yml + PaginatedUserList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: filestorage_v3.yml + PermissionUser: + discriminated: false + docs: >- + The user that is granted this permission. This will only be populated if + the type is `USER`. + union: + - type: string + validation: + format: uuid + - User + source: + openapi: filestorage_v3.yml + inline: true + PermissionGroup: + discriminated: false + docs: >- + The group that is granted this permission. This will only be populated if + the type is `GROUP`. + union: + - type: string + validation: + format: uuid + - Group + source: + openapi: filestorage_v3.yml + inline: true + PermissionType: + discriminated: false + docs: |- + Denotes what type of people have access to the file. + + * `USER` - USER + * `GROUP` - GROUP + * `COMPANY` - COMPANY + * `ANYONE` - ANYONE + union: + - TypeEnum + - string + source: + openapi: filestorage_v3.yml + inline: true + PermissionRolesItem: + discriminated: false + docs: |- + The permissions that the user or group has for the File or Folder. + + * `READ` - READ + * `WRITE` - WRITE + * `OWNER` - OWNER + union: + - RolesEnum + - string + source: + openapi: filestorage_v3.yml + inline: true + Permission: + docs: >- + # The Permission Object + + ### Description + + The Permission object is used to represent a user's or group's access to a + File or Folder. Permissions are unexpanded by default. + + + ### Usage Example + + Fetch from the `GET Files` or `GET Folders` endpoint. Permissions are + unexpanded by default. Use the query param `expand=permissions` to see + more details. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + user: + type: optional + docs: >- + The user that is granted this permission. This will only be populated + if the type is `USER`. + group: + type: optional + docs: >- + The group that is granted this permission. This will only be populated + if the type is `GROUP`. + type: + type: optional + docs: |- + Denotes what type of people have access to the file. + + * `USER` - USER + * `GROUP` - GROUP + * `COMPANY` - COMPANY + * `ANYONE` - ANYONE + roles: + type: optional>> + docs: >- + The permissions that the user or group has for the File or Folder. It + is possible for a user or group to have multiple roles, such as + viewing & uploading. Possible values include: `READ`, `WRITE`, + `OWNER`. In cases where there is no clear mapping, the original value + passed through will be returned. + source: + openapi: filestorage_v3.yml + PermissionRequestUser: + discriminated: false + docs: >- + The user that is granted this permission. This will only be populated if + the type is `USER`. + union: + - type: string + validation: + format: uuid + - User + source: + openapi: filestorage_v3.yml + inline: true + PermissionRequestGroup: + discriminated: false + docs: >- + The group that is granted this permission. This will only be populated if + the type is `GROUP`. + union: + - type: string + validation: + format: uuid + - Group + source: + openapi: filestorage_v3.yml + inline: true + PermissionRequestType: + discriminated: false + docs: |- + Denotes what type of people have access to the file. + + * `USER` - USER + * `GROUP` - GROUP + * `COMPANY` - COMPANY + * `ANYONE` - ANYONE + union: + - TypeEnum + - string + source: + openapi: filestorage_v3.yml + inline: true + PermissionRequestRolesItem: + discriminated: false + docs: |- + The permissions that the user or group has for the File or Folder. + + * `READ` - READ + * `WRITE` - WRITE + * `OWNER` - OWNER + union: + - RolesEnum + - string + source: + openapi: filestorage_v3.yml + inline: true + PermissionRequest: + docs: >- + # The Permission Object + + ### Description + + The Permission object is used to represent a user's or group's access to a + File or Folder. Permissions are unexpanded by default. + + + ### Usage Example + + Fetch from the `GET Files` or `GET Folders` endpoint. Permissions are + unexpanded by default. Use the query param `expand=permissions` to see + more details. + properties: + remote_id: + type: optional + docs: The third-party API ID of the matching object. + user: + type: optional + docs: >- + The user that is granted this permission. This will only be populated + if the type is `USER`. + group: + type: optional + docs: >- + The group that is granted this permission. This will only be populated + if the type is `GROUP`. + type: + type: optional + docs: |- + Denotes what type of people have access to the file. + + * `USER` - USER + * `GROUP` - GROUP + * `COMPANY` - COMPANY + * `ANYONE` - ANYONE + roles: + type: optional>> + docs: >- + The permissions that the user or group has for the File or Folder. It + is possible for a user or group to have multiple roles, such as + viewing & uploading. Possible values include: `READ`, `WRITE`, + `OWNER`. In cases where there is no clear mapping, the original value + passed through will be returned. + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: filestorage_v3.yml + RemoteData: + docs: >- + # The RemoteData Object + + ### Description + + The `RemoteData` object is used to represent the full data pulled from the + third-party API for an object. + + + ### Usage Example + + TODO + properties: + path: + type: string + docs: The third-party API path that is being called. + data: + type: optional + access: read-only + source: + openapi: filestorage_v3.yml + RemoteEndpointInfo: + properties: + method: string + url_path: string + field_traversal_path: list + source: + openapi: filestorage_v3.yml + RemoteFieldApiCoverage: + discriminated: false + union: + - integer + - double + source: + openapi: filestorage_v3.yml + inline: true + RemoteFieldApi: + properties: + schema: map + remote_key_name: string + remote_endpoint_info: RemoteEndpointInfo + example_values: optional> + advanced_metadata: optional + coverage: + type: optional + access: read-only + source: + openapi: filestorage_v3.yml + RemoteFieldApiResponse: + properties: + File: optional> + Folder: optional> + Drive: optional> + Group: optional> + User: optional> + source: + openapi: filestorage_v3.yml + RemoteKey: + docs: >- + # The RemoteKey Object + + ### Description + + The `RemoteKey` object is used to represent a request for a new remote + key. + + + ### Usage Example + + Post a `GenerateRemoteKey` to receive a new `RemoteKey`. + properties: + name: string + key: string + source: + openapi: filestorage_v3.yml + RemoteResponseResponseType: + discriminated: false + union: + - ResponseTypeEnum + - string + source: + openapi: filestorage_v3.yml + inline: true + RemoteResponse: + docs: >- + # The RemoteResponse Object + + ### Description + + The `RemoteResponse` object is used to represent information returned from + a third-party endpoint. + + + ### Usage Example + + View the `RemoteResponse` returned from your `DataPassthrough`. + properties: + method: string + path: string + status: integer + response: unknown + response_headers: optional> + response_type: optional + headers: optional> + source: + openapi: filestorage_v3.yml + RequestFormatEnum: + enum: + - JSON + - XML + - MULTIPART + docs: |- + * `JSON` - JSON + * `XML` - XML + * `MULTIPART` - MULTIPART + source: + openapi: filestorage_v3.yml + ResponseTypeEnum: + enum: + - JSON + - BASE64_GZIP + docs: |- + * `JSON` - JSON + * `BASE64_GZIP` - BASE64_GZIP + source: + openapi: filestorage_v3.yml + RoleEnum: + enum: + - ADMIN + - DEVELOPER + - MEMBER + - API + - SYSTEM + - MERGE_TEAM + docs: |- + * `ADMIN` - ADMIN + * `DEVELOPER` - DEVELOPER + * `MEMBER` - MEMBER + * `API` - API + * `SYSTEM` - SYSTEM + * `MERGE_TEAM` - MERGE_TEAM + source: + openapi: filestorage_v3.yml + RolesEnum: + enum: + - READ + - WRITE + - OWNER + docs: |- + * `READ` - READ + * `WRITE` - WRITE + * `OWNER` - OWNER + source: + openapi: filestorage_v3.yml + SelectiveSyncConfigurationsUsageEnum: + enum: + - IN_NEXT_SYNC + - IN_LAST_SYNC + docs: |- + * `IN_NEXT_SYNC` - IN_NEXT_SYNC + * `IN_LAST_SYNC` - IN_LAST_SYNC + source: + openapi: filestorage_v3.yml + StatusFd5Enum: + enum: + - SYNCING + - DONE + - FAILED + - DISABLED + - PAUSED + - PARTIALLY_SYNCED + docs: |- + * `SYNCING` - SYNCING + * `DONE` - DONE + * `FAILED` - FAILED + * `DISABLED` - DISABLED + * `PAUSED` - PAUSED + * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED + source: + openapi: filestorage_v3.yml + SyncStatusLastSyncResult: + discriminated: false + union: + - LastSyncResultEnum + - string + source: + openapi: filestorage_v3.yml + inline: true + SyncStatusStatus: + discriminated: false + union: + - StatusFd5Enum + - string + source: + openapi: filestorage_v3.yml + inline: true + SyncStatus: + docs: >- + # The SyncStatus Object + + ### Description + + The `SyncStatus` object is used to represent the syncing state of an + account + + + ### Usage Example + + View the `SyncStatus` for an account to see how recently its models were + synced. + properties: + model_name: string + model_id: string + last_sync_start: optional + next_sync_start: optional + last_sync_result: optional + last_sync_finished: optional + status: SyncStatusStatus + is_initial_sync: boolean + selective_sync_configurations_usage: optional + source: + openapi: filestorage_v3.yml + TypeEnum: + enum: + - USER + - GROUP + - COMPANY + - ANYONE + docs: |- + * `USER` - USER + * `GROUP` - GROUP + * `COMPANY` - COMPANY + * `ANYONE` - ANYONE + source: + openapi: filestorage_v3.yml + User: + docs: >- + # The User Object + + ### Description + + The `User` object is used to represent a user within the File Storage + account. + + ### Usage Example + + Fetch from the `GET /api/filestorage/v1/users` endpoint and view their + users. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The user's name. + validation: + maxLength: 254 + email_address: + type: optional + docs: >- + The user's email address. This is typically used to identify a user + across linked accounts. + validation: + maxLength: 2000 + is_me: + type: optional + docs: Whether the user is the one who linked this account. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: filestorage_v3.yml + ValidationProblemSource: + properties: + pointer: string + source: + openapi: filestorage_v3.yml + WarningValidationProblem: + properties: + source: optional + title: string + detail: string + problem_type: string + source: + openapi: filestorage_v3.yml + WebhookReceiver: + properties: + event: string + is_active: boolean + key: optional + source: + openapi: filestorage_v3.yml diff --git a/.mock/definition/FileStorage/accountDetails.yml b/.mock/definition/FileStorage/accountDetails.yml new file mode 100644 index 000000000..10e44e403 --- /dev/null +++ b/.mock/definition/FileStorage/accountDetails.yml @@ -0,0 +1,36 @@ +imports: + fileStorageRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + retrieve: + path: /filestorage/v1/account-details + method: GET + auth: true + docs: Get details for a linked account. + source: + openapi: filestorage_v3.yml + response: + docs: '' + type: fileStorageRoot.AccountDetails + status-code: 200 + examples: + - headers: {} + response: + body: + id: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd + integration: BambooHR + integration_slug: bamboohr + category: hris + end_user_origin_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + end_user_organization_name: Waystar Royco + end_user_email_address: kendall.roy@waystar-royco.com + status: COMPLETE + webhook_listener_url: >- + https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 + is_duplicate: true + account_type: PRODUCTION + completed_at: '2024-08-26T20:11:19Z' + source: + openapi: filestorage_v3.yml diff --git a/.mock/definition/FileStorage/accountToken.yml b/.mock/definition/FileStorage/accountToken.yml new file mode 100644 index 000000000..46dc75e8d --- /dev/null +++ b/.mock/definition/FileStorage/accountToken.yml @@ -0,0 +1,44 @@ +imports: + fileStorageRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + retrieve: + path: /filestorage/v1/account-token/{public_token} + method: GET + auth: true + docs: >- + Returns the account token for the end user with the provided public + token. + source: + openapi: filestorage_v3.yml + path-parameters: + public_token: string + response: + docs: '' + type: fileStorageRoot.AccountToken + status-code: 200 + examples: + - path-parameters: + public_token: public_token + response: + body: + account_token: T9klMDQrcHdm9jrtHuOS2Nf06BIHwMNjpPXPMB + integration: + name: name + abbreviated_name: abbreviated_name + categories: + - hris + image: image + square_image: square_image + color: color + slug: slug + api_endpoints_to_documentation_urls: + key: value + webhook_setup_guide_url: webhook_setup_guide_url + category_beta_status: + key: value + id: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd + source: + openapi: filestorage_v3.yml diff --git a/.mock/definition/FileStorage/asyncPassthrough.yml b/.mock/definition/FileStorage/asyncPassthrough.yml new file mode 100644 index 000000000..f05f2a0fa --- /dev/null +++ b/.mock/definition/FileStorage/asyncPassthrough.yml @@ -0,0 +1,70 @@ +imports: + fileStorageRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /filestorage/v1/async-passthrough + method: POST + auth: true + docs: >- + Asynchronously pull data from an endpoint not currently supported by + Merge. + source: + openapi: filestorage_v3.yml + request: + body: fileStorageRoot.DataPassthroughRequest + content-type: application/json + response: + docs: '' + type: fileStorageRoot.AsyncPassthroughReciept + status-code: 200 + examples: + - headers: {} + request: + method: GET + path: /scooters + response: + body: + async_passthrough_receipt_id: fd29020f-2695-445e-922e-dcd5e81903fd + retrieve: + path: /filestorage/v1/async-passthrough/{async_passthrough_receipt_id} + method: GET + auth: true + docs: Retrieves data from earlier async-passthrough POST request + source: + openapi: filestorage_v3.yml + path-parameters: + async_passthrough_receipt_id: string + response: + docs: '' + type: AsyncPassthroughRetrieveResponse + status-code: 200 + examples: + - path-parameters: + async_passthrough_receipt_id: async_passthrough_receipt_id + headers: {} + response: + body: + method: GET + path: /scooters + status: 200 + response: + key: value + response_headers: + X-Page-Token: value + response_type: JSON + headers: + EXTRA-HEADER: value + Authorization: + source: + openapi: filestorage_v3.yml +types: + AsyncPassthroughRetrieveResponse: + discriminated: false + union: + - fileStorageRoot.RemoteResponse + - string + source: + openapi: filestorage_v3.yml diff --git a/.mock/definition/FileStorage/auditTrail.yml b/.mock/definition/FileStorage/auditTrail.yml new file mode 100644 index 000000000..68b1f4197 --- /dev/null +++ b/.mock/definition/FileStorage/auditTrail.yml @@ -0,0 +1,98 @@ +imports: + fileStorageRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /filestorage/v1/audit-trail + method: GET + auth: true + docs: Gets a list of audit trail events. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: filestorage_v3.yml + request: + name: AuditTrailListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + end_date: + type: optional + docs: >- + If included, will only include audit trail events that occurred + before this time + event_type: + type: optional + docs: >- + 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: + type: optional + docs: Number of results to return per page. + start_date: + type: optional + docs: >- + If included, will only include audit trail events that occurred + after this time + user_email: + type: optional + docs: >- + 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. + response: + docs: '' + type: fileStorageRoot.PaginatedAuditLogEventList + status-code: 200 + examples: + - response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: b5ceea2a-7171-47ce-8090-165cfce5572c + user_name: Gil Feig + user_email: hello@merge.dev + role: ADMIN + ip_address: 192.0.2.123 + event_type: CREATED_REMOTE_PRODUCTION_API_KEY + event_description: >- + Organization-wide Scopes for model hris.Employee updated + from Read to Read+Write + created_at: '2024-01-15T09:30:00Z' + source: + openapi: filestorage_v3.yml diff --git a/.mock/definition/FileStorage/availableActions.yml b/.mock/definition/FileStorage/availableActions.yml new file mode 100644 index 000000000..9bfd87466 --- /dev/null +++ b/.mock/definition/FileStorage/availableActions.yml @@ -0,0 +1,50 @@ +imports: + fileStorageRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + retrieve: + path: /filestorage/v1/available-actions + method: GET + auth: true + docs: Returns a list of models and actions available for an account. + source: + openapi: filestorage_v3.yml + response: + docs: '' + type: fileStorageRoot.AvailableActions + status-code: 200 + examples: + - headers: {} + response: + body: + integration: + name: name + abbreviated_name: abbreviated_name + categories: + - hris + image: image + square_image: square_image + color: color + slug: slug + api_endpoints_to_documentation_urls: + key: value + webhook_setup_guide_url: webhook_setup_guide_url + category_beta_status: + key: value + passthrough_available: true + available_model_operations: + - model_name: Candidate + available_operations: + - FETCH + - CREATE + required_post_parameters: + - remote_user_id + supported_fields: + - first_name + - last_name + - company + - title + source: + openapi: filestorage_v3.yml diff --git a/.mock/definition/FileStorage/deleteAccount.yml b/.mock/definition/FileStorage/deleteAccount.yml new file mode 100644 index 000000000..5ebc5c5c7 --- /dev/null +++ b/.mock/definition/FileStorage/deleteAccount.yml @@ -0,0 +1,15 @@ +service: + auth: false + base-path: '' + endpoints: + delete: + path: /filestorage/v1/delete-account + method: POST + auth: true + docs: Delete a linked account. + source: + openapi: filestorage_v3.yml + examples: + - headers: {} + source: + openapi: filestorage_v3.yml diff --git a/.mock/definition/FileStorage/drives.yml b/.mock/definition/FileStorage/drives.yml new file mode 100644 index 000000000..848f87736 --- /dev/null +++ b/.mock/definition/FileStorage/drives.yml @@ -0,0 +1,149 @@ +imports: + fileStorageRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /filestorage/v1/drives + method: GET + auth: true + docs: Returns a list of `Drive` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: filestorage_v3.yml + request: + name: DrivesListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + name: + type: optional + docs: >- + If provided, will only return drives with this name. This performs + an exact match. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: fileStorageRoot.PaginatedDriveList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: f9e3d315-d6c2-458e-85c4-fa773d6ff4a6 + remote_id: '2039348' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: My Drive + remote_created_at: '2024-01-15T09:30:00Z' + drive_url: https://drive.com/drives/2039349 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /drives + data: + - Varies by platform + retrieve: + path: /filestorage/v1/drives/{id} + method: GET + auth: true + docs: Returns a `Drive` object with the given `id`. + source: + openapi: filestorage_v3.yml + path-parameters: + id: string + request: + name: DrivesRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: fileStorageRoot.Drive + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: f9e3d315-d6c2-458e-85c4-fa773d6ff4a6 + remote_id: '2039348' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: My Drive + remote_created_at: '2024-01-15T09:30:00Z' + drive_url: https://drive.com/drives/2039349 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /drives + data: + - Varies by platform + source: + openapi: filestorage_v3.yml diff --git a/.mock/definition/FileStorage/fieldMapping.yml b/.mock/definition/FileStorage/fieldMapping.yml new file mode 100644 index 000000000..86edc0b68 --- /dev/null +++ b/.mock/definition/FileStorage/fieldMapping.yml @@ -0,0 +1,518 @@ +imports: + fileStorageRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + field_mappings_retrieve: + path: /filestorage/v1/field-mappings + method: GET + auth: true + docs: >- + 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/). + source: + openapi: filestorage_v3.yml + request: + name: FieldMappingsRetrieveRequest + query-parameters: + exclude_remote_field_metadata: + type: optional + docs: >- + 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. + response: + docs: '' + type: fileStorageRoot.FieldMappingApiInstanceResponse + status-code: 200 + examples: + - headers: {} + response: + body: + File: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Folder: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Drive: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Group: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + User: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + field_mappings_create: + path: /filestorage/v1/field-mappings + method: POST + auth: true + docs: >- + 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. + source: + openapi: filestorage_v3.yml + request: + name: CreateFieldMappingRequest + query-parameters: + exclude_remote_field_metadata: + type: optional + docs: >- + 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. + body: + properties: + target_field_name: + type: string + docs: >- + The name of the target field you want this remote field to map + to. + validation: + minLength: 1 + target_field_description: + type: string + docs: >- + The description of the target field you want this remote field + to map to. + validation: + minLength: 1 + remote_field_traversal_path: + docs: >- + The field traversal path of the remote field listed when you hit + the GET /remote-fields endpoint. + type: list + remote_method: + type: string + docs: >- + The method of the remote endpoint where the remote field is + coming from. + validation: + minLength: 1 + remote_url_path: + type: string + docs: >- + The path of the remote endpoint where the remote field is coming + from. + validation: + minLength: 1 + common_model_name: + type: string + docs: >- + The name of the Common Model that the remote field corresponds + to in a given category. + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: fileStorageRoot.FieldMappingInstanceResponse + status-code: 201 + examples: + - headers: {} + request: + 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 + response: + body: + model: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + field_mappings_destroy: + path: /filestorage/v1/field-mappings/{field_mapping_id} + method: DELETE + auth: true + docs: >- + 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. + source: + openapi: filestorage_v3.yml + path-parameters: + field_mapping_id: string + response: + docs: '' + type: fileStorageRoot.FieldMappingInstanceResponse + status-code: 204 + examples: + - path-parameters: + field_mapping_id: field_mapping_id + headers: {} + response: + body: + model: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + field_mappings_partial_update: + path: /filestorage/v1/field-mappings/{field_mapping_id} + method: PATCH + auth: true + docs: >- + 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. + source: + openapi: filestorage_v3.yml + path-parameters: + field_mapping_id: string + request: + name: PatchedEditFieldMappingRequest + body: + properties: + remote_field_traversal_path: + type: optional> + docs: >- + The field traversal path of the remote field listed when you hit + the GET /remote-fields endpoint. + remote_method: + type: optional + docs: >- + The method of the remote endpoint where the remote field is + coming from. + validation: + minLength: 1 + remote_url_path: + type: optional + docs: >- + The path of the remote endpoint where the remote field is coming + from. + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: fileStorageRoot.FieldMappingInstanceResponse + status-code: 200 + examples: + - path-parameters: + field_mapping_id: field_mapping_id + headers: {} + request: {} + response: + body: + model: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + remote_fields_retrieve: + path: /filestorage/v1/remote-fields + method: GET + auth: true + docs: >- + 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/). + source: + openapi: filestorage_v3.yml + request: + name: RemoteFieldsRetrieveRequest + query-parameters: + common_models: + type: optional + docs: >- + A comma seperated list of Common Model names. If included, will + only return Remote Fields for those Common Models. + include_example_values: + type: optional + docs: >- + 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. + response: + docs: '' + type: fileStorageRoot.RemoteFieldApiResponse + status-code: 200 + examples: + - headers: {} + response: + body: + File: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Folder: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Drive: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Group: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + User: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + target_fields_retrieve: + path: /filestorage/v1/target-fields + method: GET + auth: true + docs: >- + 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/). + source: + openapi: filestorage_v3.yml + response: + docs: '' + type: fileStorageRoot.ExternalTargetFieldApiResponse + status-code: 200 + examples: + - headers: {} + response: + body: + File: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Folder: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Drive: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Group: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + User: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + source: + openapi: filestorage_v3.yml diff --git a/.mock/definition/FileStorage/files.yml b/.mock/definition/FileStorage/files.yml new file mode 100644 index 000000000..442ca43fc --- /dev/null +++ b/.mock/definition/FileStorage/files.yml @@ -0,0 +1,666 @@ +types: + FilesListRequestExpandItem: + enum: + - drive + - folder + - permissions + source: + openapi: filestorage_v3.yml + FilesListRequestOrderBy: + enum: + - value: '-created_at' + name: CreatedAtDescending + - value: '-modified_at' + name: ModifiedAtDescending + - value: created_at + name: CreatedAtAscending + - value: modified_at + name: ModifiedAtAscending + source: + openapi: filestorage_v3.yml + FilesRetrieveRequestExpandItem: + enum: + - drive + - folder + - permissions + source: + openapi: filestorage_v3.yml + FilesDownloadRequestMetaListRequestOrderBy: + enum: + - value: '-created_at' + name: CreatedAtDescending + - value: '-modified_at' + name: ModifiedAtDescending + - value: created_at + name: CreatedAtAscending + - value: modified_at + name: ModifiedAtAscending + source: + openapi: filestorage_v3.yml +imports: + fileStorageRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /filestorage/v1/files + method: GET + auth: true + docs: Returns a list of `File` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: filestorage_v3.yml + request: + name: FilesListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + drive_id: + type: optional + docs: >- + Specifying a drive id returns only the files in that drive. + Specifying null returns only the files outside the top-level + drive. + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + folder_id: + type: optional + docs: >- + Specifying a folder id returns only the files in that folder. + Specifying null returns only the files in root directory. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + mime_type: + type: optional + docs: >- + If provided, will only return files with these mime_types. + Multiple values can be separated by commas. + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + name: + type: optional + docs: >- + If provided, will only return files with this name. This performs + an exact match. + order_by: + type: optional + docs: >- + Overrides the default ordering for this endpoint. Possible values + include: created_at, -created_at, modified_at, -modified_at. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: fileStorageRoot.PaginatedFileList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 45ce474c-dhcj-43a6-754r-629f799f7d68 + remote_id: '12' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: merge_file_storage_launch.docx + file_url: https://drive.com/1234 + file_thumbnail_url: https://drive.com/1234/thumbnail.png + size: 254 + mime_type: >- + application/vnd.openxmlformats-officedocument.wordprocessingml.document + description: >- + Use common model scopes to redact data returned in Merge's + Common Models! + folder: folder + checksum: + type: sha256 + content_hash: >- + e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 + permissions: permissions + drive: drive + remote_created_at: '2022-02-02T00:00:00Z' + remote_updated_at: '2022-02-03T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /files + data: + - Varies by platform + create: + path: /filestorage/v1/files + method: POST + auth: true + docs: Creates a `File` object with the given values. + source: + openapi: filestorage_v3.yml + request: + name: FileStorageFileEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: fileStorageRoot.FileRequest + content-type: application/json + response: + docs: '' + type: fileStorageRoot.FileStorageFileResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: 45ce474c-dhcj-43a6-754r-629f799f7d68 + remote_id: '12' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: merge_file_storage_launch.docx + file_url: https://drive.com/1234 + file_thumbnail_url: https://drive.com/1234/thumbnail.png + size: 254 + mime_type: >- + application/vnd.openxmlformats-officedocument.wordprocessingml.document + description: >- + Use common model scopes to redact data returned in Merge's + Common Models! + folder: folder + checksum: + type: sha256 + content_hash: >- + e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 + permissions: permissions + drive: drive + remote_created_at: '2022-02-02T00:00:00Z' + remote_updated_at: '2022-02-03T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /files + data: + - Varies by platform + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /filestorage/v1/files/{id} + method: GET + auth: true + docs: Returns a `File` object with the given `id`. + source: + openapi: filestorage_v3.yml + path-parameters: + id: string + request: + name: FilesRetrieveRequest + query-parameters: + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: fileStorageRoot.File + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 45ce474c-dhcj-43a6-754r-629f799f7d68 + remote_id: '12' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: merge_file_storage_launch.docx + file_url: https://drive.com/1234 + file_thumbnail_url: https://drive.com/1234/thumbnail.png + size: 254 + mime_type: >- + application/vnd.openxmlformats-officedocument.wordprocessingml.document + description: >- + Use common model scopes to redact data returned in Merge's + Common Models! + folder: folder + checksum: + type: sha256 + content_hash: >- + e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 + permissions: permissions + drive: drive + remote_created_at: '2022-02-02T00:00:00Z' + remote_updated_at: '2022-02-03T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /files + data: + - Varies by platform + downloadRetrieve: + path: /filestorage/v1/files/{id}/download + method: GET + auth: true + docs: Returns the `File` content with the given `id` as a stream of bytes. + source: + openapi: filestorage_v3.yml + path-parameters: + id: string + request: + name: FilesDownloadRetrieveRequest + query-parameters: + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + mime_type: + type: optional + docs: >- + If provided, specifies the export format of the file to be + downloaded. For information on supported export formats, please + refer to our export format help center article. + response: + docs: '' + type: file + status-code: 200 + downloadRequestMetaRetrieve: + path: /filestorage/v1/files/{id}/download/request-meta + method: GET + auth: true + docs: >- + Returns metadata to construct an authenticated file download request for + a singular file, allowing you to download file directly from the + third-party. + source: + openapi: filestorage_v3.yml + path-parameters: + id: string + request: + name: FilesDownloadRequestMetaRetrieveRequest + query-parameters: + mime_type: + type: optional + docs: >- + If provided, specifies the export format of the file to be + downloaded. For information on supported export formats, please + refer to our export format help center article. + response: + docs: '' + type: fileStorageRoot.DownloadRequestMeta + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + url: https://www.googleapis.com/drive/v3/files/234?alt=media + method: GET + headers: + Authorization: Bearer 1234 + downloadRequestMetaList: + path: /filestorage/v1/files/download/request-meta + method: GET + auth: true + docs: >- + Returns metadata to construct authenticated file download requests, + allowing you to download files directly from the third-party. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: filestorage_v3.yml + request: + name: FilesDownloadRequestMetaListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + 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/). + mime_types: + type: optional + docs: >- + A comma-separated list of preferred MIME types in order of + priority. If supported by the third-party provider, the file(s) + will be returned in the first supported MIME type from the list. + The default MIME type is PDF. To see supported MIME types by file + type, refer to our export format help center article. + modified_after: + type: optional + docs: >- + If provided, will only return objects modified after this + datetime. + modified_before: + type: optional + docs: >- + If provided, will only return objects modified before this + datetime. + order_by: + type: optional + docs: >- + Overrides the default ordering for this endpoint. Possible values + include: created_at, -created_at, modified_at, -modified_at. + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: fileStorageRoot.PaginatedDownloadRequestMetaList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + url: https://www.googleapis.com/drive/v3/files/234?alt=media + method: GET + headers: + Authorization: Bearer 1234 + metaPostRetrieve: + path: /filestorage/v1/files/meta/post + method: GET + auth: true + docs: Returns metadata for `FileStorageFile` POSTs. + source: + openapi: filestorage_v3.yml + response: + docs: '' + type: fileStorageRoot.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + source: + openapi: filestorage_v3.yml diff --git a/.mock/definition/FileStorage/folders.yml b/.mock/definition/FileStorage/folders.yml new file mode 100644 index 000000000..c115e0664 --- /dev/null +++ b/.mock/definition/FileStorage/folders.yml @@ -0,0 +1,456 @@ +types: + FoldersListRequestExpandItem: + enum: + - drive + - parent_folder + - permissions + source: + openapi: filestorage_v3.yml + FoldersRetrieveRequestExpandItem: + enum: + - drive + - parent_folder + - permissions + source: + openapi: filestorage_v3.yml +imports: + fileStorageRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /filestorage/v1/folders + method: GET + auth: true + docs: Returns a list of `Folder` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: filestorage_v3.yml + request: + name: FoldersListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + drive_id: + type: optional + docs: If provided, will only return folders in this drive. + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + name: + type: optional + docs: >- + If provided, will only return folders with this name. This + performs an exact match. + page_size: + type: optional + docs: Number of results to return per page. + parent_folder_id: + type: optional + docs: >- + If provided, will only return folders in this parent folder. If + null, will return folders in root directory. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: fileStorageRoot.PaginatedFolderList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: e021f7a7-74fc-4487-8e12-14180c92d3b7 + remote_id: '14' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: R&D + folder_url: https://drive.com/1234 + size: 2738000 + description: All things R&D related at Merge! + parent_folder: parent_folder + drive: drive + permissions: permissions + remote_created_at: '2024-02-02T00:00:00Z' + remote_updated_at: '2024-06-10T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /folders + data: + - Varies by platform + create: + path: /filestorage/v1/folders + method: POST + auth: true + docs: Creates a `Folder` object with the given values. + source: + openapi: filestorage_v3.yml + request: + name: FileStorageFolderEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: fileStorageRoot.FolderRequest + content-type: application/json + response: + docs: '' + type: fileStorageRoot.FileStorageFolderResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: e021f7a7-74fc-4487-8e12-14180c92d3b7 + remote_id: '14' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: R&D + folder_url: https://drive.com/1234 + size: 2738000 + description: All things R&D related at Merge! + parent_folder: parent_folder + drive: drive + permissions: permissions + remote_created_at: '2024-02-02T00:00:00Z' + remote_updated_at: '2024-06-10T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /folders + data: + - Varies by platform + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /filestorage/v1/folders/{id} + method: GET + auth: true + docs: Returns a `Folder` object with the given `id`. + source: + openapi: filestorage_v3.yml + path-parameters: + id: string + request: + name: FoldersRetrieveRequest + query-parameters: + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: fileStorageRoot.Folder + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: e021f7a7-74fc-4487-8e12-14180c92d3b7 + remote_id: '14' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: R&D + folder_url: https://drive.com/1234 + size: 2738000 + description: All things R&D related at Merge! + parent_folder: parent_folder + drive: drive + permissions: permissions + remote_created_at: '2024-02-02T00:00:00Z' + remote_updated_at: '2024-06-10T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /folders + data: + - Varies by platform + metaPostRetrieve: + path: /filestorage/v1/folders/meta/post + method: GET + auth: true + docs: Returns metadata for `FileStorageFolder` POSTs. + source: + openapi: filestorage_v3.yml + response: + docs: '' + type: fileStorageRoot.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + source: + openapi: filestorage_v3.yml diff --git a/.mock/definition/FileStorage/forceResync.yml b/.mock/definition/FileStorage/forceResync.yml new file mode 100644 index 000000000..5a4ee92f5 --- /dev/null +++ b/.mock/definition/FileStorage/forceResync.yml @@ -0,0 +1,37 @@ +imports: + fileStorageRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + sync_status_resync_create: + path: /filestorage/v1/sync-status/resync + method: POST + auth: true + docs: >- + 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. + source: + openapi: filestorage_v3.yml + response: + docs: '' + type: list + status-code: 200 + examples: + - headers: {} + response: + body: + - model_name: File + model_id: filestorage.FileStorageFile + last_sync_start: '2021-03-30T19:44:18Z' + next_sync_start: '2021-03-30T20:44:18Z' + last_sync_result: SYNCING + last_sync_finished: '2021-03-30T19:55:18Z' + status: SYNCING + is_initial_sync: true + selective_sync_configurations_usage: IN_NEXT_SYNC + source: + openapi: filestorage_v3.yml diff --git a/.mock/definition/FileStorage/generateKey.yml b/.mock/definition/FileStorage/generateKey.yml new file mode 100644 index 000000000..947aa9307 --- /dev/null +++ b/.mock/definition/FileStorage/generateKey.yml @@ -0,0 +1,36 @@ +imports: + fileStorageRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /filestorage/v1/generate-key + method: POST + auth: true + docs: Create a remote key. + source: + openapi: filestorage_v3.yml + request: + name: GenerateRemoteKeyRequest + body: + properties: + name: + type: string + docs: The name of the remote key + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: fileStorageRoot.RemoteKey + status-code: 200 + examples: + - request: + name: Remote Deployment Key 1 + response: + body: + name: Remote Deployment Key 1 + key: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA + source: + openapi: filestorage_v3.yml diff --git a/.mock/definition/FileStorage/groups.yml b/.mock/definition/FileStorage/groups.yml new file mode 100644 index 000000000..721be36b7 --- /dev/null +++ b/.mock/definition/FileStorage/groups.yml @@ -0,0 +1,173 @@ +types: + GroupsListRequestExpandItem: + enum: + - child_groups + - users + source: + openapi: filestorage_v3.yml + GroupsRetrieveRequestExpandItem: + enum: + - child_groups + - users + source: + openapi: filestorage_v3.yml +imports: + fileStorageRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /filestorage/v1/groups + method: GET + auth: true + docs: Returns a list of `Group` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: filestorage_v3.yml + request: + name: GroupsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: fileStorageRoot.PaginatedGroupList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 5624aceb-0ea2-4864-ba08-354ac56b9884 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Administrators + users: + - 6e93361b-8ae7-444b-bfa2-71206cbbee24 + child_groups: + - a1f90b3c-633d-404e-a696-05cd54808676 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /groups + data: + - Varies by platform + retrieve: + path: /filestorage/v1/groups/{id} + method: GET + auth: true + docs: Returns a `Group` object with the given `id`. + source: + openapi: filestorage_v3.yml + path-parameters: + id: string + request: + name: GroupsRetrieveRequest + query-parameters: + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: fileStorageRoot.Group + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 5624aceb-0ea2-4864-ba08-354ac56b9884 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Administrators + users: + - 6e93361b-8ae7-444b-bfa2-71206cbbee24 + child_groups: + - a1f90b3c-633d-404e-a696-05cd54808676 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /groups + data: + - Varies by platform + source: + openapi: filestorage_v3.yml diff --git a/.mock/definition/FileStorage/issues.yml b/.mock/definition/FileStorage/issues.yml new file mode 100644 index 000000000..4e54131b8 --- /dev/null +++ b/.mock/definition/FileStorage/issues.yml @@ -0,0 +1,133 @@ +types: + IssuesListRequestStatus: + enum: + - ONGOING + - RESOLVED + source: + openapi: filestorage_v3.yml +imports: + fileStorageRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /filestorage/v1/issues + method: GET + auth: true + docs: Gets all issues for Organization. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: filestorage_v3.yml + request: + name: IssuesListRequest + query-parameters: + account_token: optional + cursor: + type: optional + docs: The pagination cursor value. + end_date: + type: optional + docs: >- + If included, will only include issues whose most recent action + occurred before this time + end_user_organization_name: optional + first_incident_time_after: + type: optional + docs: >- + If provided, will only return issues whose first incident time was + after this datetime. + first_incident_time_before: + type: optional + docs: >- + If provided, will only return issues whose first incident time was + before this datetime. + include_muted: + type: optional + docs: If true, will include muted issues + integration_name: optional + last_incident_time_after: + type: optional + docs: >- + If provided, will only return issues whose last incident time was + after this datetime. + last_incident_time_before: + type: optional + docs: >- + If provided, will only return issues whose last incident time was + before this datetime. + linked_account_id: + type: optional + docs: >- + If provided, will only include issues pertaining to the linked + account passed in. + page_size: + type: optional + docs: Number of results to return per page. + start_date: + type: optional + docs: >- + If included, will only include issues whose most recent action + occurred after this time + status: + type: optional + docs: |- + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + response: + docs: '' + type: fileStorageRoot.PaginatedIssueList + status-code: 200 + examples: + - response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + status: ONGOING + error_description: Missing Permissions + end_user: + key: value + first_incident_time: '2022-12-05T16:19:15Z' + last_incident_time: '2022-12-05T16:19:15Z' + is_muted: true + error_details: + - Missing employee permissions. + - Missing time off permissions. + retrieve: + path: /filestorage/v1/issues/{id} + method: GET + auth: true + docs: Get a specific issue. + source: + openapi: filestorage_v3.yml + path-parameters: + id: string + response: + docs: '' + type: fileStorageRoot.Issue + status-code: 200 + examples: + - path-parameters: + id: id + response: + body: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + status: ONGOING + error_description: Missing Permissions + end_user: + key: value + first_incident_time: '2022-12-05T16:19:15Z' + last_incident_time: '2022-12-05T16:19:15Z' + is_muted: true + error_details: + - Missing employee permissions. + - Missing time off permissions. + source: + openapi: filestorage_v3.yml diff --git a/.mock/definition/FileStorage/linkToken.yml b/.mock/definition/FileStorage/linkToken.yml new file mode 100644 index 000000000..a0124a270 --- /dev/null +++ b/.mock/definition/FileStorage/linkToken.yml @@ -0,0 +1,152 @@ +imports: + fileStorageRoot: __package__.yml +types: + EndUserDetailsRequestLanguage: + discriminated: false + docs: >- + The following subset of IETF language tags can be used to configure + localization. + + + * `en` - en + + * `de` - de + union: + - fileStorageRoot.LanguageEnum + - string + source: + openapi: filestorage_v3.yml + inline: true +service: + auth: false + base-path: '' + endpoints: + create: + path: /filestorage/v1/link-token + method: POST + auth: true + docs: Creates a link token to be used when linking a new end user. + source: + openapi: filestorage_v3.yml + request: + name: EndUserDetailsRequest + body: + properties: + end_user_email_address: + type: string + docs: >- + Your end user's email address. This is purely for identification + purposes - setting this value will not cause any emails to be + sent. + validation: + minLength: 1 + maxLength: 100 + end_user_organization_name: + type: string + docs: Your end user's organization. + validation: + minLength: 1 + maxLength: 100 + end_user_origin_id: + type: string + docs: >- + 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. + validation: + minLength: 1 + maxLength: 100 + categories: + docs: The integration categories to show in Merge Link. + type: list + integration: + type: optional + docs: >- + 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/. + validation: + minLength: 1 + link_expiry_mins: + type: optional + docs: >- + 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. + default: 30 + validation: + min: 30 + max: 10080 + should_create_magic_link_url: + type: optional + docs: >- + 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. + default: false + hide_admin_magic_link: + type: optional + docs: >- + 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. + default: false + common_models: + type: optional> + docs: >- + An array of objects to specify the models and fields that will + be disabled for a given Linked Account. Each object uses + model_id, enabled_actions, and disabled_fields to specify the + model, method, and fields that are scoped for a given Linked + Account. + category_common_model_scopes: + type: >- + optional>>> + docs: >- + When creating a Link Token, you can set permissions for Common + Models that will apply to the account that is going to be + linked. Any model or field not specified in link token payload + will default to existing settings. + language: + type: optional + docs: >- + The following subset of IETF language tags can be used to + configure localization. + + + * `en` - en + + * `de` - de + are_syncs_disabled: + type: optional + docs: >- + The boolean that indicates whether initial, periodic, and force + syncs will be disabled. + default: false + integration_specific_config: + type: optional> + docs: >- + A JSON object containing integration-specific configuration + options. + content-type: application/json + response: + docs: '' + type: fileStorageRoot.LinkToken + status-code: 200 + examples: + - request: + end_user_email_address: example@gmail.com + end_user_organization_name: Test Organization + end_user_origin_id: '12345' + categories: + - hris + - ats + response: + body: + link_token: necdP7FtdASl1fQwm62be2_dM4wBG8_GactqoUV0 + integration_name: Lever + magic_link_url: https://link.merge.dev/asdfjkl12345jsndfgi2i83n + source: + openapi: filestorage_v3.yml diff --git a/.mock/definition/FileStorage/linkedAccounts.yml b/.mock/definition/FileStorage/linkedAccounts.yml new file mode 100644 index 000000000..253d028ca --- /dev/null +++ b/.mock/definition/FileStorage/linkedAccounts.yml @@ -0,0 +1,152 @@ +types: + LinkedAccountsListRequestCategory: + enum: + - accounting + - ats + - crm + - filestorage + - hris + - mktg + - ticketing + source: + openapi: filestorage_v3.yml +imports: + fileStorageRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /filestorage/v1/linked-accounts + method: GET + auth: true + docs: List linked accounts for your organization. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: filestorage_v3.yml + request: + name: LinkedAccountsListRequest + query-parameters: + category: + type: optional + docs: >- + Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, + `mktg`, `ticketing` + + + * `hris` - hris + + * `ats` - ats + + * `accounting` - accounting + + * `ticketing` - ticketing + + * `crm` - crm + + * `mktg` - mktg + + * `filestorage` - filestorage + cursor: + type: optional + docs: The pagination cursor value. + end_user_email_address: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given email address. + end_user_organization_name: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given organization name. + end_user_origin_id: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given origin ID. + end_user_origin_ids: + type: optional + docs: >- + Comma-separated list of EndUser origin IDs, making it possible to + specify multiple EndUsers at once. + id: + type: optional + validation: + format: uuid + ids: + type: optional + docs: >- + Comma-separated list of LinkedAccount IDs, making it possible to + specify multiple LinkedAccounts at once. + include_duplicates: + type: optional + docs: >- + 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: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given integration name. + is_test_account: + type: optional + docs: >- + If included, will only include test linked accounts. If not + included, will only include non-test linked accounts. + page_size: + type: optional + docs: Number of results to return per page. + status: + type: optional + docs: >- + Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, + `RELINK_NEEDED` + response: + docs: '' + type: fileStorageRoot.PaginatedAccountDetailsAndActionsList + status-code: 200 + examples: + - response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: e59b1821-f85c-4e28-a6b3-1804156f3563 + category: hris + status: COMPLETE + status_detail: Invalid login credentials + end_user_origin_id: 3ac95cde-6c7f-4eef-afec-be710b42308d + end_user_organization_name: Foo Bar, LLC + end_user_email_address: hradmin@foobar.dev + subdomain: foobar + webhook_listener_url: >- + https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 + is_duplicate: true + integration: + name: name + categories: + - hris + color: color + slug: slug + passthrough_available: true + available_model_operations: + - model_name: Candidate + available_operations: + - FETCH + - CREATE + required_post_parameters: + - remote_user_id + supported_fields: + - first_name + - last_name + - company + - title + account_type: PRODUCTION + completed_at: '2024-08-26T20:11:19Z' + source: + openapi: filestorage_v3.yml diff --git a/.mock/definition/FileStorage/passthrough.yml b/.mock/definition/FileStorage/passthrough.yml new file mode 100644 index 000000000..f1f302631 --- /dev/null +++ b/.mock/definition/FileStorage/passthrough.yml @@ -0,0 +1,40 @@ +imports: + fileStorageRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /filestorage/v1/passthrough + method: POST + auth: true + docs: Pull data from an endpoint not currently supported by Merge. + source: + openapi: filestorage_v3.yml + request: + body: fileStorageRoot.DataPassthroughRequest + content-type: application/json + response: + docs: '' + type: fileStorageRoot.RemoteResponse + status-code: 200 + examples: + - headers: {} + request: + method: GET + path: /scooters + response: + body: + method: GET + path: /scooters + status: 200 + response: + key: value + response_headers: + X-Page-Token: value + response_type: JSON + headers: + EXTRA-HEADER: value + Authorization: + source: + openapi: filestorage_v3.yml diff --git a/.mock/definition/FileStorage/regenerateKey.yml b/.mock/definition/FileStorage/regenerateKey.yml new file mode 100644 index 000000000..6e7dbfa6e --- /dev/null +++ b/.mock/definition/FileStorage/regenerateKey.yml @@ -0,0 +1,36 @@ +imports: + fileStorageRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /filestorage/v1/regenerate-key + method: POST + auth: true + docs: Exchange remote keys. + source: + openapi: filestorage_v3.yml + request: + name: RemoteKeyForRegenerationRequest + body: + properties: + name: + type: string + docs: The name of the remote key + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: fileStorageRoot.RemoteKey + status-code: 200 + examples: + - request: + name: Remote Deployment Key 1 + response: + body: + name: Remote Deployment Key 1 + key: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA + source: + openapi: filestorage_v3.yml diff --git a/.mock/definition/FileStorage/scopes.yml b/.mock/definition/FileStorage/scopes.yml new file mode 100644 index 000000000..fd141a57b --- /dev/null +++ b/.mock/definition/FileStorage/scopes.yml @@ -0,0 +1,161 @@ +imports: + fileStorageRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + default_scopes_retrieve: + path: /filestorage/v1/default-scopes + method: GET + auth: true + docs: >- + 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). + source: + openapi: filestorage_v3.yml + response: + docs: '' + type: fileStorageRoot.CommonModelScopeApi + status-code: 200 + examples: + - response: + body: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - created_at + - custom_fields + - date_of_birth + - first_name + - gender + - remote_created_at + - remote_data + disabled_fields: + - company + - employments + - groups + - home_location + - manager + - work_location + linked_account_scopes_retrieve: + path: /filestorage/v1/linked-account-scopes + method: GET + auth: true + docs: >- + 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). + source: + openapi: filestorage_v3.yml + response: + docs: '' + type: fileStorageRoot.CommonModelScopeApi + status-code: 200 + examples: + - headers: {} + response: + body: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - created_at + - custom_fields + - date_of_birth + - first_name + - gender + - remote_created_at + - remote_data + disabled_fields: + - company + - employments + - groups + - home_location + - manager + - work_location + linked_account_scopes_create: + path: /filestorage/v1/linked-account-scopes + method: POST + auth: true + docs: >- + 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) + source: + openapi: filestorage_v3.yml + request: + name: LinkedAccountCommonModelScopeDeserializerRequest + body: + properties: + common_models: + docs: The common models you want to update the scopes for + type: >- + list + content-type: application/json + response: + docs: '' + type: fileStorageRoot.CommonModelScopeApi + status-code: 200 + examples: + - headers: {} + request: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - home_location + disabled_fields: + - work_location + - model_name: Benefit + model_permissions: + WRITE: + is_enabled: false + response: + body: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - created_at + - custom_fields + - date_of_birth + - first_name + - gender + - remote_created_at + - remote_data + disabled_fields: + - company + - employments + - groups + - home_location + - manager + - work_location + source: + openapi: filestorage_v3.yml diff --git a/.mock/definition/FileStorage/syncStatus.yml b/.mock/definition/FileStorage/syncStatus.yml new file mode 100644 index 000000000..dd0ca6da0 --- /dev/null +++ b/.mock/definition/FileStorage/syncStatus.yml @@ -0,0 +1,59 @@ +imports: + fileStorageRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /filestorage/v1/sync-status + method: GET + auth: true + docs: >- + 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). + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: filestorage_v3.yml + request: + name: SyncStatusListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: fileStorageRoot.PaginatedSyncStatusList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - model_name: File + model_id: filestorage.FileStorageFile + last_sync_start: '2021-03-30T19:44:18Z' + next_sync_start: '2021-03-30T20:44:18Z' + last_sync_result: SYNCING + last_sync_finished: '2021-03-30T19:55:18Z' + status: SYNCING + is_initial_sync: true + selective_sync_configurations_usage: IN_NEXT_SYNC + source: + openapi: filestorage_v3.yml diff --git a/.mock/definition/FileStorage/users.yml b/.mock/definition/FileStorage/users.yml new file mode 100644 index 000000000..ee742af64 --- /dev/null +++ b/.mock/definition/FileStorage/users.yml @@ -0,0 +1,147 @@ +imports: + fileStorageRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /filestorage/v1/users + method: GET + auth: true + docs: Returns a list of `User` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: filestorage_v3.yml + request: + name: UsersListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_me: + type: optional + docs: If provided, will only return the user object for requestor. + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: fileStorageRoot.PaginatedUserList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 83902e75-4362-4803-b76c-a7d6be292cbd + remote_id: '2039349' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Gil Feig + email_address: hello@merge.dev + is_me: true + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /users + data: + - Varies by platform + retrieve: + path: /filestorage/v1/users/{id} + method: GET + auth: true + docs: Returns a `User` object with the given `id`. + source: + openapi: filestorage_v3.yml + path-parameters: + id: string + request: + name: UsersRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: fileStorageRoot.User + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 83902e75-4362-4803-b76c-a7d6be292cbd + remote_id: '2039349' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Gil Feig + email_address: hello@merge.dev + is_me: true + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /users + data: + - Varies by platform + source: + openapi: filestorage_v3.yml diff --git a/.mock/definition/FileStorage/webhookReceivers.yml b/.mock/definition/FileStorage/webhookReceivers.yml new file mode 100644 index 000000000..098fa4f19 --- /dev/null +++ b/.mock/definition/FileStorage/webhookReceivers.yml @@ -0,0 +1,61 @@ +imports: + fileStorageRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /filestorage/v1/webhook-receivers + method: GET + auth: true + docs: Returns a list of `WebhookReceiver` objects. + source: + openapi: filestorage_v3.yml + response: + docs: '' + type: list + status-code: 200 + examples: + - headers: {} + response: + body: + - event: event + is_active: true + key: key + create: + path: /filestorage/v1/webhook-receivers + method: POST + auth: true + docs: Creates a `WebhookReceiver` object with the given values. + source: + openapi: filestorage_v3.yml + request: + name: WebhookReceiverRequest + body: + properties: + event: + type: string + validation: + minLength: 1 + is_active: boolean + key: + type: optional + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: fileStorageRoot.WebhookReceiver + status-code: 201 + examples: + - headers: {} + request: + event: event + is_active: true + response: + body: + event: event + is_active: true + key: key + source: + openapi: filestorage_v3.yml diff --git a/.mock/definition/HRIS/__package__.yml b/.mock/definition/HRIS/__package__.yml new file mode 100644 index 000000000..61e76ec25 --- /dev/null +++ b/.mock/definition/HRIS/__package__.yml @@ -0,0 +1,7710 @@ +types: + AccountDetailsCategory: + discriminated: false + union: + - CategoryEnum + - string + source: + openapi: hris_v3.yml + inline: true + AccountDetails: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + integration: + type: optional + access: read-only + integration_slug: + type: optional + access: read-only + category: optional + end_user_origin_id: + type: optional + access: read-only + end_user_organization_name: + type: optional + access: read-only + end_user_email_address: + type: optional + validation: + format: email + access: read-only + status: + type: optional + access: read-only + webhook_listener_url: + type: optional + validation: + format: uri + access: read-only + is_duplicate: + type: optional + docs: >- + Whether a Production Linked Account's credentials match another + existing Production Linked Account. This field is `null` for Test + Linked Accounts, incomplete Production Linked Accounts, and ignored + duplicate Production Linked Account sets. + access: read-only + account_type: + type: optional + access: read-only + completed_at: + type: optional + docs: The time at which account completes the linking flow. + source: + openapi: hris_v3.yml + AccountDetailsAndActionsCategory: + discriminated: false + union: + - CategoryEnum + - string + source: + openapi: hris_v3.yml + inline: true + AccountDetailsAndActionsStatus: + discriminated: false + union: + - AccountDetailsAndActionsStatusEnum + - string + source: + openapi: hris_v3.yml + inline: true + AccountDetailsAndActions: + docs: >- + # The LinkedAccount Object + + ### Description + + The `LinkedAccount` object is used to represent an end user's link with a + specific integration. + + + ### Usage Example + + View a list of your organization's `LinkedAccount` objects. + properties: + id: string + category: optional + status: AccountDetailsAndActionsStatus + status_detail: optional + end_user_origin_id: optional + end_user_organization_name: string + end_user_email_address: string + subdomain: + type: optional + docs: The tenant or domain the customer has provided access to. + webhook_listener_url: string + is_duplicate: + type: optional + docs: >- + Whether a Production Linked Account's credentials match another + existing Production Linked Account. This field is `null` for Test + Linked Accounts, incomplete Production Linked Accounts, and ignored + duplicate Production Linked Account sets. + integration: optional + account_type: string + completed_at: datetime + source: + openapi: hris_v3.yml + AccountDetailsAndActionsIntegration: + properties: + name: string + categories: list + image: optional + square_image: optional + color: string + slug: string + passthrough_available: boolean + available_model_operations: optional> + source: + openapi: hris_v3.yml + AccountDetailsAndActionsStatusEnum: + enum: + - COMPLETE + - INCOMPLETE + - RELINK_NEEDED + - IDLE + docs: |- + * `COMPLETE` - COMPLETE + * `INCOMPLETE` - INCOMPLETE + * `RELINK_NEEDED` - RELINK_NEEDED + * `IDLE` - IDLE + source: + openapi: hris_v3.yml + AccountIntegration: + properties: + name: + type: string + docs: Company name. + abbreviated_name: + type: optional + docs: >- + Optional. This shortened name appears in places with limited space, + usually in conjunction with the platform's logo (e.g., Merge Link + menu).

Example: Workforce Now (in lieu of ADP Workforce + Now), SuccessFactors (in lieu of SAP SuccessFactors) + categories: + type: optional> + docs: >- + Category or categories this integration belongs to. Multiple + categories should be comma separated, i.e. [ats, hris]. + access: read-only + image: + type: optional + docs: Company logo in rectangular shape. + validation: + format: uri + square_image: + type: optional + docs: Company logo in square shape. + validation: + format: uri + color: + type: optional + docs: >- + The color of this integration used for buttons and text throughout the + app and landing pages. Choose a darker, saturated color. + validation: + pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ + maxLength: 18 + slug: + type: optional + access: read-only + api_endpoints_to_documentation_urls: + type: optional> + docs: >- + Mapping of API endpoints to documentation urls for support. Example: + {'GET': [['/common-model-scopes', + 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', + 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], + 'POST': []} + webhook_setup_guide_url: + type: optional + docs: >- + Setup guide URL for third party webhook creation. Exposed in Merge + Docs. + category_beta_status: + type: optional> + docs: Category or categories this integration is in beta status for. + access: read-only + source: + openapi: hris_v3.yml + AccountToken: + properties: + account_token: string + integration: AccountIntegration + id: string + source: + openapi: hris_v3.yml + AccountTypeEnum: + enum: + - SAVINGS + - CHECKING + docs: |- + * `SAVINGS` - SAVINGS + * `CHECKING` - CHECKING + source: + openapi: hris_v3.yml + AdvancedMetadata: + properties: + id: + type: string + validation: + format: uuid + display_name: optional + description: optional + is_required: optional + is_custom: optional + field_choices: optional> + source: + openapi: hris_v3.yml + AsyncPassthroughReciept: + properties: + async_passthrough_receipt_id: + type: string + validation: + format: uuid + source: + openapi: hris_v3.yml + AuditLogEventRole: + discriminated: false + docs: >- + Designates the role of the user (or SYSTEM/API if action not taken by a + user) at the time of this Event occurring. + + + * `ADMIN` - ADMIN + + * `DEVELOPER` - DEVELOPER + + * `MEMBER` - MEMBER + + * `API` - API + + * `SYSTEM` - SYSTEM + + * `MERGE_TEAM` - MERGE_TEAM + union: + - RoleEnum + - string + source: + openapi: hris_v3.yml + inline: true + AuditLogEventEventType: + discriminated: false + docs: >- + Designates the type of event that occurred. + + + * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + + * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + + * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + + * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + + * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + + * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + + * `INVITED_USER` - INVITED_USER + + * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + + * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + + * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + + * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - + DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + + * `CREATED_DESTINATION` - CREATED_DESTINATION + + * `DELETED_DESTINATION` - DELETED_DESTINATION + + * `CHANGED_DESTINATION` - CHANGED_DESTINATION + + * `CHANGED_SCOPES` - CHANGED_SCOPES + + * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + + * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + + * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + + * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + + * `ENABLED_CATEGORY` - ENABLED_CATEGORY + + * `DISABLED_CATEGORY` - DISABLED_CATEGORY + + * `CHANGED_PASSWORD` - CHANGED_PASSWORD + + * `RESET_PASSWORD` - RESET_PASSWORD + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - + CREATED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - + CREATED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - + CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - + CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + + * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - + DELETED_INTEGRATION_WIDE_FIELD_MAPPING + + * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - + DELETED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + + * `MUTED_ISSUE` - MUTED_ISSUE + + * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + + * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + + * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + + * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + + * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + union: + - EventTypeEnum + - string + source: + openapi: hris_v3.yml + inline: true + AuditLogEvent: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + user_name: + type: optional + docs: The User's full name at the time of this Event occurring. + validation: + maxLength: 200 + user_email: + type: optional + docs: The User's email at the time of this Event occurring. + validation: + format: email + maxLength: 254 + role: + type: AuditLogEventRole + docs: >- + Designates the role of the user (or SYSTEM/API if action not taken by + a user) at the time of this Event occurring. + + + * `ADMIN` - ADMIN + + * `DEVELOPER` - DEVELOPER + + * `MEMBER` - MEMBER + + * `API` - API + + * `SYSTEM` - SYSTEM + + * `MERGE_TEAM` - MERGE_TEAM + ip_address: + type: string + validation: + maxLength: 45 + event_type: + type: AuditLogEventEventType + docs: >- + Designates the type of event that occurred. + + + * `CREATED_REMOTE_PRODUCTION_API_KEY` - + CREATED_REMOTE_PRODUCTION_API_KEY + + * `DELETED_REMOTE_PRODUCTION_API_KEY` - + DELETED_REMOTE_PRODUCTION_API_KEY + + * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + + * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + + * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + + * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + + * `INVITED_USER` - INVITED_USER + + * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + + * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + + * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + + * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - + DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + + * `CREATED_DESTINATION` - CREATED_DESTINATION + + * `DELETED_DESTINATION` - DELETED_DESTINATION + + * `CHANGED_DESTINATION` - CHANGED_DESTINATION + + * `CHANGED_SCOPES` - CHANGED_SCOPES + + * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + + * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + + * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + + * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + + * `ENABLED_CATEGORY` - ENABLED_CATEGORY + + * `DISABLED_CATEGORY` - DISABLED_CATEGORY + + * `CHANGED_PASSWORD` - CHANGED_PASSWORD + + * `RESET_PASSWORD` - RESET_PASSWORD + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - + CREATED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - + CREATED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - + CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - + CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + + * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - + DELETED_INTEGRATION_WIDE_FIELD_MAPPING + + * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - + DELETED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + + * `MUTED_ISSUE` - MUTED_ISSUE + + * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + + * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + + * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + + * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + + * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + event_description: string + created_at: + type: optional + access: read-only + source: + openapi: hris_v3.yml + AvailableActions: + docs: >- + # The AvailableActions Object + + ### Description + + The `Activity` object is used to see all available model/operation + combinations for an integration. + + + ### Usage Example + + Fetch all the actions available for the `Zenefits` integration. + properties: + integration: AccountIntegration + passthrough_available: boolean + available_model_operations: optional> + source: + openapi: hris_v3.yml + BankInfoEmployee: + discriminated: false + docs: The employee with this bank account. + union: + - type: string + validation: + format: uuid + - Employee + source: + openapi: hris_v3.yml + inline: true + BankInfoAccountType: + discriminated: false + docs: |- + The bank account type + + * `SAVINGS` - SAVINGS + * `CHECKING` - CHECKING + union: + - AccountTypeEnum + - string + source: + openapi: hris_v3.yml + inline: true + BankInfo: + docs: >- + # The BankInfo Object + + ### Description + + The `BankInfo` object is used to represent the Bank Account information + for an Employee. + + + ### Usage Example + + Fetch from the `LIST BankInfo` endpoint and filter by `ID` to show all + bank information. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + employee: + type: optional + docs: The employee with this bank account. + account_number: + type: optional + docs: The account number. + validation: + maxLength: 100 + routing_number: + type: optional + docs: The routing number. + bank_name: + type: optional + docs: The bank name. + account_type: + type: optional + docs: |- + The bank account type + + * `SAVINGS` - SAVINGS + * `CHECKING` - CHECKING + remote_created_at: + type: optional + docs: When the matching bank object was created in the third party system. + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: hris_v3.yml + BenefitEmployee: + discriminated: false + docs: The employee on the plan. + union: + - type: string + validation: + format: uuid + - Employee + source: + openapi: hris_v3.yml + inline: true + Benefit: + docs: >- + # The Benefit Object + + ### Description + + The `Benefit` object is used to represent a benefit that an employee has + enrolled in. + + + ### Usage Example + + Fetch from the `LIST Benefits` endpoint and filter by `ID` to show all + benefits. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + employee: + type: optional + docs: The employee on the plan. + provider_name: + type: optional + docs: The name of the benefit provider. + benefit_plan_type: + type: optional + docs: The type of benefit plan + availability: deprecated + employee_contribution: + type: optional + docs: The employee's contribution. + company_contribution: + type: optional + docs: The company's contribution. + start_date: + type: optional + docs: The day and time the benefit started. + end_date: + type: optional + docs: The day and time the benefit ended. + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + employer_benefit: + type: optional + docs: The employer benefit plan the employee is enrolled in. + validation: + format: uuid + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: hris_v3.yml + BenefitPlanTypeEnum: + enum: + - MEDICAL + - HEALTH_SAVINGS + - INSURANCE + - RETIREMENT + - OTHER + docs: |- + * `MEDICAL` - MEDICAL + * `HEALTH_SAVINGS` - HEALTH_SAVINGS + * `INSURANCE` - INSURANCE + * `RETIREMENT` - RETIREMENT + * `OTHER` - OTHER + source: + openapi: hris_v3.yml + CategoriesEnum: + enum: + - hris + - ats + - accounting + - ticketing + - crm + - mktg + - filestorage + docs: |- + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + source: + openapi: hris_v3.yml + CategoryEnum: + enum: + - hris + - ats + - accounting + - ticketing + - crm + - mktg + - filestorage + docs: |- + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + source: + openapi: hris_v3.yml + CommonModelScopeApi: + properties: + common_models: + docs: The common models you want to update the scopes for + type: list + source: + openapi: hris_v3.yml + CommonModelScopesBodyRequest: + properties: + model_id: + type: string + validation: + minLength: 1 + enabled_actions: list + disabled_fields: list + source: + openapi: hris_v3.yml + Company: + docs: >- + # The Company Object + + ### Description + + The `Company` object is used to represent a company within the HRIS / + Payroll system. + + + ### Usage Example + + Fetch from the `LIST Companies` endpoint and filter by `ID` to show all + companies. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + legal_name: + type: optional + docs: The company's legal name. + display_name: + type: optional + docs: The company's display name. + eins: + type: optional>> + docs: The company's Employer Identification Numbers. + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: hris_v3.yml + CountryEnum: + enum: + - AF + - AX + - AL + - DZ + - AS + - AD + - AO + - AI + - AQ + - AG + - AR + - AM + - AW + - AU + - AT + - AZ + - BS + - BH + - BD + - BB + - BY + - BE + - BZ + - BJ + - BM + - BT + - BO + - BQ + - BA + - BW + - BV + - BR + - IO + - BN + - BG + - BF + - BI + - CV + - KH + - CM + - CA + - KY + - CF + - TD + - CL + - CN + - CX + - CC + - CO + - KM + - CG + - CD + - CK + - CR + - CI + - HR + - CU + - CW + - CY + - CZ + - DK + - DJ + - DM + - DO + - EC + - EG + - SV + - GQ + - ER + - EE + - SZ + - ET + - FK + - FO + - FJ + - FI + - FR + - GF + - PF + - TF + - GA + - GM + - GE + - DE + - GH + - GI + - GR + - GL + - GD + - GP + - GU + - GT + - GG + - GN + - GW + - GY + - HT + - HM + - VA + - HN + - HK + - HU + - IS + - IN + - ID + - IR + - IQ + - IE + - IM + - IL + - IT + - JM + - JP + - JE + - JO + - KZ + - KE + - KI + - KW + - KG + - LA + - LV + - LB + - LS + - LR + - LY + - LI + - LT + - LU + - MO + - MG + - MW + - MY + - MV + - ML + - MT + - MH + - MQ + - MR + - MU + - YT + - MX + - FM + - MD + - MC + - MN + - ME + - MS + - MA + - MZ + - MM + - NA + - NR + - NP + - NL + - NC + - NZ + - NI + - NE + - NG + - NU + - NF + - KP + - MK + - MP + - 'NO' + - OM + - PK + - PW + - PS + - PA + - PG + - PY + - PE + - PH + - PN + - PL + - PT + - PR + - QA + - RE + - RO + - RU + - RW + - BL + - SH + - KN + - LC + - MF + - PM + - VC + - WS + - SM + - ST + - SA + - SN + - RS + - SC + - SL + - SG + - SX + - SK + - SI + - SB + - SO + - ZA + - GS + - KR + - SS + - ES + - LK + - SD + - SR + - SJ + - SE + - CH + - SY + - TW + - TJ + - TZ + - TH + - TL + - TG + - TK + - TO + - TT + - TN + - TR + - TM + - TC + - TV + - UG + - UA + - AE + - GB + - UM + - US + - UY + - UZ + - VU + - VE + - VN + - VG + - VI + - WF + - EH + - YE + - ZM + - ZW + docs: |- + * `AF` - Afghanistan + * `AX` - Åland Islands + * `AL` - Albania + * `DZ` - Algeria + * `AS` - American Samoa + * `AD` - Andorra + * `AO` - Angola + * `AI` - Anguilla + * `AQ` - Antarctica + * `AG` - Antigua and Barbuda + * `AR` - Argentina + * `AM` - Armenia + * `AW` - Aruba + * `AU` - Australia + * `AT` - Austria + * `AZ` - Azerbaijan + * `BS` - Bahamas + * `BH` - Bahrain + * `BD` - Bangladesh + * `BB` - Barbados + * `BY` - Belarus + * `BE` - Belgium + * `BZ` - Belize + * `BJ` - Benin + * `BM` - Bermuda + * `BT` - Bhutan + * `BO` - Bolivia + * `BQ` - Bonaire, Sint Eustatius and Saba + * `BA` - Bosnia and Herzegovina + * `BW` - Botswana + * `BV` - Bouvet Island + * `BR` - Brazil + * `IO` - British Indian Ocean Territory + * `BN` - Brunei + * `BG` - Bulgaria + * `BF` - Burkina Faso + * `BI` - Burundi + * `CV` - Cabo Verde + * `KH` - Cambodia + * `CM` - Cameroon + * `CA` - Canada + * `KY` - Cayman Islands + * `CF` - Central African Republic + * `TD` - Chad + * `CL` - Chile + * `CN` - China + * `CX` - Christmas Island + * `CC` - Cocos (Keeling) Islands + * `CO` - Colombia + * `KM` - Comoros + * `CG` - Congo + * `CD` - Congo (the Democratic Republic of the) + * `CK` - Cook Islands + * `CR` - Costa Rica + * `CI` - Côte d'Ivoire + * `HR` - Croatia + * `CU` - Cuba + * `CW` - Curaçao + * `CY` - Cyprus + * `CZ` - Czechia + * `DK` - Denmark + * `DJ` - Djibouti + * `DM` - Dominica + * `DO` - Dominican Republic + * `EC` - Ecuador + * `EG` - Egypt + * `SV` - El Salvador + * `GQ` - Equatorial Guinea + * `ER` - Eritrea + * `EE` - Estonia + * `SZ` - Eswatini + * `ET` - Ethiopia + * `FK` - Falkland Islands (Malvinas) + * `FO` - Faroe Islands + * `FJ` - Fiji + * `FI` - Finland + * `FR` - France + * `GF` - French Guiana + * `PF` - French Polynesia + * `TF` - French Southern Territories + * `GA` - Gabon + * `GM` - Gambia + * `GE` - Georgia + * `DE` - Germany + * `GH` - Ghana + * `GI` - Gibraltar + * `GR` - Greece + * `GL` - Greenland + * `GD` - Grenada + * `GP` - Guadeloupe + * `GU` - Guam + * `GT` - Guatemala + * `GG` - Guernsey + * `GN` - Guinea + * `GW` - Guinea-Bissau + * `GY` - Guyana + * `HT` - Haiti + * `HM` - Heard Island and McDonald Islands + * `VA` - Holy See + * `HN` - Honduras + * `HK` - Hong Kong + * `HU` - Hungary + * `IS` - Iceland + * `IN` - India + * `ID` - Indonesia + * `IR` - Iran + * `IQ` - Iraq + * `IE` - Ireland + * `IM` - Isle of Man + * `IL` - Israel + * `IT` - Italy + * `JM` - Jamaica + * `JP` - Japan + * `JE` - Jersey + * `JO` - Jordan + * `KZ` - Kazakhstan + * `KE` - Kenya + * `KI` - Kiribati + * `KW` - Kuwait + * `KG` - Kyrgyzstan + * `LA` - Laos + * `LV` - Latvia + * `LB` - Lebanon + * `LS` - Lesotho + * `LR` - Liberia + * `LY` - Libya + * `LI` - Liechtenstein + * `LT` - Lithuania + * `LU` - Luxembourg + * `MO` - Macao + * `MG` - Madagascar + * `MW` - Malawi + * `MY` - Malaysia + * `MV` - Maldives + * `ML` - Mali + * `MT` - Malta + * `MH` - Marshall Islands + * `MQ` - Martinique + * `MR` - Mauritania + * `MU` - Mauritius + * `YT` - Mayotte + * `MX` - Mexico + * `FM` - Micronesia (Federated States of) + * `MD` - Moldova + * `MC` - Monaco + * `MN` - Mongolia + * `ME` - Montenegro + * `MS` - Montserrat + * `MA` - Morocco + * `MZ` - Mozambique + * `MM` - Myanmar + * `NA` - Namibia + * `NR` - Nauru + * `NP` - Nepal + * `NL` - Netherlands + * `NC` - New Caledonia + * `NZ` - New Zealand + * `NI` - Nicaragua + * `NE` - Niger + * `NG` - Nigeria + * `NU` - Niue + * `NF` - Norfolk Island + * `KP` - North Korea + * `MK` - North Macedonia + * `MP` - Northern Mariana Islands + * `NO` - Norway + * `OM` - Oman + * `PK` - Pakistan + * `PW` - Palau + * `PS` - Palestine, State of + * `PA` - Panama + * `PG` - Papua New Guinea + * `PY` - Paraguay + * `PE` - Peru + * `PH` - Philippines + * `PN` - Pitcairn + * `PL` - Poland + * `PT` - Portugal + * `PR` - Puerto Rico + * `QA` - Qatar + * `RE` - Réunion + * `RO` - Romania + * `RU` - Russia + * `RW` - Rwanda + * `BL` - Saint Barthélemy + * `SH` - Saint Helena, Ascension and Tristan da Cunha + * `KN` - Saint Kitts and Nevis + * `LC` - Saint Lucia + * `MF` - Saint Martin (French part) + * `PM` - Saint Pierre and Miquelon + * `VC` - Saint Vincent and the Grenadines + * `WS` - Samoa + * `SM` - San Marino + * `ST` - Sao Tome and Principe + * `SA` - Saudi Arabia + * `SN` - Senegal + * `RS` - Serbia + * `SC` - Seychelles + * `SL` - Sierra Leone + * `SG` - Singapore + * `SX` - Sint Maarten (Dutch part) + * `SK` - Slovakia + * `SI` - Slovenia + * `SB` - Solomon Islands + * `SO` - Somalia + * `ZA` - South Africa + * `GS` - South Georgia and the South Sandwich Islands + * `KR` - South Korea + * `SS` - South Sudan + * `ES` - Spain + * `LK` - Sri Lanka + * `SD` - Sudan + * `SR` - Suriname + * `SJ` - Svalbard and Jan Mayen + * `SE` - Sweden + * `CH` - Switzerland + * `SY` - Syria + * `TW` - Taiwan + * `TJ` - Tajikistan + * `TZ` - Tanzania + * `TH` - Thailand + * `TL` - Timor-Leste + * `TG` - Togo + * `TK` - Tokelau + * `TO` - Tonga + * `TT` - Trinidad and Tobago + * `TN` - Tunisia + * `TR` - Turkey + * `TM` - Turkmenistan + * `TC` - Turks and Caicos Islands + * `TV` - Tuvalu + * `UG` - Uganda + * `UA` - Ukraine + * `AE` - United Arab Emirates + * `GB` - United Kingdom + * `UM` - United States Minor Outlying Islands + * `US` - United States of America + * `UY` - Uruguay + * `UZ` - Uzbekistan + * `VU` - Vanuatu + * `VE` - Venezuela + * `VN` - Vietnam + * `VG` - Virgin Islands (British) + * `VI` - Virgin Islands (U.S.) + * `WF` - Wallis and Futuna + * `EH` - Western Sahara + * `YE` - Yemen + * `ZM` - Zambia + * `ZW` - Zimbabwe + source: + openapi: hris_v3.yml + DataPassthroughRequest: + docs: >- + # The DataPassthrough Object + + ### Description + + The `DataPassthrough` object is used to send information to an + otherwise-unsupported third-party endpoint. + + + ### Usage Example + + Create a `DataPassthrough` to get team hierarchies from your Rippling + integration. + properties: + method: MethodEnum + path: + type: string + docs: The path of the request in the third party's platform. + validation: + minLength: 1 + base_url_override: + type: optional + docs: An optional override of the third party's base url for the request. + validation: + minLength: 1 + data: + type: optional + docs: >- + The data with the request. You must include a `request_format` + parameter matching the data's format + validation: + minLength: 1 + multipart_form_data: + type: optional> + docs: >- + Pass an array of `MultipartFormField` objects in here instead of using + the `data` param if `request_format` is set to `MULTIPART`. + headers: + type: optional> + docs: >- + The headers to use for the request (Merge will handle the account's + authorization headers). `Content-Type` header is required for + passthrough. Choose content type corresponding to expected format of + receiving server. + request_format: optional + normalize_response: + type: optional + docs: >- + Optional. If true, the response will always be an object of the form + `{"type": T, "value": ...}` where `T` will be one of `string, boolean, + number, null, array, object`. + source: + openapi: hris_v3.yml + DebugModeLog: + properties: + log_id: string + dashboard_view: string + log_summary: DebugModelLogSummary + source: + openapi: hris_v3.yml + DebugModelLogSummary: + properties: + url: string + method: string + status_code: integer + source: + openapi: hris_v3.yml + Deduction: + docs: >- + # The Deduction Object + + ### Description + + The `Deduction` object is used to represent an array of the wages withheld + from total earnings for the purpose of paying taxes. + + + ### Usage Example + + Fetch from the `LIST Deductions` endpoint and filter by `ID` to show all + deductions. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + employee_payroll_run: + type: optional + validation: + format: uuid + name: + type: optional + docs: The deduction's name. + employee_deduction: + type: optional + docs: >- + The amount of money that is withheld from an employee's gross pay by + the employee. + company_deduction: + type: optional + docs: >- + The amount of money that is withheld on behalf of an employee by the + company. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: hris_v3.yml + DependentRelationship: + discriminated: false + docs: |- + The dependent's relationship to the employee. + + * `CHILD` - CHILD + * `SPOUSE` - SPOUSE + * `DOMESTIC_PARTNER` - DOMESTIC_PARTNER + union: + - RelationshipEnum + - string + source: + openapi: hris_v3.yml + inline: true + DependentGender: + discriminated: false + docs: |- + The dependent's gender. + + * `MALE` - MALE + * `FEMALE` - FEMALE + * `NON-BINARY` - NON-BINARY + * `OTHER` - OTHER + * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE + union: + - GenderEnum + - string + source: + openapi: hris_v3.yml + inline: true + Dependent: + docs: >- + # The Dependent Object + + ### Description + + The `Dependent` object is used to represent a dependent (e.g. child, + spouse, domestic partner, etc) of an `Employee` + + + ### Usage Example + + Fetch from the `LIST Dependents` endpoint and filter by `ID` to show all + dependents. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + first_name: + type: optional + docs: The dependents's first name. + validation: + maxLength: 60 + middle_name: + type: optional + docs: The dependents's middle name. + validation: + maxLength: 60 + last_name: + type: optional + docs: The dependents's last name. + validation: + maxLength: 60 + relationship: + type: optional + docs: |- + The dependent's relationship to the employee. + + * `CHILD` - CHILD + * `SPOUSE` - SPOUSE + * `DOMESTIC_PARTNER` - DOMESTIC_PARTNER + employee: + type: optional + docs: The employee this person is a dependent of. + validation: + format: uuid + date_of_birth: + type: optional + docs: The dependent's date of birth. + gender: + type: optional + docs: |- + The dependent's gender. + + * `MALE` - MALE + * `FEMALE` - FEMALE + * `NON-BINARY` - NON-BINARY + * `OTHER` - OTHER + * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE + phone_number: + type: optional + docs: The dependent's phone number. + validation: + maxLength: 50 + home_location: + type: optional + docs: The dependents's home address. + validation: + format: uuid + is_student: + type: optional + docs: Whether or not the dependent is a student + ssn: + type: optional + docs: The dependents's social security number. + validation: + maxLength: 50 + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: hris_v3.yml + EarningType: + discriminated: false + docs: |- + The type of earning. + + * `SALARY` - SALARY + * `REIMBURSEMENT` - REIMBURSEMENT + * `OVERTIME` - OVERTIME + * `BONUS` - BONUS + union: + - EarningTypeEnum + - string + source: + openapi: hris_v3.yml + inline: true + Earning: + docs: >- + # The Earning Object + + ### Description + + The `Earning` object is used to represent an array of different + compensations that an employee receives within specific wage categories. + + + ### Usage Example + + Fetch from the `LIST Earnings` endpoint and filter by `ID` to show all + earnings. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + employee_payroll_run: + type: optional + validation: + format: uuid + amount: + type: optional + docs: The amount earned. + type: + type: optional + docs: |- + The type of earning. + + * `SALARY` - SALARY + * `REIMBURSEMENT` - REIMBURSEMENT + * `OVERTIME` - OVERTIME + * `BONUS` - BONUS + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: hris_v3.yml + EarningTypeEnum: + enum: + - SALARY + - REIMBURSEMENT + - OVERTIME + - BONUS + docs: |- + * `SALARY` - SALARY + * `REIMBURSEMENT` - REIMBURSEMENT + * `OVERTIME` - OVERTIME + * `BONUS` - BONUS + source: + openapi: hris_v3.yml + EmployeeCompany: + discriminated: false + docs: The ID of the employee's company. + union: + - type: string + validation: + format: uuid + - Company + source: + openapi: hris_v3.yml + inline: true + EmployeeGroupsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Group + source: + openapi: hris_v3.yml + inline: true + EmployeeEmploymentsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Employment + source: + openapi: hris_v3.yml + inline: true + EmployeeHomeLocation: + discriminated: false + docs: The employee's home address. + union: + - type: string + validation: + format: uuid + - Location + source: + openapi: hris_v3.yml + inline: true + EmployeeWorkLocation: + discriminated: false + docs: The employee's work address. + union: + - type: string + validation: + format: uuid + - Location + source: + openapi: hris_v3.yml + inline: true + EmployeeManager: + discriminated: false + docs: The employee ID of the employee's manager. + union: + - type: string + validation: + format: uuid + - Employee + source: + openapi: hris_v3.yml + inline: true + EmployeeTeam: + discriminated: false + docs: The employee's team. + union: + - type: string + validation: + format: uuid + - Team + source: + openapi: hris_v3.yml + inline: true + EmployeePayGroup: + discriminated: false + docs: The employee's pay group + union: + - type: string + validation: + format: uuid + - PayGroup + source: + openapi: hris_v3.yml + inline: true + EmployeeGender: + discriminated: false + docs: |- + The employee's gender. + + * `MALE` - MALE + * `FEMALE` - FEMALE + * `NON-BINARY` - NON-BINARY + * `OTHER` - OTHER + * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE + union: + - GenderEnum + - string + source: + openapi: hris_v3.yml + inline: true + EmployeeEthnicity: + discriminated: false + docs: >- + The employee's ethnicity. + + + * `AMERICAN_INDIAN_OR_ALASKA_NATIVE` - AMERICAN_INDIAN_OR_ALASKA_NATIVE + + * `ASIAN_OR_INDIAN_SUBCONTINENT` - ASIAN_OR_INDIAN_SUBCONTINENT + + * `BLACK_OR_AFRICAN_AMERICAN` - BLACK_OR_AFRICAN_AMERICAN + + * `HISPANIC_OR_LATINO` - HISPANIC_OR_LATINO + + * `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER` - + NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER + + * `TWO_OR_MORE_RACES` - TWO_OR_MORE_RACES + + * `WHITE` - WHITE + + * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE + union: + - EthnicityEnum + - string + source: + openapi: hris_v3.yml + inline: true + EmployeeMaritalStatus: + discriminated: false + docs: >- + The employee's filing status as related to marital status. + + + * `SINGLE` - SINGLE + + * `MARRIED_FILING_JOINTLY` - MARRIED_FILING_JOINTLY + + * `MARRIED_FILING_SEPARATELY` - MARRIED_FILING_SEPARATELY + + * `HEAD_OF_HOUSEHOLD` - HEAD_OF_HOUSEHOLD + + * `QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD` - + QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD + union: + - MaritalStatusEnum + - string + source: + openapi: hris_v3.yml + inline: true + EmployeeEmploymentStatus: + discriminated: false + docs: |- + The employment status of the employee. + + * `ACTIVE` - ACTIVE + * `PENDING` - PENDING + * `INACTIVE` - INACTIVE + union: + - EmploymentStatusEnum + - string + source: + openapi: hris_v3.yml + inline: true + Employee: + docs: >- + # The Employee Object + + ### Description + + The `Employee` object is used to represent any person who has been + employed by a company. By default, it returns all employees. To filter for + only active employees, set the `employment_status` query parameter to + `ACTIVE`. + + + ### Usage Example + + Fetch from the `LIST Employee` endpoint and filter by `ID` to show all + employees. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + employee_number: + type: optional + docs: >- + The employee's number that appears in the third-party integration's + UI. + company: + type: optional + docs: The ID of the employee's company. + first_name: + type: optional + docs: The employee's first name. + last_name: + type: optional + docs: The employee's last name. + preferred_name: + type: optional + docs: The employee's preferred first name. + display_full_name: + type: optional + docs: >- + The employee's full name, to use for display purposes. If a preferred + first name is available, the full name will include the preferred + first name. + username: + type: optional + docs: The employee's username that appears in the remote UI. + groups: optional>> + work_email: + type: optional + docs: The employee's work email. + validation: + format: email + maxLength: 254 + personal_email: + type: optional + docs: The employee's personal email. + validation: + format: email + maxLength: 254 + mobile_phone_number: + type: optional + docs: The employee's mobile phone number. + employments: + type: optional>> + docs: Array of `Employment` IDs for this Employee. + home_location: + type: optional + docs: The employee's home address. + work_location: + type: optional + docs: The employee's work address. + manager: + type: optional + docs: The employee ID of the employee's manager. + team: + type: optional + docs: The employee's team. + availability: deprecated + pay_group: + type: optional + docs: The employee's pay group + ssn: + type: optional + docs: The employee's social security number. + validation: + maxLength: 100 + gender: + type: optional + docs: |- + The employee's gender. + + * `MALE` - MALE + * `FEMALE` - FEMALE + * `NON-BINARY` - NON-BINARY + * `OTHER` - OTHER + * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE + ethnicity: + type: optional + docs: >- + The employee's ethnicity. + + + * `AMERICAN_INDIAN_OR_ALASKA_NATIVE` - + AMERICAN_INDIAN_OR_ALASKA_NATIVE + + * `ASIAN_OR_INDIAN_SUBCONTINENT` - ASIAN_OR_INDIAN_SUBCONTINENT + + * `BLACK_OR_AFRICAN_AMERICAN` - BLACK_OR_AFRICAN_AMERICAN + + * `HISPANIC_OR_LATINO` - HISPANIC_OR_LATINO + + * `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER` - + NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER + + * `TWO_OR_MORE_RACES` - TWO_OR_MORE_RACES + + * `WHITE` - WHITE + + * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE + marital_status: + type: optional + docs: >- + The employee's filing status as related to marital status. + + + * `SINGLE` - SINGLE + + * `MARRIED_FILING_JOINTLY` - MARRIED_FILING_JOINTLY + + * `MARRIED_FILING_SEPARATELY` - MARRIED_FILING_SEPARATELY + + * `HEAD_OF_HOUSEHOLD` - HEAD_OF_HOUSEHOLD + + * `QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD` - + QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD + date_of_birth: + type: optional + docs: The employee's date of birth. + hire_date: + type: optional + docs: >- + The date that the employee was hired, usually the day that an offer + letter is signed. If an employee has multiple hire dates from previous + employments, this represents the most recent hire date. Note: If + you're looking for the employee's start date, refer to the start_date + field. + availability: deprecated + start_date: + type: optional + docs: >- + The date that the employee started working. If an employee was + rehired, the most recent start date will be returned. + remote_created_at: + type: optional + docs: When the third party's employee was created. + employment_status: + type: optional + docs: |- + The employment status of the employee. + + * `ACTIVE` - ACTIVE + * `PENDING` - PENDING + * `INACTIVE` - INACTIVE + termination_date: + type: optional + docs: The employee's termination date. + avatar: + type: optional + docs: The URL of the employee's avatar image. + validation: + format: uri + maxLength: 2000 + custom_fields: + type: optional> + docs: Custom fields configured for a given model. + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: hris_v3.yml + EmployeePayrollRunEmployee: + discriminated: false + docs: The employee whose payroll is being run. + union: + - type: string + validation: + format: uuid + - Employee + source: + openapi: hris_v3.yml + inline: true + EmployeePayrollRunPayrollRun: + discriminated: false + docs: The payroll being run. + union: + - type: string + validation: + format: uuid + - PayrollRun + source: + openapi: hris_v3.yml + inline: true + EmployeePayrollRun: + docs: >- + # The EmployeePayrollRun Object + + ### Description + + The `EmployeePayrollRun` object is used to represent an employee's pay + statement for a specific payroll run. + + + ### Usage Example + + Fetch from the `LIST EmployeePayrollRun` endpoint and filter by `ID` to + show all employee payroll runs. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + employee: + type: optional + docs: The employee whose payroll is being run. + payroll_run: + type: optional + docs: The payroll being run. + gross_pay: + type: optional + docs: >- + The total earnings throughout a given period for an employee before + any deductions are made. + net_pay: + type: optional + docs: >- + The take-home pay throughout a given period for an employee after + deductions are made. + start_date: + type: optional + docs: The day and time the payroll run started. + end_date: + type: optional + docs: The day and time the payroll run ended. + check_date: + type: optional + docs: The day and time the payroll run was checked. + earnings: + type: optional> + access: read-only + deductions: + type: optional> + access: read-only + taxes: + type: optional> + access: read-only + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: hris_v3.yml + EmployeeRequestCompany: + discriminated: false + docs: The ID of the employee's company. + union: + - type: string + validation: + format: uuid + - Company + source: + openapi: hris_v3.yml + inline: true + EmployeeRequestGroupsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Group + source: + openapi: hris_v3.yml + inline: true + EmployeeRequestEmploymentsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Employment + source: + openapi: hris_v3.yml + inline: true + EmployeeRequestHomeLocation: + discriminated: false + docs: The employee's home address. + union: + - type: string + validation: + format: uuid + - Location + source: + openapi: hris_v3.yml + inline: true + EmployeeRequestWorkLocation: + discriminated: false + docs: The employee's work address. + union: + - type: string + validation: + format: uuid + - Location + source: + openapi: hris_v3.yml + inline: true + EmployeeRequestManager: + discriminated: false + docs: The employee ID of the employee's manager. + union: + - type: string + validation: + format: uuid + - Employee + source: + openapi: hris_v3.yml + inline: true + EmployeeRequestTeam: + discriminated: false + docs: The employee's team. + union: + - type: string + validation: + format: uuid + - Team + source: + openapi: hris_v3.yml + inline: true + EmployeeRequestPayGroup: + discriminated: false + docs: The employee's pay group + union: + - type: string + validation: + format: uuid + - PayGroup + source: + openapi: hris_v3.yml + inline: true + EmployeeRequestGender: + discriminated: false + docs: |- + The employee's gender. + + * `MALE` - MALE + * `FEMALE` - FEMALE + * `NON-BINARY` - NON-BINARY + * `OTHER` - OTHER + * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE + union: + - GenderEnum + - string + source: + openapi: hris_v3.yml + inline: true + EmployeeRequestEthnicity: + discriminated: false + docs: >- + The employee's ethnicity. + + + * `AMERICAN_INDIAN_OR_ALASKA_NATIVE` - AMERICAN_INDIAN_OR_ALASKA_NATIVE + + * `ASIAN_OR_INDIAN_SUBCONTINENT` - ASIAN_OR_INDIAN_SUBCONTINENT + + * `BLACK_OR_AFRICAN_AMERICAN` - BLACK_OR_AFRICAN_AMERICAN + + * `HISPANIC_OR_LATINO` - HISPANIC_OR_LATINO + + * `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER` - + NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER + + * `TWO_OR_MORE_RACES` - TWO_OR_MORE_RACES + + * `WHITE` - WHITE + + * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE + union: + - EthnicityEnum + - string + source: + openapi: hris_v3.yml + inline: true + EmployeeRequestMaritalStatus: + discriminated: false + docs: >- + The employee's filing status as related to marital status. + + + * `SINGLE` - SINGLE + + * `MARRIED_FILING_JOINTLY` - MARRIED_FILING_JOINTLY + + * `MARRIED_FILING_SEPARATELY` - MARRIED_FILING_SEPARATELY + + * `HEAD_OF_HOUSEHOLD` - HEAD_OF_HOUSEHOLD + + * `QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD` - + QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD + union: + - MaritalStatusEnum + - string + source: + openapi: hris_v3.yml + inline: true + EmployeeRequestEmploymentStatus: + discriminated: false + docs: |- + The employment status of the employee. + + * `ACTIVE` - ACTIVE + * `PENDING` - PENDING + * `INACTIVE` - INACTIVE + union: + - EmploymentStatusEnum + - string + source: + openapi: hris_v3.yml + inline: true + EmployeeRequest: + docs: >- + # The Employee Object + + ### Description + + The `Employee` object is used to represent any person who has been + employed by a company. By default, it returns all employees. To filter for + only active employees, set the `employment_status` query parameter to + `ACTIVE`. + + + ### Usage Example + + Fetch from the `LIST Employee` endpoint and filter by `ID` to show all + employees. + properties: + employee_number: + type: optional + docs: >- + The employee's number that appears in the third-party integration's + UI. + company: + type: optional + docs: The ID of the employee's company. + first_name: + type: optional + docs: The employee's first name. + last_name: + type: optional + docs: The employee's last name. + preferred_name: + type: optional + docs: The employee's preferred first name. + display_full_name: + type: optional + docs: >- + The employee's full name, to use for display purposes. If a preferred + first name is available, the full name will include the preferred + first name. + username: + type: optional + docs: The employee's username that appears in the remote UI. + groups: optional>> + work_email: + type: optional + docs: The employee's work email. + validation: + format: email + maxLength: 254 + personal_email: + type: optional + docs: The employee's personal email. + validation: + format: email + maxLength: 254 + mobile_phone_number: + type: optional + docs: The employee's mobile phone number. + employments: + type: optional>> + docs: Array of `Employment` IDs for this Employee. + home_location: + type: optional + docs: The employee's home address. + work_location: + type: optional + docs: The employee's work address. + manager: + type: optional + docs: The employee ID of the employee's manager. + team: + type: optional + docs: The employee's team. + availability: deprecated + pay_group: + type: optional + docs: The employee's pay group + ssn: + type: optional + docs: The employee's social security number. + validation: + maxLength: 100 + gender: + type: optional + docs: |- + The employee's gender. + + * `MALE` - MALE + * `FEMALE` - FEMALE + * `NON-BINARY` - NON-BINARY + * `OTHER` - OTHER + * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE + ethnicity: + type: optional + docs: >- + The employee's ethnicity. + + + * `AMERICAN_INDIAN_OR_ALASKA_NATIVE` - + AMERICAN_INDIAN_OR_ALASKA_NATIVE + + * `ASIAN_OR_INDIAN_SUBCONTINENT` - ASIAN_OR_INDIAN_SUBCONTINENT + + * `BLACK_OR_AFRICAN_AMERICAN` - BLACK_OR_AFRICAN_AMERICAN + + * `HISPANIC_OR_LATINO` - HISPANIC_OR_LATINO + + * `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER` - + NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER + + * `TWO_OR_MORE_RACES` - TWO_OR_MORE_RACES + + * `WHITE` - WHITE + + * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE + marital_status: + type: optional + docs: >- + The employee's filing status as related to marital status. + + + * `SINGLE` - SINGLE + + * `MARRIED_FILING_JOINTLY` - MARRIED_FILING_JOINTLY + + * `MARRIED_FILING_SEPARATELY` - MARRIED_FILING_SEPARATELY + + * `HEAD_OF_HOUSEHOLD` - HEAD_OF_HOUSEHOLD + + * `QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD` - + QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD + date_of_birth: + type: optional + docs: The employee's date of birth. + hire_date: + type: optional + docs: >- + The date that the employee was hired, usually the day that an offer + letter is signed. If an employee has multiple hire dates from previous + employments, this represents the most recent hire date. Note: If + you're looking for the employee's start date, refer to the start_date + field. + availability: deprecated + start_date: + type: optional + docs: >- + The date that the employee started working. If an employee was + rehired, the most recent start date will be returned. + employment_status: + type: optional + docs: |- + The employment status of the employee. + + * `ACTIVE` - ACTIVE + * `PENDING` - PENDING + * `INACTIVE` - INACTIVE + termination_date: + type: optional + docs: The employee's termination date. + avatar: + type: optional + docs: The URL of the employee's avatar image. + validation: + format: uri + maxLength: 2000 + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: hris_v3.yml + EmployeeResponse: + properties: + model: Employee + warnings: list + errors: list + logs: optional> + source: + openapi: hris_v3.yml + EmployerBenefitBenefitPlanType: + discriminated: false + docs: |- + The type of benefit plan. + + * `MEDICAL` - MEDICAL + * `HEALTH_SAVINGS` - HEALTH_SAVINGS + * `INSURANCE` - INSURANCE + * `RETIREMENT` - RETIREMENT + * `OTHER` - OTHER + union: + - BenefitPlanTypeEnum + - string + source: + openapi: hris_v3.yml + inline: true + EmployerBenefit: + docs: >- + # The EmployerBenefit Object + + ### Description + + The `Employer Benefit` object is used to represent a benefit plan offered + by a company. + + + ### Usage Example + + Fetch from the `LIST EmployerBenefits` endpoint and filter by `ID` to show + all EmployerBenefits. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + benefit_plan_type: + type: optional + docs: |- + The type of benefit plan. + + * `MEDICAL` - MEDICAL + * `HEALTH_SAVINGS` - HEALTH_SAVINGS + * `INSURANCE` - INSURANCE + * `RETIREMENT` - RETIREMENT + * `OTHER` - OTHER + name: + type: optional + docs: The employer benefit's name - typically the carrier or network name. + validation: + maxLength: 200 + description: + type: optional + docs: The employer benefit's description. + validation: + maxLength: 2000 + deduction_code: + type: optional + docs: The employer benefit's deduction code. + validation: + maxLength: 60 + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: hris_v3.yml + EmploymentEmployee: + discriminated: false + docs: The employee holding this position. + union: + - type: string + validation: + format: uuid + - Employee + source: + openapi: hris_v3.yml + inline: true + EmploymentPayPeriod: + discriminated: false + docs: |- + The time period this pay rate encompasses. + + * `HOUR` - HOUR + * `DAY` - DAY + * `WEEK` - WEEK + * `EVERY_TWO_WEEKS` - EVERY_TWO_WEEKS + * `SEMIMONTHLY` - SEMIMONTHLY + * `MONTH` - MONTH + * `QUARTER` - QUARTER + * `EVERY_SIX_MONTHS` - EVERY_SIX_MONTHS + * `YEAR` - YEAR + union: + - PayPeriodEnum + - string + source: + openapi: hris_v3.yml + inline: true + EmploymentPayFrequency: + discriminated: false + docs: |- + The position's pay frequency. + + * `WEEKLY` - WEEKLY + * `BIWEEKLY` - BIWEEKLY + * `MONTHLY` - MONTHLY + * `QUARTERLY` - QUARTERLY + * `SEMIANNUALLY` - SEMIANNUALLY + * `ANNUALLY` - ANNUALLY + * `THIRTEEN-MONTHLY` - THIRTEEN-MONTHLY + * `PRO_RATA` - PRO_RATA + * `SEMIMONTHLY` - SEMIMONTHLY + union: + - PayFrequencyEnum + - string + source: + openapi: hris_v3.yml + inline: true + EmploymentPayCurrency: + discriminated: false + docs: >- + The position's currency code. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + union: + - PayCurrencyEnum + - string + source: + openapi: hris_v3.yml + inline: true + EmploymentPayGroup: + discriminated: false + docs: The employment's pay group + union: + - type: string + validation: + format: uuid + - PayGroup + source: + openapi: hris_v3.yml + inline: true + EmploymentFlsaStatus: + discriminated: false + docs: |- + The position's FLSA status. + + * `EXEMPT` - EXEMPT + * `SALARIED_NONEXEMPT` - SALARIED_NONEXEMPT + * `NONEXEMPT` - NONEXEMPT + * `OWNER` - OWNER + union: + - FlsaStatusEnum + - string + source: + openapi: hris_v3.yml + inline: true + EmploymentEmploymentType: + discriminated: false + docs: |- + The position's type of employment. + + * `FULL_TIME` - FULL_TIME + * `PART_TIME` - PART_TIME + * `INTERN` - INTERN + * `CONTRACTOR` - CONTRACTOR + * `FREELANCE` - FREELANCE + union: + - EmploymentTypeEnum + - string + source: + openapi: hris_v3.yml + inline: true + Employment: + docs: >- + # The Employment Object + + ### Description + + The `Employment` object is used to represent a job position at a company. + + + If an integration supports historical tracking of employments, it will be + reflected in the data. If not, a new `Employment` object will be created + whenever there is a change in job title or pay. The `effective_date` field + should be used to order `Employment` objects, with the most recent date + corresponding to the latest employment record for an employee. + + + ### Usage Example + + Fetch from the `LIST Employments` endpoint and filter by `ID` to show all + employees. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + employee: + type: optional + docs: The employee holding this position. + job_title: + type: optional + docs: The position's title. + pay_rate: + type: optional + docs: The position's pay rate. + pay_period: + type: optional + docs: |- + The time period this pay rate encompasses. + + * `HOUR` - HOUR + * `DAY` - DAY + * `WEEK` - WEEK + * `EVERY_TWO_WEEKS` - EVERY_TWO_WEEKS + * `SEMIMONTHLY` - SEMIMONTHLY + * `MONTH` - MONTH + * `QUARTER` - QUARTER + * `EVERY_SIX_MONTHS` - EVERY_SIX_MONTHS + * `YEAR` - YEAR + pay_frequency: + type: optional + docs: |- + The position's pay frequency. + + * `WEEKLY` - WEEKLY + * `BIWEEKLY` - BIWEEKLY + * `MONTHLY` - MONTHLY + * `QUARTERLY` - QUARTERLY + * `SEMIANNUALLY` - SEMIANNUALLY + * `ANNUALLY` - ANNUALLY + * `THIRTEEN-MONTHLY` - THIRTEEN-MONTHLY + * `PRO_RATA` - PRO_RATA + * `SEMIMONTHLY` - SEMIMONTHLY + pay_currency: + type: optional + docs: >- + The position's currency code. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + pay_group: + type: optional + docs: The employment's pay group + flsa_status: + type: optional + docs: |- + The position's FLSA status. + + * `EXEMPT` - EXEMPT + * `SALARIED_NONEXEMPT` - SALARIED_NONEXEMPT + * `NONEXEMPT` - NONEXEMPT + * `OWNER` - OWNER + effective_date: + type: optional + docs: The position's effective date. + employment_type: + type: optional + docs: |- + The position's type of employment. + + * `FULL_TIME` - FULL_TIME + * `PART_TIME` - PART_TIME + * `INTERN` - INTERN + * `CONTRACTOR` - CONTRACTOR + * `FREELANCE` - FREELANCE + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: hris_v3.yml + EmploymentStatusEnum: + enum: + - ACTIVE + - PENDING + - INACTIVE + docs: |- + * `ACTIVE` - ACTIVE + * `PENDING` - PENDING + * `INACTIVE` - INACTIVE + source: + openapi: hris_v3.yml + EmploymentTypeEnum: + enum: + - FULL_TIME + - PART_TIME + - INTERN + - CONTRACTOR + - FREELANCE + docs: |- + * `FULL_TIME` - FULL_TIME + * `PART_TIME` - PART_TIME + * `INTERN` - INTERN + * `CONTRACTOR` - CONTRACTOR + * `FREELANCE` - FREELANCE + source: + openapi: hris_v3.yml + EnabledActionsEnum: + enum: + - READ + - WRITE + docs: |- + * `READ` - READ + * `WRITE` - WRITE + source: + openapi: hris_v3.yml + EncodingEnum: + enum: + - RAW + - BASE64 + - GZIP_BASE64 + docs: |- + * `RAW` - RAW + * `BASE64` - BASE64 + * `GZIP_BASE64` - GZIP_BASE64 + source: + openapi: hris_v3.yml + ErrorValidationProblem: + properties: + source: optional + title: string + detail: string + problem_type: string + source: + openapi: hris_v3.yml + EthnicityEnum: + enum: + - AMERICAN_INDIAN_OR_ALASKA_NATIVE + - ASIAN_OR_INDIAN_SUBCONTINENT + - BLACK_OR_AFRICAN_AMERICAN + - HISPANIC_OR_LATINO + - NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER + - TWO_OR_MORE_RACES + - WHITE + - PREFER_NOT_TO_DISCLOSE + docs: >- + * `AMERICAN_INDIAN_OR_ALASKA_NATIVE` - AMERICAN_INDIAN_OR_ALASKA_NATIVE + + * `ASIAN_OR_INDIAN_SUBCONTINENT` - ASIAN_OR_INDIAN_SUBCONTINENT + + * `BLACK_OR_AFRICAN_AMERICAN` - BLACK_OR_AFRICAN_AMERICAN + + * `HISPANIC_OR_LATINO` - HISPANIC_OR_LATINO + + * `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER` - + NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER + + * `TWO_OR_MORE_RACES` - TWO_OR_MORE_RACES + + * `WHITE` - WHITE + + * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE + source: + openapi: hris_v3.yml + EventTypeEnum: + enum: + - 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 + docs: >- + * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + + * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + + * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + + * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + + * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + + * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + + * `INVITED_USER` - INVITED_USER + + * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + + * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + + * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + + * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - + DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + + * `CREATED_DESTINATION` - CREATED_DESTINATION + + * `DELETED_DESTINATION` - DELETED_DESTINATION + + * `CHANGED_DESTINATION` - CHANGED_DESTINATION + + * `CHANGED_SCOPES` - CHANGED_SCOPES + + * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + + * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + + * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + + * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + + * `ENABLED_CATEGORY` - ENABLED_CATEGORY + + * `DISABLED_CATEGORY` - DISABLED_CATEGORY + + * `CHANGED_PASSWORD` - CHANGED_PASSWORD + + * `RESET_PASSWORD` - RESET_PASSWORD + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - + CREATED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - + CREATED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - + CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - + CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + + * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - + DELETED_INTEGRATION_WIDE_FIELD_MAPPING + + * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - + DELETED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + + * `MUTED_ISSUE` - MUTED_ISSUE + + * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + + * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + + * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + + * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + + * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + source: + openapi: hris_v3.yml + ExternalTargetFieldApi: + properties: + name: + type: optional + access: read-only + description: + type: optional + access: read-only + is_mapped: + type: optional + access: read-only + source: + openapi: hris_v3.yml + ExternalTargetFieldApiResponse: + properties: + Benefit: optional> + EmployerBenefit: optional> + Company: optional> + EmployeePayrollRun: optional> + Employee: optional> + Employment: optional> + Location: optional> + PayrollRun: optional> + Team: optional> + TimeOff: optional> + TimeOffBalance: optional> + BankInfo: optional> + PayGroup: optional> + Group: optional> + Dependent: optional> + TimesheetEntry: optional> + source: + openapi: hris_v3.yml + FieldMappingApiInstanceTargetField: + properties: + name: string + description: string + is_organization_wide: boolean + source: + openapi: hris_v3.yml + inline: true + FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo: + properties: + method: optional + url_path: optional + field_traversal_path: optional> + source: + openapi: hris_v3.yml + inline: true + FieldMappingApiInstanceRemoteField: + properties: + remote_key_name: optional + schema: optional> + remote_endpoint_info: FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo + source: + openapi: hris_v3.yml + inline: true + FieldMappingApiInstance: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + is_integration_wide: + type: optional + access: read-only + target_field: + type: optional + access: read-only + remote_field: + type: optional + access: read-only + source: + openapi: hris_v3.yml + FieldMappingApiInstanceResponse: + properties: + Benefit: optional> + EmployerBenefit: optional> + Company: optional> + EmployeePayrollRun: optional> + Employee: optional> + Employment: optional> + Location: optional> + PayrollRun: optional> + Team: optional> + TimeOff: optional> + TimeOffBalance: optional> + BankInfo: optional> + PayGroup: optional> + Group: optional> + Dependent: optional> + TimesheetEntry: optional> + source: + openapi: hris_v3.yml + FieldMappingInstanceResponse: + properties: + model: FieldMappingApiInstance + warnings: list + errors: list + logs: optional> + source: + openapi: hris_v3.yml + FieldPermissionDeserializer: + properties: + enabled_fields: optional> + disabled_fields: optional> + source: + openapi: hris_v3.yml + FieldPermissionDeserializerRequest: + properties: + enabled_fields: optional> + disabled_fields: optional> + source: + openapi: hris_v3.yml + FlsaStatusEnum: + enum: + - EXEMPT + - SALARIED_NONEXEMPT + - NONEXEMPT + - OWNER + docs: |- + * `EXEMPT` - EXEMPT + * `SALARIED_NONEXEMPT` - SALARIED_NONEXEMPT + * `NONEXEMPT` - NONEXEMPT + * `OWNER` - OWNER + source: + openapi: hris_v3.yml + GenderEnum: + enum: + - MALE + - FEMALE + - value: NON-BINARY + name: NonBinary + - OTHER + - PREFER_NOT_TO_DISCLOSE + docs: |- + * `MALE` - MALE + * `FEMALE` - FEMALE + * `NON-BINARY` - NON-BINARY + * `OTHER` - OTHER + * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE + source: + openapi: hris_v3.yml + GroupType: + discriminated: false + docs: |- + The Group type returned directly from the third-party. + + * `TEAM` - TEAM + * `DEPARTMENT` - DEPARTMENT + * `COST_CENTER` - COST_CENTER + * `BUSINESS_UNIT` - BUSINESS_UNIT + * `GROUP` - GROUP + union: + - GroupTypeEnum + - string + source: + openapi: hris_v3.yml + inline: true + Group: + docs: >- + # The Group Object + + ### Description + + The `Group` object is used to represent any subset of employees across, + for example, `DEPARTMENT` or `TEAM`. Employees can be in multiple Groups. + + + ### Usage Example + + Fetch from the `LIST Employee` endpoint and expand groups to view an + employee's groups. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + parent_group: + type: optional + docs: The parent group for this group. + validation: + format: uuid + name: + type: optional + docs: The group name. + type: + type: optional + docs: |- + The Group type returned directly from the third-party. + + * `TEAM` - TEAM + * `DEPARTMENT` - DEPARTMENT + * `COST_CENTER` - COST_CENTER + * `BUSINESS_UNIT` - BUSINESS_UNIT + * `GROUP` - GROUP + is_commonly_used_as_team: + type: optional + docs: >- + Indicates whether the Group refers to a team in the third party + platform. Note that this is an opinionated view based on how Merge + observes most organizations representing teams in each third party + platform. If your customer uses a platform different from most, there + is a chance this will not be correct. + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: hris_v3.yml + GroupTypeEnum: + enum: + - TEAM + - DEPARTMENT + - COST_CENTER + - BUSINESS_UNIT + - GROUP + docs: |- + * `TEAM` - TEAM + * `DEPARTMENT` - DEPARTMENT + * `COST_CENTER` - COST_CENTER + * `BUSINESS_UNIT` - BUSINESS_UNIT + * `GROUP` - GROUP + source: + openapi: hris_v3.yml + IgnoreCommonModelRequestReason: + discriminated: false + union: + - ReasonEnum + - string + source: + openapi: hris_v3.yml + inline: true + IgnoreCommonModelRequest: + properties: + reason: IgnoreCommonModelRequestReason + message: + type: optional + validation: + minLength: 1 + maxLength: 256 + source: + openapi: hris_v3.yml + IndividualCommonModelScopeDeserializer: + properties: + model_name: string + model_permissions: optional> + field_permissions: optional + source: + openapi: hris_v3.yml + IndividualCommonModelScopeDeserializerRequest: + properties: + model_name: + type: string + validation: + minLength: 1 + model_permissions: optional> + field_permissions: optional + source: + openapi: hris_v3.yml + IssueStatus: + discriminated: false + docs: |- + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + union: + - IssueStatusEnum + - string + source: + openapi: hris_v3.yml + inline: true + Issue: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + status: + type: optional + docs: |- + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + error_description: string + end_user: + type: optional> + access: read-only + first_incident_time: optional + last_incident_time: optional + is_muted: + type: optional + access: read-only + error_details: + type: optional> + access: read-only + source: + openapi: hris_v3.yml + IssueStatusEnum: + enum: + - ONGOING + - RESOLVED + docs: |- + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + source: + openapi: hris_v3.yml + LanguageEnum: + enum: + - en + - de + docs: |- + * `en` - en + * `de` - de + source: + openapi: hris_v3.yml + LastSyncResultEnum: + enum: + - SYNCING + - DONE + - FAILED + - DISABLED + - PAUSED + - PARTIALLY_SYNCED + docs: |- + * `SYNCING` - SYNCING + * `DONE` - DONE + * `FAILED` - FAILED + * `DISABLED` - DISABLED + * `PAUSED` - PAUSED + * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED + source: + openapi: hris_v3.yml + LinkToken: + properties: + link_token: string + integration_name: optional + magic_link_url: optional + source: + openapi: hris_v3.yml + LinkedAccountStatus: + properties: + linked_account_status: string + can_make_request: boolean + source: + openapi: hris_v3.yml + LocationCountry: + discriminated: false + docs: |- + The location's country. + + * `AF` - Afghanistan + * `AX` - Åland Islands + * `AL` - Albania + * `DZ` - Algeria + * `AS` - American Samoa + * `AD` - Andorra + * `AO` - Angola + * `AI` - Anguilla + * `AQ` - Antarctica + * `AG` - Antigua and Barbuda + * `AR` - Argentina + * `AM` - Armenia + * `AW` - Aruba + * `AU` - Australia + * `AT` - Austria + * `AZ` - Azerbaijan + * `BS` - Bahamas + * `BH` - Bahrain + * `BD` - Bangladesh + * `BB` - Barbados + * `BY` - Belarus + * `BE` - Belgium + * `BZ` - Belize + * `BJ` - Benin + * `BM` - Bermuda + * `BT` - Bhutan + * `BO` - Bolivia + * `BQ` - Bonaire, Sint Eustatius and Saba + * `BA` - Bosnia and Herzegovina + * `BW` - Botswana + * `BV` - Bouvet Island + * `BR` - Brazil + * `IO` - British Indian Ocean Territory + * `BN` - Brunei + * `BG` - Bulgaria + * `BF` - Burkina Faso + * `BI` - Burundi + * `CV` - Cabo Verde + * `KH` - Cambodia + * `CM` - Cameroon + * `CA` - Canada + * `KY` - Cayman Islands + * `CF` - Central African Republic + * `TD` - Chad + * `CL` - Chile + * `CN` - China + * `CX` - Christmas Island + * `CC` - Cocos (Keeling) Islands + * `CO` - Colombia + * `KM` - Comoros + * `CG` - Congo + * `CD` - Congo (the Democratic Republic of the) + * `CK` - Cook Islands + * `CR` - Costa Rica + * `CI` - Côte d'Ivoire + * `HR` - Croatia + * `CU` - Cuba + * `CW` - Curaçao + * `CY` - Cyprus + * `CZ` - Czechia + * `DK` - Denmark + * `DJ` - Djibouti + * `DM` - Dominica + * `DO` - Dominican Republic + * `EC` - Ecuador + * `EG` - Egypt + * `SV` - El Salvador + * `GQ` - Equatorial Guinea + * `ER` - Eritrea + * `EE` - Estonia + * `SZ` - Eswatini + * `ET` - Ethiopia + * `FK` - Falkland Islands (Malvinas) + * `FO` - Faroe Islands + * `FJ` - Fiji + * `FI` - Finland + * `FR` - France + * `GF` - French Guiana + * `PF` - French Polynesia + * `TF` - French Southern Territories + * `GA` - Gabon + * `GM` - Gambia + * `GE` - Georgia + * `DE` - Germany + * `GH` - Ghana + * `GI` - Gibraltar + * `GR` - Greece + * `GL` - Greenland + * `GD` - Grenada + * `GP` - Guadeloupe + * `GU` - Guam + * `GT` - Guatemala + * `GG` - Guernsey + * `GN` - Guinea + * `GW` - Guinea-Bissau + * `GY` - Guyana + * `HT` - Haiti + * `HM` - Heard Island and McDonald Islands + * `VA` - Holy See + * `HN` - Honduras + * `HK` - Hong Kong + * `HU` - Hungary + * `IS` - Iceland + * `IN` - India + * `ID` - Indonesia + * `IR` - Iran + * `IQ` - Iraq + * `IE` - Ireland + * `IM` - Isle of Man + * `IL` - Israel + * `IT` - Italy + * `JM` - Jamaica + * `JP` - Japan + * `JE` - Jersey + * `JO` - Jordan + * `KZ` - Kazakhstan + * `KE` - Kenya + * `KI` - Kiribati + * `KW` - Kuwait + * `KG` - Kyrgyzstan + * `LA` - Laos + * `LV` - Latvia + * `LB` - Lebanon + * `LS` - Lesotho + * `LR` - Liberia + * `LY` - Libya + * `LI` - Liechtenstein + * `LT` - Lithuania + * `LU` - Luxembourg + * `MO` - Macao + * `MG` - Madagascar + * `MW` - Malawi + * `MY` - Malaysia + * `MV` - Maldives + * `ML` - Mali + * `MT` - Malta + * `MH` - Marshall Islands + * `MQ` - Martinique + * `MR` - Mauritania + * `MU` - Mauritius + * `YT` - Mayotte + * `MX` - Mexico + * `FM` - Micronesia (Federated States of) + * `MD` - Moldova + * `MC` - Monaco + * `MN` - Mongolia + * `ME` - Montenegro + * `MS` - Montserrat + * `MA` - Morocco + * `MZ` - Mozambique + * `MM` - Myanmar + * `NA` - Namibia + * `NR` - Nauru + * `NP` - Nepal + * `NL` - Netherlands + * `NC` - New Caledonia + * `NZ` - New Zealand + * `NI` - Nicaragua + * `NE` - Niger + * `NG` - Nigeria + * `NU` - Niue + * `NF` - Norfolk Island + * `KP` - North Korea + * `MK` - North Macedonia + * `MP` - Northern Mariana Islands + * `NO` - Norway + * `OM` - Oman + * `PK` - Pakistan + * `PW` - Palau + * `PS` - Palestine, State of + * `PA` - Panama + * `PG` - Papua New Guinea + * `PY` - Paraguay + * `PE` - Peru + * `PH` - Philippines + * `PN` - Pitcairn + * `PL` - Poland + * `PT` - Portugal + * `PR` - Puerto Rico + * `QA` - Qatar + * `RE` - Réunion + * `RO` - Romania + * `RU` - Russia + * `RW` - Rwanda + * `BL` - Saint Barthélemy + * `SH` - Saint Helena, Ascension and Tristan da Cunha + * `KN` - Saint Kitts and Nevis + * `LC` - Saint Lucia + * `MF` - Saint Martin (French part) + * `PM` - Saint Pierre and Miquelon + * `VC` - Saint Vincent and the Grenadines + * `WS` - Samoa + * `SM` - San Marino + * `ST` - Sao Tome and Principe + * `SA` - Saudi Arabia + * `SN` - Senegal + * `RS` - Serbia + * `SC` - Seychelles + * `SL` - Sierra Leone + * `SG` - Singapore + * `SX` - Sint Maarten (Dutch part) + * `SK` - Slovakia + * `SI` - Slovenia + * `SB` - Solomon Islands + * `SO` - Somalia + * `ZA` - South Africa + * `GS` - South Georgia and the South Sandwich Islands + * `KR` - South Korea + * `SS` - South Sudan + * `ES` - Spain + * `LK` - Sri Lanka + * `SD` - Sudan + * `SR` - Suriname + * `SJ` - Svalbard and Jan Mayen + * `SE` - Sweden + * `CH` - Switzerland + * `SY` - Syria + * `TW` - Taiwan + * `TJ` - Tajikistan + * `TZ` - Tanzania + * `TH` - Thailand + * `TL` - Timor-Leste + * `TG` - Togo + * `TK` - Tokelau + * `TO` - Tonga + * `TT` - Trinidad and Tobago + * `TN` - Tunisia + * `TR` - Turkey + * `TM` - Turkmenistan + * `TC` - Turks and Caicos Islands + * `TV` - Tuvalu + * `UG` - Uganda + * `UA` - Ukraine + * `AE` - United Arab Emirates + * `GB` - United Kingdom + * `UM` - United States Minor Outlying Islands + * `US` - United States of America + * `UY` - Uruguay + * `UZ` - Uzbekistan + * `VU` - Vanuatu + * `VE` - Venezuela + * `VN` - Vietnam + * `VG` - Virgin Islands (British) + * `VI` - Virgin Islands (U.S.) + * `WF` - Wallis and Futuna + * `EH` - Western Sahara + * `YE` - Yemen + * `ZM` - Zambia + * `ZW` - Zimbabwe + union: + - CountryEnum + - string + source: + openapi: hris_v3.yml + inline: true + LocationLocationType: + discriminated: false + docs: |- + The location's type. Can be either WORK or HOME + + * `HOME` - HOME + * `WORK` - WORK + union: + - LocationTypeEnum + - string + source: + openapi: hris_v3.yml + inline: true + Location: + docs: >- + # The Location Object + + ### Description + + The `Location` object is used to represent an address that can be + associated with an employee. + + + ### Usage Example + + Fetch from the `LIST Locations` endpoint and filter by `ID` to show all + office locations. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The location's name. + phone_number: + type: optional + docs: The location's phone number. + street_1: + type: optional + docs: Line 1 of the location's street address. + street_2: + type: optional + docs: Line 2 of the location's street address. + city: + type: optional + docs: The location's city. + state: + type: optional + docs: The location's state. Represents a region if outside of the US. + zip_code: + type: optional + docs: The location's zip code or postal code. + country: + type: optional + docs: |- + The location's country. + + * `AF` - Afghanistan + * `AX` - Åland Islands + * `AL` - Albania + * `DZ` - Algeria + * `AS` - American Samoa + * `AD` - Andorra + * `AO` - Angola + * `AI` - Anguilla + * `AQ` - Antarctica + * `AG` - Antigua and Barbuda + * `AR` - Argentina + * `AM` - Armenia + * `AW` - Aruba + * `AU` - Australia + * `AT` - Austria + * `AZ` - Azerbaijan + * `BS` - Bahamas + * `BH` - Bahrain + * `BD` - Bangladesh + * `BB` - Barbados + * `BY` - Belarus + * `BE` - Belgium + * `BZ` - Belize + * `BJ` - Benin + * `BM` - Bermuda + * `BT` - Bhutan + * `BO` - Bolivia + * `BQ` - Bonaire, Sint Eustatius and Saba + * `BA` - Bosnia and Herzegovina + * `BW` - Botswana + * `BV` - Bouvet Island + * `BR` - Brazil + * `IO` - British Indian Ocean Territory + * `BN` - Brunei + * `BG` - Bulgaria + * `BF` - Burkina Faso + * `BI` - Burundi + * `CV` - Cabo Verde + * `KH` - Cambodia + * `CM` - Cameroon + * `CA` - Canada + * `KY` - Cayman Islands + * `CF` - Central African Republic + * `TD` - Chad + * `CL` - Chile + * `CN` - China + * `CX` - Christmas Island + * `CC` - Cocos (Keeling) Islands + * `CO` - Colombia + * `KM` - Comoros + * `CG` - Congo + * `CD` - Congo (the Democratic Republic of the) + * `CK` - Cook Islands + * `CR` - Costa Rica + * `CI` - Côte d'Ivoire + * `HR` - Croatia + * `CU` - Cuba + * `CW` - Curaçao + * `CY` - Cyprus + * `CZ` - Czechia + * `DK` - Denmark + * `DJ` - Djibouti + * `DM` - Dominica + * `DO` - Dominican Republic + * `EC` - Ecuador + * `EG` - Egypt + * `SV` - El Salvador + * `GQ` - Equatorial Guinea + * `ER` - Eritrea + * `EE` - Estonia + * `SZ` - Eswatini + * `ET` - Ethiopia + * `FK` - Falkland Islands (Malvinas) + * `FO` - Faroe Islands + * `FJ` - Fiji + * `FI` - Finland + * `FR` - France + * `GF` - French Guiana + * `PF` - French Polynesia + * `TF` - French Southern Territories + * `GA` - Gabon + * `GM` - Gambia + * `GE` - Georgia + * `DE` - Germany + * `GH` - Ghana + * `GI` - Gibraltar + * `GR` - Greece + * `GL` - Greenland + * `GD` - Grenada + * `GP` - Guadeloupe + * `GU` - Guam + * `GT` - Guatemala + * `GG` - Guernsey + * `GN` - Guinea + * `GW` - Guinea-Bissau + * `GY` - Guyana + * `HT` - Haiti + * `HM` - Heard Island and McDonald Islands + * `VA` - Holy See + * `HN` - Honduras + * `HK` - Hong Kong + * `HU` - Hungary + * `IS` - Iceland + * `IN` - India + * `ID` - Indonesia + * `IR` - Iran + * `IQ` - Iraq + * `IE` - Ireland + * `IM` - Isle of Man + * `IL` - Israel + * `IT` - Italy + * `JM` - Jamaica + * `JP` - Japan + * `JE` - Jersey + * `JO` - Jordan + * `KZ` - Kazakhstan + * `KE` - Kenya + * `KI` - Kiribati + * `KW` - Kuwait + * `KG` - Kyrgyzstan + * `LA` - Laos + * `LV` - Latvia + * `LB` - Lebanon + * `LS` - Lesotho + * `LR` - Liberia + * `LY` - Libya + * `LI` - Liechtenstein + * `LT` - Lithuania + * `LU` - Luxembourg + * `MO` - Macao + * `MG` - Madagascar + * `MW` - Malawi + * `MY` - Malaysia + * `MV` - Maldives + * `ML` - Mali + * `MT` - Malta + * `MH` - Marshall Islands + * `MQ` - Martinique + * `MR` - Mauritania + * `MU` - Mauritius + * `YT` - Mayotte + * `MX` - Mexico + * `FM` - Micronesia (Federated States of) + * `MD` - Moldova + * `MC` - Monaco + * `MN` - Mongolia + * `ME` - Montenegro + * `MS` - Montserrat + * `MA` - Morocco + * `MZ` - Mozambique + * `MM` - Myanmar + * `NA` - Namibia + * `NR` - Nauru + * `NP` - Nepal + * `NL` - Netherlands + * `NC` - New Caledonia + * `NZ` - New Zealand + * `NI` - Nicaragua + * `NE` - Niger + * `NG` - Nigeria + * `NU` - Niue + * `NF` - Norfolk Island + * `KP` - North Korea + * `MK` - North Macedonia + * `MP` - Northern Mariana Islands + * `NO` - Norway + * `OM` - Oman + * `PK` - Pakistan + * `PW` - Palau + * `PS` - Palestine, State of + * `PA` - Panama + * `PG` - Papua New Guinea + * `PY` - Paraguay + * `PE` - Peru + * `PH` - Philippines + * `PN` - Pitcairn + * `PL` - Poland + * `PT` - Portugal + * `PR` - Puerto Rico + * `QA` - Qatar + * `RE` - Réunion + * `RO` - Romania + * `RU` - Russia + * `RW` - Rwanda + * `BL` - Saint Barthélemy + * `SH` - Saint Helena, Ascension and Tristan da Cunha + * `KN` - Saint Kitts and Nevis + * `LC` - Saint Lucia + * `MF` - Saint Martin (French part) + * `PM` - Saint Pierre and Miquelon + * `VC` - Saint Vincent and the Grenadines + * `WS` - Samoa + * `SM` - San Marino + * `ST` - Sao Tome and Principe + * `SA` - Saudi Arabia + * `SN` - Senegal + * `RS` - Serbia + * `SC` - Seychelles + * `SL` - Sierra Leone + * `SG` - Singapore + * `SX` - Sint Maarten (Dutch part) + * `SK` - Slovakia + * `SI` - Slovenia + * `SB` - Solomon Islands + * `SO` - Somalia + * `ZA` - South Africa + * `GS` - South Georgia and the South Sandwich Islands + * `KR` - South Korea + * `SS` - South Sudan + * `ES` - Spain + * `LK` - Sri Lanka + * `SD` - Sudan + * `SR` - Suriname + * `SJ` - Svalbard and Jan Mayen + * `SE` - Sweden + * `CH` - Switzerland + * `SY` - Syria + * `TW` - Taiwan + * `TJ` - Tajikistan + * `TZ` - Tanzania + * `TH` - Thailand + * `TL` - Timor-Leste + * `TG` - Togo + * `TK` - Tokelau + * `TO` - Tonga + * `TT` - Trinidad and Tobago + * `TN` - Tunisia + * `TR` - Turkey + * `TM` - Turkmenistan + * `TC` - Turks and Caicos Islands + * `TV` - Tuvalu + * `UG` - Uganda + * `UA` - Ukraine + * `AE` - United Arab Emirates + * `GB` - United Kingdom + * `UM` - United States Minor Outlying Islands + * `US` - United States of America + * `UY` - Uruguay + * `UZ` - Uzbekistan + * `VU` - Vanuatu + * `VE` - Venezuela + * `VN` - Vietnam + * `VG` - Virgin Islands (British) + * `VI` - Virgin Islands (U.S.) + * `WF` - Wallis and Futuna + * `EH` - Western Sahara + * `YE` - Yemen + * `ZM` - Zambia + * `ZW` - Zimbabwe + location_type: + type: optional + docs: |- + The location's type. Can be either WORK or HOME + + * `HOME` - HOME + * `WORK` - WORK + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: hris_v3.yml + LocationTypeEnum: + enum: + - HOME + - WORK + docs: |- + * `HOME` - HOME + * `WORK` - WORK + source: + openapi: hris_v3.yml + MaritalStatusEnum: + enum: + - SINGLE + - MARRIED_FILING_JOINTLY + - MARRIED_FILING_SEPARATELY + - HEAD_OF_HOUSEHOLD + - QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD + docs: >- + * `SINGLE` - SINGLE + + * `MARRIED_FILING_JOINTLY` - MARRIED_FILING_JOINTLY + + * `MARRIED_FILING_SEPARATELY` - MARRIED_FILING_SEPARATELY + + * `HEAD_OF_HOUSEHOLD` - HEAD_OF_HOUSEHOLD + + * `QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD` - + QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD + source: + openapi: hris_v3.yml + MetaResponse: + properties: + request_schema: map + remote_field_classes: optional> + status: optional + has_conditional_params: boolean + has_required_linked_account_params: boolean + source: + openapi: hris_v3.yml + MethodEnum: + enum: + - GET + - OPTIONS + - HEAD + - POST + - PUT + - PATCH + - DELETE + docs: |- + * `GET` - GET + * `OPTIONS` - OPTIONS + * `HEAD` - HEAD + * `POST` - POST + * `PUT` - PUT + * `PATCH` - PATCH + * `DELETE` - DELETE + source: + openapi: hris_v3.yml + ModelOperation: + docs: >- + # The ModelOperation Object + + ### Description + + The `ModelOperation` object is used to represent the operations that are + currently supported for a given model. + + + ### Usage Example + + View what operations are supported for the `Candidate` endpoint. + properties: + model_name: string + available_operations: list + required_post_parameters: list + supported_fields: list + source: + openapi: hris_v3.yml + ModelPermissionDeserializer: + properties: + is_enabled: optional + source: + openapi: hris_v3.yml + ModelPermissionDeserializerRequest: + properties: + is_enabled: optional + source: + openapi: hris_v3.yml + MultipartFormFieldRequest: + docs: >- + # The MultipartFormField Object + + ### Description + + The `MultipartFormField` object is used to represent fields in an HTTP + request using `multipart/form-data`. + + + ### Usage Example + + Create a `MultipartFormField` to define a multipart form entry. + properties: + name: + type: string + docs: The name of the form field + validation: + minLength: 1 + data: + type: string + docs: The data for the form field. + validation: + minLength: 1 + encoding: + type: optional + docs: |- + The encoding of the value of `data`. Defaults to `RAW` if not defined. + + * `RAW` - RAW + * `BASE64` - BASE64 + * `GZIP_BASE64` - GZIP_BASE64 + file_name: + type: optional + docs: The file name of the form field, if the field is for a file. + validation: + minLength: 1 + content_type: + type: optional + docs: The MIME type of the file, if the field is for a file. + validation: + minLength: 1 + source: + openapi: hris_v3.yml + PaginatedAccountDetailsAndActionsList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: hris_v3.yml + PaginatedAuditLogEventList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: hris_v3.yml + PaginatedBankInfoList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: hris_v3.yml + PaginatedBenefitList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: hris_v3.yml + PaginatedCompanyList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: hris_v3.yml + PaginatedDependentList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: hris_v3.yml + PaginatedEmployeeList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: hris_v3.yml + PaginatedEmployeePayrollRunList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: hris_v3.yml + PaginatedEmployerBenefitList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: hris_v3.yml + PaginatedEmploymentList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: hris_v3.yml + PaginatedGroupList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: hris_v3.yml + PaginatedIssueList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: hris_v3.yml + PaginatedLocationList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: hris_v3.yml + PaginatedPayGroupList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: hris_v3.yml + PaginatedPayrollRunList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: hris_v3.yml + PaginatedSyncStatusList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: hris_v3.yml + PaginatedTeamList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: hris_v3.yml + PaginatedTimeOffBalanceList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: hris_v3.yml + PaginatedTimeOffList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: hris_v3.yml + PaginatedTimesheetEntryList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: hris_v3.yml + PayCurrencyEnum: + enum: + - XUA + - AFN + - AFA + - ALL + - ALK + - DZD + - ADP + - AOA + - AOK + - AON + - AOR + - ARA + - ARS + - ARM + - ARP + - ARL + - AMD + - AWG + - AUD + - ATS + - AZN + - AZM + - BSD + - BHD + - BDT + - BBD + - BYN + - BYB + - BYR + - BEF + - BEC + - BEL + - BZD + - BMD + - BTN + - BOB + - BOL + - BOV + - BOP + - BAM + - BAD + - BAN + - BWP + - BRC + - BRZ + - BRE + - BRR + - BRN + - BRB + - BRL + - GBP + - BND + - BGL + - BGN + - BGO + - BGM + - BUK + - BIF + - XPF + - KHR + - CAD + - CVE + - KYD + - XAF + - CLE + - CLP + - CLF + - CNX + - CNY + - CNH + - COP + - COU + - KMF + - CDF + - CRC + - HRD + - HRK + - CUC + - CUP + - CYP + - CZK + - CSK + - DKK + - DJF + - DOP + - NLG + - XCD + - DDM + - ECS + - ECV + - EGP + - GQE + - ERN + - EEK + - ETB + - EUR + - XBA + - XEU + - XBB + - XBC + - XBD + - FKP + - FJD + - FIM + - FRF + - XFO + - XFU + - GMD + - GEK + - GEL + - DEM + - GHS + - GHC + - GIP + - XAU + - GRD + - GTQ + - GWP + - GNF + - GNS + - GYD + - HTG + - HNL + - HKD + - HUF + - IMP + - ISK + - ISJ + - INR + - IDR + - IRR + - IQD + - IEP + - ILS + - ILP + - ILR + - ITL + - JMD + - JPY + - JOD + - KZT + - KES + - KWD + - KGS + - LAK + - LVL + - LVR + - LBP + - LSL + - LRD + - LYD + - LTL + - LTT + - LUL + - LUC + - LUF + - MOP + - MKD + - MKN + - MGA + - MGF + - MWK + - MYR + - MVR + - MVP + - MLF + - MTL + - MTP + - MRU + - MRO + - MUR + - MXV + - MXN + - MXP + - MDC + - MDL + - MCF + - MNT + - MAD + - MAF + - MZE + - MZN + - MZM + - MMK + - NAD + - NPR + - ANG + - TWD + - NZD + - NIO + - NIC + - NGN + - KPW + - NOK + - OMR + - PKR + - XPD + - PAB + - PGK + - PYG + - PEI + - PEN + - PES + - PHP + - XPT + - PLN + - PLZ + - PTE + - GWE + - QAR + - XRE + - RHD + - RON + - ROL + - RUB + - RUR + - RWF + - SVC + - WST + - SAR + - RSD + - CSD + - SCR + - SLL + - XAG + - SGD + - SKK + - SIT + - SBD + - SOS + - ZAR + - ZAL + - KRH + - KRW + - KRO + - SSP + - SUR + - ESP + - ESA + - ESB + - XDR + - LKR + - SHP + - XSU + - SDD + - SDG + - SDP + - SRD + - SRG + - SZL + - SEK + - CHF + - SYP + - STN + - STD + - TVD + - TJR + - TJS + - TZS + - XTS + - THB + - XXX + - TPE + - TOP + - TTD + - TND + - TRY + - TRL + - TMT + - TMM + - USD + - USN + - USS + - UGX + - UGS + - UAH + - UAK + - AED + - UYW + - UYU + - UYP + - UYI + - UZS + - VUV + - VES + - VEB + - VEF + - VND + - VNN + - CHE + - CHW + - XOF + - YDD + - YER + - YUN + - YUD + - YUM + - YUR + - ZWN + - ZRN + - ZRZ + - ZMW + - ZMK + - ZWD + - ZWR + - ZWL + docs: >- + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + source: + openapi: hris_v3.yml + PayFrequencyEnum: + enum: + - WEEKLY + - BIWEEKLY + - MONTHLY + - QUARTERLY + - SEMIANNUALLY + - ANNUALLY + - value: THIRTEEN-MONTHLY + name: ThirteenMonthly + - PRO_RATA + - SEMIMONTHLY + docs: |- + * `WEEKLY` - WEEKLY + * `BIWEEKLY` - BIWEEKLY + * `MONTHLY` - MONTHLY + * `QUARTERLY` - QUARTERLY + * `SEMIANNUALLY` - SEMIANNUALLY + * `ANNUALLY` - ANNUALLY + * `THIRTEEN-MONTHLY` - THIRTEEN-MONTHLY + * `PRO_RATA` - PRO_RATA + * `SEMIMONTHLY` - SEMIMONTHLY + source: + openapi: hris_v3.yml + PayGroup: + docs: >- + # The PayGroup Object + + ### Description + + The `PayGroup` object is used to represent a subset of employees that are + put together for payroll processing purposes. + + + ### Usage Example + + Fetch from the `LIST PayGroup` endpoint and filter by `ID` to show all pay + group information. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + pay_group_name: + type: optional + docs: The pay group name. + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: hris_v3.yml + PayPeriodEnum: + enum: + - HOUR + - DAY + - WEEK + - EVERY_TWO_WEEKS + - SEMIMONTHLY + - MONTH + - QUARTER + - EVERY_SIX_MONTHS + - YEAR + docs: |- + * `HOUR` - HOUR + * `DAY` - DAY + * `WEEK` - WEEK + * `EVERY_TWO_WEEKS` - EVERY_TWO_WEEKS + * `SEMIMONTHLY` - SEMIMONTHLY + * `MONTH` - MONTH + * `QUARTER` - QUARTER + * `EVERY_SIX_MONTHS` - EVERY_SIX_MONTHS + * `YEAR` - YEAR + source: + openapi: hris_v3.yml + PayrollRunRunState: + discriminated: false + docs: |- + The state of the payroll run + + * `PAID` - PAID + * `DRAFT` - DRAFT + * `APPROVED` - APPROVED + * `FAILED` - FAILED + * `CLOSED` - CLOSED + union: + - RunStateEnum + - string + source: + openapi: hris_v3.yml + inline: true + PayrollRunRunType: + discriminated: false + docs: |- + The type of the payroll run + + * `REGULAR` - REGULAR + * `OFF_CYCLE` - OFF_CYCLE + * `CORRECTION` - CORRECTION + * `TERMINATION` - TERMINATION + * `SIGN_ON_BONUS` - SIGN_ON_BONUS + union: + - RunTypeEnum + - string + source: + openapi: hris_v3.yml + inline: true + PayrollRun: + docs: >- + # The PayrollRun Object + + ### Description + + The `PayrollRun` object is used to represent a group of pay statements for + a specific pay schedule. + + + ### Usage Example + + Fetch from the `LIST PayrollRuns` endpoint and filter by `ID` to show all + payroll runs. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + run_state: + type: optional + docs: |- + The state of the payroll run + + * `PAID` - PAID + * `DRAFT` - DRAFT + * `APPROVED` - APPROVED + * `FAILED` - FAILED + * `CLOSED` - CLOSED + run_type: + type: optional + docs: |- + The type of the payroll run + + * `REGULAR` - REGULAR + * `OFF_CYCLE` - OFF_CYCLE + * `CORRECTION` - CORRECTION + * `TERMINATION` - TERMINATION + * `SIGN_ON_BONUS` - SIGN_ON_BONUS + start_date: + type: optional + docs: The day and time the payroll run started. + end_date: + type: optional + docs: The day and time the payroll run ended. + check_date: + type: optional + docs: The day and time the payroll run was checked. + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: hris_v3.yml + PolicyTypeEnum: + enum: + - VACATION + - SICK + - PERSONAL + - JURY_DUTY + - VOLUNTEER + - BEREAVEMENT + docs: |- + * `VACATION` - VACATION + * `SICK` - SICK + * `PERSONAL` - PERSONAL + * `JURY_DUTY` - JURY_DUTY + * `VOLUNTEER` - VOLUNTEER + * `BEREAVEMENT` - BEREAVEMENT + source: + openapi: hris_v3.yml + ReasonEnum: + enum: + - GENERAL_CUSTOMER_REQUEST + - GDPR + - OTHER + docs: |- + * `GENERAL_CUSTOMER_REQUEST` - GENERAL_CUSTOMER_REQUEST + * `GDPR` - GDPR + * `OTHER` - OTHER + source: + openapi: hris_v3.yml + RelationshipEnum: + enum: + - CHILD + - SPOUSE + - DOMESTIC_PARTNER + docs: |- + * `CHILD` - CHILD + * `SPOUSE` - SPOUSE + * `DOMESTIC_PARTNER` - DOMESTIC_PARTNER + source: + openapi: hris_v3.yml + RemoteData: + docs: >- + # The RemoteData Object + + ### Description + + The `RemoteData` object is used to represent the full data pulled from the + third-party API for an object. + + + ### Usage Example + + TODO + properties: + path: + type: string + docs: The third-party API path that is being called. + data: + type: optional + access: read-only + source: + openapi: hris_v3.yml + RemoteEndpointInfo: + properties: + method: string + url_path: string + field_traversal_path: list + source: + openapi: hris_v3.yml + RemoteFieldApiCoverage: + discriminated: false + union: + - integer + - double + source: + openapi: hris_v3.yml + inline: true + RemoteFieldApi: + properties: + schema: map + remote_key_name: string + remote_endpoint_info: RemoteEndpointInfo + example_values: optional> + advanced_metadata: optional + coverage: + type: optional + access: read-only + source: + openapi: hris_v3.yml + RemoteFieldApiResponse: + properties: + Benefit: optional> + EmployerBenefit: optional> + Company: optional> + EmployeePayrollRun: optional> + Employee: optional> + Employment: optional> + Location: optional> + PayrollRun: optional> + Team: optional> + TimeOff: optional> + TimeOffBalance: optional> + BankInfo: optional> + PayGroup: optional> + Group: optional> + Dependent: optional> + TimesheetEntry: optional> + source: + openapi: hris_v3.yml + RemoteKey: + docs: >- + # The RemoteKey Object + + ### Description + + The `RemoteKey` object is used to represent a request for a new remote + key. + + + ### Usage Example + + Post a `GenerateRemoteKey` to receive a new `RemoteKey`. + properties: + name: string + key: string + source: + openapi: hris_v3.yml + RemoteResponseResponseType: + discriminated: false + union: + - ResponseTypeEnum + - string + source: + openapi: hris_v3.yml + inline: true + RemoteResponse: + docs: >- + # The RemoteResponse Object + + ### Description + + The `RemoteResponse` object is used to represent information returned from + a third-party endpoint. + + + ### Usage Example + + View the `RemoteResponse` returned from your `DataPassthrough`. + properties: + method: string + path: string + status: integer + response: unknown + response_headers: optional> + response_type: optional + headers: optional> + source: + openapi: hris_v3.yml + RequestFormatEnum: + enum: + - JSON + - XML + - MULTIPART + docs: |- + * `JSON` - JSON + * `XML` - XML + * `MULTIPART` - MULTIPART + source: + openapi: hris_v3.yml + RequestTypeEnum: + enum: + - VACATION + - SICK + - PERSONAL + - JURY_DUTY + - VOLUNTEER + - BEREAVEMENT + docs: |- + * `VACATION` - VACATION + * `SICK` - SICK + * `PERSONAL` - PERSONAL + * `JURY_DUTY` - JURY_DUTY + * `VOLUNTEER` - VOLUNTEER + * `BEREAVEMENT` - BEREAVEMENT + source: + openapi: hris_v3.yml + ResponseTypeEnum: + enum: + - JSON + - BASE64_GZIP + docs: |- + * `JSON` - JSON + * `BASE64_GZIP` - BASE64_GZIP + source: + openapi: hris_v3.yml + RoleEnum: + enum: + - ADMIN + - DEVELOPER + - MEMBER + - API + - SYSTEM + - MERGE_TEAM + docs: |- + * `ADMIN` - ADMIN + * `DEVELOPER` - DEVELOPER + * `MEMBER` - MEMBER + * `API` - API + * `SYSTEM` - SYSTEM + * `MERGE_TEAM` - MERGE_TEAM + source: + openapi: hris_v3.yml + RunStateEnum: + enum: + - PAID + - DRAFT + - APPROVED + - FAILED + - CLOSED + docs: |- + * `PAID` - PAID + * `DRAFT` - DRAFT + * `APPROVED` - APPROVED + * `FAILED` - FAILED + * `CLOSED` - CLOSED + source: + openapi: hris_v3.yml + RunTypeEnum: + enum: + - REGULAR + - OFF_CYCLE + - CORRECTION + - TERMINATION + - SIGN_ON_BONUS + docs: |- + * `REGULAR` - REGULAR + * `OFF_CYCLE` - OFF_CYCLE + * `CORRECTION` - CORRECTION + * `TERMINATION` - TERMINATION + * `SIGN_ON_BONUS` - SIGN_ON_BONUS + source: + openapi: hris_v3.yml + SelectiveSyncConfigurationsUsageEnum: + enum: + - IN_NEXT_SYNC + - IN_LAST_SYNC + docs: |- + * `IN_NEXT_SYNC` - IN_NEXT_SYNC + * `IN_LAST_SYNC` - IN_LAST_SYNC + source: + openapi: hris_v3.yml + StatusFd5Enum: + enum: + - SYNCING + - DONE + - FAILED + - DISABLED + - PAUSED + - PARTIALLY_SYNCED + docs: |- + * `SYNCING` - SYNCING + * `DONE` - DONE + * `FAILED` - FAILED + * `DISABLED` - DISABLED + * `PAUSED` - PAUSED + * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED + source: + openapi: hris_v3.yml + SyncStatusLastSyncResult: + discriminated: false + union: + - LastSyncResultEnum + - string + source: + openapi: hris_v3.yml + inline: true + SyncStatusStatus: + discriminated: false + union: + - StatusFd5Enum + - string + source: + openapi: hris_v3.yml + inline: true + SyncStatus: + docs: >- + # The SyncStatus Object + + ### Description + + The `SyncStatus` object is used to represent the syncing state of an + account + + + ### Usage Example + + View the `SyncStatus` for an account to see how recently its models were + synced. + properties: + model_name: string + model_id: string + last_sync_start: optional + next_sync_start: optional + last_sync_result: optional + last_sync_finished: optional + status: SyncStatusStatus + is_initial_sync: boolean + selective_sync_configurations_usage: optional + source: + openapi: hris_v3.yml + Tax: + docs: >- + # The Tax Object + + ### Description + + The `Tax` object is used to represent an array of the tax deductions for a + given employee's payroll run. + + + ### Usage Example + + Fetch from the `LIST Taxes` endpoint and filter by `ID` to show all taxes. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + employee_payroll_run: + type: optional + validation: + format: uuid + name: + type: optional + docs: The tax's name. + amount: + type: optional + docs: The tax amount. + employer_tax: + type: optional + docs: Whether or not the employer is responsible for paying the tax. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: hris_v3.yml + TeamParentTeam: + discriminated: false + docs: The team's parent team. + union: + - type: string + validation: + format: uuid + - Team + source: + openapi: hris_v3.yml + inline: true + Team: + docs: >- + # The Team Object + + ### Description + + The `Team` object is used to represent a subdivision of the company, + usually a department. Each employee will be grouped into one specific + Team. + + + ### Usage Example + + If you're building a way to filter by `Team`, you'd hit the `GET Teams` + endpoint to fetch the `Teams`, and then use the `ID` of the team your user + selects to filter the `GET Employees` endpoint. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The team's name. + parent_team: + type: optional + docs: The team's parent team. + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: hris_v3.yml + TimeOffEmployee: + discriminated: false + docs: The employee requesting time off. + union: + - type: string + validation: + format: uuid + - Employee + source: + openapi: hris_v3.yml + inline: true + TimeOffApprover: + discriminated: false + docs: >- + The Merge ID of the employee with the ability to approve the time off + request. + union: + - type: string + validation: + format: uuid + - Employee + source: + openapi: hris_v3.yml + inline: true + TimeOffStatus: + discriminated: false + docs: |- + The status of this time off request. + + * `REQUESTED` - REQUESTED + * `APPROVED` - APPROVED + * `DECLINED` - DECLINED + * `CANCELLED` - CANCELLED + * `DELETED` - DELETED + union: + - TimeOffStatusEnum + - string + source: + openapi: hris_v3.yml + inline: true + TimeOffUnits: + discriminated: false + docs: >- + The measurement that the third-party integration uses to count time + requested. + + + * `HOURS` - HOURS + + * `DAYS` - DAYS + union: + - UnitsEnum + - string + source: + openapi: hris_v3.yml + inline: true + TimeOffRequestType: + discriminated: false + docs: |- + The type of time off request. + + * `VACATION` - VACATION + * `SICK` - SICK + * `PERSONAL` - PERSONAL + * `JURY_DUTY` - JURY_DUTY + * `VOLUNTEER` - VOLUNTEER + * `BEREAVEMENT` - BEREAVEMENT + union: + - RequestTypeEnum + - string + source: + openapi: hris_v3.yml + inline: true + TimeOff: + docs: >- + # The TimeOff Object + + ### Description + + The `TimeOff` object is used to represent all employees' Time Off entries. + + + ### Usage Example + + Fetch from the `LIST TimeOffs` endpoint and filter by `ID` to show all + time off requests. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + employee: + type: optional + docs: The employee requesting time off. + approver: + type: optional + docs: >- + The Merge ID of the employee with the ability to approve the time off + request. + status: + type: optional + docs: |- + The status of this time off request. + + * `REQUESTED` - REQUESTED + * `APPROVED` - APPROVED + * `DECLINED` - DECLINED + * `CANCELLED` - CANCELLED + * `DELETED` - DELETED + employee_note: + type: optional + docs: The employee note for this time off request. + units: + type: optional + docs: >- + The measurement that the third-party integration uses to count time + requested. + + + * `HOURS` - HOURS + + * `DAYS` - DAYS + amount: + type: optional + docs: The time off quantity measured by the prescribed “units”. + request_type: + type: optional + docs: |- + The type of time off request. + + * `VACATION` - VACATION + * `SICK` - SICK + * `PERSONAL` - PERSONAL + * `JURY_DUTY` - JURY_DUTY + * `VOLUNTEER` - VOLUNTEER + * `BEREAVEMENT` - BEREAVEMENT + start_time: + type: optional + docs: The day and time of the start of the time requested off. + end_time: + type: optional + docs: The day and time of the end of the time requested off. + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: hris_v3.yml + TimeOffBalanceEmployee: + discriminated: false + docs: The employee the balance belongs to. + union: + - type: string + validation: + format: uuid + - Employee + source: + openapi: hris_v3.yml + inline: true + TimeOffBalancePolicyType: + discriminated: false + docs: |- + The policy type of this time off balance. + + * `VACATION` - VACATION + * `SICK` - SICK + * `PERSONAL` - PERSONAL + * `JURY_DUTY` - JURY_DUTY + * `VOLUNTEER` - VOLUNTEER + * `BEREAVEMENT` - BEREAVEMENT + union: + - PolicyTypeEnum + - string + source: + openapi: hris_v3.yml + inline: true + TimeOffBalance: + docs: >- + # The TimeOffBalance Object + + ### Description + + The `TimeOffBalance` object is used to represent current balances for an + employee's Time Off plan. + + + ### Usage Example + + Fetch from the `LIST TimeOffBalances` endpoint and filter by `ID` to show + all time off balances. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + employee: + type: optional + docs: The employee the balance belongs to. + balance: + type: optional + docs: >- + The current remaining PTO balance, measured in hours. For integrations + that return this value in days, Merge multiplies by 8 to calculate + hours. + used: + type: optional + docs: >- + The amount of PTO used in terms of hours. For integrations that return + this value in days, Merge multiplies by 8 to calculate hours. + policy_type: + type: optional + docs: |- + The policy type of this time off balance. + + * `VACATION` - VACATION + * `SICK` - SICK + * `PERSONAL` - PERSONAL + * `JURY_DUTY` - JURY_DUTY + * `VOLUNTEER` - VOLUNTEER + * `BEREAVEMENT` - BEREAVEMENT + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: hris_v3.yml + TimeOffRequestEmployee: + discriminated: false + docs: The employee requesting time off. + union: + - type: string + validation: + format: uuid + - Employee + source: + openapi: hris_v3.yml + inline: true + TimeOffRequestApprover: + discriminated: false + docs: >- + The Merge ID of the employee with the ability to approve the time off + request. + union: + - type: string + validation: + format: uuid + - Employee + source: + openapi: hris_v3.yml + inline: true + TimeOffRequestStatus: + discriminated: false + docs: |- + The status of this time off request. + + * `REQUESTED` - REQUESTED + * `APPROVED` - APPROVED + * `DECLINED` - DECLINED + * `CANCELLED` - CANCELLED + * `DELETED` - DELETED + union: + - TimeOffStatusEnum + - string + source: + openapi: hris_v3.yml + inline: true + TimeOffRequestUnits: + discriminated: false + docs: >- + The measurement that the third-party integration uses to count time + requested. + + + * `HOURS` - HOURS + + * `DAYS` - DAYS + union: + - UnitsEnum + - string + source: + openapi: hris_v3.yml + inline: true + TimeOffRequestRequestType: + discriminated: false + docs: |- + The type of time off request. + + * `VACATION` - VACATION + * `SICK` - SICK + * `PERSONAL` - PERSONAL + * `JURY_DUTY` - JURY_DUTY + * `VOLUNTEER` - VOLUNTEER + * `BEREAVEMENT` - BEREAVEMENT + union: + - RequestTypeEnum + - string + source: + openapi: hris_v3.yml + inline: true + TimeOffRequest: + docs: >- + # The TimeOff Object + + ### Description + + The `TimeOff` object is used to represent all employees' Time Off entries. + + + ### Usage Example + + Fetch from the `LIST TimeOffs` endpoint and filter by `ID` to show all + time off requests. + properties: + employee: + type: optional + docs: The employee requesting time off. + approver: + type: optional + docs: >- + The Merge ID of the employee with the ability to approve the time off + request. + status: + type: optional + docs: |- + The status of this time off request. + + * `REQUESTED` - REQUESTED + * `APPROVED` - APPROVED + * `DECLINED` - DECLINED + * `CANCELLED` - CANCELLED + * `DELETED` - DELETED + employee_note: + type: optional + docs: The employee note for this time off request. + units: + type: optional + docs: >- + The measurement that the third-party integration uses to count time + requested. + + + * `HOURS` - HOURS + + * `DAYS` - DAYS + amount: + type: optional + docs: The time off quantity measured by the prescribed “units”. + request_type: + type: optional + docs: |- + The type of time off request. + + * `VACATION` - VACATION + * `SICK` - SICK + * `PERSONAL` - PERSONAL + * `JURY_DUTY` - JURY_DUTY + * `VOLUNTEER` - VOLUNTEER + * `BEREAVEMENT` - BEREAVEMENT + start_time: + type: optional + docs: The day and time of the start of the time requested off. + end_time: + type: optional + docs: The day and time of the end of the time requested off. + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: hris_v3.yml + TimeOffResponse: + properties: + model: TimeOff + warnings: list + errors: list + logs: optional> + source: + openapi: hris_v3.yml + TimeOffStatusEnum: + enum: + - REQUESTED + - APPROVED + - DECLINED + - CANCELLED + - DELETED + docs: |- + * `REQUESTED` - REQUESTED + * `APPROVED` - APPROVED + * `DECLINED` - DECLINED + * `CANCELLED` - CANCELLED + * `DELETED` - DELETED + source: + openapi: hris_v3.yml + TimesheetEntryEmployee: + discriminated: false + docs: The employee the timesheet entry is for. + union: + - type: string + validation: + format: uuid + - Employee + source: + openapi: hris_v3.yml + inline: true + TimesheetEntry: + docs: >- + # The Timesheet Entry Object + + ### Description + + The `Timesheet Entry` object is used to track coverage for hours worked by + an 'Employee'. + + + + ### Usage Example + + GET and POST Timesheet Entries + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + employee: + type: optional + docs: The employee the timesheet entry is for. + hours_worked: + type: optional + docs: The number of hours logged by the employee. + start_time: + type: optional + docs: The time at which the employee started work. + end_time: + type: optional + docs: The time at which the employee ended work. + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: hris_v3.yml + TimesheetEntryRequestEmployee: + discriminated: false + docs: The employee the timesheet entry is for. + union: + - type: string + validation: + format: uuid + - Employee + source: + openapi: hris_v3.yml + inline: true + TimesheetEntryRequest: + docs: >- + # The Timesheet Entry Object + + ### Description + + The `Timesheet Entry` object is used to track coverage for hours worked by + an 'Employee'. + + + + ### Usage Example + + GET and POST Timesheet Entries + properties: + employee: + type: optional + docs: The employee the timesheet entry is for. + hours_worked: + type: optional + docs: The number of hours logged by the employee. + start_time: + type: optional + docs: The time at which the employee started work. + end_time: + type: optional + docs: The time at which the employee ended work. + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: hris_v3.yml + TimesheetEntryResponse: + properties: + model: TimesheetEntry + warnings: list + errors: list + logs: optional> + source: + openapi: hris_v3.yml + UnitsEnum: + enum: + - HOURS + - DAYS + docs: |- + * `HOURS` - HOURS + * `DAYS` - DAYS + source: + openapi: hris_v3.yml + ValidationProblemSource: + properties: + pointer: string + source: + openapi: hris_v3.yml + WarningValidationProblem: + properties: + source: optional + title: string + detail: string + problem_type: string + source: + openapi: hris_v3.yml + WebhookReceiver: + properties: + event: string + is_active: boolean + key: optional + source: + openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/accountDetails.yml b/.mock/definition/HRIS/accountDetails.yml new file mode 100644 index 000000000..2a54beef7 --- /dev/null +++ b/.mock/definition/HRIS/accountDetails.yml @@ -0,0 +1,36 @@ +imports: + hrisRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + retrieve: + path: /hris/v1/account-details + method: GET + auth: true + docs: Get details for a linked account. + source: + openapi: hris_v3.yml + response: + docs: '' + type: hrisRoot.AccountDetails + status-code: 200 + examples: + - headers: {} + response: + body: + id: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd + integration: BambooHR + integration_slug: bamboohr + category: hris + end_user_origin_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + end_user_organization_name: Waystar Royco + end_user_email_address: kendall.roy@waystar-royco.com + status: COMPLETE + webhook_listener_url: >- + https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 + is_duplicate: true + account_type: PRODUCTION + completed_at: '2024-08-26T20:11:19Z' + source: + openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/accountToken.yml b/.mock/definition/HRIS/accountToken.yml new file mode 100644 index 000000000..c36b7d207 --- /dev/null +++ b/.mock/definition/HRIS/accountToken.yml @@ -0,0 +1,44 @@ +imports: + hrisRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + retrieve: + path: /hris/v1/account-token/{public_token} + method: GET + auth: true + docs: >- + Returns the account token for the end user with the provided public + token. + source: + openapi: hris_v3.yml + path-parameters: + public_token: string + response: + docs: '' + type: hrisRoot.AccountToken + status-code: 200 + examples: + - path-parameters: + public_token: public_token + response: + body: + account_token: T9klMDQrcHdm9jrtHuOS2Nf06BIHwMNjpPXPMB + integration: + name: name + abbreviated_name: abbreviated_name + categories: + - hris + image: image + square_image: square_image + color: color + slug: slug + api_endpoints_to_documentation_urls: + key: value + webhook_setup_guide_url: webhook_setup_guide_url + category_beta_status: + key: value + id: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd + source: + openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/asyncPassthrough.yml b/.mock/definition/HRIS/asyncPassthrough.yml new file mode 100644 index 000000000..76795e183 --- /dev/null +++ b/.mock/definition/HRIS/asyncPassthrough.yml @@ -0,0 +1,70 @@ +imports: + hrisRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /hris/v1/async-passthrough + method: POST + auth: true + docs: >- + Asynchronously pull data from an endpoint not currently supported by + Merge. + source: + openapi: hris_v3.yml + request: + body: hrisRoot.DataPassthroughRequest + content-type: application/json + response: + docs: '' + type: hrisRoot.AsyncPassthroughReciept + status-code: 200 + examples: + - headers: {} + request: + method: GET + path: /scooters + response: + body: + async_passthrough_receipt_id: fd29020f-2695-445e-922e-dcd5e81903fd + retrieve: + path: /hris/v1/async-passthrough/{async_passthrough_receipt_id} + method: GET + auth: true + docs: Retrieves data from earlier async-passthrough POST request + source: + openapi: hris_v3.yml + path-parameters: + async_passthrough_receipt_id: string + response: + docs: '' + type: AsyncPassthroughRetrieveResponse + status-code: 200 + examples: + - path-parameters: + async_passthrough_receipt_id: async_passthrough_receipt_id + headers: {} + response: + body: + method: GET + path: /scooters + status: 200 + response: + key: value + response_headers: + X-Page-Token: value + response_type: JSON + headers: + EXTRA-HEADER: value + Authorization: + source: + openapi: hris_v3.yml +types: + AsyncPassthroughRetrieveResponse: + discriminated: false + union: + - hrisRoot.RemoteResponse + - string + source: + openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/auditTrail.yml b/.mock/definition/HRIS/auditTrail.yml new file mode 100644 index 000000000..cd6b98fec --- /dev/null +++ b/.mock/definition/HRIS/auditTrail.yml @@ -0,0 +1,97 @@ +imports: + hrisRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /hris/v1/audit-trail + method: GET + auth: true + docs: Gets a list of audit trail events. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: hris_v3.yml + request: + name: AuditTrailListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + end_date: + type: optional + docs: >- + If included, will only include audit trail events that occurred + before this time + event_type: + type: optional + docs: >- + If included, will only include events with the given event type. + Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, + `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, + `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, + `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, + `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, + `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: + type: optional + docs: Number of results to return per page. + start_date: + type: optional + docs: >- + If included, will only include audit trail events that occurred + after this time + user_email: + type: optional + docs: >- + 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. + response: + docs: '' + type: hrisRoot.PaginatedAuditLogEventList + status-code: 200 + examples: + - response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: b5ceea2a-7171-47ce-8090-165cfce5572c + user_name: Gil Feig + user_email: hello@merge.dev + role: ADMIN + ip_address: 192.0.2.123 + event_type: CREATED_REMOTE_PRODUCTION_API_KEY + event_description: >- + Organization-wide Scopes for model hris.Employee updated + from Read to Read+Write + created_at: '2024-01-15T09:30:00Z' + source: + openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/availableActions.yml b/.mock/definition/HRIS/availableActions.yml new file mode 100644 index 000000000..8d00ce784 --- /dev/null +++ b/.mock/definition/HRIS/availableActions.yml @@ -0,0 +1,50 @@ +imports: + hrisRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + retrieve: + path: /hris/v1/available-actions + method: GET + auth: true + docs: Returns a list of models and actions available for an account. + source: + openapi: hris_v3.yml + response: + docs: '' + type: hrisRoot.AvailableActions + status-code: 200 + examples: + - headers: {} + response: + body: + integration: + name: name + abbreviated_name: abbreviated_name + categories: + - hris + image: image + square_image: square_image + color: color + slug: slug + api_endpoints_to_documentation_urls: + key: value + webhook_setup_guide_url: webhook_setup_guide_url + category_beta_status: + key: value + passthrough_available: true + available_model_operations: + - model_name: Candidate + available_operations: + - FETCH + - CREATE + required_post_parameters: + - remote_user_id + supported_fields: + - first_name + - last_name + - company + - title + source: + openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/bankInfo.yml b/.mock/definition/HRIS/bankInfo.yml new file mode 100644 index 000000000..f1e2b2f0c --- /dev/null +++ b/.mock/definition/HRIS/bankInfo.yml @@ -0,0 +1,218 @@ +types: + BankInfoListRequestAccountType: + enum: + - CHECKING + - SAVINGS + source: + openapi: hris_v3.yml + BankInfoListRequestOrderBy: + enum: + - value: '-remote_created_at' + name: RemoteCreatedAtDescending + - value: remote_created_at + name: RemoteCreatedAtAscending + source: + openapi: hris_v3.yml +imports: + hrisRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /hris/v1/bank-info + method: GET + auth: true + docs: Returns a list of `BankInfo` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: hris_v3.yml + request: + name: BankInfoListRequest + query-parameters: + account_type: + type: optional + docs: >- + If provided, will only return BankInfo's with this account type. + Options: ('SAVINGS', 'CHECKING') + + + * `SAVINGS` - SAVINGS + + * `CHECKING` - CHECKING + bank_name: + type: optional + docs: If provided, will only return BankInfo's with this bank name. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + employee_id: + type: optional + docs: If provided, will only return bank accounts for this employee. + expand: + type: optional> + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + 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. + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: hrisRoot.PaginatedBankInfoList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: fd1e0fb5-8f92-4ec9-9f32-179cf732867d + remote_id: '123234' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee: employee + account_number: '439291590' + routing_number: '089690059' + bank_name: Chase + account_type: SAVINGS + remote_created_at: '2021-12-06T10:11:26Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /bank-info + data: + - Varies by platform + retrieve: + path: /hris/v1/bank-info/{id} + method: GET + auth: true + docs: Returns a `BankInfo` object with the given `id`. + source: + openapi: hris_v3.yml + path-parameters: + id: string + request: + name: BankInfoRetrieveRequest + query-parameters: + expand: + type: optional> + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: hrisRoot.BankInfo + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: fd1e0fb5-8f92-4ec9-9f32-179cf732867d + remote_id: '123234' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee: employee + account_number: '439291590' + routing_number: '089690059' + bank_name: Chase + account_type: SAVINGS + remote_created_at: '2021-12-06T10:11:26Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /bank-info + data: + - Varies by platform + source: + openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/benefits.yml b/.mock/definition/HRIS/benefits.yml new file mode 100644 index 000000000..0fe212494 --- /dev/null +++ b/.mock/definition/HRIS/benefits.yml @@ -0,0 +1,171 @@ +imports: + hrisRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /hris/v1/benefits + method: GET + auth: true + docs: Returns a list of `Benefit` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: hris_v3.yml + request: + name: BenefitsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + employee_id: + type: optional + docs: >- + If provided, will return the benefits associated with the + employee. + expand: + type: optional> + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: hrisRoot.PaginatedBenefitList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 3fe5ae7a-f1ba-4529-b7af-84e86dc6d232 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee: employee + provider_name: Blue Shield of California + benefit_plan_type: benefit_plan_type + employee_contribution: 23.65 + company_contribution: 150 + start_date: '2020-11-15T00:59:25Z' + end_date: '2021-10-15T00:23:25Z' + remote_was_deleted: true + employer_benefit: 025fjlc6-6000-430a-848e-aafacbadf4fe + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /benefits + data: + - Varies by platform + retrieve: + path: /hris/v1/benefits/{id} + method: GET + auth: true + docs: Returns a `Benefit` object with the given `id`. + source: + openapi: hris_v3.yml + path-parameters: + id: string + request: + name: BenefitsRetrieveRequest + query-parameters: + expand: + type: optional> + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: hrisRoot.Benefit + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 3fe5ae7a-f1ba-4529-b7af-84e86dc6d232 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee: employee + provider_name: Blue Shield of California + benefit_plan_type: benefit_plan_type + employee_contribution: 23.65 + company_contribution: 150 + start_date: '2020-11-15T00:59:25Z' + end_date: '2021-10-15T00:23:25Z' + remote_was_deleted: true + employer_benefit: 025fjlc6-6000-430a-848e-aafacbadf4fe + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /benefits + data: + - Varies by platform + source: + openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/companies.yml b/.mock/definition/HRIS/companies.yml new file mode 100644 index 000000000..d9f940a62 --- /dev/null +++ b/.mock/definition/HRIS/companies.yml @@ -0,0 +1,150 @@ +imports: + hrisRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /hris/v1/companies + method: GET + auth: true + docs: Returns a list of `Company` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: hris_v3.yml + request: + name: CompaniesListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: hrisRoot.PaginatedCompanyList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 1b998423-db0a-4037-a4cf-f79c60cb67b3 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + legal_name: Waystar Royco, Inc. + display_name: Waystar Royco + eins: + - 12-3456789 + - 12-3451111 + - 11-0011000 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /companies + data: + - Varies by platform + retrieve: + path: /hris/v1/companies/{id} + method: GET + auth: true + docs: Returns a `Company` object with the given `id`. + source: + openapi: hris_v3.yml + path-parameters: + id: string + request: + name: CompaniesRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: hrisRoot.Company + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 1b998423-db0a-4037-a4cf-f79c60cb67b3 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + legal_name: Waystar Royco, Inc. + display_name: Waystar Royco + eins: + - 12-3456789 + - 12-3451111 + - 11-0011000 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /companies + data: + - Varies by platform + source: + openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/deleteAccount.yml b/.mock/definition/HRIS/deleteAccount.yml new file mode 100644 index 000000000..054b170e4 --- /dev/null +++ b/.mock/definition/HRIS/deleteAccount.yml @@ -0,0 +1,15 @@ +service: + auth: false + base-path: '' + endpoints: + delete: + path: /hris/v1/delete-account + method: POST + auth: true + docs: Delete a linked account. + source: + openapi: hris_v3.yml + examples: + - headers: {} + source: + openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/dependents.yml b/.mock/definition/HRIS/dependents.yml new file mode 100644 index 000000000..673189f32 --- /dev/null +++ b/.mock/definition/HRIS/dependents.yml @@ -0,0 +1,170 @@ +imports: + hrisRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /hris/v1/dependents + method: GET + auth: true + docs: Returns a list of `Dependent` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: hris_v3.yml + request: + name: DependentsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_sensitive_fields: + type: optional + docs: >- + Whether to include sensitive fields (such as social security + numbers) in the response. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: hrisRoot.PaginatedDependentList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 025fjlc6-6000-430a-848e-aafacbadf4fe + remote_id: '19202940' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + first_name: Greg + middle_name: A + last_name: Hirsch + relationship: CHILD + employee: 0958cbc6-6040-430a-848e-aafacbadf4ae + date_of_birth: '1990-11-10T00:00:00Z' + gender: MALE + phone_number: '+1234567890' + home_location: d2f972d0-2526-434b-9409-4c3b468e08f0 + is_student: true + ssn: '1234567890' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /dependent + data: + - Varies by platform + retrieve: + path: /hris/v1/dependents/{id} + method: GET + auth: true + docs: Returns a `Dependent` object with the given `id`. + source: + openapi: hris_v3.yml + path-parameters: + id: string + request: + name: DependentsRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_sensitive_fields: + type: optional + docs: >- + Whether to include sensitive fields (such as social security + numbers) in the response. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: hrisRoot.Dependent + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 025fjlc6-6000-430a-848e-aafacbadf4fe + remote_id: '19202940' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + first_name: Greg + middle_name: A + last_name: Hirsch + relationship: CHILD + employee: 0958cbc6-6040-430a-848e-aafacbadf4ae + date_of_birth: '1990-11-10T00:00:00Z' + gender: MALE + phone_number: '+1234567890' + home_location: d2f972d0-2526-434b-9409-4c3b468e08f0 + is_student: true + ssn: '1234567890' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /dependent + data: + - Varies by platform + source: + openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/employeePayrollRuns.yml b/.mock/definition/HRIS/employeePayrollRuns.yml new file mode 100644 index 000000000..3a13002ec --- /dev/null +++ b/.mock/definition/HRIS/employeePayrollRuns.yml @@ -0,0 +1,303 @@ +types: + EmployeePayrollRunsListRequestExpandItem: + enum: + - employee + - payroll_run + source: + openapi: hris_v3.yml + EmployeePayrollRunsRetrieveRequestExpandItem: + enum: + - employee + - payroll_run + source: + openapi: hris_v3.yml +imports: + hrisRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /hris/v1/employee-payroll-runs + method: GET + auth: true + docs: Returns a list of `EmployeePayrollRun` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: hris_v3.yml + request: + name: EmployeePayrollRunsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + employee_id: + type: optional + docs: >- + If provided, will only return employee payroll runs for this + employee. + ended_after: + type: optional + docs: >- + If provided, will only return employee payroll runs ended after + this datetime. + ended_before: + type: optional + docs: >- + If provided, will only return employee payroll runs ended before + this datetime. + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + payroll_run_id: + type: optional + docs: >- + If provided, will only return employee payroll runs for this + employee. + remote_id: + type: optional + docs: The API provider's ID for the given object. + started_after: + type: optional + docs: >- + If provided, will only return employee payroll runs started after + this datetime. + started_before: + type: optional + docs: >- + If provided, will only return employee payroll runs started before + this datetime. + response: + docs: '' + type: hrisRoot.PaginatedEmployeePayrollRunList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: fb8c55b6-1cb8-4b4c-9fb6-17924231619d + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee: employee + payroll_run: payroll_run + gross_pay: 1342.67 + net_pay: 865.78 + start_date: '2020-11-08T00:00:00Z' + end_date: '2020-11-09T00:00:00Z' + check_date: '2020-11-10T00:00:00Z' + earnings: + - id: babbced6-3a81-4775-8da2-490dc6385259 + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee_payroll_run: 35347df1-95e7-46e2-93cc-66f1191edca5 + amount: 1002.34 + type: SALARY + - id: babbced6-3a81-4775-8da2-490dc6385259 + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee_payroll_run: 35347df1-95e7-46e2-93cc-66f1191edca5 + amount: 8342.34 + type: OVERTIME + deductions: + - id: 5fd439fc-1b64-4755-b275-64918936c365 + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee_payroll_run: 35347df1-95e7-46e2-93cc-66f1191edca5 + name: Social Security + employee_deduction: 34.54 + company_deduction: 78.78 + taxes: + - id: e3a825fd-c38d-4095-a717-df98c4cb9ebc + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee_payroll_run: 35347df1-95e7-46e2-93cc-66f1191edca5 + name: California State Income Tax + amount: 100.25 + employer_tax: true + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /employee-payroll + data: + - Varies by platform + retrieve: + path: /hris/v1/employee-payroll-runs/{id} + method: GET + auth: true + docs: Returns an `EmployeePayrollRun` object with the given `id`. + source: + openapi: hris_v3.yml + path-parameters: + id: string + request: + name: EmployeePayrollRunsRetrieveRequest + query-parameters: + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: hrisRoot.EmployeePayrollRun + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: fb8c55b6-1cb8-4b4c-9fb6-17924231619d + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee: employee + payroll_run: payroll_run + gross_pay: 1342.67 + net_pay: 865.78 + start_date: '2020-11-08T00:00:00Z' + end_date: '2020-11-09T00:00:00Z' + check_date: '2020-11-10T00:00:00Z' + earnings: + - id: babbced6-3a81-4775-8da2-490dc6385259 + remote_id: '52802' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee_payroll_run: 35347df1-95e7-46e2-93cc-66f1191edca5 + amount: 1002.34 + type: SALARY + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + - id: babbced6-3a81-4775-8da2-490dc6385259 + remote_id: '52802' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee_payroll_run: 35347df1-95e7-46e2-93cc-66f1191edca5 + amount: 8342.34 + type: OVERTIME + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + deductions: + - id: 5fd439fc-1b64-4755-b275-64918936c365 + remote_id: '93478612' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee_payroll_run: 35347df1-95e7-46e2-93cc-66f1191edca5 + name: Social Security + employee_deduction: 34.54 + company_deduction: 78.78 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /payroll-deduction + data: + - Varies by platform + taxes: + - id: e3a825fd-c38d-4095-a717-df98c4cb9ebc + remote_id: '26806834' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee_payroll_run: 35347df1-95e7-46e2-93cc-66f1191edca5 + name: California State Income Tax + amount: 100.25 + employer_tax: true + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /employee-payroll + data: + - Varies by platform + source: + openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/employees.yml b/.mock/definition/HRIS/employees.yml new file mode 100644 index 000000000..7c4da12db --- /dev/null +++ b/.mock/definition/HRIS/employees.yml @@ -0,0 +1,785 @@ +types: + EmployeesListRequestEmploymentStatus: + enum: + - ACTIVE + - INACTIVE + - PENDING + source: + openapi: hris_v3.yml + EmployeesListRequestExpandItem: + enum: + - company + - employments + - groups + - home_location + - manager + - pay_group + - team + - work_location + source: + openapi: hris_v3.yml + EmployeesListRequestRemoteFields: + enum: + - employment_status + - value: employment_status,ethnicity + name: EmploymentStatusEthnicity + - value: employment_status,ethnicity,gender + name: EmploymentStatusEthnicityGender + - value: employment_status,ethnicity,gender,marital_status + name: EmploymentStatusEthnicityGenderMaritalStatus + - value: employment_status,ethnicity,marital_status + name: EmploymentStatusEthnicityMaritalStatus + - value: employment_status,gender + name: EmploymentStatusGender + - value: employment_status,gender,marital_status + name: EmploymentStatusGenderMaritalStatus + - value: employment_status,marital_status + name: EmploymentStatusMaritalStatus + - ethnicity + - value: ethnicity,gender + name: EthnicityGender + - value: ethnicity,gender,marital_status + name: EthnicityGenderMaritalStatus + - value: ethnicity,marital_status + name: EthnicityMaritalStatus + - gender + - value: gender,marital_status + name: GenderMaritalStatus + - marital_status + source: + openapi: hris_v3.yml + EmployeesListRequestShowEnumOrigins: + enum: + - employment_status + - value: employment_status,ethnicity + name: EmploymentStatusEthnicity + - value: employment_status,ethnicity,gender + name: EmploymentStatusEthnicityGender + - value: employment_status,ethnicity,gender,marital_status + name: EmploymentStatusEthnicityGenderMaritalStatus + - value: employment_status,ethnicity,marital_status + name: EmploymentStatusEthnicityMaritalStatus + - value: employment_status,gender + name: EmploymentStatusGender + - value: employment_status,gender,marital_status + name: EmploymentStatusGenderMaritalStatus + - value: employment_status,marital_status + name: EmploymentStatusMaritalStatus + - ethnicity + - value: ethnicity,gender + name: EthnicityGender + - value: ethnicity,gender,marital_status + name: EthnicityGenderMaritalStatus + - value: ethnicity,marital_status + name: EthnicityMaritalStatus + - gender + - value: gender,marital_status + name: GenderMaritalStatus + - marital_status + source: + openapi: hris_v3.yml + EmployeesRetrieveRequestExpandItem: + enum: + - company + - employments + - groups + - home_location + - manager + - pay_group + - team + - work_location + source: + openapi: hris_v3.yml + EmployeesRetrieveRequestRemoteFields: + enum: + - employment_status + - value: employment_status,ethnicity + name: EmploymentStatusEthnicity + - value: employment_status,ethnicity,gender + name: EmploymentStatusEthnicityGender + - value: employment_status,ethnicity,gender,marital_status + name: EmploymentStatusEthnicityGenderMaritalStatus + - value: employment_status,ethnicity,marital_status + name: EmploymentStatusEthnicityMaritalStatus + - value: employment_status,gender + name: EmploymentStatusGender + - value: employment_status,gender,marital_status + name: EmploymentStatusGenderMaritalStatus + - value: employment_status,marital_status + name: EmploymentStatusMaritalStatus + - ethnicity + - value: ethnicity,gender + name: EthnicityGender + - value: ethnicity,gender,marital_status + name: EthnicityGenderMaritalStatus + - value: ethnicity,marital_status + name: EthnicityMaritalStatus + - gender + - value: gender,marital_status + name: GenderMaritalStatus + - marital_status + source: + openapi: hris_v3.yml + EmployeesRetrieveRequestShowEnumOrigins: + enum: + - employment_status + - value: employment_status,ethnicity + name: EmploymentStatusEthnicity + - value: employment_status,ethnicity,gender + name: EmploymentStatusEthnicityGender + - value: employment_status,ethnicity,gender,marital_status + name: EmploymentStatusEthnicityGenderMaritalStatus + - value: employment_status,ethnicity,marital_status + name: EmploymentStatusEthnicityMaritalStatus + - value: employment_status,gender + name: EmploymentStatusGender + - value: employment_status,gender,marital_status + name: EmploymentStatusGenderMaritalStatus + - value: employment_status,marital_status + name: EmploymentStatusMaritalStatus + - ethnicity + - value: ethnicity,gender + name: EthnicityGender + - value: ethnicity,gender,marital_status + name: EthnicityGenderMaritalStatus + - value: ethnicity,marital_status + name: EthnicityMaritalStatus + - gender + - value: gender,marital_status + name: GenderMaritalStatus + - marital_status + source: + openapi: hris_v3.yml +imports: + hrisRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /hris/v1/employees + method: GET + auth: true + docs: Returns a list of `Employee` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: hris_v3.yml + request: + name: EmployeesListRequest + query-parameters: + company_id: + type: optional + docs: If provided, will only return employees for this company. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + display_full_name: + type: optional + docs: If provided, will only return employees with this display name. + employment_status: + type: optional + docs: >- + If provided, will only return employees with this employment + status. + + + * `ACTIVE` - ACTIVE + + * `PENDING` - PENDING + + * `INACTIVE` - INACTIVE + employment_type: + type: optional + docs: >- + If provided, will only return employees that have an employment of + the specified employment_type. + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + first_name: + type: optional + docs: If provided, will only return employees with this first name. + groups: + type: optional + docs: >- + If provided, will only return employees matching the group ids; + multiple groups can be separated by commas. + home_location_id: + type: optional + docs: If provided, will only return employees for this home location. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_sensitive_fields: + type: optional + docs: >- + Whether to include sensitive fields (such as social security + numbers) in the response. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + job_title: + type: optional + docs: >- + If provided, will only return employees that have an employment of + the specified job_title. + last_name: + type: optional + docs: If provided, will only return employees with this last name. + manager_id: + type: optional + docs: If provided, will only return employees for this manager. + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + pay_group_id: + type: optional + docs: If provided, will only return employees for this pay group + personal_email: + type: optional + docs: If provided, will only return Employees with this personal email + validation: + format: email + remote_fields: + type: optional + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + show_enum_origins: + type: optional + docs: >- + 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: + type: optional + docs: >- + If provided, will only return employees that started after this + datetime. + started_before: + type: optional + docs: >- + If provided, will only return employees that started before this + datetime. + team_id: + type: optional + docs: If provided, will only return employees for this team. + terminated_after: + type: optional + docs: >- + If provided, will only return employees that were terminated after + this datetime. + terminated_before: + type: optional + docs: >- + If provided, will only return employees that were terminated + before this datetime. + work_email: + type: optional + docs: If provided, will only return Employees with this work email + validation: + format: email + work_location_id: + type: optional + docs: If provided, will only return employees for this location. + response: + docs: '' + type: hrisRoot.PaginatedEmployeeList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 0958cbc6-6040-430a-848e-aafacbadf4ae + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee_number: '2' + company: company + first_name: Greg + last_name: Hirsch + preferred_name: Greg the egg + display_full_name: Cousin Greg Hirsch + username: cousingreg + groups: + - 21a54124-397f-494d-985e-3c5b330b8a68 + work_email: greg@merge.dev + personal_email: greg@gmail.com + mobile_phone_number: '+1234567890' + employments: + - 17a54124-287f-494d-965e-3c5b330c9a68 + home_location: home_location + work_location: work_location + manager: manager + team: team + pay_group: pay_group + ssn: '1234567890' + gender: MALE + ethnicity: AMERICAN_INDIAN_OR_ALASKA_NATIVE + marital_status: SINGLE + date_of_birth: '1990-11-10T00:00:00Z' + hire_date: '2020-10-10T00:00:00Z' + start_date: '2020-10-11T00:00:00Z' + remote_created_at: '2020-10-11T00:00:00Z' + employment_status: ACTIVE + termination_date: '2021-10-12T00:00:00Z' + avatar: http://alturl.com/h2h8m + custom_fields: + key: value + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /people + data: + - Varies by platform + create: + path: /hris/v1/employees + method: POST + auth: true + docs: Creates an `Employee` object with the given values. + source: + openapi: hris_v3.yml + request: + name: EmployeeEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: hrisRoot.EmployeeRequest + content-type: application/json + response: + docs: '' + type: hrisRoot.EmployeeResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: 0958cbc6-6040-430a-848e-aafacbadf4ae + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee_number: '2' + company: company + first_name: Greg + last_name: Hirsch + preferred_name: Greg the egg + display_full_name: Cousin Greg Hirsch + username: cousingreg + groups: + - 21a54124-397f-494d-985e-3c5b330b8a68 + work_email: greg@merge.dev + personal_email: greg@gmail.com + mobile_phone_number: '+1234567890' + employments: + - 17a54124-287f-494d-965e-3c5b330c9a68 + home_location: home_location + work_location: work_location + manager: manager + team: team + pay_group: pay_group + ssn: '1234567890' + gender: MALE + ethnicity: AMERICAN_INDIAN_OR_ALASKA_NATIVE + marital_status: SINGLE + date_of_birth: '1990-11-10T00:00:00Z' + hire_date: '2020-10-10T00:00:00Z' + start_date: '2020-10-11T00:00:00Z' + remote_created_at: '2020-10-11T00:00:00Z' + employment_status: ACTIVE + termination_date: '2021-10-12T00:00:00Z' + avatar: http://alturl.com/h2h8m + custom_fields: + key: value + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /people + data: + - Varies by platform + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /hris/v1/employees/{id} + method: GET + auth: true + docs: Returns an `Employee` object with the given `id`. + source: + openapi: hris_v3.yml + path-parameters: + id: string + request: + name: EmployeesRetrieveRequest + query-parameters: + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_sensitive_fields: + type: optional + docs: >- + Whether to include sensitive fields (such as social security + numbers) in the response. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional + docs: >- + 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) + response: + docs: '' + type: hrisRoot.Employee + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 0958cbc6-6040-430a-848e-aafacbadf4ae + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee_number: '2' + company: company + first_name: Greg + last_name: Hirsch + preferred_name: Greg the egg + display_full_name: Cousin Greg Hirsch + username: cousingreg + groups: + - 21a54124-397f-494d-985e-3c5b330b8a68 + work_email: greg@merge.dev + personal_email: greg@gmail.com + mobile_phone_number: '+1234567890' + employments: + - 17a54124-287f-494d-965e-3c5b330c9a68 + home_location: home_location + work_location: work_location + manager: manager + team: team + pay_group: pay_group + ssn: '1234567890' + gender: MALE + ethnicity: AMERICAN_INDIAN_OR_ALASKA_NATIVE + marital_status: SINGLE + date_of_birth: '1990-11-10T00:00:00Z' + hire_date: '2020-10-10T00:00:00Z' + start_date: '2020-10-11T00:00:00Z' + remote_created_at: '2020-10-11T00:00:00Z' + employment_status: ACTIVE + termination_date: '2021-10-12T00:00:00Z' + avatar: http://alturl.com/h2h8m + custom_fields: + key: value + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /people + data: + - Varies by platform + ignoreCreate: + path: /hris/v1/employees/ignore/{model_id} + method: POST + auth: true + docs: >- + 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. + source: + openapi: hris_v3.yml + path-parameters: + model_id: string + request: + body: hrisRoot.IgnoreCommonModelRequest + content-type: application/json + examples: + - path-parameters: + model_id: model_id + headers: {} + request: + reason: GENERAL_CUSTOMER_REQUEST + metaPostRetrieve: + path: /hris/v1/employees/meta/post + method: GET + auth: true + docs: Returns metadata for `Employee` POSTs. + source: + openapi: hris_v3.yml + response: + docs: '' + type: hrisRoot.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + source: + openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/employerBenefits.yml b/.mock/definition/HRIS/employerBenefits.yml new file mode 100644 index 000000000..5eea679b2 --- /dev/null +++ b/.mock/definition/HRIS/employerBenefits.yml @@ -0,0 +1,144 @@ +imports: + hrisRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /hris/v1/employer-benefits + method: GET + auth: true + docs: Returns a list of `EmployerBenefit` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: hris_v3.yml + request: + name: EmployerBenefitsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: hrisRoot.PaginatedEmployerBenefitList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 025fjlc6-6000-430a-848e-aafacbadf4fele + remote_id: '19202939' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + benefit_plan_type: MEDICAL + name: Kaiser Permanente Medical Plan + description: HDHP Silver Plan + deduction_code: COL + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + retrieve: + path: /hris/v1/employer-benefits/{id} + method: GET + auth: true + docs: Returns an `EmployerBenefit` object with the given `id`. + source: + openapi: hris_v3.yml + path-parameters: + id: string + request: + name: EmployerBenefitsRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: hrisRoot.EmployerBenefit + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 025fjlc6-6000-430a-848e-aafacbadf4fele + remote_id: '19202939' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + benefit_plan_type: MEDICAL + name: Kaiser Permanente Medical Plan + description: HDHP Silver Plan + deduction_code: COL + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + data: + key: value + source: + openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/employments.yml b/.mock/definition/HRIS/employments.yml new file mode 100644 index 000000000..f474c6902 --- /dev/null +++ b/.mock/definition/HRIS/employments.yml @@ -0,0 +1,339 @@ +types: + EmploymentsListRequestExpandItem: + enum: + - employee + - pay_group + source: + openapi: hris_v3.yml + EmploymentsListRequestOrderBy: + enum: + - value: '-effective_date' + name: EffectiveDateDescending + - value: effective_date + name: EffectiveDateAscending + source: + openapi: hris_v3.yml + EmploymentsListRequestRemoteFields: + enum: + - employment_type + - value: employment_type,flsa_status + name: EmploymentTypeFlsaStatus + - value: employment_type,flsa_status,pay_frequency + name: EmploymentTypeFlsaStatusPayFrequency + - value: employment_type,flsa_status,pay_frequency,pay_period + name: EmploymentTypeFlsaStatusPayFrequencyPayPeriod + - value: employment_type,flsa_status,pay_period + name: EmploymentTypeFlsaStatusPayPeriod + - value: employment_type,pay_frequency + name: EmploymentTypePayFrequency + - value: employment_type,pay_frequency,pay_period + name: EmploymentTypePayFrequencyPayPeriod + - value: employment_type,pay_period + name: EmploymentTypePayPeriod + - flsa_status + - value: flsa_status,pay_frequency + name: FlsaStatusPayFrequency + - value: flsa_status,pay_frequency,pay_period + name: FlsaStatusPayFrequencyPayPeriod + - value: flsa_status,pay_period + name: FlsaStatusPayPeriod + - pay_frequency + - value: pay_frequency,pay_period + name: PayFrequencyPayPeriod + - pay_period + source: + openapi: hris_v3.yml + EmploymentsListRequestShowEnumOrigins: + enum: + - employment_type + - value: employment_type,flsa_status + name: EmploymentTypeFlsaStatus + - value: employment_type,flsa_status,pay_frequency + name: EmploymentTypeFlsaStatusPayFrequency + - value: employment_type,flsa_status,pay_frequency,pay_period + name: EmploymentTypeFlsaStatusPayFrequencyPayPeriod + - value: employment_type,flsa_status,pay_period + name: EmploymentTypeFlsaStatusPayPeriod + - value: employment_type,pay_frequency + name: EmploymentTypePayFrequency + - value: employment_type,pay_frequency,pay_period + name: EmploymentTypePayFrequencyPayPeriod + - value: employment_type,pay_period + name: EmploymentTypePayPeriod + - flsa_status + - value: flsa_status,pay_frequency + name: FlsaStatusPayFrequency + - value: flsa_status,pay_frequency,pay_period + name: FlsaStatusPayFrequencyPayPeriod + - value: flsa_status,pay_period + name: FlsaStatusPayPeriod + - pay_frequency + - value: pay_frequency,pay_period + name: PayFrequencyPayPeriod + - pay_period + source: + openapi: hris_v3.yml + EmploymentsRetrieveRequestExpandItem: + enum: + - employee + - pay_group + source: + openapi: hris_v3.yml + EmploymentsRetrieveRequestRemoteFields: + enum: + - employment_type + - value: employment_type,flsa_status + name: EmploymentTypeFlsaStatus + - value: employment_type,flsa_status,pay_frequency + name: EmploymentTypeFlsaStatusPayFrequency + - value: employment_type,flsa_status,pay_frequency,pay_period + name: EmploymentTypeFlsaStatusPayFrequencyPayPeriod + - value: employment_type,flsa_status,pay_period + name: EmploymentTypeFlsaStatusPayPeriod + - value: employment_type,pay_frequency + name: EmploymentTypePayFrequency + - value: employment_type,pay_frequency,pay_period + name: EmploymentTypePayFrequencyPayPeriod + - value: employment_type,pay_period + name: EmploymentTypePayPeriod + - flsa_status + - value: flsa_status,pay_frequency + name: FlsaStatusPayFrequency + - value: flsa_status,pay_frequency,pay_period + name: FlsaStatusPayFrequencyPayPeriod + - value: flsa_status,pay_period + name: FlsaStatusPayPeriod + - pay_frequency + - value: pay_frequency,pay_period + name: PayFrequencyPayPeriod + - pay_period + source: + openapi: hris_v3.yml + EmploymentsRetrieveRequestShowEnumOrigins: + enum: + - employment_type + - value: employment_type,flsa_status + name: EmploymentTypeFlsaStatus + - value: employment_type,flsa_status,pay_frequency + name: EmploymentTypeFlsaStatusPayFrequency + - value: employment_type,flsa_status,pay_frequency,pay_period + name: EmploymentTypeFlsaStatusPayFrequencyPayPeriod + - value: employment_type,flsa_status,pay_period + name: EmploymentTypeFlsaStatusPayPeriod + - value: employment_type,pay_frequency + name: EmploymentTypePayFrequency + - value: employment_type,pay_frequency,pay_period + name: EmploymentTypePayFrequencyPayPeriod + - value: employment_type,pay_period + name: EmploymentTypePayPeriod + - flsa_status + - value: flsa_status,pay_frequency + name: FlsaStatusPayFrequency + - value: flsa_status,pay_frequency,pay_period + name: FlsaStatusPayFrequencyPayPeriod + - value: flsa_status,pay_period + name: FlsaStatusPayPeriod + - pay_frequency + - value: pay_frequency,pay_period + name: PayFrequencyPayPeriod + - pay_period + source: + openapi: hris_v3.yml +imports: + hrisRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /hris/v1/employments + method: GET + auth: true + docs: Returns a list of `Employment` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: hris_v3.yml + request: + name: EmploymentsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + employee_id: + type: optional + docs: If provided, will only return employments for this employee. + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + 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: effective_date, -effective_date. + page_size: + type: optional + docs: Number of results to return per page. + remote_fields: + type: optional + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + show_enum_origins: + type: optional + docs: >- + 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) + response: + docs: '' + type: hrisRoot.PaginatedEmploymentList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 65d8ffd0-211b-4ba4-b85a-fbe2ce220982 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee: employee + job_title: Executive Assistant to Tom Wambsgans + pay_rate: 1.1 + pay_period: HOUR + pay_frequency: WEEKLY + pay_currency: XUA + pay_group: pay_group + flsa_status: EXEMPT + effective_date: '2023-10-06T18:42:34Z' + employment_type: FULL_TIME + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /jobs + data: + - Varies by platform + retrieve: + path: /hris/v1/employments/{id} + method: GET + auth: true + docs: Returns an `Employment` object with the given `id`. + source: + openapi: hris_v3.yml + path-parameters: + id: string + request: + name: EmploymentsRetrieveRequest + query-parameters: + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional + docs: >- + 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) + response: + docs: '' + type: hrisRoot.Employment + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 65d8ffd0-211b-4ba4-b85a-fbe2ce220982 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee: employee + job_title: Executive Assistant to Tom Wambsgans + pay_rate: 1.1 + pay_period: HOUR + pay_frequency: WEEKLY + pay_currency: XUA + pay_group: pay_group + flsa_status: EXEMPT + effective_date: '2023-10-06T18:42:34Z' + employment_type: FULL_TIME + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /jobs + data: + - Varies by platform + source: + openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/fieldMapping.yml b/.mock/definition/HRIS/fieldMapping.yml new file mode 100644 index 000000000..6e110a162 --- /dev/null +++ b/.mock/definition/HRIS/fieldMapping.yml @@ -0,0 +1,892 @@ +imports: + hrisRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + field_mappings_retrieve: + path: /hris/v1/field-mappings + method: GET + auth: true + docs: >- + 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/). + source: + openapi: hris_v3.yml + request: + name: FieldMappingsRetrieveRequest + query-parameters: + exclude_remote_field_metadata: + type: optional + docs: >- + 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. + response: + docs: '' + type: hrisRoot.FieldMappingApiInstanceResponse + status-code: 200 + examples: + - headers: {} + response: + body: + Benefit: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + EmployerBenefit: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Company: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + EmployeePayrollRun: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Employee: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Employment: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Location: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + PayrollRun: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Team: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + TimeOff: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + TimeOffBalance: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + BankInfo: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + PayGroup: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Group: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Dependent: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + TimesheetEntry: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + field_mappings_create: + path: /hris/v1/field-mappings + method: POST + auth: true + docs: >- + 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. + source: + openapi: hris_v3.yml + request: + name: CreateFieldMappingRequest + query-parameters: + exclude_remote_field_metadata: + type: optional + docs: >- + 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. + body: + properties: + target_field_name: + type: string + docs: >- + The name of the target field you want this remote field to map + to. + validation: + minLength: 1 + target_field_description: + type: string + docs: >- + The description of the target field you want this remote field + to map to. + validation: + minLength: 1 + remote_field_traversal_path: + docs: >- + The field traversal path of the remote field listed when you hit + the GET /remote-fields endpoint. + type: list + remote_method: + type: string + docs: >- + The method of the remote endpoint where the remote field is + coming from. + validation: + minLength: 1 + remote_url_path: + type: string + docs: >- + The path of the remote endpoint where the remote field is coming + from. + validation: + minLength: 1 + common_model_name: + type: string + docs: >- + The name of the Common Model that the remote field corresponds + to in a given category. + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: hrisRoot.FieldMappingInstanceResponse + status-code: 201 + examples: + - headers: {} + request: + 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 + response: + body: + model: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + field_mappings_destroy: + path: /hris/v1/field-mappings/{field_mapping_id} + method: DELETE + auth: true + docs: >- + 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. + source: + openapi: hris_v3.yml + path-parameters: + field_mapping_id: string + response: + docs: '' + type: hrisRoot.FieldMappingInstanceResponse + status-code: 204 + examples: + - path-parameters: + field_mapping_id: field_mapping_id + headers: {} + response: + body: + model: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + field_mappings_partial_update: + path: /hris/v1/field-mappings/{field_mapping_id} + method: PATCH + auth: true + docs: >- + 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. + source: + openapi: hris_v3.yml + path-parameters: + field_mapping_id: string + request: + name: PatchedEditFieldMappingRequest + body: + properties: + remote_field_traversal_path: + type: optional> + docs: >- + The field traversal path of the remote field listed when you hit + the GET /remote-fields endpoint. + remote_method: + type: optional + docs: >- + The method of the remote endpoint where the remote field is + coming from. + validation: + minLength: 1 + remote_url_path: + type: optional + docs: >- + The path of the remote endpoint where the remote field is coming + from. + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: hrisRoot.FieldMappingInstanceResponse + status-code: 200 + examples: + - path-parameters: + field_mapping_id: field_mapping_id + headers: {} + request: {} + response: + body: + model: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + remote_fields_retrieve: + path: /hris/v1/remote-fields + method: GET + auth: true + docs: >- + 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/). + source: + openapi: hris_v3.yml + request: + name: RemoteFieldsRetrieveRequest + query-parameters: + common_models: + type: optional + docs: >- + A comma seperated list of Common Model names. If included, will + only return Remote Fields for those Common Models. + include_example_values: + type: optional + docs: >- + 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. + response: + docs: '' + type: hrisRoot.RemoteFieldApiResponse + status-code: 200 + examples: + - headers: {} + response: + body: + Benefit: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + EmployerBenefit: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Company: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + EmployeePayrollRun: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Employee: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Employment: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Location: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + PayrollRun: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Team: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + TimeOff: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + TimeOffBalance: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + BankInfo: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + PayGroup: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Group: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Dependent: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + TimesheetEntry: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + target_fields_retrieve: + path: /hris/v1/target-fields + method: GET + auth: true + docs: >- + 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/). + source: + openapi: hris_v3.yml + response: + docs: '' + type: hrisRoot.ExternalTargetFieldApiResponse + status-code: 200 + examples: + - headers: {} + response: + body: + Benefit: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + EmployerBenefit: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Company: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + EmployeePayrollRun: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Employee: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Employment: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Location: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + PayrollRun: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Team: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + TimeOff: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + TimeOffBalance: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + BankInfo: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + PayGroup: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Group: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Dependent: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + TimesheetEntry: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + source: + openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/forceResync.yml b/.mock/definition/HRIS/forceResync.yml new file mode 100644 index 000000000..a423b5b75 --- /dev/null +++ b/.mock/definition/HRIS/forceResync.yml @@ -0,0 +1,37 @@ +imports: + hrisRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + sync_status_resync_create: + path: /hris/v1/sync-status/resync + method: POST + auth: true + docs: >- + 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. + source: + openapi: hris_v3.yml + response: + docs: '' + type: list + status-code: 200 + examples: + - headers: {} + response: + body: + - model_name: Employee + model_id: hris.Employee + last_sync_start: '2021-03-30T19:44:18Z' + next_sync_start: '2021-03-30T20:44:18Z' + last_sync_result: SYNCING + last_sync_finished: '2021-03-30T19:55:18Z' + status: SYNCING + is_initial_sync: true + selective_sync_configurations_usage: IN_NEXT_SYNC + source: + openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/generateKey.yml b/.mock/definition/HRIS/generateKey.yml new file mode 100644 index 000000000..6fd6d39bc --- /dev/null +++ b/.mock/definition/HRIS/generateKey.yml @@ -0,0 +1,36 @@ +imports: + hrisRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /hris/v1/generate-key + method: POST + auth: true + docs: Create a remote key. + source: + openapi: hris_v3.yml + request: + name: GenerateRemoteKeyRequest + body: + properties: + name: + type: string + docs: The name of the remote key + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: hrisRoot.RemoteKey + status-code: 200 + examples: + - request: + name: Remote Deployment Key 1 + response: + body: + name: Remote Deployment Key 1 + key: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA + source: + openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/groups.yml b/.mock/definition/HRIS/groups.yml new file mode 100644 index 000000000..f7012824f --- /dev/null +++ b/.mock/definition/HRIS/groups.yml @@ -0,0 +1,183 @@ +imports: + hrisRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /hris/v1/groups + method: GET + auth: true + docs: Returns a list of `Group` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: hris_v3.yml + request: + name: GroupsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_commonly_used_as_team: + type: optional + docs: >- + If provided, specifies whether to return only Group objects which + refer to a team in the third party platform. Note that this is an + opinionated view based on how a team may be represented in the + third party platform. + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + names: + type: optional + docs: >- + If provided, will only return groups with these names. Multiple + values can be separated by commas. + page_size: + type: optional + docs: Number of results to return per page. + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + show_enum_origins: + type: optional> + docs: >- + A comma separated list of enum field names for which you'd like + the original values to be returned, instead of Merge's normalized + enum values. [Learn + more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) + types: + type: optional + docs: >- + If provided, will only return groups of these types. Multiple + values can be separated by commas. + response: + docs: '' + type: hrisRoot.PaginatedGroupList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 134e0111-0f67-44f6-98f0-597000290bb3 + remote_id: '800293' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + parent_group: 2ef51b11-2c4e-4b02-8d1d-50592d9e96ef + name: COST_CENTER_US + type: TEAM + is_commonly_used_as_team: true + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /group + data: + - Varies by platform + retrieve: + path: /hris/v1/groups/{id} + method: GET + auth: true + docs: Returns a `Group` object with the given `id`. + source: + openapi: hris_v3.yml + path-parameters: + id: string + request: + name: GroupsRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: hrisRoot.Group + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 134e0111-0f67-44f6-98f0-597000290bb3 + remote_id: '800293' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + parent_group: 2ef51b11-2c4e-4b02-8d1d-50592d9e96ef + name: COST_CENTER_US + type: TEAM + is_commonly_used_as_team: true + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /group + data: + - Varies by platform + source: + openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/issues.yml b/.mock/definition/HRIS/issues.yml new file mode 100644 index 000000000..aec1474d0 --- /dev/null +++ b/.mock/definition/HRIS/issues.yml @@ -0,0 +1,133 @@ +types: + IssuesListRequestStatus: + enum: + - ONGOING + - RESOLVED + source: + openapi: hris_v3.yml +imports: + hrisRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /hris/v1/issues + method: GET + auth: true + docs: Gets all issues for Organization. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: hris_v3.yml + request: + name: IssuesListRequest + query-parameters: + account_token: optional + cursor: + type: optional + docs: The pagination cursor value. + end_date: + type: optional + docs: >- + If included, will only include issues whose most recent action + occurred before this time + end_user_organization_name: optional + first_incident_time_after: + type: optional + docs: >- + If provided, will only return issues whose first incident time was + after this datetime. + first_incident_time_before: + type: optional + docs: >- + If provided, will only return issues whose first incident time was + before this datetime. + include_muted: + type: optional + docs: If true, will include muted issues + integration_name: optional + last_incident_time_after: + type: optional + docs: >- + If provided, will only return issues whose last incident time was + after this datetime. + last_incident_time_before: + type: optional + docs: >- + If provided, will only return issues whose last incident time was + before this datetime. + linked_account_id: + type: optional + docs: >- + If provided, will only include issues pertaining to the linked + account passed in. + page_size: + type: optional + docs: Number of results to return per page. + start_date: + type: optional + docs: >- + If included, will only include issues whose most recent action + occurred after this time + status: + type: optional + docs: |- + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + response: + docs: '' + type: hrisRoot.PaginatedIssueList + status-code: 200 + examples: + - response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + status: ONGOING + error_description: Missing Permissions + end_user: + key: value + first_incident_time: '2022-12-05T16:19:15Z' + last_incident_time: '2022-12-05T16:19:15Z' + is_muted: true + error_details: + - Missing employee permissions. + - Missing time off permissions. + retrieve: + path: /hris/v1/issues/{id} + method: GET + auth: true + docs: Get a specific issue. + source: + openapi: hris_v3.yml + path-parameters: + id: string + response: + docs: '' + type: hrisRoot.Issue + status-code: 200 + examples: + - path-parameters: + id: id + response: + body: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + status: ONGOING + error_description: Missing Permissions + end_user: + key: value + first_incident_time: '2022-12-05T16:19:15Z' + last_incident_time: '2022-12-05T16:19:15Z' + is_muted: true + error_details: + - Missing employee permissions. + - Missing time off permissions. + source: + openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/linkToken.yml b/.mock/definition/HRIS/linkToken.yml new file mode 100644 index 000000000..48c7cf145 --- /dev/null +++ b/.mock/definition/HRIS/linkToken.yml @@ -0,0 +1,152 @@ +imports: + hrisRoot: __package__.yml +types: + EndUserDetailsRequestLanguage: + discriminated: false + docs: >- + The following subset of IETF language tags can be used to configure + localization. + + + * `en` - en + + * `de` - de + union: + - hrisRoot.LanguageEnum + - string + source: + openapi: hris_v3.yml + inline: true +service: + auth: false + base-path: '' + endpoints: + create: + path: /hris/v1/link-token + method: POST + auth: true + docs: Creates a link token to be used when linking a new end user. + source: + openapi: hris_v3.yml + request: + name: EndUserDetailsRequest + body: + properties: + end_user_email_address: + type: string + docs: >- + Your end user's email address. This is purely for identification + purposes - setting this value will not cause any emails to be + sent. + validation: + minLength: 1 + maxLength: 100 + end_user_organization_name: + type: string + docs: Your end user's organization. + validation: + minLength: 1 + maxLength: 100 + end_user_origin_id: + type: string + docs: >- + 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. + validation: + minLength: 1 + maxLength: 100 + categories: + docs: The integration categories to show in Merge Link. + type: list + integration: + type: optional + docs: >- + 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/. + validation: + minLength: 1 + link_expiry_mins: + type: optional + docs: >- + 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. + default: 30 + validation: + min: 30 + max: 10080 + should_create_magic_link_url: + type: optional + docs: >- + 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. + default: false + hide_admin_magic_link: + type: optional + docs: >- + 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. + default: false + common_models: + type: optional> + docs: >- + An array of objects to specify the models and fields that will + be disabled for a given Linked Account. Each object uses + model_id, enabled_actions, and disabled_fields to specify the + model, method, and fields that are scoped for a given Linked + Account. + category_common_model_scopes: + type: >- + optional>>> + docs: >- + When creating a Link Token, you can set permissions for Common + Models that will apply to the account that is going to be + linked. Any model or field not specified in link token payload + will default to existing settings. + language: + type: optional + docs: >- + The following subset of IETF language tags can be used to + configure localization. + + + * `en` - en + + * `de` - de + are_syncs_disabled: + type: optional + docs: >- + The boolean that indicates whether initial, periodic, and force + syncs will be disabled. + default: false + integration_specific_config: + type: optional> + docs: >- + A JSON object containing integration-specific configuration + options. + content-type: application/json + response: + docs: '' + type: hrisRoot.LinkToken + status-code: 200 + examples: + - request: + end_user_email_address: example@gmail.com + end_user_organization_name: Test Organization + end_user_origin_id: '12345' + categories: + - hris + - ats + response: + body: + link_token: necdP7FtdASl1fQwm62be2_dM4wBG8_GactqoUV0 + integration_name: Lever + magic_link_url: https://link.merge.dev/asdfjkl12345jsndfgi2i83n + source: + openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/linkedAccounts.yml b/.mock/definition/HRIS/linkedAccounts.yml new file mode 100644 index 000000000..ee1648c7e --- /dev/null +++ b/.mock/definition/HRIS/linkedAccounts.yml @@ -0,0 +1,152 @@ +types: + LinkedAccountsListRequestCategory: + enum: + - accounting + - ats + - crm + - filestorage + - hris + - mktg + - ticketing + source: + openapi: hris_v3.yml +imports: + hrisRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /hris/v1/linked-accounts + method: GET + auth: true + docs: List linked accounts for your organization. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: hris_v3.yml + request: + name: LinkedAccountsListRequest + query-parameters: + category: + type: optional + docs: >- + Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, + `mktg`, `ticketing` + + + * `hris` - hris + + * `ats` - ats + + * `accounting` - accounting + + * `ticketing` - ticketing + + * `crm` - crm + + * `mktg` - mktg + + * `filestorage` - filestorage + cursor: + type: optional + docs: The pagination cursor value. + end_user_email_address: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given email address. + end_user_organization_name: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given organization name. + end_user_origin_id: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given origin ID. + end_user_origin_ids: + type: optional + docs: >- + Comma-separated list of EndUser origin IDs, making it possible to + specify multiple EndUsers at once. + id: + type: optional + validation: + format: uuid + ids: + type: optional + docs: >- + Comma-separated list of LinkedAccount IDs, making it possible to + specify multiple LinkedAccounts at once. + include_duplicates: + type: optional + docs: >- + 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: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given integration name. + is_test_account: + type: optional + docs: >- + If included, will only include test linked accounts. If not + included, will only include non-test linked accounts. + page_size: + type: optional + docs: Number of results to return per page. + status: + type: optional + docs: >- + Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, + `RELINK_NEEDED` + response: + docs: '' + type: hrisRoot.PaginatedAccountDetailsAndActionsList + status-code: 200 + examples: + - response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: e59b1821-f85c-4e28-a6b3-1804156f3563 + category: hris + status: COMPLETE + status_detail: Invalid login credentials + end_user_origin_id: 3ac95cde-6c7f-4eef-afec-be710b42308d + end_user_organization_name: Foo Bar, LLC + end_user_email_address: hradmin@foobar.dev + subdomain: foobar + webhook_listener_url: >- + https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 + is_duplicate: true + integration: + name: name + categories: + - hris + color: color + slug: slug + passthrough_available: true + available_model_operations: + - model_name: Candidate + available_operations: + - FETCH + - CREATE + required_post_parameters: + - remote_user_id + supported_fields: + - first_name + - last_name + - company + - title + account_type: PRODUCTION + completed_at: '2024-08-26T20:11:19Z' + source: + openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/locations.yml b/.mock/definition/HRIS/locations.yml new file mode 100644 index 000000000..e758c05cc --- /dev/null +++ b/.mock/definition/HRIS/locations.yml @@ -0,0 +1,222 @@ +types: + LocationsListRequestLocationType: + enum: + - HOME + - WORK + source: + openapi: hris_v3.yml + LocationsListRequestRemoteFields: + enum: + - country + - value: country,location_type + name: CountryLocationType + - location_type + source: + openapi: hris_v3.yml + LocationsListRequestShowEnumOrigins: + enum: + - country + - value: country,location_type + name: CountryLocationType + - location_type + source: + openapi: hris_v3.yml + LocationsRetrieveRequestRemoteFields: + enum: + - country + - value: country,location_type + name: CountryLocationType + - location_type + source: + openapi: hris_v3.yml + LocationsRetrieveRequestShowEnumOrigins: + enum: + - country + - value: country,location_type + name: CountryLocationType + - location_type + source: + openapi: hris_v3.yml +imports: + hrisRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /hris/v1/locations + method: GET + auth: true + docs: Returns a list of `Location` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: hris_v3.yml + request: + name: LocationsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + location_type: + type: optional + docs: |- + If provided, will only return locations with this location_type + + * `HOME` - HOME + * `WORK` - WORK + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_fields: + type: optional + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + show_enum_origins: + type: optional + docs: >- + 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) + response: + docs: '' + type: hrisRoot.PaginatedLocationList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: f5e6a151-f44e-449a-afb1-8fd781905958 + remote_id: '93018402' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: NYC Office + phone_number: '+1111111111' + street_1: 2920 Broadway + street_2: 2nd Floor + city: 'New York ' + state: NY + zip_code: '10027' + country: AF + location_type: HOME + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /locations + data: + - Varies by platform + retrieve: + path: /hris/v1/locations/{id} + method: GET + auth: true + docs: Returns a `Location` object with the given `id`. + source: + openapi: hris_v3.yml + path-parameters: + id: string + request: + name: LocationsRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional + docs: >- + 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) + response: + docs: '' + type: hrisRoot.Location + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: f5e6a151-f44e-449a-afb1-8fd781905958 + remote_id: '93018402' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: NYC Office + phone_number: '+1111111111' + street_1: 2920 Broadway + street_2: 2nd Floor + city: 'New York ' + state: NY + zip_code: '10027' + country: AF + location_type: HOME + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /locations + data: + - Varies by platform + source: + openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/passthrough.yml b/.mock/definition/HRIS/passthrough.yml new file mode 100644 index 000000000..7ab71e68f --- /dev/null +++ b/.mock/definition/HRIS/passthrough.yml @@ -0,0 +1,40 @@ +imports: + hrisRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /hris/v1/passthrough + method: POST + auth: true + docs: Pull data from an endpoint not currently supported by Merge. + source: + openapi: hris_v3.yml + request: + body: hrisRoot.DataPassthroughRequest + content-type: application/json + response: + docs: '' + type: hrisRoot.RemoteResponse + status-code: 200 + examples: + - headers: {} + request: + method: GET + path: /scooters + response: + body: + method: GET + path: /scooters + status: 200 + response: + key: value + response_headers: + X-Page-Token: value + response_type: JSON + headers: + EXTRA-HEADER: value + Authorization: + source: + openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/payGroups.yml b/.mock/definition/HRIS/payGroups.yml new file mode 100644 index 000000000..5c0d321bf --- /dev/null +++ b/.mock/definition/HRIS/payGroups.yml @@ -0,0 +1,140 @@ +imports: + hrisRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /hris/v1/pay-groups + method: GET + auth: true + docs: Returns a list of `PayGroup` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: hris_v3.yml + request: + name: PayGroupsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: hrisRoot.PaginatedPayGroupList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: fd1e0fb5-8f92-4ec9-9f32-179cf732867d + remote_id: '800293' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + pay_group_name: contractor + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /pay-group + data: + - Varies by platform + retrieve: + path: /hris/v1/pay-groups/{id} + method: GET + auth: true + docs: Returns a `PayGroup` object with the given `id`. + source: + openapi: hris_v3.yml + path-parameters: + id: string + request: + name: PayGroupsRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: hrisRoot.PayGroup + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: fd1e0fb5-8f92-4ec9-9f32-179cf732867d + remote_id: '800293' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + pay_group_name: contractor + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /pay-group + data: + - Varies by platform + source: + openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/payrollRuns.yml b/.mock/definition/HRIS/payrollRuns.yml new file mode 100644 index 000000000..e21ebb971 --- /dev/null +++ b/.mock/definition/HRIS/payrollRuns.yml @@ -0,0 +1,247 @@ +types: + PayrollRunsListRequestRemoteFields: + enum: + - run_state + - value: run_state,run_type + name: RunStateRunType + - run_type + source: + openapi: hris_v3.yml + PayrollRunsListRequestRunType: + enum: + - CORRECTION + - OFF_CYCLE + - REGULAR + - SIGN_ON_BONUS + - TERMINATION + source: + openapi: hris_v3.yml + PayrollRunsListRequestShowEnumOrigins: + enum: + - run_state + - value: run_state,run_type + name: RunStateRunType + - run_type + source: + openapi: hris_v3.yml + PayrollRunsRetrieveRequestRemoteFields: + enum: + - run_state + - value: run_state,run_type + name: RunStateRunType + - run_type + source: + openapi: hris_v3.yml + PayrollRunsRetrieveRequestShowEnumOrigins: + enum: + - run_state + - value: run_state,run_type + name: RunStateRunType + - run_type + source: + openapi: hris_v3.yml +imports: + hrisRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /hris/v1/payroll-runs + method: GET + auth: true + docs: Returns a list of `PayrollRun` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: hris_v3.yml + request: + name: PayrollRunsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + ended_after: + type: optional + docs: >- + If provided, will only return payroll runs ended after this + datetime. + ended_before: + type: optional + docs: >- + If provided, will only return payroll runs ended before this + datetime. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_fields: + type: optional + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + run_type: + type: optional + docs: >- + 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: + type: optional + docs: >- + 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: + type: optional + docs: >- + If provided, will only return payroll runs started after this + datetime. + started_before: + type: optional + docs: >- + If provided, will only return payroll runs started before this + datetime. + response: + docs: '' + type: hrisRoot.PaginatedPayrollRunList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 37336947-b3d4-4a4c-a310-ab6ab510e079 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + run_state: PAID + run_type: REGULAR + start_date: '2020-11-08T00:00:00Z' + end_date: '2020-11-15T00:00:00Z' + check_date: '2020-11-15T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /payroll + data: + - Varies by platform + retrieve: + path: /hris/v1/payroll-runs/{id} + method: GET + auth: true + docs: Returns a `PayrollRun` object with the given `id`. + source: + openapi: hris_v3.yml + path-parameters: + id: string + request: + name: PayrollRunsRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional + docs: >- + 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) + response: + docs: '' + type: hrisRoot.PayrollRun + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 37336947-b3d4-4a4c-a310-ab6ab510e079 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + run_state: PAID + run_type: REGULAR + start_date: '2020-11-08T00:00:00Z' + end_date: '2020-11-15T00:00:00Z' + check_date: '2020-11-15T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /payroll + data: + - Varies by platform + source: + openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/regenerateKey.yml b/.mock/definition/HRIS/regenerateKey.yml new file mode 100644 index 000000000..77a18e6f3 --- /dev/null +++ b/.mock/definition/HRIS/regenerateKey.yml @@ -0,0 +1,36 @@ +imports: + hrisRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /hris/v1/regenerate-key + method: POST + auth: true + docs: Exchange remote keys. + source: + openapi: hris_v3.yml + request: + name: RemoteKeyForRegenerationRequest + body: + properties: + name: + type: string + docs: The name of the remote key + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: hrisRoot.RemoteKey + status-code: 200 + examples: + - request: + name: Remote Deployment Key 1 + response: + body: + name: Remote Deployment Key 1 + key: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA + source: + openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/scopes.yml b/.mock/definition/HRIS/scopes.yml new file mode 100644 index 000000000..221a73240 --- /dev/null +++ b/.mock/definition/HRIS/scopes.yml @@ -0,0 +1,160 @@ +imports: + hrisRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + default_scopes_retrieve: + path: /hris/v1/default-scopes + method: GET + auth: true + docs: >- + 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). + source: + openapi: hris_v3.yml + response: + docs: '' + type: hrisRoot.CommonModelScopeApi + status-code: 200 + examples: + - response: + body: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - created_at + - custom_fields + - date_of_birth + - first_name + - gender + - remote_created_at + - remote_data + disabled_fields: + - company + - employments + - groups + - home_location + - manager + - work_location + linked_account_scopes_retrieve: + path: /hris/v1/linked-account-scopes + method: GET + auth: true + docs: >- + 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). + source: + openapi: hris_v3.yml + response: + docs: '' + type: hrisRoot.CommonModelScopeApi + status-code: 200 + examples: + - headers: {} + response: + body: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - created_at + - custom_fields + - date_of_birth + - first_name + - gender + - remote_created_at + - remote_data + disabled_fields: + - company + - employments + - groups + - home_location + - manager + - work_location + linked_account_scopes_create: + path: /hris/v1/linked-account-scopes + method: POST + auth: true + docs: >- + 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) + source: + openapi: hris_v3.yml + request: + name: LinkedAccountCommonModelScopeDeserializerRequest + body: + properties: + common_models: + docs: The common models you want to update the scopes for + type: list + content-type: application/json + response: + docs: '' + type: hrisRoot.CommonModelScopeApi + status-code: 200 + examples: + - headers: {} + request: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - home_location + disabled_fields: + - work_location + - model_name: Benefit + model_permissions: + WRITE: + is_enabled: false + response: + body: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - created_at + - custom_fields + - date_of_birth + - first_name + - gender + - remote_created_at + - remote_data + disabled_fields: + - company + - employments + - groups + - home_location + - manager + - work_location + source: + openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/syncStatus.yml b/.mock/definition/HRIS/syncStatus.yml new file mode 100644 index 000000000..f31c29075 --- /dev/null +++ b/.mock/definition/HRIS/syncStatus.yml @@ -0,0 +1,59 @@ +imports: + hrisRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /hris/v1/sync-status + method: GET + auth: true + docs: >- + 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). + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: hris_v3.yml + request: + name: SyncStatusListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: hrisRoot.PaginatedSyncStatusList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - model_name: Employee + model_id: hris.Employee + last_sync_start: '2021-03-30T19:44:18Z' + next_sync_start: '2021-03-30T20:44:18Z' + last_sync_result: SYNCING + last_sync_finished: '2021-03-30T19:55:18Z' + status: SYNCING + is_initial_sync: true + selective_sync_configurations_usage: IN_NEXT_SYNC + source: + openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/teams.yml b/.mock/definition/HRIS/teams.yml new file mode 100644 index 000000000..87d7ed508 --- /dev/null +++ b/.mock/definition/HRIS/teams.yml @@ -0,0 +1,157 @@ +imports: + hrisRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /hris/v1/teams + method: GET + auth: true + docs: Returns a list of `Team` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: hris_v3.yml + request: + name: TeamsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional> + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + parent_team_id: + type: optional + docs: If provided, will only return teams with this parent team. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: hrisRoot.PaginatedTeamList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 13a72919-9fae-4f54-81ca-ddfd8712a1ba + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Engineering + parent_team: parent_team + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /teams + data: + - Varies by platform + retrieve: + path: /hris/v1/teams/{id} + method: GET + auth: true + docs: Returns a `Team` object with the given `id`. + source: + openapi: hris_v3.yml + path-parameters: + id: string + request: + name: TeamsRetrieveRequest + query-parameters: + expand: + type: optional> + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: hrisRoot.Team + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 13a72919-9fae-4f54-81ca-ddfd8712a1ba + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Engineering + parent_team: parent_team + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /teams + data: + - Varies by platform + source: + openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/timeOff.yml b/.mock/definition/HRIS/timeOff.yml new file mode 100644 index 000000000..e15ac99e8 --- /dev/null +++ b/.mock/definition/HRIS/timeOff.yml @@ -0,0 +1,601 @@ +types: + TimeOffListRequestExpandItem: + enum: + - approver + - employee + source: + openapi: hris_v3.yml + TimeOffListRequestRemoteFields: + enum: + - request_type + - value: request_type,status + name: RequestTypeStatus + - value: request_type,status,units + name: RequestTypeStatusUnits + - value: request_type,units + name: RequestTypeUnits + - status + - value: status,units + name: StatusUnits + - units + source: + openapi: hris_v3.yml + TimeOffListRequestRequestType: + enum: + - BEREAVEMENT + - JURY_DUTY + - PERSONAL + - SICK + - VACATION + - VOLUNTEER + source: + openapi: hris_v3.yml + TimeOffListRequestShowEnumOrigins: + enum: + - request_type + - value: request_type,status + name: RequestTypeStatus + - value: request_type,status,units + name: RequestTypeStatusUnits + - value: request_type,units + name: RequestTypeUnits + - status + - value: status,units + name: StatusUnits + - units + source: + openapi: hris_v3.yml + TimeOffListRequestStatus: + enum: + - APPROVED + - CANCELLED + - DECLINED + - DELETED + - REQUESTED + source: + openapi: hris_v3.yml + TimeOffRetrieveRequestExpandItem: + enum: + - approver + - employee + source: + openapi: hris_v3.yml + TimeOffRetrieveRequestRemoteFields: + enum: + - request_type + - value: request_type,status + name: RequestTypeStatus + - value: request_type,status,units + name: RequestTypeStatusUnits + - value: request_type,units + name: RequestTypeUnits + - status + - value: status,units + name: StatusUnits + - units + source: + openapi: hris_v3.yml + TimeOffRetrieveRequestShowEnumOrigins: + enum: + - request_type + - value: request_type,status + name: RequestTypeStatus + - value: request_type,status,units + name: RequestTypeStatusUnits + - value: request_type,units + name: RequestTypeUnits + - status + - value: status,units + name: StatusUnits + - units + source: + openapi: hris_v3.yml +imports: + hrisRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /hris/v1/time-off + method: GET + auth: true + docs: Returns a list of `TimeOff` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: hris_v3.yml + request: + name: TimeOffListRequest + query-parameters: + approver_id: + type: optional + docs: If provided, will only return time off for this approver. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + employee_id: + type: optional + docs: If provided, will only return time off for this employee. + ended_after: + type: optional + docs: >- + If provided, will only return employees that ended after this + datetime. + ended_before: + type: optional + docs: >- + If provided, will only return time-offs that ended before this + datetime. + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_fields: + type: optional + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + request_type: + type: optional + docs: >- + 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: + type: optional + docs: >- + 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: + type: optional + docs: >- + If provided, will only return time-offs that started after this + datetime. + started_before: + type: optional + docs: >- + If provided, will only return time-offs that started before this + datetime. + status: + type: optional + docs: >- + 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 + response: + docs: '' + type: hrisRoot.PaginatedTimeOffList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 91b2b905-e866-40c8-8be2-efe53827a0aa + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee: employee + approver: approver + status: REQUESTED + employee_note: Moving into the new apartment Kendall Roy gave me! + units: HOURS + amount: 3 + request_type: VACATION + start_time: '2020-11-10T00:00:00Z' + end_time: '2020-11-17T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /leave + data: + - Varies by platform + create: + path: /hris/v1/time-off + method: POST + auth: true + docs: Creates a `TimeOff` object with the given values. + source: + openapi: hris_v3.yml + request: + name: TimeOffEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: hrisRoot.TimeOffRequest + content-type: application/json + response: + docs: '' + type: hrisRoot.TimeOffResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: 91b2b905-e866-40c8-8be2-efe53827a0aa + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee: employee + approver: approver + status: REQUESTED + employee_note: Moving into the new apartment Kendall Roy gave me! + units: HOURS + amount: 3 + request_type: VACATION + start_time: '2020-11-10T00:00:00Z' + end_time: '2020-11-17T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /leave + data: + - Varies by platform + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /hris/v1/time-off/{id} + method: GET + auth: true + docs: Returns a `TimeOff` object with the given `id`. + source: + openapi: hris_v3.yml + path-parameters: + id: string + request: + name: TimeOffRetrieveRequest + query-parameters: + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional + docs: >- + 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) + response: + docs: '' + type: hrisRoot.TimeOff + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 91b2b905-e866-40c8-8be2-efe53827a0aa + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee: employee + approver: approver + status: REQUESTED + employee_note: Moving into the new apartment Kendall Roy gave me! + units: HOURS + amount: 3 + request_type: VACATION + start_time: '2020-11-10T00:00:00Z' + end_time: '2020-11-17T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /leave + data: + - Varies by platform + metaPostRetrieve: + path: /hris/v1/time-off/meta/post + method: GET + auth: true + docs: Returns metadata for `TimeOff` POSTs. + source: + openapi: hris_v3.yml + response: + docs: '' + type: hrisRoot.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + source: + openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/timeOffBalances.yml b/.mock/definition/HRIS/timeOffBalances.yml new file mode 100644 index 000000000..7df0df8bc --- /dev/null +++ b/.mock/definition/HRIS/timeOffBalances.yml @@ -0,0 +1,211 @@ +types: + TimeOffBalancesListRequestPolicyType: + enum: + - BEREAVEMENT + - JURY_DUTY + - PERSONAL + - SICK + - VACATION + - VOLUNTEER + source: + openapi: hris_v3.yml +imports: + hrisRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /hris/v1/time-off-balances + method: GET + auth: true + docs: Returns a list of `TimeOffBalance` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: hris_v3.yml + request: + name: TimeOffBalancesListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + employee_id: + type: optional + docs: If provided, will only return time off balances for this employee. + expand: + type: optional> + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + policy_type: + type: optional + docs: >- + 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: + type: optional> + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: hrisRoot.PaginatedTimeOffBalanceList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 91b2b905-e866-40c8-8be2-efe53827a0aa + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee: employee + balance: 1.1 + used: 1.1 + policy_type: VACATION + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /leave + data: + - Varies by platform + retrieve: + path: /hris/v1/time-off-balances/{id} + method: GET + auth: true + docs: Returns a `TimeOffBalance` object with the given `id`. + source: + openapi: hris_v3.yml + path-parameters: + id: string + request: + name: TimeOffBalancesRetrieveRequest + query-parameters: + expand: + type: optional> + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: hrisRoot.TimeOffBalance + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 91b2b905-e866-40c8-8be2-efe53827a0aa + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee: employee + balance: 1.1 + used: 1.1 + policy_type: VACATION + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /leave + data: + - Varies by platform + source: + openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/timesheetEntries.yml b/.mock/definition/HRIS/timesheetEntries.yml new file mode 100644 index 000000000..1fd61a786 --- /dev/null +++ b/.mock/definition/HRIS/timesheetEntries.yml @@ -0,0 +1,450 @@ +types: + TimesheetEntriesListRequestOrderBy: + enum: + - value: '-start_time' + name: StartTimeDescending + - value: start_time + name: StartTimeAscending + source: + openapi: hris_v3.yml +imports: + hrisRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /hris/v1/timesheet-entries + method: GET + auth: true + docs: Returns a list of `TimesheetEntry` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: hris_v3.yml + request: + name: TimesheetEntriesListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + employee_id: + type: optional + docs: If provided, will only return timesheet entries for this employee. + ended_after: + type: optional + docs: >- + If provided, will only return timesheet entries ended after this + datetime. + ended_before: + type: optional + docs: >- + If provided, will only return timesheet entries ended before this + datetime. + expand: + type: optional> + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + 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: start_time, -start_time. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + started_after: + type: optional + docs: >- + If provided, will only return timesheet entries started after this + datetime. + started_before: + type: optional + docs: >- + If provided, will only return timesheet entries started before + this datetime. + response: + docs: '' + type: hrisRoot.PaginatedTimesheetEntryList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 91b2b905-e866-40c8-8be2-efe53827a0aa + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee: employee + hours_worked: 10 + start_time: '2020-11-10T00:00:00Z' + end_time: '2020-11-10T00:10:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /dependent + data: + - Varies by platform + create: + path: /hris/v1/timesheet-entries + method: POST + auth: true + docs: Creates a `TimesheetEntry` object with the given values. + source: + openapi: hris_v3.yml + request: + name: TimesheetEntryEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: hrisRoot.TimesheetEntryRequest + content-type: application/json + response: + docs: '' + type: hrisRoot.TimesheetEntryResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: 91b2b905-e866-40c8-8be2-efe53827a0aa + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee: employee + hours_worked: 10 + start_time: '2020-11-10T00:00:00Z' + end_time: '2020-11-10T00:10:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /dependent + data: + - Varies by platform + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /hris/v1/timesheet-entries/{id} + method: GET + auth: true + docs: Returns a `TimesheetEntry` object with the given `id`. + source: + openapi: hris_v3.yml + path-parameters: + id: string + request: + name: TimesheetEntriesRetrieveRequest + query-parameters: + expand: + type: optional> + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: hrisRoot.TimesheetEntry + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 91b2b905-e866-40c8-8be2-efe53827a0aa + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee: employee + hours_worked: 10 + start_time: '2020-11-10T00:00:00Z' + end_time: '2020-11-10T00:10:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /dependent + data: + - Varies by platform + metaPostRetrieve: + path: /hris/v1/timesheet-entries/meta/post + method: GET + auth: true + docs: Returns metadata for `TimesheetEntry` POSTs. + source: + openapi: hris_v3.yml + response: + docs: '' + type: hrisRoot.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + source: + openapi: hris_v3.yml diff --git a/.mock/definition/HRIS/webhookReceivers.yml b/.mock/definition/HRIS/webhookReceivers.yml new file mode 100644 index 000000000..e0b952631 --- /dev/null +++ b/.mock/definition/HRIS/webhookReceivers.yml @@ -0,0 +1,61 @@ +imports: + hrisRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /hris/v1/webhook-receivers + method: GET + auth: true + docs: Returns a list of `WebhookReceiver` objects. + source: + openapi: hris_v3.yml + response: + docs: '' + type: list + status-code: 200 + examples: + - headers: {} + response: + body: + - event: event + is_active: true + key: key + create: + path: /hris/v1/webhook-receivers + method: POST + auth: true + docs: Creates a `WebhookReceiver` object with the given values. + source: + openapi: hris_v3.yml + request: + name: WebhookReceiverRequest + body: + properties: + event: + type: string + validation: + minLength: 1 + is_active: boolean + key: + type: optional + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: hrisRoot.WebhookReceiver + status-code: 201 + examples: + - headers: {} + request: + event: event + is_active: true + response: + body: + event: event + is_active: true + key: key + source: + openapi: hris_v3.yml diff --git a/.mock/definition/Ticketing/__package__.yml b/.mock/definition/Ticketing/__package__.yml new file mode 100644 index 000000000..29c340583 --- /dev/null +++ b/.mock/definition/Ticketing/__package__.yml @@ -0,0 +1,3392 @@ +types: + Account: + docs: >- + # The Account Object + + ### Description + + The `Account` object is used to represent the account that a ticket is + associated with. + + + The account is a company that may be a customer. This does not represent + the company that is receiving the ticket. + + + ### Usage Example + + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The account's name. + domains: + type: optional>> + docs: The account's domain names. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: ticketing_v3.yml + AccountDetailsCategory: + discriminated: false + union: + - CategoryEnum + - string + source: + openapi: ticketing_v3.yml + inline: true + AccountDetails: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + integration: + type: optional + access: read-only + integration_slug: + type: optional + access: read-only + category: optional + end_user_origin_id: + type: optional + access: read-only + end_user_organization_name: + type: optional + access: read-only + end_user_email_address: + type: optional + validation: + format: email + access: read-only + status: + type: optional + access: read-only + webhook_listener_url: + type: optional + validation: + format: uri + access: read-only + is_duplicate: + type: optional + docs: >- + Whether a Production Linked Account's credentials match another + existing Production Linked Account. This field is `null` for Test + Linked Accounts, incomplete Production Linked Accounts, and ignored + duplicate Production Linked Account sets. + access: read-only + account_type: + type: optional + access: read-only + completed_at: + type: optional + docs: The time at which account completes the linking flow. + source: + openapi: ticketing_v3.yml + AccountDetailsAndActionsCategory: + discriminated: false + union: + - CategoryEnum + - string + source: + openapi: ticketing_v3.yml + inline: true + AccountDetailsAndActionsStatus: + discriminated: false + union: + - AccountDetailsAndActionsStatusEnum + - string + source: + openapi: ticketing_v3.yml + inline: true + AccountDetailsAndActions: + docs: >- + # The LinkedAccount Object + + ### Description + + The `LinkedAccount` object is used to represent an end user's link with a + specific integration. + + + ### Usage Example + + View a list of your organization's `LinkedAccount` objects. + properties: + id: string + category: optional + status: AccountDetailsAndActionsStatus + status_detail: optional + end_user_origin_id: optional + end_user_organization_name: string + end_user_email_address: string + subdomain: + type: optional + docs: The tenant or domain the customer has provided access to. + webhook_listener_url: string + is_duplicate: + type: optional + docs: >- + Whether a Production Linked Account's credentials match another + existing Production Linked Account. This field is `null` for Test + Linked Accounts, incomplete Production Linked Accounts, and ignored + duplicate Production Linked Account sets. + integration: optional + account_type: string + completed_at: datetime + source: + openapi: ticketing_v3.yml + AccountDetailsAndActionsIntegration: + properties: + name: string + categories: list + image: optional + square_image: optional + color: string + slug: string + passthrough_available: boolean + available_model_operations: optional> + source: + openapi: ticketing_v3.yml + AccountDetailsAndActionsStatusEnum: + enum: + - COMPLETE + - INCOMPLETE + - RELINK_NEEDED + - IDLE + docs: |- + * `COMPLETE` - COMPLETE + * `INCOMPLETE` - INCOMPLETE + * `RELINK_NEEDED` - RELINK_NEEDED + * `IDLE` - IDLE + source: + openapi: ticketing_v3.yml + AccountIntegration: + properties: + name: + type: string + docs: Company name. + abbreviated_name: + type: optional + docs: >- + Optional. This shortened name appears in places with limited space, + usually in conjunction with the platform's logo (e.g., Merge Link + menu).

Example: Workforce Now (in lieu of ADP Workforce + Now), SuccessFactors (in lieu of SAP SuccessFactors) + categories: + type: optional> + docs: >- + Category or categories this integration belongs to. Multiple + categories should be comma separated, i.e. [ats, hris]. + access: read-only + image: + type: optional + docs: Company logo in rectangular shape. + validation: + format: uri + square_image: + type: optional + docs: Company logo in square shape. + validation: + format: uri + color: + type: optional + docs: >- + The color of this integration used for buttons and text throughout the + app and landing pages. Choose a darker, saturated color. + validation: + pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ + maxLength: 18 + slug: + type: optional + access: read-only + api_endpoints_to_documentation_urls: + type: optional> + docs: >- + Mapping of API endpoints to documentation urls for support. Example: + {'GET': [['/common-model-scopes', + 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', + 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], + 'POST': []} + webhook_setup_guide_url: + type: optional + docs: >- + Setup guide URL for third party webhook creation. Exposed in Merge + Docs. + category_beta_status: + type: optional> + docs: Category or categories this integration is in beta status for. + access: read-only + source: + openapi: ticketing_v3.yml + AccountToken: + properties: + account_token: string + integration: AccountIntegration + id: string + source: + openapi: ticketing_v3.yml + AdvancedMetadata: + properties: + id: + type: string + validation: + format: uuid + display_name: optional + description: optional + is_required: optional + is_custom: optional + field_choices: optional> + source: + openapi: ticketing_v3.yml + AsyncPassthroughReciept: + properties: + async_passthrough_receipt_id: + type: string + validation: + format: uuid + source: + openapi: ticketing_v3.yml + AttachmentTicket: + discriminated: false + docs: The ticket associated with the attachment. + union: + - type: string + validation: + format: uuid + - Ticket + source: + openapi: ticketing_v3.yml + inline: true + Attachment: + docs: |- + # The Attachment Object + ### Description + The `Attachment` object is used to represent an attachment for a ticket. + + ### Usage Example + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + file_name: + type: optional + docs: >- + The attachment's name. It is required to include the file extension in + the attachment's name. + ticket: + type: optional + docs: The ticket associated with the attachment. + file_url: + type: optional + docs: >- + The attachment's url. It is required to include the file extension in + the file's URL. + content_type: + type: optional + docs: The attachment's file format. + uploaded_by: + type: optional + docs: The user who uploaded the attachment. + validation: + format: uuid + remote_created_at: + type: optional + docs: When the third party's attachment was created. + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: ticketing_v3.yml + AttachmentRequestTicket: + discriminated: false + docs: The ticket associated with the attachment. + union: + - type: string + validation: + format: uuid + - Ticket + source: + openapi: ticketing_v3.yml + inline: true + AttachmentRequest: + docs: |- + # The Attachment Object + ### Description + The `Attachment` object is used to represent an attachment for a ticket. + + ### Usage Example + TODO + properties: + file_name: + type: optional + docs: >- + The attachment's name. It is required to include the file extension in + the attachment's name. + ticket: + type: optional + docs: The ticket associated with the attachment. + file_url: + type: optional + docs: >- + The attachment's url. It is required to include the file extension in + the file's URL. + content_type: + type: optional + docs: The attachment's file format. + uploaded_by: + type: optional + docs: The user who uploaded the attachment. + validation: + format: uuid + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: ticketing_v3.yml + AuditLogEventRole: + discriminated: false + docs: >- + Designates the role of the user (or SYSTEM/API if action not taken by a + user) at the time of this Event occurring. + + + * `ADMIN` - ADMIN + + * `DEVELOPER` - DEVELOPER + + * `MEMBER` - MEMBER + + * `API` - API + + * `SYSTEM` - SYSTEM + + * `MERGE_TEAM` - MERGE_TEAM + union: + - RoleEnum + - string + source: + openapi: ticketing_v3.yml + inline: true + AuditLogEventEventType: + discriminated: false + docs: >- + Designates the type of event that occurred. + + + * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + + * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + + * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + + * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + + * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + + * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + + * `INVITED_USER` - INVITED_USER + + * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + + * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + + * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + + * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - + DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + + * `CREATED_DESTINATION` - CREATED_DESTINATION + + * `DELETED_DESTINATION` - DELETED_DESTINATION + + * `CHANGED_DESTINATION` - CHANGED_DESTINATION + + * `CHANGED_SCOPES` - CHANGED_SCOPES + + * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + + * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + + * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + + * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + + * `ENABLED_CATEGORY` - ENABLED_CATEGORY + + * `DISABLED_CATEGORY` - DISABLED_CATEGORY + + * `CHANGED_PASSWORD` - CHANGED_PASSWORD + + * `RESET_PASSWORD` - RESET_PASSWORD + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - + CREATED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - + CREATED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - + CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - + CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + + * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - + DELETED_INTEGRATION_WIDE_FIELD_MAPPING + + * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - + DELETED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + + * `MUTED_ISSUE` - MUTED_ISSUE + + * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + + * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + + * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + + * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + + * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + union: + - EventTypeEnum + - string + source: + openapi: ticketing_v3.yml + inline: true + AuditLogEvent: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + user_name: + type: optional + docs: The User's full name at the time of this Event occurring. + validation: + maxLength: 200 + user_email: + type: optional + docs: The User's email at the time of this Event occurring. + validation: + format: email + maxLength: 254 + role: + type: AuditLogEventRole + docs: >- + Designates the role of the user (or SYSTEM/API if action not taken by + a user) at the time of this Event occurring. + + + * `ADMIN` - ADMIN + + * `DEVELOPER` - DEVELOPER + + * `MEMBER` - MEMBER + + * `API` - API + + * `SYSTEM` - SYSTEM + + * `MERGE_TEAM` - MERGE_TEAM + ip_address: + type: string + validation: + maxLength: 45 + event_type: + type: AuditLogEventEventType + docs: >- + Designates the type of event that occurred. + + + * `CREATED_REMOTE_PRODUCTION_API_KEY` - + CREATED_REMOTE_PRODUCTION_API_KEY + + * `DELETED_REMOTE_PRODUCTION_API_KEY` - + DELETED_REMOTE_PRODUCTION_API_KEY + + * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + + * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + + * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + + * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + + * `INVITED_USER` - INVITED_USER + + * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + + * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + + * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + + * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - + DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + + * `CREATED_DESTINATION` - CREATED_DESTINATION + + * `DELETED_DESTINATION` - DELETED_DESTINATION + + * `CHANGED_DESTINATION` - CHANGED_DESTINATION + + * `CHANGED_SCOPES` - CHANGED_SCOPES + + * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + + * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + + * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + + * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + + * `ENABLED_CATEGORY` - ENABLED_CATEGORY + + * `DISABLED_CATEGORY` - DISABLED_CATEGORY + + * `CHANGED_PASSWORD` - CHANGED_PASSWORD + + * `RESET_PASSWORD` - RESET_PASSWORD + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - + CREATED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - + CREATED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - + CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - + CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + + * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - + DELETED_INTEGRATION_WIDE_FIELD_MAPPING + + * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - + DELETED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + + * `MUTED_ISSUE` - MUTED_ISSUE + + * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + + * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + + * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + + * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + + * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + event_description: string + created_at: + type: optional + access: read-only + source: + openapi: ticketing_v3.yml + AvailableActions: + docs: >- + # The AvailableActions Object + + ### Description + + The `Activity` object is used to see all available model/operation + combinations for an integration. + + + ### Usage Example + + Fetch all the actions available for the `Zenefits` integration. + properties: + integration: AccountIntegration + passthrough_available: boolean + available_model_operations: optional> + source: + openapi: ticketing_v3.yml + CategoriesEnum: + enum: + - hris + - ats + - accounting + - ticketing + - crm + - mktg + - filestorage + docs: |- + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + source: + openapi: ticketing_v3.yml + CategoryEnum: + enum: + - hris + - ats + - accounting + - ticketing + - crm + - mktg + - filestorage + docs: |- + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + source: + openapi: ticketing_v3.yml + CollectionAccessLevel: + discriminated: false + docs: |- + The level of access a User has to the Collection and its sub-objects. + + * `PRIVATE` - PRIVATE + * `COMPANY` - COMPANY + * `PUBLIC` - PUBLIC + * `PARENT_COLLECTION` - PARENT_COLLECTION + union: + - CollectionAccessLevelEnum + - string + source: + openapi: ticketing_v3.yml + inline: true + CollectionParentCollection: + discriminated: false + docs: The parent collection for this collection. + union: + - type: string + validation: + format: uuid + - Collection + source: + openapi: ticketing_v3.yml + inline: true + Collection: + docs: >- + # The Collection Object + + ### Description + + The `Collection` object is used to represent one or more `Tickets`. There + can be a hierarchy of `Collections`, in which a sub-collection belongs to + a parent-collection. + + + ### Usage Example + + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The collection's name. + description: + type: optional + docs: The collection's description. + access_level: + type: optional + docs: |- + The level of access a User has to the Collection and its sub-objects. + + * `PRIVATE` - PRIVATE + * `COMPANY` - COMPANY + * `PUBLIC` - PUBLIC + * `PARENT_COLLECTION` - PARENT_COLLECTION + collection_type: + type: optional + docs: |- + The collection's type. + + * `LIST` - LIST + * `PROJECT` - PROJECT + parent_collection: + type: optional + docs: The parent collection for this collection. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: ticketing_v3.yml + CollectionAccessLevelEnum: + enum: + - PRIVATE + - COMPANY + - PUBLIC + - PARENT_COLLECTION + docs: |- + * `PRIVATE` - PRIVATE + * `COMPANY` - COMPANY + * `PUBLIC` - PUBLIC + * `PARENT_COLLECTION` - PARENT_COLLECTION + source: + openapi: ticketing_v3.yml + CollectionTypeEnum: + enum: + - LIST + - PROJECT + docs: |- + * `LIST` - LIST + * `PROJECT` - PROJECT + source: + openapi: ticketing_v3.yml + CommentUser: + discriminated: false + docs: >- + The author of the Comment, if the author is a User. If the third party + does not support specifying an author, we will append "[Posted on behalf + of {name}]" to the comment. + union: + - type: string + validation: + format: uuid + - User + source: + openapi: ticketing_v3.yml + inline: true + CommentContact: + discriminated: false + docs: >- + The author of the Comment, if the author is a Contact.If the third party + does not support specifying an author, we will append "[Posted on behalf + of {name}]" to the comment. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: ticketing_v3.yml + inline: true + CommentTicket: + discriminated: false + docs: 'The ticket associated with the comment. ' + union: + - type: string + validation: + format: uuid + - Ticket + source: + openapi: ticketing_v3.yml + inline: true + Comment: + docs: |- + # The Comment Object + ### Description + The `Comment` object is used to represent a comment on a ticket. + + ### Usage Example + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + user: + type: optional + docs: >- + The author of the Comment, if the author is a User. If the third party + does not support specifying an author, we will append "[Posted on + behalf of {name}]" to the comment. + contact: + type: optional + docs: >- + The author of the Comment, if the author is a Contact.If the third + party does not support specifying an author, we will append "[Posted + on behalf of {name}]" to the comment. + body: + type: optional + docs: The comment's text body. + html_body: + type: optional + docs: The comment's text body formatted as html. + ticket: + type: optional + docs: 'The ticket associated with the comment. ' + is_private: + type: optional + docs: Whether or not the comment is internal. + remote_created_at: + type: optional + docs: When the third party's comment was created. + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: ticketing_v3.yml + CommentRequestUser: + discriminated: false + docs: >- + The author of the Comment, if the author is a User. If the third party + does not support specifying an author, we will append "[Posted on behalf + of {name}]" to the comment. + union: + - type: string + validation: + format: uuid + - User + source: + openapi: ticketing_v3.yml + inline: true + CommentRequestContact: + discriminated: false + docs: >- + The author of the Comment, if the author is a Contact.If the third party + does not support specifying an author, we will append "[Posted on behalf + of {name}]" to the comment. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: ticketing_v3.yml + inline: true + CommentRequestTicket: + discriminated: false + docs: 'The ticket associated with the comment. ' + union: + - type: string + validation: + format: uuid + - Ticket + source: + openapi: ticketing_v3.yml + inline: true + CommentRequest: + docs: |- + # The Comment Object + ### Description + The `Comment` object is used to represent a comment on a ticket. + + ### Usage Example + TODO + properties: + user: + type: optional + docs: >- + The author of the Comment, if the author is a User. If the third party + does not support specifying an author, we will append "[Posted on + behalf of {name}]" to the comment. + contact: + type: optional + docs: >- + The author of the Comment, if the author is a Contact.If the third + party does not support specifying an author, we will append "[Posted + on behalf of {name}]" to the comment. + body: + type: optional + docs: The comment's text body. + html_body: + type: optional + docs: The comment's text body formatted as html. + ticket: + type: optional + docs: 'The ticket associated with the comment. ' + is_private: + type: optional + docs: Whether or not the comment is internal. + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: ticketing_v3.yml + CommentResponse: + properties: + model: Comment + warnings: list + errors: list + logs: optional> + source: + openapi: ticketing_v3.yml + CommonModelScopeApi: + properties: + common_models: + docs: The common models you want to update the scopes for + type: list + source: + openapi: ticketing_v3.yml + CommonModelScopesBodyRequest: + properties: + model_id: + type: string + validation: + minLength: 1 + enabled_actions: list + disabled_fields: list + source: + openapi: ticketing_v3.yml + ContactAccount: + discriminated: false + docs: The contact's account. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: ticketing_v3.yml + inline: true + Contact: + docs: >- + # The Contact Object + + ### Description + + The `Contact` object is used to represent the customer, lead, or external + user that a ticket is associated with. + + + ### Usage Example + + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The contact's name. + email_address: + type: optional + docs: The contact's email address. + phone_number: + type: optional + docs: The contact's phone number. + details: + type: optional + docs: The contact's details. + account: + type: optional + docs: The contact's account. + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: ticketing_v3.yml + ContactRequestAccount: + discriminated: false + docs: The contact's account. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: ticketing_v3.yml + inline: true + ContactRequest: + docs: >- + # The Contact Object + + ### Description + + The `Contact` object is used to represent the customer, lead, or external + user that a ticket is associated with. + + + ### Usage Example + + TODO + properties: + name: + type: optional + docs: The contact's name. + email_address: + type: optional + docs: The contact's email address. + phone_number: + type: optional + docs: The contact's phone number. + details: + type: optional + docs: The contact's details. + account: + type: optional + docs: The contact's account. + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: ticketing_v3.yml + DataPassthroughRequest: + docs: >- + # The DataPassthrough Object + + ### Description + + The `DataPassthrough` object is used to send information to an + otherwise-unsupported third-party endpoint. + + + ### Usage Example + + Create a `DataPassthrough` to get team hierarchies from your Rippling + integration. + properties: + method: MethodEnum + path: + type: string + docs: The path of the request in the third party's platform. + validation: + minLength: 1 + base_url_override: + type: optional + docs: An optional override of the third party's base url for the request. + validation: + minLength: 1 + data: + type: optional + docs: >- + The data with the request. You must include a `request_format` + parameter matching the data's format + validation: + minLength: 1 + multipart_form_data: + type: optional> + docs: >- + Pass an array of `MultipartFormField` objects in here instead of using + the `data` param if `request_format` is set to `MULTIPART`. + headers: + type: optional> + docs: >- + The headers to use for the request (Merge will handle the account's + authorization headers). `Content-Type` header is required for + passthrough. Choose content type corresponding to expected format of + receiving server. + request_format: optional + normalize_response: + type: optional + docs: >- + Optional. If true, the response will always be an object of the form + `{"type": T, "value": ...}` where `T` will be one of `string, boolean, + number, null, array, object`. + source: + openapi: ticketing_v3.yml + DebugModeLog: + properties: + log_id: string + dashboard_view: string + log_summary: DebugModelLogSummary + source: + openapi: ticketing_v3.yml + DebugModelLogSummary: + properties: + url: string + method: string + status_code: integer + source: + openapi: ticketing_v3.yml + EnabledActionsEnum: + enum: + - READ + - WRITE + docs: |- + * `READ` - READ + * `WRITE` - WRITE + source: + openapi: ticketing_v3.yml + EncodingEnum: + enum: + - RAW + - BASE64 + - GZIP_BASE64 + docs: |- + * `RAW` - RAW + * `BASE64` - BASE64 + * `GZIP_BASE64` - GZIP_BASE64 + source: + openapi: ticketing_v3.yml + ErrorValidationProblem: + properties: + source: optional + title: string + detail: string + problem_type: string + source: + openapi: ticketing_v3.yml + EventTypeEnum: + enum: + - 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 + docs: >- + * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + + * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + + * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + + * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + + * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + + * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + + * `INVITED_USER` - INVITED_USER + + * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + + * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + + * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + + * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - + DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + + * `CREATED_DESTINATION` - CREATED_DESTINATION + + * `DELETED_DESTINATION` - DELETED_DESTINATION + + * `CHANGED_DESTINATION` - CHANGED_DESTINATION + + * `CHANGED_SCOPES` - CHANGED_SCOPES + + * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + + * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + + * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + + * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + + * `ENABLED_CATEGORY` - ENABLED_CATEGORY + + * `DISABLED_CATEGORY` - DISABLED_CATEGORY + + * `CHANGED_PASSWORD` - CHANGED_PASSWORD + + * `RESET_PASSWORD` - RESET_PASSWORD + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - + CREATED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - + CREATED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - + CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - + CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + + * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - + DELETED_INTEGRATION_WIDE_FIELD_MAPPING + + * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - + DELETED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + + * `MUTED_ISSUE` - MUTED_ISSUE + + * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + + * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + + * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + + * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + + * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + source: + openapi: ticketing_v3.yml + ExternalTargetFieldApi: + properties: + name: + type: optional + access: read-only + description: + type: optional + access: read-only + is_mapped: + type: optional + access: read-only + source: + openapi: ticketing_v3.yml + ExternalTargetFieldApiResponse: + properties: + Ticket: optional> + Comment: optional> + Project: optional> + Collection: optional> + User: optional> + Role: optional> + Account: optional> + Team: optional> + Attachment: optional> + Tag: optional> + Contact: optional> + source: + openapi: ticketing_v3.yml + FieldFormatEnum: + enum: + - string + - number + - date + - datetime + - bool + - list + docs: |- + * `string` - string + * `number` - number + * `date` - date + * `datetime` - datetime + * `bool` - bool + * `list` - list + source: + openapi: ticketing_v3.yml + FieldMappingApiInstanceTargetField: + properties: + name: string + description: string + is_organization_wide: boolean + source: + openapi: ticketing_v3.yml + inline: true + FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo: + properties: + method: optional + url_path: optional + field_traversal_path: optional> + source: + openapi: ticketing_v3.yml + inline: true + FieldMappingApiInstanceRemoteField: + properties: + remote_key_name: optional + schema: optional> + remote_endpoint_info: FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo + source: + openapi: ticketing_v3.yml + inline: true + FieldMappingApiInstance: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + is_integration_wide: + type: optional + access: read-only + target_field: + type: optional + access: read-only + remote_field: + type: optional + access: read-only + source: + openapi: ticketing_v3.yml + FieldMappingApiInstanceResponse: + properties: + Ticket: optional> + Comment: optional> + Project: optional> + Collection: optional> + User: optional> + Role: optional> + Account: optional> + Team: optional> + Attachment: optional> + Tag: optional> + Contact: optional> + source: + openapi: ticketing_v3.yml + FieldMappingInstanceResponse: + properties: + model: FieldMappingApiInstance + warnings: list + errors: list + logs: optional> + source: + openapi: ticketing_v3.yml + FieldPermissionDeserializer: + properties: + enabled_fields: optional> + disabled_fields: optional> + source: + openapi: ticketing_v3.yml + FieldPermissionDeserializerRequest: + properties: + enabled_fields: optional> + disabled_fields: optional> + source: + openapi: ticketing_v3.yml + FieldTypeEnum: + enum: + - string + - number + - date + - datetime + - bool + - list + docs: |- + * `string` - string + * `number` - number + * `date` - date + * `datetime` - datetime + * `bool` - bool + * `list` - list + source: + openapi: ticketing_v3.yml + IndividualCommonModelScopeDeserializer: + properties: + model_name: string + model_permissions: optional> + field_permissions: optional + source: + openapi: ticketing_v3.yml + IndividualCommonModelScopeDeserializerRequest: + properties: + model_name: + type: string + validation: + minLength: 1 + model_permissions: optional> + field_permissions: optional + source: + openapi: ticketing_v3.yml + IssueStatus: + discriminated: false + docs: |- + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + union: + - IssueStatusEnum + - string + source: + openapi: ticketing_v3.yml + inline: true + Issue: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + status: + type: optional + docs: |- + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + error_description: string + end_user: + type: optional> + access: read-only + first_incident_time: optional + last_incident_time: optional + is_muted: + type: optional + access: read-only + error_details: + type: optional> + access: read-only + source: + openapi: ticketing_v3.yml + IssueStatusEnum: + enum: + - ONGOING + - RESOLVED + docs: |- + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + source: + openapi: ticketing_v3.yml + ItemFormatEnum: + enum: + - string + - number + - date + - datetime + - bool + - list + docs: |- + * `string` - uuid + * `number` - url + * `date` - email + * `datetime` - phone + * `bool` - currency + * `list` - decimal + source: + openapi: ticketing_v3.yml + ItemSchema: + properties: + item_type: optional + item_format: optional + item_choices: optional> + source: + openapi: ticketing_v3.yml + ItemTypeEnum: + enum: + - string + - number + - date + - datetime + - bool + - list + docs: |- + * `string` - string + * `number` - number + * `date` - date + * `datetime` - datetime + * `bool` - bool + * `list` - list + source: + openapi: ticketing_v3.yml + LanguageEnum: + enum: + - en + - de + docs: |- + * `en` - en + * `de` - de + source: + openapi: ticketing_v3.yml + LastSyncResultEnum: + enum: + - SYNCING + - DONE + - FAILED + - DISABLED + - PAUSED + - PARTIALLY_SYNCED + docs: |- + * `SYNCING` - SYNCING + * `DONE` - DONE + * `FAILED` - FAILED + * `DISABLED` - DISABLED + * `PAUSED` - PAUSED + * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED + source: + openapi: ticketing_v3.yml + LinkToken: + properties: + link_token: string + integration_name: optional + magic_link_url: optional + source: + openapi: ticketing_v3.yml + LinkedAccountStatus: + properties: + linked_account_status: string + can_make_request: boolean + source: + openapi: ticketing_v3.yml + MetaResponse: + properties: + request_schema: map + remote_field_classes: optional> + status: optional + has_conditional_params: boolean + has_required_linked_account_params: boolean + source: + openapi: ticketing_v3.yml + MethodEnum: + enum: + - GET + - OPTIONS + - HEAD + - POST + - PUT + - PATCH + - DELETE + docs: |- + * `GET` - GET + * `OPTIONS` - OPTIONS + * `HEAD` - HEAD + * `POST` - POST + * `PUT` - PUT + * `PATCH` - PATCH + * `DELETE` - DELETE + source: + openapi: ticketing_v3.yml + ModelOperation: + docs: >- + # The ModelOperation Object + + ### Description + + The `ModelOperation` object is used to represent the operations that are + currently supported for a given model. + + + ### Usage Example + + View what operations are supported for the `Candidate` endpoint. + properties: + model_name: string + available_operations: list + required_post_parameters: list + supported_fields: list + source: + openapi: ticketing_v3.yml + ModelPermissionDeserializer: + properties: + is_enabled: optional + source: + openapi: ticketing_v3.yml + ModelPermissionDeserializerRequest: + properties: + is_enabled: optional + source: + openapi: ticketing_v3.yml + MultipartFormFieldRequestEncoding: + discriminated: false + docs: |- + The encoding of the value of `data`. Defaults to `RAW` if not defined. + + * `RAW` - RAW + * `BASE64` - BASE64 + * `GZIP_BASE64` - GZIP_BASE64 + union: + - EncodingEnum + - string + source: + openapi: ticketing_v3.yml + inline: true + MultipartFormFieldRequest: + docs: >- + # The MultipartFormField Object + + ### Description + + The `MultipartFormField` object is used to represent fields in an HTTP + request using `multipart/form-data`. + + + ### Usage Example + + Create a `MultipartFormField` to define a multipart form entry. + properties: + name: + type: string + docs: The name of the form field + validation: + minLength: 1 + data: + type: string + docs: The data for the form field. + validation: + minLength: 1 + encoding: + type: optional + docs: |- + The encoding of the value of `data`. Defaults to `RAW` if not defined. + + * `RAW` - RAW + * `BASE64` - BASE64 + * `GZIP_BASE64` - GZIP_BASE64 + file_name: + type: optional + docs: The file name of the form field, if the field is for a file. + validation: + minLength: 1 + content_type: + type: optional + docs: The MIME type of the file, if the field is for a file. + validation: + minLength: 1 + source: + openapi: ticketing_v3.yml + PaginatedAccountDetailsAndActionsList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: ticketing_v3.yml + PaginatedAccountList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: ticketing_v3.yml + PaginatedAttachmentList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: ticketing_v3.yml + PaginatedAuditLogEventList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: ticketing_v3.yml + PaginatedCollectionList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: ticketing_v3.yml + PaginatedCommentList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: ticketing_v3.yml + PaginatedContactList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: ticketing_v3.yml + PaginatedIssueList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: ticketing_v3.yml + PaginatedProjectList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: ticketing_v3.yml + PaginatedRemoteFieldClassList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: ticketing_v3.yml + PaginatedRoleList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: ticketing_v3.yml + PaginatedSyncStatusList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: ticketing_v3.yml + PaginatedTagList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: ticketing_v3.yml + PaginatedTeamList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: ticketing_v3.yml + PaginatedTicketList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: ticketing_v3.yml + PaginatedUserList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: ticketing_v3.yml + PaginatedViewerList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: ticketing_v3.yml + PatchedTicketRequestStatus: + discriminated: false + docs: |- + The current status of the ticket. + + * `OPEN` - OPEN + * `CLOSED` - CLOSED + * `IN_PROGRESS` - IN_PROGRESS + * `ON_HOLD` - ON_HOLD + union: + - TicketStatusEnum + - string + source: + openapi: ticketing_v3.yml + inline: true + PatchedTicketRequestAccessLevel: + discriminated: false + docs: >- + The description of who is able to access a given ticket, or where access + is inherited from. + + + * `COMPANY` - COMPANY + + * `PUBLIC` - PUBLIC + + * `PRIVATE` - PRIVATE + + * `COLLECTION` - COLLECTION + union: + - TicketAccessLevelEnum + - string + source: + openapi: ticketing_v3.yml + inline: true + PatchedTicketRequest: + docs: |- + # The Ticket Object + ### Description + The `Ticket` object is used to represent a ticket, issue, task or case. + ### Usage Example + TODO + properties: + name: + type: optional + docs: The ticket's name. + assignees: + type: optional>> + docs: >- + The individual `Users` who are assigned to this ticket. This does not + include `Users` who just have view access to this ticket. To fetch all + `Users` and `Teams` that can access the ticket, use the `GET + /tickets/{ticket_id}/viewers` + [endpoint](https://docs.merge.dev/ticketing/tickets/#tickets_viewers_list). + assigned_teams: + type: optional>> + docs: >- + The `Teams` that are assigned to this ticket. This does not include + `Teams` who just have view access to this ticket. To fetch all `Users` + and `Teams` that can access this ticket, use the `GET + /tickets/{ticket_id}/viewers` + [endpoint](https://docs.merge.dev/ticketing/tickets/#tickets_viewers_list). + creator: + type: optional + docs: The user who created this ticket. + validation: + format: uuid + due_date: + type: optional + docs: The ticket's due date. + status: + type: optional + docs: |- + The current status of the ticket. + + * `OPEN` - OPEN + * `CLOSED` - CLOSED + * `IN_PROGRESS` - IN_PROGRESS + * `ON_HOLD` - ON_HOLD + description: + type: optional + docs: >- + The ticket’s description. HTML version of description is mapped if + supported by the third-party platform. + collections: + type: optional>> + docs: The `Collections` that this `Ticket` is included in. + ticket_type: + type: optional + docs: >- + The sub category of the ticket within the 3rd party system. Examples + include incident, task, subtask or to-do. + account: + type: optional + docs: The account associated with the ticket. + validation: + format: uuid + contact: + type: optional + docs: The contact associated with the ticket. + validation: + format: uuid + parent_ticket: + type: optional + docs: The ticket's parent ticket. + validation: + format: uuid + access_level: + type: optional + docs: >- + The description of who is able to access a given ticket, or where + access is inherited from. + + + * `COMPANY` - COMPANY + + * `PUBLIC` - PUBLIC + + * `PRIVATE` - PRIVATE + + * `COLLECTION` - COLLECTION + tags: optional>> + roles: optional>> + completed_at: + type: optional + docs: When the ticket was completed. + ticket_url: + type: optional + docs: The 3rd party url of the Ticket. + validation: + format: uri + maxLength: 2000 + priority: + type: optional + docs: |- + The priority or urgency of the Ticket. + + * `URGENT` - URGENT + * `HIGH` - HIGH + * `NORMAL` - NORMAL + * `LOW` - LOW + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: ticketing_v3.yml + PriorityEnum: + enum: + - URGENT + - HIGH + - NORMAL + - LOW + docs: |- + * `URGENT` - URGENT + * `HIGH` - HIGH + * `NORMAL` - NORMAL + * `LOW` - LOW + source: + openapi: ticketing_v3.yml + Project: + docs: >- + # The Project Object + + ### Description + + Please use the `Collection` model. This model will be fully deprecated on + 3/30/2024. + + + ### Usage Example + + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: 'The project''s name. ' + description: + type: optional + docs: The project's description. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: ticketing_v3.yml + RemoteData: + docs: >- + # The RemoteData Object + + ### Description + + The `RemoteData` object is used to represent the full data pulled from the + third-party API for an object. + + + ### Usage Example + + TODO + properties: + path: + type: string + docs: The third-party API path that is being called. + data: + type: optional + access: read-only + source: + openapi: ticketing_v3.yml + RemoteEndpointInfo: + properties: + method: string + url_path: string + field_traversal_path: list + source: + openapi: ticketing_v3.yml + RemoteFieldRemoteFieldClass: + discriminated: false + union: + - string + - RemoteFieldClass + source: + openapi: ticketing_v3.yml + inline: true + RemoteField: + properties: + remote_field_class: RemoteFieldRemoteFieldClass + value: optional + source: + openapi: ticketing_v3.yml + RemoteFieldApiCoverage: + discriminated: false + union: + - integer + - double + source: + openapi: ticketing_v3.yml + inline: true + RemoteFieldApi: + properties: + schema: map + remote_key_name: string + remote_endpoint_info: RemoteEndpointInfo + example_values: optional> + advanced_metadata: optional + coverage: + type: optional + access: read-only + source: + openapi: ticketing_v3.yml + RemoteFieldApiResponse: + properties: + Ticket: optional> + Comment: optional> + Project: optional> + Collection: optional> + User: optional> + Role: optional> + Account: optional> + Team: optional> + Attachment: optional> + Tag: optional> + Contact: optional> + source: + openapi: ticketing_v3.yml + RemoteFieldClassFieldChoicesItem: + properties: + value: optional + display_name: optional + source: + openapi: ticketing_v3.yml + inline: true + RemoteFieldClass: + properties: + id: optional + display_name: optional + remote_key_name: optional + description: optional + is_custom: optional + is_required: optional + field_type: optional + field_format: optional + field_choices: + type: optional> + access: read-only + item_schema: optional + source: + openapi: ticketing_v3.yml + RemoteFieldRequestRemoteFieldClass: + discriminated: false + union: + - type: string + validation: + format: uuid + - RemoteFieldClass + source: + openapi: ticketing_v3.yml + inline: true + RemoteFieldRequest: + properties: + remote_field_class: RemoteFieldRequestRemoteFieldClass + value: optional + source: + openapi: ticketing_v3.yml + RemoteKey: + docs: >- + # The RemoteKey Object + + ### Description + + The `RemoteKey` object is used to represent a request for a new remote + key. + + + ### Usage Example + + Post a `GenerateRemoteKey` to receive a new `RemoteKey`. + properties: + name: string + key: string + source: + openapi: ticketing_v3.yml + RemoteResponseResponseType: + discriminated: false + union: + - ResponseTypeEnum + - string + source: + openapi: ticketing_v3.yml + inline: true + RemoteResponse: + docs: >- + # The RemoteResponse Object + + ### Description + + The `RemoteResponse` object is used to represent information returned from + a third-party endpoint. + + + ### Usage Example + + View the `RemoteResponse` returned from your `DataPassthrough`. + properties: + method: string + path: string + status: integer + response: unknown + response_headers: optional> + response_type: optional + headers: optional> + source: + openapi: ticketing_v3.yml + RequestFormatEnum: + enum: + - JSON + - XML + - MULTIPART + docs: |- + * `JSON` - JSON + * `XML` - XML + * `MULTIPART` - MULTIPART + source: + openapi: ticketing_v3.yml + ResponseTypeEnum: + enum: + - JSON + - BASE64_GZIP + docs: |- + * `JSON` - JSON + * `BASE64_GZIP` - BASE64_GZIP + source: + openapi: ticketing_v3.yml + RoleTicketActionsItem: + discriminated: false + union: + - TicketActionsEnum + - string + source: + openapi: ticketing_v3.yml + inline: true + RoleTicketAccess: + discriminated: false + docs: |- + The level of Ticket access that a User with this Role can perform. + + * `ALL` - ALL + * `ASSIGNED_ONLY` - ASSIGNED_ONLY + * `TEAM_ONLY` - TEAM_ONLY + union: + - TicketAccessEnum + - string + source: + openapi: ticketing_v3.yml + inline: true + Role: + docs: >- + # The Role Object + + ### Description + + The `Role` object is used to represent the set of actions & access that a + user with this role is allowed to perform. + + + ### Usage Example + + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The name of the Role. + ticket_actions: + type: optional>> + docs: >- + The set of actions that a User with this Role can perform. Possible + enum values include: `VIEW`, `CREATE`, `EDIT`, `DELETE`, `CLOSE`, and + `ASSIGN`. + ticket_access: + type: optional + docs: |- + The level of Ticket access that a User with this Role can perform. + + * `ALL` - ALL + * `ASSIGNED_ONLY` - ASSIGNED_ONLY + * `TEAM_ONLY` - TEAM_ONLY + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: ticketing_v3.yml + RoleEnum: + enum: + - ADMIN + - DEVELOPER + - MEMBER + - API + - SYSTEM + - MERGE_TEAM + docs: |- + * `ADMIN` - ADMIN + * `DEVELOPER` - DEVELOPER + * `MEMBER` - MEMBER + * `API` - API + * `SYSTEM` - SYSTEM + * `MERGE_TEAM` - MERGE_TEAM + source: + openapi: ticketing_v3.yml + SelectiveSyncConfigurationsUsageEnum: + enum: + - IN_NEXT_SYNC + - IN_LAST_SYNC + docs: |- + * `IN_NEXT_SYNC` - IN_NEXT_SYNC + * `IN_LAST_SYNC` - IN_LAST_SYNC + source: + openapi: ticketing_v3.yml + StatusFd5Enum: + enum: + - SYNCING + - DONE + - FAILED + - DISABLED + - PAUSED + - PARTIALLY_SYNCED + docs: |- + * `SYNCING` - SYNCING + * `DONE` - DONE + * `FAILED` - FAILED + * `DISABLED` - DISABLED + * `PAUSED` - PAUSED + * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED + source: + openapi: ticketing_v3.yml + SyncStatusLastSyncResult: + discriminated: false + union: + - LastSyncResultEnum + - string + source: + openapi: ticketing_v3.yml + inline: true + SyncStatusStatus: + discriminated: false + union: + - StatusFd5Enum + - string + source: + openapi: ticketing_v3.yml + inline: true + SyncStatus: + docs: >- + # The SyncStatus Object + + ### Description + + The `SyncStatus` object is used to represent the syncing state of an + account + + + ### Usage Example + + View the `SyncStatus` for an account to see how recently its models were + synced. + properties: + model_name: string + model_id: string + last_sync_start: optional + next_sync_start: optional + last_sync_result: optional + last_sync_finished: optional + status: SyncStatusStatus + is_initial_sync: boolean + selective_sync_configurations_usage: optional + source: + openapi: ticketing_v3.yml + Tag: + docs: |- + # The Tag Object + ### Description + The `Tag` object is used to represent a tag or label for a ticket. + + ### Usage Example + TODO + properties: + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + id: + type: optional + validation: + format: uuid + access: read-only + name: + type: optional + docs: The tag's name. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: ticketing_v3.yml + Team: + docs: >- + # The Team Object + + ### Description + + The `Team` object is used to represent one or more `Users` within the + company receiving the ticket. + + + ### Usage Example + + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The team's name. + description: + type: optional + docs: The team's description. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: ticketing_v3.yml + TicketAssigneesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - User + source: + openapi: ticketing_v3.yml + inline: true + TicketAssignedTeamsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Team + source: + openapi: ticketing_v3.yml + inline: true + TicketCreator: + discriminated: false + docs: The user who created this ticket. + union: + - type: string + validation: + format: uuid + - User + source: + openapi: ticketing_v3.yml + inline: true + TicketStatus: + discriminated: false + docs: |- + The current status of the ticket. + + * `OPEN` - OPEN + * `CLOSED` - CLOSED + * `IN_PROGRESS` - IN_PROGRESS + * `ON_HOLD` - ON_HOLD + union: + - TicketStatusEnum + - string + source: + openapi: ticketing_v3.yml + inline: true + TicketCollectionsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Collection + source: + openapi: ticketing_v3.yml + inline: true + TicketAccount: + discriminated: false + docs: The account associated with the ticket. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: ticketing_v3.yml + inline: true + TicketContact: + discriminated: false + docs: The contact associated with the ticket. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: ticketing_v3.yml + inline: true + TicketParentTicket: + discriminated: false + docs: The ticket's parent ticket. + union: + - type: string + validation: + format: uuid + - Ticket + source: + openapi: ticketing_v3.yml + inline: true + TicketAttachmentsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Attachment + source: + openapi: ticketing_v3.yml + inline: true + TicketAccessLevel: + discriminated: false + docs: >- + The description of who is able to access a given ticket, or where access + is inherited from. + + + * `COMPANY` - COMPANY + + * `PUBLIC` - PUBLIC + + * `PRIVATE` - PRIVATE + + * `COLLECTION` - COLLECTION + union: + - TicketAccessLevelEnum + - string + source: + openapi: ticketing_v3.yml + inline: true + TicketPriority: + discriminated: false + docs: |- + The priority or urgency of the Ticket. + + * `URGENT` - URGENT + * `HIGH` - HIGH + * `NORMAL` - NORMAL + * `LOW` - LOW + union: + - PriorityEnum + - string + source: + openapi: ticketing_v3.yml + inline: true + Ticket: + docs: |- + # The Ticket Object + ### Description + The `Ticket` object is used to represent a ticket, issue, task or case. + ### Usage Example + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The ticket's name. + assignees: + type: optional>> + docs: >- + The individual `Users` who are assigned to this ticket. This does not + include `Users` who just have view access to this ticket. To fetch all + `Users` and `Teams` that can access the ticket, use the `GET + /tickets/{ticket_id}/viewers` + [endpoint](https://docs.merge.dev/ticketing/tickets/#tickets_viewers_list). + assigned_teams: + type: optional>> + docs: >- + The `Teams` that are assigned to this ticket. This does not include + `Teams` who just have view access to this ticket. To fetch all `Users` + and `Teams` that can access this ticket, use the `GET + /tickets/{ticket_id}/viewers` + [endpoint](https://docs.merge.dev/ticketing/tickets/#tickets_viewers_list). + creator: + type: optional + docs: The user who created this ticket. + due_date: + type: optional + docs: The ticket's due date. + status: + type: optional + docs: |- + The current status of the ticket. + + * `OPEN` - OPEN + * `CLOSED` - CLOSED + * `IN_PROGRESS` - IN_PROGRESS + * `ON_HOLD` - ON_HOLD + description: + type: optional + docs: >- + The ticket’s description. HTML version of description is mapped if + supported by the third-party platform. + collections: + type: optional>> + docs: The `Collections` that this `Ticket` is included in. + ticket_type: + type: optional + docs: >- + The sub category of the ticket within the 3rd party system. Examples + include incident, task, subtask or to-do. + account: + type: optional + docs: The account associated with the ticket. + contact: + type: optional + docs: The contact associated with the ticket. + parent_ticket: + type: optional + docs: The ticket's parent ticket. + attachments: optional>> + access_level: + type: optional + docs: >- + The description of who is able to access a given ticket, or where + access is inherited from. + + + * `COMPANY` - COMPANY + + * `PUBLIC` - PUBLIC + + * `PRIVATE` - PRIVATE + + * `COLLECTION` - COLLECTION + tags: optional>> + roles: optional>> + ticket_url: + type: optional + docs: The 3rd party url of the Ticket. + validation: + format: uri + maxLength: 2000 + priority: + type: optional + docs: |- + The priority or urgency of the Ticket. + + * `URGENT` - URGENT + * `HIGH` - HIGH + * `NORMAL` - NORMAL + * `LOW` - LOW + remote_created_at: + type: optional + docs: When the third party's ticket was created. + remote_updated_at: + type: optional + docs: When the third party's ticket was updated. + completed_at: + type: optional + docs: When the ticket was completed. + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + remote_fields: + type: optional> + access: read-only + source: + openapi: ticketing_v3.yml + TicketAccessEnum: + enum: + - ALL + - ASSIGNED_ONLY + - TEAM_ONLY + docs: |- + * `ALL` - ALL + * `ASSIGNED_ONLY` - ASSIGNED_ONLY + * `TEAM_ONLY` - TEAM_ONLY + source: + openapi: ticketing_v3.yml + TicketAccessLevelEnum: + enum: + - COMPANY + - PUBLIC + - PRIVATE + - COLLECTION + docs: |- + * `COMPANY` - COMPANY + * `PUBLIC` - PUBLIC + * `PRIVATE` - PRIVATE + * `COLLECTION` - COLLECTION + source: + openapi: ticketing_v3.yml + TicketActionsEnum: + enum: + - VIEW + - CREATE + - EDIT + - DELETE + - CLOSE + - ASSIGN + docs: |- + * `VIEW` - VIEW + * `CREATE` - CREATE + * `EDIT` - EDIT + * `DELETE` - DELETE + * `CLOSE` - CLOSE + * `ASSIGN` - ASSIGN + source: + openapi: ticketing_v3.yml + TicketRequestAssigneesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - User + source: + openapi: ticketing_v3.yml + inline: true + TicketRequestAssignedTeamsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Team + source: + openapi: ticketing_v3.yml + inline: true + TicketRequestCreator: + discriminated: false + docs: The user who created this ticket. + union: + - type: string + validation: + format: uuid + - User + source: + openapi: ticketing_v3.yml + inline: true + TicketRequestStatus: + discriminated: false + docs: |- + The current status of the ticket. + + * `OPEN` - OPEN + * `CLOSED` - CLOSED + * `IN_PROGRESS` - IN_PROGRESS + * `ON_HOLD` - ON_HOLD + union: + - TicketStatusEnum + - string + source: + openapi: ticketing_v3.yml + inline: true + TicketRequestCollectionsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Collection + source: + openapi: ticketing_v3.yml + inline: true + TicketRequestAccount: + discriminated: false + docs: The account associated with the ticket. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: ticketing_v3.yml + inline: true + TicketRequestContact: + discriminated: false + docs: The contact associated with the ticket. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: ticketing_v3.yml + inline: true + TicketRequestParentTicket: + discriminated: false + docs: The ticket's parent ticket. + union: + - type: string + validation: + format: uuid + - Ticket + source: + openapi: ticketing_v3.yml + inline: true + TicketRequestAttachmentsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Attachment + source: + openapi: ticketing_v3.yml + inline: true + TicketRequestAccessLevel: + discriminated: false + docs: >- + The description of who is able to access a given ticket, or where access + is inherited from. + + + * `COMPANY` - COMPANY + + * `PUBLIC` - PUBLIC + + * `PRIVATE` - PRIVATE + + * `COLLECTION` - COLLECTION + union: + - TicketAccessLevelEnum + - string + source: + openapi: ticketing_v3.yml + inline: true + TicketRequestPriority: + discriminated: false + docs: |- + The priority or urgency of the Ticket. + + * `URGENT` - URGENT + * `HIGH` - HIGH + * `NORMAL` - NORMAL + * `LOW` - LOW + union: + - PriorityEnum + - string + source: + openapi: ticketing_v3.yml + inline: true + TicketRequest: + docs: |- + # The Ticket Object + ### Description + The `Ticket` object is used to represent a ticket, issue, task or case. + ### Usage Example + TODO + properties: + name: + type: optional + docs: The ticket's name. + assignees: + type: optional>> + docs: >- + The individual `Users` who are assigned to this ticket. This does not + include `Users` who just have view access to this ticket. To fetch all + `Users` and `Teams` that can access the ticket, use the `GET + /tickets/{ticket_id}/viewers` + [endpoint](https://docs.merge.dev/ticketing/tickets/#tickets_viewers_list). + assigned_teams: + type: optional>> + docs: >- + The `Teams` that are assigned to this ticket. This does not include + `Teams` who just have view access to this ticket. To fetch all `Users` + and `Teams` that can access this ticket, use the `GET + /tickets/{ticket_id}/viewers` + [endpoint](https://docs.merge.dev/ticketing/tickets/#tickets_viewers_list). + creator: + type: optional + docs: The user who created this ticket. + due_date: + type: optional + docs: The ticket's due date. + status: + type: optional + docs: |- + The current status of the ticket. + + * `OPEN` - OPEN + * `CLOSED` - CLOSED + * `IN_PROGRESS` - IN_PROGRESS + * `ON_HOLD` - ON_HOLD + description: + type: optional + docs: >- + The ticket’s description. HTML version of description is mapped if + supported by the third-party platform. + collections: + type: optional>> + docs: The `Collections` that this `Ticket` is included in. + ticket_type: + type: optional + docs: >- + The sub category of the ticket within the 3rd party system. Examples + include incident, task, subtask or to-do. + account: + type: optional + docs: The account associated with the ticket. + contact: + type: optional + docs: The contact associated with the ticket. + parent_ticket: + type: optional + docs: The ticket's parent ticket. + attachments: optional>> + access_level: + type: optional + docs: >- + The description of who is able to access a given ticket, or where + access is inherited from. + + + * `COMPANY` - COMPANY + + * `PUBLIC` - PUBLIC + + * `PRIVATE` - PRIVATE + + * `COLLECTION` - COLLECTION + tags: optional>> + roles: optional>> + completed_at: + type: optional + docs: When the ticket was completed. + ticket_url: + type: optional + docs: The 3rd party url of the Ticket. + validation: + format: uri + maxLength: 2000 + priority: + type: optional + docs: |- + The priority or urgency of the Ticket. + + * `URGENT` - URGENT + * `HIGH` - HIGH + * `NORMAL` - NORMAL + * `LOW` - LOW + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: ticketing_v3.yml + TicketResponse: + properties: + model: Ticket + warnings: list + errors: list + logs: optional> + source: + openapi: ticketing_v3.yml + TicketStatusEnum: + enum: + - OPEN + - CLOSED + - IN_PROGRESS + - ON_HOLD + docs: |- + * `OPEN` - OPEN + * `CLOSED` - CLOSED + * `IN_PROGRESS` - IN_PROGRESS + * `ON_HOLD` - ON_HOLD + source: + openapi: ticketing_v3.yml + TicketingAttachmentResponse: + properties: + model: Attachment + warnings: list + errors: list + logs: optional> + source: + openapi: ticketing_v3.yml + TicketingContactResponse: + properties: + model: Contact + warnings: list + errors: list + logs: optional> + source: + openapi: ticketing_v3.yml + UserTeamsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Team + source: + openapi: ticketing_v3.yml + inline: true + UserRolesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Role + source: + openapi: ticketing_v3.yml + inline: true + User: + docs: >- + # The User Object + + ### Description + + The `User` object is used to represent a user with a login to the + ticketing system. + + Users are either assignees who are directly responsible or a viewer on a + `Ticket`/ `Collection`. + + + ### Usage Example + + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The user's name. + email_address: + type: optional + docs: The user's email address. + is_active: + type: optional + docs: Whether or not the user is active. + teams: optional>> + roles: optional>> + avatar: + type: optional + docs: The user's avatar picture. + remote_was_deleted: + type: optional + docs: >- + 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/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: ticketing_v3.yml + ValidationProblemSource: + properties: + pointer: string + source: + openapi: ticketing_v3.yml + ViewerTeam: + discriminated: false + docs: The Team this Viewer belongs to. + union: + - type: string + validation: + format: uuid + - Team + source: + openapi: ticketing_v3.yml + inline: true + ViewerUser: + discriminated: false + docs: The User this Viewer belongs to. + union: + - type: string + validation: + format: uuid + - User + source: + openapi: ticketing_v3.yml + inline: true + Viewer: + docs: |- + # The Viewer Object + ### Description + The `Viewer` object is used to represent a User or Team within a company. + + ### Usage Example + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + team: + type: optional + docs: The Team this Viewer belongs to. + user: + type: optional + docs: The User this Viewer belongs to. + source: + openapi: ticketing_v3.yml + WarningValidationProblem: + properties: + source: optional + title: string + detail: string + problem_type: string + source: + openapi: ticketing_v3.yml + WebhookReceiver: + properties: + event: string + is_active: boolean + key: optional + source: + openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/accountDetails.yml b/.mock/definition/Ticketing/accountDetails.yml new file mode 100644 index 000000000..48a7a292e --- /dev/null +++ b/.mock/definition/Ticketing/accountDetails.yml @@ -0,0 +1,36 @@ +imports: + ticketingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + retrieve: + path: /ticketing/v1/account-details + method: GET + auth: true + docs: Get details for a linked account. + source: + openapi: ticketing_v3.yml + response: + docs: '' + type: ticketingRoot.AccountDetails + status-code: 200 + examples: + - headers: {} + response: + body: + id: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd + integration: BambooHR + integration_slug: bamboohr + category: hris + end_user_origin_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + end_user_organization_name: Waystar Royco + end_user_email_address: kendall.roy@waystar-royco.com + status: COMPLETE + webhook_listener_url: >- + https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 + is_duplicate: true + account_type: PRODUCTION + completed_at: '2024-08-26T20:11:19Z' + source: + openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/accountToken.yml b/.mock/definition/Ticketing/accountToken.yml new file mode 100644 index 000000000..8bf457237 --- /dev/null +++ b/.mock/definition/Ticketing/accountToken.yml @@ -0,0 +1,44 @@ +imports: + ticketingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + retrieve: + path: /ticketing/v1/account-token/{public_token} + method: GET + auth: true + docs: >- + Returns the account token for the end user with the provided public + token. + source: + openapi: ticketing_v3.yml + path-parameters: + public_token: string + response: + docs: '' + type: ticketingRoot.AccountToken + status-code: 200 + examples: + - path-parameters: + public_token: public_token + response: + body: + account_token: T9klMDQrcHdm9jrtHuOS2Nf06BIHwMNjpPXPMB + integration: + name: name + abbreviated_name: abbreviated_name + categories: + - hris + image: image + square_image: square_image + color: color + slug: slug + api_endpoints_to_documentation_urls: + key: value + webhook_setup_guide_url: webhook_setup_guide_url + category_beta_status: + key: value + id: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd + source: + openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/accounts.yml b/.mock/definition/Ticketing/accounts.yml new file mode 100644 index 000000000..cfcde4a43 --- /dev/null +++ b/.mock/definition/Ticketing/accounts.yml @@ -0,0 +1,146 @@ +imports: + ticketingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ticketing/v1/accounts + method: GET + auth: true + docs: Returns a list of `Account` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: ticketing_v3.yml + request: + name: AccountsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: ticketingRoot.PaginatedAccountList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 17a54124-287f-494d-965e-3c5b330c9a68 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Waystar Royco + domains: + - waystar-royco.com + - royco.com + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + retrieve: + path: /ticketing/v1/accounts/{id} + method: GET + auth: true + docs: Returns an `Account` object with the given `id`. + source: + openapi: ticketing_v3.yml + path-parameters: + id: string + request: + name: AccountsRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: ticketingRoot.Account + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 17a54124-287f-494d-965e-3c5b330c9a68 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Waystar Royco + domains: + - waystar-royco.com + - royco.com + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + source: + openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/asyncPassthrough.yml b/.mock/definition/Ticketing/asyncPassthrough.yml new file mode 100644 index 000000000..bf2a6d707 --- /dev/null +++ b/.mock/definition/Ticketing/asyncPassthrough.yml @@ -0,0 +1,70 @@ +imports: + ticketingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /ticketing/v1/async-passthrough + method: POST + auth: true + docs: >- + Asynchronously pull data from an endpoint not currently supported by + Merge. + source: + openapi: ticketing_v3.yml + request: + body: ticketingRoot.DataPassthroughRequest + content-type: application/json + response: + docs: '' + type: ticketingRoot.AsyncPassthroughReciept + status-code: 200 + examples: + - headers: {} + request: + method: GET + path: /scooters + response: + body: + async_passthrough_receipt_id: fd29020f-2695-445e-922e-dcd5e81903fd + retrieve: + path: /ticketing/v1/async-passthrough/{async_passthrough_receipt_id} + method: GET + auth: true + docs: Retrieves data from earlier async-passthrough POST request + source: + openapi: ticketing_v3.yml + path-parameters: + async_passthrough_receipt_id: string + response: + docs: '' + type: AsyncPassthroughRetrieveResponse + status-code: 200 + examples: + - path-parameters: + async_passthrough_receipt_id: async_passthrough_receipt_id + headers: {} + response: + body: + method: GET + path: /scooters + status: 200 + response: + key: value + response_headers: + X-Page-Token: value + response_type: JSON + headers: + EXTRA-HEADER: value + Authorization: + source: + openapi: ticketing_v3.yml +types: + AsyncPassthroughRetrieveResponse: + discriminated: false + union: + - ticketingRoot.RemoteResponse + - string + source: + openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/attachments.yml b/.mock/definition/Ticketing/attachments.yml new file mode 100644 index 000000000..dff8552a1 --- /dev/null +++ b/.mock/definition/Ticketing/attachments.yml @@ -0,0 +1,452 @@ +imports: + ticketingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ticketing/v1/attachments + method: GET + auth: true + docs: Returns a list of `Attachment` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: ticketing_v3.yml + request: + name: AttachmentsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional> + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_created_after: + type: optional + docs: >- + If provided, will only return attachments created in the third + party platform after this datetime. + remote_id: + type: optional + docs: The API provider's ID for the given object. + ticket_id: + type: optional + docs: If provided, will only return comments for this ticket. + response: + docs: '' + type: ticketingRoot.PaginatedAttachmentList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 17a54124-287f-494d-965e-3c5b330c9a68 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + file_name: Screenshot.png + ticket: ticket + file_url: http://alturl.com/p749b + content_type: jpeg + uploaded_by: 28b54125-287f-494d-965e-3c5b330c9a68 + remote_created_at: '2022-11-10T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + create: + path: /ticketing/v1/attachments + method: POST + auth: true + docs: Creates an `Attachment` object with the given values. + source: + openapi: ticketing_v3.yml + request: + name: TicketingAttachmentEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: ticketingRoot.AttachmentRequest + content-type: application/json + response: + docs: '' + type: ticketingRoot.TicketingAttachmentResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: 17a54124-287f-494d-965e-3c5b330c9a68 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + file_name: Screenshot.png + ticket: ticket + file_url: http://alturl.com/p749b + content_type: jpeg + uploaded_by: 28b54125-287f-494d-965e-3c5b330c9a68 + remote_created_at: '2022-11-10T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /ticketing/v1/attachments/{id} + method: GET + auth: true + docs: Returns an `Attachment` object with the given `id`. + source: + openapi: ticketing_v3.yml + path-parameters: + id: string + request: + name: AttachmentsRetrieveRequest + query-parameters: + expand: + type: optional> + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: ticketingRoot.Attachment + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 17a54124-287f-494d-965e-3c5b330c9a68 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + file_name: Screenshot.png + ticket: ticket + file_url: http://alturl.com/p749b + content_type: jpeg + uploaded_by: 28b54125-287f-494d-965e-3c5b330c9a68 + remote_created_at: '2022-11-10T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + data: + key: value + downloadRetrieve: + path: /ticketing/v1/attachments/{id}/download + method: GET + auth: true + docs: Returns the `File` content with the given `id` as a stream of bytes. + source: + openapi: ticketing_v3.yml + path-parameters: + id: string + request: + name: AttachmentsDownloadRetrieveRequest + query-parameters: + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + mime_type: + type: optional + docs: >- + If provided, specifies the export format of the file to be + downloaded. For information on supported export formats, please + refer to our export format help center article. + response: + docs: '' + type: file + status-code: 200 + metaPostRetrieve: + path: /ticketing/v1/attachments/meta/post + method: GET + auth: true + docs: Returns metadata for `TicketingAttachment` POSTs. + source: + openapi: ticketing_v3.yml + response: + docs: '' + type: ticketingRoot.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + source: + openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/auditTrail.yml b/.mock/definition/Ticketing/auditTrail.yml new file mode 100644 index 000000000..0c68bdad0 --- /dev/null +++ b/.mock/definition/Ticketing/auditTrail.yml @@ -0,0 +1,98 @@ +imports: + ticketingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ticketing/v1/audit-trail + method: GET + auth: true + docs: Gets a list of audit trail events. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: ticketing_v3.yml + request: + name: AuditTrailListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + end_date: + type: optional + docs: >- + If included, will only include audit trail events that occurred + before this time + event_type: + type: optional + docs: >- + 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: + type: optional + docs: Number of results to return per page. + start_date: + type: optional + docs: >- + If included, will only include audit trail events that occurred + after this time + user_email: + type: optional + docs: >- + 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. + response: + docs: '' + type: ticketingRoot.PaginatedAuditLogEventList + status-code: 200 + examples: + - response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: b5ceea2a-7171-47ce-8090-165cfce5572c + user_name: Gil Feig + user_email: hello@merge.dev + role: ADMIN + ip_address: 192.0.2.123 + event_type: CREATED_REMOTE_PRODUCTION_API_KEY + event_description: >- + Organization-wide Scopes for model hris.Employee updated + from Read to Read+Write + created_at: '2024-01-15T09:30:00Z' + source: + openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/availableActions.yml b/.mock/definition/Ticketing/availableActions.yml new file mode 100644 index 000000000..bfca9de50 --- /dev/null +++ b/.mock/definition/Ticketing/availableActions.yml @@ -0,0 +1,50 @@ +imports: + ticketingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + retrieve: + path: /ticketing/v1/available-actions + method: GET + auth: true + docs: Returns a list of models and actions available for an account. + source: + openapi: ticketing_v3.yml + response: + docs: '' + type: ticketingRoot.AvailableActions + status-code: 200 + examples: + - headers: {} + response: + body: + integration: + name: name + abbreviated_name: abbreviated_name + categories: + - hris + image: image + square_image: square_image + color: color + slug: slug + api_endpoints_to_documentation_urls: + key: value + webhook_setup_guide_url: webhook_setup_guide_url + category_beta_status: + key: value + passthrough_available: true + available_model_operations: + - model_name: Candidate + available_operations: + - FETCH + - CREATE + required_post_parameters: + - remote_user_id + supported_fields: + - first_name + - last_name + - company + - title + source: + openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/collections.yml b/.mock/definition/Ticketing/collections.yml new file mode 100644 index 000000000..8e47ee014 --- /dev/null +++ b/.mock/definition/Ticketing/collections.yml @@ -0,0 +1,262 @@ +imports: + ticketingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ticketing/v1/collections + method: GET + auth: true + docs: Returns a list of `Collection` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: ticketing_v3.yml + request: + name: CollectionsListRequest + query-parameters: + collection_type: + type: optional + docs: If provided, will only return collections of the given type. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional> + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + parent_collection_id: + type: optional + docs: >- + If provided, will only return collections whose parent collection + matches the given id. + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: ticketingRoot.PaginatedCollectionList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: fb8c55b6-1cb8-4b4c-9fb6-17924231619d + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Q1 Platform + description: For tracking all tasks related to Platform for Q1 + access_level: PRIVATE + collection_type: LIST + parent_collection: parent_collection + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + viewersList: + path: /ticketing/v1/collections/{collection_id}/viewers + method: GET + auth: true + docs: >- + Returns a list of `Viewer` objects that point to a User id or Team id + that is either an assignee or viewer on a `Collection` with the given + id. [Learn + more.](https://help.merge.dev/en/articles/10333658-ticketing-access-control-list-acls) + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: ticketing_v3.yml + path-parameters: + collection_id: string + request: + name: CollectionsViewersListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: ticketingRoot.PaginatedViewerList + status-code: 200 + examples: + - path-parameters: + collection_id: collection_id + headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 17a54124-287f-494d-965e-3c5b330c9a68 + remote_id: '088899' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + team: team + user: user + retrieve: + path: /ticketing/v1/collections/{id} + method: GET + auth: true + docs: Returns a `Collection` object with the given `id`. + source: + openapi: ticketing_v3.yml + path-parameters: + id: string + request: + name: CollectionsRetrieveRequest + query-parameters: + expand: + type: optional> + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: ticketingRoot.Collection + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: fb8c55b6-1cb8-4b4c-9fb6-17924231619d + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Q1 Platform + description: For tracking all tasks related to Platform for Q1 + access_level: PRIVATE + collection_type: LIST + parent_collection: parent_collection + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + data: + key: value + source: + openapi: ticketing_v3.yml +types: + CollectionsViewersListRequestExpandItem: + enum: + - team + - user + source: + openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/comments.yml b/.mock/definition/Ticketing/comments.yml new file mode 100644 index 000000000..cecddc38a --- /dev/null +++ b/.mock/definition/Ticketing/comments.yml @@ -0,0 +1,451 @@ +types: + CommentsListRequestExpandItem: + enum: + - contact + - ticket + - user + source: + openapi: ticketing_v3.yml + CommentsRetrieveRequestExpandItem: + enum: + - contact + - ticket + - user + source: + openapi: ticketing_v3.yml +imports: + ticketingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ticketing/v1/comments + method: GET + auth: true + docs: Returns a list of `Comment` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: ticketing_v3.yml + request: + name: CommentsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_created_after: + type: optional + docs: >- + If provided, will only return Comments created in the third party + platform after this datetime. + remote_id: + type: optional + docs: The API provider's ID for the given object. + ticket_id: + type: optional + docs: If provided, will only return comments for this ticket. + response: + docs: '' + type: ticketingRoot.PaginatedCommentList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 0958cbc6-6040-430a-848e-aafacbadf4ae + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + user: user + contact: contact + body: >- + When will these integrations be done? You all should use + Merge. + html_body: >- + When will these integrations be done? You all should use + Merge. + ticket: ticket + is_private: true + remote_created_at: '1990-11-10T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + create: + path: /ticketing/v1/comments + method: POST + auth: true + docs: Creates a `Comment` object with the given values. + source: + openapi: ticketing_v3.yml + request: + name: CommentEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: ticketingRoot.CommentRequest + content-type: application/json + response: + docs: '' + type: ticketingRoot.CommentResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: 0958cbc6-6040-430a-848e-aafacbadf4ae + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + user: user + contact: contact + body: >- + When will these integrations be done? You all should use + Merge. + html_body: >- + When will these integrations be done? You all should use + Merge. + ticket: ticket + is_private: true + remote_created_at: '1990-11-10T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /ticketing/v1/comments/{id} + method: GET + auth: true + docs: Returns a `Comment` object with the given `id`. + source: + openapi: ticketing_v3.yml + path-parameters: + id: string + request: + name: CommentsRetrieveRequest + query-parameters: + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: ticketingRoot.Comment + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 0958cbc6-6040-430a-848e-aafacbadf4ae + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + user: user + contact: contact + body: When will these integrations be done? You all should use Merge. + html_body: >- + When will these integrations be done? You all should use + Merge. + ticket: ticket + is_private: true + remote_created_at: '1990-11-10T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + data: + key: value + metaPostRetrieve: + path: /ticketing/v1/comments/meta/post + method: GET + auth: true + docs: Returns metadata for `Comment` POSTs. + source: + openapi: ticketing_v3.yml + response: + docs: '' + type: ticketingRoot.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + source: + openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/contacts.yml b/.mock/definition/Ticketing/contacts.yml new file mode 100644 index 000000000..e0fd3ff7e --- /dev/null +++ b/.mock/definition/Ticketing/contacts.yml @@ -0,0 +1,412 @@ +imports: + ticketingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ticketing/v1/contacts + method: GET + auth: true + docs: Returns a list of `Contact` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: ticketing_v3.yml + request: + name: ContactsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional> + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: ticketingRoot.PaginatedContactList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 17a54124-287f-494d-965e-3c5b330c9a68 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Cousin Greg + email_address: greg@waystar-royco.com + phone_number: '5108890293' + details: Executive Assistant to Tom Wambsgans + account: account + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + create: + path: /ticketing/v1/contacts + method: POST + auth: true + docs: Creates a `Contact` object with the given values. + source: + openapi: ticketing_v3.yml + request: + name: TicketingContactEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: ticketingRoot.ContactRequest + content-type: application/json + response: + docs: '' + type: ticketingRoot.TicketingContactResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: 17a54124-287f-494d-965e-3c5b330c9a68 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Cousin Greg + email_address: greg@waystar-royco.com + phone_number: '5108890293' + details: Executive Assistant to Tom Wambsgans + account: account + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /ticketing/v1/contacts/{id} + method: GET + auth: true + docs: Returns a `Contact` object with the given `id`. + source: + openapi: ticketing_v3.yml + path-parameters: + id: string + request: + name: ContactsRetrieveRequest + query-parameters: + expand: + type: optional> + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: ticketingRoot.Contact + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 17a54124-287f-494d-965e-3c5b330c9a68 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Cousin Greg + email_address: greg@waystar-royco.com + phone_number: '5108890293' + details: Executive Assistant to Tom Wambsgans + account: account + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + data: + key: value + metaPostRetrieve: + path: /ticketing/v1/contacts/meta/post + method: GET + auth: true + docs: Returns metadata for `TicketingContact` POSTs. + source: + openapi: ticketing_v3.yml + response: + docs: '' + type: ticketingRoot.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + source: + openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/deleteAccount.yml b/.mock/definition/Ticketing/deleteAccount.yml new file mode 100644 index 000000000..42a1724a9 --- /dev/null +++ b/.mock/definition/Ticketing/deleteAccount.yml @@ -0,0 +1,15 @@ +service: + auth: false + base-path: '' + endpoints: + delete: + path: /ticketing/v1/delete-account + method: POST + auth: true + docs: Delete a linked account. + source: + openapi: ticketing_v3.yml + examples: + - headers: {} + source: + openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/fieldMapping.yml b/.mock/definition/Ticketing/fieldMapping.yml new file mode 100644 index 000000000..f62911c5e --- /dev/null +++ b/.mock/definition/Ticketing/fieldMapping.yml @@ -0,0 +1,722 @@ +imports: + ticketingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + field_mappings_retrieve: + path: /ticketing/v1/field-mappings + method: GET + auth: true + docs: >- + 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/). + source: + openapi: ticketing_v3.yml + request: + name: FieldMappingsRetrieveRequest + query-parameters: + exclude_remote_field_metadata: + type: optional + docs: >- + 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. + response: + docs: '' + type: ticketingRoot.FieldMappingApiInstanceResponse + status-code: 200 + examples: + - headers: {} + response: + body: + Ticket: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Comment: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Project: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Collection: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + User: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Role: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Account: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Team: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Attachment: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Tag: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Contact: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + field_mappings_create: + path: /ticketing/v1/field-mappings + method: POST + auth: true + docs: >- + 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. + source: + openapi: ticketing_v3.yml + request: + name: CreateFieldMappingRequest + query-parameters: + exclude_remote_field_metadata: + type: optional + docs: >- + 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. + body: + properties: + target_field_name: + type: string + docs: >- + The name of the target field you want this remote field to map + to. + validation: + minLength: 1 + target_field_description: + type: string + docs: >- + The description of the target field you want this remote field + to map to. + validation: + minLength: 1 + remote_field_traversal_path: + docs: >- + The field traversal path of the remote field listed when you hit + the GET /remote-fields endpoint. + type: list + remote_method: + type: string + docs: >- + The method of the remote endpoint where the remote field is + coming from. + validation: + minLength: 1 + remote_url_path: + type: string + docs: >- + The path of the remote endpoint where the remote field is coming + from. + validation: + minLength: 1 + common_model_name: + type: string + docs: >- + The name of the Common Model that the remote field corresponds + to in a given category. + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: ticketingRoot.FieldMappingInstanceResponse + status-code: 201 + examples: + - headers: {} + request: + 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 + response: + body: + model: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + field_mappings_destroy: + path: /ticketing/v1/field-mappings/{field_mapping_id} + method: DELETE + auth: true + docs: >- + 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. + source: + openapi: ticketing_v3.yml + path-parameters: + field_mapping_id: string + response: + docs: '' + type: ticketingRoot.FieldMappingInstanceResponse + status-code: 204 + examples: + - path-parameters: + field_mapping_id: field_mapping_id + headers: {} + response: + body: + model: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + field_mappings_partial_update: + path: /ticketing/v1/field-mappings/{field_mapping_id} + method: PATCH + auth: true + docs: >- + 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. + source: + openapi: ticketing_v3.yml + path-parameters: + field_mapping_id: string + request: + name: PatchedEditFieldMappingRequest + body: + properties: + remote_field_traversal_path: + type: optional> + docs: >- + The field traversal path of the remote field listed when you hit + the GET /remote-fields endpoint. + remote_method: + type: optional + docs: >- + The method of the remote endpoint where the remote field is + coming from. + validation: + minLength: 1 + remote_url_path: + type: optional + docs: >- + The path of the remote endpoint where the remote field is coming + from. + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: ticketingRoot.FieldMappingInstanceResponse + status-code: 200 + examples: + - path-parameters: + field_mapping_id: field_mapping_id + headers: {} + request: {} + response: + body: + model: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + remote_fields_retrieve: + path: /ticketing/v1/remote-fields + method: GET + auth: true + docs: >- + 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/). + source: + openapi: ticketing_v3.yml + request: + name: RemoteFieldsRetrieveRequest + query-parameters: + common_models: + type: optional + docs: >- + A comma seperated list of Common Model names. If included, will + only return Remote Fields for those Common Models. + include_example_values: + type: optional + docs: >- + 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. + response: + docs: '' + type: ticketingRoot.RemoteFieldApiResponse + status-code: 200 + examples: + - headers: {} + response: + body: + Ticket: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Comment: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Project: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Collection: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + User: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Role: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Account: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Team: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Attachment: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Tag: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Contact: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + target_fields_retrieve: + path: /ticketing/v1/target-fields + method: GET + auth: true + docs: >- + 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/). + source: + openapi: ticketing_v3.yml + response: + docs: '' + type: ticketingRoot.ExternalTargetFieldApiResponse + status-code: 200 + examples: + - headers: {} + response: + body: + Ticket: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Comment: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Project: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Collection: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + User: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Role: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Account: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Team: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Attachment: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Tag: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Contact: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + source: + openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/forceResync.yml b/.mock/definition/Ticketing/forceResync.yml new file mode 100644 index 000000000..cd2b747a2 --- /dev/null +++ b/.mock/definition/Ticketing/forceResync.yml @@ -0,0 +1,37 @@ +imports: + ticketingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + sync_status_resync_create: + path: /ticketing/v1/sync-status/resync + method: POST + auth: true + docs: >- + 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. + source: + openapi: ticketing_v3.yml + response: + docs: '' + type: list + status-code: 200 + examples: + - headers: {} + response: + body: + - model_name: Ticket + model_id: ticketing.Ticket + last_sync_start: '2021-03-30T19:44:18Z' + next_sync_start: '2021-03-30T20:44:18Z' + last_sync_result: SYNCING + last_sync_finished: '2021-03-30T19:55:18Z' + status: SYNCING + is_initial_sync: true + selective_sync_configurations_usage: IN_NEXT_SYNC + source: + openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/generateKey.yml b/.mock/definition/Ticketing/generateKey.yml new file mode 100644 index 000000000..713f090d0 --- /dev/null +++ b/.mock/definition/Ticketing/generateKey.yml @@ -0,0 +1,36 @@ +imports: + ticketingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /ticketing/v1/generate-key + method: POST + auth: true + docs: Create a remote key. + source: + openapi: ticketing_v3.yml + request: + name: GenerateRemoteKeyRequest + body: + properties: + name: + type: string + docs: The name of the remote key + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: ticketingRoot.RemoteKey + status-code: 200 + examples: + - request: + name: Remote Deployment Key 1 + response: + body: + name: Remote Deployment Key 1 + key: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA + source: + openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/issues.yml b/.mock/definition/Ticketing/issues.yml new file mode 100644 index 000000000..f96e91009 --- /dev/null +++ b/.mock/definition/Ticketing/issues.yml @@ -0,0 +1,133 @@ +types: + IssuesListRequestStatus: + enum: + - ONGOING + - RESOLVED + source: + openapi: ticketing_v3.yml +imports: + ticketingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ticketing/v1/issues + method: GET + auth: true + docs: Gets all issues for Organization. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: ticketing_v3.yml + request: + name: IssuesListRequest + query-parameters: + account_token: optional + cursor: + type: optional + docs: The pagination cursor value. + end_date: + type: optional + docs: >- + If included, will only include issues whose most recent action + occurred before this time + end_user_organization_name: optional + first_incident_time_after: + type: optional + docs: >- + If provided, will only return issues whose first incident time was + after this datetime. + first_incident_time_before: + type: optional + docs: >- + If provided, will only return issues whose first incident time was + before this datetime. + include_muted: + type: optional + docs: If true, will include muted issues + integration_name: optional + last_incident_time_after: + type: optional + docs: >- + If provided, will only return issues whose last incident time was + after this datetime. + last_incident_time_before: + type: optional + docs: >- + If provided, will only return issues whose last incident time was + before this datetime. + linked_account_id: + type: optional + docs: >- + If provided, will only include issues pertaining to the linked + account passed in. + page_size: + type: optional + docs: Number of results to return per page. + start_date: + type: optional + docs: >- + If included, will only include issues whose most recent action + occurred after this time + status: + type: optional + docs: |- + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + response: + docs: '' + type: ticketingRoot.PaginatedIssueList + status-code: 200 + examples: + - response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + status: ONGOING + error_description: Missing Permissions + end_user: + key: value + first_incident_time: '2022-12-05T16:19:15Z' + last_incident_time: '2022-12-05T16:19:15Z' + is_muted: true + error_details: + - Missing employee permissions. + - Missing time off permissions. + retrieve: + path: /ticketing/v1/issues/{id} + method: GET + auth: true + docs: Get a specific issue. + source: + openapi: ticketing_v3.yml + path-parameters: + id: string + response: + docs: '' + type: ticketingRoot.Issue + status-code: 200 + examples: + - path-parameters: + id: id + response: + body: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + status: ONGOING + error_description: Missing Permissions + end_user: + key: value + first_incident_time: '2022-12-05T16:19:15Z' + last_incident_time: '2022-12-05T16:19:15Z' + is_muted: true + error_details: + - Missing employee permissions. + - Missing time off permissions. + source: + openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/linkToken.yml b/.mock/definition/Ticketing/linkToken.yml new file mode 100644 index 000000000..121fae941 --- /dev/null +++ b/.mock/definition/Ticketing/linkToken.yml @@ -0,0 +1,152 @@ +imports: + ticketingRoot: __package__.yml +types: + EndUserDetailsRequestLanguage: + discriminated: false + docs: >- + The following subset of IETF language tags can be used to configure + localization. + + + * `en` - en + + * `de` - de + union: + - ticketingRoot.LanguageEnum + - string + source: + openapi: ticketing_v3.yml + inline: true +service: + auth: false + base-path: '' + endpoints: + create: + path: /ticketing/v1/link-token + method: POST + auth: true + docs: Creates a link token to be used when linking a new end user. + source: + openapi: ticketing_v3.yml + request: + name: EndUserDetailsRequest + body: + properties: + end_user_email_address: + type: string + docs: >- + Your end user's email address. This is purely for identification + purposes - setting this value will not cause any emails to be + sent. + validation: + minLength: 1 + maxLength: 100 + end_user_organization_name: + type: string + docs: Your end user's organization. + validation: + minLength: 1 + maxLength: 100 + end_user_origin_id: + type: string + docs: >- + 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. + validation: + minLength: 1 + maxLength: 100 + categories: + docs: The integration categories to show in Merge Link. + type: list + integration: + type: optional + docs: >- + 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/. + validation: + minLength: 1 + link_expiry_mins: + type: optional + docs: >- + 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. + default: 30 + validation: + min: 30 + max: 10080 + should_create_magic_link_url: + type: optional + docs: >- + 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. + default: false + hide_admin_magic_link: + type: optional + docs: >- + 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. + default: false + common_models: + type: optional> + docs: >- + An array of objects to specify the models and fields that will + be disabled for a given Linked Account. Each object uses + model_id, enabled_actions, and disabled_fields to specify the + model, method, and fields that are scoped for a given Linked + Account. + category_common_model_scopes: + type: >- + optional>>> + docs: >- + When creating a Link Token, you can set permissions for Common + Models that will apply to the account that is going to be + linked. Any model or field not specified in link token payload + will default to existing settings. + language: + type: optional + docs: >- + The following subset of IETF language tags can be used to + configure localization. + + + * `en` - en + + * `de` - de + are_syncs_disabled: + type: optional + docs: >- + The boolean that indicates whether initial, periodic, and force + syncs will be disabled. + default: false + integration_specific_config: + type: optional> + docs: >- + A JSON object containing integration-specific configuration + options. + content-type: application/json + response: + docs: '' + type: ticketingRoot.LinkToken + status-code: 200 + examples: + - request: + end_user_email_address: example@gmail.com + end_user_organization_name: Test Organization + end_user_origin_id: '12345' + categories: + - hris + - ats + response: + body: + link_token: necdP7FtdASl1fQwm62be2_dM4wBG8_GactqoUV0 + integration_name: Lever + magic_link_url: https://link.merge.dev/asdfjkl12345jsndfgi2i83n + source: + openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/linkedAccounts.yml b/.mock/definition/Ticketing/linkedAccounts.yml new file mode 100644 index 000000000..cde7bb73b --- /dev/null +++ b/.mock/definition/Ticketing/linkedAccounts.yml @@ -0,0 +1,152 @@ +types: + LinkedAccountsListRequestCategory: + enum: + - accounting + - ats + - crm + - filestorage + - hris + - mktg + - ticketing + source: + openapi: ticketing_v3.yml +imports: + ticketingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ticketing/v1/linked-accounts + method: GET + auth: true + docs: List linked accounts for your organization. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: ticketing_v3.yml + request: + name: LinkedAccountsListRequest + query-parameters: + category: + type: optional + docs: >- + Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, + `mktg`, `ticketing` + + + * `hris` - hris + + * `ats` - ats + + * `accounting` - accounting + + * `ticketing` - ticketing + + * `crm` - crm + + * `mktg` - mktg + + * `filestorage` - filestorage + cursor: + type: optional + docs: The pagination cursor value. + end_user_email_address: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given email address. + end_user_organization_name: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given organization name. + end_user_origin_id: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given origin ID. + end_user_origin_ids: + type: optional + docs: >- + Comma-separated list of EndUser origin IDs, making it possible to + specify multiple EndUsers at once. + id: + type: optional + validation: + format: uuid + ids: + type: optional + docs: >- + Comma-separated list of LinkedAccount IDs, making it possible to + specify multiple LinkedAccounts at once. + include_duplicates: + type: optional + docs: >- + 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: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given integration name. + is_test_account: + type: optional + docs: >- + If included, will only include test linked accounts. If not + included, will only include non-test linked accounts. + page_size: + type: optional + docs: Number of results to return per page. + status: + type: optional + docs: >- + Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, + `RELINK_NEEDED` + response: + docs: '' + type: ticketingRoot.PaginatedAccountDetailsAndActionsList + status-code: 200 + examples: + - response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: e59b1821-f85c-4e28-a6b3-1804156f3563 + category: hris + status: COMPLETE + status_detail: Invalid login credentials + end_user_origin_id: 3ac95cde-6c7f-4eef-afec-be710b42308d + end_user_organization_name: Foo Bar, LLC + end_user_email_address: hradmin@foobar.dev + subdomain: foobar + webhook_listener_url: >- + https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 + is_duplicate: true + integration: + name: name + categories: + - hris + color: color + slug: slug + passthrough_available: true + available_model_operations: + - model_name: Candidate + available_operations: + - FETCH + - CREATE + required_post_parameters: + - remote_user_id + supported_fields: + - first_name + - last_name + - company + - title + account_type: PRODUCTION + completed_at: '2024-08-26T20:11:19Z' + source: + openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/passthrough.yml b/.mock/definition/Ticketing/passthrough.yml new file mode 100644 index 000000000..f8de1a3c4 --- /dev/null +++ b/.mock/definition/Ticketing/passthrough.yml @@ -0,0 +1,40 @@ +imports: + ticketingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /ticketing/v1/passthrough + method: POST + auth: true + docs: Pull data from an endpoint not currently supported by Merge. + source: + openapi: ticketing_v3.yml + request: + body: ticketingRoot.DataPassthroughRequest + content-type: application/json + response: + docs: '' + type: ticketingRoot.RemoteResponse + status-code: 200 + examples: + - headers: {} + request: + method: GET + path: /scooters + response: + body: + method: GET + path: /scooters + status: 200 + response: + key: value + response_headers: + X-Page-Token: value + response_type: JSON + headers: + EXTRA-HEADER: value + Authorization: + source: + openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/projects.yml b/.mock/definition/Ticketing/projects.yml new file mode 100644 index 000000000..531e496fa --- /dev/null +++ b/.mock/definition/Ticketing/projects.yml @@ -0,0 +1,227 @@ +imports: + ticketingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ticketing/v1/projects + method: GET + auth: true + docs: Returns a list of `Project` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: ticketing_v3.yml + request: + name: ProjectsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: ticketingRoot.PaginatedProjectList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: fb8c55b6-1cb8-4b4c-9fb6-17924231619d + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Q1 Platform + description: For tracking all tasks related to Platform for Q1 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + retrieve: + path: /ticketing/v1/projects/{id} + method: GET + auth: true + docs: Returns a `Project` object with the given `id`. + source: + openapi: ticketing_v3.yml + path-parameters: + id: string + request: + name: ProjectsRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: ticketingRoot.Project + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: fb8c55b6-1cb8-4b4c-9fb6-17924231619d + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Q1 Platform + description: For tracking all tasks related to Platform for Q1 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + data: + key: value + usersList: + path: /ticketing/v1/projects/{parent_id}/users + method: GET + auth: true + docs: Returns a list of `User` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: ticketing_v3.yml + path-parameters: + parent_id: string + request: + name: ProjectsUsersListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: ticketingRoot.PaginatedUserList + status-code: 200 + examples: + - path-parameters: + parent_id: parent_id + headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 17a54124-287f-494d-965e-3c5b330c9a68 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Gil Feig + email_address: help@merge.dev + is_active: true + teams: + - 28b54125-287f-494d-965e-3c5b330c9a68 + - 17a54124-287f-494d-965e-3c5b330c9a68 + roles: + - 23454124-387f-494d-265e-345b330c9123 + avatar: https://merge.dev/user_profile_pic.png + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + source: + openapi: ticketing_v3.yml +types: + ProjectsUsersListRequestExpandItem: + enum: + - roles + - teams + source: + openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/regenerateKey.yml b/.mock/definition/Ticketing/regenerateKey.yml new file mode 100644 index 000000000..eafa7c63f --- /dev/null +++ b/.mock/definition/Ticketing/regenerateKey.yml @@ -0,0 +1,36 @@ +imports: + ticketingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /ticketing/v1/regenerate-key + method: POST + auth: true + docs: Exchange remote keys. + source: + openapi: ticketing_v3.yml + request: + name: RemoteKeyForRegenerationRequest + body: + properties: + name: + type: string + docs: The name of the remote key + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: ticketingRoot.RemoteKey + status-code: 200 + examples: + - request: + name: Remote Deployment Key 1 + response: + body: + name: Remote Deployment Key 1 + key: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA + source: + openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/roles.yml b/.mock/definition/Ticketing/roles.yml new file mode 100644 index 000000000..396ae69f4 --- /dev/null +++ b/.mock/definition/Ticketing/roles.yml @@ -0,0 +1,148 @@ +imports: + ticketingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ticketing/v1/roles + method: GET + auth: true + docs: Returns a list of `Role` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: ticketing_v3.yml + request: + name: RolesListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: ticketingRoot.PaginatedRoleList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 23454124-387f-494d-265e-345b330c9123 + remote_id: '123' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Member + ticket_actions: + - VIEW + - EDIT + - CREATE + ticket_access: ALL + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + retrieve: + path: /ticketing/v1/roles/{id} + method: GET + auth: true + docs: Returns a `Role` object with the given `id`. + source: + openapi: ticketing_v3.yml + path-parameters: + id: string + request: + name: RolesRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: ticketingRoot.Role + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 23454124-387f-494d-265e-345b330c9123 + remote_id: '123' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Member + ticket_actions: + - VIEW + - EDIT + - CREATE + ticket_access: ALL + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + data: + key: value + source: + openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/scopes.yml b/.mock/definition/Ticketing/scopes.yml new file mode 100644 index 000000000..e0fe30d63 --- /dev/null +++ b/.mock/definition/Ticketing/scopes.yml @@ -0,0 +1,161 @@ +imports: + ticketingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + default_scopes_retrieve: + path: /ticketing/v1/default-scopes + method: GET + auth: true + docs: >- + 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). + source: + openapi: ticketing_v3.yml + response: + docs: '' + type: ticketingRoot.CommonModelScopeApi + status-code: 200 + examples: + - response: + body: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - created_at + - custom_fields + - date_of_birth + - first_name + - gender + - remote_created_at + - remote_data + disabled_fields: + - company + - employments + - groups + - home_location + - manager + - work_location + linked_account_scopes_retrieve: + path: /ticketing/v1/linked-account-scopes + method: GET + auth: true + docs: >- + 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). + source: + openapi: ticketing_v3.yml + response: + docs: '' + type: ticketingRoot.CommonModelScopeApi + status-code: 200 + examples: + - headers: {} + response: + body: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - created_at + - custom_fields + - date_of_birth + - first_name + - gender + - remote_created_at + - remote_data + disabled_fields: + - company + - employments + - groups + - home_location + - manager + - work_location + linked_account_scopes_create: + path: /ticketing/v1/linked-account-scopes + method: POST + auth: true + docs: >- + 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) + source: + openapi: ticketing_v3.yml + request: + name: LinkedAccountCommonModelScopeDeserializerRequest + body: + properties: + common_models: + docs: The common models you want to update the scopes for + type: >- + list + content-type: application/json + response: + docs: '' + type: ticketingRoot.CommonModelScopeApi + status-code: 200 + examples: + - headers: {} + request: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - home_location + disabled_fields: + - work_location + - model_name: Benefit + model_permissions: + WRITE: + is_enabled: false + response: + body: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - created_at + - custom_fields + - date_of_birth + - first_name + - gender + - remote_created_at + - remote_data + disabled_fields: + - company + - employments + - groups + - home_location + - manager + - work_location + source: + openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/syncStatus.yml b/.mock/definition/Ticketing/syncStatus.yml new file mode 100644 index 000000000..527759501 --- /dev/null +++ b/.mock/definition/Ticketing/syncStatus.yml @@ -0,0 +1,59 @@ +imports: + ticketingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ticketing/v1/sync-status + method: GET + auth: true + docs: >- + 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). + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: ticketing_v3.yml + request: + name: SyncStatusListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: ticketingRoot.PaginatedSyncStatusList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - model_name: Ticket + model_id: ticketing.Ticket + last_sync_start: '2021-03-30T19:44:18Z' + next_sync_start: '2021-03-30T20:44:18Z' + last_sync_result: SYNCING + last_sync_finished: '2021-03-30T19:55:18Z' + status: SYNCING + is_initial_sync: true + selective_sync_configurations_usage: IN_NEXT_SYNC + source: + openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/tags.yml b/.mock/definition/Ticketing/tags.yml new file mode 100644 index 000000000..ada3d4201 --- /dev/null +++ b/.mock/definition/Ticketing/tags.yml @@ -0,0 +1,138 @@ +imports: + ticketingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ticketing/v1/tags + method: GET + auth: true + docs: Returns a list of `Tag` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: ticketing_v3.yml + request: + name: TagsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: ticketingRoot.PaginatedTagList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + id: 17a54124-287f-494d-965e-3c5b330c9a68 + name: Ticketing API + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + retrieve: + path: /ticketing/v1/tags/{id} + method: GET + auth: true + docs: Returns a `Tag` object with the given `id`. + source: + openapi: ticketing_v3.yml + path-parameters: + id: string + request: + name: TagsRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: ticketingRoot.Tag + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + id: 17a54124-287f-494d-965e-3c5b330c9a68 + name: Ticketing API + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + data: + key: value + source: + openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/teams.yml b/.mock/definition/Ticketing/teams.yml new file mode 100644 index 000000000..9b9cf315f --- /dev/null +++ b/.mock/definition/Ticketing/teams.yml @@ -0,0 +1,140 @@ +imports: + ticketingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ticketing/v1/teams + method: GET + auth: true + docs: Returns a list of `Team` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: ticketing_v3.yml + request: + name: TeamsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: ticketingRoot.PaginatedTeamList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 17a54124-287f-494d-965e-3c5b330c9a68 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Platform + description: Platform and Integrations Team + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + retrieve: + path: /ticketing/v1/teams/{id} + method: GET + auth: true + docs: Returns a `Team` object with the given `id`. + source: + openapi: ticketing_v3.yml + path-parameters: + id: string + request: + name: TeamsRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: ticketingRoot.Team + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 17a54124-287f-494d-965e-3c5b330c9a68 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Platform + description: Platform and Integrations Team + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + data: + key: value + source: + openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/tickets.yml b/.mock/definition/Ticketing/tickets.yml new file mode 100644 index 000000000..f6b39b81c --- /dev/null +++ b/.mock/definition/Ticketing/tickets.yml @@ -0,0 +1,1159 @@ +types: + TicketsListRequestExpandItem: + enum: + - account + - assigned_teams + - assignees + - attachments + - collections + - contact + - creator + - parent_ticket + source: + openapi: ticketing_v3.yml + TicketsListRequestPriority: + enum: + - HIGH + - LOW + - NORMAL + - URGENT + source: + openapi: ticketing_v3.yml + TicketsListRequestRemoteFields: + enum: + - priority + - value: priority,status + name: PriorityStatus + - value: priority,status,ticket_type + name: PriorityStatusTicketType + - value: priority,ticket_type + name: PriorityTicketType + - status + - value: status,ticket_type + name: StatusTicketType + - ticket_type + source: + openapi: ticketing_v3.yml + TicketsListRequestShowEnumOrigins: + enum: + - priority + - value: priority,status + name: PriorityStatus + - value: priority,status,ticket_type + name: PriorityStatusTicketType + - value: priority,ticket_type + name: PriorityTicketType + - status + - value: status,ticket_type + name: StatusTicketType + - ticket_type + source: + openapi: ticketing_v3.yml + TicketsRetrieveRequestExpandItem: + enum: + - account + - assigned_teams + - assignees + - attachments + - collections + - contact + - creator + - parent_ticket + source: + openapi: ticketing_v3.yml + TicketsRetrieveRequestRemoteFields: + enum: + - priority + - value: priority,status + name: PriorityStatus + - value: priority,status,ticket_type + name: PriorityStatusTicketType + - value: priority,ticket_type + name: PriorityTicketType + - status + - value: status,ticket_type + name: StatusTicketType + - ticket_type + source: + openapi: ticketing_v3.yml + TicketsRetrieveRequestShowEnumOrigins: + enum: + - priority + - value: priority,status + name: PriorityStatus + - value: priority,status,ticket_type + name: PriorityStatusTicketType + - value: priority,ticket_type + name: PriorityTicketType + - status + - value: status,ticket_type + name: StatusTicketType + - ticket_type + source: + openapi: ticketing_v3.yml + TicketsViewersListRequestExpandItem: + enum: + - team + - user + source: + openapi: ticketing_v3.yml +imports: + ticketingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ticketing/v1/tickets + method: GET + auth: true + docs: Returns a list of `Ticket` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: ticketing_v3.yml + request: + name: TicketsListRequest + query-parameters: + account_id: + type: optional + docs: If provided, will only return tickets for this account. + assignee_ids: + type: optional + docs: >- + If provided, will only return tickets assigned to the + assignee_ids; multiple assignee_ids can be separated by commas. + collection_ids: + type: optional + docs: >- + If provided, will only return tickets assigned to the + collection_ids; multiple collection_ids can be separated by + commas. + completed_after: + type: optional + docs: >- + If provided, will only return tickets completed after this + datetime. + completed_before: + type: optional + docs: >- + If provided, will only return tickets completed before this + datetime. + contact_id: + type: optional + docs: If provided, will only return tickets for this contact. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + creator_id: + type: optional + docs: If provided, will only return tickets created by this creator_id. + cursor: + type: optional + docs: The pagination cursor value. + due_after: + type: optional + docs: If provided, will only return tickets due after this datetime. + due_before: + type: optional + docs: If provided, will only return tickets due before this datetime. + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + parent_ticket_id: + type: optional + docs: If provided, will only return sub tickets of the parent_ticket_id. + priority: + type: optional + docs: |- + If provided, will only return tickets of this priority. + + * `URGENT` - URGENT + * `HIGH` - HIGH + * `NORMAL` - NORMAL + * `LOW` - LOW + remote_created_after: + type: optional + docs: >- + If provided, will only return tickets created in the third party + platform after this datetime. + remote_created_before: + type: optional + docs: >- + If provided, will only return tickets created in the third party + platform before this datetime. + remote_fields: + type: optional + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + remote_updated_after: + type: optional + docs: >- + If provided, will only return tickets updated in the third party + platform after this datetime. + remote_updated_before: + type: optional + docs: >- + If provided, will only return tickets updated in the third party + platform before this datetime. + show_enum_origins: + type: optional + docs: >- + A comma separated list of enum field names for which you'd like + the original values to be returned, instead of Merge's normalized + enum values. [Learn + more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) + status: + type: optional + docs: If provided, will only return tickets of this status. + tags: + type: optional + docs: >- + If provided, will only return tickets matching the tags; multiple + tags can be separated by commas. + ticket_type: + type: optional + docs: If provided, will only return tickets of this type. + ticket_url: + type: optional + docs: >- + If provided, will only return tickets where the URL matches or + contains the substring + validation: + format: uri + response: + docs: '' + type: ticketingRoot.PaginatedTicketList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 0958cbc6-6040-430a-848e-aafacbadf4ae + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Please add more integrations + assignees: + - 17a54124-287f-494d-965e-3c5b330c9a68 + assigned_teams: + - 4857c306-c1f9-489e-a6b6-90902f736dfe + creator: creator + due_date: '2022-10-11T00:00:00Z' + status: OPEN + description: >- + Can you please add more integrations? It'll make syncing + data much easier! + collections: + - fb8c55b6-1cb8-4b4c-9fb6-17924231619d + ticket_type: incident + account: account + contact: contact + parent_ticket: parent_ticket + attachments: + - 42747df1-95e7-46e2-93cc-66f1191edca5 + - 92f972d0-2526-434b-9409-4c3b468e08f0 + access_level: COMPANY + tags: + - enterprise + - other-tag + roles: + - 21a54124-397f-494d-985e-3c5b330b8a68 + - 17a54124-287f-494d-965e-3c5b330c9a68 + ticket_url: https://thirdpartysoftware.com/project/3/issue/1 + priority: URGENT + remote_created_at: '2021-11-10T00:00:00Z' + remote_updated_at: '2021-12-09T00:00:00Z' + completed_at: '2021-12-09T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + remote_fields: + - remote_field_class: remote_field_class + create: + path: /ticketing/v1/tickets + method: POST + auth: true + docs: Creates a `Ticket` object with the given values. + source: + openapi: ticketing_v3.yml + request: + name: TicketEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: ticketingRoot.TicketRequest + content-type: application/json + response: + docs: '' + type: ticketingRoot.TicketResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: 0958cbc6-6040-430a-848e-aafacbadf4ae + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Please add more integrations + assignees: + - 17a54124-287f-494d-965e-3c5b330c9a68 + assigned_teams: + - 4857c306-c1f9-489e-a6b6-90902f736dfe + creator: creator + due_date: '2022-10-11T00:00:00Z' + status: OPEN + description: >- + Can you please add more integrations? It'll make syncing data + much easier! + collections: + - fb8c55b6-1cb8-4b4c-9fb6-17924231619d + ticket_type: incident + account: account + contact: contact + parent_ticket: parent_ticket + attachments: + - 42747df1-95e7-46e2-93cc-66f1191edca5 + - 92f972d0-2526-434b-9409-4c3b468e08f0 + access_level: COMPANY + tags: + - enterprise + - other-tag + roles: + - 21a54124-397f-494d-985e-3c5b330b8a68 + - 17a54124-287f-494d-965e-3c5b330c9a68 + ticket_url: https://thirdpartysoftware.com/project/3/issue/1 + priority: URGENT + remote_created_at: '2021-11-10T00:00:00Z' + remote_updated_at: '2021-12-09T00:00:00Z' + completed_at: '2021-12-09T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + remote_fields: + - remote_field_class: remote_field_class + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /ticketing/v1/tickets/{id} + method: GET + auth: true + docs: Returns a `Ticket` object with the given `id`. + source: + openapi: ticketing_v3.yml + path-parameters: + id: string + request: + name: TicketsRetrieveRequest + query-parameters: + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional + docs: >- + 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) + response: + docs: '' + type: ticketingRoot.Ticket + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 0958cbc6-6040-430a-848e-aafacbadf4ae + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Please add more integrations + assignees: + - 17a54124-287f-494d-965e-3c5b330c9a68 + assigned_teams: + - 4857c306-c1f9-489e-a6b6-90902f736dfe + creator: creator + due_date: '2022-10-11T00:00:00Z' + status: OPEN + description: >- + Can you please add more integrations? It'll make syncing data + much easier! + collections: + - fb8c55b6-1cb8-4b4c-9fb6-17924231619d + ticket_type: incident + account: account + contact: contact + parent_ticket: parent_ticket + attachments: + - 42747df1-95e7-46e2-93cc-66f1191edca5 + - 92f972d0-2526-434b-9409-4c3b468e08f0 + access_level: COMPANY + tags: + - enterprise + - other-tag + roles: + - 21a54124-397f-494d-985e-3c5b330b8a68 + - 17a54124-287f-494d-965e-3c5b330c9a68 + ticket_url: https://thirdpartysoftware.com/project/3/issue/1 + priority: URGENT + remote_created_at: '2021-11-10T00:00:00Z' + remote_updated_at: '2021-12-09T00:00:00Z' + completed_at: '2021-12-09T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + data: + key: value + remote_fields: + - remote_field_class: remote_field_class + value: + key: value + partialUpdate: + path: /ticketing/v1/tickets/{id} + method: PATCH + auth: true + docs: Updates a `Ticket` object with the given `id`. + source: + openapi: ticketing_v3.yml + path-parameters: + id: string + request: + name: PatchedTicketEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: ticketingRoot.PatchedTicketRequest + content-type: application/json + response: + docs: '' + type: ticketingRoot.TicketResponse + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + request: + model: {} + response: + body: + model: + id: 0958cbc6-6040-430a-848e-aafacbadf4ae + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Please add more integrations + assignees: + - 17a54124-287f-494d-965e-3c5b330c9a68 + assigned_teams: + - 4857c306-c1f9-489e-a6b6-90902f736dfe + creator: creator + due_date: '2022-10-11T00:00:00Z' + status: OPEN + description: >- + Can you please add more integrations? It'll make syncing data + much easier! + collections: + - fb8c55b6-1cb8-4b4c-9fb6-17924231619d + ticket_type: incident + account: account + contact: contact + parent_ticket: parent_ticket + attachments: + - 42747df1-95e7-46e2-93cc-66f1191edca5 + - 92f972d0-2526-434b-9409-4c3b468e08f0 + access_level: COMPANY + tags: + - enterprise + - other-tag + roles: + - 21a54124-397f-494d-985e-3c5b330b8a68 + - 17a54124-287f-494d-965e-3c5b330c9a68 + ticket_url: https://thirdpartysoftware.com/project/3/issue/1 + priority: URGENT + remote_created_at: '2021-11-10T00:00:00Z' + remote_updated_at: '2021-12-09T00:00:00Z' + completed_at: '2021-12-09T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + remote_fields: + - remote_field_class: remote_field_class + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + viewersList: + path: /ticketing/v1/tickets/{ticket_id}/viewers + method: GET + auth: true + docs: >- + Returns a list of `Viewer` objects that point to a User id or Team id + that is either an assignee or viewer on a `Ticket` with the given id. + [Learn + more.](https://help.merge.dev/en/articles/10333658-ticketing-access-control-list-acls) + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: ticketing_v3.yml + path-parameters: + ticket_id: string + request: + name: TicketsViewersListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: ticketingRoot.PaginatedViewerList + status-code: 200 + examples: + - path-parameters: + ticket_id: ticket_id + headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 17a54124-287f-494d-965e-3c5b330c9a68 + remote_id: '088899' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + team: team + user: user + metaPatchRetrieve: + path: /ticketing/v1/tickets/meta/patch/{id} + method: GET + auth: true + docs: Returns metadata for `Ticket` PATCHs. + source: + openapi: ticketing_v3.yml + path-parameters: + id: string + response: + docs: '' + type: ticketingRoot.MetaResponse + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + metaPostRetrieve: + path: /ticketing/v1/tickets/meta/post + method: GET + auth: true + docs: Returns metadata for `Ticket` POSTs. + source: + openapi: ticketing_v3.yml + request: + name: TicketsMetaPostRetrieveRequest + query-parameters: + collection_id: + type: optional + docs: If provided, will only return tickets for this collection. + ticket_type: + type: optional + docs: If provided, will only return tickets for this ticket type. + response: + docs: '' + type: ticketingRoot.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + remoteFieldClassesList: + path: /ticketing/v1/tickets/remote-field-classes + method: GET + auth: true + docs: Returns a list of `RemoteFieldClass` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: ticketing_v3.yml + request: + name: TicketsRemoteFieldClassesListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + ids: + type: optional + docs: >- + If provided, will only return remote field classes with the `ids` + in this list + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_common_model_field: + type: optional + docs: >- + If provided, will only return remote field classes with this + is_common_model_field value + is_custom: + type: optional + docs: >- + If provided, will only return remote fields classes with this + is_custom value + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: ticketingRoot.PaginatedRemoteFieldClassList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: id + display_name: display_name + remote_key_name: remote_key_name + description: description + is_custom: true + is_required: true + field_type: string + field_format: string + field_choices: + - {} + source: + openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/users.yml b/.mock/definition/Ticketing/users.yml new file mode 100644 index 000000000..d48816068 --- /dev/null +++ b/.mock/definition/Ticketing/users.yml @@ -0,0 +1,187 @@ +types: + UsersListRequestExpandItem: + enum: + - roles + - teams + source: + openapi: ticketing_v3.yml + UsersRetrieveRequestExpandItem: + enum: + - roles + - teams + source: + openapi: ticketing_v3.yml +imports: + ticketingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ticketing/v1/users + method: GET + auth: true + docs: Returns a list of `User` objects. + pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + source: + openapi: ticketing_v3.yml + request: + name: UsersListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + email_address: + type: optional + docs: >- + If provided, will only return users with emails equal to this + value (case insensitive). + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + 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: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + team: + type: optional + docs: If provided, will only return users matching in this team. + response: + docs: '' + type: ticketingRoot.PaginatedUserList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 17a54124-287f-494d-965e-3c5b330c9a68 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Gil Feig + email_address: help@merge.dev + is_active: true + teams: + - 28b54125-287f-494d-965e-3c5b330c9a68 + - 17a54124-287f-494d-965e-3c5b330c9a68 + roles: + - 23454124-387f-494d-265e-345b330c9123 + avatar: https://merge.dev/user_profile_pic.png + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + retrieve: + path: /ticketing/v1/users/{id} + method: GET + auth: true + docs: Returns a `User` object with the given `id`. + source: + openapi: ticketing_v3.yml + path-parameters: + id: string + request: + name: UsersRetrieveRequest + query-parameters: + expand: + type: optional + allow-multiple: true + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: ticketingRoot.User + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 17a54124-287f-494d-965e-3c5b330c9a68 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Gil Feig + email_address: help@merge.dev + is_active: true + teams: + - 28b54125-287f-494d-965e-3c5b330c9a68 + - 17a54124-287f-494d-965e-3c5b330c9a68 + roles: + - 23454124-387f-494d-265e-345b330c9123 + avatar: https://merge.dev/user_profile_pic.png + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + data: + key: value + source: + openapi: ticketing_v3.yml diff --git a/.mock/definition/Ticketing/webhookReceivers.yml b/.mock/definition/Ticketing/webhookReceivers.yml new file mode 100644 index 000000000..38154a43c --- /dev/null +++ b/.mock/definition/Ticketing/webhookReceivers.yml @@ -0,0 +1,61 @@ +imports: + ticketingRoot: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ticketing/v1/webhook-receivers + method: GET + auth: true + docs: Returns a list of `WebhookReceiver` objects. + source: + openapi: ticketing_v3.yml + response: + docs: '' + type: list + status-code: 200 + examples: + - headers: {} + response: + body: + - event: event + is_active: true + key: key + create: + path: /ticketing/v1/webhook-receivers + method: POST + auth: true + docs: Creates a `WebhookReceiver` object with the given values. + source: + openapi: ticketing_v3.yml + request: + name: WebhookReceiverRequest + body: + properties: + event: + type: string + validation: + minLength: 1 + is_active: boolean + key: + type: optional + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: ticketingRoot.WebhookReceiver + status-code: 201 + examples: + - headers: {} + request: + event: event + is_active: true + response: + body: + event: event + is_active: true + key: key + source: + openapi: ticketing_v3.yml diff --git a/.mock/definition/__package__.yml b/.mock/definition/__package__.yml new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/.mock/definition/__package__.yml @@ -0,0 +1 @@ +{} diff --git a/.mock/definition/api.yml b/.mock/definition/api.yml new file mode 100644 index 000000000..062482b66 --- /dev/null +++ b/.mock/definition/api.yml @@ -0,0 +1,21 @@ +name: api +error-discrimination: + strategy: status-code +display-name: Merge Accounting API +environments: + Production: https://api.merge.dev/api + Production_EU: https://api-eu.merge.dev/api + Sandbox: https://api-sandbox.merge.dev/api +default-environment: Production +default-url: api +headers: + X-Account-Token: + type: optional + name: accountToken + docs: Token identifying the end user. +auth-schemes: + BearerAuthScheme: + scheme: bearer + token: + name: api_key +auth: BearerAuthScheme diff --git a/.mock/fern.config.json b/.mock/fern.config.json new file mode 100644 index 000000000..c4faf103e --- /dev/null +++ b/.mock/fern.config.json @@ -0,0 +1,4 @@ +{ + "organization" : "merge", + "version" : "0.63.28" +} \ No newline at end of file diff --git a/.mock/filestorage_v3.yml b/.mock/filestorage_v3.yml new file mode 100644 index 000000000..8ccd8e845 --- /dev/null +++ b/.mock/filestorage_v3.yml @@ -0,0 +1,5574 @@ +openapi: 3.0.3 +info: + title: Merge File Storage API + version: '1.0' + description: The unified API for building rich integrations with multiple File Storage + platforms. + contact: + name: Merge Team + url: https://www.merge.dev/ + email: hello@merge.dev +paths: + /filestorage/v1/account-details: + get: + operationId: account_details_retrieve + description: Get details for a linked account. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - account-details + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AccountDetails' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /filestorage/v1/account-token/{public_token}: + get: + operationId: account_token_retrieve + description: Returns the account token for the end user with the provided public + token. + parameters: + - in: path + name: public_token + schema: + type: string + required: true + tags: + - account-token + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AccountToken' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /filestorage/v1/async-passthrough: + post: + operationId: async_passthrough_create + description: Asynchronously pull data from an endpoint not currently supported + by Merge. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - async-passthrough + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DataPassthroughRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/DataPassthroughRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/DataPassthroughRequest' + required: true + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AsyncPassthroughReciept' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /filestorage/v1/async-passthrough/{async_passthrough_receipt_id}: + get: + operationId: async_passthrough_retrieve + description: Retrieves data from earlier async-passthrough POST request + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: async_passthrough_receipt_id + schema: + type: string + format: uuid + required: true + tags: + - async-passthrough + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/RemoteResponse' + - type: string + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /filestorage/v1/audit-trail: + get: + operationId: audit_trail_list + description: Gets a list of audit trail events. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: end_date + schema: + type: string + description: If included, will only include audit trail events that occurred + before this time + - in: query + name: event_type + schema: + type: string + description: '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`' + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: start_date + schema: + type: string + description: If included, will only include audit trail events that occurred + after this time + - in: query + name: user_email + schema: + type: string + description: 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. + tags: + - audit-trail + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedAuditLogEventList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /filestorage/v1/available-actions: + get: + operationId: available_actions_retrieve + description: Returns a list of models and actions available for an account. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - available-actions + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AvailableActions' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /filestorage/v1/default-scopes: + get: + operationId: default_scopes_retrieve + description: Get the default permissions for Merge Common Models and fields + across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). + tags: + - scopes + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CommonModelScopeAPI' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /filestorage/v1/delete-account: + post: + operationId: delete_account_delete + description: Delete a linked account. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - delete-account + security: + - tokenAuth: [] + responses: + '200': + description: No response body + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /filestorage/v1/drives: + get: + operationId: drives_list + description: Returns a list of `Drive` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - in: query + name: name + schema: + type: string + nullable: true + description: If provided, will only return drives with this name. This performs + an exact match. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + tags: + - drives + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedDriveList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /filestorage/v1/drives/{id}: + get: + operationId: drives_retrieve + description: Returns a `Drive` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - drives + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Drive' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /filestorage/v1/field-mappings: + get: + operationId: field_mappings_retrieve + description: Get all Field Mappings for this Linked Account. Field Mappings + are mappings between third-party Remote Fields and user defined Merge fields. + [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: exclude_remote_field_metadata + schema: + type: boolean + description: 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. + tags: + - field-mapping + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/FieldMappingApiInstanceResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + post: + operationId: field_mappings_create + description: Create new Field Mappings that will be available after the next + scheduled sync. This will cause the next sync for this Linked Account to sync + **ALL** data from start. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: exclude_remote_field_metadata + schema: + type: boolean + description: 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. + tags: + - field-mapping + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateFieldMappingRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/CreateFieldMappingRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/CreateFieldMappingRequest' + required: true + security: + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/FieldMappingInstanceResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /filestorage/v1/field-mappings/{field_mapping_id}: + patch: + operationId: field_mappings_partial_update + description: Create or update existing Field Mappings for a Linked Account. + Changes will be reflected after the next scheduled sync. This will cause the + next sync for this Linked Account to sync **ALL** data from start. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: field_mapping_id + schema: + type: string + format: uuid + required: true + tags: + - field-mapping + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedEditFieldMappingRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedEditFieldMappingRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedEditFieldMappingRequest' + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/FieldMappingInstanceResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + delete: + operationId: field_mappings_destroy + description: Deletes Field Mappings for a Linked Account. All data related to + this Field Mapping will be deleted and these changes will be reflected after + the next scheduled sync. This will cause the next sync for this Linked Account + to sync **ALL** data from start. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: field_mapping_id + schema: + type: string + format: uuid + required: true + tags: + - field-mapping + security: + - tokenAuth: [] + responses: + '204': + content: + application/json: + schema: + $ref: '#/components/schemas/FieldMappingInstanceResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /filestorage/v1/files: + get: + operationId: files_list + description: Returns a list of `File` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: drive_id + schema: + type: string + description: Specifying a drive id returns only the files in that drive. Specifying + null returns only the files outside the top-level drive. + examples: + DriveId: + summary: drive_id + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - drive + - folder + - permissions + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandPermissions,Folder,Drive: + value: permissions,folder,drive + summary: Expand Permissions, Folder, Drive + explode: false + - in: query + name: folder_id + schema: + type: string + description: Specifying a folder id returns only the files in that folder. + Specifying null returns only the files in root directory. + examples: + FolderId: + summary: folder_id + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: mime_type + schema: + type: string + description: If provided, will only return files with these mime_types. Multiple + values can be separated by commas. + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - in: query + name: name + schema: + type: string + nullable: true + description: If provided, will only return files with this name. This performs + an exact match. + - in: query + name: order_by + schema: + type: string + enum: + - -created_at + - -modified_at + - created_at + - modified_at + x-fern-enum: + -created_at: + name: CreatedAtDescending + created_at: + name: CreatedAtAscending + -modified_at: + name: ModifiedAtDescending + modified_at: + name: ModifiedAtAscending + description: 'Overrides the default ordering for this endpoint. Possible values + include: created_at, -created_at, modified_at, -modified_at.' + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + tags: + - files + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedFileList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + post: + operationId: files_create + description: Creates a `File` object with the given values. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: is_debug_mode + schema: + type: boolean + description: Whether to include debug fields (such as log file links) in the + response. + - in: query + name: run_async + schema: + type: boolean + description: Whether or not third-party updates should be run asynchronously. + tags: + - files + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FileStorageFileEndpointRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/FileStorageFileEndpointRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/FileStorageFileEndpointRequest' + required: true + security: + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/FileStorageFileResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /filestorage/v1/files/{id}: + get: + operationId: files_retrieve + description: Returns a `File` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - drive + - folder + - permissions + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandPermissions,Folder,Drive: + value: permissions,folder,drive + summary: Expand Permissions, Folder, Drive + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - files + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/File' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /filestorage/v1/files/{id}/download: + get: + operationId: files_download_retrieve + description: Returns the `File` content with the given `id` as a stream of bytes. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: mime_type + schema: + type: string + description: If provided, specifies the export format of the file to be downloaded. + For information on supported export formats, please refer to our export format help center article. + tags: + - files + security: + - tokenAuth: [] + responses: + '200': + content: + application/octet-stream: + schema: + type: string + format: binary + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /filestorage/v1/files/{id}/download/request-meta: + get: + operationId: files_download_request_meta_retrieve + description: Returns metadata to construct an authenticated file download request + for a singular file, allowing you to download file directly from the third-party. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: mime_type + schema: + type: string + description: If provided, specifies the export format of the file to be downloaded. + For information on supported export formats, please refer to our export format help center article. + tags: + - files + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DownloadRequestMeta' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /filestorage/v1/files/download/request-meta: + get: + operationId: files_download_request_meta_list + description: Returns metadata to construct authenticated file download requests, + allowing you to download files directly from the third-party. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: created_after + schema: + type: string + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: mime_types + schema: + type: string + description: A comma-separated list of preferred MIME types in order of priority. + If supported by the third-party provider, the file(s) will be returned in + the first supported MIME type from the list. The default MIME type is PDF. + To see supported MIME types by file type, refer to our export format help center article. + - in: query + name: modified_after + schema: + type: string + description: If provided, will only return objects modified after this datetime. + - in: query + name: modified_before + schema: + type: string + description: If provided, will only return objects modified before this datetime. + - in: query + name: order_by + schema: + type: string + enum: + - -created_at + - -modified_at + - created_at + - modified_at + x-fern-enum: + -created_at: + name: CreatedAtDescending + created_at: + name: CreatedAtAscending + -modified_at: + name: ModifiedAtDescending + modified_at: + name: ModifiedAtAscending + description: 'Overrides the default ordering for this endpoint. Possible values + include: created_at, -created_at, modified_at, -modified_at.' + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - files + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedDownloadRequestMetaList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /filestorage/v1/files/meta/post: + get: + operationId: files_meta_post_retrieve + description: Returns metadata for `FileStorageFile` POSTs. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - files + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetaResponse' + description: '' + x-merge-meta-post: META_POST + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /filestorage/v1/folders: + get: + operationId: folders_list + description: Returns a list of `Folder` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: drive_id + schema: + type: string + description: If provided, will only return folders in this drive. + examples: + DriveId: + summary: drive_id + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - drive + - parent_folder + - permissions + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandPermissions,ParentFolder,Drive: + value: permissions,parent_folder,drive + summary: Expand Permissions, Parent_folder, Drive + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - in: query + name: name + schema: + type: string + nullable: true + description: If provided, will only return folders with this name. This performs + an exact match. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: parent_folder_id + schema: + type: string + description: If provided, will only return folders in this parent folder. + If null, will return folders in root directory. + examples: + ParentFolderId: + summary: parent_folder_id + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + tags: + - folders + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedFolderList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + post: + operationId: folders_create + description: Creates a `Folder` object with the given values. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: is_debug_mode + schema: + type: boolean + description: Whether to include debug fields (such as log file links) in the + response. + - in: query + name: run_async + schema: + type: boolean + description: Whether or not third-party updates should be run asynchronously. + tags: + - folders + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FileStorageFolderEndpointRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/FileStorageFolderEndpointRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/FileStorageFolderEndpointRequest' + required: true + security: + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/FileStorageFolderResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /filestorage/v1/folders/{id}: + get: + operationId: folders_retrieve + description: Returns a `Folder` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - drive + - parent_folder + - permissions + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandPermissions,ParentFolder,Drive: + value: permissions,parent_folder,drive + summary: Expand Permissions, Parent_folder, Drive + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - folders + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Folder' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /filestorage/v1/folders/meta/post: + get: + operationId: folders_meta_post_retrieve + description: Returns metadata for `FileStorageFolder` POSTs. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - folders + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetaResponse' + description: '' + x-merge-meta-post: META_POST + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /filestorage/v1/generate-key: + post: + operationId: generate_key_create + description: Create a remote key. + tags: + - generate-key + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GenerateRemoteKeyRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/GenerateRemoteKeyRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/GenerateRemoteKeyRequest' + required: true + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RemoteKey' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /filestorage/v1/groups: + get: + operationId: groups_list + description: Returns a list of `Group` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - child_groups + - users + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandChildGroups: + value: child_groups + summary: Expand Child_groups + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + tags: + - groups + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGroupList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /filestorage/v1/groups/{id}: + get: + operationId: groups_retrieve + description: Returns a `Group` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - child_groups + - users + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandChildGroups: + value: child_groups + summary: Expand Child_groups + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - groups + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Group' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /filestorage/v1/issues: + get: + operationId: issues_list + description: Gets all issues for Organization. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: query + name: account_token + schema: + type: string + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: end_date + schema: + type: string + description: If included, will only include issues whose most recent action + occurred before this time + - in: query + name: end_user_organization_name + schema: + type: string + - in: query + name: first_incident_time_after + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return issues whose first incident time + was after this datetime. + - in: query + name: first_incident_time_before + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return issues whose first incident time + was before this datetime. + - in: query + name: include_muted + schema: + type: string + description: If true, will include muted issues + - in: query + name: integration_name + schema: + type: string + - in: query + name: last_incident_time_after + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return issues whose last incident time + was after this datetime. + - in: query + name: last_incident_time_before + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return issues whose last incident time + was before this datetime. + - in: query + name: linked_account_id + schema: + type: string + description: If provided, will only include issues pertaining to the linked + account passed in. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: start_date + schema: + type: string + description: If included, will only include issues whose most recent action + occurred after this time + - in: query + name: status + schema: + type: string + enum: + - ONGOING + - RESOLVED + description: |- + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + tags: + - issues + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedIssueList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /filestorage/v1/issues/{id}: + get: + operationId: issues_retrieve + description: Get a specific issue. + parameters: + - in: path + name: id + schema: + type: string + format: uuid + required: true + tags: + - issues + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Issue' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /filestorage/v1/link-token: + post: + operationId: link_token_create + description: Creates a link token to be used when linking a new end user. + tags: + - link-token + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EndUserDetailsRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/EndUserDetailsRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/EndUserDetailsRequest' + required: true + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/LinkToken' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /filestorage/v1/linked-account-scopes: + get: + operationId: linked_account_scopes_retrieve + description: Get all available permissions for Merge Common Models and fields + for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - scopes + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CommonModelScopeAPI' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + post: + operationId: linked_account_scopes_create + description: Update permissions for any Common Model or field for a single Linked + Account. Any Scopes not set in this POST request will inherit the default + Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes) + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - scopes + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LinkedAccountCommonModelScopeDeserializerRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/LinkedAccountCommonModelScopeDeserializerRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/LinkedAccountCommonModelScopeDeserializerRequest' + required: true + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CommonModelScopeAPI' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /filestorage/v1/linked-accounts: + get: + operationId: linked_accounts_list + description: List linked accounts for your organization. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: query + name: category + schema: + type: string + nullable: true + enum: + - accounting + - ats + - crm + - filestorage + - hris + - mktg + - ticketing + description: |- + Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing` + + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: end_user_email_address + schema: + type: string + description: If provided, will only return linked accounts associated with + the given email address. + - in: query + name: end_user_organization_name + schema: + type: string + description: If provided, will only return linked accounts associated with + the given organization name. + - in: query + name: end_user_origin_id + schema: + type: string + description: If provided, will only return linked accounts associated with + the given origin ID. + - in: query + name: end_user_origin_ids + schema: + type: string + description: Comma-separated list of EndUser origin IDs, making it possible + to specify multiple EndUsers at once. + - in: query + name: id + schema: + type: string + format: uuid + - in: query + name: ids + schema: + type: string + description: Comma-separated list of LinkedAccount IDs, making it possible + to specify multiple LinkedAccounts at once. + - in: query + name: include_duplicates + schema: + type: boolean + description: 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. + - in: query + name: integration_name + schema: + type: string + description: If provided, will only return linked accounts associated with + the given integration name. + - in: query + name: is_test_account + schema: + type: string + description: If included, will only include test linked accounts. If not included, + will only include non-test linked accounts. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: status + schema: + type: string + description: 'Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, + `RELINK_NEEDED`' + tags: + - linked-accounts + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedAccountDetailsAndActionsList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /filestorage/v1/passthrough: + post: + operationId: passthrough_create + description: Pull data from an endpoint not currently supported by Merge. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - passthrough + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DataPassthroughRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/DataPassthroughRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/DataPassthroughRequest' + required: true + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RemoteResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /filestorage/v1/regenerate-key: + post: + operationId: regenerate_key_create + description: Exchange remote keys. + tags: + - regenerate-key + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RemoteKeyForRegenerationRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/RemoteKeyForRegenerationRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/RemoteKeyForRegenerationRequest' + required: true + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RemoteKey' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /filestorage/v1/remote-fields: + get: + operationId: remote_fields_retrieve + description: Get all remote fields for a Linked Account. Remote fields are third-party + fields that are accessible after initial sync if remote_data is enabled. You + can use remote fields to override existing Merge fields or map a new Merge + field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: common_models + schema: + type: string + description: A comma seperated list of Common Model names. If included, will + only return Remote Fields for those Common Models. + - in: query + name: include_example_values + schema: + type: string + description: 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. + tags: + - field-mapping + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RemoteFieldAPIResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /filestorage/v1/sync-status: + get: + operationId: sync_status_list + description: 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). + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - sync-status + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedSyncStatusList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /filestorage/v1/sync-status/resync: + post: + operationId: 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. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - force-resync + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SyncStatus' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /filestorage/v1/target-fields: + get: + operationId: target_fields_retrieve + description: Get all organization-wide Target Fields, this will not include + any Linked Account specific Target Fields. Organization-wide Target Fields + are additional fields appended to the Merge Common Model for all Linked Accounts + in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - field-mapping + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ExternalTargetFieldAPIResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /filestorage/v1/users: + get: + operationId: users_list + description: Returns a list of `User` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: is_me + schema: + type: string + description: If provided, will only return the user object for requestor. + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + tags: + - users + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedUserList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /filestorage/v1/users/{id}: + get: + operationId: users_retrieve + description: Returns a `User` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - users + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/User' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /filestorage/v1/webhook-receivers: + get: + operationId: webhook_receivers_list + description: Returns a list of `WebhookReceiver` objects. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - webhook-receivers + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/WebhookReceiver' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + post: + operationId: webhook_receivers_create + description: Creates a `WebhookReceiver` object with the given values. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - webhook-receivers + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/WebhookReceiverRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/WebhookReceiverRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/WebhookReceiverRequest' + required: true + security: + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/WebhookReceiver' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC +components: + schemas: + AccountDetails: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + example: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd + integration: + type: string + readOnly: true + example: BambooHR + integration_slug: + type: string + readOnly: true + example: bamboohr + category: + oneOf: + - $ref: '#/components/schemas/CategoryEnum' + - type: string + nullable: true + example: hris + end_user_origin_id: + type: string + readOnly: true + example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + end_user_organization_name: + type: string + readOnly: true + example: Waystar Royco + end_user_email_address: + type: string + format: email + readOnly: true + example: kendall.roy@waystar-royco.com + status: + type: string + readOnly: true + example: COMPLETE + webhook_listener_url: + type: string + format: uri + readOnly: true + example: https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 + is_duplicate: + type: boolean + nullable: true + readOnly: true + description: Whether a Production Linked Account's credentials match another + existing Production Linked Account. This field is `null` for Test Linked + Accounts, incomplete Production Linked Accounts, and ignored duplicate + Production Linked Account sets. + example: true + account_type: + type: string + readOnly: true + example: PRODUCTION + completed_at: + type: string + format: date-time + nullable: true + description: The time at which account completes the linking flow. + example: '2024-08-26T20:11:19.277118Z' + x-merge-category: filestorage + AccountDetailsAndActions: + type: object + description: |- + # The LinkedAccount Object + ### Description + The `LinkedAccount` object is used to represent an end user's link with a specific integration. + + ### Usage Example + View a list of your organization's `LinkedAccount` objects. + properties: + id: + type: string + example: e59b1821-f85c-4e28-a6b3-1804156f3563 + category: + oneOf: + - $ref: '#/components/schemas/CategoryEnum' + - type: string + example: hris + status: + oneOf: + - $ref: '#/components/schemas/AccountDetailsAndActionsStatusEnum' + - type: string + example: INCOMPLETE + status_detail: + type: string + example: Invalid login credentials + end_user_origin_id: + type: string + example: 3ac95cde-6c7f-4eef-afec-be710b42308d + end_user_organization_name: + type: string + example: Foo Bar, LLC + end_user_email_address: + type: string + example: hradmin@foobar.dev + subdomain: + type: string + description: The tenant or domain the customer has provided access to. + example: foobar + webhook_listener_url: + type: string + example: https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 + is_duplicate: + type: boolean + nullable: true + description: Whether a Production Linked Account's credentials match another + existing Production Linked Account. This field is `null` for Test Linked + Accounts, incomplete Production Linked Accounts, and ignored duplicate + Production Linked Account sets. + example: true + integration: + $ref: '#/components/schemas/AccountDetailsAndActionsIntegration' + example: + name: SAP SuccessFactors + categories: + - hris + - ats + image: https://cdn.merge.dev/SuccessFactors_Logo.png + square_image: https://cdn.merge.dev/SuccessFactors_Square_Logo.jpg + color: '#F6A704' + slug: sap-successfactors + passthrough_available: true + available_model_operations: + - model_name: Candidate + available_operations: + - FETCH + - CREATE + required_post_parameters: + - remote_user_id + supported_fields: + - first_name + - last_name + - company + - title + account_type: + type: string + example: PRODUCTION + completed_at: + type: string + format: date-time + example: '2024-08-26T20:11:19.277118Z' + required: + - account_type + - completed_at + - end_user_email_address + - end_user_organization_name + - id + - status + - webhook_listener_url + x-merge-sample-json: '{"id": "e59b1821-f85c-4e28-a6b3-1804156f3563", "category": + "hris", "status": "INCOMPLETE", "status_detail": "Invalid login credentials", + "end_user_origin_id": "3ac95cde-6c7f-4eef-afec-be710b42308d", "end_user_organization_name": + "Foo Bar, LLC", "end_user_email_address": "hradmin@foobar.dev", "webhook_listener_url": + "https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4", + "is_duplicate": true, "integration": {"name": "SAP SuccessFactors", "categories": + ["hris", "ats"], "image": "https://cdn.merge.dev/SuccessFactors_Logo.png", + "square_image": "https://cdn.merge.dev/SuccessFactors_Square_Logo.jpg", "color": + "#F6A704", "slug": "sap-successfactors", "passthrough_available": true, "available_model_operations": + [{"model_name": "Candidate", "available_operations": ["FETCH", "CREATE"], + "required_post_parameters": ["remote_user_id"], "supported_fields": ["first_name", + "last_name", "company", "title"]}]}}' + x-merge-category: filestorage + AccountDetailsAndActionsIntegration: + type: object + properties: + name: + type: string + categories: + type: array + items: + $ref: '#/components/schemas/CategoriesEnum' + image: + type: string + square_image: + type: string + color: + type: string + slug: + type: string + passthrough_available: + type: boolean + available_model_operations: + type: array + items: + $ref: '#/components/schemas/ModelOperation' + required: + - categories + - color + - name + - passthrough_available + - slug + x-merge-category: filestorage + AccountDetailsAndActionsStatusEnum: + enum: + - COMPLETE + - INCOMPLETE + - RELINK_NEEDED + - IDLE + type: string + description: |- + * `COMPLETE` - COMPLETE + * `INCOMPLETE` - INCOMPLETE + * `RELINK_NEEDED` - RELINK_NEEDED + * `IDLE` - IDLE + x-merge-category: filestorage + AccountIntegration: + type: object + properties: + name: + type: string + description: Company name. + abbreviated_name: + type: string + nullable: true + description: "Optional. This shortened name appears in places with limited + space, usually in conjunction with the platform's logo (e.g., Merge Link + menu).

Example: Workforce Now (in lieu of ADP Workforce Now), + SuccessFactors (in lieu of SAP SuccessFactors)" + categories: + type: array + items: + $ref: '#/components/schemas/CategoriesEnum' + description: Category or categories this integration belongs to. Multiple + categories should be comma separated, i.e. [ats, hris]. + readOnly: true + image: + type: string + format: uri + nullable: true + description: Company logo in rectangular shape. + square_image: + type: string + format: uri + nullable: true + description: Company logo in square shape. + color: + type: string + description: The color of this integration used for buttons and text throughout + the app and landing pages. Choose a darker, saturated color. + pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ + maxLength: 18 + slug: + type: string + readOnly: true + api_endpoints_to_documentation_urls: + type: object + additionalProperties: {} + description: "Mapping of API endpoints to documentation urls for support. + Example: {'GET': [['/common-model-scopes', 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', + 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], + 'POST': []}" + webhook_setup_guide_url: + type: string + nullable: true + description: Setup guide URL for third party webhook creation. Exposed in + Merge Docs. + category_beta_status: + type: object + description: Category or categories this integration is in beta status for. + readOnly: true + required: + - name + x-merge-category: filestorage + AccountToken: + type: object + properties: + account_token: + type: string + example: T9klMDQrcHdm9jrtHuOS2Nf06BIHwMNjpPXPMB + integration: + $ref: '#/components/schemas/AccountIntegration' + example: + name: SAP SuccessFactors + categories: + - hris + - ats + image: https://cdn.merge.dev/SuccessFactors_Logo.png + square_image: https://cdn.merge.dev/SuccessFactors_Square_Logo.jpg + color: '#F6A704' + slug: sap-successfactors + id: + type: string + example: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd + required: + - account_token + - id + - integration + x-merge-category: filestorage + AdvancedMetadata: + type: object + properties: + id: + type: string + format: uuid + display_name: + type: string + description: + type: string + is_required: + type: boolean + is_custom: + type: boolean + field_choices: + type: array + items: {} + required: + - id + x-merge-category: filestorage + AsyncPassthroughReciept: + type: object + properties: + async_passthrough_receipt_id: + type: string + format: uuid + example: fd29020f-2695-445e-922e-dcd5e81903fd + required: + - async_passthrough_receipt_id + x-merge-category: filestorage + AuditLogEvent: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + example: b5ceea2a-7171-47ce-8090-165cfce5572c + user_name: + type: string + nullable: true + description: The User's full name at the time of this Event occurring. + maxLength: 200 + example: Gil Feig + user_email: + type: string + format: email + nullable: true + description: The User's email at the time of this Event occurring. + maxLength: 254 + example: hello@merge.dev + role: + oneOf: + - $ref: '#/components/schemas/RoleEnum' + - type: string + description: |- + Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. + + * `ADMIN` - ADMIN + * `DEVELOPER` - DEVELOPER + * `MEMBER` - MEMBER + * `API` - API + * `SYSTEM` - SYSTEM + * `MERGE_TEAM` - MERGE_TEAM + example: ADMIN + ip_address: + type: string + maxLength: 45 + example: 192.0.2.123 + event_type: + oneOf: + - $ref: '#/components/schemas/EventTypeEnum' + - type: string + description: |- + Designates the type of event that occurred. + + * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + * `INVITED_USER` - INVITED_USER + * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + * `CREATED_DESTINATION` - CREATED_DESTINATION + * `DELETED_DESTINATION` - DELETED_DESTINATION + * `CHANGED_DESTINATION` - CHANGED_DESTINATION + * `CHANGED_SCOPES` - CHANGED_SCOPES + * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + * `ENABLED_CATEGORY` - ENABLED_CATEGORY + * `DISABLED_CATEGORY` - DISABLED_CATEGORY + * `CHANGED_PASSWORD` - CHANGED_PASSWORD + * `RESET_PASSWORD` - RESET_PASSWORD + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING + * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING + * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING + * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING + * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + * `MUTED_ISSUE` - MUTED_ISSUE + * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + example: CHANGED_SCOPES + event_description: + type: string + example: Organization-wide Scopes for model hris.Employee updated from Read + to Read+Write + created_at: + type: string + format: date-time + readOnly: true + required: + - event_description + - event_type + - ip_address + - role + x-merge-category: filestorage + AvailableActions: + type: object + description: |- + # The AvailableActions Object + ### Description + The `Activity` object is used to see all available model/operation combinations for an integration. + + ### Usage Example + Fetch all the actions available for the `Zenefits` integration. + properties: + integration: + $ref: '#/components/schemas/AccountIntegration' + example: + name: Lever + categories: + - ats + image: https://merge-api-production.s3.amazonaws.com/media/Lever_Logo.png + square_image: https://merge-api-production.s3.amazonaws.com/media/Lever_Square_Logo.png + color: '#262A34' + is_in_beta: 'true' + api_endpoints_to_documentation_urls: "{'GET': [('/common-model-scopes', + 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve')], + 'POST': []}" + passthrough_available: + type: boolean + example: true + available_model_operations: + type: array + items: + $ref: '#/components/schemas/ModelOperation' + example: + - model_name: Candidate + available_operations: + - FETCH + - CREATE + required_post_parameters: + - remote_user_id + supported_fields: + - first_name + - last_name + - company + - title + required: + - integration + - passthrough_available + x-merge-category: filestorage + CategoriesEnum: + enum: + - hris + - ats + - accounting + - ticketing + - crm + - mktg + - filestorage + type: string + description: |- + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + x-merge-category: filestorage + CategoryEnum: + enum: + - hris + - ats + - accounting + - ticketing + - crm + - mktg + - filestorage + type: string + description: |- + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + x-merge-category: filestorage + CommonModelScopeAPI: + type: object + properties: + common_models: + type: array + items: + $ref: '#/components/schemas/IndividualCommonModelScopeDeserializer' + description: The common models you want to update the scopes for + example: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - created_at + - custom_fields + - date_of_birth + - first_name + - gender + - remote_created_at + - remote_data + disabled_fields: + - company + - employments + - groups + - home_location + - manager + - work_location + required: + - common_models + x-merge-category: filestorage + CommonModelScopesBodyRequest: + type: object + properties: + model_id: + type: string + minLength: 1 + example: hris.Employee + enabled_actions: + type: array + items: + $ref: '#/components/schemas/EnabledActionsEnum' + example: + - READ + - WRITE + disabled_fields: + type: array + items: + type: string + minLength: 1 + example: + - first_name + required: + - disabled_fields + - enabled_actions + - model_id + x-merge-category: filestorage + CreateFieldMappingRequest: + type: object + properties: + target_field_name: + type: string + minLength: 1 + description: The name of the target field you want this remote field to + map to. + example: example_target_field_name + target_field_description: + type: string + minLength: 1 + description: The description of the target field you want this remote field + to map to. + example: this is a example description of the target field + remote_field_traversal_path: + type: array + items: {} + description: The field traversal path of the remote field listed when you + hit the GET /remote-fields endpoint. + example: + - example_remote_field + remote_method: + type: string + minLength: 1 + description: The method of the remote endpoint where the remote field is + coming from. + example: GET + remote_url_path: + type: string + minLength: 1 + description: The path of the remote endpoint where the remote field is coming + from. + example: /example-url-path + common_model_name: + type: string + minLength: 1 + description: The name of the Common Model that the remote field corresponds + to in a given category. + example: ExampleCommonModel + required: + - common_model_name + - remote_field_traversal_path + - remote_method + - remote_url_path + - target_field_description + - target_field_name + x-merge-category: filestorage + DataPassthroughRequest: + type: object + description: |- + # The DataPassthrough Object + ### Description + The `DataPassthrough` object is used to send information to an otherwise-unsupported third-party endpoint. + + ### Usage Example + Create a `DataPassthrough` to get team hierarchies from your Rippling integration. + properties: + method: + allOf: + - $ref: '#/components/schemas/MethodEnum' + example: POST + path: + type: string + minLength: 1 + description: The path of the request in the third party's platform. + example: /scooters + base_url_override: + type: string + nullable: true + minLength: 1 + description: An optional override of the third party's base url for the + request. + example: https://api.example.com + data: + type: string + nullable: true + minLength: 1 + description: The data with the request. You must include a `request_format` + parameter matching the data's format + example: '{"company": "Lime", "model": "Gen 2.5"}' + multipart_form_data: + type: array + items: + $ref: '#/components/schemas/MultipartFormFieldRequest' + nullable: true + description: Pass an array of `MultipartFormField` objects in here instead + of using the `data` param if `request_format` is set to `MULTIPART`. + headers: + type: object + additionalProperties: {} + nullable: true + description: The headers to use for the request (Merge will handle the account's + authorization headers). `Content-Type` header is required for passthrough. + Choose content type corresponding to expected format of receiving server. + example: + EXTRA-HEADER: value + request_format: + allOf: + - $ref: '#/components/schemas/RequestFormatEnum' + nullable: true + example: JSON + normalize_response: + type: boolean + description: 'Optional. If true, the response will always be an object of + the form `{"type": T, "value": ...}` where `T` will be one of `string, + boolean, number, null, array, object`.' + required: + - method + - path + x-merge-category: filestorage + DebugModeLog: + type: object + properties: + log_id: + type: string + example: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: + type: string + example: https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + $ref: '#/components/schemas/DebugModelLogSummary' + example: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + required: + - dashboard_view + - log_id + - log_summary + x-merge-sample-json: '{"log_id": "99433219-8017-4acd-bb3c-ceb23d663832", "dashboard_view": + "https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832", "log_summary": + {"url": "www.exampleintegration.com/api/v1/exampleapi", "method": "POST", + "status_code": 200}}' + x-merge-category: filestorage + DebugModelLogSummary: + type: object + properties: + url: + type: string + example: www.exampleintegration.com/api/v1/exampleapi + method: + type: string + example: POST + status_code: + type: integer + example: 200 + required: + - method + - status_code + - url + x-merge-sample-json: '{"url": "www.exampleintegration.com/api/v1/exampleapi", + "method": "POST", "status_code": 200}' + x-merge-category: filestorage + DownloadRequestMeta: + type: object + properties: + id: + type: string + example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + url: + type: string + example: https://www.googleapis.com/drive/v3/files/234?alt=media + method: + type: string + example: GET + headers: + type: object + additionalProperties: {} + example: + Authorization: Bearer 1234 + required: + - headers + - id + - method + - url + x-merge-category: filestorage + Drive: + type: object + description: |- + # The Drive Object + ### Description + The `Drive` object is used to represent a drive that contains the folders and files in the user's workspace. + ### Usage Example + Fetch from the `GET /api/filestorage/v1/drives` endpoint and view their drives. + properties: + id: + type: string + format: uuid + readOnly: true + example: f9e3d315-d6c2-458e-85c4-fa773d6ff4a6 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '2039348' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + name: + type: string + nullable: true + description: The drive's name. + maxLength: 254 + example: My Drive + remote_created_at: + type: string + format: date-time + nullable: true + description: When the third party's drive was created. + drive_url: + type: string + nullable: true + description: The drive's url. + maxLength: 2000 + example: https://drive.com/drives/2039349 + remote_was_deleted: + type: boolean + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /drives + data: + - Varies by platform + x-merge-category: filestorage + EnabledActionsEnum: + enum: + - READ + - WRITE + type: string + description: |- + * `READ` - READ + * `WRITE` - WRITE + x-merge-category: filestorage + EncodingEnum: + enum: + - RAW + - BASE64 + - GZIP_BASE64 + type: string + description: |- + * `RAW` - RAW + * `BASE64` - BASE64 + * `GZIP_BASE64` - GZIP_BASE64 + x-merge-category: filestorage + EndUserDetailsRequest: + type: object + properties: + end_user_email_address: + type: string + minLength: 1 + description: Your end user's email address. This is purely for identification + purposes - setting this value will not cause any emails to be sent. + maxLength: 100 + example: example@gmail.com + end_user_organization_name: + type: string + minLength: 1 + description: Your end user's organization. + maxLength: 100 + example: Test Organization + end_user_origin_id: + type: string + minLength: 1 + description: 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. + maxLength: 100 + example: '12345' + categories: + type: array + items: + $ref: '#/components/schemas/CategoriesEnum' + description: The integration categories to show in Merge Link. + example: + - hris + - ats + integration: + type: string + nullable: true + minLength: 1 + description: 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/. + example: bamboohr + link_expiry_mins: + type: integer + maximum: 10080 + minimum: 30 + default: 30 + description: An integer number of minutes between [30, 720 or 10080 if for + a Magic Link URL] for how long this token is valid. Defaults to 30. + should_create_magic_link_url: + type: boolean + nullable: true + default: false + description: Whether to generate a Magic Link URL. Defaults to false. For + more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. + hide_admin_magic_link: + type: boolean + nullable: true + default: false + description: 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: + type: array + items: + $ref: '#/components/schemas/CommonModelScopesBodyRequest' + nullable: true + description: An array of objects to specify the models and fields that will + be disabled for a given Linked Account. Each object uses model_id, enabled_actions, + and disabled_fields to specify the model, method, and fields that are + scoped for a given Linked Account. + category_common_model_scopes: + type: object + additionalProperties: + type: array + items: + $ref: '#/components/schemas/IndividualCommonModelScopeDeserializerRequest' + nullable: true + description: 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. + example: + hris: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: true + field_permissions: + enabled_fields: + - first_name + - last_name + - personal_email + disabled_fields: + - preferred_name + - model_name: Employment + model_permissions: + READ: + is_enabled: false + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - effective_date + ats: + - model_name: Job + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: true + field_permissions: + enabled_fields: + - name + disabled_fields: + - description + - model_name: Department + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: true + language: + oneOf: + - $ref: '#/components/schemas/LanguageEnum' + - type: string + nullable: true + description: |- + The following subset of IETF language tags can be used to configure localization. + + * `en` - en + * `de` - de + example: en + are_syncs_disabled: + type: boolean + nullable: true + default: false + description: The boolean that indicates whether initial, periodic, and force + syncs will be disabled. + integration_specific_config: + type: object + additionalProperties: {} + nullable: true + description: A JSON object containing integration-specific configuration + options. + example: + rippling: + oauth_code: 3h1jj8ssdf31dfji3o1jjdfjasd + required: + - categories + - end_user_email_address + - end_user_organization_name + - end_user_origin_id + x-merge-category: filestorage + ErrorValidationProblem: + type: object + properties: + source: + $ref: '#/components/schemas/ValidationProblemSource' + example: + pointer: /model/custom_fields + title: + type: string + example: Missing Required Field + detail: + type: string + example: custom_fields is a required field on model. + problem_type: + type: string + example: MISSING_REQUIRED_FIELD + required: + - detail + - problem_type + - title + x-merge-category: filestorage + EventTypeEnum: + enum: + - 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 + type: string + description: |- + * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + * `INVITED_USER` - INVITED_USER + * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + * `CREATED_DESTINATION` - CREATED_DESTINATION + * `DELETED_DESTINATION` - DELETED_DESTINATION + * `CHANGED_DESTINATION` - CHANGED_DESTINATION + * `CHANGED_SCOPES` - CHANGED_SCOPES + * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + * `ENABLED_CATEGORY` - ENABLED_CATEGORY + * `DISABLED_CATEGORY` - DISABLED_CATEGORY + * `CHANGED_PASSWORD` - CHANGED_PASSWORD + * `RESET_PASSWORD` - RESET_PASSWORD + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING + * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING + * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING + * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING + * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + * `MUTED_ISSUE` - MUTED_ISSUE + * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + x-merge-category: filestorage + ExternalTargetFieldAPI: + type: object + properties: + name: + type: string + nullable: true + readOnly: true + example: example_target_field_name + description: + type: string + nullable: true + readOnly: true + example: this is a example description of a target field + is_mapped: + type: string + nullable: true + readOnly: true + example: true + x-merge-category: filestorage + ExternalTargetFieldAPIResponse: + type: object + properties: + File: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + Folder: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + Drive: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + Group: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + User: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + x-merge-category: filestorage + FieldMappingApiInstance: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: + type: boolean + readOnly: true + target_field: + type: object + properties: + name: + type: string + description: + type: string + is_organization_wide: + type: boolean + required: + - description + - is_organization_wide + - name + nullable: true + readOnly: true + example: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + type: object + properties: + remote_key_name: + type: string + nullable: true + schema: + type: object + additionalProperties: {} + nullable: true + remote_endpoint_info: + type: object + properties: + method: + type: string + nullable: true + url_path: + type: string + nullable: true + field_traversal_path: + type: array + items: + type: string + nullable: true + required: + - field_traversal_path + - method + - url_path + required: + - remote_endpoint_info + - remote_key_name + - schema + nullable: true + readOnly: true + example: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + x-merge-category: filestorage + FieldMappingApiInstanceResponse: + type: object + properties: + File: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + Folder: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + Drive: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + Group: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + User: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + x-merge-category: filestorage + FieldMappingInstanceResponse: + type: object + properties: + model: + $ref: '#/components/schemas/FieldMappingApiInstance' + warnings: + type: array + items: + $ref: '#/components/schemas/WarningValidationProblem' + errors: + type: array + items: + $ref: '#/components/schemas/ErrorValidationProblem' + logs: + type: array + items: + $ref: '#/components/schemas/DebugModeLog' + required: + - errors + - model + - warnings + x-merge-category: filestorage + FieldPermissionDeserializer: + type: object + properties: + enabled_fields: + type: array + items: {} + disabled_fields: + type: array + items: {} + x-merge-category: filestorage + FieldPermissionDeserializerRequest: + type: object + properties: + enabled_fields: + type: array + items: {} + disabled_fields: + type: array + items: {} + x-merge-category: filestorage + File: + type: object + description: |- + # The File Object + ### Description + The `File` object is used to represent a file in the workspace. The Object typically exists under a folder or drive, if it exists. + ### Usage Example + Fetch from the `GET /api/filestorage/v1/files` endpoint and view their files. + properties: + id: + type: string + format: uuid + readOnly: true + example: 45ce474c-dhcj-43a6-754r-629f799f7d68 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '12' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + name: + type: string + nullable: true + description: The file's name. + maxLength: 254 + example: merge_file_storage_launch.docx + file_url: + type: string + nullable: true + description: The URL to access the file. + maxLength: 2000 + example: https://drive.com/1234 + file_thumbnail_url: + type: string + nullable: true + description: The URL that produces a thumbnail preview of the file. Typically + an image. + maxLength: 2000 + example: https://drive.com/1234/thumbnail.png + size: + type: integer + maximum: 9223372036854776000 + minimum: -9223372036854776000 + format: int64 + nullable: true + description: The file's size, in bytes. + example: 254 + mime_type: + type: string + nullable: true + description: The file's mime type. + maxLength: 128 + example: application/vnd.openxmlformats-officedocument.wordprocessingml.document + description: + type: string + nullable: true + description: The file's description. + maxLength: 2000 + example: Use common model scopes to redact data returned in Merge's Common + Models! + folder: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Folder' + nullable: true + description: The folder that the file belongs to. + example: 8e889422-e086-42dc-b99e-24d732039b0b + x-merge-expands-to: Folder + checksum: + type: object + additionalProperties: {} + nullable: true + description: This field stores file checksum data. 'type' indicates the + algorithm (e.g. crc_32, sha1, sha256, quickXor, or md5), and 'content_hash' + is the unique hash used to verify file integrity and detect alterations. + example: + type: sha256 + content_hash: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 + permissions: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Permission' + - type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Permission' + description: The Permission object is used to represent a user's or group's + access to a File or Folder. Permissions are unexpanded by default. Use + the query param `expand=permissions` to see more details under `GET /files`. + example: + - id: 31ce489c-asdf-68b1-754r-629f799f7123 + remote_id: '102895' + created_at: '2020-03-31T00:00:00Z' + modified_at: '2020-06-20T00:00:00Z' + user: 21ce474c-asdf-34a2-754r-629f799f7d12 + group: + type: USER + roles: + - OWNER + remote_data: + - id: 2ea7db93-1ae9-4686-82c9-35c768000736 + remote_id: + created_at: '2020-03-31T00:00:00Z' + modified_at: '2020-06-20T00:00:00Z' + user: + group: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + type: GROUP + roles: + - READ + remote_data: + x-merge-expands-to: Permission + drive: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Drive' + nullable: true + description: The drive that the file belongs to. + example: 204ca79c-0c86-4f6c-9ca6-61b946a4708a + x-merge-expands-to: Drive + remote_created_at: + type: string + format: date-time + nullable: true + description: When the third party's file was created. + example: '2022-02-02T00:00:00Z' + remote_updated_at: + type: string + format: date-time + nullable: true + description: When the third party's file was updated. + example: '2022-02-03T00:00:00Z' + remote_was_deleted: + type: boolean + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /files + data: + - Varies by platform + x-merge-sdk-classname-alias: FileStorageFile + x-merge-sdk-classname-original: File + x-merge-expands: '{"drive": "Drive", "folder": "Folder", "permissions": "Permission"}' + x-merge-category: filestorage + FileRequest: + type: object + description: |- + # The File Object + ### Description + The `File` object is used to represent a file in the workspace. The Object typically exists under a folder or drive, if it exists. + ### Usage Example + Fetch from the `GET /api/filestorage/v1/files` endpoint and view their files. + properties: + name: + type: string + nullable: true + description: The file's name. + maxLength: 254 + example: merge_file_storage_launch.docx + file_url: + type: string + nullable: true + description: The URL to access the file. + maxLength: 2000 + example: https://drive.com/1234 + file_thumbnail_url: + type: string + nullable: true + description: The URL that produces a thumbnail preview of the file. Typically + an image. + maxLength: 2000 + example: https://drive.com/1234/thumbnail.png + size: + type: integer + maximum: 9223372036854776000 + minimum: -9223372036854776000 + format: int64 + nullable: true + description: The file's size, in bytes. + example: 254 + mime_type: + type: string + nullable: true + description: The file's mime type. + maxLength: 128 + example: application/vnd.openxmlformats-officedocument.wordprocessingml.document + description: + type: string + nullable: true + description: The file's description. + maxLength: 2000 + example: Use common model scopes to redact data returned in Merge's Common + Models! + folder: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Folder' + nullable: true + description: The folder that the file belongs to. + example: 8e889422-e086-42dc-b99e-24d732039b0b + x-merge-expands-to: Folder + checksum: + type: object + additionalProperties: {} + nullable: true + description: This field stores file checksum data. 'type' indicates the + algorithm (e.g. crc_32, sha1, sha256, quickXor, or md5), and 'content_hash' + is the unique hash used to verify file integrity and detect alterations. + example: + type: sha256 + content_hash: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 + permissions: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/PermissionRequest' + - type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/PermissionRequest' + description: The Permission object is used to represent a user's or group's + access to a File or Folder. Permissions are unexpanded by default. Use + the query param `expand=permissions` to see more details under `GET /files`. + example: + - id: 31ce489c-asdf-68b1-754r-629f799f7123 + remote_id: '102895' + created_at: '2020-03-31T00:00:00Z' + modified_at: '2020-06-20T00:00:00Z' + user: 21ce474c-asdf-34a2-754r-629f799f7d12 + group: + type: USER + roles: + - OWNER + remote_data: + - id: 2ea7db93-1ae9-4686-82c9-35c768000736 + remote_id: + created_at: '2020-03-31T00:00:00Z' + modified_at: '2020-06-20T00:00:00Z' + user: + group: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + type: GROUP + roles: + - READ + remote_data: + x-merge-expands-to: Permission + drive: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Drive' + nullable: true + description: The drive that the file belongs to. + example: 204ca79c-0c86-4f6c-9ca6-61b946a4708a + x-merge-expands-to: Drive + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + x-merge-sdk-classname-alias: FileStorageFile + x-merge-sdk-classname-original: File + x-merge-expands: '{"drive": "Drive", "folder": "Folder", "permissions": "Permission"}' + x-merge-category: filestorage + FileStorageFileEndpointRequest: + type: object + properties: + model: + $ref: '#/components/schemas/FileRequest' + required: + - model + x-merge-category: filestorage + FileStorageFileResponse: + type: object + properties: + model: + $ref: '#/components/schemas/File' + warnings: + type: array + items: + $ref: '#/components/schemas/WarningValidationProblem' + errors: + type: array + items: + $ref: '#/components/schemas/ErrorValidationProblem' + logs: + type: array + items: + $ref: '#/components/schemas/DebugModeLog' + required: + - errors + - model + - warnings + x-merge-category: filestorage + FileStorageFolderEndpointRequest: + type: object + properties: + model: + $ref: '#/components/schemas/FolderRequest' + required: + - model + x-merge-category: filestorage + FileStorageFolderResponse: + type: object + properties: + model: + $ref: '#/components/schemas/Folder' + warnings: + type: array + items: + $ref: '#/components/schemas/WarningValidationProblem' + errors: + type: array + items: + $ref: '#/components/schemas/ErrorValidationProblem' + logs: + type: array + items: + $ref: '#/components/schemas/DebugModeLog' + required: + - errors + - model + - warnings + x-merge-category: filestorage + Folder: + type: object + description: |- + # The Folder Object + ### Description + The `Folder` object is used to represent a collection of files and/or folders in the workspace. Could be within a drive, if it exists. + ### Usage Example + Fetch from the `GET /api/filestorage/v1/folders` endpoint and view their folders. + properties: + id: + type: string + format: uuid + readOnly: true + example: e021f7a7-74fc-4487-8e12-14180c92d3b7 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '14' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + name: + type: string + nullable: true + description: The folder's name. + maxLength: 254 + example: R&D + folder_url: + type: string + nullable: true + description: The URL to access the folder. + maxLength: 2000 + example: https://drive.com/1234 + size: + type: integer + maximum: 9223372036854776000 + minimum: -9223372036854776000 + format: int64 + nullable: true + description: The folder's size, in bytes. + example: 2738000 + description: + type: string + nullable: true + description: The folder's description. + maxLength: 2000 + example: All things R&D related at Merge! + parent_folder: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Folder' + nullable: true + description: The folder that the folder belongs to. + example: 47ce474c-asdf-34a2-754r-629f799f7d31 + x-merge-expands-to: Folder + drive: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Drive' + nullable: true + description: The drive that the folder belongs to. + example: 31ce474c-asdf-34a2-754r-629f799f7d12 + x-merge-expands-to: Drive + permissions: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Permission' + - type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Permission' + description: The Permission object is used to represent a user's or group's + access to a File or Folder. Permissions are unexpanded by default. Use + the query param `expand=permissions` to see more details under `GET /folders`. + example: + - id: 105b9265-0d52-4e5c-bb88-0cb681ec77f6 + remote_id: '102895' + created_at: '2020-03-31T00:00:00Z' + modified_at: '2020-06-20T00:00:00Z' + user: 21ce474c-asdf-34a2-754r-629f799f7d12 + group: + type: USER + roles: + - OWNER + remote_data: + - id: a77ac1b4-a04f-4baa-a388-de3c0c173e1c + remote_id: + created_at: '2020-03-31T00:00:00Z' + modified_at: '2020-06-20T00:00:00Z' + user: + group: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + type: GROUP + roles: + - READ + remote_data: + x-merge-expands-to: Permission + remote_created_at: + type: string + format: date-time + nullable: true + description: When the third party's folder was created. + example: '2024-02-02T00:00:00Z' + remote_updated_at: + type: string + format: date-time + nullable: true + description: When the third party's folder was updated. + example: '2024-06-10T00:00:00Z' + remote_was_deleted: + type: boolean + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /folders + data: + - Varies by platform + x-merge-expands: '{"drive": "Drive", "parent_folder": "Folder", "permissions": + "Permission"}' + x-merge-category: filestorage + FolderRequest: + type: object + description: |- + # The Folder Object + ### Description + The `Folder` object is used to represent a collection of files and/or folders in the workspace. Could be within a drive, if it exists. + ### Usage Example + Fetch from the `GET /api/filestorage/v1/folders` endpoint and view their folders. + properties: + name: + type: string + nullable: true + description: The folder's name. + maxLength: 254 + example: R&D + folder_url: + type: string + nullable: true + description: The URL to access the folder. + maxLength: 2000 + example: https://drive.com/1234 + size: + type: integer + maximum: 9223372036854776000 + minimum: -9223372036854776000 + format: int64 + nullable: true + description: The folder's size, in bytes. + example: 2738000 + description: + type: string + nullable: true + description: The folder's description. + maxLength: 2000 + example: All things R&D related at Merge! + parent_folder: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Folder' + nullable: true + description: The folder that the folder belongs to. + example: 47ce474c-asdf-34a2-754r-629f799f7d31 + x-merge-expands-to: Folder + drive: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Drive' + nullable: true + description: The drive that the folder belongs to. + example: 31ce474c-asdf-34a2-754r-629f799f7d12 + x-merge-expands-to: Drive + permissions: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/PermissionRequest' + - type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/PermissionRequest' + description: The Permission object is used to represent a user's or group's + access to a File or Folder. Permissions are unexpanded by default. Use + the query param `expand=permissions` to see more details under `GET /folders`. + example: + - id: 105b9265-0d52-4e5c-bb88-0cb681ec77f6 + remote_id: '102895' + created_at: '2020-03-31T00:00:00Z' + modified_at: '2020-06-20T00:00:00Z' + user: 21ce474c-asdf-34a2-754r-629f799f7d12 + group: + type: USER + roles: + - OWNER + remote_data: + - id: a77ac1b4-a04f-4baa-a388-de3c0c173e1c + remote_id: + created_at: '2020-03-31T00:00:00Z' + modified_at: '2020-06-20T00:00:00Z' + user: + group: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + type: GROUP + roles: + - READ + remote_data: + x-merge-expands-to: Permission + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + x-merge-expands: '{"drive": "Drive", "parent_folder": "Folder", "permissions": + "Permission"}' + x-merge-category: filestorage + GenerateRemoteKeyRequest: + type: object + description: |- + # The GenerateRemoteKey Object + ### Description + The `GenerateRemoteKey` object is used to represent a request for a new remote key. + + ### Usage Example + Post a `GenerateRemoteKey` to create a new remote key. + properties: + name: + type: string + minLength: 1 + description: The name of the remote key + example: Remote Deployment Key 1 + required: + - name + x-merge-category: filestorage + Group: + type: object + description: |- + # The Group Object + ### Description + The `Group` object is used to represent any subset of `Users`. This can extend to company domains as well. + ### Usage Example + Fetch from the `GET /api/filestorage/v1/groups` endpoint and view their groups. + properties: + id: + type: string + format: uuid + readOnly: true + example: 5624aceb-0ea2-4864-ba08-354ac56b9884 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '19202938' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + name: + type: string + nullable: true + description: The group's name. + maxLength: 254 + example: Administrators + users: + type: array + items: + type: string + format: uuid + description: The users that belong in the group. If null, this typically + means it's either a domain or the third-party platform does not surface + this information. + example: + - 6e93361b-8ae7-444b-bfa2-71206cbbee24 + child_groups: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Group' + readOnly: true + description: Groups that inherit the permissions of the parent group. + example: + - a1f90b3c-633d-404e-a696-05cd54808676 + x-merge-expands-to: Group + remote_was_deleted: + type: boolean + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /groups + data: + - Varies by platform + required: + - users + x-merge-expands: '{"child_groups": "Group"}' + x-merge-category: filestorage + IndividualCommonModelScopeDeserializer: + type: object + properties: + model_name: + type: string + model_permissions: + type: object + additionalProperties: + $ref: '#/components/schemas/ModelPermissionDeserializer' + field_permissions: + $ref: '#/components/schemas/FieldPermissionDeserializer' + required: + - model_name + x-merge-category: filestorage + IndividualCommonModelScopeDeserializerRequest: + type: object + properties: + model_name: + type: string + minLength: 1 + model_permissions: + type: object + additionalProperties: + $ref: '#/components/schemas/ModelPermissionDeserializerRequest' + field_permissions: + $ref: '#/components/schemas/FieldPermissionDeserializerRequest' + required: + - model_name + x-merge-category: filestorage + Issue: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + status: + oneOf: + - $ref: '#/components/schemas/IssueStatusEnum' + - type: string + description: |- + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + example: ONGOING + error_description: + type: string + example: Missing Permissions + end_user: + type: object + additionalProperties: {} + readOnly: true + example: b82302de-852e-4e60-b050-edf9da3b7c02 + first_incident_time: + type: string + format: date-time + nullable: true + example: '2022-12-05T16:19:15.161Z' + last_incident_time: + type: string + format: date-time + nullable: true + example: '2022-12-05T16:19:15.161Z' + is_muted: + type: boolean + readOnly: true + example: true + error_details: + type: array + items: + type: string + readOnly: true + example: + - Missing employee permissions. + - Missing time off permissions. + required: + - error_description + x-merge-category: filestorage + IssueStatusEnum: + enum: + - ONGOING + - RESOLVED + type: string + description: |- + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + x-merge-category: filestorage + LanguageEnum: + enum: + - en + - de + type: string + description: |- + * `en` - en + * `de` - de + x-merge-category: filestorage + LastSyncResultEnum: + enum: + - SYNCING + - DONE + - FAILED + - DISABLED + - PAUSED + - PARTIALLY_SYNCED + type: string + description: |- + * `SYNCING` - SYNCING + * `DONE` - DONE + * `FAILED` - FAILED + * `DISABLED` - DISABLED + * `PAUSED` - PAUSED + * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED + x-merge-category: filestorage + LinkToken: + type: object + properties: + link_token: + type: string + example: necdP7FtdASl1fQwm62be2_dM4wBG8_GactqoUV0 + integration_name: + type: string + example: Lever + magic_link_url: + type: string + example: https://link.merge.dev/asdfjkl12345jsndfgi2i83n + required: + - link_token + x-merge-category: filestorage + LinkedAccountCommonModelScopeDeserializerRequest: + type: object + properties: + common_models: + type: array + items: + $ref: '#/components/schemas/IndividualCommonModelScopeDeserializerRequest' + description: The common models you want to update the scopes for + example: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - home_location + disabled_fields: + - work_location + - model_name: Benefit + model_permissions: + WRITE: + is_enabled: false + required: + - common_models + x-merge-category: filestorage + LinkedAccountStatus: + type: object + properties: + linked_account_status: + type: string + can_make_request: + type: boolean + required: + - can_make_request + - linked_account_status + x-merge-category: filestorage + MetaResponse: + type: object + properties: + request_schema: + type: object + additionalProperties: {} + example: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + type: object + additionalProperties: {} + status: + $ref: '#/components/schemas/LinkedAccountStatus' + example: + linked_account_status: COMPLETE + can_make_request: true + has_conditional_params: + type: boolean + has_required_linked_account_params: + type: boolean + required: + - has_conditional_params + - has_required_linked_account_params + - request_schema + x-merge-category: filestorage + MethodEnum: + enum: + - GET + - OPTIONS + - HEAD + - POST + - PUT + - PATCH + - DELETE + type: string + description: |- + * `GET` - GET + * `OPTIONS` - OPTIONS + * `HEAD` - HEAD + * `POST` - POST + * `PUT` - PUT + * `PATCH` - PATCH + * `DELETE` - DELETE + x-merge-category: filestorage + ModelOperation: + type: object + description: |- + # The ModelOperation Object + ### Description + The `ModelOperation` object is used to represent the operations that are currently supported for a given model. + + ### Usage Example + View what operations are supported for the `Candidate` endpoint. + properties: + model_name: + type: string + example: Candidate + available_operations: + type: array + items: + type: string + example: + - FETCH + - CREATE + required_post_parameters: + type: array + items: + type: string + example: + - remote_user_id + supported_fields: + type: array + items: + type: string + example: + - first_name + - last_name + - company + - title + required: + - available_operations + - model_name + - required_post_parameters + - supported_fields + x-merge-category: filestorage + ModelPermissionDeserializer: + type: object + properties: + is_enabled: + type: boolean + x-merge-category: filestorage + ModelPermissionDeserializerRequest: + type: object + properties: + is_enabled: + type: boolean + x-merge-category: filestorage + MultipartFormFieldRequest: + type: object + description: |- + # The MultipartFormField Object + ### Description + The `MultipartFormField` object is used to represent fields in an HTTP request using `multipart/form-data`. + + ### Usage Example + Create a `MultipartFormField` to define a multipart form entry. + properties: + name: + type: string + minLength: 1 + description: The name of the form field + example: resume + data: + type: string + minLength: 1 + description: The data for the form field. + example: SW50ZWdyYXRlIGZhc3QKSW50ZWdyYXRlIG9uY2U= + encoding: + oneOf: + - $ref: '#/components/schemas/EncodingEnum' + - type: string + nullable: true + default: RAW + description: |- + The encoding of the value of `data`. Defaults to `RAW` if not defined. + + * `RAW` - RAW + * `BASE64` - BASE64 + * `GZIP_BASE64` - GZIP_BASE64 + example: BASE64 + file_name: + type: string + nullable: true + minLength: 1 + description: The file name of the form field, if the field is for a file. + example: resume.pdf + content_type: + type: string + nullable: true + minLength: 1 + description: The MIME type of the file, if the field is for a file. + example: application/pdf + required: + - data + - name + x-merge-category: filestorage + PaginatedAccountDetailsAndActionsList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/AccountDetailsAndActions' + x-merge-category: filestorage + PaginatedAuditLogEventList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/AuditLogEvent' + x-merge-category: filestorage + PaginatedDownloadRequestMetaList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/DownloadRequestMeta' + x-merge-category: filestorage + PaginatedDriveList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Drive' + x-merge-category: filestorage + PaginatedFileList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/File' + x-merge-category: filestorage + PaginatedFolderList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Folder' + x-merge-category: filestorage + PaginatedGroupList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Group' + x-merge-category: filestorage + PaginatedIssueList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Issue' + x-merge-category: filestorage + PaginatedSyncStatusList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/SyncStatus' + x-merge-category: filestorage + PaginatedUserList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/User' + x-merge-category: filestorage + PatchedEditFieldMappingRequest: + type: object + properties: + remote_field_traversal_path: + type: array + items: {} + description: The field traversal path of the remote field listed when you + hit the GET /remote-fields endpoint. + example: + - example_remote_field_name + remote_method: + type: string + minLength: 1 + description: The method of the remote endpoint where the remote field is + coming from. + example: GET + remote_url_path: + type: string + minLength: 1 + description: The path of the remote endpoint where the remote field is coming + from. + example: /example-url-path + x-merge-category: filestorage + Permission: + type: object + description: |- + # The Permission Object + ### Description + The Permission object is used to represent a user's or group's access to a File or Folder. Permissions are unexpanded by default. + + ### Usage Example + Fetch from the `GET Files` or `GET Folders` endpoint. Permissions are unexpanded by default. Use the query param `expand=permissions` to see more details. + properties: + id: + type: string + format: uuid + readOnly: true + example: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '340' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + user: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/User' + nullable: true + description: The user that is granted this permission. This will only be + populated if the type is `USER`. + example: 755e0a8e-1c04-444b-980f-51b1c0bdde8a + x-merge-expands-to: User + group: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Group' + nullable: true + description: The group that is granted this permission. This will only be + populated if the type is `GROUP`. + x-merge-expands-to: Group + type: + oneOf: + - $ref: '#/components/schemas/TypeEnum' + - type: string + nullable: true + description: |- + Denotes what type of people have access to the file. + + * `USER` - USER + * `GROUP` - GROUP + * `COMPANY` - COMPANY + * `ANYONE` - ANYONE + example: USER + roles: + type: array + items: + oneOf: + - $ref: '#/components/schemas/RolesEnum' + - type: string + nullable: true + description: |- + The permissions that the user or group has for the File or Folder. + + * `READ` - READ + * `WRITE` - WRITE + * `OWNER` - OWNER + nullable: true + description: 'The permissions that the user or group has for the File or + Folder. It is possible for a user or group to have multiple roles, such + as viewing & uploading. Possible values include: `READ`, `WRITE`, `OWNER`. + In cases where there is no clear mapping, the original value passed through + will be returned.' + example: + - OWNER + x-merge-nested-write-allowed: true + x-merge-expands: '{"group": "Group", "primary_file": "File", "primary_folder": + "Folder", "user": "User"}' + x-merge-category: filestorage + PermissionRequest: + type: object + description: |- + # The Permission Object + ### Description + The Permission object is used to represent a user's or group's access to a File or Folder. Permissions are unexpanded by default. + + ### Usage Example + Fetch from the `GET Files` or `GET Folders` endpoint. Permissions are unexpanded by default. Use the query param `expand=permissions` to see more details. + properties: + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '340' + user: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/User' + nullable: true + description: The user that is granted this permission. This will only be + populated if the type is `USER`. + example: 755e0a8e-1c04-444b-980f-51b1c0bdde8a + x-merge-expands-to: User + group: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Group' + nullable: true + description: The group that is granted this permission. This will only be + populated if the type is `GROUP`. + x-merge-expands-to: Group + type: + oneOf: + - $ref: '#/components/schemas/TypeEnum' + - type: string + nullable: true + description: |- + Denotes what type of people have access to the file. + + * `USER` - USER + * `GROUP` - GROUP + * `COMPANY` - COMPANY + * `ANYONE` - ANYONE + example: USER + roles: + type: array + items: + oneOf: + - $ref: '#/components/schemas/RolesEnum' + - type: string + nullable: true + description: |- + The permissions that the user or group has for the File or Folder. + + * `READ` - READ + * `WRITE` - WRITE + * `OWNER` - OWNER + nullable: true + description: 'The permissions that the user or group has for the File or + Folder. It is possible for a user or group to have multiple roles, such + as viewing & uploading. Possible values include: `READ`, `WRITE`, `OWNER`. + In cases where there is no clear mapping, the original value passed through + will be returned.' + example: + - OWNER + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + x-merge-expands: '{"group": "Group", "primary_file": "File", "primary_folder": + "Folder", "user": "User"}' + x-merge-category: filestorage + RemoteData: + type: object + description: |- + # The RemoteData Object + ### Description + The `RemoteData` object is used to represent the full data pulled from the third-party API for an object. + + ### Usage Example + TODO + properties: + path: + type: string + description: The third-party API path that is being called. + example: /platform-endpoint + data: + readOnly: true + description: The data returned from the third-party for this object in its + original, unnormalized format. + example: + - Varies by platform + required: + - path + x-merge-category: filestorage + RemoteEndpointInfo: + type: object + properties: + method: + type: string + example: GET + url_path: + type: string + example: /example-url-path + field_traversal_path: + type: array + items: {} + example: + - example_key_name + required: + - field_traversal_path + - method + - url_path + x-merge-category: filestorage + RemoteFieldAPI: + type: object + properties: + schema: + type: object + additionalProperties: {} + example: + type: string + remote_key_name: + type: string + example: example_remote_key_name + remote_endpoint_info: + $ref: '#/components/schemas/RemoteEndpointInfo' + example: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + type: array + items: {} + nullable: true + example: + - example + advanced_metadata: + allOf: + - $ref: '#/components/schemas/AdvancedMetadata' + nullable: true + coverage: + oneOf: + - type: integer + - type: number + format: double + nullable: true + readOnly: true + example: 0.33 + required: + - advanced_metadata + - remote_endpoint_info + - remote_key_name + - schema + x-merge-category: filestorage + RemoteFieldAPIResponse: + type: object + properties: + File: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + Folder: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + Drive: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + Group: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + User: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + x-merge-category: filestorage + RemoteKey: + type: object + description: |- + # The RemoteKey Object + ### Description + The `RemoteKey` object is used to represent a request for a new remote key. + + ### Usage Example + Post a `GenerateRemoteKey` to receive a new `RemoteKey`. + properties: + name: + type: string + example: Remote Deployment Key 1 + key: + type: string + example: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA + required: + - key + - name + x-merge-category: filestorage + RemoteKeyForRegenerationRequest: + type: object + description: |- + # The RemoteKeyForRegeneration Object + ### Description + The `RemoteKeyForRegeneration` object is used to exchange an old remote key for a new one + + ### Usage Example + Post a `RemoteKeyForRegeneration` to swap out an old remote key for a new one + properties: + name: + type: string + minLength: 1 + description: The name of the remote key + example: Remote Deployment Key 1 + required: + - name + x-merge-category: filestorage + RemoteResponse: + type: object + description: |- + # The RemoteResponse Object + ### Description + The `RemoteResponse` object is used to represent information returned from a third-party endpoint. + + ### Usage Example + View the `RemoteResponse` returned from your `DataPassthrough`. + properties: + method: + type: string + example: GET + path: + type: string + example: /scooters + status: + type: integer + example: 200 + response: + example: + scooters: + - company: Lime + model: Gen 2.5 + - company: Bird + model: Bird Zero + response_headers: + type: object + additionalProperties: {} + example: + X-Page-Token: value + response_type: + oneOf: + - $ref: '#/components/schemas/ResponseTypeEnum' + - type: string + example: JSON + headers: + type: object + additionalProperties: {} + example: + EXTRA-HEADER: value + Authorization: + required: + - method + - path + - response + - status + x-merge-category: filestorage + RequestFormatEnum: + enum: + - JSON + - XML + - MULTIPART + type: string + description: |- + * `JSON` - JSON + * `XML` - XML + * `MULTIPART` - MULTIPART + x-merge-category: filestorage + ResponseTypeEnum: + enum: + - JSON + - BASE64_GZIP + type: string + description: |- + * `JSON` - JSON + * `BASE64_GZIP` - BASE64_GZIP + x-merge-category: filestorage + RoleEnum: + enum: + - ADMIN + - DEVELOPER + - MEMBER + - API + - SYSTEM + - MERGE_TEAM + type: string + description: |- + * `ADMIN` - ADMIN + * `DEVELOPER` - DEVELOPER + * `MEMBER` - MEMBER + * `API` - API + * `SYSTEM` - SYSTEM + * `MERGE_TEAM` - MERGE_TEAM + x-merge-category: filestorage + RolesEnum: + enum: + - READ + - WRITE + - OWNER + type: string + description: |- + * `READ` - READ + * `WRITE` - WRITE + * `OWNER` - OWNER + x-merge-category: filestorage + SelectiveSyncConfigurationsUsageEnum: + enum: + - IN_NEXT_SYNC + - IN_LAST_SYNC + type: string + description: |- + * `IN_NEXT_SYNC` - IN_NEXT_SYNC + * `IN_LAST_SYNC` - IN_LAST_SYNC + x-merge-category: filestorage + StatusFd5Enum: + enum: + - SYNCING + - DONE + - FAILED + - DISABLED + - PAUSED + - PARTIALLY_SYNCED + type: string + description: |- + * `SYNCING` - SYNCING + * `DONE` - DONE + * `FAILED` - FAILED + * `DISABLED` - DISABLED + * `PAUSED` - PAUSED + * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED + x-merge-category: filestorage + SyncStatus: + type: object + description: |- + # The SyncStatus Object + ### Description + The `SyncStatus` object is used to represent the syncing state of an account + + ### Usage Example + View the `SyncStatus` for an account to see how recently its models were synced. + properties: + model_name: + type: string + example: File + model_id: + type: string + example: filestorage.FileStorageFile + last_sync_start: + type: string + format: date-time + example: '2021-03-30T19:44:18.695973Z' + next_sync_start: + type: string + format: date-time + example: '2021-03-30T20:44:18.662942Z' + last_sync_result: + oneOf: + - $ref: '#/components/schemas/LastSyncResultEnum' + - type: string + example: DONE + last_sync_finished: + type: string + format: date-time + example: '2021-03-30T19:55:18.695973Z' + status: + oneOf: + - $ref: '#/components/schemas/StatusFd5Enum' + - type: string + example: SYNCING + is_initial_sync: + type: boolean + example: true + selective_sync_configurations_usage: + $ref: '#/components/schemas/SelectiveSyncConfigurationsUsageEnum' + required: + - is_initial_sync + - model_id + - model_name + - status + x-merge-sample-json: '{"model_name": "Candidate", "model_id": "ats.Candidate", + "last_sync_start": "2021-03-30T19:44:18.695973Z", "next_sync_start": "2021-03-30T20:44:18.662942Z", + "status": "SYNCING", "is_initial_sync": true}' + x-merge-category: filestorage + TypeEnum: + enum: + - USER + - GROUP + - COMPANY + - ANYONE + type: string + description: |- + * `USER` - USER + * `GROUP` - GROUP + * `COMPANY` - COMPANY + * `ANYONE` - ANYONE + x-merge-category: filestorage + User: + type: object + description: |- + # The User Object + ### Description + The `User` object is used to represent a user within the File Storage account. + ### Usage Example + Fetch from the `GET /api/filestorage/v1/users` endpoint and view their users. + properties: + id: + type: string + format: uuid + readOnly: true + example: 83902e75-4362-4803-b76c-a7d6be292cbd + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '2039349' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + name: + type: string + nullable: true + description: The user's name. + maxLength: 254 + example: Gil Feig + email_address: + type: string + nullable: true + description: The user's email address. This is typically used to identify + a user across linked accounts. + maxLength: 2000 + example: hello@merge.dev + is_me: + type: boolean + description: Whether the user is the one who linked this account. + example: true + remote_was_deleted: + type: boolean + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /users + data: + - Varies by platform + x-merge-expands: '{"roles": "Role", "teams": "Team"}' + x-merge-category: filestorage + ValidationProblemSource: + type: object + properties: + pointer: + type: string + required: + - pointer + x-merge-category: filestorage + WarningValidationProblem: + type: object + properties: + source: + $ref: '#/components/schemas/ValidationProblemSource' + example: + pointer: /age + title: + type: string + example: Unrecognized Field + detail: + type: string + example: An unrecognized field, age, was passed in with request data. + problem_type: + type: string + example: UNRECOGNIZED_FIELD + required: + - detail + - problem_type + - title + x-merge-category: filestorage + WebhookReceiver: + type: object + properties: + event: + type: string + is_active: + type: boolean + key: + type: string + required: + - event + - is_active + x-merge-category: filestorage + WebhookReceiverRequest: + type: object + properties: + event: + type: string + minLength: 1 + is_active: + type: boolean + key: + type: string + minLength: 1 + required: + - event + - is_active + x-merge-category: filestorage + securitySchemes: + tokenAuth: + type: http + scheme: bearer + description: Token-based authentication with required prefix "Bearer" + x-fern-token-variable-name: api_key +servers: +- url: https://api.merge.dev/api/filestorage/v1 + description: Production + x-fern-server-name: Production +- url: https://api-sandbox.merge.dev/api/filestorage/v1 + description: Sandbox + x-fern-server-name: Sandbox +- url: https://api-eu.merge.dev/api/filestorage/v1 + description: Production EU + x-fern-server-name: ProductionEU +- url: https://api-ap.merge.dev/api/filestorage/v1 + description: Production APSE1 + x-fern-server-name: ProductionAPSE1 diff --git a/.mock/hris_v3.yml b/.mock/hris_v3.yml new file mode 100644 index 000000000..0efa7fe6f --- /dev/null +++ b/.mock/hris_v3.yml @@ -0,0 +1,12079 @@ +openapi: 3.0.3 +info: + title: Merge HRIS API + version: '1.0' + description: The unified API for building rich integrations with multiple HR Information + System platforms. + contact: + name: Merge Team + url: https://www.merge.dev/ + email: hello@merge.dev +paths: + /hris/v1/account-details: + get: + operationId: account_details_retrieve + description: Get details for a linked account. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - account-details + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AccountDetails' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /hris/v1/account-token/{public_token}: + get: + operationId: account_token_retrieve + description: Returns the account token for the end user with the provided public + token. + parameters: + - in: path + name: public_token + schema: + type: string + required: true + tags: + - account-token + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AccountToken' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /hris/v1/async-passthrough: + post: + operationId: async_passthrough_create + description: Asynchronously pull data from an endpoint not currently supported + by Merge. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - async-passthrough + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DataPassthroughRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/DataPassthroughRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/DataPassthroughRequest' + required: true + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AsyncPassthroughReciept' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /hris/v1/async-passthrough/{async_passthrough_receipt_id}: + get: + operationId: async_passthrough_retrieve + description: Retrieves data from earlier async-passthrough POST request + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: async_passthrough_receipt_id + schema: + type: string + format: uuid + required: true + tags: + - async-passthrough + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/RemoteResponse' + - type: string + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /hris/v1/audit-trail: + get: + operationId: audit_trail_list + description: Gets a list of audit trail events. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: end_date + schema: + type: string + description: If included, will only include audit trail events that occurred + before this time + - in: query + name: event_type + schema: + type: string + description: 'If included, will only include events with the given event type. + Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, + `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, + `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, + `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`' + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: start_date + schema: + type: string + description: If included, will only include audit trail events that occurred + after this time + - in: query + name: user_email + schema: + type: string + description: 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. + tags: + - audit-trail + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedAuditLogEventList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /hris/v1/available-actions: + get: + operationId: available_actions_retrieve + description: Returns a list of models and actions available for an account. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - available-actions + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AvailableActions' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /hris/v1/bank-info: + get: + operationId: bank_info_list + description: Returns a list of `BankInfo` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: account_type + schema: + type: string + nullable: true + enum: + - CHECKING + - SAVINGS + description: |- + If provided, will only return BankInfo's with this account type. Options: ('SAVINGS', 'CHECKING') + + * `SAVINGS` - SAVINGS + * `CHECKING` - CHECKING + - in: query + name: bank_name + schema: + type: string + nullable: true + description: If provided, will only return BankInfo's with this bank name. + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: employee_id + schema: + type: string + description: If provided, will only return bank accounts for this employee. + examples: + EmployeeId: + summary: employee_id + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - employee + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandEmployee: + value: employee + summary: Expand Employee + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - in: query + name: order_by + schema: + type: string + enum: + - -remote_created_at + - remote_created_at + x-fern-enum: + -remote_created_at: + name: RemoteCreatedAtDescending + remote_created_at: + name: RemoteCreatedAtAscending + description: 'Overrides the default ordering for this endpoint. Possible values + include: remote_created_at, -remote_created_at.' + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_fields + schema: + type: string + enum: + - account_type + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesAccountType: + value: account_type + summary: Original Enum Values Account_type + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + - in: query + name: show_enum_origins + schema: + type: string + enum: + - account_type + description: 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) + examples: + OriginalEnumValuesAccountType: + value: account_type + summary: Original Enum Values Account_type + tags: + - bank-info + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedBankInfoList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /hris/v1/bank-info/{id}: + get: + operationId: bank_info_retrieve + description: Returns a `BankInfo` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - employee + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandEmployee: + value: employee + summary: Expand Employee + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: remote_fields + schema: + type: string + enum: + - account_type + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesAccountType: + value: account_type + summary: Original Enum Values Account_type + - in: query + name: show_enum_origins + schema: + type: string + enum: + - account_type + description: 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) + examples: + OriginalEnumValuesAccountType: + value: account_type + summary: Original Enum Values Account_type + tags: + - bank-info + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/BankInfo' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /hris/v1/benefits: + get: + operationId: benefits_list + description: Returns a list of `Benefit` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: employee_id + schema: + type: string + description: If provided, will return the benefits associated with the employee. + examples: + EmployeeId: + summary: employee_id + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - employee + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandEmployee: + value: employee + summary: Expand Employee + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + tags: + - benefits + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedBenefitList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /hris/v1/benefits/{id}: + get: + operationId: benefits_retrieve + description: Returns a `Benefit` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - employee + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandEmployee: + value: employee + summary: Expand Employee + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - benefits + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Benefit' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /hris/v1/companies: + get: + operationId: companies_list + description: Returns a list of `Company` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + tags: + - companies + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedCompanyList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /hris/v1/companies/{id}: + get: + operationId: companies_retrieve + description: Returns a `Company` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - companies + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Company' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /hris/v1/default-scopes: + get: + operationId: default_scopes_retrieve + description: Get the default permissions for Merge Common Models and fields + across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). + tags: + - scopes + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CommonModelScopeAPI' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /hris/v1/delete-account: + post: + operationId: delete_account_delete + description: Delete a linked account. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - delete-account + security: + - tokenAuth: [] + responses: + '200': + description: No response body + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /hris/v1/dependents: + get: + operationId: dependents_list + description: Returns a list of `Dependent` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_sensitive_fields + schema: + type: boolean + description: Whether to include sensitive fields (such as social security + numbers) in the response. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + tags: + - dependents + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedDependentList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /hris/v1/dependents/{id}: + get: + operationId: dependents_retrieve + description: Returns a `Dependent` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_sensitive_fields + schema: + type: boolean + description: Whether to include sensitive fields (such as social security + numbers) in the response. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - dependents + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Dependent' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /hris/v1/employee-payroll-runs: + get: + operationId: employee_payroll_runs_list + description: Returns a list of `EmployeePayrollRun` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: employee_id + schema: + type: string + description: If provided, will only return employee payroll runs for this + employee. + examples: + EmployeeId: + summary: employee_id + - in: query + name: ended_after + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return employee payroll runs ended after + this datetime. + - in: query + name: ended_before + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return employee payroll runs ended before + this datetime. + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - employee + - payroll_run + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandEmployee,PayrollRun: + value: employee,payroll_run + summary: Expand Employee, Payroll_run + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: payroll_run_id + schema: + type: string + description: If provided, will only return employee payroll runs for this + employee. + examples: + PayrollRunId: + summary: payroll_run_id + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + - in: query + name: started_after + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return employee payroll runs started after + this datetime. + - in: query + name: started_before + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return employee payroll runs started before + this datetime. + tags: + - employee-payroll-runs + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedEmployeePayrollRunList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /hris/v1/employee-payroll-runs/{id}: + get: + operationId: employee_payroll_runs_retrieve + description: Returns an `EmployeePayrollRun` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - employee + - payroll_run + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandEmployee,PayrollRun: + value: employee,payroll_run + summary: Expand Employee, Payroll_run + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - employee-payroll-runs + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/EmployeePayrollRun' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /hris/v1/employees: + get: + operationId: employees_list + description: Returns a list of `Employee` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: company_id + schema: + type: string + description: If provided, will only return employees for this company. + examples: + CompanyId: + summary: company_id + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: display_full_name + schema: + type: string + nullable: true + description: If provided, will only return employees with this display name. + - in: query + name: employment_status + schema: + type: string + nullable: true + enum: + - ACTIVE + - INACTIVE + - PENDING + description: |- + If provided, will only return employees with this employment status. + + * `ACTIVE` - ACTIVE + * `PENDING` - PENDING + * `INACTIVE` - INACTIVE + - in: query + name: employment_type + schema: + type: string + description: If provided, will only return employees that have an employment + of the specified employment_type. + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - company + - employments + - groups + - home_location + - manager + - pay_group + - team + - work_location + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandEmployments,Groups,HomeLocation,WorkLocation,Manager,Team,Company,PayGroup: + value: employments,groups,home_location,work_location,manager,team,company,pay_group + summary: Expand Employments, Groups, Home_location, Work_location, Manager, + Team, Company, Pay_group + explode: false + - in: query + name: first_name + schema: + type: string + nullable: true + description: If provided, will only return employees with this first name. + - in: query + name: groups + schema: + type: string + description: If provided, will only return employees matching the group ids; + multiple groups can be separated by commas. + - in: query + name: home_location_id + schema: + type: string + description: If provided, will only return employees for this home location. + examples: + HomeLocationId: + summary: home_location_id + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_sensitive_fields + schema: + type: boolean + description: Whether to include sensitive fields (such as social security + numbers) in the response. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: job_title + schema: + type: string + description: If provided, will only return employees that have an employment + of the specified job_title. + - in: query + name: last_name + schema: + type: string + nullable: true + description: If provided, will only return employees with this last name. + - in: query + name: manager_id + schema: + type: string + description: If provided, will only return employees for this manager. + examples: + ManagerId: + summary: manager_id + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: pay_group_id + schema: + type: string + description: If provided, will only return employees for this pay group + examples: + PayGroupId: + summary: pay_group_id + - in: query + name: personal_email + schema: + type: string + format: email + nullable: true + description: If provided, will only return Employees with this personal email + - in: query + name: remote_fields + schema: + type: string + enum: + - employment_status + - employment_status,ethnicity + - employment_status,ethnicity,gender + - employment_status,ethnicity,gender,marital_status + - employment_status,ethnicity,marital_status + - employment_status,gender + - employment_status,gender,marital_status + - employment_status,marital_status + - ethnicity + - ethnicity,gender + - ethnicity,gender,marital_status + - ethnicity,marital_status + - gender + - gender,marital_status + - marital_status + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesEmploymentStatus,Ethnicity,Gender,MaritalStatus: + value: employment_status,ethnicity,gender,marital_status + summary: Original Enum Values Employment_status, Ethnicity, Gender, Marital_status + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + - in: query + name: show_enum_origins + schema: + type: string + enum: + - employment_status + - employment_status,ethnicity + - employment_status,ethnicity,gender + - employment_status,ethnicity,gender,marital_status + - employment_status,ethnicity,marital_status + - employment_status,gender + - employment_status,gender,marital_status + - employment_status,marital_status + - ethnicity + - ethnicity,gender + - ethnicity,gender,marital_status + - ethnicity,marital_status + - gender + - gender,marital_status + - marital_status + description: 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) + examples: + OriginalEnumValuesEmploymentStatus,Ethnicity,Gender,MaritalStatus: + value: employment_status,ethnicity,gender,marital_status + summary: Original Enum Values Employment_status, Ethnicity, Gender, Marital_status + - in: query + name: started_after + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return employees that started after this + datetime. + - in: query + name: started_before + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return employees that started before this + datetime. + - in: query + name: team_id + schema: + type: string + description: If provided, will only return employees for this team. + examples: + TeamId: + summary: team_id + - in: query + name: terminated_after + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return employees that were terminated + after this datetime. + - in: query + name: terminated_before + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return employees that were terminated + before this datetime. + - in: query + name: work_email + schema: + type: string + format: email + nullable: true + description: If provided, will only return Employees with this work email + - in: query + name: work_location_id + schema: + type: string + description: If provided, will only return employees for this location. + examples: + WorkLocationId: + summary: work_location_id + tags: + - employees + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedEmployeeList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + post: + operationId: employees_create + description: Creates an `Employee` object with the given values. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: is_debug_mode + schema: + type: boolean + description: Whether to include debug fields (such as log file links) in the + response. + - in: query + name: run_async + schema: + type: boolean + description: Whether or not third-party updates should be run asynchronously. + tags: + - employees + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EmployeeEndpointRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/EmployeeEndpointRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/EmployeeEndpointRequest' + required: true + security: + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/EmployeeResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /hris/v1/employees/{id}: + get: + operationId: employees_retrieve + description: Returns an `Employee` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - company + - employments + - groups + - home_location + - manager + - pay_group + - team + - work_location + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandEmployments,Groups,HomeLocation,WorkLocation,Manager,Team,Company,PayGroup: + value: employments,groups,home_location,work_location,manager,team,company,pay_group + summary: Expand Employments, Groups, Home_location, Work_location, Manager, + Team, Company, Pay_group + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_sensitive_fields + schema: + type: boolean + description: Whether to include sensitive fields (such as social security + numbers) in the response. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: remote_fields + schema: + type: string + enum: + - employment_status + - employment_status,ethnicity + - employment_status,ethnicity,gender + - employment_status,ethnicity,gender,marital_status + - employment_status,ethnicity,marital_status + - employment_status,gender + - employment_status,gender,marital_status + - employment_status,marital_status + - ethnicity + - ethnicity,gender + - ethnicity,gender,marital_status + - ethnicity,marital_status + - gender + - gender,marital_status + - marital_status + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesEmploymentStatus,Ethnicity,Gender,MaritalStatus: + value: employment_status,ethnicity,gender,marital_status + summary: Original Enum Values Employment_status, Ethnicity, Gender, Marital_status + - in: query + name: show_enum_origins + schema: + type: string + enum: + - employment_status + - employment_status,ethnicity + - employment_status,ethnicity,gender + - employment_status,ethnicity,gender,marital_status + - employment_status,ethnicity,marital_status + - employment_status,gender + - employment_status,gender,marital_status + - employment_status,marital_status + - ethnicity + - ethnicity,gender + - ethnicity,gender,marital_status + - ethnicity,marital_status + - gender + - gender,marital_status + - marital_status + description: 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) + examples: + OriginalEnumValuesEmploymentStatus,Ethnicity,Gender,MaritalStatus: + value: employment_status,ethnicity,gender,marital_status + summary: Original Enum Values Employment_status, Ethnicity, Gender, Marital_status + tags: + - employees + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Employee' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /hris/v1/employees/ignore/{model_id}: + post: + operationId: 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. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: model_id + schema: + type: string + format: uuid + required: true + tags: + - employees + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/IgnoreCommonModelRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/IgnoreCommonModelRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/IgnoreCommonModelRequest' + required: true + security: + - tokenAuth: [] + responses: + '200': + description: No response body + x-extra-tags: + - ignore-model + /hris/v1/employees/meta/post: + get: + operationId: employees_meta_post_retrieve + description: Returns metadata for `Employee` POSTs. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - employees + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetaResponse' + description: '' + x-merge-meta-post: META_POST + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /hris/v1/employer-benefits: + get: + operationId: employer_benefits_list + description: Returns a list of `EmployerBenefit` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + tags: + - employer-benefits + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedEmployerBenefitList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /hris/v1/employer-benefits/{id}: + get: + operationId: employer_benefits_retrieve + description: Returns an `EmployerBenefit` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - employer-benefits + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/EmployerBenefit' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /hris/v1/employments: + get: + operationId: employments_list + description: Returns a list of `Employment` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: employee_id + schema: + type: string + description: If provided, will only return employments for this employee. + examples: + EmployeeId: + summary: employee_id + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - employee + - pay_group + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandEmployee,PayGroup: + value: employee,pay_group + summary: Expand Employee, Pay_group + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - in: query + name: order_by + schema: + type: string + enum: + - -effective_date + - effective_date + x-fern-enum: + -effective_date: + name: EffectiveDateDescending + effective_date: + name: EffectiveDateAscending + description: 'Overrides the default ordering for this endpoint. Possible values + include: effective_date, -effective_date.' + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_fields + schema: + type: string + enum: + - employment_type + - employment_type,flsa_status + - employment_type,flsa_status,pay_frequency + - employment_type,flsa_status,pay_frequency,pay_period + - employment_type,flsa_status,pay_period + - employment_type,pay_frequency + - employment_type,pay_frequency,pay_period + - employment_type,pay_period + - flsa_status + - flsa_status,pay_frequency + - flsa_status,pay_frequency,pay_period + - flsa_status,pay_period + - pay_frequency + - pay_frequency,pay_period + - pay_period + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesEmploymentType,FlsaStatus,PayFrequency,PayPeriod: + value: employment_type,flsa_status,pay_frequency,pay_period + summary: Original Enum Values Employment_type, Flsa_status, Pay_frequency, + Pay_period + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + - in: query + name: show_enum_origins + schema: + type: string + enum: + - employment_type + - employment_type,flsa_status + - employment_type,flsa_status,pay_frequency + - employment_type,flsa_status,pay_frequency,pay_period + - employment_type,flsa_status,pay_period + - employment_type,pay_frequency + - employment_type,pay_frequency,pay_period + - employment_type,pay_period + - flsa_status + - flsa_status,pay_frequency + - flsa_status,pay_frequency,pay_period + - flsa_status,pay_period + - pay_frequency + - pay_frequency,pay_period + - pay_period + description: 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) + examples: + OriginalEnumValuesEmploymentType,FlsaStatus,PayFrequency,PayPeriod: + value: employment_type,flsa_status,pay_frequency,pay_period + summary: Original Enum Values Employment_type, Flsa_status, Pay_frequency, + Pay_period + tags: + - employments + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedEmploymentList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /hris/v1/employments/{id}: + get: + operationId: employments_retrieve + description: Returns an `Employment` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - employee + - pay_group + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandEmployee,PayGroup: + value: employee,pay_group + summary: Expand Employee, Pay_group + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: remote_fields + schema: + type: string + enum: + - employment_type + - employment_type,flsa_status + - employment_type,flsa_status,pay_frequency + - employment_type,flsa_status,pay_frequency,pay_period + - employment_type,flsa_status,pay_period + - employment_type,pay_frequency + - employment_type,pay_frequency,pay_period + - employment_type,pay_period + - flsa_status + - flsa_status,pay_frequency + - flsa_status,pay_frequency,pay_period + - flsa_status,pay_period + - pay_frequency + - pay_frequency,pay_period + - pay_period + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesEmploymentType,FlsaStatus,PayFrequency,PayPeriod: + value: employment_type,flsa_status,pay_frequency,pay_period + summary: Original Enum Values Employment_type, Flsa_status, Pay_frequency, + Pay_period + - in: query + name: show_enum_origins + schema: + type: string + enum: + - employment_type + - employment_type,flsa_status + - employment_type,flsa_status,pay_frequency + - employment_type,flsa_status,pay_frequency,pay_period + - employment_type,flsa_status,pay_period + - employment_type,pay_frequency + - employment_type,pay_frequency,pay_period + - employment_type,pay_period + - flsa_status + - flsa_status,pay_frequency + - flsa_status,pay_frequency,pay_period + - flsa_status,pay_period + - pay_frequency + - pay_frequency,pay_period + - pay_period + description: 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) + examples: + OriginalEnumValuesEmploymentType,FlsaStatus,PayFrequency,PayPeriod: + value: employment_type,flsa_status,pay_frequency,pay_period + summary: Original Enum Values Employment_type, Flsa_status, Pay_frequency, + Pay_period + tags: + - employments + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Employment' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /hris/v1/field-mappings: + get: + operationId: field_mappings_retrieve + description: Get all Field Mappings for this Linked Account. Field Mappings + are mappings between third-party Remote Fields and user defined Merge fields. + [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: exclude_remote_field_metadata + schema: + type: boolean + description: 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. + tags: + - field-mapping + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/FieldMappingApiInstanceResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + post: + operationId: field_mappings_create + description: Create new Field Mappings that will be available after the next + scheduled sync. This will cause the next sync for this Linked Account to sync + **ALL** data from start. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: exclude_remote_field_metadata + schema: + type: boolean + description: 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. + tags: + - field-mapping + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateFieldMappingRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/CreateFieldMappingRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/CreateFieldMappingRequest' + required: true + security: + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/FieldMappingInstanceResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /hris/v1/field-mappings/{field_mapping_id}: + patch: + operationId: field_mappings_partial_update + description: Create or update existing Field Mappings for a Linked Account. + Changes will be reflected after the next scheduled sync. This will cause the + next sync for this Linked Account to sync **ALL** data from start. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: field_mapping_id + schema: + type: string + format: uuid + required: true + tags: + - field-mapping + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedEditFieldMappingRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedEditFieldMappingRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedEditFieldMappingRequest' + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/FieldMappingInstanceResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + delete: + operationId: field_mappings_destroy + description: Deletes Field Mappings for a Linked Account. All data related to + this Field Mapping will be deleted and these changes will be reflected after + the next scheduled sync. This will cause the next sync for this Linked Account + to sync **ALL** data from start. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: field_mapping_id + schema: + type: string + format: uuid + required: true + tags: + - field-mapping + security: + - tokenAuth: [] + responses: + '204': + content: + application/json: + schema: + $ref: '#/components/schemas/FieldMappingInstanceResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /hris/v1/generate-key: + post: + operationId: generate_key_create + description: Create a remote key. + tags: + - generate-key + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GenerateRemoteKeyRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/GenerateRemoteKeyRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/GenerateRemoteKeyRequest' + required: true + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RemoteKey' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /hris/v1/groups: + get: + operationId: groups_list + description: Returns a list of `Group` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: is_commonly_used_as_team + schema: + type: string + description: 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. + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - in: query + name: names + schema: + type: string + description: If provided, will only return groups with these names. Multiple + values can be separated by commas. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_fields + schema: + type: string + enum: + - type + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesType: + value: type + summary: Original Enum Values Type + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + - in: query + name: show_enum_origins + schema: + type: string + enum: + - type + description: 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) + examples: + OriginalEnumValuesType: + value: type + summary: Original Enum Values Type + - in: query + name: types + schema: + type: string + description: If provided, will only return groups of these types. Multiple + values can be separated by commas. + tags: + - groups + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedGroupList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /hris/v1/groups/{id}: + get: + operationId: groups_retrieve + description: Returns a `Group` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: remote_fields + schema: + type: string + enum: + - type + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesType: + value: type + summary: Original Enum Values Type + - in: query + name: show_enum_origins + schema: + type: string + enum: + - type + description: 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) + examples: + OriginalEnumValuesType: + value: type + summary: Original Enum Values Type + tags: + - groups + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Group' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /hris/v1/issues: + get: + operationId: issues_list + description: Gets all issues for Organization. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: query + name: account_token + schema: + type: string + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: end_date + schema: + type: string + description: If included, will only include issues whose most recent action + occurred before this time + - in: query + name: end_user_organization_name + schema: + type: string + - in: query + name: first_incident_time_after + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return issues whose first incident time + was after this datetime. + - in: query + name: first_incident_time_before + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return issues whose first incident time + was before this datetime. + - in: query + name: include_muted + schema: + type: string + description: If true, will include muted issues + - in: query + name: integration_name + schema: + type: string + - in: query + name: last_incident_time_after + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return issues whose last incident time + was after this datetime. + - in: query + name: last_incident_time_before + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return issues whose last incident time + was before this datetime. + - in: query + name: linked_account_id + schema: + type: string + description: If provided, will only include issues pertaining to the linked + account passed in. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: start_date + schema: + type: string + description: If included, will only include issues whose most recent action + occurred after this time + - in: query + name: status + schema: + type: string + enum: + - ONGOING + - RESOLVED + description: |- + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + tags: + - issues + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedIssueList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /hris/v1/issues/{id}: + get: + operationId: issues_retrieve + description: Get a specific issue. + parameters: + - in: path + name: id + schema: + type: string + format: uuid + required: true + tags: + - issues + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Issue' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /hris/v1/link-token: + post: + operationId: link_token_create + description: Creates a link token to be used when linking a new end user. + tags: + - link-token + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EndUserDetailsRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/EndUserDetailsRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/EndUserDetailsRequest' + required: true + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/LinkToken' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /hris/v1/linked-account-scopes: + get: + operationId: linked_account_scopes_retrieve + description: Get all available permissions for Merge Common Models and fields + for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - scopes + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CommonModelScopeAPI' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + post: + operationId: linked_account_scopes_create + description: Update permissions for any Common Model or field for a single Linked + Account. Any Scopes not set in this POST request will inherit the default + Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes) + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - scopes + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LinkedAccountCommonModelScopeDeserializerRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/LinkedAccountCommonModelScopeDeserializerRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/LinkedAccountCommonModelScopeDeserializerRequest' + required: true + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CommonModelScopeAPI' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /hris/v1/linked-accounts: + get: + operationId: linked_accounts_list + description: List linked accounts for your organization. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: query + name: category + schema: + type: string + nullable: true + enum: + - accounting + - ats + - crm + - filestorage + - hris + - mktg + - ticketing + description: |- + Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing` + + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: end_user_email_address + schema: + type: string + description: If provided, will only return linked accounts associated with + the given email address. + - in: query + name: end_user_organization_name + schema: + type: string + description: If provided, will only return linked accounts associated with + the given organization name. + - in: query + name: end_user_origin_id + schema: + type: string + description: If provided, will only return linked accounts associated with + the given origin ID. + - in: query + name: end_user_origin_ids + schema: + type: string + description: Comma-separated list of EndUser origin IDs, making it possible + to specify multiple EndUsers at once. + - in: query + name: id + schema: + type: string + format: uuid + - in: query + name: ids + schema: + type: string + description: Comma-separated list of LinkedAccount IDs, making it possible + to specify multiple LinkedAccounts at once. + - in: query + name: include_duplicates + schema: + type: boolean + description: 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. + - in: query + name: integration_name + schema: + type: string + description: If provided, will only return linked accounts associated with + the given integration name. + - in: query + name: is_test_account + schema: + type: string + description: If included, will only include test linked accounts. If not included, + will only include non-test linked accounts. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: status + schema: + type: string + description: 'Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, + `RELINK_NEEDED`' + tags: + - linked-accounts + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedAccountDetailsAndActionsList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /hris/v1/locations: + get: + operationId: locations_list + description: Returns a list of `Location` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: location_type + schema: + type: string + nullable: true + enum: + - HOME + - WORK + description: |- + If provided, will only return locations with this location_type + + * `HOME` - HOME + * `WORK` - WORK + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_fields + schema: + type: string + enum: + - country + - country,location_type + - location_type + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesCountry,LocationType: + value: country,location_type + summary: Original Enum Values Country, Location_type + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + - in: query + name: show_enum_origins + schema: + type: string + enum: + - country + - country,location_type + - location_type + description: 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) + examples: + OriginalEnumValuesCountry,LocationType: + value: country,location_type + summary: Original Enum Values Country, Location_type + tags: + - locations + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedLocationList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /hris/v1/locations/{id}: + get: + operationId: locations_retrieve + description: Returns a `Location` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: remote_fields + schema: + type: string + enum: + - country + - country,location_type + - location_type + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesCountry,LocationType: + value: country,location_type + summary: Original Enum Values Country, Location_type + - in: query + name: show_enum_origins + schema: + type: string + enum: + - country + - country,location_type + - location_type + description: 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) + examples: + OriginalEnumValuesCountry,LocationType: + value: country,location_type + summary: Original Enum Values Country, Location_type + tags: + - locations + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Location' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /hris/v1/passthrough: + post: + operationId: passthrough_create + description: Pull data from an endpoint not currently supported by Merge. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - passthrough + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DataPassthroughRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/DataPassthroughRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/DataPassthroughRequest' + required: true + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RemoteResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /hris/v1/pay-groups: + get: + operationId: pay_groups_list + description: Returns a list of `PayGroup` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + tags: + - pay-groups + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedPayGroupList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /hris/v1/pay-groups/{id}: + get: + operationId: pay_groups_retrieve + description: Returns a `PayGroup` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - pay-groups + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PayGroup' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /hris/v1/payroll-runs: + get: + operationId: payroll_runs_list + description: Returns a list of `PayrollRun` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: ended_after + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return payroll runs ended after this datetime. + - in: query + name: ended_before + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return payroll runs ended before this + datetime. + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_fields + schema: + type: string + enum: + - run_state + - run_state,run_type + - run_type + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesRunState,RunType: + value: run_state,run_type + summary: Original Enum Values Run_state, Run_type + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + - in: query + name: run_type + schema: + type: string + nullable: true + enum: + - CORRECTION + - OFF_CYCLE + - REGULAR + - SIGN_ON_BONUS + - TERMINATION + 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 + - in: query + name: show_enum_origins + schema: + type: string + enum: + - run_state + - run_state,run_type + - run_type + description: 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) + examples: + OriginalEnumValuesRunState,RunType: + value: run_state,run_type + summary: Original Enum Values Run_state, Run_type + - in: query + name: started_after + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return payroll runs started after this + datetime. + - in: query + name: started_before + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return payroll runs started before this + datetime. + tags: + - payroll-runs + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedPayrollRunList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /hris/v1/payroll-runs/{id}: + get: + operationId: payroll_runs_retrieve + description: Returns a `PayrollRun` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: remote_fields + schema: + type: string + enum: + - run_state + - run_state,run_type + - run_type + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesRunState,RunType: + value: run_state,run_type + summary: Original Enum Values Run_state, Run_type + - in: query + name: show_enum_origins + schema: + type: string + enum: + - run_state + - run_state,run_type + - run_type + description: 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) + examples: + OriginalEnumValuesRunState,RunType: + value: run_state,run_type + summary: Original Enum Values Run_state, Run_type + tags: + - payroll-runs + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PayrollRun' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /hris/v1/regenerate-key: + post: + operationId: regenerate_key_create + description: Exchange remote keys. + tags: + - regenerate-key + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RemoteKeyForRegenerationRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/RemoteKeyForRegenerationRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/RemoteKeyForRegenerationRequest' + required: true + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RemoteKey' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /hris/v1/remote-fields: + get: + operationId: remote_fields_retrieve + description: Get all remote fields for a Linked Account. Remote fields are third-party + fields that are accessible after initial sync if remote_data is enabled. You + can use remote fields to override existing Merge fields or map a new Merge + field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: common_models + schema: + type: string + description: A comma seperated list of Common Model names. If included, will + only return Remote Fields for those Common Models. + - in: query + name: include_example_values + schema: + type: string + description: 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. + tags: + - field-mapping + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RemoteFieldAPIResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /hris/v1/sync-status: + get: + operationId: sync_status_list + description: 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). + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - sync-status + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedSyncStatusList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /hris/v1/sync-status/resync: + post: + operationId: 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. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - force-resync + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SyncStatus' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /hris/v1/target-fields: + get: + operationId: target_fields_retrieve + description: Get all organization-wide Target Fields, this will not include + any Linked Account specific Target Fields. Organization-wide Target Fields + are additional fields appended to the Merge Common Model for all Linked Accounts + in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - field-mapping + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ExternalTargetFieldAPIResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /hris/v1/teams: + get: + operationId: teams_list + description: Returns a list of `Team` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - parent_team + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandParentTeam: + value: parent_team + summary: Expand Parent_team + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: parent_team_id + schema: + type: string + description: If provided, will only return teams with this parent team. + examples: + ParentTeamId: + summary: parent_team_id + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + tags: + - teams + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedTeamList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /hris/v1/teams/{id}: + get: + operationId: teams_retrieve + description: Returns a `Team` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - parent_team + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandParentTeam: + value: parent_team + summary: Expand Parent_team + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - teams + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Team' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /hris/v1/time-off: + get: + operationId: time_off_list + description: Returns a list of `TimeOff` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: approver_id + schema: + type: string + description: If provided, will only return time off for this approver. + examples: + ApproverId: + summary: approver_id + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: employee_id + schema: + type: string + description: If provided, will only return time off for this employee. + examples: + EmployeeId: + summary: employee_id + - in: query + name: ended_after + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return employees that ended after this + datetime. + - in: query + name: ended_before + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return time-offs that ended before this + datetime. + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - approver + - employee + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandEmployee,Approver: + value: employee,approver + summary: Expand Employee, Approver + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_fields + schema: + type: string + enum: + - request_type + - request_type,status + - request_type,status,units + - request_type,units + - status + - status,units + - units + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesRequestType,Status,Units: + value: request_type,status,units + summary: Original Enum Values Request_type, Status, Units + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + - in: query + name: request_type + schema: + type: string + nullable: true + enum: + - BEREAVEMENT + - JURY_DUTY + - PERSONAL + - SICK + - VACATION + - VOLUNTEER + 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 + - in: query + name: show_enum_origins + schema: + type: string + enum: + - request_type + - request_type,status + - request_type,status,units + - request_type,units + - status + - status,units + - units + description: 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) + examples: + OriginalEnumValuesRequestType,Status,Units: + value: request_type,status,units + summary: Original Enum Values Request_type, Status, Units + - in: query + name: started_after + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return time-offs that started after this + datetime. + - in: query + name: started_before + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return time-offs that started before this + datetime. + - in: query + name: status + schema: + type: string + nullable: true + enum: + - APPROVED + - CANCELLED + - DECLINED + - DELETED + - REQUESTED + description: |- + 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 + tags: + - time-off + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedTimeOffList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + post: + operationId: time_off_create + description: Creates a `TimeOff` object with the given values. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: is_debug_mode + schema: + type: boolean + description: Whether to include debug fields (such as log file links) in the + response. + - in: query + name: run_async + schema: + type: boolean + description: Whether or not third-party updates should be run asynchronously. + tags: + - time-off + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TimeOffEndpointRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/TimeOffEndpointRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/TimeOffEndpointRequest' + required: true + security: + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/TimeOffResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /hris/v1/time-off-balances: + get: + operationId: time_off_balances_list + description: Returns a list of `TimeOffBalance` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: employee_id + schema: + type: string + description: If provided, will only return time off balances for this employee. + examples: + EmployeeId: + summary: employee_id + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - employee + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandEmployee: + value: employee + summary: Expand Employee + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: policy_type + schema: + type: string + nullable: true + enum: + - BEREAVEMENT + - JURY_DUTY + - PERSONAL + - SICK + - VACATION + - VOLUNTEER + description: |- + 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 + - in: query + name: remote_fields + schema: + type: string + enum: + - policy_type + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesPolicyType: + value: policy_type + summary: Original Enum Values Policy_type + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + - in: query + name: show_enum_origins + schema: + type: string + enum: + - policy_type + description: 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) + examples: + OriginalEnumValuesPolicyType: + value: policy_type + summary: Original Enum Values Policy_type + tags: + - time-off-balances + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedTimeOffBalanceList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /hris/v1/time-off-balances/{id}: + get: + operationId: time_off_balances_retrieve + description: Returns a `TimeOffBalance` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - employee + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandEmployee: + value: employee + summary: Expand Employee + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: remote_fields + schema: + type: string + enum: + - policy_type + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesPolicyType: + value: policy_type + summary: Original Enum Values Policy_type + - in: query + name: show_enum_origins + schema: + type: string + enum: + - policy_type + description: 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) + examples: + OriginalEnumValuesPolicyType: + value: policy_type + summary: Original Enum Values Policy_type + tags: + - time-off-balances + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/TimeOffBalance' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /hris/v1/time-off/{id}: + get: + operationId: time_off_retrieve + description: Returns a `TimeOff` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - approver + - employee + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandEmployee,Approver: + value: employee,approver + summary: Expand Employee, Approver + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: remote_fields + schema: + type: string + enum: + - request_type + - request_type,status + - request_type,status,units + - request_type,units + - status + - status,units + - units + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesRequestType,Status,Units: + value: request_type,status,units + summary: Original Enum Values Request_type, Status, Units + - in: query + name: show_enum_origins + schema: + type: string + enum: + - request_type + - request_type,status + - request_type,status,units + - request_type,units + - status + - status,units + - units + description: 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) + examples: + OriginalEnumValuesRequestType,Status,Units: + value: request_type,status,units + summary: Original Enum Values Request_type, Status, Units + tags: + - time-off + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/TimeOff' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /hris/v1/time-off/meta/post: + get: + operationId: time_off_meta_post_retrieve + description: Returns metadata for `TimeOff` POSTs. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - time-off + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetaResponse' + description: '' + x-merge-meta-post: META_POST + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /hris/v1/timesheet-entries: + get: + operationId: timesheet_entries_list + description: Returns a list of `TimesheetEntry` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: employee_id + schema: + type: string + description: If provided, will only return timesheet entries for this employee. + examples: + EmployeeId: + summary: employee_id + - in: query + name: ended_after + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return timesheet entries ended after this + datetime. + - in: query + name: ended_before + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return timesheet entries ended before + this datetime. + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - employee + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandEmployee: + value: employee + summary: Expand Employee + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - in: query + name: order_by + schema: + type: string + enum: + - -start_time + - start_time + x-fern-enum: + -start_time: + name: StartTimeDescending + start_time: + name: StartTimeAscending + description: 'Overrides the default ordering for this endpoint. Possible values + include: start_time, -start_time.' + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + - in: query + name: started_after + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return timesheet entries started after + this datetime. + - in: query + name: started_before + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return timesheet entries started before + this datetime. + tags: + - timesheet-entries + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedTimesheetEntryList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + post: + operationId: timesheet_entries_create + description: Creates a `TimesheetEntry` object with the given values. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: is_debug_mode + schema: + type: boolean + description: Whether to include debug fields (such as log file links) in the + response. + - in: query + name: run_async + schema: + type: boolean + description: Whether or not third-party updates should be run asynchronously. + tags: + - timesheet-entries + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TimesheetEntryEndpointRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/TimesheetEntryEndpointRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/TimesheetEntryEndpointRequest' + required: true + security: + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/TimesheetEntryResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /hris/v1/timesheet-entries/{id}: + get: + operationId: timesheet_entries_retrieve + description: Returns a `TimesheetEntry` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - employee + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandEmployee: + value: employee + summary: Expand Employee + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - timesheet-entries + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/TimesheetEntry' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /hris/v1/timesheet-entries/meta/post: + get: + operationId: timesheet_entries_meta_post_retrieve + description: Returns metadata for `TimesheetEntry` POSTs. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - timesheet-entries + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetaResponse' + description: '' + x-merge-meta-post: META_POST + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /hris/v1/webhook-receivers: + get: + operationId: webhook_receivers_list + description: Returns a list of `WebhookReceiver` objects. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - webhook-receivers + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/WebhookReceiver' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + post: + operationId: webhook_receivers_create + description: Creates a `WebhookReceiver` object with the given values. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - webhook-receivers + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/WebhookReceiverRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/WebhookReceiverRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/WebhookReceiverRequest' + required: true + security: + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/WebhookReceiver' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC +components: + schemas: + AccountDetails: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + example: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd + integration: + type: string + readOnly: true + example: BambooHR + integration_slug: + type: string + readOnly: true + example: bamboohr + category: + oneOf: + - $ref: '#/components/schemas/CategoryEnum' + - type: string + nullable: true + example: hris + end_user_origin_id: + type: string + readOnly: true + example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + end_user_organization_name: + type: string + readOnly: true + example: Waystar Royco + end_user_email_address: + type: string + format: email + readOnly: true + example: kendall.roy@waystar-royco.com + status: + type: string + readOnly: true + example: COMPLETE + webhook_listener_url: + type: string + format: uri + readOnly: true + example: https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 + is_duplicate: + type: boolean + nullable: true + readOnly: true + description: Whether a Production Linked Account's credentials match another + existing Production Linked Account. This field is `null` for Test Linked + Accounts, incomplete Production Linked Accounts, and ignored duplicate + Production Linked Account sets. + example: true + account_type: + type: string + readOnly: true + example: PRODUCTION + completed_at: + type: string + format: date-time + nullable: true + description: The time at which account completes the linking flow. + example: '2024-08-26T20:11:19.277118Z' + x-merge-category: hris + AccountDetailsAndActions: + type: object + description: |- + # The LinkedAccount Object + ### Description + The `LinkedAccount` object is used to represent an end user's link with a specific integration. + + ### Usage Example + View a list of your organization's `LinkedAccount` objects. + properties: + id: + type: string + example: e59b1821-f85c-4e28-a6b3-1804156f3563 + category: + oneOf: + - $ref: '#/components/schemas/CategoryEnum' + - type: string + example: hris + status: + oneOf: + - $ref: '#/components/schemas/AccountDetailsAndActionsStatusEnum' + - type: string + example: INCOMPLETE + status_detail: + type: string + example: Invalid login credentials + end_user_origin_id: + type: string + example: 3ac95cde-6c7f-4eef-afec-be710b42308d + end_user_organization_name: + type: string + example: Foo Bar, LLC + end_user_email_address: + type: string + example: hradmin@foobar.dev + subdomain: + type: string + description: The tenant or domain the customer has provided access to. + example: foobar + webhook_listener_url: + type: string + example: https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 + is_duplicate: + type: boolean + nullable: true + description: Whether a Production Linked Account's credentials match another + existing Production Linked Account. This field is `null` for Test Linked + Accounts, incomplete Production Linked Accounts, and ignored duplicate + Production Linked Account sets. + example: true + integration: + $ref: '#/components/schemas/AccountDetailsAndActionsIntegration' + example: + name: SAP SuccessFactors + categories: + - hris + - ats + image: https://cdn.merge.dev/SuccessFactors_Logo.png + square_image: https://cdn.merge.dev/SuccessFactors_Square_Logo.jpg + color: '#F6A704' + slug: sap-successfactors + passthrough_available: true + available_model_operations: + - model_name: Candidate + available_operations: + - FETCH + - CREATE + required_post_parameters: + - remote_user_id + supported_fields: + - first_name + - last_name + - company + - title + account_type: + type: string + example: PRODUCTION + completed_at: + type: string + format: date-time + example: '2024-08-26T20:11:19.277118Z' + required: + - account_type + - completed_at + - end_user_email_address + - end_user_organization_name + - id + - status + - webhook_listener_url + x-merge-sample-json: '{"id": "e59b1821-f85c-4e28-a6b3-1804156f3563", "category": + "hris", "status": "INCOMPLETE", "status_detail": "Invalid login credentials", + "end_user_origin_id": "3ac95cde-6c7f-4eef-afec-be710b42308d", "end_user_organization_name": + "Foo Bar, LLC", "end_user_email_address": "hradmin@foobar.dev", "webhook_listener_url": + "https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4", + "is_duplicate": true, "integration": {"name": "SAP SuccessFactors", "categories": + ["hris", "ats"], "image": "https://cdn.merge.dev/SuccessFactors_Logo.png", + "square_image": "https://cdn.merge.dev/SuccessFactors_Square_Logo.jpg", "color": + "#F6A704", "slug": "sap-successfactors", "passthrough_available": true, "available_model_operations": + [{"model_name": "Candidate", "available_operations": ["FETCH", "CREATE"], + "required_post_parameters": ["remote_user_id"], "supported_fields": ["first_name", + "last_name", "company", "title"]}]}}' + x-merge-category: hris + AccountDetailsAndActionsIntegration: + type: object + properties: + name: + type: string + categories: + type: array + items: + $ref: '#/components/schemas/CategoriesEnum' + image: + type: string + square_image: + type: string + color: + type: string + slug: + type: string + passthrough_available: + type: boolean + available_model_operations: + type: array + items: + $ref: '#/components/schemas/ModelOperation' + required: + - categories + - color + - name + - passthrough_available + - slug + x-merge-category: hris + AccountDetailsAndActionsStatusEnum: + enum: + - COMPLETE + - INCOMPLETE + - RELINK_NEEDED + - IDLE + type: string + description: |- + * `COMPLETE` - COMPLETE + * `INCOMPLETE` - INCOMPLETE + * `RELINK_NEEDED` - RELINK_NEEDED + * `IDLE` - IDLE + x-merge-category: hris + AccountIntegration: + type: object + properties: + name: + type: string + description: Company name. + abbreviated_name: + type: string + nullable: true + description: "Optional. This shortened name appears in places with limited + space, usually in conjunction with the platform's logo (e.g., Merge Link + menu).

Example: Workforce Now (in lieu of ADP Workforce Now), + SuccessFactors (in lieu of SAP SuccessFactors)" + categories: + type: array + items: + $ref: '#/components/schemas/CategoriesEnum' + description: Category or categories this integration belongs to. Multiple + categories should be comma separated, i.e. [ats, hris]. + readOnly: true + image: + type: string + format: uri + nullable: true + description: Company logo in rectangular shape. + square_image: + type: string + format: uri + nullable: true + description: Company logo in square shape. + color: + type: string + description: The color of this integration used for buttons and text throughout + the app and landing pages. Choose a darker, saturated color. + pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ + maxLength: 18 + slug: + type: string + readOnly: true + api_endpoints_to_documentation_urls: + type: object + additionalProperties: {} + description: "Mapping of API endpoints to documentation urls for support. + Example: {'GET': [['/common-model-scopes', 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', + 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], + 'POST': []}" + webhook_setup_guide_url: + type: string + nullable: true + description: Setup guide URL for third party webhook creation. Exposed in + Merge Docs. + category_beta_status: + type: object + description: Category or categories this integration is in beta status for. + readOnly: true + required: + - name + x-merge-category: hris + AccountToken: + type: object + properties: + account_token: + type: string + example: T9klMDQrcHdm9jrtHuOS2Nf06BIHwMNjpPXPMB + integration: + $ref: '#/components/schemas/AccountIntegration' + example: + name: SAP SuccessFactors + categories: + - hris + - ats + image: https://cdn.merge.dev/SuccessFactors_Logo.png + square_image: https://cdn.merge.dev/SuccessFactors_Square_Logo.jpg + color: '#F6A704' + slug: sap-successfactors + id: + type: string + example: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd + required: + - account_token + - id + - integration + x-merge-category: hris + AccountTypeEnum: + enum: + - SAVINGS + - CHECKING + type: string + description: |- + * `SAVINGS` - SAVINGS + * `CHECKING` - CHECKING + x-merge-category: hris + AdvancedMetadata: + type: object + properties: + id: + type: string + format: uuid + display_name: + type: string + description: + type: string + is_required: + type: boolean + is_custom: + type: boolean + field_choices: + type: array + items: {} + required: + - id + x-merge-category: hris + AsyncPassthroughReciept: + type: object + properties: + async_passthrough_receipt_id: + type: string + format: uuid + example: fd29020f-2695-445e-922e-dcd5e81903fd + required: + - async_passthrough_receipt_id + x-merge-category: hris + AuditLogEvent: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + example: b5ceea2a-7171-47ce-8090-165cfce5572c + user_name: + type: string + nullable: true + description: The User's full name at the time of this Event occurring. + maxLength: 200 + example: Gil Feig + user_email: + type: string + format: email + nullable: true + description: The User's email at the time of this Event occurring. + maxLength: 254 + example: hello@merge.dev + role: + oneOf: + - $ref: '#/components/schemas/RoleEnum' + - type: string + description: |- + Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. + + * `ADMIN` - ADMIN + * `DEVELOPER` - DEVELOPER + * `MEMBER` - MEMBER + * `API` - API + * `SYSTEM` - SYSTEM + * `MERGE_TEAM` - MERGE_TEAM + example: ADMIN + ip_address: + type: string + maxLength: 45 + example: 192.0.2.123 + event_type: + oneOf: + - $ref: '#/components/schemas/EventTypeEnum' + - type: string + description: |- + Designates the type of event that occurred. + + * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + * `INVITED_USER` - INVITED_USER + * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + * `CREATED_DESTINATION` - CREATED_DESTINATION + * `DELETED_DESTINATION` - DELETED_DESTINATION + * `CHANGED_DESTINATION` - CHANGED_DESTINATION + * `CHANGED_SCOPES` - CHANGED_SCOPES + * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + * `ENABLED_CATEGORY` - ENABLED_CATEGORY + * `DISABLED_CATEGORY` - DISABLED_CATEGORY + * `CHANGED_PASSWORD` - CHANGED_PASSWORD + * `RESET_PASSWORD` - RESET_PASSWORD + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING + * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING + * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING + * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING + * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + * `MUTED_ISSUE` - MUTED_ISSUE + * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + example: CHANGED_SCOPES + event_description: + type: string + example: Organization-wide Scopes for model hris.Employee updated from Read + to Read+Write + created_at: + type: string + format: date-time + readOnly: true + required: + - event_description + - event_type + - ip_address + - role + x-merge-category: hris + AvailableActions: + type: object + description: |- + # The AvailableActions Object + ### Description + The `Activity` object is used to see all available model/operation combinations for an integration. + + ### Usage Example + Fetch all the actions available for the `Zenefits` integration. + properties: + integration: + $ref: '#/components/schemas/AccountIntegration' + example: + name: Lever + categories: + - ats + image: https://merge-api-production.s3.amazonaws.com/media/Lever_Logo.png + square_image: https://merge-api-production.s3.amazonaws.com/media/Lever_Square_Logo.png + color: '#262A34' + is_in_beta: 'true' + api_endpoints_to_documentation_urls: "{'GET': [('/common-model-scopes', + 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve')], + 'POST': []}" + passthrough_available: + type: boolean + example: true + available_model_operations: + type: array + items: + $ref: '#/components/schemas/ModelOperation' + example: + - model_name: Candidate + available_operations: + - FETCH + - CREATE + required_post_parameters: + - remote_user_id + supported_fields: + - first_name + - last_name + - company + - title + required: + - integration + - passthrough_available + x-merge-category: hris + BankInfo: + type: object + description: |- + # The BankInfo Object + ### Description + The `BankInfo` object is used to represent the Bank Account information for an Employee. + + ### Usage Example + Fetch from the `LIST BankInfo` endpoint and filter by `ID` to show all bank information. + properties: + id: + type: string + format: uuid + readOnly: true + example: fd1e0fb5-8f92-4ec9-9f32-179cf732867d + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '123234' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + employee: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Employee' + nullable: true + description: The employee with this bank account. + example: a3617eb4-dfe3-426f-921e-a65fc1661e10 + x-merge-expands-to: Employee + account_number: + type: string + nullable: true + description: The account number. + maxLength: 100 + example: '439291590' + routing_number: + type: string + nullable: true + description: The routing number. + example: '089690059' + bank_name: + type: string + nullable: true + description: The bank name. + example: Chase + account_type: + oneOf: + - $ref: '#/components/schemas/AccountTypeEnum' + - type: string + nullable: true + description: |- + The bank account type + + * `SAVINGS` - SAVINGS + * `CHECKING` - CHECKING + example: CHECKING + remote_created_at: + type: string + format: date-time + nullable: true + description: When the matching bank object was created in the third party + system. + example: '2021-12-06T10:11:26Z' + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /bank-info + data: + - Varies by platform + x-merge-expands: '{"employee": "Employee"}' + x-merge-category: hris + Benefit: + type: object + description: |- + # The Benefit Object + ### Description + The `Benefit` object is used to represent a benefit that an employee has enrolled in. + + ### Usage Example + Fetch from the `LIST Benefits` endpoint and filter by `ID` to show all benefits. + properties: + id: + type: string + format: uuid + readOnly: true + example: 3fe5ae7a-f1ba-4529-b7af-84e86dc6d232 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '19202938' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + employee: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Employee' + nullable: true + description: The employee on the plan. + example: d2f972d0-2526-434b-9409-4c3b468e08f0 + x-merge-expands-to: Employee + provider_name: + type: string + nullable: true + description: The name of the benefit provider. + example: Blue Shield of California + benefit_plan_type: + type: string + nullable: true + description: The type of benefit plan + deprecated: true + employee_contribution: + type: number + format: double + nullable: true + description: The employee's contribution. + example: 23.65 + company_contribution: + type: number + format: double + nullable: true + description: The company's contribution. + example: 150 + start_date: + type: string + format: date-time + nullable: true + description: The day and time the benefit started. + example: '2020-11-15 00:59:25.309761+00:00' + end_date: + type: string + format: date-time + nullable: true + description: The day and time the benefit ended. + example: '2021-10-15 00:23:25.309761+00:00' + remote_was_deleted: + type: boolean + readOnly: true + description: 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/). + employer_benefit: + type: string + format: uuid + nullable: true + description: The employer benefit plan the employee is enrolled in. + example: 025fjlc6-6000-430a-848e-aafacbadf4fe + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /benefits + data: + - Varies by platform + x-merge-expands: '{"employee": "Employee"}' + x-merge-category: hris + BenefitPlanTypeEnum: + enum: + - MEDICAL + - HEALTH_SAVINGS + - INSURANCE + - RETIREMENT + - OTHER + type: string + description: |- + * `MEDICAL` - MEDICAL + * `HEALTH_SAVINGS` - HEALTH_SAVINGS + * `INSURANCE` - INSURANCE + * `RETIREMENT` - RETIREMENT + * `OTHER` - OTHER + x-merge-category: hris + CategoriesEnum: + enum: + - hris + - ats + - accounting + - ticketing + - crm + - mktg + - filestorage + type: string + description: |- + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + x-merge-category: hris + CategoryEnum: + enum: + - hris + - ats + - accounting + - ticketing + - crm + - mktg + - filestorage + type: string + description: |- + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + x-merge-category: hris + CommonModelScopeAPI: + type: object + properties: + common_models: + type: array + items: + $ref: '#/components/schemas/IndividualCommonModelScopeDeserializer' + description: The common models you want to update the scopes for + example: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - created_at + - custom_fields + - date_of_birth + - first_name + - gender + - remote_created_at + - remote_data + disabled_fields: + - company + - employments + - groups + - home_location + - manager + - work_location + required: + - common_models + x-merge-category: hris + CommonModelScopesBodyRequest: + type: object + properties: + model_id: + type: string + minLength: 1 + example: hris.Employee + enabled_actions: + type: array + items: + $ref: '#/components/schemas/EnabledActionsEnum' + example: + - READ + - WRITE + disabled_fields: + type: array + items: + type: string + minLength: 1 + example: + - first_name + required: + - disabled_fields + - enabled_actions + - model_id + x-merge-category: hris + Company: + type: object + description: |- + # The Company Object + ### Description + The `Company` object is used to represent a company within the HRIS / Payroll system. + + ### Usage Example + Fetch from the `LIST Companies` endpoint and filter by `ID` to show all companies. + properties: + id: + type: string + format: uuid + readOnly: true + example: 1b998423-db0a-4037-a4cf-f79c60cb67b3 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '19202938' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + legal_name: + type: string + nullable: true + description: The company's legal name. + example: Waystar Royco, Inc. + display_name: + type: string + nullable: true + description: The company's display name. + example: Waystar Royco + eins: + type: array + items: + type: string + nullable: true + nullable: true + description: The company's Employer Identification Numbers. + example: + - 12-3456789 + - 12-3451111 + - 11-0011000 + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /companies + data: + - Varies by platform + x-merge-category: hris + CountryEnum: + enum: + - AF + - AX + - AL + - DZ + - AS + - AD + - AO + - AI + - AQ + - AG + - AR + - AM + - AW + - AU + - AT + - AZ + - BS + - BH + - BD + - BB + - BY + - BE + - BZ + - BJ + - BM + - BT + - BO + - BQ + - BA + - BW + - BV + - BR + - IO + - BN + - BG + - BF + - BI + - CV + - KH + - CM + - CA + - KY + - CF + - TD + - CL + - CN + - CX + - CC + - CO + - KM + - CG + - CD + - CK + - CR + - CI + - HR + - CU + - CW + - CY + - CZ + - DK + - DJ + - DM + - DO + - EC + - EG + - SV + - GQ + - ER + - EE + - SZ + - ET + - FK + - FO + - FJ + - FI + - FR + - GF + - PF + - TF + - GA + - GM + - GE + - DE + - GH + - GI + - GR + - GL + - GD + - GP + - GU + - GT + - GG + - GN + - GW + - GY + - HT + - HM + - VA + - HN + - HK + - HU + - IS + - IN + - ID + - IR + - IQ + - IE + - IM + - IL + - IT + - JM + - JP + - JE + - JO + - KZ + - KE + - KI + - KW + - KG + - LA + - LV + - LB + - LS + - LR + - LY + - LI + - LT + - LU + - MO + - MG + - MW + - MY + - MV + - ML + - MT + - MH + - MQ + - MR + - MU + - YT + - MX + - FM + - MD + - MC + - MN + - ME + - MS + - MA + - MZ + - MM + - NA + - NR + - NP + - NL + - NC + - NZ + - NI + - NE + - NG + - NU + - NF + - KP + - MK + - MP + - NO + - OM + - PK + - PW + - PS + - PA + - PG + - PY + - PE + - PH + - PN + - PL + - PT + - PR + - QA + - RE + - RO + - RU + - RW + - BL + - SH + - KN + - LC + - MF + - PM + - VC + - WS + - SM + - ST + - SA + - SN + - RS + - SC + - SL + - SG + - SX + - SK + - SI + - SB + - SO + - ZA + - GS + - KR + - SS + - ES + - LK + - SD + - SR + - SJ + - SE + - CH + - SY + - TW + - TJ + - TZ + - TH + - TL + - TG + - TK + - TO + - TT + - TN + - TR + - TM + - TC + - TV + - UG + - UA + - AE + - GB + - UM + - US + - UY + - UZ + - VU + - VE + - VN + - VG + - VI + - WF + - EH + - YE + - ZM + - ZW + type: string + description: |- + * `AF` - Afghanistan + * `AX` - Åland Islands + * `AL` - Albania + * `DZ` - Algeria + * `AS` - American Samoa + * `AD` - Andorra + * `AO` - Angola + * `AI` - Anguilla + * `AQ` - Antarctica + * `AG` - Antigua and Barbuda + * `AR` - Argentina + * `AM` - Armenia + * `AW` - Aruba + * `AU` - Australia + * `AT` - Austria + * `AZ` - Azerbaijan + * `BS` - Bahamas + * `BH` - Bahrain + * `BD` - Bangladesh + * `BB` - Barbados + * `BY` - Belarus + * `BE` - Belgium + * `BZ` - Belize + * `BJ` - Benin + * `BM` - Bermuda + * `BT` - Bhutan + * `BO` - Bolivia + * `BQ` - Bonaire, Sint Eustatius and Saba + * `BA` - Bosnia and Herzegovina + * `BW` - Botswana + * `BV` - Bouvet Island + * `BR` - Brazil + * `IO` - British Indian Ocean Territory + * `BN` - Brunei + * `BG` - Bulgaria + * `BF` - Burkina Faso + * `BI` - Burundi + * `CV` - Cabo Verde + * `KH` - Cambodia + * `CM` - Cameroon + * `CA` - Canada + * `KY` - Cayman Islands + * `CF` - Central African Republic + * `TD` - Chad + * `CL` - Chile + * `CN` - China + * `CX` - Christmas Island + * `CC` - Cocos (Keeling) Islands + * `CO` - Colombia + * `KM` - Comoros + * `CG` - Congo + * `CD` - Congo (the Democratic Republic of the) + * `CK` - Cook Islands + * `CR` - Costa Rica + * `CI` - Côte d'Ivoire + * `HR` - Croatia + * `CU` - Cuba + * `CW` - Curaçao + * `CY` - Cyprus + * `CZ` - Czechia + * `DK` - Denmark + * `DJ` - Djibouti + * `DM` - Dominica + * `DO` - Dominican Republic + * `EC` - Ecuador + * `EG` - Egypt + * `SV` - El Salvador + * `GQ` - Equatorial Guinea + * `ER` - Eritrea + * `EE` - Estonia + * `SZ` - Eswatini + * `ET` - Ethiopia + * `FK` - Falkland Islands (Malvinas) + * `FO` - Faroe Islands + * `FJ` - Fiji + * `FI` - Finland + * `FR` - France + * `GF` - French Guiana + * `PF` - French Polynesia + * `TF` - French Southern Territories + * `GA` - Gabon + * `GM` - Gambia + * `GE` - Georgia + * `DE` - Germany + * `GH` - Ghana + * `GI` - Gibraltar + * `GR` - Greece + * `GL` - Greenland + * `GD` - Grenada + * `GP` - Guadeloupe + * `GU` - Guam + * `GT` - Guatemala + * `GG` - Guernsey + * `GN` - Guinea + * `GW` - Guinea-Bissau + * `GY` - Guyana + * `HT` - Haiti + * `HM` - Heard Island and McDonald Islands + * `VA` - Holy See + * `HN` - Honduras + * `HK` - Hong Kong + * `HU` - Hungary + * `IS` - Iceland + * `IN` - India + * `ID` - Indonesia + * `IR` - Iran + * `IQ` - Iraq + * `IE` - Ireland + * `IM` - Isle of Man + * `IL` - Israel + * `IT` - Italy + * `JM` - Jamaica + * `JP` - Japan + * `JE` - Jersey + * `JO` - Jordan + * `KZ` - Kazakhstan + * `KE` - Kenya + * `KI` - Kiribati + * `KW` - Kuwait + * `KG` - Kyrgyzstan + * `LA` - Laos + * `LV` - Latvia + * `LB` - Lebanon + * `LS` - Lesotho + * `LR` - Liberia + * `LY` - Libya + * `LI` - Liechtenstein + * `LT` - Lithuania + * `LU` - Luxembourg + * `MO` - Macao + * `MG` - Madagascar + * `MW` - Malawi + * `MY` - Malaysia + * `MV` - Maldives + * `ML` - Mali + * `MT` - Malta + * `MH` - Marshall Islands + * `MQ` - Martinique + * `MR` - Mauritania + * `MU` - Mauritius + * `YT` - Mayotte + * `MX` - Mexico + * `FM` - Micronesia (Federated States of) + * `MD` - Moldova + * `MC` - Monaco + * `MN` - Mongolia + * `ME` - Montenegro + * `MS` - Montserrat + * `MA` - Morocco + * `MZ` - Mozambique + * `MM` - Myanmar + * `NA` - Namibia + * `NR` - Nauru + * `NP` - Nepal + * `NL` - Netherlands + * `NC` - New Caledonia + * `NZ` - New Zealand + * `NI` - Nicaragua + * `NE` - Niger + * `NG` - Nigeria + * `NU` - Niue + * `NF` - Norfolk Island + * `KP` - North Korea + * `MK` - North Macedonia + * `MP` - Northern Mariana Islands + * `NO` - Norway + * `OM` - Oman + * `PK` - Pakistan + * `PW` - Palau + * `PS` - Palestine, State of + * `PA` - Panama + * `PG` - Papua New Guinea + * `PY` - Paraguay + * `PE` - Peru + * `PH` - Philippines + * `PN` - Pitcairn + * `PL` - Poland + * `PT` - Portugal + * `PR` - Puerto Rico + * `QA` - Qatar + * `RE` - Réunion + * `RO` - Romania + * `RU` - Russia + * `RW` - Rwanda + * `BL` - Saint Barthélemy + * `SH` - Saint Helena, Ascension and Tristan da Cunha + * `KN` - Saint Kitts and Nevis + * `LC` - Saint Lucia + * `MF` - Saint Martin (French part) + * `PM` - Saint Pierre and Miquelon + * `VC` - Saint Vincent and the Grenadines + * `WS` - Samoa + * `SM` - San Marino + * `ST` - Sao Tome and Principe + * `SA` - Saudi Arabia + * `SN` - Senegal + * `RS` - Serbia + * `SC` - Seychelles + * `SL` - Sierra Leone + * `SG` - Singapore + * `SX` - Sint Maarten (Dutch part) + * `SK` - Slovakia + * `SI` - Slovenia + * `SB` - Solomon Islands + * `SO` - Somalia + * `ZA` - South Africa + * `GS` - South Georgia and the South Sandwich Islands + * `KR` - South Korea + * `SS` - South Sudan + * `ES` - Spain + * `LK` - Sri Lanka + * `SD` - Sudan + * `SR` - Suriname + * `SJ` - Svalbard and Jan Mayen + * `SE` - Sweden + * `CH` - Switzerland + * `SY` - Syria + * `TW` - Taiwan + * `TJ` - Tajikistan + * `TZ` - Tanzania + * `TH` - Thailand + * `TL` - Timor-Leste + * `TG` - Togo + * `TK` - Tokelau + * `TO` - Tonga + * `TT` - Trinidad and Tobago + * `TN` - Tunisia + * `TR` - Turkey + * `TM` - Turkmenistan + * `TC` - Turks and Caicos Islands + * `TV` - Tuvalu + * `UG` - Uganda + * `UA` - Ukraine + * `AE` - United Arab Emirates + * `GB` - United Kingdom + * `UM` - United States Minor Outlying Islands + * `US` - United States of America + * `UY` - Uruguay + * `UZ` - Uzbekistan + * `VU` - Vanuatu + * `VE` - Venezuela + * `VN` - Vietnam + * `VG` - Virgin Islands (British) + * `VI` - Virgin Islands (U.S.) + * `WF` - Wallis and Futuna + * `EH` - Western Sahara + * `YE` - Yemen + * `ZM` - Zambia + * `ZW` - Zimbabwe + x-merge-category: hris + CreateFieldMappingRequest: + type: object + properties: + target_field_name: + type: string + minLength: 1 + description: The name of the target field you want this remote field to + map to. + example: example_target_field_name + target_field_description: + type: string + minLength: 1 + description: The description of the target field you want this remote field + to map to. + example: this is a example description of the target field + remote_field_traversal_path: + type: array + items: {} + description: The field traversal path of the remote field listed when you + hit the GET /remote-fields endpoint. + example: + - example_remote_field + remote_method: + type: string + minLength: 1 + description: The method of the remote endpoint where the remote field is + coming from. + example: GET + remote_url_path: + type: string + minLength: 1 + description: The path of the remote endpoint where the remote field is coming + from. + example: /example-url-path + common_model_name: + type: string + minLength: 1 + description: The name of the Common Model that the remote field corresponds + to in a given category. + example: ExampleCommonModel + required: + - common_model_name + - remote_field_traversal_path + - remote_method + - remote_url_path + - target_field_description + - target_field_name + x-merge-category: hris + DataPassthroughRequest: + type: object + description: |- + # The DataPassthrough Object + ### Description + The `DataPassthrough` object is used to send information to an otherwise-unsupported third-party endpoint. + + ### Usage Example + Create a `DataPassthrough` to get team hierarchies from your Rippling integration. + properties: + method: + allOf: + - $ref: '#/components/schemas/MethodEnum' + example: POST + path: + type: string + minLength: 1 + description: The path of the request in the third party's platform. + example: /scooters + base_url_override: + type: string + nullable: true + minLength: 1 + description: An optional override of the third party's base url for the + request. + example: https://api.example.com + data: + type: string + nullable: true + minLength: 1 + description: The data with the request. You must include a `request_format` + parameter matching the data's format + example: '{"company": "Lime", "model": "Gen 2.5"}' + multipart_form_data: + type: array + items: + $ref: '#/components/schemas/MultipartFormFieldRequest' + nullable: true + description: Pass an array of `MultipartFormField` objects in here instead + of using the `data` param if `request_format` is set to `MULTIPART`. + headers: + type: object + additionalProperties: {} + nullable: true + description: The headers to use for the request (Merge will handle the account's + authorization headers). `Content-Type` header is required for passthrough. + Choose content type corresponding to expected format of receiving server. + example: + EXTRA-HEADER: value + request_format: + allOf: + - $ref: '#/components/schemas/RequestFormatEnum' + nullable: true + example: JSON + normalize_response: + type: boolean + description: 'Optional. If true, the response will always be an object of + the form `{"type": T, "value": ...}` where `T` will be one of `string, + boolean, number, null, array, object`.' + required: + - method + - path + x-merge-category: hris + DebugModeLog: + type: object + properties: + log_id: + type: string + example: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: + type: string + example: https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + $ref: '#/components/schemas/DebugModelLogSummary' + example: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + required: + - dashboard_view + - log_id + - log_summary + x-merge-sample-json: '{"log_id": "99433219-8017-4acd-bb3c-ceb23d663832", "dashboard_view": + "https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832", "log_summary": + {"url": "www.exampleintegration.com/api/v1/exampleapi", "method": "POST", + "status_code": 200}}' + x-merge-category: hris + DebugModelLogSummary: + type: object + properties: + url: + type: string + example: www.exampleintegration.com/api/v1/exampleapi + method: + type: string + example: POST + status_code: + type: integer + example: 200 + required: + - method + - status_code + - url + x-merge-sample-json: '{"url": "www.exampleintegration.com/api/v1/exampleapi", + "method": "POST", "status_code": 200}' + x-merge-category: hris + Deduction: + type: object + description: |- + # The Deduction Object + ### Description + The `Deduction` object is used to represent an array of the wages withheld from total earnings for the purpose of paying taxes. + + ### Usage Example + Fetch from the `LIST Deductions` endpoint and filter by `ID` to show all deductions. + properties: + id: + type: string + format: uuid + readOnly: true + example: 5fd439fc-1b64-4755-b275-64918936c365 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '93478612' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + employee_payroll_run: + type: string + format: uuid + nullable: true + example: 35347df1-95e7-46e2-93cc-66f1191edca5 + name: + type: string + nullable: true + description: The deduction's name. + example: Social Security + employee_deduction: + type: number + format: double + nullable: true + description: The amount of money that is withheld from an employee's gross + pay by the employee. + example: 34.54 + company_deduction: + type: number + format: double + nullable: true + description: The amount of money that is withheld on behalf of an employee + by the company. + example: 78.78 + remote_was_deleted: + type: boolean + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /payroll-deduction + data: + - Varies by platform + x-merge-nested-write-allowed: true + x-merge-category: hris + Dependent: + type: object + description: |- + # The Dependent Object + ### Description + The `Dependent` object is used to represent a dependent (e.g. child, spouse, domestic partner, etc) of an `Employee` + + ### Usage Example + Fetch from the `LIST Dependents` endpoint and filter by `ID` to show all dependents. + properties: + id: + type: string + format: uuid + readOnly: true + example: 025fjlc6-6000-430a-848e-aafacbadf4fe + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '19202940' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + first_name: + type: string + nullable: true + description: The dependents's first name. + maxLength: 60 + example: Greg + middle_name: + type: string + nullable: true + description: The dependents's middle name. + maxLength: 60 + example: A + last_name: + type: string + nullable: true + description: The dependents's last name. + maxLength: 60 + example: Hirsch + relationship: + oneOf: + - $ref: '#/components/schemas/RelationshipEnum' + - type: string + nullable: true + description: |- + The dependent's relationship to the employee. + + * `CHILD` - CHILD + * `SPOUSE` - SPOUSE + * `DOMESTIC_PARTNER` - DOMESTIC_PARTNER + example: CHILD + employee: + type: string + format: uuid + nullable: true + description: The employee this person is a dependent of. + example: 0958cbc6-6040-430a-848e-aafacbadf4ae + date_of_birth: + type: string + format: date-time + nullable: true + description: The dependent's date of birth. + example: '1990-11-10T00:00:00Z' + gender: + oneOf: + - $ref: '#/components/schemas/GenderEnum' + - type: string + nullable: true + description: |- + The dependent's gender. + + * `MALE` - MALE + * `FEMALE` - FEMALE + * `NON-BINARY` - NON-BINARY + * `OTHER` - OTHER + * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE + example: MALE + phone_number: + type: string + nullable: true + description: The dependent's phone number. + maxLength: 50 + example: '+1234567890' + home_location: + type: string + format: uuid + nullable: true + description: The dependents's home address. + example: d2f972d0-2526-434b-9409-4c3b468e08f0 + is_student: + type: boolean + nullable: true + description: Whether or not the dependent is a student + ssn: + type: string + nullable: true + description: The dependents's social security number. + maxLength: 50 + example: '1234567890' + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /dependent + data: + - Varies by platform + x-merge-category: hris + Earning: + type: object + description: |- + # The Earning Object + ### Description + The `Earning` object is used to represent an array of different compensations that an employee receives within specific wage categories. + + ### Usage Example + Fetch from the `LIST Earnings` endpoint and filter by `ID` to show all earnings. + properties: + id: + type: string + format: uuid + readOnly: true + example: babbced6-3a81-4775-8da2-490dc6385259 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '52802' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + employee_payroll_run: + type: string + format: uuid + nullable: true + example: 35347df1-95e7-46e2-93cc-66f1191edca5 + amount: + type: number + format: double + nullable: true + description: The amount earned. + example: 1002.34 + type: + oneOf: + - $ref: '#/components/schemas/EarningTypeEnum' + - type: string + nullable: true + description: |- + The type of earning. + + * `SALARY` - SALARY + * `REIMBURSEMENT` - REIMBURSEMENT + * `OVERTIME` - OVERTIME + * `BONUS` - BONUS + example: SALARY + remote_was_deleted: + type: boolean + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + x-merge-nested-write-allowed: true + x-merge-category: hris + EarningTypeEnum: + enum: + - SALARY + - REIMBURSEMENT + - OVERTIME + - BONUS + type: string + description: |- + * `SALARY` - SALARY + * `REIMBURSEMENT` - REIMBURSEMENT + * `OVERTIME` - OVERTIME + * `BONUS` - BONUS + x-merge-category: hris + Employee: + type: object + description: |- + # The Employee Object + ### Description + The `Employee` object is used to represent any person who has been employed by a company. By default, it returns all employees. To filter for only active employees, set the `employment_status` query parameter to `ACTIVE`. + + ### Usage Example + Fetch from the `LIST Employee` endpoint and filter by `ID` to show all employees. + properties: + id: + type: string + format: uuid + readOnly: true + example: 0958cbc6-6040-430a-848e-aafacbadf4ae + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '19202938' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + employee_number: + type: string + nullable: true + description: The employee's number that appears in the third-party integration's + UI. + example: '2' + company: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Company' + nullable: true + description: The ID of the employee's company. + example: 8d9fd929-436c-4fd4-a48b-0c61f68d6178 + x-merge-expands-to: Company + first_name: + type: string + nullable: true + description: The employee's first name. + example: Greg + last_name: + type: string + nullable: true + description: The employee's last name. + example: Hirsch + preferred_name: + type: string + nullable: true + description: The employee's preferred first name. + example: Greg the egg + display_full_name: + type: string + nullable: true + description: The employee's full name, to use for display purposes. If a + preferred first name is available, the full name will include the preferred + first name. + example: Cousin Greg Hirsch + username: + type: string + nullable: true + description: The employee's username that appears in the remote UI. + example: cousingreg + groups: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Group' + nullable: true + example: + - 21a54124-397f-494d-985e-3c5b330b8a68 + x-merge-expands-to: Group + work_email: + type: string + format: email + nullable: true + description: The employee's work email. + maxLength: 254 + example: greg@merge.dev + personal_email: + type: string + format: email + nullable: true + description: The employee's personal email. + maxLength: 254 + example: greg@gmail.com + mobile_phone_number: + type: string + nullable: true + description: The employee's mobile phone number. + example: '+1234567890' + employments: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Employment' + nullable: true + example: + - 17a54124-287f-494d-965e-3c5b330c9a68 + description: Array of `Employment` IDs for this Employee. + x-merge-expands-to: Employment + home_location: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Location' + nullable: true + description: The employee's home address. + example: d2f972d0-2526-434b-9409-4c3b468e08f0 + x-merge-expands-to: Location + work_location: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Location' + nullable: true + description: The employee's work address. + example: 9efbc633-3387-4306-aa55-e2c635e6bb4f + x-merge-expands-to: Location + manager: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Employee' + nullable: true + description: The employee ID of the employee's manager. + example: 0048ea5b-911e-4dff-9364-92070dea62ff + x-merge-expands-to: Employee + team: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Team' + nullable: true + description: The employee's team. + deprecated: true + x-merge-expands-to: Team + pay_group: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/PayGroup' + nullable: true + description: The employee's pay group + example: ad1264e2-39be-4787-b749-f1aade9e3405 + x-merge-expands-to: PayGroup + ssn: + type: string + nullable: true + description: The employee's social security number. + maxLength: 100 + example: '1234567890' + gender: + oneOf: + - $ref: '#/components/schemas/GenderEnum' + - type: string + nullable: true + description: |- + The employee's gender. + + * `MALE` - MALE + * `FEMALE` - FEMALE + * `NON-BINARY` - NON-BINARY + * `OTHER` - OTHER + * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE + example: MALE + ethnicity: + oneOf: + - $ref: '#/components/schemas/EthnicityEnum' + - type: string + nullable: true + description: |- + The employee's ethnicity. + + * `AMERICAN_INDIAN_OR_ALASKA_NATIVE` - AMERICAN_INDIAN_OR_ALASKA_NATIVE + * `ASIAN_OR_INDIAN_SUBCONTINENT` - ASIAN_OR_INDIAN_SUBCONTINENT + * `BLACK_OR_AFRICAN_AMERICAN` - BLACK_OR_AFRICAN_AMERICAN + * `HISPANIC_OR_LATINO` - HISPANIC_OR_LATINO + * `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER` - NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER + * `TWO_OR_MORE_RACES` - TWO_OR_MORE_RACES + * `WHITE` - WHITE + * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE + example: WHITE + marital_status: + oneOf: + - $ref: '#/components/schemas/MaritalStatusEnum' + - type: string + nullable: true + description: |- + The employee's filing status as related to marital status. + + * `SINGLE` - SINGLE + * `MARRIED_FILING_JOINTLY` - MARRIED_FILING_JOINTLY + * `MARRIED_FILING_SEPARATELY` - MARRIED_FILING_SEPARATELY + * `HEAD_OF_HOUSEHOLD` - HEAD_OF_HOUSEHOLD + * `QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD` - QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD + example: SINGLE + date_of_birth: + type: string + format: date-time + nullable: true + description: The employee's date of birth. + example: '1990-11-10T00:00:00Z' + hire_date: + type: string + format: date-time + nullable: true + description: "The date that the employee was hired, usually the day that + an offer letter is signed. If an employee has multiple hire dates from + previous employments, this represents the most recent hire date. Note: + If you're looking for the employee's start date, refer to the start_date + field." + deprecated: true + example: '2020-10-10T00:00:00Z' + start_date: + type: string + format: date-time + nullable: true + description: The date that the employee started working. If an employee + was rehired, the most recent start date will be returned. + example: '2020-10-11T00:00:00Z' + remote_created_at: + type: string + format: date-time + nullable: true + description: When the third party's employee was created. + example: '2020-10-11T00:00:00Z' + employment_status: + oneOf: + - $ref: '#/components/schemas/EmploymentStatusEnum' + - type: string + nullable: true + description: |- + The employment status of the employee. + + * `ACTIVE` - ACTIVE + * `PENDING` - PENDING + * `INACTIVE` - INACTIVE + example: INACTIVE + termination_date: + type: string + format: date-time + nullable: true + description: The employee's termination date. + example: '2021-10-12T00:00:00Z' + avatar: + type: string + format: uri + nullable: true + maxLength: 2000 + example: http://alturl.com/h2h8m + description: The URL of the employee's avatar image. + custom_fields: + type: object + additionalProperties: {} + nullable: true + description: Custom fields configured for a given model. + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /people + data: + - Varies by platform + x-merge-expands: '{"company": "Company", "employments": "Employment", "groups": + "Group", "home_location": "Location", "manager": "Employee", "pay_group": + "PayGroup", "team": "Team", "work_location": "Location"}' + x-merge-category: hris + EmployeeEndpointRequest: + type: object + properties: + model: + $ref: '#/components/schemas/EmployeeRequest' + required: + - model + x-merge-category: hris + EmployeePayrollRun: + type: object + description: |- + # The EmployeePayrollRun Object + ### Description + The `EmployeePayrollRun` object is used to represent an employee's pay statement for a specific payroll run. + + ### Usage Example + Fetch from the `LIST EmployeePayrollRun` endpoint and filter by `ID` to show all employee payroll runs. + properties: + id: + type: string + format: uuid + readOnly: true + example: fb8c55b6-1cb8-4b4c-9fb6-17924231619d + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '19202938' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + employee: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Employee' + nullable: true + description: The employee whose payroll is being run. + example: d2f972d0-2526-434b-9409-4c3b468e08f0 + x-merge-expands-to: Employee + payroll_run: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/PayrollRun' + nullable: true + description: The payroll being run. + example: 35347df1-95e7-46e2-93cc-66f1191edca5 + x-merge-expands-to: PayrollRun + gross_pay: + type: number + format: double + nullable: true + description: The total earnings throughout a given period for an employee + before any deductions are made. + example: 1342.67 + net_pay: + type: number + format: double + nullable: true + description: The take-home pay throughout a given period for an employee + after deductions are made. + example: 865.78 + start_date: + type: string + format: date-time + nullable: true + description: The day and time the payroll run started. + example: '2020-11-08T00:00:00Z' + end_date: + type: string + format: date-time + nullable: true + description: The day and time the payroll run ended. + example: '2020-11-09T00:00:00Z' + check_date: + type: string + format: date-time + nullable: true + description: The day and time the payroll run was checked. + example: '2020-11-10T00:00:00Z' + earnings: + type: array + items: + $ref: '#/components/schemas/Earning' + readOnly: true + example: + - employee_payroll_run: 35347df1-95e7-46e2-93cc-66f1191edca5 + amount: 1002.34 + type: SALARY + - employee_payroll_run: 35347df1-95e7-46e2-93cc-66f1191edca5 + amount: 8342.34 + type: OVERTIME + deductions: + type: array + items: + $ref: '#/components/schemas/Deduction' + readOnly: true + example: + - employee_payroll_run: 35347df1-95e7-46e2-93cc-66f1191edca5 + name: Social Security + employee_deduction: 34.54 + company_deduction: 78.78 + taxes: + type: array + items: + $ref: '#/components/schemas/Tax' + readOnly: true + example: + - employee_payroll_run: 35347df1-95e7-46e2-93cc-66f1191edca5 + name: California State Income Tax + amount: 100.25 + employer_tax: 'False' + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /employee-payroll + data: + - Varies by platform + x-merge-expands: '{"employee": "Employee", "payroll_run": "PayrollRun"}' + x-merge-category: hris + EmployeeRequest: + type: object + description: |- + # The Employee Object + ### Description + The `Employee` object is used to represent any person who has been employed by a company. By default, it returns all employees. To filter for only active employees, set the `employment_status` query parameter to `ACTIVE`. + + ### Usage Example + Fetch from the `LIST Employee` endpoint and filter by `ID` to show all employees. + properties: + employee_number: + type: string + nullable: true + description: The employee's number that appears in the third-party integration's + UI. + example: '2' + company: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Company' + nullable: true + description: The ID of the employee's company. + example: 8d9fd929-436c-4fd4-a48b-0c61f68d6178 + x-merge-expands-to: Company + first_name: + type: string + nullable: true + description: The employee's first name. + example: Greg + last_name: + type: string + nullable: true + description: The employee's last name. + example: Hirsch + preferred_name: + type: string + nullable: true + description: The employee's preferred first name. + example: Greg the egg + display_full_name: + type: string + nullable: true + description: The employee's full name, to use for display purposes. If a + preferred first name is available, the full name will include the preferred + first name. + example: Cousin Greg Hirsch + username: + type: string + nullable: true + description: The employee's username that appears in the remote UI. + example: cousingreg + groups: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Group' + nullable: true + example: + - 21a54124-397f-494d-985e-3c5b330b8a68 + x-merge-expands-to: Group + work_email: + type: string + format: email + nullable: true + description: The employee's work email. + maxLength: 254 + example: greg@merge.dev + personal_email: + type: string + format: email + nullable: true + description: The employee's personal email. + maxLength: 254 + example: greg@gmail.com + mobile_phone_number: + type: string + nullable: true + description: The employee's mobile phone number. + example: '+1234567890' + employments: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Employment' + nullable: true + example: + - 17a54124-287f-494d-965e-3c5b330c9a68 + description: Array of `Employment` IDs for this Employee. + x-merge-expands-to: Employment + home_location: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Location' + nullable: true + description: The employee's home address. + example: d2f972d0-2526-434b-9409-4c3b468e08f0 + x-merge-expands-to: Location + work_location: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Location' + nullable: true + description: The employee's work address. + example: 9efbc633-3387-4306-aa55-e2c635e6bb4f + x-merge-expands-to: Location + manager: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Employee' + nullable: true + description: The employee ID of the employee's manager. + example: 0048ea5b-911e-4dff-9364-92070dea62ff + x-merge-expands-to: Employee + team: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Team' + nullable: true + description: The employee's team. + deprecated: true + x-merge-expands-to: Team + pay_group: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/PayGroup' + nullable: true + description: The employee's pay group + example: ad1264e2-39be-4787-b749-f1aade9e3405 + x-merge-expands-to: PayGroup + ssn: + type: string + nullable: true + description: The employee's social security number. + maxLength: 100 + example: '1234567890' + gender: + oneOf: + - $ref: '#/components/schemas/GenderEnum' + - type: string + nullable: true + description: |- + The employee's gender. + + * `MALE` - MALE + * `FEMALE` - FEMALE + * `NON-BINARY` - NON-BINARY + * `OTHER` - OTHER + * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE + example: MALE + ethnicity: + oneOf: + - $ref: '#/components/schemas/EthnicityEnum' + - type: string + nullable: true + description: |- + The employee's ethnicity. + + * `AMERICAN_INDIAN_OR_ALASKA_NATIVE` - AMERICAN_INDIAN_OR_ALASKA_NATIVE + * `ASIAN_OR_INDIAN_SUBCONTINENT` - ASIAN_OR_INDIAN_SUBCONTINENT + * `BLACK_OR_AFRICAN_AMERICAN` - BLACK_OR_AFRICAN_AMERICAN + * `HISPANIC_OR_LATINO` - HISPANIC_OR_LATINO + * `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER` - NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER + * `TWO_OR_MORE_RACES` - TWO_OR_MORE_RACES + * `WHITE` - WHITE + * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE + example: WHITE + marital_status: + oneOf: + - $ref: '#/components/schemas/MaritalStatusEnum' + - type: string + nullable: true + description: |- + The employee's filing status as related to marital status. + + * `SINGLE` - SINGLE + * `MARRIED_FILING_JOINTLY` - MARRIED_FILING_JOINTLY + * `MARRIED_FILING_SEPARATELY` - MARRIED_FILING_SEPARATELY + * `HEAD_OF_HOUSEHOLD` - HEAD_OF_HOUSEHOLD + * `QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD` - QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD + example: SINGLE + date_of_birth: + type: string + format: date-time + nullable: true + description: The employee's date of birth. + example: '1990-11-10T00:00:00Z' + hire_date: + type: string + format: date-time + nullable: true + description: "The date that the employee was hired, usually the day that + an offer letter is signed. If an employee has multiple hire dates from + previous employments, this represents the most recent hire date. Note: + If you're looking for the employee's start date, refer to the start_date + field." + deprecated: true + example: '2020-10-10T00:00:00Z' + start_date: + type: string + format: date-time + nullable: true + description: The date that the employee started working. If an employee + was rehired, the most recent start date will be returned. + example: '2020-10-11T00:00:00Z' + employment_status: + oneOf: + - $ref: '#/components/schemas/EmploymentStatusEnum' + - type: string + nullable: true + description: |- + The employment status of the employee. + + * `ACTIVE` - ACTIVE + * `PENDING` - PENDING + * `INACTIVE` - INACTIVE + example: INACTIVE + termination_date: + type: string + format: date-time + nullable: true + description: The employee's termination date. + example: '2021-10-12T00:00:00Z' + avatar: + type: string + format: uri + nullable: true + maxLength: 2000 + example: http://alturl.com/h2h8m + description: The URL of the employee's avatar image. + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + x-merge-expands: '{"company": "Company", "employments": "Employment", "groups": + "Group", "home_location": "Location", "manager": "Employee", "pay_group": + "PayGroup", "team": "Team", "work_location": "Location"}' + x-merge-category: hris + EmployeeResponse: + type: object + properties: + model: + $ref: '#/components/schemas/Employee' + warnings: + type: array + items: + $ref: '#/components/schemas/WarningValidationProblem' + errors: + type: array + items: + $ref: '#/components/schemas/ErrorValidationProblem' + logs: + type: array + items: + $ref: '#/components/schemas/DebugModeLog' + required: + - errors + - model + - warnings + x-merge-category: hris + EmployerBenefit: + type: object + description: |- + # The EmployerBenefit Object + ### Description + The `Employer Benefit` object is used to represent a benefit plan offered by a company. + + ### Usage Example + Fetch from the `LIST EmployerBenefits` endpoint and filter by `ID` to show all EmployerBenefits. + properties: + id: + type: string + format: uuid + readOnly: true + example: 025fjlc6-6000-430a-848e-aafacbadf4fele + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '19202939' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + benefit_plan_type: + oneOf: + - $ref: '#/components/schemas/BenefitPlanTypeEnum' + - type: string + nullable: true + description: |- + The type of benefit plan. + + * `MEDICAL` - MEDICAL + * `HEALTH_SAVINGS` - HEALTH_SAVINGS + * `INSURANCE` - INSURANCE + * `RETIREMENT` - RETIREMENT + * `OTHER` - OTHER + example: MEDICAL + name: + type: string + nullable: true + description: The employer benefit's name - typically the carrier or network + name. + maxLength: 200 + example: Kaiser Permanente Medical Plan + description: + type: string + nullable: true + description: The employer benefit's description. + maxLength: 2000 + example: HDHP Silver Plan + deduction_code: + type: string + nullable: true + description: The employer benefit's deduction code. + maxLength: 60 + example: COL + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + x-merge-category: hris + Employment: + type: object + description: |- + # The Employment Object + ### Description + The `Employment` object is used to represent a job position at a company. + + If an integration supports historical tracking of employments, it will be reflected in the data. If not, a new `Employment` object will be created whenever there is a change in job title or pay. The `effective_date` field should be used to order `Employment` objects, with the most recent date corresponding to the latest employment record for an employee. + + ### Usage Example + Fetch from the `LIST Employments` endpoint and filter by `ID` to show all employees. + properties: + id: + type: string + format: uuid + readOnly: true + example: 65d8ffd0-211b-4ba4-b85a-fbe2ce220982 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '19202938' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + employee: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Employee' + nullable: true + description: The employee holding this position. + example: 0958cbc6-6040-430a-848e-aafacbadf4ae + x-merge-expands-to: Employee + job_title: + type: string + nullable: true + description: The position's title. + example: Executive Assistant to Tom Wambsgans + pay_rate: + type: number + format: double + nullable: true + description: The position's pay rate. + example: '50000.00' + pay_period: + oneOf: + - $ref: '#/components/schemas/PayPeriodEnum' + - type: string + nullable: true + description: |- + The time period this pay rate encompasses. + + * `HOUR` - HOUR + * `DAY` - DAY + * `WEEK` - WEEK + * `EVERY_TWO_WEEKS` - EVERY_TWO_WEEKS + * `SEMIMONTHLY` - SEMIMONTHLY + * `MONTH` - MONTH + * `QUARTER` - QUARTER + * `EVERY_SIX_MONTHS` - EVERY_SIX_MONTHS + * `YEAR` - YEAR + example: YEAR + pay_frequency: + oneOf: + - $ref: '#/components/schemas/PayFrequencyEnum' + - type: string + nullable: true + description: |- + The position's pay frequency. + + * `WEEKLY` - WEEKLY + * `BIWEEKLY` - BIWEEKLY + * `MONTHLY` - MONTHLY + * `QUARTERLY` - QUARTERLY + * `SEMIANNUALLY` - SEMIANNUALLY + * `ANNUALLY` - ANNUALLY + * `THIRTEEN-MONTHLY` - THIRTEEN-MONTHLY + * `PRO_RATA` - PRO_RATA + * `SEMIMONTHLY` - SEMIMONTHLY + example: BIWEEKLY + pay_currency: + oneOf: + - $ref: '#/components/schemas/PayCurrencyEnum' + - type: string + nullable: true + description: |- + The position's currency code. + + * `XUA` - ADB Unit of Account + * `AFN` - Afghan Afghani + * `AFA` - Afghan Afghani (1927–2002) + * `ALL` - Albanian Lek + * `ALK` - Albanian Lek (1946–1965) + * `DZD` - Algerian Dinar + * `ADP` - Andorran Peseta + * `AOA` - Angolan Kwanza + * `AOK` - Angolan Kwanza (1977–1991) + * `AON` - Angolan New Kwanza (1990–2000) + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + * `ARA` - Argentine Austral + * `ARS` - Argentine Peso + * `ARM` - Argentine Peso (1881–1970) + * `ARP` - Argentine Peso (1983–1985) + * `ARL` - Argentine Peso Ley (1970–1983) + * `AMD` - Armenian Dram + * `AWG` - Aruban Florin + * `AUD` - Australian Dollar + * `ATS` - Austrian Schilling + * `AZN` - Azerbaijani Manat + * `AZM` - Azerbaijani Manat (1993–2006) + * `BSD` - Bahamian Dollar + * `BHD` - Bahraini Dinar + * `BDT` - Bangladeshi Taka + * `BBD` - Barbadian Dollar + * `BYN` - Belarusian Ruble + * `BYB` - Belarusian Ruble (1994–1999) + * `BYR` - Belarusian Ruble (2000–2016) + * `BEF` - Belgian Franc + * `BEC` - Belgian Franc (convertible) + * `BEL` - Belgian Franc (financial) + * `BZD` - Belize Dollar + * `BMD` - Bermudan Dollar + * `BTN` - Bhutanese Ngultrum + * `BOB` - Bolivian Boliviano + * `BOL` - Bolivian Boliviano (1863–1963) + * `BOV` - Bolivian Mvdol + * `BOP` - Bolivian Peso + * `BAM` - Bosnia-Herzegovina Convertible Mark + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + * `BWP` - Botswanan Pula + * `BRC` - Brazilian Cruzado (1986–1989) + * `BRZ` - Brazilian Cruzeiro (1942–1967) + * `BRE` - Brazilian Cruzeiro (1990–1993) + * `BRR` - Brazilian Cruzeiro (1993–1994) + * `BRN` - Brazilian New Cruzado (1989–1990) + * `BRB` - Brazilian New Cruzeiro (1967–1986) + * `BRL` - Brazilian Real + * `GBP` - British Pound + * `BND` - Brunei Dollar + * `BGL` - Bulgarian Hard Lev + * `BGN` - Bulgarian Lev + * `BGO` - Bulgarian Lev (1879–1952) + * `BGM` - Bulgarian Socialist Lev + * `BUK` - Burmese Kyat + * `BIF` - Burundian Franc + * `XPF` - CFP Franc + * `KHR` - Cambodian Riel + * `CAD` - Canadian Dollar + * `CVE` - Cape Verdean Escudo + * `KYD` - Cayman Islands Dollar + * `XAF` - Central African CFA Franc + * `CLE` - Chilean Escudo + * `CLP` - Chilean Peso + * `CLF` - Chilean Unit of Account (UF) + * `CNX` - Chinese People’s Bank Dollar + * `CNY` - Chinese Yuan + * `CNH` - Chinese Yuan (offshore) + * `COP` - Colombian Peso + * `COU` - Colombian Real Value Unit + * `KMF` - Comorian Franc + * `CDF` - Congolese Franc + * `CRC` - Costa Rican Colón + * `HRD` - Croatian Dinar + * `HRK` - Croatian Kuna + * `CUC` - Cuban Convertible Peso + * `CUP` - Cuban Peso + * `CYP` - Cypriot Pound + * `CZK` - Czech Koruna + * `CSK` - Czechoslovak Hard Koruna + * `DKK` - Danish Krone + * `DJF` - Djiboutian Franc + * `DOP` - Dominican Peso + * `NLG` - Dutch Guilder + * `XCD` - East Caribbean Dollar + * `DDM` - East German Mark + * `ECS` - Ecuadorian Sucre + * `ECV` - Ecuadorian Unit of Constant Value + * `EGP` - Egyptian Pound + * `GQE` - Equatorial Guinean Ekwele + * `ERN` - Eritrean Nakfa + * `EEK` - Estonian Kroon + * `ETB` - Ethiopian Birr + * `EUR` - Euro + * `XBA` - European Composite Unit + * `XEU` - European Currency Unit + * `XBB` - European Monetary Unit + * `XBC` - European Unit of Account (XBC) + * `XBD` - European Unit of Account (XBD) + * `FKP` - Falkland Islands Pound + * `FJD` - Fijian Dollar + * `FIM` - Finnish Markka + * `FRF` - French Franc + * `XFO` - French Gold Franc + * `XFU` - French UIC-Franc + * `GMD` - Gambian Dalasi + * `GEK` - Georgian Kupon Larit + * `GEL` - Georgian Lari + * `DEM` - German Mark + * `GHS` - Ghanaian Cedi + * `GHC` - Ghanaian Cedi (1979–2007) + * `GIP` - Gibraltar Pound + * `XAU` - Gold + * `GRD` - Greek Drachma + * `GTQ` - Guatemalan Quetzal + * `GWP` - Guinea-Bissau Peso + * `GNF` - Guinean Franc + * `GNS` - Guinean Syli + * `GYD` - Guyanaese Dollar + * `HTG` - Haitian Gourde + * `HNL` - Honduran Lempira + * `HKD` - Hong Kong Dollar + * `HUF` - Hungarian Forint + * `IMP` - IMP + * `ISK` - Icelandic Króna + * `ISJ` - Icelandic Króna (1918–1981) + * `INR` - Indian Rupee + * `IDR` - Indonesian Rupiah + * `IRR` - Iranian Rial + * `IQD` - Iraqi Dinar + * `IEP` - Irish Pound + * `ILS` - Israeli New Shekel + * `ILP` - Israeli Pound + * `ILR` - Israeli Shekel (1980–1985) + * `ITL` - Italian Lira + * `JMD` - Jamaican Dollar + * `JPY` - Japanese Yen + * `JOD` - Jordanian Dinar + * `KZT` - Kazakhstani Tenge + * `KES` - Kenyan Shilling + * `KWD` - Kuwaiti Dinar + * `KGS` - Kyrgystani Som + * `LAK` - Laotian Kip + * `LVL` - Latvian Lats + * `LVR` - Latvian Ruble + * `LBP` - Lebanese Pound + * `LSL` - Lesotho Loti + * `LRD` - Liberian Dollar + * `LYD` - Libyan Dinar + * `LTL` - Lithuanian Litas + * `LTT` - Lithuanian Talonas + * `LUL` - Luxembourg Financial Franc + * `LUC` - Luxembourgian Convertible Franc + * `LUF` - Luxembourgian Franc + * `MOP` - Macanese Pataca + * `MKD` - Macedonian Denar + * `MKN` - Macedonian Denar (1992–1993) + * `MGA` - Malagasy Ariary + * `MGF` - Malagasy Franc + * `MWK` - Malawian Kwacha + * `MYR` - Malaysian Ringgit + * `MVR` - Maldivian Rufiyaa + * `MVP` - Maldivian Rupee (1947–1981) + * `MLF` - Malian Franc + * `MTL` - Maltese Lira + * `MTP` - Maltese Pound + * `MRU` - Mauritanian Ouguiya + * `MRO` - Mauritanian Ouguiya (1973–2017) + * `MUR` - Mauritian Rupee + * `MXV` - Mexican Investment Unit + * `MXN` - Mexican Peso + * `MXP` - Mexican Silver Peso (1861–1992) + * `MDC` - Moldovan Cupon + * `MDL` - Moldovan Leu + * `MCF` - Monegasque Franc + * `MNT` - Mongolian Tugrik + * `MAD` - Moroccan Dirham + * `MAF` - Moroccan Franc + * `MZE` - Mozambican Escudo + * `MZN` - Mozambican Metical + * `MZM` - Mozambican Metical (1980–2006) + * `MMK` - Myanmar Kyat + * `NAD` - Namibian Dollar + * `NPR` - Nepalese Rupee + * `ANG` - Netherlands Antillean Guilder + * `TWD` - New Taiwan Dollar + * `NZD` - New Zealand Dollar + * `NIO` - Nicaraguan Córdoba + * `NIC` - Nicaraguan Córdoba (1988–1991) + * `NGN` - Nigerian Naira + * `KPW` - North Korean Won + * `NOK` - Norwegian Krone + * `OMR` - Omani Rial + * `PKR` - Pakistani Rupee + * `XPD` - Palladium + * `PAB` - Panamanian Balboa + * `PGK` - Papua New Guinean Kina + * `PYG` - Paraguayan Guarani + * `PEI` - Peruvian Inti + * `PEN` - Peruvian Sol + * `PES` - Peruvian Sol (1863–1965) + * `PHP` - Philippine Peso + * `XPT` - Platinum + * `PLN` - Polish Zloty + * `PLZ` - Polish Zloty (1950–1995) + * `PTE` - Portuguese Escudo + * `GWE` - Portuguese Guinea Escudo + * `QAR` - Qatari Rial + * `XRE` - RINET Funds + * `RHD` - Rhodesian Dollar + * `RON` - Romanian Leu + * `ROL` - Romanian Leu (1952–2006) + * `RUB` - Russian Ruble + * `RUR` - Russian Ruble (1991–1998) + * `RWF` - Rwandan Franc + * `SVC` - Salvadoran Colón + * `WST` - Samoan Tala + * `SAR` - Saudi Riyal + * `RSD` - Serbian Dinar + * `CSD` - Serbian Dinar (2002–2006) + * `SCR` - Seychellois Rupee + * `SLL` - Sierra Leonean Leone + * `XAG` - Silver + * `SGD` - Singapore Dollar + * `SKK` - Slovak Koruna + * `SIT` - Slovenian Tolar + * `SBD` - Solomon Islands Dollar + * `SOS` - Somali Shilling + * `ZAR` - South African Rand + * `ZAL` - South African Rand (financial) + * `KRH` - South Korean Hwan (1953–1962) + * `KRW` - South Korean Won + * `KRO` - South Korean Won (1945–1953) + * `SSP` - South Sudanese Pound + * `SUR` - Soviet Rouble + * `ESP` - Spanish Peseta + * `ESA` - Spanish Peseta (A account) + * `ESB` - Spanish Peseta (convertible account) + * `XDR` - Special Drawing Rights + * `LKR` - Sri Lankan Rupee + * `SHP` - St. Helena Pound + * `XSU` - Sucre + * `SDD` - Sudanese Dinar (1992–2007) + * `SDG` - Sudanese Pound + * `SDP` - Sudanese Pound (1957–1998) + * `SRD` - Surinamese Dollar + * `SRG` - Surinamese Guilder + * `SZL` - Swazi Lilangeni + * `SEK` - Swedish Krona + * `CHF` - Swiss Franc + * `SYP` - Syrian Pound + * `STN` - São Tomé & Príncipe Dobra + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + * `TVD` - TVD + * `TJR` - Tajikistani Ruble + * `TJS` - Tajikistani Somoni + * `TZS` - Tanzanian Shilling + * `XTS` - Testing Currency Code + * `THB` - Thai Baht + * `XXX` - The codes assigned for transactions where no currency is involved + * `TPE` - Timorese Escudo + * `TOP` - Tongan Paʻanga + * `TTD` - Trinidad & Tobago Dollar + * `TND` - Tunisian Dinar + * `TRY` - Turkish Lira + * `TRL` - Turkish Lira (1922–2005) + * `TMT` - Turkmenistani Manat + * `TMM` - Turkmenistani Manat (1993–2009) + * `USD` - US Dollar + * `USN` - US Dollar (Next day) + * `USS` - US Dollar (Same day) + * `UGX` - Ugandan Shilling + * `UGS` - Ugandan Shilling (1966–1987) + * `UAH` - Ukrainian Hryvnia + * `UAK` - Ukrainian Karbovanets + * `AED` - United Arab Emirates Dirham + * `UYW` - Uruguayan Nominal Wage Index Unit + * `UYU` - Uruguayan Peso + * `UYP` - Uruguayan Peso (1975–1993) + * `UYI` - Uruguayan Peso (Indexed Units) + * `UZS` - Uzbekistani Som + * `VUV` - Vanuatu Vatu + * `VES` - Venezuelan Bolívar + * `VEB` - Venezuelan Bolívar (1871–2008) + * `VEF` - Venezuelan Bolívar (2008–2018) + * `VND` - Vietnamese Dong + * `VNN` - Vietnamese Dong (1978–1985) + * `CHE` - WIR Euro + * `CHW` - WIR Franc + * `XOF` - West African CFA Franc + * `YDD` - Yemeni Dinar + * `YER` - Yemeni Rial + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + * `YUM` - Yugoslavian New Dinar (1994–2002) + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + * `ZWN` - ZWN + * `ZRN` - Zairean New Zaire (1993–1998) + * `ZRZ` - Zairean Zaire (1971–1993) + * `ZMW` - Zambian Kwacha + * `ZMK` - Zambian Kwacha (1968–2012) + * `ZWD` - Zimbabwean Dollar (1980–2008) + * `ZWR` - Zimbabwean Dollar (2008) + * `ZWL` - Zimbabwean Dollar (2009) + example: USD + pay_group: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/PayGroup' + nullable: true + description: The employment's pay group + example: d4e4837f-9900-484c-ac40-528365bb08ef + x-merge-expands-to: PayGroup + flsa_status: + oneOf: + - $ref: '#/components/schemas/FlsaStatusEnum' + - type: string + nullable: true + description: |- + The position's FLSA status. + + * `EXEMPT` - EXEMPT + * `SALARIED_NONEXEMPT` - SALARIED_NONEXEMPT + * `NONEXEMPT` - NONEXEMPT + * `OWNER` - OWNER + example: EXEMPT + effective_date: + type: string + format: date-time + nullable: true + description: The position's effective date. + example: '2023-10-06T18:42:34Z' + employment_type: + oneOf: + - $ref: '#/components/schemas/EmploymentTypeEnum' + - type: string + nullable: true + description: |- + The position's type of employment. + + * `FULL_TIME` - FULL_TIME + * `PART_TIME` - PART_TIME + * `INTERN` - INTERN + * `CONTRACTOR` - CONTRACTOR + * `FREELANCE` - FREELANCE + example: FULL TIME + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /jobs + data: + - Varies by platform + x-merge-nested-write-allowed: true + x-merge-expands: '{"employee": "Employee", "pay_group": "PayGroup"}' + x-merge-category: hris + EmploymentStatusEnum: + enum: + - ACTIVE + - PENDING + - INACTIVE + type: string + description: |- + * `ACTIVE` - ACTIVE + * `PENDING` - PENDING + * `INACTIVE` - INACTIVE + x-merge-category: hris + EmploymentTypeEnum: + enum: + - FULL_TIME + - PART_TIME + - INTERN + - CONTRACTOR + - FREELANCE + type: string + description: |- + * `FULL_TIME` - FULL_TIME + * `PART_TIME` - PART_TIME + * `INTERN` - INTERN + * `CONTRACTOR` - CONTRACTOR + * `FREELANCE` - FREELANCE + x-merge-category: hris + EnabledActionsEnum: + enum: + - READ + - WRITE + type: string + description: |- + * `READ` - READ + * `WRITE` - WRITE + x-merge-category: hris + EncodingEnum: + enum: + - RAW + - BASE64 + - GZIP_BASE64 + type: string + description: |- + * `RAW` - RAW + * `BASE64` - BASE64 + * `GZIP_BASE64` - GZIP_BASE64 + x-merge-category: hris + EndUserDetailsRequest: + type: object + properties: + end_user_email_address: + type: string + minLength: 1 + description: Your end user's email address. This is purely for identification + purposes - setting this value will not cause any emails to be sent. + maxLength: 100 + example: example@gmail.com + end_user_organization_name: + type: string + minLength: 1 + description: Your end user's organization. + maxLength: 100 + example: Test Organization + end_user_origin_id: + type: string + minLength: 1 + description: 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. + maxLength: 100 + example: '12345' + categories: + type: array + items: + $ref: '#/components/schemas/CategoriesEnum' + description: The integration categories to show in Merge Link. + example: + - hris + - ats + integration: + type: string + nullable: true + minLength: 1 + description: 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/. + example: bamboohr + link_expiry_mins: + type: integer + maximum: 10080 + minimum: 30 + default: 30 + description: An integer number of minutes between [30, 720 or 10080 if for + a Magic Link URL] for how long this token is valid. Defaults to 30. + should_create_magic_link_url: + type: boolean + nullable: true + default: false + description: Whether to generate a Magic Link URL. Defaults to false. For + more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. + hide_admin_magic_link: + type: boolean + nullable: true + default: false + description: 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: + type: array + items: + $ref: '#/components/schemas/CommonModelScopesBodyRequest' + nullable: true + description: An array of objects to specify the models and fields that will + be disabled for a given Linked Account. Each object uses model_id, enabled_actions, + and disabled_fields to specify the model, method, and fields that are + scoped for a given Linked Account. + category_common_model_scopes: + type: object + additionalProperties: + type: array + items: + $ref: '#/components/schemas/IndividualCommonModelScopeDeserializerRequest' + nullable: true + description: 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. + example: + hris: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: true + field_permissions: + enabled_fields: + - first_name + - last_name + - personal_email + disabled_fields: + - preferred_name + - model_name: Employment + model_permissions: + READ: + is_enabled: false + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - effective_date + ats: + - model_name: Job + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: true + field_permissions: + enabled_fields: + - name + disabled_fields: + - description + - model_name: Department + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: true + language: + oneOf: + - $ref: '#/components/schemas/LanguageEnum' + - type: string + nullable: true + description: |- + The following subset of IETF language tags can be used to configure localization. + + * `en` - en + * `de` - de + example: en + are_syncs_disabled: + type: boolean + nullable: true + default: false + description: The boolean that indicates whether initial, periodic, and force + syncs will be disabled. + integration_specific_config: + type: object + additionalProperties: {} + nullable: true + description: A JSON object containing integration-specific configuration + options. + example: + rippling: + oauth_code: 3h1jj8ssdf31dfji3o1jjdfjasd + required: + - categories + - end_user_email_address + - end_user_organization_name + - end_user_origin_id + x-merge-category: hris + ErrorValidationProblem: + type: object + properties: + source: + $ref: '#/components/schemas/ValidationProblemSource' + example: + pointer: /model/custom_fields + title: + type: string + example: Missing Required Field + detail: + type: string + example: custom_fields is a required field on model. + problem_type: + type: string + example: MISSING_REQUIRED_FIELD + required: + - detail + - problem_type + - title + x-merge-category: hris + EthnicityEnum: + enum: + - AMERICAN_INDIAN_OR_ALASKA_NATIVE + - ASIAN_OR_INDIAN_SUBCONTINENT + - BLACK_OR_AFRICAN_AMERICAN + - HISPANIC_OR_LATINO + - NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER + - TWO_OR_MORE_RACES + - WHITE + - PREFER_NOT_TO_DISCLOSE + type: string + description: |- + * `AMERICAN_INDIAN_OR_ALASKA_NATIVE` - AMERICAN_INDIAN_OR_ALASKA_NATIVE + * `ASIAN_OR_INDIAN_SUBCONTINENT` - ASIAN_OR_INDIAN_SUBCONTINENT + * `BLACK_OR_AFRICAN_AMERICAN` - BLACK_OR_AFRICAN_AMERICAN + * `HISPANIC_OR_LATINO` - HISPANIC_OR_LATINO + * `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER` - NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER + * `TWO_OR_MORE_RACES` - TWO_OR_MORE_RACES + * `WHITE` - WHITE + * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE + x-merge-category: hris + EventTypeEnum: + enum: + - 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 + type: string + description: |- + * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + * `INVITED_USER` - INVITED_USER + * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + * `CREATED_DESTINATION` - CREATED_DESTINATION + * `DELETED_DESTINATION` - DELETED_DESTINATION + * `CHANGED_DESTINATION` - CHANGED_DESTINATION + * `CHANGED_SCOPES` - CHANGED_SCOPES + * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + * `ENABLED_CATEGORY` - ENABLED_CATEGORY + * `DISABLED_CATEGORY` - DISABLED_CATEGORY + * `CHANGED_PASSWORD` - CHANGED_PASSWORD + * `RESET_PASSWORD` - RESET_PASSWORD + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING + * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING + * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING + * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING + * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + * `MUTED_ISSUE` - MUTED_ISSUE + * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + x-merge-category: hris + ExternalTargetFieldAPI: + type: object + properties: + name: + type: string + nullable: true + readOnly: true + example: example_target_field_name + description: + type: string + nullable: true + readOnly: true + example: this is a example description of a target field + is_mapped: + type: string + nullable: true + readOnly: true + example: true + x-merge-category: hris + ExternalTargetFieldAPIResponse: + type: object + properties: + Benefit: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + EmployerBenefit: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + Company: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + EmployeePayrollRun: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + Employee: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + Employment: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + Location: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + PayrollRun: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + Team: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + TimeOff: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + TimeOffBalance: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + BankInfo: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + PayGroup: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + Group: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + Dependent: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + TimesheetEntry: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + x-merge-category: hris + FieldMappingApiInstance: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: + type: boolean + readOnly: true + target_field: + type: object + properties: + name: + type: string + description: + type: string + is_organization_wide: + type: boolean + required: + - description + - is_organization_wide + - name + nullable: true + readOnly: true + example: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + type: object + properties: + remote_key_name: + type: string + nullable: true + schema: + type: object + additionalProperties: {} + nullable: true + remote_endpoint_info: + type: object + properties: + method: + type: string + nullable: true + url_path: + type: string + nullable: true + field_traversal_path: + type: array + items: + type: string + nullable: true + required: + - field_traversal_path + - method + - url_path + required: + - remote_endpoint_info + - remote_key_name + - schema + nullable: true + readOnly: true + example: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + x-merge-category: hris + FieldMappingApiInstanceResponse: + type: object + properties: + Benefit: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + EmployerBenefit: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + Company: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + EmployeePayrollRun: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + Employee: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + Employment: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + Location: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + PayrollRun: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + Team: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + TimeOff: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + TimeOffBalance: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + BankInfo: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + PayGroup: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + Group: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + Dependent: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + TimesheetEntry: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + x-merge-category: hris + FieldMappingInstanceResponse: + type: object + properties: + model: + $ref: '#/components/schemas/FieldMappingApiInstance' + warnings: + type: array + items: + $ref: '#/components/schemas/WarningValidationProblem' + errors: + type: array + items: + $ref: '#/components/schemas/ErrorValidationProblem' + logs: + type: array + items: + $ref: '#/components/schemas/DebugModeLog' + required: + - errors + - model + - warnings + x-merge-category: hris + FieldPermissionDeserializer: + type: object + properties: + enabled_fields: + type: array + items: {} + disabled_fields: + type: array + items: {} + x-merge-category: hris + FieldPermissionDeserializerRequest: + type: object + properties: + enabled_fields: + type: array + items: {} + disabled_fields: + type: array + items: {} + x-merge-category: hris + FlsaStatusEnum: + enum: + - EXEMPT + - SALARIED_NONEXEMPT + - NONEXEMPT + - OWNER + type: string + description: |- + * `EXEMPT` - EXEMPT + * `SALARIED_NONEXEMPT` - SALARIED_NONEXEMPT + * `NONEXEMPT` - NONEXEMPT + * `OWNER` - OWNER + x-merge-category: hris + GenderEnum: + enum: + - MALE + - FEMALE + - NON-BINARY + - OTHER + - PREFER_NOT_TO_DISCLOSE + type: string + description: |- + * `MALE` - MALE + * `FEMALE` - FEMALE + * `NON-BINARY` - NON-BINARY + * `OTHER` - OTHER + * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE + x-merge-category: hris + GenerateRemoteKeyRequest: + type: object + description: |- + # The GenerateRemoteKey Object + ### Description + The `GenerateRemoteKey` object is used to represent a request for a new remote key. + + ### Usage Example + Post a `GenerateRemoteKey` to create a new remote key. + properties: + name: + type: string + minLength: 1 + description: The name of the remote key + example: Remote Deployment Key 1 + required: + - name + x-merge-category: hris + Group: + type: object + description: |- + # The Group Object + ### Description + The `Group` object is used to represent any subset of employees across, for example, `DEPARTMENT` or `TEAM`. Employees can be in multiple Groups. + + ### Usage Example + Fetch from the `LIST Employee` endpoint and expand groups to view an employee's groups. + properties: + id: + type: string + format: uuid + readOnly: true + example: 134e0111-0f67-44f6-98f0-597000290bb3 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '800293' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + parent_group: + type: string + format: uuid + nullable: true + description: The parent group for this group. + example: 2ef51b11-2c4e-4b02-8d1d-50592d9e96ef + name: + type: string + nullable: true + description: The group name. + example: COST_CENTER_US + type: + oneOf: + - $ref: '#/components/schemas/GroupTypeEnum' + - type: string + nullable: true + description: |- + The Group type returned directly from the third-party. + + * `TEAM` - TEAM + * `DEPARTMENT` - DEPARTMENT + * `COST_CENTER` - COST_CENTER + * `BUSINESS_UNIT` - BUSINESS_UNIT + * `GROUP` - GROUP + example: COST_CENTER + is_commonly_used_as_team: + type: boolean + nullable: true + description: Indicates whether the Group refers to a team in the third party + platform. Note that this is an opinionated view based on how Merge observes + most organizations representing teams in each third party platform. If + your customer uses a platform different from most, there is a chance this + will not be correct. + example: true + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /group + data: + - Varies by platform + x-merge-expands: '{"child_groups": "Group"}' + x-merge-category: hris + GroupTypeEnum: + enum: + - TEAM + - DEPARTMENT + - COST_CENTER + - BUSINESS_UNIT + - GROUP + type: string + description: |- + * `TEAM` - TEAM + * `DEPARTMENT` - DEPARTMENT + * `COST_CENTER` - COST_CENTER + * `BUSINESS_UNIT` - BUSINESS_UNIT + * `GROUP` - GROUP + x-merge-category: hris + IgnoreCommonModelRequest: + type: object + properties: + reason: + oneOf: + - $ref: '#/components/schemas/ReasonEnum' + - type: string + example: GENERAL_CUSTOMER_REQUEST + message: + type: string + minLength: 1 + maxLength: 256 + example: deletion request by user id 51903790-7dfe-4053-8d63-5a10cc4ffd39 + required: + - reason + x-merge-category: hris + IndividualCommonModelScopeDeserializer: + type: object + properties: + model_name: + type: string + model_permissions: + type: object + additionalProperties: + $ref: '#/components/schemas/ModelPermissionDeserializer' + field_permissions: + $ref: '#/components/schemas/FieldPermissionDeserializer' + required: + - model_name + x-merge-category: hris + IndividualCommonModelScopeDeserializerRequest: + type: object + properties: + model_name: + type: string + minLength: 1 + model_permissions: + type: object + additionalProperties: + $ref: '#/components/schemas/ModelPermissionDeserializerRequest' + field_permissions: + $ref: '#/components/schemas/FieldPermissionDeserializerRequest' + required: + - model_name + x-merge-category: hris + Issue: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + status: + oneOf: + - $ref: '#/components/schemas/IssueStatusEnum' + - type: string + description: |- + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + example: ONGOING + error_description: + type: string + example: Missing Permissions + end_user: + type: object + additionalProperties: {} + readOnly: true + example: b82302de-852e-4e60-b050-edf9da3b7c02 + first_incident_time: + type: string + format: date-time + nullable: true + example: '2022-12-05T16:19:15.161Z' + last_incident_time: + type: string + format: date-time + nullable: true + example: '2022-12-05T16:19:15.161Z' + is_muted: + type: boolean + readOnly: true + example: true + error_details: + type: array + items: + type: string + readOnly: true + example: + - Missing employee permissions. + - Missing time off permissions. + required: + - error_description + x-merge-category: hris + IssueStatusEnum: + enum: + - ONGOING + - RESOLVED + type: string + description: |- + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + x-merge-category: hris + LanguageEnum: + enum: + - en + - de + type: string + description: |- + * `en` - en + * `de` - de + x-merge-category: hris + LastSyncResultEnum: + enum: + - SYNCING + - DONE + - FAILED + - DISABLED + - PAUSED + - PARTIALLY_SYNCED + type: string + description: |- + * `SYNCING` - SYNCING + * `DONE` - DONE + * `FAILED` - FAILED + * `DISABLED` - DISABLED + * `PAUSED` - PAUSED + * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED + x-merge-category: hris + LinkToken: + type: object + properties: + link_token: + type: string + example: necdP7FtdASl1fQwm62be2_dM4wBG8_GactqoUV0 + integration_name: + type: string + example: Lever + magic_link_url: + type: string + example: https://link.merge.dev/asdfjkl12345jsndfgi2i83n + required: + - link_token + x-merge-category: hris + LinkedAccountCommonModelScopeDeserializerRequest: + type: object + properties: + common_models: + type: array + items: + $ref: '#/components/schemas/IndividualCommonModelScopeDeserializerRequest' + description: The common models you want to update the scopes for + example: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - home_location + disabled_fields: + - work_location + - model_name: Benefit + model_permissions: + WRITE: + is_enabled: false + required: + - common_models + x-merge-category: hris + LinkedAccountStatus: + type: object + properties: + linked_account_status: + type: string + can_make_request: + type: boolean + required: + - can_make_request + - linked_account_status + x-merge-category: hris + Location: + type: object + description: |- + # The Location Object + ### Description + The `Location` object is used to represent an address that can be associated with an employee. + + ### Usage Example + Fetch from the `LIST Locations` endpoint and filter by `ID` to show all office locations. + properties: + id: + type: string + format: uuid + readOnly: true + example: f5e6a151-f44e-449a-afb1-8fd781905958 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '93018402' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + name: + type: string + nullable: true + description: The location's name. + example: NYC Office + phone_number: + type: string + nullable: true + description: The location's phone number. + example: '+1111111111' + street_1: + type: string + nullable: true + description: Line 1 of the location's street address. + example: 2920 Broadway + street_2: + type: string + nullable: true + description: Line 2 of the location's street address. + example: 2nd Floor + city: + type: string + nullable: true + description: The location's city. + example: 'New York ' + state: + type: string + nullable: true + description: The location's state. Represents a region if outside of the + US. + example: NY + zip_code: + type: string + nullable: true + description: The location's zip code or postal code. + example: '10027' + country: + oneOf: + - $ref: '#/components/schemas/CountryEnum' + - type: string + nullable: true + description: |- + The location's country. + + * `AF` - Afghanistan + * `AX` - Åland Islands + * `AL` - Albania + * `DZ` - Algeria + * `AS` - American Samoa + * `AD` - Andorra + * `AO` - Angola + * `AI` - Anguilla + * `AQ` - Antarctica + * `AG` - Antigua and Barbuda + * `AR` - Argentina + * `AM` - Armenia + * `AW` - Aruba + * `AU` - Australia + * `AT` - Austria + * `AZ` - Azerbaijan + * `BS` - Bahamas + * `BH` - Bahrain + * `BD` - Bangladesh + * `BB` - Barbados + * `BY` - Belarus + * `BE` - Belgium + * `BZ` - Belize + * `BJ` - Benin + * `BM` - Bermuda + * `BT` - Bhutan + * `BO` - Bolivia + * `BQ` - Bonaire, Sint Eustatius and Saba + * `BA` - Bosnia and Herzegovina + * `BW` - Botswana + * `BV` - Bouvet Island + * `BR` - Brazil + * `IO` - British Indian Ocean Territory + * `BN` - Brunei + * `BG` - Bulgaria + * `BF` - Burkina Faso + * `BI` - Burundi + * `CV` - Cabo Verde + * `KH` - Cambodia + * `CM` - Cameroon + * `CA` - Canada + * `KY` - Cayman Islands + * `CF` - Central African Republic + * `TD` - Chad + * `CL` - Chile + * `CN` - China + * `CX` - Christmas Island + * `CC` - Cocos (Keeling) Islands + * `CO` - Colombia + * `KM` - Comoros + * `CG` - Congo + * `CD` - Congo (the Democratic Republic of the) + * `CK` - Cook Islands + * `CR` - Costa Rica + * `CI` - Côte d'Ivoire + * `HR` - Croatia + * `CU` - Cuba + * `CW` - Curaçao + * `CY` - Cyprus + * `CZ` - Czechia + * `DK` - Denmark + * `DJ` - Djibouti + * `DM` - Dominica + * `DO` - Dominican Republic + * `EC` - Ecuador + * `EG` - Egypt + * `SV` - El Salvador + * `GQ` - Equatorial Guinea + * `ER` - Eritrea + * `EE` - Estonia + * `SZ` - Eswatini + * `ET` - Ethiopia + * `FK` - Falkland Islands (Malvinas) + * `FO` - Faroe Islands + * `FJ` - Fiji + * `FI` - Finland + * `FR` - France + * `GF` - French Guiana + * `PF` - French Polynesia + * `TF` - French Southern Territories + * `GA` - Gabon + * `GM` - Gambia + * `GE` - Georgia + * `DE` - Germany + * `GH` - Ghana + * `GI` - Gibraltar + * `GR` - Greece + * `GL` - Greenland + * `GD` - Grenada + * `GP` - Guadeloupe + * `GU` - Guam + * `GT` - Guatemala + * `GG` - Guernsey + * `GN` - Guinea + * `GW` - Guinea-Bissau + * `GY` - Guyana + * `HT` - Haiti + * `HM` - Heard Island and McDonald Islands + * `VA` - Holy See + * `HN` - Honduras + * `HK` - Hong Kong + * `HU` - Hungary + * `IS` - Iceland + * `IN` - India + * `ID` - Indonesia + * `IR` - Iran + * `IQ` - Iraq + * `IE` - Ireland + * `IM` - Isle of Man + * `IL` - Israel + * `IT` - Italy + * `JM` - Jamaica + * `JP` - Japan + * `JE` - Jersey + * `JO` - Jordan + * `KZ` - Kazakhstan + * `KE` - Kenya + * `KI` - Kiribati + * `KW` - Kuwait + * `KG` - Kyrgyzstan + * `LA` - Laos + * `LV` - Latvia + * `LB` - Lebanon + * `LS` - Lesotho + * `LR` - Liberia + * `LY` - Libya + * `LI` - Liechtenstein + * `LT` - Lithuania + * `LU` - Luxembourg + * `MO` - Macao + * `MG` - Madagascar + * `MW` - Malawi + * `MY` - Malaysia + * `MV` - Maldives + * `ML` - Mali + * `MT` - Malta + * `MH` - Marshall Islands + * `MQ` - Martinique + * `MR` - Mauritania + * `MU` - Mauritius + * `YT` - Mayotte + * `MX` - Mexico + * `FM` - Micronesia (Federated States of) + * `MD` - Moldova + * `MC` - Monaco + * `MN` - Mongolia + * `ME` - Montenegro + * `MS` - Montserrat + * `MA` - Morocco + * `MZ` - Mozambique + * `MM` - Myanmar + * `NA` - Namibia + * `NR` - Nauru + * `NP` - Nepal + * `NL` - Netherlands + * `NC` - New Caledonia + * `NZ` - New Zealand + * `NI` - Nicaragua + * `NE` - Niger + * `NG` - Nigeria + * `NU` - Niue + * `NF` - Norfolk Island + * `KP` - North Korea + * `MK` - North Macedonia + * `MP` - Northern Mariana Islands + * `NO` - Norway + * `OM` - Oman + * `PK` - Pakistan + * `PW` - Palau + * `PS` - Palestine, State of + * `PA` - Panama + * `PG` - Papua New Guinea + * `PY` - Paraguay + * `PE` - Peru + * `PH` - Philippines + * `PN` - Pitcairn + * `PL` - Poland + * `PT` - Portugal + * `PR` - Puerto Rico + * `QA` - Qatar + * `RE` - Réunion + * `RO` - Romania + * `RU` - Russia + * `RW` - Rwanda + * `BL` - Saint Barthélemy + * `SH` - Saint Helena, Ascension and Tristan da Cunha + * `KN` - Saint Kitts and Nevis + * `LC` - Saint Lucia + * `MF` - Saint Martin (French part) + * `PM` - Saint Pierre and Miquelon + * `VC` - Saint Vincent and the Grenadines + * `WS` - Samoa + * `SM` - San Marino + * `ST` - Sao Tome and Principe + * `SA` - Saudi Arabia + * `SN` - Senegal + * `RS` - Serbia + * `SC` - Seychelles + * `SL` - Sierra Leone + * `SG` - Singapore + * `SX` - Sint Maarten (Dutch part) + * `SK` - Slovakia + * `SI` - Slovenia + * `SB` - Solomon Islands + * `SO` - Somalia + * `ZA` - South Africa + * `GS` - South Georgia and the South Sandwich Islands + * `KR` - South Korea + * `SS` - South Sudan + * `ES` - Spain + * `LK` - Sri Lanka + * `SD` - Sudan + * `SR` - Suriname + * `SJ` - Svalbard and Jan Mayen + * `SE` - Sweden + * `CH` - Switzerland + * `SY` - Syria + * `TW` - Taiwan + * `TJ` - Tajikistan + * `TZ` - Tanzania + * `TH` - Thailand + * `TL` - Timor-Leste + * `TG` - Togo + * `TK` - Tokelau + * `TO` - Tonga + * `TT` - Trinidad and Tobago + * `TN` - Tunisia + * `TR` - Turkey + * `TM` - Turkmenistan + * `TC` - Turks and Caicos Islands + * `TV` - Tuvalu + * `UG` - Uganda + * `UA` - Ukraine + * `AE` - United Arab Emirates + * `GB` - United Kingdom + * `UM` - United States Minor Outlying Islands + * `US` - United States of America + * `UY` - Uruguay + * `UZ` - Uzbekistan + * `VU` - Vanuatu + * `VE` - Venezuela + * `VN` - Vietnam + * `VG` - Virgin Islands (British) + * `VI` - Virgin Islands (U.S.) + * `WF` - Wallis and Futuna + * `EH` - Western Sahara + * `YE` - Yemen + * `ZM` - Zambia + * `ZW` - Zimbabwe + example: US + location_type: + oneOf: + - $ref: '#/components/schemas/LocationTypeEnum' + - type: string + nullable: true + description: |- + The location's type. Can be either WORK or HOME + + * `HOME` - HOME + * `WORK` - WORK + example: WORK + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /locations + data: + - Varies by platform + x-merge-category: hris + LocationTypeEnum: + enum: + - HOME + - WORK + type: string + description: |- + * `HOME` - HOME + * `WORK` - WORK + x-merge-category: hris + MaritalStatusEnum: + enum: + - SINGLE + - MARRIED_FILING_JOINTLY + - MARRIED_FILING_SEPARATELY + - HEAD_OF_HOUSEHOLD + - QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD + type: string + description: |- + * `SINGLE` - SINGLE + * `MARRIED_FILING_JOINTLY` - MARRIED_FILING_JOINTLY + * `MARRIED_FILING_SEPARATELY` - MARRIED_FILING_SEPARATELY + * `HEAD_OF_HOUSEHOLD` - HEAD_OF_HOUSEHOLD + * `QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD` - QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD + x-merge-category: hris + MetaResponse: + type: object + properties: + request_schema: + type: object + additionalProperties: {} + example: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + type: object + additionalProperties: {} + status: + $ref: '#/components/schemas/LinkedAccountStatus' + example: + linked_account_status: COMPLETE + can_make_request: true + has_conditional_params: + type: boolean + has_required_linked_account_params: + type: boolean + required: + - has_conditional_params + - has_required_linked_account_params + - request_schema + x-merge-category: hris + MethodEnum: + enum: + - GET + - OPTIONS + - HEAD + - POST + - PUT + - PATCH + - DELETE + type: string + description: |- + * `GET` - GET + * `OPTIONS` - OPTIONS + * `HEAD` - HEAD + * `POST` - POST + * `PUT` - PUT + * `PATCH` - PATCH + * `DELETE` - DELETE + x-merge-category: hris + ModelOperation: + type: object + description: |- + # The ModelOperation Object + ### Description + The `ModelOperation` object is used to represent the operations that are currently supported for a given model. + + ### Usage Example + View what operations are supported for the `Candidate` endpoint. + properties: + model_name: + type: string + example: Candidate + available_operations: + type: array + items: + type: string + example: + - FETCH + - CREATE + required_post_parameters: + type: array + items: + type: string + example: + - remote_user_id + supported_fields: + type: array + items: + type: string + example: + - first_name + - last_name + - company + - title + required: + - available_operations + - model_name + - required_post_parameters + - supported_fields + x-merge-category: hris + ModelPermissionDeserializer: + type: object + properties: + is_enabled: + type: boolean + x-merge-category: hris + ModelPermissionDeserializerRequest: + type: object + properties: + is_enabled: + type: boolean + x-merge-category: hris + MultipartFormFieldRequest: + type: object + description: |- + # The MultipartFormField Object + ### Description + The `MultipartFormField` object is used to represent fields in an HTTP request using `multipart/form-data`. + + ### Usage Example + Create a `MultipartFormField` to define a multipart form entry. + properties: + name: + type: string + minLength: 1 + description: The name of the form field + example: resume + data: + type: string + minLength: 1 + description: The data for the form field. + example: SW50ZWdyYXRlIGZhc3QKSW50ZWdyYXRlIG9uY2U= + encoding: + oneOf: + - $ref: '#/components/schemas/EncodingEnum' + - type: string + nullable: true + default: RAW + description: |- + The encoding of the value of `data`. Defaults to `RAW` if not defined. + + * `RAW` - RAW + * `BASE64` - BASE64 + * `GZIP_BASE64` - GZIP_BASE64 + example: BASE64 + $ref: '#/components/schemas/EncodingEnum' + file_name: + type: string + nullable: true + minLength: 1 + description: The file name of the form field, if the field is for a file. + example: resume.pdf + content_type: + type: string + nullable: true + minLength: 1 + description: The MIME type of the file, if the field is for a file. + example: application/pdf + required: + - data + - name + x-merge-category: hris + PaginatedAccountDetailsAndActionsList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/AccountDetailsAndActions' + x-merge-category: hris + PaginatedAuditLogEventList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/AuditLogEvent' + x-merge-category: hris + PaginatedBankInfoList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/BankInfo' + x-merge-category: hris + PaginatedBenefitList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Benefit' + x-merge-category: hris + PaginatedCompanyList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Company' + x-merge-category: hris + PaginatedDependentList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Dependent' + x-merge-category: hris + PaginatedEmployeeList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Employee' + x-merge-category: hris + PaginatedEmployeePayrollRunList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/EmployeePayrollRun' + x-merge-category: hris + PaginatedEmployerBenefitList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/EmployerBenefit' + x-merge-category: hris + PaginatedEmploymentList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Employment' + x-merge-category: hris + PaginatedGroupList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Group' + x-merge-category: hris + PaginatedIssueList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Issue' + x-merge-category: hris + PaginatedLocationList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Location' + x-merge-category: hris + PaginatedPayGroupList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/PayGroup' + x-merge-category: hris + PaginatedPayrollRunList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/PayrollRun' + x-merge-category: hris + PaginatedSyncStatusList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/SyncStatus' + x-merge-category: hris + PaginatedTeamList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Team' + x-merge-category: hris + PaginatedTimeOffBalanceList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/TimeOffBalance' + x-merge-category: hris + PaginatedTimeOffList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/TimeOff' + x-merge-category: hris + PaginatedTimesheetEntryList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/TimesheetEntry' + x-merge-category: hris + PatchedEditFieldMappingRequest: + type: object + properties: + remote_field_traversal_path: + type: array + items: {} + description: The field traversal path of the remote field listed when you + hit the GET /remote-fields endpoint. + example: + - example_remote_field_name + remote_method: + type: string + minLength: 1 + description: The method of the remote endpoint where the remote field is + coming from. + example: GET + remote_url_path: + type: string + minLength: 1 + description: The path of the remote endpoint where the remote field is coming + from. + example: /example-url-path + x-merge-category: hris + PayCurrencyEnum: + enum: + - XUA + - AFN + - AFA + - ALL + - ALK + - DZD + - ADP + - AOA + - AOK + - AON + - AOR + - ARA + - ARS + - ARM + - ARP + - ARL + - AMD + - AWG + - AUD + - ATS + - AZN + - AZM + - BSD + - BHD + - BDT + - BBD + - BYN + - BYB + - BYR + - BEF + - BEC + - BEL + - BZD + - BMD + - BTN + - BOB + - BOL + - BOV + - BOP + - BAM + - BAD + - BAN + - BWP + - BRC + - BRZ + - BRE + - BRR + - BRN + - BRB + - BRL + - GBP + - BND + - BGL + - BGN + - BGO + - BGM + - BUK + - BIF + - XPF + - KHR + - CAD + - CVE + - KYD + - XAF + - CLE + - CLP + - CLF + - CNX + - CNY + - CNH + - COP + - COU + - KMF + - CDF + - CRC + - HRD + - HRK + - CUC + - CUP + - CYP + - CZK + - CSK + - DKK + - DJF + - DOP + - NLG + - XCD + - DDM + - ECS + - ECV + - EGP + - GQE + - ERN + - EEK + - ETB + - EUR + - XBA + - XEU + - XBB + - XBC + - XBD + - FKP + - FJD + - FIM + - FRF + - XFO + - XFU + - GMD + - GEK + - GEL + - DEM + - GHS + - GHC + - GIP + - XAU + - GRD + - GTQ + - GWP + - GNF + - GNS + - GYD + - HTG + - HNL + - HKD + - HUF + - IMP + - ISK + - ISJ + - INR + - IDR + - IRR + - IQD + - IEP + - ILS + - ILP + - ILR + - ITL + - JMD + - JPY + - JOD + - KZT + - KES + - KWD + - KGS + - LAK + - LVL + - LVR + - LBP + - LSL + - LRD + - LYD + - LTL + - LTT + - LUL + - LUC + - LUF + - MOP + - MKD + - MKN + - MGA + - MGF + - MWK + - MYR + - MVR + - MVP + - MLF + - MTL + - MTP + - MRU + - MRO + - MUR + - MXV + - MXN + - MXP + - MDC + - MDL + - MCF + - MNT + - MAD + - MAF + - MZE + - MZN + - MZM + - MMK + - NAD + - NPR + - ANG + - TWD + - NZD + - NIO + - NIC + - NGN + - KPW + - NOK + - OMR + - PKR + - XPD + - PAB + - PGK + - PYG + - PEI + - PEN + - PES + - PHP + - XPT + - PLN + - PLZ + - PTE + - GWE + - QAR + - XRE + - RHD + - RON + - ROL + - RUB + - RUR + - RWF + - SVC + - WST + - SAR + - RSD + - CSD + - SCR + - SLL + - XAG + - SGD + - SKK + - SIT + - SBD + - SOS + - ZAR + - ZAL + - KRH + - KRW + - KRO + - SSP + - SUR + - ESP + - ESA + - ESB + - XDR + - LKR + - SHP + - XSU + - SDD + - SDG + - SDP + - SRD + - SRG + - SZL + - SEK + - CHF + - SYP + - STN + - STD + - TVD + - TJR + - TJS + - TZS + - XTS + - THB + - XXX + - TPE + - TOP + - TTD + - TND + - TRY + - TRL + - TMT + - TMM + - USD + - USN + - USS + - UGX + - UGS + - UAH + - UAK + - AED + - UYW + - UYU + - UYP + - UYI + - UZS + - VUV + - VES + - VEB + - VEF + - VND + - VNN + - CHE + - CHW + - XOF + - YDD + - YER + - YUN + - YUD + - YUM + - YUR + - ZWN + - ZRN + - ZRZ + - ZMW + - ZMK + - ZWD + - ZWR + - ZWL + type: string + description: |- + * `XUA` - ADB Unit of Account + * `AFN` - Afghan Afghani + * `AFA` - Afghan Afghani (1927–2002) + * `ALL` - Albanian Lek + * `ALK` - Albanian Lek (1946–1965) + * `DZD` - Algerian Dinar + * `ADP` - Andorran Peseta + * `AOA` - Angolan Kwanza + * `AOK` - Angolan Kwanza (1977–1991) + * `AON` - Angolan New Kwanza (1990–2000) + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + * `ARA` - Argentine Austral + * `ARS` - Argentine Peso + * `ARM` - Argentine Peso (1881–1970) + * `ARP` - Argentine Peso (1983–1985) + * `ARL` - Argentine Peso Ley (1970–1983) + * `AMD` - Armenian Dram + * `AWG` - Aruban Florin + * `AUD` - Australian Dollar + * `ATS` - Austrian Schilling + * `AZN` - Azerbaijani Manat + * `AZM` - Azerbaijani Manat (1993–2006) + * `BSD` - Bahamian Dollar + * `BHD` - Bahraini Dinar + * `BDT` - Bangladeshi Taka + * `BBD` - Barbadian Dollar + * `BYN` - Belarusian Ruble + * `BYB` - Belarusian Ruble (1994–1999) + * `BYR` - Belarusian Ruble (2000–2016) + * `BEF` - Belgian Franc + * `BEC` - Belgian Franc (convertible) + * `BEL` - Belgian Franc (financial) + * `BZD` - Belize Dollar + * `BMD` - Bermudan Dollar + * `BTN` - Bhutanese Ngultrum + * `BOB` - Bolivian Boliviano + * `BOL` - Bolivian Boliviano (1863–1963) + * `BOV` - Bolivian Mvdol + * `BOP` - Bolivian Peso + * `BAM` - Bosnia-Herzegovina Convertible Mark + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + * `BWP` - Botswanan Pula + * `BRC` - Brazilian Cruzado (1986–1989) + * `BRZ` - Brazilian Cruzeiro (1942–1967) + * `BRE` - Brazilian Cruzeiro (1990–1993) + * `BRR` - Brazilian Cruzeiro (1993–1994) + * `BRN` - Brazilian New Cruzado (1989–1990) + * `BRB` - Brazilian New Cruzeiro (1967–1986) + * `BRL` - Brazilian Real + * `GBP` - British Pound + * `BND` - Brunei Dollar + * `BGL` - Bulgarian Hard Lev + * `BGN` - Bulgarian Lev + * `BGO` - Bulgarian Lev (1879–1952) + * `BGM` - Bulgarian Socialist Lev + * `BUK` - Burmese Kyat + * `BIF` - Burundian Franc + * `XPF` - CFP Franc + * `KHR` - Cambodian Riel + * `CAD` - Canadian Dollar + * `CVE` - Cape Verdean Escudo + * `KYD` - Cayman Islands Dollar + * `XAF` - Central African CFA Franc + * `CLE` - Chilean Escudo + * `CLP` - Chilean Peso + * `CLF` - Chilean Unit of Account (UF) + * `CNX` - Chinese People’s Bank Dollar + * `CNY` - Chinese Yuan + * `CNH` - Chinese Yuan (offshore) + * `COP` - Colombian Peso + * `COU` - Colombian Real Value Unit + * `KMF` - Comorian Franc + * `CDF` - Congolese Franc + * `CRC` - Costa Rican Colón + * `HRD` - Croatian Dinar + * `HRK` - Croatian Kuna + * `CUC` - Cuban Convertible Peso + * `CUP` - Cuban Peso + * `CYP` - Cypriot Pound + * `CZK` - Czech Koruna + * `CSK` - Czechoslovak Hard Koruna + * `DKK` - Danish Krone + * `DJF` - Djiboutian Franc + * `DOP` - Dominican Peso + * `NLG` - Dutch Guilder + * `XCD` - East Caribbean Dollar + * `DDM` - East German Mark + * `ECS` - Ecuadorian Sucre + * `ECV` - Ecuadorian Unit of Constant Value + * `EGP` - Egyptian Pound + * `GQE` - Equatorial Guinean Ekwele + * `ERN` - Eritrean Nakfa + * `EEK` - Estonian Kroon + * `ETB` - Ethiopian Birr + * `EUR` - Euro + * `XBA` - European Composite Unit + * `XEU` - European Currency Unit + * `XBB` - European Monetary Unit + * `XBC` - European Unit of Account (XBC) + * `XBD` - European Unit of Account (XBD) + * `FKP` - Falkland Islands Pound + * `FJD` - Fijian Dollar + * `FIM` - Finnish Markka + * `FRF` - French Franc + * `XFO` - French Gold Franc + * `XFU` - French UIC-Franc + * `GMD` - Gambian Dalasi + * `GEK` - Georgian Kupon Larit + * `GEL` - Georgian Lari + * `DEM` - German Mark + * `GHS` - Ghanaian Cedi + * `GHC` - Ghanaian Cedi (1979–2007) + * `GIP` - Gibraltar Pound + * `XAU` - Gold + * `GRD` - Greek Drachma + * `GTQ` - Guatemalan Quetzal + * `GWP` - Guinea-Bissau Peso + * `GNF` - Guinean Franc + * `GNS` - Guinean Syli + * `GYD` - Guyanaese Dollar + * `HTG` - Haitian Gourde + * `HNL` - Honduran Lempira + * `HKD` - Hong Kong Dollar + * `HUF` - Hungarian Forint + * `IMP` - IMP + * `ISK` - Icelandic Króna + * `ISJ` - Icelandic Króna (1918–1981) + * `INR` - Indian Rupee + * `IDR` - Indonesian Rupiah + * `IRR` - Iranian Rial + * `IQD` - Iraqi Dinar + * `IEP` - Irish Pound + * `ILS` - Israeli New Shekel + * `ILP` - Israeli Pound + * `ILR` - Israeli Shekel (1980–1985) + * `ITL` - Italian Lira + * `JMD` - Jamaican Dollar + * `JPY` - Japanese Yen + * `JOD` - Jordanian Dinar + * `KZT` - Kazakhstani Tenge + * `KES` - Kenyan Shilling + * `KWD` - Kuwaiti Dinar + * `KGS` - Kyrgystani Som + * `LAK` - Laotian Kip + * `LVL` - Latvian Lats + * `LVR` - Latvian Ruble + * `LBP` - Lebanese Pound + * `LSL` - Lesotho Loti + * `LRD` - Liberian Dollar + * `LYD` - Libyan Dinar + * `LTL` - Lithuanian Litas + * `LTT` - Lithuanian Talonas + * `LUL` - Luxembourg Financial Franc + * `LUC` - Luxembourgian Convertible Franc + * `LUF` - Luxembourgian Franc + * `MOP` - Macanese Pataca + * `MKD` - Macedonian Denar + * `MKN` - Macedonian Denar (1992–1993) + * `MGA` - Malagasy Ariary + * `MGF` - Malagasy Franc + * `MWK` - Malawian Kwacha + * `MYR` - Malaysian Ringgit + * `MVR` - Maldivian Rufiyaa + * `MVP` - Maldivian Rupee (1947–1981) + * `MLF` - Malian Franc + * `MTL` - Maltese Lira + * `MTP` - Maltese Pound + * `MRU` - Mauritanian Ouguiya + * `MRO` - Mauritanian Ouguiya (1973–2017) + * `MUR` - Mauritian Rupee + * `MXV` - Mexican Investment Unit + * `MXN` - Mexican Peso + * `MXP` - Mexican Silver Peso (1861–1992) + * `MDC` - Moldovan Cupon + * `MDL` - Moldovan Leu + * `MCF` - Monegasque Franc + * `MNT` - Mongolian Tugrik + * `MAD` - Moroccan Dirham + * `MAF` - Moroccan Franc + * `MZE` - Mozambican Escudo + * `MZN` - Mozambican Metical + * `MZM` - Mozambican Metical (1980–2006) + * `MMK` - Myanmar Kyat + * `NAD` - Namibian Dollar + * `NPR` - Nepalese Rupee + * `ANG` - Netherlands Antillean Guilder + * `TWD` - New Taiwan Dollar + * `NZD` - New Zealand Dollar + * `NIO` - Nicaraguan Córdoba + * `NIC` - Nicaraguan Córdoba (1988–1991) + * `NGN` - Nigerian Naira + * `KPW` - North Korean Won + * `NOK` - Norwegian Krone + * `OMR` - Omani Rial + * `PKR` - Pakistani Rupee + * `XPD` - Palladium + * `PAB` - Panamanian Balboa + * `PGK` - Papua New Guinean Kina + * `PYG` - Paraguayan Guarani + * `PEI` - Peruvian Inti + * `PEN` - Peruvian Sol + * `PES` - Peruvian Sol (1863–1965) + * `PHP` - Philippine Peso + * `XPT` - Platinum + * `PLN` - Polish Zloty + * `PLZ` - Polish Zloty (1950–1995) + * `PTE` - Portuguese Escudo + * `GWE` - Portuguese Guinea Escudo + * `QAR` - Qatari Rial + * `XRE` - RINET Funds + * `RHD` - Rhodesian Dollar + * `RON` - Romanian Leu + * `ROL` - Romanian Leu (1952–2006) + * `RUB` - Russian Ruble + * `RUR` - Russian Ruble (1991–1998) + * `RWF` - Rwandan Franc + * `SVC` - Salvadoran Colón + * `WST` - Samoan Tala + * `SAR` - Saudi Riyal + * `RSD` - Serbian Dinar + * `CSD` - Serbian Dinar (2002–2006) + * `SCR` - Seychellois Rupee + * `SLL` - Sierra Leonean Leone + * `XAG` - Silver + * `SGD` - Singapore Dollar + * `SKK` - Slovak Koruna + * `SIT` - Slovenian Tolar + * `SBD` - Solomon Islands Dollar + * `SOS` - Somali Shilling + * `ZAR` - South African Rand + * `ZAL` - South African Rand (financial) + * `KRH` - South Korean Hwan (1953–1962) + * `KRW` - South Korean Won + * `KRO` - South Korean Won (1945–1953) + * `SSP` - South Sudanese Pound + * `SUR` - Soviet Rouble + * `ESP` - Spanish Peseta + * `ESA` - Spanish Peseta (A account) + * `ESB` - Spanish Peseta (convertible account) + * `XDR` - Special Drawing Rights + * `LKR` - Sri Lankan Rupee + * `SHP` - St. Helena Pound + * `XSU` - Sucre + * `SDD` - Sudanese Dinar (1992–2007) + * `SDG` - Sudanese Pound + * `SDP` - Sudanese Pound (1957–1998) + * `SRD` - Surinamese Dollar + * `SRG` - Surinamese Guilder + * `SZL` - Swazi Lilangeni + * `SEK` - Swedish Krona + * `CHF` - Swiss Franc + * `SYP` - Syrian Pound + * `STN` - São Tomé & Príncipe Dobra + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + * `TVD` - TVD + * `TJR` - Tajikistani Ruble + * `TJS` - Tajikistani Somoni + * `TZS` - Tanzanian Shilling + * `XTS` - Testing Currency Code + * `THB` - Thai Baht + * `XXX` - The codes assigned for transactions where no currency is involved + * `TPE` - Timorese Escudo + * `TOP` - Tongan Paʻanga + * `TTD` - Trinidad & Tobago Dollar + * `TND` - Tunisian Dinar + * `TRY` - Turkish Lira + * `TRL` - Turkish Lira (1922–2005) + * `TMT` - Turkmenistani Manat + * `TMM` - Turkmenistani Manat (1993–2009) + * `USD` - US Dollar + * `USN` - US Dollar (Next day) + * `USS` - US Dollar (Same day) + * `UGX` - Ugandan Shilling + * `UGS` - Ugandan Shilling (1966–1987) + * `UAH` - Ukrainian Hryvnia + * `UAK` - Ukrainian Karbovanets + * `AED` - United Arab Emirates Dirham + * `UYW` - Uruguayan Nominal Wage Index Unit + * `UYU` - Uruguayan Peso + * `UYP` - Uruguayan Peso (1975–1993) + * `UYI` - Uruguayan Peso (Indexed Units) + * `UZS` - Uzbekistani Som + * `VUV` - Vanuatu Vatu + * `VES` - Venezuelan Bolívar + * `VEB` - Venezuelan Bolívar (1871–2008) + * `VEF` - Venezuelan Bolívar (2008–2018) + * `VND` - Vietnamese Dong + * `VNN` - Vietnamese Dong (1978–1985) + * `CHE` - WIR Euro + * `CHW` - WIR Franc + * `XOF` - West African CFA Franc + * `YDD` - Yemeni Dinar + * `YER` - Yemeni Rial + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + * `YUM` - Yugoslavian New Dinar (1994–2002) + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + * `ZWN` - ZWN + * `ZRN` - Zairean New Zaire (1993–1998) + * `ZRZ` - Zairean Zaire (1971–1993) + * `ZMW` - Zambian Kwacha + * `ZMK` - Zambian Kwacha (1968–2012) + * `ZWD` - Zimbabwean Dollar (1980–2008) + * `ZWR` - Zimbabwean Dollar (2008) + * `ZWL` - Zimbabwean Dollar (2009) + x-merge-category: hris + PayFrequencyEnum: + enum: + - WEEKLY + - BIWEEKLY + - MONTHLY + - QUARTERLY + - SEMIANNUALLY + - ANNUALLY + - THIRTEEN-MONTHLY + - PRO_RATA + - SEMIMONTHLY + type: string + description: |- + * `WEEKLY` - WEEKLY + * `BIWEEKLY` - BIWEEKLY + * `MONTHLY` - MONTHLY + * `QUARTERLY` - QUARTERLY + * `SEMIANNUALLY` - SEMIANNUALLY + * `ANNUALLY` - ANNUALLY + * `THIRTEEN-MONTHLY` - THIRTEEN-MONTHLY + * `PRO_RATA` - PRO_RATA + * `SEMIMONTHLY` - SEMIMONTHLY + x-merge-category: hris + PayGroup: + type: object + description: |- + # The PayGroup Object + ### Description + The `PayGroup` object is used to represent a subset of employees that are put together for payroll processing purposes. + + ### Usage Example + Fetch from the `LIST PayGroup` endpoint and filter by `ID` to show all pay group information. + properties: + id: + type: string + format: uuid + readOnly: true + example: fd1e0fb5-8f92-4ec9-9f32-179cf732867d + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '800293' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + pay_group_name: + type: string + nullable: true + description: The pay group name. + example: contractor + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /pay-group + data: + - Varies by platform + x-merge-category: hris + PayPeriodEnum: + enum: + - HOUR + - DAY + - WEEK + - EVERY_TWO_WEEKS + - SEMIMONTHLY + - MONTH + - QUARTER + - EVERY_SIX_MONTHS + - YEAR + type: string + description: |- + * `HOUR` - HOUR + * `DAY` - DAY + * `WEEK` - WEEK + * `EVERY_TWO_WEEKS` - EVERY_TWO_WEEKS + * `SEMIMONTHLY` - SEMIMONTHLY + * `MONTH` - MONTH + * `QUARTER` - QUARTER + * `EVERY_SIX_MONTHS` - EVERY_SIX_MONTHS + * `YEAR` - YEAR + x-merge-category: hris + PayrollRun: + type: object + description: |- + # The PayrollRun Object + ### Description + The `PayrollRun` object is used to represent a group of pay statements for a specific pay schedule. + + ### Usage Example + Fetch from the `LIST PayrollRuns` endpoint and filter by `ID` to show all payroll runs. + properties: + id: + type: string + format: uuid + readOnly: true + example: 37336947-b3d4-4a4c-a310-ab6ab510e079 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '19202938' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + run_state: + oneOf: + - $ref: '#/components/schemas/RunStateEnum' + - type: string + nullable: true + description: |- + The state of the payroll run + + * `PAID` - PAID + * `DRAFT` - DRAFT + * `APPROVED` - APPROVED + * `FAILED` - FAILED + * `CLOSED` - CLOSED + example: PAID + run_type: + oneOf: + - $ref: '#/components/schemas/RunTypeEnum' + - type: string + nullable: true + description: |- + The type of the payroll run + + * `REGULAR` - REGULAR + * `OFF_CYCLE` - OFF_CYCLE + * `CORRECTION` - CORRECTION + * `TERMINATION` - TERMINATION + * `SIGN_ON_BONUS` - SIGN_ON_BONUS + example: REGULAR + start_date: + type: string + format: date-time + nullable: true + description: The day and time the payroll run started. + example: '2020-11-08T00:00:00Z' + end_date: + type: string + format: date-time + nullable: true + description: The day and time the payroll run ended. + example: '2020-11-15T00:00:00Z' + check_date: + type: string + format: date-time + nullable: true + description: The day and time the payroll run was checked. + example: '2020-11-15T00:00:00Z' + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /payroll + data: + - Varies by platform + x-merge-category: hris + PolicyTypeEnum: + enum: + - VACATION + - SICK + - PERSONAL + - JURY_DUTY + - VOLUNTEER + - BEREAVEMENT + type: string + description: |- + * `VACATION` - VACATION + * `SICK` - SICK + * `PERSONAL` - PERSONAL + * `JURY_DUTY` - JURY_DUTY + * `VOLUNTEER` - VOLUNTEER + * `BEREAVEMENT` - BEREAVEMENT + x-merge-category: hris + ReasonEnum: + enum: + - GENERAL_CUSTOMER_REQUEST + - GDPR + - OTHER + type: string + description: |- + * `GENERAL_CUSTOMER_REQUEST` - GENERAL_CUSTOMER_REQUEST + * `GDPR` - GDPR + * `OTHER` - OTHER + x-merge-category: hris + RelationshipEnum: + enum: + - CHILD + - SPOUSE + - DOMESTIC_PARTNER + type: string + description: |- + * `CHILD` - CHILD + * `SPOUSE` - SPOUSE + * `DOMESTIC_PARTNER` - DOMESTIC_PARTNER + x-merge-category: hris + RemoteData: + type: object + description: |- + # The RemoteData Object + ### Description + The `RemoteData` object is used to represent the full data pulled from the third-party API for an object. + + ### Usage Example + TODO + properties: + path: + type: string + description: The third-party API path that is being called. + example: /platform-endpoint + data: + readOnly: true + description: The data returned from the third-party for this object in its + original, unnormalized format. + example: + - Varies by platform + required: + - path + x-merge-category: hris + RemoteEndpointInfo: + type: object + properties: + method: + type: string + example: GET + url_path: + type: string + example: /example-url-path + field_traversal_path: + type: array + items: {} + example: + - example_key_name + required: + - field_traversal_path + - method + - url_path + x-merge-category: hris + RemoteFieldAPI: + type: object + properties: + schema: + type: object + additionalProperties: {} + example: + type: string + remote_key_name: + type: string + example: example_remote_key_name + remote_endpoint_info: + $ref: '#/components/schemas/RemoteEndpointInfo' + example: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + type: array + items: {} + nullable: true + example: + - example + advanced_metadata: + allOf: + - $ref: '#/components/schemas/AdvancedMetadata' + nullable: true + coverage: + oneOf: + - type: integer + - type: number + format: double + nullable: true + readOnly: true + example: 0.33 + required: + - advanced_metadata + - remote_endpoint_info + - remote_key_name + - schema + x-merge-category: hris + RemoteFieldAPIResponse: + type: object + properties: + Benefit: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + EmployerBenefit: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + Company: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + EmployeePayrollRun: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + Employee: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + Employment: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + Location: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + PayrollRun: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + Team: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + TimeOff: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + TimeOffBalance: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + BankInfo: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + PayGroup: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + Group: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + Dependent: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + TimesheetEntry: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + x-merge-category: hris + RemoteKey: + type: object + description: |- + # The RemoteKey Object + ### Description + The `RemoteKey` object is used to represent a request for a new remote key. + + ### Usage Example + Post a `GenerateRemoteKey` to receive a new `RemoteKey`. + properties: + name: + type: string + example: Remote Deployment Key 1 + key: + type: string + example: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA + required: + - key + - name + x-merge-category: hris + RemoteKeyForRegenerationRequest: + type: object + description: |- + # The RemoteKeyForRegeneration Object + ### Description + The `RemoteKeyForRegeneration` object is used to exchange an old remote key for a new one + + ### Usage Example + Post a `RemoteKeyForRegeneration` to swap out an old remote key for a new one + properties: + name: + type: string + minLength: 1 + description: The name of the remote key + example: Remote Deployment Key 1 + required: + - name + x-merge-category: hris + RemoteResponse: + type: object + description: |- + # The RemoteResponse Object + ### Description + The `RemoteResponse` object is used to represent information returned from a third-party endpoint. + + ### Usage Example + View the `RemoteResponse` returned from your `DataPassthrough`. + properties: + method: + type: string + example: GET + path: + type: string + example: /scooters + status: + type: integer + example: 200 + response: + example: + scooters: + - company: Lime + model: Gen 2.5 + - company: Bird + model: Bird Zero + response_headers: + type: object + additionalProperties: {} + example: + X-Page-Token: value + response_type: + oneOf: + - $ref: '#/components/schemas/ResponseTypeEnum' + - type: string + example: JSON + headers: + type: object + additionalProperties: {} + example: + EXTRA-HEADER: value + Authorization: + required: + - method + - path + - response + - status + x-merge-category: hris + RequestFormatEnum: + enum: + - JSON + - XML + - MULTIPART + type: string + description: |- + * `JSON` - JSON + * `XML` - XML + * `MULTIPART` - MULTIPART + x-merge-category: hris + RequestTypeEnum: + enum: + - VACATION + - SICK + - PERSONAL + - JURY_DUTY + - VOLUNTEER + - BEREAVEMENT + type: string + description: |- + * `VACATION` - VACATION + * `SICK` - SICK + * `PERSONAL` - PERSONAL + * `JURY_DUTY` - JURY_DUTY + * `VOLUNTEER` - VOLUNTEER + * `BEREAVEMENT` - BEREAVEMENT + x-merge-category: hris + ResponseTypeEnum: + enum: + - JSON + - BASE64_GZIP + type: string + description: |- + * `JSON` - JSON + * `BASE64_GZIP` - BASE64_GZIP + x-merge-category: hris + RoleEnum: + enum: + - ADMIN + - DEVELOPER + - MEMBER + - API + - SYSTEM + - MERGE_TEAM + type: string + description: |- + * `ADMIN` - ADMIN + * `DEVELOPER` - DEVELOPER + * `MEMBER` - MEMBER + * `API` - API + * `SYSTEM` - SYSTEM + * `MERGE_TEAM` - MERGE_TEAM + x-merge-category: hris + RunStateEnum: + enum: + - PAID + - DRAFT + - APPROVED + - FAILED + - CLOSED + type: string + description: |- + * `PAID` - PAID + * `DRAFT` - DRAFT + * `APPROVED` - APPROVED + * `FAILED` - FAILED + * `CLOSED` - CLOSED + x-merge-category: hris + RunTypeEnum: + enum: + - REGULAR + - OFF_CYCLE + - CORRECTION + - TERMINATION + - SIGN_ON_BONUS + type: string + description: |- + * `REGULAR` - REGULAR + * `OFF_CYCLE` - OFF_CYCLE + * `CORRECTION` - CORRECTION + * `TERMINATION` - TERMINATION + * `SIGN_ON_BONUS` - SIGN_ON_BONUS + x-merge-category: hris + SelectiveSyncConfigurationsUsageEnum: + enum: + - IN_NEXT_SYNC + - IN_LAST_SYNC + type: string + description: |- + * `IN_NEXT_SYNC` - IN_NEXT_SYNC + * `IN_LAST_SYNC` - IN_LAST_SYNC + x-merge-category: hris + StatusFd5Enum: + enum: + - SYNCING + - DONE + - FAILED + - DISABLED + - PAUSED + - PARTIALLY_SYNCED + type: string + description: |- + * `SYNCING` - SYNCING + * `DONE` - DONE + * `FAILED` - FAILED + * `DISABLED` - DISABLED + * `PAUSED` - PAUSED + * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED + x-merge-category: hris + SyncStatus: + type: object + description: |- + # The SyncStatus Object + ### Description + The `SyncStatus` object is used to represent the syncing state of an account + + ### Usage Example + View the `SyncStatus` for an account to see how recently its models were synced. + properties: + model_name: + type: string + example: Employee + model_id: + type: string + example: hris.Employee + last_sync_start: + type: string + format: date-time + example: '2021-03-30T19:44:18.695973Z' + next_sync_start: + type: string + format: date-time + example: '2021-03-30T20:44:18.662942Z' + last_sync_result: + oneOf: + - $ref: '#/components/schemas/LastSyncResultEnum' + - type: string + example: DONE + last_sync_finished: + type: string + format: date-time + example: '2021-03-30T19:55:18.695973Z' + status: + oneOf: + - $ref: '#/components/schemas/StatusFd5Enum' + - type: string + example: SYNCING + is_initial_sync: + type: boolean + example: true + selective_sync_configurations_usage: + $ref: '#/components/schemas/SelectiveSyncConfigurationsUsageEnum' + required: + - is_initial_sync + - model_id + - model_name + - status + x-merge-sample-json: '{"model_name": "Candidate", "model_id": "ats.Candidate", + "last_sync_start": "2021-03-30T19:44:18.695973Z", "next_sync_start": "2021-03-30T20:44:18.662942Z", + "status": "SYNCING", "is_initial_sync": true}' + x-merge-category: hris + Tax: + type: object + description: |- + # The Tax Object + ### Description + The `Tax` object is used to represent an array of the tax deductions for a given employee's payroll run. + + ### Usage Example + Fetch from the `LIST Taxes` endpoint and filter by `ID` to show all taxes. + properties: + id: + type: string + format: uuid + readOnly: true + example: e3a825fd-c38d-4095-a717-df98c4cb9ebc + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '26806834' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + employee_payroll_run: + type: string + format: uuid + nullable: true + example: 35347df1-95e7-46e2-93cc-66f1191edca5 + name: + type: string + nullable: true + description: The tax's name. + example: California State Income Tax + amount: + type: number + format: double + nullable: true + description: The tax amount. + example: 100.25 + employer_tax: + type: boolean + nullable: true + description: Whether or not the employer is responsible for paying the tax. + example: 'False' + remote_was_deleted: + type: boolean + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + x-merge-nested-write-allowed: true + x-merge-category: hris + Team: + type: object + description: |- + # The Team Object + ### Description + The `Team` object is used to represent a subdivision of the company, usually a department. Each employee will be grouped into one specific Team. + + ### Usage Example + If you're building a way to filter by `Team`, you'd hit the `GET Teams` endpoint to fetch the `Teams`, and then use the `ID` of the team your user selects to filter the `GET Employees` endpoint. + properties: + id: + type: string + format: uuid + readOnly: true + example: 13a72919-9fae-4f54-81ca-ddfd8712a1ba + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '19202938' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + name: + type: string + nullable: true + description: The team's name. + example: Engineering + parent_team: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Team' + nullable: true + description: The team's parent team. + example: 1b998423-db0a-4037-a4cf-f79c60cb67b3 + x-merge-expands-to: Team + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /teams + data: + - Varies by platform + x-merge-expands: '{"parent_team": "Team"}' + x-merge-category: hris + TimeOff: + type: object + description: |- + # The TimeOff Object + ### Description + The `TimeOff` object is used to represent all employees' Time Off entries. + + ### Usage Example + Fetch from the `LIST TimeOffs` endpoint and filter by `ID` to show all time off requests. + properties: + id: + type: string + format: uuid + readOnly: true + example: 91b2b905-e866-40c8-8be2-efe53827a0aa + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '19202938' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + employee: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Employee' + nullable: true + description: The employee requesting time off. + example: d2f972d0-2526-434b-9409-4c3b468e08f0 + x-merge-expands-to: Employee + approver: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Employee' + nullable: true + description: The Merge ID of the employee with the ability to approve the + time off request. + example: 9efbc633-3387-4306-aa55-e2c635e6bb4f + x-merge-expands-to: Employee + status: + oneOf: + - $ref: '#/components/schemas/TimeOffStatusEnum' + - type: string + nullable: true + description: |- + The status of this time off request. + + * `REQUESTED` - REQUESTED + * `APPROVED` - APPROVED + * `DECLINED` - DECLINED + * `CANCELLED` - CANCELLED + * `DELETED` - DELETED + example: APPROVED + employee_note: + type: string + nullable: true + description: The employee note for this time off request. + example: Moving into the new apartment Kendall Roy gave me! + units: + oneOf: + - $ref: '#/components/schemas/UnitsEnum' + - type: string + nullable: true + description: |- + The measurement that the third-party integration uses to count time requested. + + * `HOURS` - HOURS + * `DAYS` - DAYS + example: DAYS + amount: + type: number + format: double + nullable: true + description: The time off quantity measured by the prescribed “units”. + example: 3 + request_type: + oneOf: + - $ref: '#/components/schemas/RequestTypeEnum' + - type: string + nullable: true + description: |- + The type of time off request. + + * `VACATION` - VACATION + * `SICK` - SICK + * `PERSONAL` - PERSONAL + * `JURY_DUTY` - JURY_DUTY + * `VOLUNTEER` - VOLUNTEER + * `BEREAVEMENT` - BEREAVEMENT + example: VACATION + start_time: + type: string + format: date-time + nullable: true + description: The day and time of the start of the time requested off. + example: '2020-11-10T00:00:00Z' + end_time: + type: string + format: date-time + nullable: true + description: The day and time of the end of the time requested off. + example: '2020-11-17T00:00:00Z' + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /leave + data: + - Varies by platform + x-merge-expands: '{"approver": "Employee", "employee": "Employee"}' + x-merge-category: hris + TimeOffBalance: + type: object + description: |- + # The TimeOffBalance Object + ### Description + The `TimeOffBalance` object is used to represent current balances for an employee's Time Off plan. + + ### Usage Example + Fetch from the `LIST TimeOffBalances` endpoint and filter by `ID` to show all time off balances. + properties: + id: + type: string + format: uuid + readOnly: true + example: 91b2b905-e866-40c8-8be2-efe53827a0aa + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '19202938' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + employee: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Employee' + nullable: true + description: The employee the balance belongs to. + example: d2f972d0-2526-434b-9409-4c3b468e08f0 + x-merge-expands-to: Employee + balance: + type: number + format: double + nullable: true + description: The current remaining PTO balance, measured in hours. For integrations + that return this value in days, Merge multiplies by 8 to calculate hours. + example: '60.0' + used: + type: number + format: double + nullable: true + description: The amount of PTO used in terms of hours. For integrations + that return this value in days, Merge multiplies by 8 to calculate hours. + example: '45.0' + policy_type: + oneOf: + - $ref: '#/components/schemas/PolicyTypeEnum' + - type: string + nullable: true + description: |- + The policy type of this time off balance. + + * `VACATION` - VACATION + * `SICK` - SICK + * `PERSONAL` - PERSONAL + * `JURY_DUTY` - JURY_DUTY + * `VOLUNTEER` - VOLUNTEER + * `BEREAVEMENT` - BEREAVEMENT + example: VACATION + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /leave + data: + - Varies by platform + x-merge-expands: '{"employee": "Employee"}' + x-merge-category: hris + TimeOffEndpointRequest: + type: object + properties: + model: + $ref: '#/components/schemas/TimeOffRequest' + required: + - model + x-merge-category: hris + TimeOffRequest: + type: object + description: |- + # The TimeOff Object + ### Description + The `TimeOff` object is used to represent all employees' Time Off entries. + + ### Usage Example + Fetch from the `LIST TimeOffs` endpoint and filter by `ID` to show all time off requests. + properties: + employee: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Employee' + nullable: true + description: The employee requesting time off. + example: d2f972d0-2526-434b-9409-4c3b468e08f0 + x-merge-expands-to: Employee + approver: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Employee' + nullable: true + description: The Merge ID of the employee with the ability to approve the + time off request. + example: 9efbc633-3387-4306-aa55-e2c635e6bb4f + x-merge-expands-to: Employee + status: + oneOf: + - $ref: '#/components/schemas/TimeOffStatusEnum' + - type: string + nullable: true + description: |- + The status of this time off request. + + * `REQUESTED` - REQUESTED + * `APPROVED` - APPROVED + * `DECLINED` - DECLINED + * `CANCELLED` - CANCELLED + * `DELETED` - DELETED + example: APPROVED + employee_note: + type: string + nullable: true + description: The employee note for this time off request. + example: Moving into the new apartment Kendall Roy gave me! + units: + oneOf: + - $ref: '#/components/schemas/UnitsEnum' + - type: string + nullable: true + description: |- + The measurement that the third-party integration uses to count time requested. + + * `HOURS` - HOURS + * `DAYS` - DAYS + example: DAYS + amount: + type: number + format: double + nullable: true + description: The time off quantity measured by the prescribed “units”. + example: 3 + request_type: + oneOf: + - $ref: '#/components/schemas/RequestTypeEnum' + - type: string + nullable: true + description: |- + The type of time off request. + + * `VACATION` - VACATION + * `SICK` - SICK + * `PERSONAL` - PERSONAL + * `JURY_DUTY` - JURY_DUTY + * `VOLUNTEER` - VOLUNTEER + * `BEREAVEMENT` - BEREAVEMENT + example: VACATION + start_time: + type: string + format: date-time + nullable: true + description: The day and time of the start of the time requested off. + example: '2020-11-10T00:00:00Z' + end_time: + type: string + format: date-time + nullable: true + description: The day and time of the end of the time requested off. + example: '2020-11-17T00:00:00Z' + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + x-merge-expands: '{"approver": "Employee", "employee": "Employee"}' + x-merge-category: hris + TimeOffResponse: + type: object + properties: + model: + $ref: '#/components/schemas/TimeOff' + warnings: + type: array + items: + $ref: '#/components/schemas/WarningValidationProblem' + errors: + type: array + items: + $ref: '#/components/schemas/ErrorValidationProblem' + logs: + type: array + items: + $ref: '#/components/schemas/DebugModeLog' + required: + - errors + - model + - warnings + x-merge-category: hris + TimeOffStatusEnum: + enum: + - REQUESTED + - APPROVED + - DECLINED + - CANCELLED + - DELETED + type: string + description: |- + * `REQUESTED` - REQUESTED + * `APPROVED` - APPROVED + * `DECLINED` - DECLINED + * `CANCELLED` - CANCELLED + * `DELETED` - DELETED + x-merge-category: hris + TimesheetEntry: + type: object + description: |- + # The Timesheet Entry Object + ### Description + The `Timesheet Entry` object is used to track coverage for hours worked by an 'Employee'. + + + ### Usage Example + GET and POST Timesheet Entries + properties: + id: + type: string + format: uuid + readOnly: true + example: 91b2b905-e866-40c8-8be2-efe53827a0aa + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '19202938' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + employee: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Employee' + nullable: true + description: The employee the timesheet entry is for. + example: d2f972d0-2526-434b-9409-4c3b468e08f0 + x-merge-expands-to: Employee + hours_worked: + type: number + format: double + nullable: true + description: The number of hours logged by the employee. + example: 10 + start_time: + type: string + format: date-time + nullable: true + description: The time at which the employee started work. + example: '2020-11-10T00:00:00Z' + end_time: + type: string + format: date-time + nullable: true + description: The time at which the employee ended work. + example: '2020-11-10T00:10:00Z' + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /dependent + data: + - Varies by platform + x-merge-expands: '{"employee": "Employee"}' + x-merge-category: hris + TimesheetEntryEndpointRequest: + type: object + properties: + model: + $ref: '#/components/schemas/TimesheetEntryRequest' + required: + - model + x-merge-category: hris + TimesheetEntryRequest: + type: object + description: |- + # The Timesheet Entry Object + ### Description + The `Timesheet Entry` object is used to track coverage for hours worked by an 'Employee'. + + + ### Usage Example + GET and POST Timesheet Entries + properties: + employee: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Employee' + nullable: true + description: The employee the timesheet entry is for. + example: d2f972d0-2526-434b-9409-4c3b468e08f0 + x-merge-expands-to: Employee + hours_worked: + type: number + format: double + nullable: true + description: The number of hours logged by the employee. + example: 10 + start_time: + type: string + format: date-time + nullable: true + description: The time at which the employee started work. + example: '2020-11-10T00:00:00Z' + end_time: + type: string + format: date-time + nullable: true + description: The time at which the employee ended work. + example: '2020-11-10T00:10:00Z' + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + x-merge-expands: '{"employee": "Employee"}' + x-merge-category: hris + TimesheetEntryResponse: + type: object + properties: + model: + $ref: '#/components/schemas/TimesheetEntry' + warnings: + type: array + items: + $ref: '#/components/schemas/WarningValidationProblem' + errors: + type: array + items: + $ref: '#/components/schemas/ErrorValidationProblem' + logs: + type: array + items: + $ref: '#/components/schemas/DebugModeLog' + required: + - errors + - model + - warnings + x-merge-category: hris + UnitsEnum: + enum: + - HOURS + - DAYS + type: string + description: |- + * `HOURS` - HOURS + * `DAYS` - DAYS + x-merge-category: hris + ValidationProblemSource: + type: object + properties: + pointer: + type: string + required: + - pointer + x-merge-category: hris + WarningValidationProblem: + type: object + properties: + source: + $ref: '#/components/schemas/ValidationProblemSource' + example: + pointer: /age + title: + type: string + example: Unrecognized Field + detail: + type: string + example: An unrecognized field, age, was passed in with request data. + problem_type: + type: string + example: UNRECOGNIZED_FIELD + required: + - detail + - problem_type + - title + x-merge-category: hris + WebhookReceiver: + type: object + properties: + event: + type: string + is_active: + type: boolean + key: + type: string + required: + - event + - is_active + x-merge-category: hris + WebhookReceiverRequest: + type: object + properties: + event: + type: string + minLength: 1 + is_active: + type: boolean + key: + type: string + minLength: 1 + required: + - event + - is_active + x-merge-category: hris + securitySchemes: + tokenAuth: + type: http + scheme: bearer + description: Token-based authentication with required prefix "Bearer" + x-fern-token-variable-name: api_key +servers: +- url: https://api.merge.dev/api/hris/v1 + description: Production + x-fern-server-name: Production +- url: https://api-sandbox.merge.dev/api/hris/v1 + description: Sandbox + x-fern-server-name: Sandbox +- url: https://api-eu.merge.dev/api/hris/v1 + description: Production EU + x-fern-server-name: ProductionEU +- url: https://api-ap.merge.dev/api/hris/v1 + description: Production APSE1 + x-fern-server-name: ProductionAPSE1 diff --git a/.mock/ticketing_v3.yml b/.mock/ticketing_v3.yml new file mode 100644 index 000000000..95deeb5fa --- /dev/null +++ b/.mock/ticketing_v3.yml @@ -0,0 +1,8382 @@ +openapi: 3.0.3 +info: + title: Merge Ticketing API + version: '1.0' + description: The unified API for building rich integrations with multiple Ticketing + platforms. + contact: + name: Merge Team + url: https://www.merge.dev/ + email: hello@merge.dev +paths: + /ticketing/v1/account-details: + get: + operationId: account_details_retrieve + description: Get details for a linked account. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - account-details + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AccountDetails' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ticketing/v1/account-token/{public_token}: + get: + operationId: account_token_retrieve + description: Returns the account token for the end user with the provided public + token. + parameters: + - in: path + name: public_token + schema: + type: string + required: true + tags: + - account-token + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AccountToken' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ticketing/v1/accounts: + get: + operationId: accounts_list + description: Returns a list of `Account` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + tags: + - accounts + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedAccountList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ticketing/v1/accounts/{id}: + get: + operationId: accounts_retrieve + description: Returns an `Account` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - accounts + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Account' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ticketing/v1/async-passthrough: + post: + operationId: async_passthrough_create + description: Asynchronously pull data from an endpoint not currently supported + by Merge. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - async-passthrough + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DataPassthroughRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/DataPassthroughRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/DataPassthroughRequest' + required: true + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AsyncPassthroughReciept' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ticketing/v1/async-passthrough/{async_passthrough_receipt_id}: + get: + operationId: async_passthrough_retrieve + description: Retrieves data from earlier async-passthrough POST request + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: async_passthrough_receipt_id + schema: + type: string + format: uuid + required: true + tags: + - async-passthrough + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/RemoteResponse' + - type: string + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ticketing/v1/attachments: + get: + operationId: attachments_list + description: Returns a list of `Attachment` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - ticket + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandTicket: + value: ticket + summary: Expand Ticket + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_created_after + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return attachments created in the third + party platform after this datetime. + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + - in: query + name: ticket_id + schema: + type: string + description: If provided, will only return comments for this ticket. + examples: + TicketId: + summary: ticket_id + tags: + - attachments + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedAttachmentList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + post: + operationId: attachments_create + description: Creates an `Attachment` object with the given values. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: is_debug_mode + schema: + type: boolean + description: Whether to include debug fields (such as log file links) in the + response. + - in: query + name: run_async + schema: + type: boolean + description: Whether or not third-party updates should be run asynchronously. + tags: + - attachments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TicketingAttachmentEndpointRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/TicketingAttachmentEndpointRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/TicketingAttachmentEndpointRequest' + required: true + security: + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/TicketingAttachmentResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ticketing/v1/attachments/{id}: + get: + operationId: attachments_retrieve + description: Returns an `Attachment` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - ticket + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandTicket: + value: ticket + summary: Expand Ticket + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - attachments + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Attachment' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ticketing/v1/attachments/{id}/download: + get: + operationId: attachments_download_retrieve + description: Returns the `File` content with the given `id` as a stream of bytes. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: mime_type + schema: + type: string + description: If provided, specifies the export format of the file to be downloaded. + For information on supported export formats, please refer to our export format help center article. + tags: + - attachments + security: + - tokenAuth: [] + responses: + '200': + content: + application/octet-stream: + schema: + type: string + format: binary + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ticketing/v1/attachments/meta/post: + get: + operationId: attachments_meta_post_retrieve + description: Returns metadata for `TicketingAttachment` POSTs. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - attachments + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetaResponse' + description: '' + x-merge-meta-post: META_POST + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ticketing/v1/audit-trail: + get: + operationId: audit_trail_list + description: Gets a list of audit trail events. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: end_date + schema: + type: string + description: If included, will only include audit trail events that occurred + before this time + - in: query + name: event_type + schema: + type: string + description: '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`' + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: start_date + schema: + type: string + description: If included, will only include audit trail events that occurred + after this time + - in: query + name: user_email + schema: + type: string + description: 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. + tags: + - audit-trail + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedAuditLogEventList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ticketing/v1/available-actions: + get: + operationId: available_actions_retrieve + description: Returns a list of models and actions available for an account. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - available-actions + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AvailableActions' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ticketing/v1/collections: + get: + operationId: collections_list + description: Returns a list of `Collection` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: collection_type + schema: + type: string + nullable: true + enum: + - '' + - LIST + - + - PROJECT + description: If provided, will only return collections of the given type. + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - parent_collection + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandParentCollection: + value: parent_collection + summary: Expand Parent_collection + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: parent_collection_id + schema: + type: string + description: If provided, will only return collections whose parent collection + matches the given id. + examples: + ParentCollectionId: + summary: parent_collection_id + - in: query + name: remote_fields + schema: + type: string + enum: + - collection_type + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesCollectionType: + value: collection_type + summary: Original Enum Values Collection_type + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + - in: query + name: show_enum_origins + schema: + type: string + enum: + - collection_type + description: 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) + examples: + OriginalEnumValuesCollectionType: + value: collection_type + summary: Original Enum Values Collection_type + tags: + - collections + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedCollectionList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ticketing/v1/collections/{collection_id}/viewers: + get: + operationId: collections_viewers_list + description: Returns a list of `Viewer` objects that point to a User id or Team + id that is either an assignee or viewer on a `Collection` with the given id. + [Learn + more.](https://help.merge.dev/en/articles/10333658-ticketing-access-control-list-acls) + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: collection_id + schema: + type: string + format: uuid + required: true + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - team + - user + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandUser,Team: + value: user,team + summary: Expand User, Team + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - collections + - viewers + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedViewerList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /ticketing/v1/collections/{id}: + get: + operationId: collections_retrieve + description: Returns a `Collection` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - parent_collection + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandParentCollection: + value: parent_collection + summary: Expand Parent_collection + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: remote_fields + schema: + type: string + enum: + - collection_type + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesCollectionType: + value: collection_type + summary: Original Enum Values Collection_type + - in: query + name: show_enum_origins + schema: + type: string + enum: + - collection_type + description: 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) + examples: + OriginalEnumValuesCollectionType: + value: collection_type + summary: Original Enum Values Collection_type + tags: + - collections + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Collection' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ticketing/v1/comments: + get: + operationId: comments_list + description: Returns a list of `Comment` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - contact + - ticket + - user + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandUser,Contact,Ticket: + value: user,contact,ticket + summary: Expand User, Contact, Ticket + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_created_after + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return Comments created in the third party + platform after this datetime. + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + - in: query + name: ticket_id + schema: + type: string + description: If provided, will only return comments for this ticket. + examples: + TicketId: + summary: ticket_id + tags: + - comments + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedCommentList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + post: + operationId: comments_create + description: Creates a `Comment` object with the given values. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: is_debug_mode + schema: + type: boolean + description: Whether to include debug fields (such as log file links) in the + response. + - in: query + name: run_async + schema: + type: boolean + description: Whether or not third-party updates should be run asynchronously. + tags: + - comments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CommentEndpointRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/CommentEndpointRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/CommentEndpointRequest' + required: true + security: + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/CommentResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ticketing/v1/comments/{id}: + get: + operationId: comments_retrieve + description: Returns a `Comment` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - contact + - ticket + - user + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandUser,Contact,Ticket: + value: user,contact,ticket + summary: Expand User, Contact, Ticket + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - comments + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Comment' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ticketing/v1/comments/meta/post: + get: + operationId: comments_meta_post_retrieve + description: Returns metadata for `Comment` POSTs. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - comments + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetaResponse' + description: '' + x-merge-meta-post: META_POST + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ticketing/v1/contacts: + get: + operationId: contacts_list + description: Returns a list of `Contact` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - account + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandAccount: + value: account + summary: Expand Account + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + tags: + - contacts + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedContactList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + post: + operationId: contacts_create + description: Creates a `Contact` object with the given values. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: is_debug_mode + schema: + type: boolean + description: Whether to include debug fields (such as log file links) in the + response. + - in: query + name: run_async + schema: + type: boolean + description: Whether or not third-party updates should be run asynchronously. + tags: + - contacts + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TicketingContactEndpointRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/TicketingContactEndpointRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/TicketingContactEndpointRequest' + required: true + security: + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/TicketingContactResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ticketing/v1/contacts/{id}: + get: + operationId: contacts_retrieve + description: Returns a `Contact` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - account + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandAccount: + value: account + summary: Expand Account + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - contacts + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Contact' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ticketing/v1/contacts/meta/post: + get: + operationId: contacts_meta_post_retrieve + description: Returns metadata for `TicketingContact` POSTs. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - contacts + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetaResponse' + description: '' + x-merge-meta-post: META_POST + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ticketing/v1/default-scopes: + get: + operationId: default_scopes_retrieve + description: Get the default permissions for Merge Common Models and fields + across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). + tags: + - scopes + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CommonModelScopeAPI' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ticketing/v1/delete-account: + post: + operationId: delete_account_delete + description: Delete a linked account. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - delete-account + security: + - tokenAuth: [] + responses: + '200': + description: No response body + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ticketing/v1/field-mappings: + get: + operationId: field_mappings_retrieve + description: Get all Field Mappings for this Linked Account. Field Mappings + are mappings between third-party Remote Fields and user defined Merge fields. + [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: exclude_remote_field_metadata + schema: + type: boolean + description: 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. + tags: + - field-mapping + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/FieldMappingApiInstanceResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + post: + operationId: field_mappings_create + description: Create new Field Mappings that will be available after the next + scheduled sync. This will cause the next sync for this Linked Account to sync + **ALL** data from start. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: exclude_remote_field_metadata + schema: + type: boolean + description: 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. + tags: + - field-mapping + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateFieldMappingRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/CreateFieldMappingRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/CreateFieldMappingRequest' + required: true + security: + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/FieldMappingInstanceResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ticketing/v1/field-mappings/{field_mapping_id}: + patch: + operationId: field_mappings_partial_update + description: Create or update existing Field Mappings for a Linked Account. + Changes will be reflected after the next scheduled sync. This will cause the + next sync for this Linked Account to sync **ALL** data from start. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: field_mapping_id + schema: + type: string + format: uuid + required: true + tags: + - field-mapping + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedEditFieldMappingRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedEditFieldMappingRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedEditFieldMappingRequest' + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/FieldMappingInstanceResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + delete: + operationId: field_mappings_destroy + description: Deletes Field Mappings for a Linked Account. All data related to + this Field Mapping will be deleted and these changes will be reflected after + the next scheduled sync. This will cause the next sync for this Linked Account + to sync **ALL** data from start. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: field_mapping_id + schema: + type: string + format: uuid + required: true + tags: + - field-mapping + security: + - tokenAuth: [] + responses: + '204': + content: + application/json: + schema: + $ref: '#/components/schemas/FieldMappingInstanceResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ticketing/v1/generate-key: + post: + operationId: generate_key_create + description: Create a remote key. + tags: + - generate-key + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GenerateRemoteKeyRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/GenerateRemoteKeyRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/GenerateRemoteKeyRequest' + required: true + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RemoteKey' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ticketing/v1/issues: + get: + operationId: issues_list + description: Gets all issues for Organization. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: query + name: account_token + schema: + type: string + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: end_date + schema: + type: string + description: If included, will only include issues whose most recent action + occurred before this time + - in: query + name: end_user_organization_name + schema: + type: string + - in: query + name: first_incident_time_after + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return issues whose first incident time + was after this datetime. + - in: query + name: first_incident_time_before + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return issues whose first incident time + was before this datetime. + - in: query + name: include_muted + schema: + type: string + description: If true, will include muted issues + - in: query + name: integration_name + schema: + type: string + - in: query + name: last_incident_time_after + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return issues whose last incident time + was after this datetime. + - in: query + name: last_incident_time_before + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return issues whose last incident time + was before this datetime. + - in: query + name: linked_account_id + schema: + type: string + description: If provided, will only include issues pertaining to the linked + account passed in. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: start_date + schema: + type: string + description: If included, will only include issues whose most recent action + occurred after this time + - in: query + name: status + schema: + type: string + enum: + - ONGOING + - RESOLVED + description: |- + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + tags: + - issues + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedIssueList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ticketing/v1/issues/{id}: + get: + operationId: issues_retrieve + description: Get a specific issue. + parameters: + - in: path + name: id + schema: + type: string + format: uuid + required: true + tags: + - issues + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Issue' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ticketing/v1/link-token: + post: + operationId: link_token_create + description: Creates a link token to be used when linking a new end user. + tags: + - link-token + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EndUserDetailsRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/EndUserDetailsRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/EndUserDetailsRequest' + required: true + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/LinkToken' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ticketing/v1/linked-account-scopes: + get: + operationId: linked_account_scopes_retrieve + description: Get all available permissions for Merge Common Models and fields + for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - scopes + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CommonModelScopeAPI' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + post: + operationId: linked_account_scopes_create + description: Update permissions for any Common Model or field for a single Linked + Account. Any Scopes not set in this POST request will inherit the default + Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes) + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - scopes + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LinkedAccountCommonModelScopeDeserializerRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/LinkedAccountCommonModelScopeDeserializerRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/LinkedAccountCommonModelScopeDeserializerRequest' + required: true + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CommonModelScopeAPI' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ticketing/v1/linked-accounts: + get: + operationId: linked_accounts_list + description: List linked accounts for your organization. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: query + name: category + schema: + type: string + nullable: true + enum: + - accounting + - ats + - crm + - filestorage + - hris + - mktg + - ticketing + description: |- + Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing` + + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: end_user_email_address + schema: + type: string + description: If provided, will only return linked accounts associated with + the given email address. + - in: query + name: end_user_organization_name + schema: + type: string + description: If provided, will only return linked accounts associated with + the given organization name. + - in: query + name: end_user_origin_id + schema: + type: string + description: If provided, will only return linked accounts associated with + the given origin ID. + - in: query + name: end_user_origin_ids + schema: + type: string + description: Comma-separated list of EndUser origin IDs, making it possible + to specify multiple EndUsers at once. + - in: query + name: id + schema: + type: string + format: uuid + - in: query + name: ids + schema: + type: string + description: Comma-separated list of LinkedAccount IDs, making it possible + to specify multiple LinkedAccounts at once. + - in: query + name: include_duplicates + schema: + type: boolean + description: 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. + - in: query + name: integration_name + schema: + type: string + description: If provided, will only return linked accounts associated with + the given integration name. + - in: query + name: is_test_account + schema: + type: string + description: If included, will only include test linked accounts. If not included, + will only include non-test linked accounts. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: status + schema: + type: string + description: 'Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, + `RELINK_NEEDED`' + tags: + - linked-accounts + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedAccountDetailsAndActionsList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ticketing/v1/passthrough: + post: + operationId: passthrough_create + description: Pull data from an endpoint not currently supported by Merge. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - passthrough + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DataPassthroughRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/DataPassthroughRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/DataPassthroughRequest' + required: true + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RemoteResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ticketing/v1/projects: + get: + operationId: projects_list + description: Returns a list of `Project` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + tags: + - projects + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedProjectList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ticketing/v1/projects/{id}: + get: + operationId: projects_retrieve + description: Returns a `Project` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - projects + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Project' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ticketing/v1/projects/{parent_id}/users: + get: + operationId: projects_users_list + description: Returns a list of `User` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - roles + - teams + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandTeams,Roles: + value: teams,roles + summary: Expand Teams, Roles + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: path + name: parent_id + schema: + type: string + format: uuid + required: true + tags: + - projects + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedUserList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ticketing/v1/regenerate-key: + post: + operationId: regenerate_key_create + description: Exchange remote keys. + tags: + - regenerate-key + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RemoteKeyForRegenerationRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/RemoteKeyForRegenerationRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/RemoteKeyForRegenerationRequest' + required: true + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RemoteKey' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ticketing/v1/remote-fields: + get: + operationId: remote_fields_retrieve + description: Get all remote fields for a Linked Account. Remote fields are third-party + fields that are accessible after initial sync if remote_data is enabled. You + can use remote fields to override existing Merge fields or map a new Merge + field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: common_models + schema: + type: string + description: A comma seperated list of Common Model names. If included, will + only return Remote Fields for those Common Models. + - in: query + name: include_example_values + schema: + type: string + description: 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. + tags: + - field-mapping + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RemoteFieldAPIResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ticketing/v1/roles: + get: + operationId: roles_list + description: Returns a list of `Role` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + tags: + - roles + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedRoleList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ticketing/v1/roles/{id}: + get: + operationId: roles_retrieve + description: Returns a `Role` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - roles + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Role' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ticketing/v1/sync-status: + get: + operationId: sync_status_list + description: 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). + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - sync-status + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedSyncStatusList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ticketing/v1/sync-status/resync: + post: + operationId: 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. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - force-resync + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SyncStatus' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ticketing/v1/tags: + get: + operationId: tags_list + description: Returns a list of `Tag` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + tags: + - tags + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedTagList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ticketing/v1/tags/{id}: + get: + operationId: tags_retrieve + description: Returns a `Tag` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - tags + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Tag' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ticketing/v1/target-fields: + get: + operationId: target_fields_retrieve + description: Get all organization-wide Target Fields, this will not include + any Linked Account specific Target Fields. Organization-wide Target Fields + are additional fields appended to the Merge Common Model for all Linked Accounts + in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - field-mapping + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ExternalTargetFieldAPIResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ticketing/v1/teams: + get: + operationId: teams_list + description: Returns a list of `Team` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + tags: + - teams + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedTeamList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ticketing/v1/teams/{id}: + get: + operationId: teams_retrieve + description: Returns a `Team` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - teams + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Team' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ticketing/v1/tickets: + get: + operationId: tickets_list + description: Returns a list of `Ticket` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: account_id + schema: + type: string + description: If provided, will only return tickets for this account. + examples: + AccountId: + summary: account_id + - in: query + name: assignee_ids + schema: + type: string + description: If provided, will only return tickets assigned to the assignee_ids; + multiple assignee_ids can be separated by commas. + - in: query + name: collection_ids + schema: + type: string + description: If provided, will only return tickets assigned to the collection_ids; + multiple collection_ids can be separated by commas. + - in: query + name: completed_after + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return tickets completed after this datetime. + - in: query + name: completed_before + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return tickets completed before this datetime. + - in: query + name: contact_id + schema: + type: string + description: If provided, will only return tickets for this contact. + examples: + ContactId: + summary: contact_id + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: creator_id + schema: + type: string + description: If provided, will only return tickets created by this creator_id. + examples: + CreatorId: + summary: creator_id + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: due_after + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return tickets due after this datetime. + - in: query + name: due_before + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return tickets due before this datetime. + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - account + - assigned_teams + - assignees + - attachments + - collections + - contact + - creator + - parent_ticket + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandAttachments,Assignees,Collections,AssignedTeams,Account,Contact,Creator,ParentTicket: + value: + attachments,assignees,collections,assigned_teams,account,contact,creator,parent_ticket + summary: Expand Attachments, Assignees, Collections, Assigned_teams, Account, + Contact, Creator, Parent_ticket + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_remote_fields + schema: + type: boolean + description: Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: parent_ticket_id + schema: + type: string + description: If provided, will only return sub tickets of the parent_ticket_id. + examples: + ParentTicketId: + summary: parent_ticket_id + - in: query + name: priority + schema: + type: string + nullable: true + enum: + - HIGH + - LOW + - NORMAL + - URGENT + description: |- + If provided, will only return tickets of this priority. + + * `URGENT` - URGENT + * `HIGH` - HIGH + * `NORMAL` - NORMAL + * `LOW` - LOW + - in: query + name: remote_created_after + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return tickets created in the third party + platform after this datetime. + - in: query + name: remote_created_before + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return tickets created in the third party + platform before this datetime. + - in: query + name: remote_fields + schema: + type: string + enum: + - priority + - priority,status + - priority,status,ticket_type + - priority,ticket_type + - status + - status,ticket_type + - ticket_type + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesPriority,Status,TicketType: + value: priority,status,ticket_type + summary: Original Enum Values Priority, Status, Ticket_type + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + - in: query + name: remote_updated_after + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return tickets updated in the third party + platform after this datetime. + - in: query + name: remote_updated_before + schema: + type: string + format: date-time + nullable: true + description: If provided, will only return tickets updated in the third party + platform before this datetime. + - in: query + name: show_enum_origins + schema: + type: string + enum: + - priority + - priority,status + - priority,status,ticket_type + - priority,ticket_type + - status + - status,ticket_type + - ticket_type + description: 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) + examples: + OriginalEnumValuesPriority,Status,TicketType: + value: priority,status,ticket_type + summary: Original Enum Values Priority, Status, Ticket_type + - in: query + name: status + schema: + type: string + nullable: true + enum: + - '' + - CLOSED + - IN_PROGRESS + - + - ON_HOLD + - OPEN + description: If provided, will only return tickets of this status. + - in: query + name: tags + schema: + type: string + description: If provided, will only return tickets matching the tags; multiple + tags can be separated by commas. + - in: query + name: ticket_type + schema: + type: string + nullable: true + description: If provided, will only return tickets of this type. + - in: query + name: ticket_url + schema: + type: string + format: uri + nullable: true + description: If provided, will only return tickets where the URL matches or + contains the substring + tags: + - tickets + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedTicketList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + post: + operationId: tickets_create + description: Creates a `Ticket` object with the given values. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: is_debug_mode + schema: + type: boolean + description: Whether to include debug fields (such as log file links) in the + response. + - in: query + name: run_async + schema: + type: boolean + description: Whether or not third-party updates should be run asynchronously. + tags: + - tickets + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TicketEndpointRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/TicketEndpointRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/TicketEndpointRequest' + required: true + security: + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/TicketResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ticketing/v1/tickets/{id}: + get: + operationId: tickets_retrieve + description: Returns a `Ticket` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - account + - assigned_teams + - assignees + - attachments + - collections + - contact + - creator + - parent_ticket + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandAttachments,Assignees,Collections,AssignedTeams,Account,Contact,Creator,ParentTicket: + value: + attachments,assignees,collections,assigned_teams,account,contact,creator,parent_ticket + summary: Expand Attachments, Assignees, Collections, Assigned_teams, Account, + Contact, Creator, Parent_ticket + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_remote_fields + schema: + type: boolean + description: Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: remote_fields + schema: + type: string + enum: + - priority + - priority,status + - priority,status,ticket_type + - priority,ticket_type + - status + - status,ticket_type + - ticket_type + description: Deprecated. Use show_enum_origins. + examples: + OriginalEnumValuesPriority,Status,TicketType: + value: priority,status,ticket_type + summary: Original Enum Values Priority, Status, Ticket_type + - in: query + name: show_enum_origins + schema: + type: string + enum: + - priority + - priority,status + - priority,status,ticket_type + - priority,ticket_type + - status + - status,ticket_type + - ticket_type + description: 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) + examples: + OriginalEnumValuesPriority,Status,TicketType: + value: priority,status,ticket_type + summary: Original Enum Values Priority, Status, Ticket_type + tags: + - tickets + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Ticket' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + patch: + operationId: tickets_partial_update + description: Updates a `Ticket` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: is_debug_mode + schema: + type: boolean + description: Whether to include debug fields (such as log file links) in the + response. + - in: query + name: run_async + schema: + type: boolean + description: Whether or not third-party updates should be run asynchronously. + tags: + - tickets + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedTicketEndpointRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedTicketEndpointRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedTicketEndpointRequest' + required: true + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/TicketResponse' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ticketing/v1/tickets/{ticket_id}/viewers: + get: + operationId: tickets_viewers_list + description: Returns a list of `Viewer` objects that point to a User id or Team + id that is either an assignee or viewer on a `Ticket` with the given id. [Learn + more.](https://help.merge.dev/en/articles/10333658-ticketing-access-control-list-acls) + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - team + - user + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandUser,Team: + value: user,team + summary: Expand User, Team + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: path + name: ticket_id + schema: + type: string + format: uuid + required: true + tags: + - tickets + - viewers + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedViewerList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /ticketing/v1/tickets/meta/patch/{id}: + get: + operationId: tickets_meta_patch_retrieve + description: Returns metadata for `Ticket` PATCHs. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: path + name: id + schema: + type: string + format: uuid + required: true + tags: + - tickets + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetaResponse' + description: '' + x-merge-meta-patch: META_PATCH + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ticketing/v1/tickets/meta/post: + get: + operationId: tickets_meta_post_retrieve + description: Returns metadata for `Ticket` POSTs. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: collection_id + schema: + type: string + description: If provided, will only return tickets for this collection. + - in: query + name: ticket_type + schema: + type: string + description: If provided, will only return tickets for this ticket type. + tags: + - tickets + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetaResponse' + description: '' + x-merge-meta-post: META_POST + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ticketing/v1/tickets/remote-field-classes: + get: + operationId: tickets_remote_field_classes_list + description: Returns a list of `RemoteFieldClass` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: ids + schema: + type: string + description: If provided, will only return remote field classes with the `ids` + in this list + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: is_common_model_field + schema: + type: boolean + nullable: true + description: If provided, will only return remote field classes with this + is_common_model_field value + - in: query + name: is_custom + schema: + type: boolean + nullable: true + description: If provided, will only return remote fields classes with this + is_custom value + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + tags: + - tickets + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedRemoteFieldClassList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC_BETA + /ticketing/v1/users: + get: + operationId: users_list + description: Returns a list of `User` objects. + x-fern-pagination: + cursor: $request.cursor + next_cursor: $response.next + results: $response.results + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: created_after + schema: + type: string + format: date-time + description: If provided, will only return objects created after this datetime. + - in: query + name: created_before + schema: + type: string + format: date-time + description: If provided, will only return objects created before this datetime. + - in: query + name: cursor + schema: + type: string + description: The pagination cursor value. + examples: + CursorExample: + value: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + summary: Cursor Example + - in: query + name: email_address + schema: + type: string + nullable: true + description: If provided, will only return users with emails equal to this + value (case insensitive). + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - roles + - teams + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandTeams,Roles: + value: teams,roles + summary: Expand Teams, Roles + explode: false + - in: query + name: include_deleted_data + schema: + type: boolean + description: 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/). + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + - in: query + name: modified_after + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge after this date time + will be returned. + - in: query + name: modified_before + schema: + type: string + format: date-time + description: If provided, only objects synced by Merge before this date time + will be returned. + - name: page_size + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: remote_id + schema: + type: string + nullable: true + description: The API provider's ID for the given object. + - in: query + name: team + schema: + type: string + description: If provided, will only return users matching in this team. + tags: + - users + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedUserList' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ticketing/v1/users/{id}: + get: + operationId: users_retrieve + description: Returns a `User` object with the given `id`. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + - in: query + name: expand + schema: + type: array + items: + type: string + enum: + - roles + - teams + description: Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + examples: + ExpandTeams,Roles: + value: teams,roles + summary: Expand Teams, Roles + explode: false + - in: path + name: id + schema: + type: string + format: uuid + required: true + - in: query + name: include_remote_data + schema: + type: boolean + description: Whether to include the original data Merge fetched from the third-party + to produce these models. + - in: query + name: include_shell_data + schema: + type: boolean + description: Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + tags: + - users + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/User' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + /ticketing/v1/webhook-receivers: + get: + operationId: webhook_receivers_list + description: Returns a list of `WebhookReceiver` objects. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - webhook-receivers + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/WebhookReceiver' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC + post: + operationId: webhook_receivers_create + description: Creates a `WebhookReceiver` object with the given values. + parameters: + - in: header + name: X-Account-Token + schema: + type: string + description: Token identifying the end user. + required: true + tags: + - webhook-receivers + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/WebhookReceiverRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/WebhookReceiverRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/WebhookReceiverRequest' + required: true + security: + - tokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/WebhookReceiver' + description: '' + x-endpoint-availability: ENDPOINT_AVAILABILITY_PUBLIC +components: + schemas: + Account: + type: object + description: |- + # The Account Object + ### Description + The `Account` object is used to represent the account that a ticket is associated with. + + The account is a company that may be a customer. This does not represent the company that is receiving the ticket. + + ### Usage Example + TODO + properties: + id: + type: string + format: uuid + readOnly: true + example: 17a54124-287f-494d-965e-3c5b330c9a68 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '19202938' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + name: + type: string + nullable: true + description: The account's name. + example: Waystar Royco + domains: + type: array + items: + type: string + nullable: true + nullable: true + description: The account's domain names. + example: + - waystar-royco.com + - royco.com + remote_was_deleted: + type: boolean + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + example: + - path: /actions + data: + - Varies by platform + x-merge-expands: '{"owner": "User"}' + x-merge-category: ticketing + AccountDetails: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + example: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd + integration: + type: string + readOnly: true + example: BambooHR + integration_slug: + type: string + readOnly: true + example: bamboohr + category: + oneOf: + - $ref: '#/components/schemas/CategoryEnum' + - type: string + nullable: true + example: hris + end_user_origin_id: + type: string + readOnly: true + example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + end_user_organization_name: + type: string + readOnly: true + example: Waystar Royco + end_user_email_address: + type: string + format: email + readOnly: true + example: kendall.roy@waystar-royco.com + status: + type: string + readOnly: true + example: COMPLETE + webhook_listener_url: + type: string + format: uri + readOnly: true + example: https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 + is_duplicate: + type: boolean + nullable: true + readOnly: true + description: Whether a Production Linked Account's credentials match another + existing Production Linked Account. This field is `null` for Test Linked + Accounts, incomplete Production Linked Accounts, and ignored duplicate + Production Linked Account sets. + example: true + account_type: + type: string + readOnly: true + example: PRODUCTION + completed_at: + type: string + format: date-time + nullable: true + description: The time at which account completes the linking flow. + example: '2024-08-26T20:11:19.277118Z' + x-merge-category: ticketing + AccountDetailsAndActions: + type: object + description: |- + # The LinkedAccount Object + ### Description + The `LinkedAccount` object is used to represent an end user's link with a specific integration. + + ### Usage Example + View a list of your organization's `LinkedAccount` objects. + properties: + id: + type: string + example: e59b1821-f85c-4e28-a6b3-1804156f3563 + category: + oneOf: + - $ref: '#/components/schemas/CategoryEnum' + - type: string + example: hris + status: + oneOf: + - $ref: '#/components/schemas/AccountDetailsAndActionsStatusEnum' + - type: string + example: INCOMPLETE + status_detail: + type: string + example: Invalid login credentials + end_user_origin_id: + type: string + example: 3ac95cde-6c7f-4eef-afec-be710b42308d + end_user_organization_name: + type: string + example: Foo Bar, LLC + end_user_email_address: + type: string + example: hradmin@foobar.dev + subdomain: + type: string + description: The tenant or domain the customer has provided access to. + example: foobar + webhook_listener_url: + type: string + example: https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 + is_duplicate: + type: boolean + nullable: true + description: Whether a Production Linked Account's credentials match another + existing Production Linked Account. This field is `null` for Test Linked + Accounts, incomplete Production Linked Accounts, and ignored duplicate + Production Linked Account sets. + example: true + integration: + $ref: '#/components/schemas/AccountDetailsAndActionsIntegration' + example: + name: SAP SuccessFactors + categories: + - hris + - ats + image: https://cdn.merge.dev/SuccessFactors_Logo.png + square_image: https://cdn.merge.dev/SuccessFactors_Square_Logo.jpg + color: '#F6A704' + slug: sap-successfactors + passthrough_available: true + available_model_operations: + - model_name: Candidate + available_operations: + - FETCH + - CREATE + required_post_parameters: + - remote_user_id + supported_fields: + - first_name + - last_name + - company + - title + account_type: + type: string + example: PRODUCTION + completed_at: + type: string + format: date-time + example: '2024-08-26T20:11:19.277118Z' + required: + - account_type + - completed_at + - end_user_email_address + - end_user_organization_name + - id + - status + - webhook_listener_url + x-merge-sample-json: '{"id": "e59b1821-f85c-4e28-a6b3-1804156f3563", "category": + "hris", "status": "INCOMPLETE", "status_detail": "Invalid login credentials", + "end_user_origin_id": "3ac95cde-6c7f-4eef-afec-be710b42308d", "end_user_organization_name": + "Foo Bar, LLC", "end_user_email_address": "hradmin@foobar.dev", "webhook_listener_url": + "https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4", + "is_duplicate": true, "integration": {"name": "SAP SuccessFactors", "categories": + ["hris", "ats"], "image": "https://cdn.merge.dev/SuccessFactors_Logo.png", + "square_image": "https://cdn.merge.dev/SuccessFactors_Square_Logo.jpg", "color": + "#F6A704", "slug": "sap-successfactors", "passthrough_available": true, "available_model_operations": + [{"model_name": "Candidate", "available_operations": ["FETCH", "CREATE"], + "required_post_parameters": ["remote_user_id"], "supported_fields": ["first_name", + "last_name", "company", "title"]}]}}' + x-merge-category: ticketing + AccountDetailsAndActionsIntegration: + type: object + properties: + name: + type: string + categories: + type: array + items: + $ref: '#/components/schemas/CategoriesEnum' + image: + type: string + square_image: + type: string + color: + type: string + slug: + type: string + passthrough_available: + type: boolean + available_model_operations: + type: array + items: + $ref: '#/components/schemas/ModelOperation' + required: + - categories + - color + - name + - passthrough_available + - slug + x-merge-category: ticketing + AccountDetailsAndActionsStatusEnum: + enum: + - COMPLETE + - INCOMPLETE + - RELINK_NEEDED + - IDLE + type: string + description: |- + * `COMPLETE` - COMPLETE + * `INCOMPLETE` - INCOMPLETE + * `RELINK_NEEDED` - RELINK_NEEDED + * `IDLE` - IDLE + x-merge-category: ticketing + AccountIntegration: + type: object + properties: + name: + type: string + description: Company name. + abbreviated_name: + type: string + nullable: true + description: "Optional. This shortened name appears in places with limited + space, usually in conjunction with the platform's logo (e.g., Merge Link + menu).

Example: Workforce Now (in lieu of ADP Workforce Now), + SuccessFactors (in lieu of SAP SuccessFactors)" + categories: + type: array + items: + $ref: '#/components/schemas/CategoriesEnum' + description: Category or categories this integration belongs to. Multiple + categories should be comma separated, i.e. [ats, hris]. + readOnly: true + image: + type: string + format: uri + nullable: true + description: Company logo in rectangular shape. + square_image: + type: string + format: uri + nullable: true + description: Company logo in square shape. + color: + type: string + description: The color of this integration used for buttons and text throughout + the app and landing pages. Choose a darker, saturated color. + pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ + maxLength: 18 + slug: + type: string + readOnly: true + api_endpoints_to_documentation_urls: + type: object + additionalProperties: {} + description: "Mapping of API endpoints to documentation urls for support. + Example: {'GET': [['/common-model-scopes', 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', + 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], + 'POST': []}" + webhook_setup_guide_url: + type: string + nullable: true + description: Setup guide URL for third party webhook creation. Exposed in + Merge Docs. + category_beta_status: + type: object + description: Category or categories this integration is in beta status for. + readOnly: true + required: + - name + x-merge-category: ticketing + AccountToken: + type: object + properties: + account_token: + type: string + example: T9klMDQrcHdm9jrtHuOS2Nf06BIHwMNjpPXPMB + integration: + $ref: '#/components/schemas/AccountIntegration' + example: + name: SAP SuccessFactors + categories: + - hris + - ats + image: https://cdn.merge.dev/SuccessFactors_Logo.png + square_image: https://cdn.merge.dev/SuccessFactors_Square_Logo.jpg + color: '#F6A704' + slug: sap-successfactors + id: + type: string + example: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd + required: + - account_token + - id + - integration + x-merge-category: ticketing + AdvancedMetadata: + type: object + properties: + id: + type: string + format: uuid + display_name: + type: string + description: + type: string + is_required: + type: boolean + is_custom: + type: boolean + field_choices: + type: array + items: {} + required: + - id + x-merge-category: ticketing + AsyncPassthroughReciept: + type: object + properties: + async_passthrough_receipt_id: + type: string + format: uuid + example: fd29020f-2695-445e-922e-dcd5e81903fd + required: + - async_passthrough_receipt_id + x-merge-category: ticketing + Attachment: + type: object + description: |- + # The Attachment Object + ### Description + The `Attachment` object is used to represent an attachment for a ticket. + + ### Usage Example + TODO + properties: + id: + type: string + format: uuid + readOnly: true + example: 17a54124-287f-494d-965e-3c5b330c9a68 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '19202938' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + file_name: + type: string + nullable: true + description: The attachment's name. It is required to include the file extension + in the attachment's name. + example: Screenshot.png + ticket: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Ticket' + nullable: true + description: The ticket associated with the attachment. + example: 0958cbc6-6040-430a-848e-aafacbadf4ae + x-merge-expands-to: Ticket + file_url: + type: string + nullable: true + example: http://alturl.com/p749b + description: The attachment's url. It is required to include the file extension + in the file's URL. + content_type: + type: string + nullable: true + description: The attachment's file format. + example: jpeg + uploaded_by: + type: string + format: uuid + nullable: true + description: The user who uploaded the attachment. + example: 28b54125-287f-494d-965e-3c5b330c9a68 + remote_created_at: + type: string + format: date-time + nullable: true + description: When the third party's attachment was created. + example: '2022-11-10T00:00:00Z' + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + x-merge-nested-write-allowed: true + x-merge-expands: '{"ticket": "Ticket"}' + x-merge-category: ticketing + AttachmentRequest: + type: object + description: |- + # The Attachment Object + ### Description + The `Attachment` object is used to represent an attachment for a ticket. + + ### Usage Example + TODO + properties: + file_name: + type: string + nullable: true + description: The attachment's name. It is required to include the file extension + in the attachment's name. + example: Screenshot.png + ticket: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Ticket' + nullable: true + description: The ticket associated with the attachment. + example: 0958cbc6-6040-430a-848e-aafacbadf4ae + x-merge-expands-to: Ticket + file_url: + type: string + nullable: true + example: http://alturl.com/p749b + description: The attachment's url. It is required to include the file extension + in the file's URL. + content_type: + type: string + nullable: true + description: The attachment's file format. + example: jpeg + uploaded_by: + type: string + format: uuid + nullable: true + description: The user who uploaded the attachment. + example: 28b54125-287f-494d-965e-3c5b330c9a68 + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + x-merge-expands: '{"ticket": "Ticket"}' + x-merge-category: ticketing + AuditLogEvent: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + example: b5ceea2a-7171-47ce-8090-165cfce5572c + user_name: + type: string + nullable: true + description: The User's full name at the time of this Event occurring. + maxLength: 200 + example: Gil Feig + user_email: + type: string + format: email + nullable: true + description: The User's email at the time of this Event occurring. + maxLength: 254 + example: hello@merge.dev + role: + oneOf: + - $ref: '#/components/schemas/RoleEnum' + - type: string + description: |- + Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. + + * `ADMIN` - ADMIN + * `DEVELOPER` - DEVELOPER + * `MEMBER` - MEMBER + * `API` - API + * `SYSTEM` - SYSTEM + * `MERGE_TEAM` - MERGE_TEAM + example: ADMIN + ip_address: + type: string + maxLength: 45 + example: 192.0.2.123 + event_type: + oneOf: + - $ref: '#/components/schemas/EventTypeEnum' + - type: string + description: |- + Designates the type of event that occurred. + + * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + * `INVITED_USER` - INVITED_USER + * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + * `CREATED_DESTINATION` - CREATED_DESTINATION + * `DELETED_DESTINATION` - DELETED_DESTINATION + * `CHANGED_DESTINATION` - CHANGED_DESTINATION + * `CHANGED_SCOPES` - CHANGED_SCOPES + * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + * `ENABLED_CATEGORY` - ENABLED_CATEGORY + * `DISABLED_CATEGORY` - DISABLED_CATEGORY + * `CHANGED_PASSWORD` - CHANGED_PASSWORD + * `RESET_PASSWORD` - RESET_PASSWORD + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING + * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING + * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING + * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING + * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + * `MUTED_ISSUE` - MUTED_ISSUE + * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + example: CHANGED_SCOPES + event_description: + type: string + example: Organization-wide Scopes for model hris.Employee updated from Read + to Read+Write + created_at: + type: string + format: date-time + readOnly: true + required: + - event_description + - event_type + - ip_address + - role + x-merge-category: ticketing + AvailableActions: + type: object + description: |- + # The AvailableActions Object + ### Description + The `Activity` object is used to see all available model/operation combinations for an integration. + + ### Usage Example + Fetch all the actions available for the `Zenefits` integration. + properties: + integration: + $ref: '#/components/schemas/AccountIntegration' + example: + name: Lever + categories: + - ats + image: https://merge-api-production.s3.amazonaws.com/media/Lever_Logo.png + square_image: https://merge-api-production.s3.amazonaws.com/media/Lever_Square_Logo.png + color: '#262A34' + is_in_beta: 'true' + api_endpoints_to_documentation_urls: "{'GET': [('/common-model-scopes', + 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve')], + 'POST': []}" + passthrough_available: + type: boolean + example: true + available_model_operations: + type: array + items: + $ref: '#/components/schemas/ModelOperation' + example: + - model_name: Candidate + available_operations: + - FETCH + - CREATE + required_post_parameters: + - remote_user_id + supported_fields: + - first_name + - last_name + - company + - title + required: + - integration + - passthrough_available + x-merge-category: ticketing + CategoriesEnum: + enum: + - hris + - ats + - accounting + - ticketing + - crm + - mktg + - filestorage + type: string + description: |- + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + x-merge-category: ticketing + CategoryEnum: + enum: + - hris + - ats + - accounting + - ticketing + - crm + - mktg + - filestorage + type: string + description: |- + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + x-merge-category: ticketing + Collection: + type: object + description: |- + # The Collection Object + ### Description + The `Collection` object is used to represent one or more `Tickets`. There can be a hierarchy of `Collections`, in which a sub-collection belongs to a parent-collection. + + ### Usage Example + TODO + properties: + id: + type: string + format: uuid + readOnly: true + example: fb8c55b6-1cb8-4b4c-9fb6-17924231619d + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '19202938' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + name: + type: string + nullable: true + description: The collection's name. + example: Q1 Platform + description: + type: string + nullable: true + description: The collection's description. + example: For tracking all tasks related to Platform for Q1 + access_level: + oneOf: + - $ref: '#/components/schemas/CollectionAccessLevelEnum' + - type: string + nullable: true + description: |- + The level of access a User has to the Collection and its sub-objects. + + * `PRIVATE` - PRIVATE + * `COMPANY` - COMPANY + * `PUBLIC` - PUBLIC + * `PARENT_COLLECTION` - PARENT_COLLECTION + example: PUBLIC + collection_type: + oneOf: + - $ref: '#/components/schemas/CollectionTypeEnum' + - type: string + nullable: true + description: |- + The collection's type. + + * `LIST` - LIST + * `PROJECT` - PROJECT + example: LIST + $ref: '#/components/schemas/CollectionTypeEnum' + parent_collection: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Collection' + nullable: true + description: The parent collection for this collection. + example: 25782302-5be1-4d78-8f46-2a5db72204ef + x-merge-expands-to: Collection + remote_was_deleted: + type: boolean + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + x-merge-expands: '{"parent_collection": "Collection"}' + x-merge-category: ticketing + CollectionAccessLevelEnum: + enum: + - PRIVATE + - COMPANY + - PUBLIC + - PARENT_COLLECTION + type: string + description: |- + * `PRIVATE` - PRIVATE + * `COMPANY` - COMPANY + * `PUBLIC` - PUBLIC + * `PARENT_COLLECTION` - PARENT_COLLECTION + x-merge-category: ticketing + CollectionTypeEnum: + enum: + - LIST + - PROJECT + type: string + description: |- + * `LIST` - LIST + * `PROJECT` - PROJECT + x-merge-category: ticketing + Comment: + type: object + description: |- + # The Comment Object + ### Description + The `Comment` object is used to represent a comment on a ticket. + + ### Usage Example + TODO + properties: + id: + type: string + format: uuid + readOnly: true + example: 0958cbc6-6040-430a-848e-aafacbadf4ae + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '19202938' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + user: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/User' + nullable: true + description: The author of the Comment, if the author is a User. If the + third party does not support specifying an author, we will append "[Posted + on behalf of {name}]" to the comment. + example: 17a54124-287f-494d-965e-3c5b330c9a68 + x-merge-expands-to: User + contact: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Contact' + nullable: true + description: The author of the Comment, if the author is a Contact.If the + third party does not support specifying an author, we will append "[Posted + on behalf of {name}]" to the comment. + example: dde3fb16-b8eb-483d-81c4-b78100816f15 + x-merge-expands-to: Contact + body: + type: string + nullable: true + description: The comment's text body. + example: When will these integrations be done? You all should use Merge. + html_body: + type: string + nullable: true + description: The comment's text body formatted as html. + example: When will these integrations be done? You all should use Merge. + ticket: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Ticket' + nullable: true + description: 'The ticket associated with the comment. ' + example: fb8c55b6-1cb8-4b4c-9fb6-17924231619d + x-merge-expands-to: Ticket + is_private: + type: boolean + nullable: true + description: Whether or not the comment is internal. + remote_created_at: + type: string + format: date-time + nullable: true + description: When the third party's comment was created. + example: '1990-11-10T00:00:00Z' + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + x-merge-expands: '{"contact": "Contact", "ticket": "Ticket", "user": "User"}' + x-merge-category: ticketing + CommentEndpointRequest: + type: object + properties: + model: + $ref: '#/components/schemas/CommentRequest' + required: + - model + x-merge-category: ticketing + CommentRequest: + type: object + description: |- + # The Comment Object + ### Description + The `Comment` object is used to represent a comment on a ticket. + + ### Usage Example + TODO + properties: + user: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/User' + nullable: true + description: The author of the Comment, if the author is a User. If the + third party does not support specifying an author, we will append "[Posted + on behalf of {name}]" to the comment. + example: 17a54124-287f-494d-965e-3c5b330c9a68 + x-merge-expands-to: User + contact: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Contact' + nullable: true + description: The author of the Comment, if the author is a Contact.If the + third party does not support specifying an author, we will append "[Posted + on behalf of {name}]" to the comment. + example: dde3fb16-b8eb-483d-81c4-b78100816f15 + x-merge-expands-to: Contact + body: + type: string + nullable: true + description: The comment's text body. + example: When will these integrations be done? You all should use Merge. + html_body: + type: string + nullable: true + description: The comment's text body formatted as html. + example: When will these integrations be done? You all should use Merge. + ticket: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Ticket' + nullable: true + description: 'The ticket associated with the comment. ' + example: fb8c55b6-1cb8-4b4c-9fb6-17924231619d + x-merge-expands-to: Ticket + is_private: + type: boolean + nullable: true + description: Whether or not the comment is internal. + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + x-merge-expands: '{"contact": "Contact", "ticket": "Ticket", "user": "User"}' + x-merge-category: ticketing + CommentResponse: + type: object + properties: + model: + $ref: '#/components/schemas/Comment' + warnings: + type: array + items: + $ref: '#/components/schemas/WarningValidationProblem' + errors: + type: array + items: + $ref: '#/components/schemas/ErrorValidationProblem' + logs: + type: array + items: + $ref: '#/components/schemas/DebugModeLog' + required: + - errors + - model + - warnings + x-merge-category: ticketing + CommonModelScopeAPI: + type: object + properties: + common_models: + type: array + items: + $ref: '#/components/schemas/IndividualCommonModelScopeDeserializer' + description: The common models you want to update the scopes for + example: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - created_at + - custom_fields + - date_of_birth + - first_name + - gender + - remote_created_at + - remote_data + disabled_fields: + - company + - employments + - groups + - home_location + - manager + - work_location + required: + - common_models + x-merge-category: ticketing + CommonModelScopesBodyRequest: + type: object + properties: + model_id: + type: string + minLength: 1 + example: hris.Employee + enabled_actions: + type: array + items: + $ref: '#/components/schemas/EnabledActionsEnum' + example: + - READ + - WRITE + disabled_fields: + type: array + items: + type: string + minLength: 1 + example: + - first_name + required: + - disabled_fields + - enabled_actions + - model_id + x-merge-category: ticketing + Contact: + type: object + description: |- + # The Contact Object + ### Description + The `Contact` object is used to represent the customer, lead, or external user that a ticket is associated with. + + ### Usage Example + TODO + properties: + id: + type: string + format: uuid + readOnly: true + example: 17a54124-287f-494d-965e-3c5b330c9a68 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '19202938' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + name: + type: string + nullable: true + description: The contact's name. + example: Cousin Greg + email_address: + type: string + nullable: true + description: The contact's email address. + example: greg@waystar-royco.com + phone_number: + type: string + nullable: true + description: The contact's phone number. + example: '5108890293' + details: + type: string + nullable: true + description: The contact's details. + example: Executive Assistant to Tom Wambsgans + account: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Account' + nullable: true + description: The contact's account. + example: 28b54125-287f-494d-965e-3c5b330c9a68 + x-merge-expands-to: Account + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + x-merge-expands: '{"account": "Account"}' + x-merge-category: ticketing + ContactRequest: + type: object + description: |- + # The Contact Object + ### Description + The `Contact` object is used to represent the customer, lead, or external user that a ticket is associated with. + + ### Usage Example + TODO + properties: + name: + type: string + nullable: true + description: The contact's name. + example: Cousin Greg + email_address: + type: string + nullable: true + description: The contact's email address. + example: greg@waystar-royco.com + phone_number: + type: string + nullable: true + description: The contact's phone number. + example: '5108890293' + details: + type: string + nullable: true + description: The contact's details. + example: Executive Assistant to Tom Wambsgans + account: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Account' + nullable: true + description: The contact's account. + example: 28b54125-287f-494d-965e-3c5b330c9a68 + x-merge-expands-to: Account + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + x-merge-expands: '{"account": "Account"}' + x-merge-category: ticketing + CreateFieldMappingRequest: + type: object + properties: + target_field_name: + type: string + minLength: 1 + description: The name of the target field you want this remote field to + map to. + example: example_target_field_name + target_field_description: + type: string + minLength: 1 + description: The description of the target field you want this remote field + to map to. + example: this is a example description of the target field + remote_field_traversal_path: + type: array + items: {} + description: The field traversal path of the remote field listed when you + hit the GET /remote-fields endpoint. + example: + - example_remote_field + remote_method: + type: string + minLength: 1 + description: The method of the remote endpoint where the remote field is + coming from. + example: GET + remote_url_path: + type: string + minLength: 1 + description: The path of the remote endpoint where the remote field is coming + from. + example: /example-url-path + common_model_name: + type: string + minLength: 1 + description: The name of the Common Model that the remote field corresponds + to in a given category. + example: ExampleCommonModel + required: + - common_model_name + - remote_field_traversal_path + - remote_method + - remote_url_path + - target_field_description + - target_field_name + x-merge-category: ticketing + DataPassthroughRequest: + type: object + description: |- + # The DataPassthrough Object + ### Description + The `DataPassthrough` object is used to send information to an otherwise-unsupported third-party endpoint. + + ### Usage Example + Create a `DataPassthrough` to get team hierarchies from your Rippling integration. + properties: + method: + allOf: + - $ref: '#/components/schemas/MethodEnum' + example: POST + path: + type: string + minLength: 1 + description: The path of the request in the third party's platform. + example: /scooters + base_url_override: + type: string + nullable: true + minLength: 1 + description: An optional override of the third party's base url for the + request. + example: https://api.example.com + data: + type: string + nullable: true + minLength: 1 + description: The data with the request. You must include a `request_format` + parameter matching the data's format + example: '{"company": "Lime", "model": "Gen 2.5"}' + multipart_form_data: + type: array + items: + $ref: '#/components/schemas/MultipartFormFieldRequest' + nullable: true + description: Pass an array of `MultipartFormField` objects in here instead + of using the `data` param if `request_format` is set to `MULTIPART`. + headers: + type: object + additionalProperties: {} + nullable: true + description: The headers to use for the request (Merge will handle the account's + authorization headers). `Content-Type` header is required for passthrough. + Choose content type corresponding to expected format of receiving server. + example: + EXTRA-HEADER: value + request_format: + allOf: + - $ref: '#/components/schemas/RequestFormatEnum' + nullable: true + example: JSON + normalize_response: + type: boolean + description: 'Optional. If true, the response will always be an object of + the form `{"type": T, "value": ...}` where `T` will be one of `string, + boolean, number, null, array, object`.' + required: + - method + - path + x-merge-category: ticketing + DebugModeLog: + type: object + properties: + log_id: + type: string + example: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: + type: string + example: https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + $ref: '#/components/schemas/DebugModelLogSummary' + example: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + required: + - dashboard_view + - log_id + - log_summary + x-merge-sample-json: '{"log_id": "99433219-8017-4acd-bb3c-ceb23d663832", "dashboard_view": + "https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832", "log_summary": + {"url": "www.exampleintegration.com/api/v1/exampleapi", "method": "POST", + "status_code": 200}}' + x-merge-category: ticketing + DebugModelLogSummary: + type: object + properties: + url: + type: string + example: www.exampleintegration.com/api/v1/exampleapi + method: + type: string + example: POST + status_code: + type: integer + example: 200 + required: + - method + - status_code + - url + x-merge-sample-json: '{"url": "www.exampleintegration.com/api/v1/exampleapi", + "method": "POST", "status_code": 200}' + x-merge-category: ticketing + EnabledActionsEnum: + enum: + - READ + - WRITE + type: string + description: |- + * `READ` - READ + * `WRITE` - WRITE + x-merge-category: ticketing + EncodingEnum: + enum: + - RAW + - BASE64 + - GZIP_BASE64 + type: string + description: |- + * `RAW` - RAW + * `BASE64` - BASE64 + * `GZIP_BASE64` - GZIP_BASE64 + x-merge-category: ticketing + EndUserDetailsRequest: + type: object + properties: + end_user_email_address: + type: string + minLength: 1 + description: Your end user's email address. This is purely for identification + purposes - setting this value will not cause any emails to be sent. + maxLength: 100 + example: example@gmail.com + end_user_organization_name: + type: string + minLength: 1 + description: Your end user's organization. + maxLength: 100 + example: Test Organization + end_user_origin_id: + type: string + minLength: 1 + description: 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. + maxLength: 100 + example: '12345' + categories: + type: array + items: + $ref: '#/components/schemas/CategoriesEnum' + description: The integration categories to show in Merge Link. + example: + - hris + - ats + integration: + type: string + nullable: true + minLength: 1 + description: 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/. + example: bamboohr + link_expiry_mins: + type: integer + maximum: 10080 + minimum: 30 + default: 30 + description: An integer number of minutes between [30, 720 or 10080 if for + a Magic Link URL] for how long this token is valid. Defaults to 30. + should_create_magic_link_url: + type: boolean + nullable: true + default: false + description: Whether to generate a Magic Link URL. Defaults to false. For + more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. + hide_admin_magic_link: + type: boolean + nullable: true + default: false + description: 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: + type: array + items: + $ref: '#/components/schemas/CommonModelScopesBodyRequest' + nullable: true + description: An array of objects to specify the models and fields that will + be disabled for a given Linked Account. Each object uses model_id, enabled_actions, + and disabled_fields to specify the model, method, and fields that are + scoped for a given Linked Account. + category_common_model_scopes: + type: object + additionalProperties: + type: array + items: + $ref: '#/components/schemas/IndividualCommonModelScopeDeserializerRequest' + nullable: true + description: 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. + example: + hris: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: true + field_permissions: + enabled_fields: + - first_name + - last_name + - personal_email + disabled_fields: + - preferred_name + - model_name: Employment + model_permissions: + READ: + is_enabled: false + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - effective_date + ats: + - model_name: Job + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: true + field_permissions: + enabled_fields: + - name + disabled_fields: + - description + - model_name: Department + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: true + language: + oneOf: + - $ref: '#/components/schemas/LanguageEnum' + - type: string + nullable: true + description: |- + The following subset of IETF language tags can be used to configure localization. + + * `en` - en + * `de` - de + example: en + are_syncs_disabled: + type: boolean + nullable: true + default: false + description: The boolean that indicates whether initial, periodic, and force + syncs will be disabled. + integration_specific_config: + type: object + additionalProperties: {} + nullable: true + description: A JSON object containing integration-specific configuration + options. + example: + rippling: + oauth_code: 3h1jj8ssdf31dfji3o1jjdfjasd + required: + - categories + - end_user_email_address + - end_user_organization_name + - end_user_origin_id + x-merge-category: ticketing + ErrorValidationProblem: + type: object + properties: + source: + $ref: '#/components/schemas/ValidationProblemSource' + example: + pointer: /model/custom_fields + title: + type: string + example: Missing Required Field + detail: + type: string + example: custom_fields is a required field on model. + problem_type: + type: string + example: MISSING_REQUIRED_FIELD + required: + - detail + - problem_type + - title + x-merge-category: ticketing + EventTypeEnum: + enum: + - 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 + type: string + description: |- + * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + * `INVITED_USER` - INVITED_USER + * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + * `CREATED_DESTINATION` - CREATED_DESTINATION + * `DELETED_DESTINATION` - DELETED_DESTINATION + * `CHANGED_DESTINATION` - CHANGED_DESTINATION + * `CHANGED_SCOPES` - CHANGED_SCOPES + * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + * `ENABLED_CATEGORY` - ENABLED_CATEGORY + * `DISABLED_CATEGORY` - DISABLED_CATEGORY + * `CHANGED_PASSWORD` - CHANGED_PASSWORD + * `RESET_PASSWORD` - RESET_PASSWORD + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING + * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING + * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING + * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING + * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + * `MUTED_ISSUE` - MUTED_ISSUE + * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + x-merge-category: ticketing + ExternalTargetFieldAPI: + type: object + properties: + name: + type: string + nullable: true + readOnly: true + example: example_target_field_name + description: + type: string + nullable: true + readOnly: true + example: this is a example description of a target field + is_mapped: + type: string + nullable: true + readOnly: true + example: true + x-merge-category: ticketing + ExternalTargetFieldAPIResponse: + type: object + properties: + Ticket: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + Comment: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + Project: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + Collection: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + User: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + Role: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + Account: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + Team: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + Attachment: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + Tag: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + Contact: + type: array + items: + $ref: '#/components/schemas/ExternalTargetFieldAPI' + x-merge-category: ticketing + FieldFormatEnum: + enum: + - string + - number + - date + - datetime + - bool + - list + type: string + description: |- + * `string` - string + * `number` - number + * `date` - date + * `datetime` - datetime + * `bool` - bool + * `list` - list + x-merge-category: ticketing + FieldMappingApiInstance: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: + type: boolean + readOnly: true + target_field: + type: object + properties: + name: + type: string + description: + type: string + is_organization_wide: + type: boolean + required: + - description + - is_organization_wide + - name + nullable: true + readOnly: true + example: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + type: object + properties: + remote_key_name: + type: string + nullable: true + schema: + type: object + additionalProperties: {} + nullable: true + remote_endpoint_info: + type: object + properties: + method: + type: string + nullable: true + url_path: + type: string + nullable: true + field_traversal_path: + type: array + items: + type: string + nullable: true + required: + - field_traversal_path + - method + - url_path + required: + - remote_endpoint_info + - remote_key_name + - schema + nullable: true + readOnly: true + example: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + x-merge-category: ticketing + FieldMappingApiInstanceResponse: + type: object + properties: + Ticket: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + Comment: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + Project: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + Collection: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + User: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + Role: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + Account: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + Team: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + Attachment: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + Tag: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + Contact: + type: array + items: + $ref: '#/components/schemas/FieldMappingApiInstance' + x-merge-category: ticketing + FieldMappingInstanceResponse: + type: object + properties: + model: + $ref: '#/components/schemas/FieldMappingApiInstance' + warnings: + type: array + items: + $ref: '#/components/schemas/WarningValidationProblem' + errors: + type: array + items: + $ref: '#/components/schemas/ErrorValidationProblem' + logs: + type: array + items: + $ref: '#/components/schemas/DebugModeLog' + required: + - errors + - model + - warnings + x-merge-category: ticketing + FieldPermissionDeserializer: + type: object + properties: + enabled_fields: + type: array + items: {} + disabled_fields: + type: array + items: {} + x-merge-category: ticketing + FieldPermissionDeserializerRequest: + type: object + properties: + enabled_fields: + type: array + items: {} + disabled_fields: + type: array + items: {} + x-merge-category: ticketing + FieldTypeEnum: + enum: + - string + - number + - date + - datetime + - bool + - list + type: string + description: |- + * `string` - string + * `number` - number + * `date` - date + * `datetime` - datetime + * `bool` - bool + * `list` - list + x-merge-category: ticketing + GenerateRemoteKeyRequest: + type: object + description: |- + # The GenerateRemoteKey Object + ### Description + The `GenerateRemoteKey` object is used to represent a request for a new remote key. + + ### Usage Example + Post a `GenerateRemoteKey` to create a new remote key. + properties: + name: + type: string + minLength: 1 + description: The name of the remote key + example: Remote Deployment Key 1 + required: + - name + x-merge-category: ticketing + IndividualCommonModelScopeDeserializer: + type: object + properties: + model_name: + type: string + model_permissions: + type: object + additionalProperties: + $ref: '#/components/schemas/ModelPermissionDeserializer' + field_permissions: + $ref: '#/components/schemas/FieldPermissionDeserializer' + required: + - model_name + x-merge-category: ticketing + IndividualCommonModelScopeDeserializerRequest: + type: object + properties: + model_name: + type: string + minLength: 1 + model_permissions: + type: object + additionalProperties: + $ref: '#/components/schemas/ModelPermissionDeserializerRequest' + field_permissions: + $ref: '#/components/schemas/FieldPermissionDeserializerRequest' + required: + - model_name + x-merge-category: ticketing + Issue: + type: object + properties: + id: + type: string + format: uuid + readOnly: true + example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + status: + oneOf: + - $ref: '#/components/schemas/IssueStatusEnum' + - type: string + description: |- + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + example: ONGOING + error_description: + type: string + example: Missing Permissions + end_user: + type: object + additionalProperties: {} + readOnly: true + example: b82302de-852e-4e60-b050-edf9da3b7c02 + first_incident_time: + type: string + format: date-time + nullable: true + example: '2022-12-05T16:19:15.161Z' + last_incident_time: + type: string + format: date-time + nullable: true + example: '2022-12-05T16:19:15.161Z' + is_muted: + type: boolean + readOnly: true + example: true + error_details: + type: array + items: + type: string + readOnly: true + example: + - Missing employee permissions. + - Missing time off permissions. + required: + - error_description + x-merge-category: ticketing + IssueStatusEnum: + enum: + - ONGOING + - RESOLVED + type: string + description: |- + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + x-merge-category: ticketing + ItemFormatEnum: + enum: + - string + - number + - date + - datetime + - bool + - list + type: string + description: |- + * `string` - uuid + * `number` - url + * `date` - email + * `datetime` - phone + * `bool` - currency + * `list` - decimal + x-merge-category: ticketing + ItemSchema: + type: object + properties: + item_type: + $ref: '#/components/schemas/ItemTypeEnum' + item_format: + $ref: '#/components/schemas/ItemFormatEnum' + item_choices: + type: array + items: + type: string + x-merge-category: ticketing + ItemTypeEnum: + enum: + - string + - number + - date + - datetime + - bool + - list + type: string + description: |- + * `string` - string + * `number` - number + * `date` - date + * `datetime` - datetime + * `bool` - bool + * `list` - list + x-merge-category: ticketing + LanguageEnum: + enum: + - en + - de + type: string + description: |- + * `en` - en + * `de` - de + x-merge-category: ticketing + LastSyncResultEnum: + enum: + - SYNCING + - DONE + - FAILED + - DISABLED + - PAUSED + - PARTIALLY_SYNCED + type: string + description: |- + * `SYNCING` - SYNCING + * `DONE` - DONE + * `FAILED` - FAILED + * `DISABLED` - DISABLED + * `PAUSED` - PAUSED + * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED + x-merge-category: ticketing + LinkToken: + type: object + properties: + link_token: + type: string + example: necdP7FtdASl1fQwm62be2_dM4wBG8_GactqoUV0 + integration_name: + type: string + example: Lever + magic_link_url: + type: string + example: https://link.merge.dev/asdfjkl12345jsndfgi2i83n + required: + - link_token + x-merge-category: ticketing + LinkedAccountCommonModelScopeDeserializerRequest: + type: object + properties: + common_models: + type: array + items: + $ref: '#/components/schemas/IndividualCommonModelScopeDeserializerRequest' + description: The common models you want to update the scopes for + example: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - home_location + disabled_fields: + - work_location + - model_name: Benefit + model_permissions: + WRITE: + is_enabled: false + required: + - common_models + x-merge-category: ticketing + LinkedAccountStatus: + type: object + properties: + linked_account_status: + type: string + can_make_request: + type: boolean + required: + - can_make_request + - linked_account_status + x-merge-category: ticketing + MetaResponse: + type: object + properties: + request_schema: + type: object + additionalProperties: {} + example: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + type: object + additionalProperties: {} + status: + $ref: '#/components/schemas/LinkedAccountStatus' + example: + linked_account_status: COMPLETE + can_make_request: true + has_conditional_params: + type: boolean + has_required_linked_account_params: + type: boolean + required: + - has_conditional_params + - has_required_linked_account_params + - request_schema + x-merge-category: ticketing + MethodEnum: + enum: + - GET + - OPTIONS + - HEAD + - POST + - PUT + - PATCH + - DELETE + type: string + description: |- + * `GET` - GET + * `OPTIONS` - OPTIONS + * `HEAD` - HEAD + * `POST` - POST + * `PUT` - PUT + * `PATCH` - PATCH + * `DELETE` - DELETE + x-merge-category: ticketing + ModelOperation: + type: object + description: |- + # The ModelOperation Object + ### Description + The `ModelOperation` object is used to represent the operations that are currently supported for a given model. + + ### Usage Example + View what operations are supported for the `Candidate` endpoint. + properties: + model_name: + type: string + example: Candidate + available_operations: + type: array + items: + type: string + example: + - FETCH + - CREATE + required_post_parameters: + type: array + items: + type: string + example: + - remote_user_id + supported_fields: + type: array + items: + type: string + example: + - first_name + - last_name + - company + - title + required: + - available_operations + - model_name + - required_post_parameters + - supported_fields + x-merge-category: ticketing + ModelPermissionDeserializer: + type: object + properties: + is_enabled: + type: boolean + x-merge-category: ticketing + ModelPermissionDeserializerRequest: + type: object + properties: + is_enabled: + type: boolean + x-merge-category: ticketing + MultipartFormFieldRequest: + type: object + description: |- + # The MultipartFormField Object + ### Description + The `MultipartFormField` object is used to represent fields in an HTTP request using `multipart/form-data`. + + ### Usage Example + Create a `MultipartFormField` to define a multipart form entry. + properties: + name: + type: string + minLength: 1 + description: The name of the form field + example: resume + data: + type: string + minLength: 1 + description: The data for the form field. + example: SW50ZWdyYXRlIGZhc3QKSW50ZWdyYXRlIG9uY2U= + encoding: + oneOf: + - $ref: '#/components/schemas/EncodingEnum' + - type: string + nullable: true + default: RAW + description: |- + The encoding of the value of `data`. Defaults to `RAW` if not defined. + + * `RAW` - RAW + * `BASE64` - BASE64 + * `GZIP_BASE64` - GZIP_BASE64 + example: BASE64 + file_name: + type: string + nullable: true + minLength: 1 + description: The file name of the form field, if the field is for a file. + example: resume.pdf + content_type: + type: string + nullable: true + minLength: 1 + description: The MIME type of the file, if the field is for a file. + example: application/pdf + required: + - data + - name + x-merge-category: ticketing + PaginatedAccountDetailsAndActionsList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/AccountDetailsAndActions' + x-merge-category: ticketing + PaginatedAccountList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Account' + x-merge-category: ticketing + PaginatedAttachmentList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Attachment' + x-merge-category: ticketing + PaginatedAuditLogEventList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/AuditLogEvent' + x-merge-category: ticketing + PaginatedCollectionList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Collection' + x-merge-category: ticketing + PaginatedCommentList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Comment' + x-merge-category: ticketing + PaginatedContactList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Contact' + x-merge-category: ticketing + PaginatedIssueList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Issue' + x-merge-category: ticketing + PaginatedProjectList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Project' + x-merge-category: ticketing + PaginatedRemoteFieldClassList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/RemoteFieldClass' + x-merge-category: ticketing + PaginatedRoleList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Role' + x-merge-category: ticketing + PaginatedSyncStatusList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/SyncStatus' + x-merge-category: ticketing + PaginatedTagList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Tag' + x-merge-category: ticketing + PaginatedTeamList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Team' + x-merge-category: ticketing + PaginatedTicketList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Ticket' + x-merge-category: ticketing + PaginatedUserList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/User' + x-merge-category: ticketing + PaginatedViewerList: + type: object + properties: + next: + type: string + nullable: true + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: + type: string + nullable: true + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + type: array + items: + $ref: '#/components/schemas/Viewer' + x-merge-category: ticketing + PatchedEditFieldMappingRequest: + type: object + properties: + remote_field_traversal_path: + type: array + items: {} + description: The field traversal path of the remote field listed when you + hit the GET /remote-fields endpoint. + example: + - example_remote_field_name + remote_method: + type: string + minLength: 1 + description: The method of the remote endpoint where the remote field is + coming from. + example: GET + remote_url_path: + type: string + minLength: 1 + description: The path of the remote endpoint where the remote field is coming + from. + example: /example-url-path + x-merge-category: ticketing + PatchedTicketEndpointRequest: + type: object + properties: + model: + $ref: '#/components/schemas/PatchedTicketRequest' + required: + - model + x-merge-category: ticketing + PatchedTicketRequest: + type: object + description: |- + # The Ticket Object + ### Description + The `Ticket` object is used to represent a ticket, issue, task or case. + ### Usage Example + TODO + properties: + name: + type: string + nullable: true + description: The ticket's name. + example: Please add more integrations + assignees: + type: array + items: + type: string + format: uuid + nullable: true + description: The individual `Users` who are assigned to this ticket. This + does not include `Users` who just have view access to this ticket. To + fetch all `Users` and `Teams` that can access the ticket, use the `GET + /tickets/{ticket_id}/viewers` [endpoint](https://docs.merge.dev/ticketing/tickets/#tickets_viewers_list). + example: + - 17a54124-287f-494d-965e-3c5b330c9a68 + assigned_teams: + type: array + items: + type: string + format: uuid + nullable: true + description: The `Teams` that are assigned to this ticket. This does not + include `Teams` who just have view access to this ticket. To fetch all + `Users` and `Teams` that can access this ticket, use the `GET /tickets/{ticket_id}/viewers` + [endpoint](https://docs.merge.dev/ticketing/tickets/#tickets_viewers_list). + example: + - 4857c306-c1f9-489e-a6b6-90902f736dfe + creator: + type: string + format: uuid + nullable: true + description: The user who created this ticket. + due_date: + type: string + format: date-time + nullable: true + description: The ticket's due date. + example: '2022-10-11T00:00:00Z' + status: + oneOf: + - $ref: '#/components/schemas/TicketStatusEnum' + - type: string + nullable: true + description: |- + The current status of the ticket. + + * `OPEN` - OPEN + * `CLOSED` - CLOSED + * `IN_PROGRESS` - IN_PROGRESS + * `ON_HOLD` - ON_HOLD + example: OPEN + description: + type: string + nullable: true + description: The ticket’s description. HTML version of description is mapped + if supported by the third-party platform. + example: Can you please add more integrations? It'll make syncing data much + easier! + collections: + type: array + items: + type: string + format: uuid + nullable: true + description: The `Collections` that this `Ticket` is included in. + example: + - fb8c55b6-1cb8-4b4c-9fb6-17924231619d + ticket_type: + type: string + nullable: true + description: The sub category of the ticket within the 3rd party system. + Examples include incident, task, subtask or to-do. + example: incident + account: + type: string + format: uuid + nullable: true + description: The account associated with the ticket. + example: 0958cbc6-6040-430a-848e-aafacbadf4ae + contact: + type: string + format: uuid + nullable: true + description: The contact associated with the ticket. + example: 65c345ba-6870-4974-87ba-dd31509c367a + parent_ticket: + type: string + format: uuid + nullable: true + description: The ticket's parent ticket. + example: 75b33d04-30d2-4f3e-be45-27838bc94342 + access_level: + oneOf: + - $ref: '#/components/schemas/TicketAccessLevelEnum' + - type: string + nullable: true + description: |- + The description of who is able to access a given ticket, or where access is inherited from. + + * `COMPANY` - COMPANY + * `PUBLIC` - PUBLIC + * `PRIVATE` - PRIVATE + * `COLLECTION` - COLLECTION + example: PRIVATE + tags: + type: array + items: + type: string + nullable: true + description: The tag's name. + example: + - enterprise + - other-tag + roles: + type: array + items: + type: string + format: uuid + nullable: true + example: + - 21a54124-397f-494d-985e-3c5b330b8a68 + - 17a54124-287f-494d-965e-3c5b330c9a68 + completed_at: + type: string + format: date-time + nullable: true + description: When the ticket was completed. + example: '2021-12-09T00:00:00Z' + ticket_url: + type: string + format: uri + nullable: true + description: The 3rd party url of the Ticket. + maxLength: 2000 + example: https://thirdpartysoftware.com/project/3/issue/1 + priority: + oneOf: + - $ref: '#/components/schemas/PriorityEnum' + - type: string + nullable: true + description: |- + The priority or urgency of the Ticket. + + * `URGENT` - URGENT + * `HIGH` - HIGH + * `NORMAL` - NORMAL + * `LOW` - LOW + example: HIGH + $ref: '#/components/schemas/PriorityEnum' + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + remote_fields: + type: array + items: + $ref: '#/components/schemas/RemoteFieldRequest' + writeOnly: true + x-merge-category: ticketing + PriorityEnum: + enum: + - URGENT + - HIGH + - NORMAL + - LOW + type: string + description: |- + * `URGENT` - URGENT + * `HIGH` - HIGH + * `NORMAL` - NORMAL + * `LOW` - LOW + x-merge-category: ticketing + Project: + type: object + description: |- + # The Project Object + ### Description + Please use the `Collection` model. This model will be fully deprecated on 3/30/2024. + + ### Usage Example + TODO + properties: + id: + type: string + format: uuid + readOnly: true + example: fb8c55b6-1cb8-4b4c-9fb6-17924231619d + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '19202938' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + name: + type: string + nullable: true + description: "The project's name. " + example: Q1 Platform + description: + type: string + nullable: true + description: The project's description. + example: For tracking all tasks related to Platform for Q1 + remote_was_deleted: + type: boolean + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + x-merge-expands: '{"company": "CompanyInfo", "contact": "Contact"}' + x-merge-category: ticketing + RemoteData: + type: object + description: |- + # The RemoteData Object + ### Description + The `RemoteData` object is used to represent the full data pulled from the third-party API for an object. + + ### Usage Example + TODO + properties: + path: + type: string + description: The third-party API path that is being called. + example: /platform-endpoint + data: + readOnly: true + description: The data returned from the third-party for this object in its + original, unnormalized format. + example: + - Varies by platform + required: + - path + x-merge-category: ticketing + RemoteEndpointInfo: + type: object + properties: + method: + type: string + example: GET + url_path: + type: string + example: /example-url-path + field_traversal_path: + type: array + items: {} + example: + - example_key_name + required: + - field_traversal_path + - method + - url_path + x-merge-category: ticketing + RemoteField: + type: object + properties: + remote_field_class: + oneOf: + - type: string + - $ref: '#/components/schemas/RemoteFieldClass' + x-merge-expands-to: RemoteFieldClass + value: + nullable: true + example: string + required: + - remote_field_class + x-merge-expands: '{"remote_field_class": "RemoteFieldClass"}' + x-merge-category: ticketing + RemoteFieldAPI: + type: object + properties: + schema: + type: object + additionalProperties: {} + example: + type: string + remote_key_name: + type: string + example: example_remote_key_name + remote_endpoint_info: + $ref: '#/components/schemas/RemoteEndpointInfo' + example: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + type: array + items: {} + nullable: true + example: + - example + advanced_metadata: + allOf: + - $ref: '#/components/schemas/AdvancedMetadata' + nullable: true + coverage: + oneOf: + - type: integer + - type: number + format: double + nullable: true + readOnly: true + example: 0.33 + required: + - advanced_metadata + - remote_endpoint_info + - remote_key_name + - schema + x-merge-category: ticketing + RemoteFieldAPIResponse: + type: object + properties: + Ticket: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + Comment: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + Project: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + Collection: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + User: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + Role: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + Account: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + Team: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + Attachment: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + Tag: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + Contact: + type: array + items: + $ref: '#/components/schemas/RemoteFieldAPI' + x-merge-category: ticketing + RemoteFieldClass: + type: object + properties: + id: + type: string + display_name: + type: string + remote_key_name: + type: string + description: + type: string + is_custom: + type: boolean + is_required: + type: boolean + field_type: + $ref: '#/components/schemas/FieldTypeEnum' + field_format: + $ref: '#/components/schemas/FieldFormatEnum' + field_choices: + type: array + items: + type: object + properties: + value: + nullable: true + display_name: + type: string + nullable: true + nullable: true + readOnly: true + item_schema: + $ref: '#/components/schemas/ItemSchema' + x-merge-category: ticketing + RemoteFieldRequest: + type: object + properties: + remote_field_class: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/RemoteFieldClass' + example: b057d1d2-c204-4da8-a74c-c91d1a260614 + x-merge-expands-to: RemoteFieldClass + value: + nullable: true + example: string + required: + - remote_field_class + x-merge-expands: '{"remote_field_class": "RemoteFieldClass"}' + x-merge-category: ticketing + RemoteKey: + type: object + description: |- + # The RemoteKey Object + ### Description + The `RemoteKey` object is used to represent a request for a new remote key. + + ### Usage Example + Post a `GenerateRemoteKey` to receive a new `RemoteKey`. + properties: + name: + type: string + example: Remote Deployment Key 1 + key: + type: string + example: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA + required: + - key + - name + x-merge-category: ticketing + RemoteKeyForRegenerationRequest: + type: object + description: |- + # The RemoteKeyForRegeneration Object + ### Description + The `RemoteKeyForRegeneration` object is used to exchange an old remote key for a new one + + ### Usage Example + Post a `RemoteKeyForRegeneration` to swap out an old remote key for a new one + properties: + name: + type: string + minLength: 1 + description: The name of the remote key + example: Remote Deployment Key 1 + required: + - name + x-merge-category: ticketing + RemoteResponse: + type: object + description: |- + # The RemoteResponse Object + ### Description + The `RemoteResponse` object is used to represent information returned from a third-party endpoint. + + ### Usage Example + View the `RemoteResponse` returned from your `DataPassthrough`. + properties: + method: + type: string + example: GET + path: + type: string + example: /scooters + status: + type: integer + example: 200 + response: + example: + scooters: + - company: Lime + model: Gen 2.5 + - company: Bird + model: Bird Zero + response_headers: + type: object + additionalProperties: {} + example: + X-Page-Token: value + response_type: + oneOf: + - $ref: '#/components/schemas/ResponseTypeEnum' + - type: string + example: JSON + headers: + type: object + additionalProperties: {} + example: + EXTRA-HEADER: value + Authorization: + required: + - method + - path + - response + - status + x-merge-category: ticketing + RequestFormatEnum: + enum: + - JSON + - XML + - MULTIPART + type: string + description: |- + * `JSON` - JSON + * `XML` - XML + * `MULTIPART` - MULTIPART + x-merge-category: ticketing + ResponseTypeEnum: + enum: + - JSON + - BASE64_GZIP + type: string + description: |- + * `JSON` - JSON + * `BASE64_GZIP` - BASE64_GZIP + x-merge-category: ticketing + Role: + type: object + description: |- + # The Role Object + ### Description + The `Role` object is used to represent the set of actions & access that a user with this role is allowed to perform. + + ### Usage Example + TODO + properties: + id: + type: string + format: uuid + readOnly: true + example: 23454124-387f-494d-265e-345b330c9123 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '123' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + name: + type: string + nullable: true + description: The name of the Role. + example: Member + ticket_actions: + type: array + items: + oneOf: + - $ref: '#/components/schemas/TicketActionsEnum' + - type: string + nullable: true + nullable: true + description: 'The set of actions that a User with this Role can perform. + Possible enum values include: `VIEW`, `CREATE`, `EDIT`, `DELETE`, `CLOSE`, + and `ASSIGN`.' + example: + - VIEW + - EDIT + - CREATE + ticket_access: + oneOf: + - $ref: '#/components/schemas/TicketAccessEnum' + - type: string + nullable: true + description: |- + The level of Ticket access that a User with this Role can perform. + + * `ALL` - ALL + * `ASSIGNED_ONLY` - ASSIGNED_ONLY + * `TEAM_ONLY` - TEAM_ONLY + example: ASSIGNED_ONLY + remote_was_deleted: + type: boolean + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + x-merge-category: ticketing + RoleEnum: + enum: + - ADMIN + - DEVELOPER + - MEMBER + - API + - SYSTEM + - MERGE_TEAM + type: string + description: |- + * `ADMIN` - ADMIN + * `DEVELOPER` - DEVELOPER + * `MEMBER` - MEMBER + * `API` - API + * `SYSTEM` - SYSTEM + * `MERGE_TEAM` - MERGE_TEAM + x-merge-category: ticketing + SelectiveSyncConfigurationsUsageEnum: + enum: + - IN_NEXT_SYNC + - IN_LAST_SYNC + type: string + description: |- + * `IN_NEXT_SYNC` - IN_NEXT_SYNC + * `IN_LAST_SYNC` - IN_LAST_SYNC + x-merge-category: ticketing + StatusFd5Enum: + enum: + - SYNCING + - DONE + - FAILED + - DISABLED + - PAUSED + - PARTIALLY_SYNCED + type: string + description: |- + * `SYNCING` - SYNCING + * `DONE` - DONE + * `FAILED` - FAILED + * `DISABLED` - DISABLED + * `PAUSED` - PAUSED + * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED + x-merge-category: ticketing + SyncStatus: + type: object + description: |- + # The SyncStatus Object + ### Description + The `SyncStatus` object is used to represent the syncing state of an account + + ### Usage Example + View the `SyncStatus` for an account to see how recently its models were synced. + properties: + model_name: + type: string + example: Ticket + model_id: + type: string + example: ticketing.Ticket + last_sync_start: + type: string + format: date-time + example: '2021-03-30T19:44:18.695973Z' + next_sync_start: + type: string + format: date-time + example: '2021-03-30T20:44:18.662942Z' + last_sync_result: + oneOf: + - $ref: '#/components/schemas/LastSyncResultEnum' + - type: string + example: DONE + last_sync_finished: + type: string + format: date-time + example: '2021-03-30T19:55:18.695973Z' + status: + oneOf: + - $ref: '#/components/schemas/StatusFd5Enum' + - type: string + example: SYNCING + is_initial_sync: + type: boolean + example: true + selective_sync_configurations_usage: + $ref: '#/components/schemas/SelectiveSyncConfigurationsUsageEnum' + required: + - is_initial_sync + - model_id + - model_name + - status + x-merge-sample-json: '{"model_name": "Candidate", "model_id": "ats.Candidate", + "last_sync_start": "2021-03-30T19:44:18.695973Z", "next_sync_start": "2021-03-30T20:44:18.662942Z", + "status": "SYNCING", "is_initial_sync": true}' + x-merge-category: ticketing + Tag: + type: object + description: |- + # The Tag Object + ### Description + The `Tag` object is used to represent a tag or label for a ticket. + + ### Usage Example + TODO + properties: + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '19202938' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + id: + type: string + format: uuid + readOnly: true + example: 17a54124-287f-494d-965e-3c5b330c9a68 + name: + type: string + nullable: true + description: The tag's name. + example: Ticketing API + remote_was_deleted: + type: boolean + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + x-merge-category: ticketing + Team: + type: object + description: |- + # The Team Object + ### Description + The `Team` object is used to represent one or more `Users` within the company receiving the ticket. + + ### Usage Example + TODO + properties: + id: + type: string + format: uuid + readOnly: true + example: 17a54124-287f-494d-965e-3c5b330c9a68 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '19202938' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + name: + type: string + nullable: true + description: The team's name. + example: Platform + description: + type: string + nullable: true + description: The team's description. + example: Platform and Integrations Team + remote_was_deleted: + type: boolean + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + x-merge-expands: '{"parent_team": "Team"}' + x-merge-category: ticketing + Ticket: + type: object + description: |- + # The Ticket Object + ### Description + The `Ticket` object is used to represent a ticket, issue, task or case. + ### Usage Example + TODO + properties: + id: + type: string + format: uuid + readOnly: true + example: 0958cbc6-6040-430a-848e-aafacbadf4ae + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '19202938' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + name: + type: string + nullable: true + description: The ticket's name. + example: Please add more integrations + assignees: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/User' + nullable: true + description: The individual `Users` who are assigned to this ticket. This + does not include `Users` who just have view access to this ticket. To + fetch all `Users` and `Teams` that can access the ticket, use the `GET + /tickets/{ticket_id}/viewers` [endpoint](https://docs.merge.dev/ticketing/tickets/#tickets_viewers_list). + example: + - 17a54124-287f-494d-965e-3c5b330c9a68 + x-merge-expands-to: User + assigned_teams: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Team' + nullable: true + description: The `Teams` that are assigned to this ticket. This does not + include `Teams` who just have view access to this ticket. To fetch all + `Users` and `Teams` that can access this ticket, use the `GET /tickets/{ticket_id}/viewers` + [endpoint](https://docs.merge.dev/ticketing/tickets/#tickets_viewers_list). + example: + - 4857c306-c1f9-489e-a6b6-90902f736dfe + x-merge-expands-to: Team + creator: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/User' + nullable: true + description: The user who created this ticket. + x-merge-expands-to: User + due_date: + type: string + format: date-time + nullable: true + description: The ticket's due date. + example: '2022-10-11T00:00:00Z' + status: + oneOf: + - $ref: '#/components/schemas/TicketStatusEnum' + - type: string + nullable: true + description: |- + The current status of the ticket. + + * `OPEN` - OPEN + * `CLOSED` - CLOSED + * `IN_PROGRESS` - IN_PROGRESS + * `ON_HOLD` - ON_HOLD + example: OPEN + description: + type: string + nullable: true + description: The ticket’s description. HTML version of description is mapped + if supported by the third-party platform. + example: Can you please add more integrations? It'll make syncing data much + easier! + collections: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Collection' + nullable: true + description: The `Collections` that this `Ticket` is included in. + example: + - fb8c55b6-1cb8-4b4c-9fb6-17924231619d + x-merge-expands-to: Collection + ticket_type: + type: string + nullable: true + description: The sub category of the ticket within the 3rd party system. + Examples include incident, task, subtask or to-do. + example: incident + account: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Account' + nullable: true + description: The account associated with the ticket. + example: 0958cbc6-6040-430a-848e-aafacbadf4ae + x-merge-expands-to: Account + contact: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Contact' + nullable: true + description: The contact associated with the ticket. + example: 65c345ba-6870-4974-87ba-dd31509c367a + x-merge-expands-to: Contact + parent_ticket: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Ticket' + nullable: true + description: The ticket's parent ticket. + example: 75b33d04-30d2-4f3e-be45-27838bc94342 + x-merge-expands-to: Ticket + attachments: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Attachment' + nullable: true + example: + - 42747df1-95e7-46e2-93cc-66f1191edca5 + - 92f972d0-2526-434b-9409-4c3b468e08f0 + x-merge-expands-to: Attachment + access_level: + oneOf: + - $ref: '#/components/schemas/TicketAccessLevelEnum' + - type: string + nullable: true + description: |- + The description of who is able to access a given ticket, or where access is inherited from. + + * `COMPANY` - COMPANY + * `PUBLIC` - PUBLIC + * `PRIVATE` - PRIVATE + * `COLLECTION` - COLLECTION + example: PRIVATE + tags: + type: array + items: + type: string + nullable: true + description: The tag's name. + example: + - enterprise + - other-tag + roles: + type: array + items: + type: string + format: uuid + nullable: true + example: + - 21a54124-397f-494d-985e-3c5b330b8a68 + - 17a54124-287f-494d-965e-3c5b330c9a68 + ticket_url: + type: string + format: uri + nullable: true + description: The 3rd party url of the Ticket. + maxLength: 2000 + example: https://thirdpartysoftware.com/project/3/issue/1 + priority: + oneOf: + - $ref: '#/components/schemas/PriorityEnum' + - type: string + nullable: true + description: |- + The priority or urgency of the Ticket. + + * `URGENT` - URGENT + * `HIGH` - HIGH + * `NORMAL` - NORMAL + * `LOW` - LOW + example: HIGH + remote_created_at: + type: string + format: date-time + nullable: true + description: When the third party's ticket was created. + example: '2021-11-10T00:00:00Z' + remote_updated_at: + type: string + format: date-time + nullable: true + description: When the third party's ticket was updated. + example: '2021-12-09T00:00:00Z' + completed_at: + type: string + format: date-time + nullable: true + description: When the ticket was completed. + example: '2021-12-09T00:00:00Z' + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + remote_fields: + type: array + items: + $ref: '#/components/schemas/RemoteField' + readOnly: true + x-merge-expands: '{"account": "Account", "assigned_teams": "Team", "assignees": + "User", "attachments": "Attachment", "collections": "Collection", "contact": + "Contact", "creator": "User", "parent_ticket": "Ticket"}' + x-merge-category: ticketing + TicketAccessEnum: + enum: + - ALL + - ASSIGNED_ONLY + - TEAM_ONLY + type: string + description: |- + * `ALL` - ALL + * `ASSIGNED_ONLY` - ASSIGNED_ONLY + * `TEAM_ONLY` - TEAM_ONLY + x-merge-category: ticketing + TicketAccessLevelEnum: + enum: + - COMPANY + - PUBLIC + - PRIVATE + - COLLECTION + type: string + description: |- + * `COMPANY` - COMPANY + * `PUBLIC` - PUBLIC + * `PRIVATE` - PRIVATE + * `COLLECTION` - COLLECTION + x-merge-category: ticketing + TicketActionsEnum: + enum: + - VIEW + - CREATE + - EDIT + - DELETE + - CLOSE + - ASSIGN + type: string + description: |- + * `VIEW` - VIEW + * `CREATE` - CREATE + * `EDIT` - EDIT + * `DELETE` - DELETE + * `CLOSE` - CLOSE + * `ASSIGN` - ASSIGN + x-merge-category: ticketing + TicketEndpointRequest: + type: object + properties: + model: + $ref: '#/components/schemas/TicketRequest' + required: + - model + x-merge-category: ticketing + TicketRequest: + type: object + description: |- + # The Ticket Object + ### Description + The `Ticket` object is used to represent a ticket, issue, task or case. + ### Usage Example + TODO + properties: + name: + type: string + nullable: true + description: The ticket's name. + example: Please add more integrations + assignees: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/User' + nullable: true + description: The individual `Users` who are assigned to this ticket. This + does not include `Users` who just have view access to this ticket. To + fetch all `Users` and `Teams` that can access the ticket, use the `GET + /tickets/{ticket_id}/viewers` [endpoint](https://docs.merge.dev/ticketing/tickets/#tickets_viewers_list). + example: + - 17a54124-287f-494d-965e-3c5b330c9a68 + x-merge-expands-to: User + assigned_teams: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Team' + nullable: true + description: The `Teams` that are assigned to this ticket. This does not + include `Teams` who just have view access to this ticket. To fetch all + `Users` and `Teams` that can access this ticket, use the `GET /tickets/{ticket_id}/viewers` + [endpoint](https://docs.merge.dev/ticketing/tickets/#tickets_viewers_list). + example: + - 4857c306-c1f9-489e-a6b6-90902f736dfe + x-merge-expands-to: Team + creator: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/User' + nullable: true + description: The user who created this ticket. + x-merge-expands-to: User + due_date: + type: string + format: date-time + nullable: true + description: The ticket's due date. + example: '2022-10-11T00:00:00Z' + status: + oneOf: + - $ref: '#/components/schemas/TicketStatusEnum' + - type: string + nullable: true + description: |- + The current status of the ticket. + + * `OPEN` - OPEN + * `CLOSED` - CLOSED + * `IN_PROGRESS` - IN_PROGRESS + * `ON_HOLD` - ON_HOLD + example: OPEN + description: + type: string + nullable: true + description: The ticket’s description. HTML version of description is mapped + if supported by the third-party platform. + example: Can you please add more integrations? It'll make syncing data much + easier! + collections: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Collection' + nullable: true + description: The `Collections` that this `Ticket` is included in. + example: + - fb8c55b6-1cb8-4b4c-9fb6-17924231619d + x-merge-expands-to: Collection + ticket_type: + type: string + nullable: true + description: The sub category of the ticket within the 3rd party system. + Examples include incident, task, subtask or to-do. + example: incident + account: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Account' + nullable: true + description: The account associated with the ticket. + example: 0958cbc6-6040-430a-848e-aafacbadf4ae + x-merge-expands-to: Account + contact: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Contact' + nullable: true + description: The contact associated with the ticket. + example: 65c345ba-6870-4974-87ba-dd31509c367a + x-merge-expands-to: Contact + parent_ticket: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Ticket' + nullable: true + description: The ticket's parent ticket. + example: 75b33d04-30d2-4f3e-be45-27838bc94342 + x-merge-expands-to: Ticket + attachments: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Attachment' + nullable: true + example: + - 42747df1-95e7-46e2-93cc-66f1191edca5 + - 92f972d0-2526-434b-9409-4c3b468e08f0 + x-merge-expands-to: Attachment + access_level: + oneOf: + - $ref: '#/components/schemas/TicketAccessLevelEnum' + - type: string + nullable: true + description: |- + The description of who is able to access a given ticket, or where access is inherited from. + + * `COMPANY` - COMPANY + * `PUBLIC` - PUBLIC + * `PRIVATE` - PRIVATE + * `COLLECTION` - COLLECTION + example: PRIVATE + tags: + type: array + items: + type: string + nullable: true + description: The tag's name. + example: + - enterprise + - other-tag + roles: + type: array + items: + type: string + format: uuid + nullable: true + example: + - 21a54124-397f-494d-985e-3c5b330b8a68 + - 17a54124-287f-494d-965e-3c5b330c9a68 + completed_at: + type: string + format: date-time + nullable: true + description: When the ticket was completed. + example: '2021-12-09T00:00:00Z' + ticket_url: + type: string + format: uri + nullable: true + description: The 3rd party url of the Ticket. + maxLength: 2000 + example: https://thirdpartysoftware.com/project/3/issue/1 + priority: + oneOf: + - $ref: '#/components/schemas/PriorityEnum' + - type: string + nullable: true + description: |- + The priority or urgency of the Ticket. + + * `URGENT` - URGENT + * `HIGH` - HIGH + * `NORMAL` - NORMAL + * `LOW` - LOW + example: HIGH + integration_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_integration_field: unique_integration_field_value + linked_account_params: + type: object + additionalProperties: {} + writeOnly: true + nullable: true + example: + unique_linked_account_field: unique_linked_account_field_value + remote_fields: + type: array + items: + $ref: '#/components/schemas/RemoteFieldRequest' + writeOnly: true + x-merge-expands: '{"account": "Account", "assigned_teams": "Team", "assignees": + "User", "attachments": "Attachment", "collections": "Collection", "contact": + "Contact", "creator": "User", "parent_ticket": "Ticket"}' + x-merge-category: ticketing + TicketResponse: + type: object + properties: + model: + $ref: '#/components/schemas/Ticket' + warnings: + type: array + items: + $ref: '#/components/schemas/WarningValidationProblem' + errors: + type: array + items: + $ref: '#/components/schemas/ErrorValidationProblem' + logs: + type: array + items: + $ref: '#/components/schemas/DebugModeLog' + required: + - errors + - model + - warnings + x-merge-category: ticketing + TicketStatusEnum: + enum: + - OPEN + - CLOSED + - IN_PROGRESS + - ON_HOLD + type: string + description: |- + * `OPEN` - OPEN + * `CLOSED` - CLOSED + * `IN_PROGRESS` - IN_PROGRESS + * `ON_HOLD` - ON_HOLD + x-merge-category: ticketing + TicketingAttachmentEndpointRequest: + type: object + properties: + model: + $ref: '#/components/schemas/AttachmentRequest' + required: + - model + x-merge-category: ticketing + TicketingAttachmentResponse: + type: object + properties: + model: + $ref: '#/components/schemas/Attachment' + warnings: + type: array + items: + $ref: '#/components/schemas/WarningValidationProblem' + errors: + type: array + items: + $ref: '#/components/schemas/ErrorValidationProblem' + logs: + type: array + items: + $ref: '#/components/schemas/DebugModeLog' + required: + - errors + - model + - warnings + x-merge-category: ticketing + TicketingContactEndpointRequest: + type: object + properties: + model: + $ref: '#/components/schemas/ContactRequest' + required: + - model + x-merge-category: ticketing + TicketingContactResponse: + type: object + properties: + model: + $ref: '#/components/schemas/Contact' + warnings: + type: array + items: + $ref: '#/components/schemas/WarningValidationProblem' + errors: + type: array + items: + $ref: '#/components/schemas/ErrorValidationProblem' + logs: + type: array + items: + $ref: '#/components/schemas/DebugModeLog' + required: + - errors + - model + - warnings + x-merge-category: ticketing + User: + type: object + description: |- + # The User Object + ### Description + The `User` object is used to represent a user with a login to the ticketing system. + Users are either assignees who are directly responsible or a viewer on a `Ticket`/ `Collection`. + + ### Usage Example + TODO + properties: + id: + type: string + format: uuid + readOnly: true + example: 17a54124-287f-494d-965e-3c5b330c9a68 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '19202938' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + name: + type: string + nullable: true + description: The user's name. + example: Gil Feig + email_address: + type: string + nullable: true + description: The user's email address. + example: help@merge.dev + is_active: + type: boolean + nullable: true + description: Whether or not the user is active. + example: true + teams: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Team' + nullable: true + example: + - 28b54125-287f-494d-965e-3c5b330c9a68 + - 17a54124-287f-494d-965e-3c5b330c9a68 + x-merge-expands-to: Team + roles: + type: array + items: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Role' + nullable: true + example: + - 23454124-387f-494d-265e-345b330c9123 + x-merge-expands-to: Role + avatar: + type: string + nullable: true + description: The user's avatar picture. + example: https://merge.dev/user_profile_pic.png + remote_was_deleted: + type: boolean + readOnly: true + description: Indicates whether or not this object has been deleted in the + third party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: object + additionalProperties: {} + nullable: true + readOnly: true + example: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + type: array + items: + $ref: '#/components/schemas/RemoteData' + readOnly: true + nullable: true + x-merge-expands: '{"roles": "Role", "teams": "Team"}' + x-merge-category: ticketing + ValidationProblemSource: + type: object + properties: + pointer: + type: string + required: + - pointer + x-merge-category: ticketing + Viewer: + type: object + description: |- + # The Viewer Object + ### Description + The `Viewer` object is used to represent a User or Team within a company. + + ### Usage Example + TODO + properties: + id: + type: string + format: uuid + readOnly: true + example: 17a54124-287f-494d-965e-3c5b330c9a68 + remote_id: + type: string + nullable: true + description: The third-party API ID of the matching object. + example: '088899' + created_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was created by Merge. + example: '2021-09-15T00:00:00Z' + modified_at: + type: string + format: date-time + readOnly: true + description: The datetime that this object was modified by Merge. + example: '2021-10-16T00:00:00Z' + team: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/Team' + nullable: true + description: The Team this Viewer belongs to. + example: 28b54125-287f-494d-965e-3c5b330c9a68 + x-merge-expands-to: Team + user: + oneOf: + - type: string + format: uuid + - $ref: '#/components/schemas/User' + nullable: true + description: The User this Viewer belongs to. + example: 23454124-387f-494d-265e-345b330c9123 + x-merge-expands-to: User + x-merge-expands: '{"team": "Team", "user": "User"}' + x-merge-category: ticketing + WarningValidationProblem: + type: object + properties: + source: + $ref: '#/components/schemas/ValidationProblemSource' + example: + pointer: /age + title: + type: string + example: Unrecognized Field + detail: + type: string + example: An unrecognized field, age, was passed in with request data. + problem_type: + type: string + example: UNRECOGNIZED_FIELD + required: + - detail + - problem_type + - title + x-merge-category: ticketing + WebhookReceiver: + type: object + properties: + event: + type: string + is_active: + type: boolean + key: + type: string + required: + - event + - is_active + x-merge-category: ticketing + WebhookReceiverRequest: + type: object + properties: + event: + type: string + minLength: 1 + is_active: + type: boolean + key: + type: string + minLength: 1 + required: + - event + - is_active + x-merge-category: ticketing + securitySchemes: + tokenAuth: + type: http + scheme: bearer + description: Token-based authentication with required prefix "Bearer" + x-fern-token-variable-name: api_key +servers: +- url: https://api.merge.dev/api/ticketing/v1 + description: Production + x-fern-server-name: Production +- url: https://api-sandbox.merge.dev/api/ticketing/v1 + description: Sandbox + x-fern-server-name: Sandbox +- url: https://api-eu.merge.dev/api/ticketing/v1 + description: Production EU + x-fern-server-name: ProductionEU +- url: https://api-ap.merge.dev/api/ticketing/v1 + description: Production APSE1 + x-fern-server-name: ProductionAPSE1 diff --git a/README.md b/README.md index 369193822..8b5ce8467 100644 --- a/README.md +++ b/README.md @@ -206,11 +206,6 @@ client.ats().activities().create( ); ``` -## Staged Builders -The generated builders all follow the staged builder pattern. Read more [here](https://immutables.github.io/immutable.html#staged-builder). - -Staged builders only allow you to build the object once all required properties have been specified. For example, to build an `ApplicationEndpointRequest` the Merge SDK will require that you specify the `model` and `remoteUserId` properties. - ## Contributing While we value open-source contributions to this SDK, this library is generated programmatically. @@ -219,4 +214,8 @@ otherwise they would be overwritten upon the next generated release. Feel free t a proof of concept, but know that we will not be able to merge it as-is. We suggest opening an issue first to discuss with us! -On the other hand, contributions to the README are always very welcome! \ No newline at end of file +On the other hand, contributions to the README are always very welcome! +## Staged Builders +The generated builders all follow the staged builder pattern. Read more [here](https://immutables.github.io/immutable.html#staged-builder). + +Staged builders only allow you to build the object once all required properties have been specified. For example, to build an `ApplicationEndpointRequest` the Merge SDK will require that you specify the `model` and `remoteUserId` properties. diff --git a/build.gradle b/build.gradle index 66b7a8f44..c910a6f2a 100644 --- a/build.gradle +++ b/build.gradle @@ -44,7 +44,7 @@ java { group = 'dev.merge' -version = '2.0.0' +version = '3.0.0' jar { dependsOn(":generatePomFileForMavenPublication") @@ -71,7 +71,7 @@ publishing { maven(MavenPublication) { groupId = 'dev.merge' artifactId = 'merge-java-client' - version = '2.0.0' + version = '3.0.0' from components.java pom { licenses { diff --git a/src/main/java/com/merge/api/AsyncMergeApiClientBuilder.java b/src/main/java/com/merge/api/AsyncMergeApiClientBuilder.java index 2b08f24a7..5d100f9a5 100644 --- a/src/main/java/com/merge/api/AsyncMergeApiClientBuilder.java +++ b/src/main/java/com/merge/api/AsyncMergeApiClientBuilder.java @@ -37,6 +37,11 @@ public AsyncMergeApiClientBuilder environment(Environment environment) { return this; } + public AsyncMergeApiClientBuilder url(String url) { + this.environment = Environment.custom(url); + return this; + } + /** * Sets the timeout (in seconds) for the client. Defaults to 60 seconds. */ diff --git a/src/main/java/com/merge/api/MergeApiClientBuilder.java b/src/main/java/com/merge/api/MergeApiClientBuilder.java index 65ea3085b..9e66bbfe6 100644 --- a/src/main/java/com/merge/api/MergeApiClientBuilder.java +++ b/src/main/java/com/merge/api/MergeApiClientBuilder.java @@ -37,6 +37,11 @@ public MergeApiClientBuilder environment(Environment environment) { return this; } + public MergeApiClientBuilder url(String url) { + this.environment = Environment.custom(url); + return this; + } + /** * Sets the timeout (in seconds) for the client. Defaults to 60 seconds. */ diff --git a/src/main/java/com/merge/api/accounting/AccountingClient.java b/src/main/java/com/merge/api/accounting/AccountingClient.java index 87081bc96..d62497b9e 100644 --- a/src/main/java/com/merge/api/accounting/AccountingClient.java +++ b/src/main/java/com/merge/api/accounting/AccountingClient.java @@ -82,6 +82,8 @@ public class AccountingClient { protected final Supplier phoneNumbersClient; + protected final Supplier projectsClient; + protected final Supplier purchaseOrdersClient; protected final Supplier regenerateKeyClient; @@ -139,6 +141,7 @@ public AccountingClient(ClientOptions clientOptions) { this.paymentTermsClient = Suppliers.memoize(() -> new PaymentTermsClient(clientOptions)); this.paymentsClient = Suppliers.memoize(() -> new PaymentsClient(clientOptions)); this.phoneNumbersClient = Suppliers.memoize(() -> new PhoneNumbersClient(clientOptions)); + this.projectsClient = Suppliers.memoize(() -> new ProjectsClient(clientOptions)); this.purchaseOrdersClient = Suppliers.memoize(() -> new PurchaseOrdersClient(clientOptions)); this.regenerateKeyClient = Suppliers.memoize(() -> new RegenerateKeyClient(clientOptions)); this.syncStatusClient = Suppliers.memoize(() -> new SyncStatusClient(clientOptions)); @@ -294,6 +297,10 @@ public PhoneNumbersClient phoneNumbers() { return this.phoneNumbersClient.get(); } + public ProjectsClient projects() { + return this.projectsClient.get(); + } + public PurchaseOrdersClient purchaseOrders() { return this.purchaseOrdersClient.get(); } diff --git a/src/main/java/com/merge/api/accounting/AsyncAccountingClient.java b/src/main/java/com/merge/api/accounting/AsyncAccountingClient.java index ba528cedf..211947e9f 100644 --- a/src/main/java/com/merge/api/accounting/AsyncAccountingClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncAccountingClient.java @@ -82,6 +82,8 @@ public class AsyncAccountingClient { protected final Supplier phoneNumbersClient; + protected final Supplier projectsClient; + protected final Supplier purchaseOrdersClient; protected final Supplier regenerateKeyClient; @@ -139,6 +141,7 @@ public AsyncAccountingClient(ClientOptions clientOptions) { this.paymentTermsClient = Suppliers.memoize(() -> new AsyncPaymentTermsClient(clientOptions)); this.paymentsClient = Suppliers.memoize(() -> new AsyncPaymentsClient(clientOptions)); this.phoneNumbersClient = Suppliers.memoize(() -> new AsyncPhoneNumbersClient(clientOptions)); + this.projectsClient = Suppliers.memoize(() -> new AsyncProjectsClient(clientOptions)); this.purchaseOrdersClient = Suppliers.memoize(() -> new AsyncPurchaseOrdersClient(clientOptions)); this.regenerateKeyClient = Suppliers.memoize(() -> new AsyncRegenerateKeyClient(clientOptions)); this.syncStatusClient = Suppliers.memoize(() -> new AsyncSyncStatusClient(clientOptions)); @@ -294,6 +297,10 @@ public AsyncPhoneNumbersClient phoneNumbers() { return this.phoneNumbersClient.get(); } + public AsyncProjectsClient projects() { + return this.projectsClient.get(); + } + public AsyncPurchaseOrdersClient purchaseOrders() { return this.purchaseOrdersClient.get(); } diff --git a/src/main/java/com/merge/api/accounting/AsyncItemsClient.java b/src/main/java/com/merge/api/accounting/AsyncItemsClient.java index 684994ae5..b07b348f1 100644 --- a/src/main/java/com/merge/api/accounting/AsyncItemsClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncItemsClient.java @@ -4,8 +4,12 @@ package com.merge.api.accounting; import com.merge.api.accounting.types.Item; +import com.merge.api.accounting.types.ItemEndpointRequest; +import com.merge.api.accounting.types.ItemResponse; import com.merge.api.accounting.types.ItemsListRequest; import com.merge.api.accounting.types.ItemsRetrieveRequest; +import com.merge.api.accounting.types.MetaResponse; +import com.merge.api.accounting.types.PatchedItemEndpointRequest; import com.merge.api.core.ClientOptions; import com.merge.api.core.RequestOptions; import com.merge.api.core.SyncPagingIterable; @@ -49,6 +53,20 @@ public CompletableFuture> list(ItemsListRequest request return this.rawClient.list(request, requestOptions).thenApply(response -> response.body()); } + /** + * Creates an Item object with the given values. + */ + public CompletableFuture create(ItemEndpointRequest request) { + return this.rawClient.create(request).thenApply(response -> response.body()); + } + + /** + * Creates an Item object with the given values. + */ + public CompletableFuture create(ItemEndpointRequest request, RequestOptions requestOptions) { + return this.rawClient.create(request, requestOptions).thenApply(response -> response.body()); + } + /** * Returns an Item object with the given id. */ @@ -69,4 +87,47 @@ public CompletableFuture retrieve(String id, ItemsRetrieveRequest request) public CompletableFuture retrieve(String id, ItemsRetrieveRequest request, RequestOptions requestOptions) { return this.rawClient.retrieve(id, request, requestOptions).thenApply(response -> response.body()); } + + /** + * Updates an Item object with the given id. + */ + public CompletableFuture partialUpdate(String id, PatchedItemEndpointRequest request) { + return this.rawClient.partialUpdate(id, request).thenApply(response -> response.body()); + } + + /** + * Updates an Item object with the given id. + */ + public CompletableFuture partialUpdate( + String id, PatchedItemEndpointRequest request, RequestOptions requestOptions) { + return this.rawClient.partialUpdate(id, request, requestOptions).thenApply(response -> response.body()); + } + + /** + * Returns metadata for Item PATCHs. + */ + public CompletableFuture metaPatchRetrieve(String id) { + return this.rawClient.metaPatchRetrieve(id).thenApply(response -> response.body()); + } + + /** + * Returns metadata for Item PATCHs. + */ + public CompletableFuture metaPatchRetrieve(String id, RequestOptions requestOptions) { + return this.rawClient.metaPatchRetrieve(id, requestOptions).thenApply(response -> response.body()); + } + + /** + * Returns metadata for Item POSTs. + */ + public CompletableFuture metaPostRetrieve() { + return this.rawClient.metaPostRetrieve().thenApply(response -> response.body()); + } + + /** + * Returns metadata for Item POSTs. + */ + public CompletableFuture metaPostRetrieve(RequestOptions requestOptions) { + return this.rawClient.metaPostRetrieve(requestOptions).thenApply(response -> response.body()); + } } diff --git a/src/main/java/com/merge/api/accounting/AsyncProjectsClient.java b/src/main/java/com/merge/api/accounting/AsyncProjectsClient.java new file mode 100644 index 000000000..061f17989 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/AsyncProjectsClient.java @@ -0,0 +1,73 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting; + +import com.merge.api.accounting.types.PaginatedProjectList; +import com.merge.api.accounting.types.Project; +import com.merge.api.accounting.types.ProjectsListRequest; +import com.merge.api.accounting.types.ProjectsRetrieveRequest; +import com.merge.api.core.ClientOptions; +import com.merge.api.core.RequestOptions; +import java.util.concurrent.CompletableFuture; + +public class AsyncProjectsClient { + protected final ClientOptions clientOptions; + + private final AsyncRawProjectsClient rawClient; + + public AsyncProjectsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.rawClient = new AsyncRawProjectsClient(clientOptions); + } + + /** + * Get responses with HTTP metadata like headers + */ + public AsyncRawProjectsClient withRawResponse() { + return this.rawClient; + } + + /** + * Returns a list of Project objects. + */ + public CompletableFuture list() { + return this.rawClient.list().thenApply(response -> response.body()); + } + + /** + * Returns a list of Project objects. + */ + public CompletableFuture list(ProjectsListRequest request) { + return this.rawClient.list(request).thenApply(response -> response.body()); + } + + /** + * Returns a list of Project objects. + */ + public CompletableFuture list(ProjectsListRequest request, RequestOptions requestOptions) { + return this.rawClient.list(request, requestOptions).thenApply(response -> response.body()); + } + + /** + * Returns a Project object with the given id. + */ + public CompletableFuture retrieve(String id) { + return this.rawClient.retrieve(id).thenApply(response -> response.body()); + } + + /** + * Returns a Project object with the given id. + */ + public CompletableFuture retrieve(String id, ProjectsRetrieveRequest request) { + return this.rawClient.retrieve(id, request).thenApply(response -> response.body()); + } + + /** + * Returns a Project object with the given id. + */ + public CompletableFuture retrieve( + String id, ProjectsRetrieveRequest request, RequestOptions requestOptions) { + return this.rawClient.retrieve(id, request, requestOptions).thenApply(response -> response.body()); + } +} diff --git a/src/main/java/com/merge/api/accounting/AsyncRawAccountDetailsClient.java b/src/main/java/com/merge/api/accounting/AsyncRawAccountDetailsClient.java index 4ba5795ff..367f56694 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawAccountDetailsClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawAccountDetailsClient.java @@ -40,7 +40,7 @@ public CompletableFuture> retrieve() { * Get details for a linked account. */ public CompletableFuture> retrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/account-details") .build(); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawAccountTokenClient.java b/src/main/java/com/merge/api/accounting/AsyncRawAccountTokenClient.java index 95663fee5..2ad6c4d8e 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawAccountTokenClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawAccountTokenClient.java @@ -41,7 +41,7 @@ public CompletableFuture> retrieve(String pub */ public CompletableFuture> retrieve( String publicToken, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/account-token") .addPathSegment(publicToken) diff --git a/src/main/java/com/merge/api/accounting/AsyncRawAccountingPeriodsClient.java b/src/main/java/com/merge/api/accounting/AsyncRawAccountingPeriodsClient.java index f80e77267..aa8b39f81 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawAccountingPeriodsClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawAccountingPeriodsClient.java @@ -58,7 +58,7 @@ public CompletableFuture>> list( AccountingPeriodsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/accounting-periods"); if (request.getCursor().isPresent()) { @@ -170,7 +170,7 @@ public CompletableFuture> retrieve( */ public CompletableFuture> retrieve( String id, AccountingPeriodsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/accounting-periods") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawAccountsClient.java b/src/main/java/com/merge/api/accounting/AsyncRawAccountsClient.java index 28d81eef8..f5eb4fd55 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawAccountsClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawAccountsClient.java @@ -64,13 +64,17 @@ public CompletableFuture>> list */ public CompletableFuture>> list( AccountsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/accounts"); if (request.getAccountType().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "account_type", request.getAccountType().get(), false); } + if (request.getClassification().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "classification", request.getClassification().get(), false); + } if (request.getCompanyId().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "company_id", request.getCompanyId().get(), false); @@ -220,7 +224,7 @@ public CompletableFuture> create(AccountEn */ public CompletableFuture> create( AccountEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/accounts"); if (request.getIsDebugMode().isPresent()) { @@ -301,7 +305,7 @@ public CompletableFuture> retrieve(String id, Acco */ public CompletableFuture> retrieve( String id, AccountsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/accounts") .addPathSegment(id); @@ -386,7 +390,7 @@ public CompletableFuture> metaPostRetrieve() * Returns metadata for Account POSTs. */ public CompletableFuture> metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/accounts/meta/post") .build(); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawAddressesClient.java b/src/main/java/com/merge/api/accounting/AsyncRawAddressesClient.java index 7712a1f4c..fa1eb1309 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawAddressesClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawAddressesClient.java @@ -50,7 +50,7 @@ public CompletableFuture> retrieve(String id, Addr */ public CompletableFuture> retrieve( String id, AddressesRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/addresses") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawAsyncPassthroughClient.java b/src/main/java/com/merge/api/accounting/AsyncRawAsyncPassthroughClient.java index 83640c016..c39e2af54 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawAsyncPassthroughClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawAsyncPassthroughClient.java @@ -46,7 +46,7 @@ public CompletableFuture> create(D */ public CompletableFuture> create( DataPassthroughRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/async-passthrough") .build(); @@ -113,7 +113,7 @@ public CompletableFuture> */ public CompletableFuture> retrieve( String asyncPassthroughReceiptId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/async-passthrough") .addPathSegment(asyncPassthroughReceiptId) diff --git a/src/main/java/com/merge/api/accounting/AsyncRawAsyncTasksClient.java b/src/main/java/com/merge/api/accounting/AsyncRawAsyncTasksClient.java index 50576f677..121673ecf 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawAsyncTasksClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawAsyncTasksClient.java @@ -40,7 +40,7 @@ public CompletableFuture> retrieve(String id * Returns an AsyncPostTask object with the given id. */ public CompletableFuture> retrieve(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/async-tasks") .addPathSegment(id) diff --git a/src/main/java/com/merge/api/accounting/AsyncRawAttachmentsClient.java b/src/main/java/com/merge/api/accounting/AsyncRawAttachmentsClient.java index 7278b5c9d..9e1efeaa8 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawAttachmentsClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawAttachmentsClient.java @@ -65,7 +65,7 @@ public CompletableFuture>> list( AttachmentsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/attachments"); if (request.getCompanyId().isPresent()) { @@ -197,7 +197,7 @@ public CompletableFuture> cre */ public CompletableFuture> create( AccountingAttachmentEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/attachments"); if (request.getIsDebugMode().isPresent()) { @@ -280,7 +280,7 @@ public CompletableFuture> retrieve( */ public CompletableFuture> retrieve( String id, AttachmentsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/attachments") .addPathSegment(id); @@ -351,7 +351,7 @@ public CompletableFuture> metaPostRetrieve() * Returns metadata for AccountingAttachment POSTs. */ public CompletableFuture> metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/attachments/meta/post") .build(); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawAuditTrailClient.java b/src/main/java/com/merge/api/accounting/AsyncRawAuditTrailClient.java index a07e9b344..f3d5bac30 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawAuditTrailClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawAuditTrailClient.java @@ -57,7 +57,7 @@ public CompletableFuture> */ public CompletableFuture>> list( AuditTrailListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/audit-trail"); if (request.getCursor().isPresent()) { diff --git a/src/main/java/com/merge/api/accounting/AsyncRawAvailableActionsClient.java b/src/main/java/com/merge/api/accounting/AsyncRawAvailableActionsClient.java index 09bac4b6b..5366de445 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawAvailableActionsClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawAvailableActionsClient.java @@ -40,7 +40,7 @@ public CompletableFuture> retrieve() { * Returns a list of models and actions available for an account. */ public CompletableFuture> retrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/available-actions") .build(); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawBalanceSheetsClient.java b/src/main/java/com/merge/api/accounting/AsyncRawBalanceSheetsClient.java index 3bfdfd990..7ac03d1b0 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawBalanceSheetsClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawBalanceSheetsClient.java @@ -58,7 +58,7 @@ public CompletableFuture>> */ public CompletableFuture>> list( BalanceSheetsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/balance-sheets"); if (request.getCompanyId().isPresent()) { @@ -199,7 +199,7 @@ public CompletableFuture> retrieve( */ public CompletableFuture> retrieve( String id, BalanceSheetsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/balance-sheets") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawBankFeedAccountsClient.java b/src/main/java/com/merge/api/accounting/AsyncRawBankFeedAccountsClient.java index c275d8f30..3f88e9bfc 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawBankFeedAccountsClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawBankFeedAccountsClient.java @@ -65,7 +65,7 @@ public CompletableFuture>> list( BankFeedAccountsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/bank-feed-accounts"); if (request.getCursor().isPresent()) { @@ -169,7 +169,7 @@ public CompletableFuture> create( */ public CompletableFuture> create( BankFeedAccountEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/bank-feed-accounts"); if (request.getIsDebugMode().isPresent()) { @@ -252,7 +252,7 @@ public CompletableFuture> retrieve( */ public CompletableFuture> retrieve( String id, BankFeedAccountsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/bank-feed-accounts") .addPathSegment(id); @@ -323,7 +323,7 @@ public CompletableFuture> metaPostRetrieve() * Returns metadata for BankFeedAccount POSTs. */ public CompletableFuture> metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/bank-feed-accounts/meta/post") .build(); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawBankFeedTransactionsClient.java b/src/main/java/com/merge/api/accounting/AsyncRawBankFeedTransactionsClient.java index bd5ebe903..6a62c8c5a 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawBankFeedTransactionsClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawBankFeedTransactionsClient.java @@ -65,7 +65,7 @@ public CompletableFuture>> list( BankFeedTransactionsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/bank-feed-transactions"); if (request.getCreatedAfter().isPresent()) { @@ -201,7 +201,7 @@ public CompletableFuture> crea */ public CompletableFuture> create( BankFeedTransactionEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/bank-feed-transactions"); if (request.getIsDebugMode().isPresent()) { @@ -284,7 +284,7 @@ public CompletableFuture> retrieve( */ public CompletableFuture> retrieve( String id, BankFeedTransactionsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/bank-feed-transactions") .addPathSegment(id); @@ -359,7 +359,7 @@ public CompletableFuture> metaPostRetrieve() * Returns metadata for BankFeedTransaction POSTs. */ public CompletableFuture> metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/bank-feed-transactions/meta/post") .build(); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawCashFlowStatementsClient.java b/src/main/java/com/merge/api/accounting/AsyncRawCashFlowStatementsClient.java index 3b8c0a077..1be29e934 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawCashFlowStatementsClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawCashFlowStatementsClient.java @@ -58,7 +58,7 @@ public CompletableFuture>> list( CashFlowStatementsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/cash-flow-statements"); if (request.getCompanyId().isPresent()) { @@ -201,7 +201,7 @@ public CompletableFuture> retrieve( */ public CompletableFuture> retrieve( String id, CashFlowStatementsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/cash-flow-statements") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawCompanyInfoClient.java b/src/main/java/com/merge/api/accounting/AsyncRawCompanyInfoClient.java index 9d002a586..c0a7b5f36 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawCompanyInfoClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawCompanyInfoClient.java @@ -58,7 +58,7 @@ public CompletableFuture>> */ public CompletableFuture>> list( CompanyInfoListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/company-info"); if (request.getCreatedAfter().isPresent()) { @@ -195,7 +195,7 @@ public CompletableFuture> retrieve( */ public CompletableFuture> retrieve( String id, CompanyInfoRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/company-info") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawContactsClient.java b/src/main/java/com/merge/api/accounting/AsyncRawContactsClient.java index 4a0f919cd..eaecbe0ec 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawContactsClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawContactsClient.java @@ -67,7 +67,7 @@ public CompletableFuture>> list */ public CompletableFuture>> list( ContactsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/contacts"); if (request.getCompanyId().isPresent()) { @@ -235,7 +235,7 @@ public CompletableFuture> create(ContactEn */ public CompletableFuture> create( ContactEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/contacts"); if (request.getIsDebugMode().isPresent()) { @@ -316,7 +316,7 @@ public CompletableFuture> retrieve(String id, Cont */ public CompletableFuture> retrieve( String id, ContactsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/contacts") .addPathSegment(id); @@ -405,7 +405,7 @@ public CompletableFuture> metaPostRetrieve() * Returns metadata for Contact POSTs. */ public CompletableFuture> metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/contacts/meta/post") .build(); @@ -472,7 +472,7 @@ public CompletableFuture>> remoteFieldClassesList( ContactsRemoteFieldClassesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/contacts/remote-field-classes"); if (request.getCursor().isPresent()) { @@ -507,6 +507,10 @@ public CompletableFuture>> l */ public CompletableFuture>> list( CreditNotesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/credit-notes"); if (request.getCompanyId().isPresent()) { @@ -223,7 +223,7 @@ public CompletableFuture> create(Credit */ public CompletableFuture> create( CreditNoteEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/credit-notes"); if (request.getIsDebugMode().isPresent()) { @@ -304,7 +304,7 @@ public CompletableFuture> retrieve(String id, C */ public CompletableFuture> retrieve( String id, CreditNotesRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/credit-notes") .addPathSegment(id); @@ -390,7 +390,7 @@ public CompletableFuture> metaPostRetrieve() * Returns metadata for CreditNote POSTs. */ public CompletableFuture> metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/credit-notes/meta/post") .build(); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawDeleteAccountClient.java b/src/main/java/com/merge/api/accounting/AsyncRawDeleteAccountClient.java index 3eb00d200..90b7ddd2c 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawDeleteAccountClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawDeleteAccountClient.java @@ -40,7 +40,7 @@ public CompletableFuture> delete() { * Delete a linked account. */ public CompletableFuture> delete(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/delete-account") .build(); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawEmployeesClient.java b/src/main/java/com/merge/api/accounting/AsyncRawEmployeesClient.java index 69ba89e8f..ef5e9ad53 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawEmployeesClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawEmployeesClient.java @@ -57,7 +57,7 @@ public CompletableFuture>> lis */ public CompletableFuture>> list( EmployeesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/employees"); if (request.getCursor().isPresent()) { @@ -170,7 +170,7 @@ public CompletableFuture> retrieve(String id, Emp */ public CompletableFuture> retrieve( String id, EmployeesRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/employees") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawExpensesClient.java b/src/main/java/com/merge/api/accounting/AsyncRawExpensesClient.java index 26e554632..b59bbdb93 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawExpensesClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawExpensesClient.java @@ -68,7 +68,7 @@ public CompletableFuture>> list */ public CompletableFuture>> list( ExpensesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/expenses"); if (request.getCompanyId().isPresent()) { @@ -222,7 +222,7 @@ public CompletableFuture> create(ExpenseEn */ public CompletableFuture> create( ExpenseEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/expenses"); if (request.getIsDebugMode().isPresent()) { @@ -303,7 +303,7 @@ public CompletableFuture> retrieve(String id, Expe */ public CompletableFuture> retrieve( String id, ExpensesRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/expenses") .addPathSegment(id); @@ -394,7 +394,7 @@ public CompletableFuture>> linesRemoteFieldClassesList( ExpensesLinesRemoteFieldClassesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/expenses/lines/remote-field-classes"); if (request.getCursor().isPresent()) { @@ -429,6 +429,10 @@ public CompletableFuture> metaPostRetrieve() * Returns metadata for Expense POSTs. */ public CompletableFuture> metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/expenses/meta/post") .build(); @@ -572,7 +576,7 @@ public CompletableFuture>> remoteFieldClassesList( ExpensesRemoteFieldClassesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/expenses/remote-field-classes"); if (request.getCursor().isPresent()) { @@ -607,6 +611,10 @@ public CompletableFuture> */ public CompletableFuture> fieldMappingsRetrieve( FieldMappingsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/field-mappings"); if (request.getExcludeRemoteFieldMetadata().isPresent()) { @@ -128,7 +128,7 @@ public CompletableFuture> fie */ public CompletableFuture> fieldMappingsCreate( CreateFieldMappingRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/field-mappings"); if (request.getExcludeRemoteFieldMetadata().isPresent()) { @@ -208,7 +208,7 @@ public CompletableFuture> fie */ public CompletableFuture> fieldMappingsDestroy( String fieldMappingId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/field-mappings") .addPathSegment(fieldMappingId) @@ -278,7 +278,7 @@ public CompletableFuture> fie */ public CompletableFuture> fieldMappingsPartialUpdate( String fieldMappingId, PatchedEditFieldMappingRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/field-mappings") .addPathSegment(fieldMappingId) @@ -353,7 +353,7 @@ public CompletableFuture> remoteFie */ public CompletableFuture> remoteFieldsRetrieve( RemoteFieldsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/remote-fields"); if (request.getCommonModels().isPresent()) { @@ -422,7 +422,7 @@ public CompletableFuture> t */ public CompletableFuture> targetFieldsRetrieve( RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/target-fields") .build(); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawForceResyncClient.java b/src/main/java/com/merge/api/accounting/AsyncRawForceResyncClient.java index 696dcd1a1..c8833b9ed 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawForceResyncClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawForceResyncClient.java @@ -44,7 +44,7 @@ public CompletableFuture>> syncStatusResyn */ public CompletableFuture>> syncStatusResyncCreate( RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/sync-status/resync") .build(); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawGeneralLedgerTransactionsClient.java b/src/main/java/com/merge/api/accounting/AsyncRawGeneralLedgerTransactionsClient.java index 86ee2ec9d..3d7ade364 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawGeneralLedgerTransactionsClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawGeneralLedgerTransactionsClient.java @@ -58,7 +58,7 @@ public CompletableFuture>> list( GeneralLedgerTransactionsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/general-ledger-transactions"); if (request.getCompanyId().isPresent()) { @@ -217,7 +217,7 @@ public CompletableFuture> retriev */ public CompletableFuture> retrieve( String id, GeneralLedgerTransactionsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/general-ledger-transactions") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawGenerateKeyClient.java b/src/main/java/com/merge/api/accounting/AsyncRawGenerateKeyClient.java index 42f58d785..b6d70b6be 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawGenerateKeyClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawGenerateKeyClient.java @@ -45,7 +45,7 @@ public CompletableFuture> create(GenerateRemoteK */ public CompletableFuture> create( GenerateRemoteKeyRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/generate-key") .build(); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawIncomeStatementsClient.java b/src/main/java/com/merge/api/accounting/AsyncRawIncomeStatementsClient.java index 0eef25c21..1e58c6c93 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawIncomeStatementsClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawIncomeStatementsClient.java @@ -58,7 +58,7 @@ public CompletableFuture>> list( IncomeStatementsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/income-statements"); if (request.getCompanyId().isPresent()) { @@ -200,7 +200,7 @@ public CompletableFuture> retrieve( */ public CompletableFuture> retrieve( String id, IncomeStatementsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/income-statements") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawInvoicesClient.java b/src/main/java/com/merge/api/accounting/AsyncRawInvoicesClient.java index db5ebf54b..5991053ed 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawInvoicesClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawInvoicesClient.java @@ -69,7 +69,7 @@ public CompletableFuture>> list */ public CompletableFuture>> list( InvoicesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/invoices"); if (request.getCompanyId().isPresent()) { @@ -249,7 +249,7 @@ public CompletableFuture> create(InvoiceEn */ public CompletableFuture> create( InvoiceEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/invoices"); if (request.getIsDebugMode().isPresent()) { @@ -330,7 +330,7 @@ public CompletableFuture> retrieve(String id, Invo */ public CompletableFuture> retrieve( String id, InvoicesRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/invoices") .addPathSegment(id); @@ -421,7 +421,7 @@ public CompletableFuture> partialUpdate( */ public CompletableFuture> partialUpdate( String id, PatchedInvoiceEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/invoices") .addPathSegment(id); @@ -507,7 +507,7 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { public CompletableFuture>> lineItemsRemoteFieldClassesList( InvoicesLineItemsRemoteFieldClassesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/invoices/line-items/remote-field-classes"); if (request.getCursor().isPresent()) { @@ -542,6 +542,10 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { request.getIsCommonModelField().get().toString(), false); } + if (request.getIsCustom().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "is_custom", request.getIsCustom().get().toString(), false); + } if (request.getPageSize().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "page_size", request.getPageSize().get().toString(), false); @@ -619,7 +623,7 @@ public CompletableFuture> metaPatchRetrieve(S */ public CompletableFuture> metaPatchRetrieve( String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/invoices/meta/patch") .addPathSegment(id) @@ -677,7 +681,7 @@ public CompletableFuture> metaPostRetrieve() * Returns metadata for Invoice POSTs. */ public CompletableFuture> metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/invoices/meta/post") .build(); @@ -744,7 +748,7 @@ public CompletableFuture>> remoteFieldClassesList( InvoicesRemoteFieldClassesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/invoices/remote-field-classes"); if (request.getCursor().isPresent()) { @@ -779,6 +783,10 @@ public CompletableFuture>> list(I */ public CompletableFuture>> list( IssuesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/issues"); if (request.getAccountToken().isPresent()) { @@ -199,7 +199,7 @@ public CompletableFuture> retrieve(String id) { * Get a specific issue. */ public CompletableFuture> retrieve(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/issues") .addPathSegment(id) diff --git a/src/main/java/com/merge/api/accounting/AsyncRawItemsClient.java b/src/main/java/com/merge/api/accounting/AsyncRawItemsClient.java index af900d8e1..9cac8db4c 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawItemsClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawItemsClient.java @@ -4,11 +4,16 @@ package com.merge.api.accounting; import com.merge.api.accounting.types.Item; +import com.merge.api.accounting.types.ItemEndpointRequest; +import com.merge.api.accounting.types.ItemResponse; import com.merge.api.accounting.types.ItemsListRequest; import com.merge.api.accounting.types.ItemsRetrieveRequest; +import com.merge.api.accounting.types.MetaResponse; import com.merge.api.accounting.types.PaginatedItemList; +import com.merge.api.accounting.types.PatchedItemEndpointRequest; import com.merge.api.core.ApiError; import com.merge.api.core.ClientOptions; +import com.merge.api.core.MediaTypes; import com.merge.api.core.MergeApiHttpResponse; import com.merge.api.core.MergeException; import com.merge.api.core.ObjectMappers; @@ -17,7 +22,9 @@ import com.merge.api.core.SyncPagingIterable; import java.io.IOException; import java.util.Collections; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -27,6 +34,7 @@ import okhttp3.HttpUrl; import okhttp3.OkHttpClient; import okhttp3.Request; +import okhttp3.RequestBody; import okhttp3.Response; import okhttp3.ResponseBody; import org.jetbrains.annotations.NotNull; @@ -57,7 +65,7 @@ public CompletableFuture>> list(It */ public CompletableFuture>> list( ItemsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/items"); if (request.getCompanyId().isPresent()) { @@ -186,6 +194,80 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { return future; } + /** + * Creates an Item object with the given values. + */ + public CompletableFuture> create(ItemEndpointRequest request) { + return create(request, null); + } + + /** + * Creates an Item object with the given values. + */ + public CompletableFuture> create( + ItemEndpointRequest request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("accounting/v1/items"); + if (request.getIsDebugMode().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "is_debug_mode", request.getIsDebugMode().get().toString(), false); + } + if (request.getRunAsync().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "run_async", request.getRunAsync().get().toString(), false); + } + Map properties = new HashMap<>(); + properties.put("model", request.getModel()); + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + } catch (Exception e) { + throw new RuntimeException(e); + } + Request.Builder _requestBuilder = new Request.Builder() + .url(httpUrl.build()) + .method("POST", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); + Request okhttpRequest = _requestBuilder.build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + CompletableFuture> future = new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + if (response.isSuccessful()) { + future.complete(new MergeApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), ItemResponse.class), + response)); + return; + } + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + future.completeExceptionally(new ApiError( + "Error with status code " + response.code(), + response.code(), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + } catch (IOException e) { + future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); + } + }); + return future; + } + /** * Returns an Item object with the given id. */ @@ -205,7 +287,7 @@ public CompletableFuture> retrieve(String id, ItemsRe */ public CompletableFuture> retrieve( String id, ItemsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/items") .addPathSegment(id); @@ -275,4 +357,196 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { }); return future; } + + /** + * Updates an Item object with the given id. + */ + public CompletableFuture> partialUpdate( + String id, PatchedItemEndpointRequest request) { + return partialUpdate(id, request, null); + } + + /** + * Updates an Item object with the given id. + */ + public CompletableFuture> partialUpdate( + String id, PatchedItemEndpointRequest request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("accounting/v1/items") + .addPathSegment(id); + if (request.getIsDebugMode().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "is_debug_mode", request.getIsDebugMode().get().toString(), false); + } + if (request.getRunAsync().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "run_async", request.getRunAsync().get().toString(), false); + } + Map properties = new HashMap<>(); + properties.put("model", request.getModel()); + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + } catch (Exception e) { + throw new RuntimeException(e); + } + Request.Builder _requestBuilder = new Request.Builder() + .url(httpUrl.build()) + .method("PATCH", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); + Request okhttpRequest = _requestBuilder.build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + CompletableFuture> future = new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + if (response.isSuccessful()) { + future.complete(new MergeApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), ItemResponse.class), + response)); + return; + } + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + future.completeExceptionally(new ApiError( + "Error with status code " + response.code(), + response.code(), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + } catch (IOException e) { + future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); + } + }); + return future; + } + + /** + * Returns metadata for Item PATCHs. + */ + public CompletableFuture> metaPatchRetrieve(String id) { + return metaPatchRetrieve(id, null); + } + + /** + * Returns metadata for Item PATCHs. + */ + public CompletableFuture> metaPatchRetrieve( + String id, RequestOptions requestOptions) { + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("accounting/v1/items/meta/patch") + .addPathSegment(id) + .build(); + Request okhttpRequest = new Request.Builder() + .url(httpUrl) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + CompletableFuture> future = new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + if (response.isSuccessful()) { + future.complete(new MergeApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), + response)); + return; + } + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + future.completeExceptionally(new ApiError( + "Error with status code " + response.code(), + response.code(), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + } catch (IOException e) { + future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); + } + }); + return future; + } + + /** + * Returns metadata for Item POSTs. + */ + public CompletableFuture> metaPostRetrieve() { + return metaPostRetrieve(null); + } + + /** + * Returns metadata for Item POSTs. + */ + public CompletableFuture> metaPostRetrieve(RequestOptions requestOptions) { + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("accounting/v1/items/meta/post") + .build(); + Request okhttpRequest = new Request.Builder() + .url(httpUrl) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + CompletableFuture> future = new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + if (response.isSuccessful()) { + future.complete(new MergeApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), + response)); + return; + } + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + future.completeExceptionally(new ApiError( + "Error with status code " + response.code(), + response.code(), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + } catch (IOException e) { + future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); + } + }); + return future; + } } diff --git a/src/main/java/com/merge/api/accounting/AsyncRawJournalEntriesClient.java b/src/main/java/com/merge/api/accounting/AsyncRawJournalEntriesClient.java index 7c89988df..c88f88326 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawJournalEntriesClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawJournalEntriesClient.java @@ -69,7 +69,7 @@ public CompletableFuture>> */ public CompletableFuture>> list( JournalEntriesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/journal-entries"); if (request.getCompanyId().isPresent()) { @@ -223,7 +223,7 @@ public CompletableFuture> create(Jour */ public CompletableFuture> create( JournalEntryEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/journal-entries"); if (request.getIsDebugMode().isPresent()) { @@ -305,7 +305,7 @@ public CompletableFuture> retrieve( */ public CompletableFuture> retrieve( String id, JournalEntriesRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/journal-entries") .addPathSegment(id); @@ -397,7 +397,7 @@ public CompletableFuture>> linesRemoteFieldClassesList( JournalEntriesLinesRemoteFieldClassesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/journal-entries/lines/remote-field-classes"); if (request.getCursor().isPresent()) { @@ -432,6 +432,10 @@ public CompletableFuture> metaPostRetrieve() * Returns metadata for JournalEntry POSTs. */ public CompletableFuture> metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/journal-entries/meta/post") .build(); @@ -575,7 +579,7 @@ public CompletableFuture>> remoteFieldClassesList( JournalEntriesRemoteFieldClassesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/journal-entries/remote-field-classes"); if (request.getCursor().isPresent()) { @@ -610,6 +614,10 @@ public CompletableFuture> create(EndUserDetailsR */ public CompletableFuture> create( EndUserDetailsRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/link-token") .build(); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawLinkedAccountsClient.java b/src/main/java/com/merge/api/accounting/AsyncRawLinkedAccountsClient.java index 5f01579c9..ea4c392e8 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawLinkedAccountsClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawLinkedAccountsClient.java @@ -57,7 +57,7 @@ public CompletableFuture>> list( LinkedAccountsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/linked-accounts"); if (request.getCategory().isPresent()) { diff --git a/src/main/java/com/merge/api/accounting/AsyncRawPassthroughClient.java b/src/main/java/com/merge/api/accounting/AsyncRawPassthroughClient.java index a4772e8b6..02c8a827e 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawPassthroughClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawPassthroughClient.java @@ -45,7 +45,7 @@ public CompletableFuture> create(DataPassth */ public CompletableFuture> create( DataPassthroughRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/passthrough") .build(); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawPaymentMethodsClient.java b/src/main/java/com/merge/api/accounting/AsyncRawPaymentMethodsClient.java index 8be41507e..4161a6028 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawPaymentMethodsClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawPaymentMethodsClient.java @@ -58,7 +58,7 @@ public CompletableFuture> */ public CompletableFuture>> list( PaymentMethodsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/payment-methods"); if (request.getCursor().isPresent()) { @@ -168,7 +168,7 @@ public CompletableFuture> retrieve( */ public CompletableFuture> retrieve( String id, PaymentMethodsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/payment-methods") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawPaymentTermsClient.java b/src/main/java/com/merge/api/accounting/AsyncRawPaymentTermsClient.java index 11d5c4fd4..a51053c54 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawPaymentTermsClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawPaymentTermsClient.java @@ -58,7 +58,7 @@ public CompletableFuture>> */ public CompletableFuture>> list( PaymentTermsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/payment-terms"); if (request.getCursor().isPresent()) { @@ -172,7 +172,7 @@ public CompletableFuture> retrieve( */ public CompletableFuture> retrieve( String id, PaymentTermsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/payment-terms") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawPaymentsClient.java b/src/main/java/com/merge/api/accounting/AsyncRawPaymentsClient.java index f335b0751..c9975d594 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawPaymentsClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawPaymentsClient.java @@ -69,7 +69,7 @@ public CompletableFuture>> list */ public CompletableFuture>> list( PaymentsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/payments"); if (request.getAccountId().isPresent()) { @@ -231,7 +231,7 @@ public CompletableFuture> create(PaymentEn */ public CompletableFuture> create( PaymentEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/payments"); if (request.getIsDebugMode().isPresent()) { @@ -312,7 +312,7 @@ public CompletableFuture> retrieve(String id, Paym */ public CompletableFuture> retrieve( String id, PaymentsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/payments") .addPathSegment(id); @@ -395,7 +395,7 @@ public CompletableFuture> partialUpdate( */ public CompletableFuture> partialUpdate( String id, PatchedPaymentEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/payments") .addPathSegment(id); @@ -481,7 +481,7 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { public CompletableFuture>> lineItemsRemoteFieldClassesList( PaymentsLineItemsRemoteFieldClassesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/payments/line-items/remote-field-classes"); if (request.getCursor().isPresent()) { @@ -516,6 +516,10 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { request.getIsCommonModelField().get().toString(), false); } + if (request.getIsCustom().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "is_custom", request.getIsCustom().get().toString(), false); + } if (request.getPageSize().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "page_size", request.getPageSize().get().toString(), false); @@ -593,7 +597,7 @@ public CompletableFuture> metaPatchRetrieve(S */ public CompletableFuture> metaPatchRetrieve( String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/payments/meta/patch") .addPathSegment(id) @@ -651,7 +655,7 @@ public CompletableFuture> metaPostRetrieve() * Returns metadata for Payment POSTs. */ public CompletableFuture> metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/payments/meta/post") .build(); @@ -718,7 +722,7 @@ public CompletableFuture>> remoteFieldClassesList( PaymentsRemoteFieldClassesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/payments/remote-field-classes"); if (request.getCursor().isPresent()) { @@ -753,6 +757,10 @@ public CompletableFuture> retrieve( */ public CompletableFuture> retrieve( String id, PhoneNumbersRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/phone-numbers") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawProjectsClient.java b/src/main/java/com/merge/api/accounting/AsyncRawProjectsClient.java new file mode 100644 index 000000000..34c9d5d21 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/AsyncRawProjectsClient.java @@ -0,0 +1,214 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting; + +import com.merge.api.accounting.types.PaginatedProjectList; +import com.merge.api.accounting.types.Project; +import com.merge.api.accounting.types.ProjectsListRequest; +import com.merge.api.accounting.types.ProjectsRetrieveRequest; +import com.merge.api.core.ApiError; +import com.merge.api.core.ClientOptions; +import com.merge.api.core.MergeApiHttpResponse; +import com.merge.api.core.MergeException; +import com.merge.api.core.ObjectMappers; +import com.merge.api.core.QueryStringMapper; +import com.merge.api.core.RequestOptions; +import java.io.IOException; +import java.util.concurrent.CompletableFuture; +import okhttp3.Call; +import okhttp3.Callback; +import okhttp3.Headers; +import okhttp3.HttpUrl; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; +import okhttp3.ResponseBody; +import org.jetbrains.annotations.NotNull; + +public class AsyncRawProjectsClient { + protected final ClientOptions clientOptions; + + public AsyncRawProjectsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + } + + /** + * Returns a list of Project objects. + */ + public CompletableFuture> list() { + return list(ProjectsListRequest.builder().build()); + } + + /** + * Returns a list of Project objects. + */ + public CompletableFuture> list(ProjectsListRequest request) { + return list(request, null); + } + + /** + * Returns a list of Project objects. + */ + public CompletableFuture> list( + ProjectsListRequest request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("accounting/v1/projects"); + if (request.getCursor().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "cursor", request.getCursor().get(), false); + } + if (request.getIncludeDeletedData().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, + "include_deleted_data", + request.getIncludeDeletedData().get().toString(), + false); + } + if (request.getIncludeRemoteData().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, + "include_remote_data", + request.getIncludeRemoteData().get().toString(), + false); + } + if (request.getIncludeShellData().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, + "include_shell_data", + request.getIncludeShellData().get().toString(), + false); + } + if (request.getPageSize().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "page_size", request.getPageSize().get().toString(), false); + } + if (request.getExpand().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "expand", request.getExpand().get().toString(), false); + } + Request.Builder _requestBuilder = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); + Request okhttpRequest = _requestBuilder.build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + CompletableFuture> future = new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + if (response.isSuccessful()) { + future.complete(new MergeApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedProjectList.class), + response)); + return; + } + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + future.completeExceptionally(new ApiError( + "Error with status code " + response.code(), + response.code(), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + } catch (IOException e) { + future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); + } + }); + return future; + } + + /** + * Returns a Project object with the given id. + */ + public CompletableFuture> retrieve(String id) { + return retrieve(id, ProjectsRetrieveRequest.builder().build()); + } + + /** + * Returns a Project object with the given id. + */ + public CompletableFuture> retrieve(String id, ProjectsRetrieveRequest request) { + return retrieve(id, request, null); + } + + /** + * Returns a Project object with the given id. + */ + public CompletableFuture> retrieve( + String id, ProjectsRetrieveRequest request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("accounting/v1/projects") + .addPathSegment(id); + if (request.getIncludeRemoteData().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, + "include_remote_data", + request.getIncludeRemoteData().get().toString(), + false); + } + if (request.getIncludeShellData().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, + "include_shell_data", + request.getIncludeShellData().get().toString(), + false); + } + if (request.getExpand().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "expand", request.getExpand().get().toString(), false); + } + Request.Builder _requestBuilder = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); + Request okhttpRequest = _requestBuilder.build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + CompletableFuture> future = new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + if (response.isSuccessful()) { + future.complete(new MergeApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Project.class), response)); + return; + } + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + future.completeExceptionally(new ApiError( + "Error with status code " + response.code(), + response.code(), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response)); + return; + } catch (IOException e) { + future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new MergeException("Network error executing HTTP request", e)); + } + }); + return future; + } +} diff --git a/src/main/java/com/merge/api/accounting/AsyncRawPurchaseOrdersClient.java b/src/main/java/com/merge/api/accounting/AsyncRawPurchaseOrdersClient.java index 81a725710..e71878aa6 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawPurchaseOrdersClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawPurchaseOrdersClient.java @@ -69,7 +69,7 @@ public CompletableFuture> */ public CompletableFuture>> list( PurchaseOrdersListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/purchase-orders"); if (request.getCompanyId().isPresent()) { @@ -231,7 +231,7 @@ public CompletableFuture> create(Pur */ public CompletableFuture> create( PurchaseOrderEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/purchase-orders"); if (request.getIsDebugMode().isPresent()) { @@ -313,7 +313,7 @@ public CompletableFuture> retrieve( */ public CompletableFuture> retrieve( String id, PurchaseOrdersRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/purchase-orders") .addPathSegment(id); @@ -415,7 +415,7 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { public CompletableFuture>> lineItemsRemoteFieldClassesList( PurchaseOrdersLineItemsRemoteFieldClassesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/purchase-orders/line-items/remote-field-classes"); if (request.getCursor().isPresent()) { @@ -450,6 +450,10 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { request.getIsCommonModelField().get().toString(), false); } + if (request.getIsCustom().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "is_custom", request.getIsCustom().get().toString(), false); + } if (request.getPageSize().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "page_size", request.getPageSize().get().toString(), false); @@ -526,7 +530,7 @@ public CompletableFuture> metaPostRetrieve() * Returns metadata for PurchaseOrder POSTs. */ public CompletableFuture> metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/purchase-orders/meta/post") .build(); @@ -593,7 +597,7 @@ public CompletableFuture>> remoteFieldClassesList( PurchaseOrdersRemoteFieldClassesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/purchase-orders/remote-field-classes"); if (request.getCursor().isPresent()) { @@ -628,6 +632,10 @@ public CompletableFuture> create(RemoteKeyForReg */ public CompletableFuture> create( RemoteKeyForRegenerationRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/regenerate-key") .build(); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawScopesClient.java b/src/main/java/com/merge/api/accounting/AsyncRawScopesClient.java index e0d64be8e..f377e3754 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawScopesClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawScopesClient.java @@ -45,7 +45,7 @@ public CompletableFuture> defaultScope */ public CompletableFuture> defaultScopesRetrieve( RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/default-scopes") .build(); @@ -103,7 +103,7 @@ public CompletableFuture> linkedAccoun */ public CompletableFuture> linkedAccountScopesRetrieve( RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/linked-account-scopes") .build(); @@ -162,7 +162,7 @@ public CompletableFuture> linkedAccoun */ public CompletableFuture> linkedAccountScopesCreate( LinkedAccountCommonModelScopeDeserializerRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/linked-account-scopes") .build(); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawSyncStatusClient.java b/src/main/java/com/merge/api/accounting/AsyncRawSyncStatusClient.java index 04d428b39..34a5aad56 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawSyncStatusClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawSyncStatusClient.java @@ -56,7 +56,7 @@ public CompletableFuture>> l */ public CompletableFuture>> list( SyncStatusListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/sync-status"); if (request.getCursor().isPresent()) { diff --git a/src/main/java/com/merge/api/accounting/AsyncRawTaxRatesClient.java b/src/main/java/com/merge/api/accounting/AsyncRawTaxRatesClient.java index 950c368ab..8b7d1139f 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawTaxRatesClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawTaxRatesClient.java @@ -57,7 +57,7 @@ public CompletableFuture>> list */ public CompletableFuture>> list( TaxRatesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/tax-rates"); if (request.getCompanyId().isPresent()) { @@ -201,7 +201,7 @@ public CompletableFuture> retrieve(String id, TaxR */ public CompletableFuture> retrieve( String id, TaxRatesRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/tax-rates") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawTrackingCategoriesClient.java b/src/main/java/com/merge/api/accounting/AsyncRawTrackingCategoriesClient.java index e9f0a58e8..1d375f71b 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawTrackingCategoriesClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawTrackingCategoriesClient.java @@ -58,7 +58,7 @@ public CompletableFuture>> list( TrackingCategoriesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/tracking-categories"); if (request.getCategoryType().isPresent()) { @@ -221,7 +221,7 @@ public CompletableFuture> retrieve( */ public CompletableFuture> retrieve( String id, TrackingCategoriesRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/tracking-categories") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawTransactionsClient.java b/src/main/java/com/merge/api/accounting/AsyncRawTransactionsClient.java index fe6d274ef..dd14efe02 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawTransactionsClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawTransactionsClient.java @@ -58,7 +58,7 @@ public CompletableFuture>> */ public CompletableFuture>> list( TransactionsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/transactions"); if (request.getCompanyId().isPresent()) { @@ -213,7 +213,7 @@ public CompletableFuture> retrieve( */ public CompletableFuture> retrieve( String id, TransactionsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/transactions") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawVendorCreditsClient.java b/src/main/java/com/merge/api/accounting/AsyncRawVendorCreditsClient.java index 79f9cc3df..02ad8c3c8 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawVendorCreditsClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawVendorCreditsClient.java @@ -65,7 +65,7 @@ public CompletableFuture>> */ public CompletableFuture>> list( VendorCreditsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/vendor-credits"); if (request.getCompanyId().isPresent()) { @@ -212,7 +212,7 @@ public CompletableFuture> create(Vend */ public CompletableFuture> create( VendorCreditEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/vendor-credits"); if (request.getIsDebugMode().isPresent()) { @@ -294,7 +294,7 @@ public CompletableFuture> retrieve( */ public CompletableFuture> retrieve( String id, VendorCreditsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/vendor-credits") .addPathSegment(id); @@ -369,7 +369,7 @@ public CompletableFuture> metaPostRetrieve() * Returns metadata for VendorCredit POSTs. */ public CompletableFuture> metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/vendor-credits/meta/post") .build(); diff --git a/src/main/java/com/merge/api/accounting/AsyncRawWebhookReceiversClient.java b/src/main/java/com/merge/api/accounting/AsyncRawWebhookReceiversClient.java index 60b9561c6..ef00e4e6c 100644 --- a/src/main/java/com/merge/api/accounting/AsyncRawWebhookReceiversClient.java +++ b/src/main/java/com/merge/api/accounting/AsyncRawWebhookReceiversClient.java @@ -46,7 +46,7 @@ public CompletableFuture>> list() { * Returns a list of WebhookReceiver objects. */ public CompletableFuture>> list(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/webhook-receivers") .build(); @@ -105,7 +105,7 @@ public CompletableFuture> create(WebhookRe */ public CompletableFuture> create( WebhookReceiverRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/webhook-receivers") .build(); diff --git a/src/main/java/com/merge/api/accounting/ItemsClient.java b/src/main/java/com/merge/api/accounting/ItemsClient.java index 6a4932ee5..24f1c9a8e 100644 --- a/src/main/java/com/merge/api/accounting/ItemsClient.java +++ b/src/main/java/com/merge/api/accounting/ItemsClient.java @@ -4,8 +4,12 @@ package com.merge.api.accounting; import com.merge.api.accounting.types.Item; +import com.merge.api.accounting.types.ItemEndpointRequest; +import com.merge.api.accounting.types.ItemResponse; import com.merge.api.accounting.types.ItemsListRequest; import com.merge.api.accounting.types.ItemsRetrieveRequest; +import com.merge.api.accounting.types.MetaResponse; +import com.merge.api.accounting.types.PatchedItemEndpointRequest; import com.merge.api.core.ClientOptions; import com.merge.api.core.RequestOptions; import com.merge.api.core.SyncPagingIterable; @@ -48,6 +52,20 @@ public SyncPagingIterable list(ItemsListRequest request, RequestOptions re return this.rawClient.list(request, requestOptions).body(); } + /** + * Creates an Item object with the given values. + */ + public ItemResponse create(ItemEndpointRequest request) { + return this.rawClient.create(request).body(); + } + + /** + * Creates an Item object with the given values. + */ + public ItemResponse create(ItemEndpointRequest request, RequestOptions requestOptions) { + return this.rawClient.create(request, requestOptions).body(); + } + /** * Returns an Item object with the given id. */ @@ -68,4 +86,46 @@ public Item retrieve(String id, ItemsRetrieveRequest request) { public Item retrieve(String id, ItemsRetrieveRequest request, RequestOptions requestOptions) { return this.rawClient.retrieve(id, request, requestOptions).body(); } + + /** + * Updates an Item object with the given id. + */ + public ItemResponse partialUpdate(String id, PatchedItemEndpointRequest request) { + return this.rawClient.partialUpdate(id, request).body(); + } + + /** + * Updates an Item object with the given id. + */ + public ItemResponse partialUpdate(String id, PatchedItemEndpointRequest request, RequestOptions requestOptions) { + return this.rawClient.partialUpdate(id, request, requestOptions).body(); + } + + /** + * Returns metadata for Item PATCHs. + */ + public MetaResponse metaPatchRetrieve(String id) { + return this.rawClient.metaPatchRetrieve(id).body(); + } + + /** + * Returns metadata for Item PATCHs. + */ + public MetaResponse metaPatchRetrieve(String id, RequestOptions requestOptions) { + return this.rawClient.metaPatchRetrieve(id, requestOptions).body(); + } + + /** + * Returns metadata for Item POSTs. + */ + public MetaResponse metaPostRetrieve() { + return this.rawClient.metaPostRetrieve().body(); + } + + /** + * Returns metadata for Item POSTs. + */ + public MetaResponse metaPostRetrieve(RequestOptions requestOptions) { + return this.rawClient.metaPostRetrieve(requestOptions).body(); + } } diff --git a/src/main/java/com/merge/api/accounting/ProjectsClient.java b/src/main/java/com/merge/api/accounting/ProjectsClient.java new file mode 100644 index 000000000..ca971d1cb --- /dev/null +++ b/src/main/java/com/merge/api/accounting/ProjectsClient.java @@ -0,0 +1,71 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting; + +import com.merge.api.accounting.types.PaginatedProjectList; +import com.merge.api.accounting.types.Project; +import com.merge.api.accounting.types.ProjectsListRequest; +import com.merge.api.accounting.types.ProjectsRetrieveRequest; +import com.merge.api.core.ClientOptions; +import com.merge.api.core.RequestOptions; + +public class ProjectsClient { + protected final ClientOptions clientOptions; + + private final RawProjectsClient rawClient; + + public ProjectsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.rawClient = new RawProjectsClient(clientOptions); + } + + /** + * Get responses with HTTP metadata like headers + */ + public RawProjectsClient withRawResponse() { + return this.rawClient; + } + + /** + * Returns a list of Project objects. + */ + public PaginatedProjectList list() { + return this.rawClient.list().body(); + } + + /** + * Returns a list of Project objects. + */ + public PaginatedProjectList list(ProjectsListRequest request) { + return this.rawClient.list(request).body(); + } + + /** + * Returns a list of Project objects. + */ + public PaginatedProjectList list(ProjectsListRequest request, RequestOptions requestOptions) { + return this.rawClient.list(request, requestOptions).body(); + } + + /** + * Returns a Project object with the given id. + */ + public Project retrieve(String id) { + return this.rawClient.retrieve(id).body(); + } + + /** + * Returns a Project object with the given id. + */ + public Project retrieve(String id, ProjectsRetrieveRequest request) { + return this.rawClient.retrieve(id, request).body(); + } + + /** + * Returns a Project object with the given id. + */ + public Project retrieve(String id, ProjectsRetrieveRequest request, RequestOptions requestOptions) { + return this.rawClient.retrieve(id, request, requestOptions).body(); + } +} diff --git a/src/main/java/com/merge/api/accounting/RawAccountDetailsClient.java b/src/main/java/com/merge/api/accounting/RawAccountDetailsClient.java index a4c6ff05c..992300359 100644 --- a/src/main/java/com/merge/api/accounting/RawAccountDetailsClient.java +++ b/src/main/java/com/merge/api/accounting/RawAccountDetailsClient.java @@ -36,7 +36,7 @@ public MergeApiHttpResponse retrieve() { * Get details for a linked account. */ public MergeApiHttpResponse retrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/account-details") .build(); diff --git a/src/main/java/com/merge/api/accounting/RawAccountTokenClient.java b/src/main/java/com/merge/api/accounting/RawAccountTokenClient.java index 909d1cea7..c2d70efe9 100644 --- a/src/main/java/com/merge/api/accounting/RawAccountTokenClient.java +++ b/src/main/java/com/merge/api/accounting/RawAccountTokenClient.java @@ -36,7 +36,7 @@ public MergeApiHttpResponse retrieve(String publicToken) { * Returns the account token for the end user with the provided public token. */ public MergeApiHttpResponse retrieve(String publicToken, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/account-token") .addPathSegment(publicToken) diff --git a/src/main/java/com/merge/api/accounting/RawAccountingPeriodsClient.java b/src/main/java/com/merge/api/accounting/RawAccountingPeriodsClient.java index 8a4cd3026..cb595b761 100644 --- a/src/main/java/com/merge/api/accounting/RawAccountingPeriodsClient.java +++ b/src/main/java/com/merge/api/accounting/RawAccountingPeriodsClient.java @@ -52,7 +52,7 @@ public MergeApiHttpResponse> list(Accountin */ public MergeApiHttpResponse> list( AccountingPeriodsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/accounting-periods"); if (request.getCursor().isPresent()) { @@ -142,7 +142,7 @@ public MergeApiHttpResponse retrieve(String id, AccountingPeri */ public MergeApiHttpResponse retrieve( String id, AccountingPeriodsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/accounting-periods") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/accounting/RawAccountsClient.java b/src/main/java/com/merge/api/accounting/RawAccountsClient.java index cf8a66304..00f7847ba 100644 --- a/src/main/java/com/merge/api/accounting/RawAccountsClient.java +++ b/src/main/java/com/merge/api/accounting/RawAccountsClient.java @@ -59,13 +59,17 @@ public MergeApiHttpResponse> list(AccountsListReques */ public MergeApiHttpResponse> list( AccountsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/accounts"); if (request.getAccountType().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "account_type", request.getAccountType().get(), false); } + if (request.getClassification().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "classification", request.getClassification().get(), false); + } if (request.getCompanyId().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "company_id", request.getCompanyId().get(), false); @@ -195,7 +199,7 @@ public MergeApiHttpResponse create(AccountEndpointRequest reque * Creates an Account object with the given values. */ public MergeApiHttpResponse create(AccountEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/accounts"); if (request.getIsDebugMode().isPresent()) { @@ -262,7 +266,7 @@ public MergeApiHttpResponse retrieve(String id, AccountsRetrieveRequest */ public MergeApiHttpResponse retrieve( String id, AccountsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/accounts") .addPathSegment(id); @@ -334,7 +338,7 @@ public MergeApiHttpResponse metaPostRetrieve() { * Returns metadata for Account POSTs. */ public MergeApiHttpResponse metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/accounts/meta/post") .build(); diff --git a/src/main/java/com/merge/api/accounting/RawAddressesClient.java b/src/main/java/com/merge/api/accounting/RawAddressesClient.java index fc5a2ae6e..d65ef05f5 100644 --- a/src/main/java/com/merge/api/accounting/RawAddressesClient.java +++ b/src/main/java/com/merge/api/accounting/RawAddressesClient.java @@ -46,7 +46,7 @@ public MergeApiHttpResponse
retrieve(String id, AddressesRetrieveReques */ public MergeApiHttpResponse
retrieve( String id, AddressesRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/addresses") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/accounting/RawAsyncPassthroughClient.java b/src/main/java/com/merge/api/accounting/RawAsyncPassthroughClient.java index cb6746b32..7dfc4ead2 100644 --- a/src/main/java/com/merge/api/accounting/RawAsyncPassthroughClient.java +++ b/src/main/java/com/merge/api/accounting/RawAsyncPassthroughClient.java @@ -42,7 +42,7 @@ public MergeApiHttpResponse create(DataPassthroughReque */ public MergeApiHttpResponse create( DataPassthroughRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/async-passthrough") .build(); @@ -94,7 +94,7 @@ public MergeApiHttpResponse retrieve(String as */ public MergeApiHttpResponse retrieve( String asyncPassthroughReceiptId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/async-passthrough") .addPathSegment(asyncPassthroughReceiptId) diff --git a/src/main/java/com/merge/api/accounting/RawAsyncTasksClient.java b/src/main/java/com/merge/api/accounting/RawAsyncTasksClient.java index 7e9e0ebaf..d52f67845 100644 --- a/src/main/java/com/merge/api/accounting/RawAsyncTasksClient.java +++ b/src/main/java/com/merge/api/accounting/RawAsyncTasksClient.java @@ -36,7 +36,7 @@ public MergeApiHttpResponse retrieve(String id) { * Returns an AsyncPostTask object with the given id. */ public MergeApiHttpResponse retrieve(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/async-tasks") .addPathSegment(id) diff --git a/src/main/java/com/merge/api/accounting/RawAttachmentsClient.java b/src/main/java/com/merge/api/accounting/RawAttachmentsClient.java index 55ddff610..f926f46e9 100644 --- a/src/main/java/com/merge/api/accounting/RawAttachmentsClient.java +++ b/src/main/java/com/merge/api/accounting/RawAttachmentsClient.java @@ -59,7 +59,7 @@ public MergeApiHttpResponse> list(Attac */ public MergeApiHttpResponse> list( AttachmentsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/attachments"); if (request.getCompanyId().isPresent()) { @@ -169,7 +169,7 @@ public MergeApiHttpResponse create(AccountingAttac */ public MergeApiHttpResponse create( AccountingAttachmentEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/attachments"); if (request.getIsDebugMode().isPresent()) { @@ -237,7 +237,7 @@ public MergeApiHttpResponse retrieve(String id, Attachment */ public MergeApiHttpResponse retrieve( String id, AttachmentsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/attachments") .addPathSegment(id); @@ -295,7 +295,7 @@ public MergeApiHttpResponse metaPostRetrieve() { * Returns metadata for AccountingAttachment POSTs. */ public MergeApiHttpResponse metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/attachments/meta/post") .build(); diff --git a/src/main/java/com/merge/api/accounting/RawAuditTrailClient.java b/src/main/java/com/merge/api/accounting/RawAuditTrailClient.java index a2a311d77..e1034ebca 100644 --- a/src/main/java/com/merge/api/accounting/RawAuditTrailClient.java +++ b/src/main/java/com/merge/api/accounting/RawAuditTrailClient.java @@ -51,7 +51,7 @@ public MergeApiHttpResponse> list(AuditTrailLi */ public MergeApiHttpResponse> list( AuditTrailListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/audit-trail"); if (request.getCursor().isPresent()) { diff --git a/src/main/java/com/merge/api/accounting/RawAvailableActionsClient.java b/src/main/java/com/merge/api/accounting/RawAvailableActionsClient.java index f457432e2..2133efac4 100644 --- a/src/main/java/com/merge/api/accounting/RawAvailableActionsClient.java +++ b/src/main/java/com/merge/api/accounting/RawAvailableActionsClient.java @@ -36,7 +36,7 @@ public MergeApiHttpResponse retrieve() { * Returns a list of models and actions available for an account. */ public MergeApiHttpResponse retrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/available-actions") .build(); diff --git a/src/main/java/com/merge/api/accounting/RawBalanceSheetsClient.java b/src/main/java/com/merge/api/accounting/RawBalanceSheetsClient.java index 04531e6f0..a9ba86bd7 100644 --- a/src/main/java/com/merge/api/accounting/RawBalanceSheetsClient.java +++ b/src/main/java/com/merge/api/accounting/RawBalanceSheetsClient.java @@ -52,7 +52,7 @@ public MergeApiHttpResponse> list(BalanceSheets */ public MergeApiHttpResponse> list( BalanceSheetsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/balance-sheets"); if (request.getCompanyId().isPresent()) { @@ -173,7 +173,7 @@ public MergeApiHttpResponse retrieve(String id, BalanceSheetsRetri */ public MergeApiHttpResponse retrieve( String id, BalanceSheetsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/balance-sheets") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/accounting/RawBankFeedAccountsClient.java b/src/main/java/com/merge/api/accounting/RawBankFeedAccountsClient.java index 05a859b81..7de54ea9d 100644 --- a/src/main/java/com/merge/api/accounting/RawBankFeedAccountsClient.java +++ b/src/main/java/com/merge/api/accounting/RawBankFeedAccountsClient.java @@ -59,7 +59,7 @@ public MergeApiHttpResponse> list(BankFeedAc */ public MergeApiHttpResponse> list( BankFeedAccountsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/bank-feed-accounts"); if (request.getCursor().isPresent()) { @@ -142,7 +142,7 @@ public MergeApiHttpResponse create(BankFeedAccountEndpo */ public MergeApiHttpResponse create( BankFeedAccountEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/bank-feed-accounts"); if (request.getIsDebugMode().isPresent()) { @@ -210,7 +210,7 @@ public MergeApiHttpResponse retrieve(String id, BankFeedAccount */ public MergeApiHttpResponse retrieve( String id, BankFeedAccountsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/bank-feed-accounts") .addPathSegment(id); @@ -267,7 +267,7 @@ public MergeApiHttpResponse metaPostRetrieve() { * Returns metadata for BankFeedAccount POSTs. */ public MergeApiHttpResponse metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/bank-feed-accounts/meta/post") .build(); diff --git a/src/main/java/com/merge/api/accounting/RawBankFeedTransactionsClient.java b/src/main/java/com/merge/api/accounting/RawBankFeedTransactionsClient.java index 7c38a104d..af00b845e 100644 --- a/src/main/java/com/merge/api/accounting/RawBankFeedTransactionsClient.java +++ b/src/main/java/com/merge/api/accounting/RawBankFeedTransactionsClient.java @@ -59,7 +59,7 @@ public MergeApiHttpResponse> list(BankFe */ public MergeApiHttpResponse> list( BankFeedTransactionsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/bank-feed-transactions"); if (request.getCreatedAfter().isPresent()) { @@ -173,7 +173,7 @@ public MergeApiHttpResponse create(BankFeedTransact */ public MergeApiHttpResponse create( BankFeedTransactionEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/bank-feed-transactions"); if (request.getIsDebugMode().isPresent()) { @@ -241,7 +241,7 @@ public MergeApiHttpResponse retrieve(String id, BankFeedTra */ public MergeApiHttpResponse retrieve( String id, BankFeedTransactionsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/bank-feed-transactions") .addPathSegment(id); @@ -303,7 +303,7 @@ public MergeApiHttpResponse metaPostRetrieve() { * Returns metadata for BankFeedTransaction POSTs. */ public MergeApiHttpResponse metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/bank-feed-transactions/meta/post") .build(); diff --git a/src/main/java/com/merge/api/accounting/RawCashFlowStatementsClient.java b/src/main/java/com/merge/api/accounting/RawCashFlowStatementsClient.java index f1ef721ea..4fb519187 100644 --- a/src/main/java/com/merge/api/accounting/RawCashFlowStatementsClient.java +++ b/src/main/java/com/merge/api/accounting/RawCashFlowStatementsClient.java @@ -52,7 +52,7 @@ public MergeApiHttpResponse> list(CashFlow */ public MergeApiHttpResponse> list( CashFlowStatementsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/cash-flow-statements"); if (request.getCompanyId().isPresent()) { @@ -173,7 +173,7 @@ public MergeApiHttpResponse retrieve(String id, CashFlowState */ public MergeApiHttpResponse retrieve( String id, CashFlowStatementsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/cash-flow-statements") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/accounting/RawCompanyInfoClient.java b/src/main/java/com/merge/api/accounting/RawCompanyInfoClient.java index bc583a1b5..9d4deb0c9 100644 --- a/src/main/java/com/merge/api/accounting/RawCompanyInfoClient.java +++ b/src/main/java/com/merge/api/accounting/RawCompanyInfoClient.java @@ -52,7 +52,7 @@ public MergeApiHttpResponse> list(CompanyInfoLis */ public MergeApiHttpResponse> list( CompanyInfoListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/company-info"); if (request.getCreatedAfter().isPresent()) { @@ -169,7 +169,7 @@ public MergeApiHttpResponse retrieve(String id, CompanyInfoRetrieve */ public MergeApiHttpResponse retrieve( String id, CompanyInfoRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/company-info") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/accounting/RawContactsClient.java b/src/main/java/com/merge/api/accounting/RawContactsClient.java index 9bcd5b19d..7a83810e8 100644 --- a/src/main/java/com/merge/api/accounting/RawContactsClient.java +++ b/src/main/java/com/merge/api/accounting/RawContactsClient.java @@ -62,7 +62,7 @@ public MergeApiHttpResponse> list(ContactsListReques */ public MergeApiHttpResponse> list( ContactsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/contacts"); if (request.getCompanyId().isPresent()) { @@ -210,7 +210,7 @@ public MergeApiHttpResponse create(ContactEndpointRequest reque * Creates a Contact object with the given values. */ public MergeApiHttpResponse create(ContactEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/contacts"); if (request.getIsDebugMode().isPresent()) { @@ -277,7 +277,7 @@ public MergeApiHttpResponse retrieve(String id, ContactsRetrieveRequest */ public MergeApiHttpResponse retrieve( String id, ContactsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/contacts") .addPathSegment(id); @@ -353,7 +353,7 @@ public MergeApiHttpResponse metaPostRetrieve() { * Returns metadata for Contact POSTs. */ public MergeApiHttpResponse metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/contacts/meta/post") .build(); @@ -406,7 +406,7 @@ public MergeApiHttpResponse> remoteFieldCla */ public MergeApiHttpResponse> remoteFieldClassesList( ContactsRemoteFieldClassesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/contacts/remote-field-classes"); if (request.getCursor().isPresent()) { @@ -441,6 +441,10 @@ public MergeApiHttpResponse> remoteFieldCla request.getIsCommonModelField().get().toString(), false); } + if (request.getIsCustom().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "is_custom", request.getIsCustom().get().toString(), false); + } if (request.getPageSize().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "page_size", request.getPageSize().get().toString(), false); diff --git a/src/main/java/com/merge/api/accounting/RawCreditNotesClient.java b/src/main/java/com/merge/api/accounting/RawCreditNotesClient.java index 12e458f1d..c70e8bc6e 100644 --- a/src/main/java/com/merge/api/accounting/RawCreditNotesClient.java +++ b/src/main/java/com/merge/api/accounting/RawCreditNotesClient.java @@ -59,7 +59,7 @@ public MergeApiHttpResponse> list(CreditNotesList */ public MergeApiHttpResponse> list( CreditNotesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/credit-notes"); if (request.getCompanyId().isPresent()) { @@ -198,7 +198,7 @@ public MergeApiHttpResponse create(CreditNoteEndpointRequest */ public MergeApiHttpResponse create( CreditNoteEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/credit-notes"); if (request.getIsDebugMode().isPresent()) { @@ -265,7 +265,7 @@ public MergeApiHttpResponse retrieve(String id, CreditNotesRetrieveR */ public MergeApiHttpResponse retrieve( String id, CreditNotesRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/credit-notes") .addPathSegment(id); @@ -337,7 +337,7 @@ public MergeApiHttpResponse metaPostRetrieve() { * Returns metadata for CreditNote POSTs. */ public MergeApiHttpResponse metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/credit-notes/meta/post") .build(); diff --git a/src/main/java/com/merge/api/accounting/RawDeleteAccountClient.java b/src/main/java/com/merge/api/accounting/RawDeleteAccountClient.java index df1f7cec3..79cd314e5 100644 --- a/src/main/java/com/merge/api/accounting/RawDeleteAccountClient.java +++ b/src/main/java/com/merge/api/accounting/RawDeleteAccountClient.java @@ -36,7 +36,7 @@ public MergeApiHttpResponse delete() { * Delete a linked account. */ public MergeApiHttpResponse delete(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/delete-account") .build(); diff --git a/src/main/java/com/merge/api/accounting/RawEmployeesClient.java b/src/main/java/com/merge/api/accounting/RawEmployeesClient.java index 4ab176487..43b908cea 100644 --- a/src/main/java/com/merge/api/accounting/RawEmployeesClient.java +++ b/src/main/java/com/merge/api/accounting/RawEmployeesClient.java @@ -52,7 +52,7 @@ public MergeApiHttpResponse> list(EmployeesListRequ */ public MergeApiHttpResponse> list( EmployeesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/employees"); if (request.getCursor().isPresent()) { @@ -146,7 +146,7 @@ public MergeApiHttpResponse retrieve(String id, EmployeesRetrieveReque */ public MergeApiHttpResponse retrieve( String id, EmployeesRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/employees") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/accounting/RawExpensesClient.java b/src/main/java/com/merge/api/accounting/RawExpensesClient.java index 33eb5d797..596a9ae6f 100644 --- a/src/main/java/com/merge/api/accounting/RawExpensesClient.java +++ b/src/main/java/com/merge/api/accounting/RawExpensesClient.java @@ -63,7 +63,7 @@ public MergeApiHttpResponse> list(ExpensesListReques */ public MergeApiHttpResponse> list( ExpensesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/expenses"); if (request.getCompanyId().isPresent()) { @@ -197,7 +197,7 @@ public MergeApiHttpResponse create(ExpenseEndpointRequest reque * Creates an Expense object with the given values. */ public MergeApiHttpResponse create(ExpenseEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/expenses"); if (request.getIsDebugMode().isPresent()) { @@ -264,7 +264,7 @@ public MergeApiHttpResponse retrieve(String id, ExpensesRetrieveRequest */ public MergeApiHttpResponse retrieve( String id, ExpensesRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/expenses") .addPathSegment(id); @@ -342,7 +342,7 @@ public MergeApiHttpResponse> linesRemoteFie */ public MergeApiHttpResponse> linesRemoteFieldClassesList( ExpensesLinesRemoteFieldClassesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/expenses/lines/remote-field-classes"); if (request.getCursor().isPresent()) { @@ -377,6 +377,10 @@ public MergeApiHttpResponse> linesRemoteFie request.getIsCommonModelField().get().toString(), false); } + if (request.getIsCustom().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "is_custom", request.getIsCustom().get().toString(), false); + } if (request.getPageSize().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "page_size", request.getPageSize().get().toString(), false); @@ -433,7 +437,7 @@ public MergeApiHttpResponse metaPostRetrieve() { * Returns metadata for Expense POSTs. */ public MergeApiHttpResponse metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/expenses/meta/post") .build(); @@ -486,7 +490,7 @@ public MergeApiHttpResponse> remoteFieldCla */ public MergeApiHttpResponse> remoteFieldClassesList( ExpensesRemoteFieldClassesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/expenses/remote-field-classes"); if (request.getCursor().isPresent()) { @@ -521,6 +525,10 @@ public MergeApiHttpResponse> remoteFieldCla request.getIsCommonModelField().get().toString(), false); } + if (request.getIsCustom().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "is_custom", request.getIsCustom().get().toString(), false); + } if (request.getPageSize().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "page_size", request.getPageSize().get().toString(), false); diff --git a/src/main/java/com/merge/api/accounting/RawFieldMappingClient.java b/src/main/java/com/merge/api/accounting/RawFieldMappingClient.java index 8885127c9..a609c41fb 100644 --- a/src/main/java/com/merge/api/accounting/RawFieldMappingClient.java +++ b/src/main/java/com/merge/api/accounting/RawFieldMappingClient.java @@ -58,7 +58,7 @@ public MergeApiHttpResponse fieldMappingsRetrie */ public MergeApiHttpResponse fieldMappingsRetrieve( FieldMappingsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/field-mappings"); if (request.getExcludeRemoteFieldMetadata().isPresent()) { @@ -110,7 +110,7 @@ public MergeApiHttpResponse fieldMappingsCreate(Cr */ public MergeApiHttpResponse fieldMappingsCreate( CreateFieldMappingRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/field-mappings"); if (request.getExcludeRemoteFieldMetadata().isPresent()) { @@ -175,7 +175,7 @@ public MergeApiHttpResponse fieldMappingsDestroy(S */ public MergeApiHttpResponse fieldMappingsDestroy( String fieldMappingId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/field-mappings") .addPathSegment(fieldMappingId) @@ -230,7 +230,7 @@ public MergeApiHttpResponse fieldMappingsPartialUp */ public MergeApiHttpResponse fieldMappingsPartialUpdate( String fieldMappingId, PatchedEditFieldMappingRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/field-mappings") .addPathSegment(fieldMappingId) @@ -290,7 +290,7 @@ public MergeApiHttpResponse remoteFieldsRetrieve(RemoteF */ public MergeApiHttpResponse remoteFieldsRetrieve( RemoteFieldsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/remote-fields"); if (request.getCommonModels().isPresent()) { @@ -344,7 +344,7 @@ public MergeApiHttpResponse targetFieldsRetrieve * 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. */ public MergeApiHttpResponse targetFieldsRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/target-fields") .build(); diff --git a/src/main/java/com/merge/api/accounting/RawForceResyncClient.java b/src/main/java/com/merge/api/accounting/RawForceResyncClient.java index 88e62c45a..ed6f32f0d 100644 --- a/src/main/java/com/merge/api/accounting/RawForceResyncClient.java +++ b/src/main/java/com/merge/api/accounting/RawForceResyncClient.java @@ -39,7 +39,7 @@ public MergeApiHttpResponse> syncStatusResyncCreate() { * 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. */ public MergeApiHttpResponse> syncStatusResyncCreate(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/sync-status/resync") .build(); diff --git a/src/main/java/com/merge/api/accounting/RawGeneralLedgerTransactionsClient.java b/src/main/java/com/merge/api/accounting/RawGeneralLedgerTransactionsClient.java index c7be5b569..bfcc2c965 100644 --- a/src/main/java/com/merge/api/accounting/RawGeneralLedgerTransactionsClient.java +++ b/src/main/java/com/merge/api/accounting/RawGeneralLedgerTransactionsClient.java @@ -53,7 +53,7 @@ public MergeApiHttpResponse> list( */ public MergeApiHttpResponse> list( GeneralLedgerTransactionsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/general-ledger-transactions"); if (request.getCompanyId().isPresent()) { @@ -190,7 +190,7 @@ public MergeApiHttpResponse retrieve( */ public MergeApiHttpResponse retrieve( String id, GeneralLedgerTransactionsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/general-ledger-transactions") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/accounting/RawGenerateKeyClient.java b/src/main/java/com/merge/api/accounting/RawGenerateKeyClient.java index bad73a717..badbd11f9 100644 --- a/src/main/java/com/merge/api/accounting/RawGenerateKeyClient.java +++ b/src/main/java/com/merge/api/accounting/RawGenerateKeyClient.java @@ -40,7 +40,7 @@ public MergeApiHttpResponse create(GenerateRemoteKeyRequest request) * Create a remote key. */ public MergeApiHttpResponse create(GenerateRemoteKeyRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/generate-key") .build(); diff --git a/src/main/java/com/merge/api/accounting/RawIncomeStatementsClient.java b/src/main/java/com/merge/api/accounting/RawIncomeStatementsClient.java index 250af98f9..1eecf9006 100644 --- a/src/main/java/com/merge/api/accounting/RawIncomeStatementsClient.java +++ b/src/main/java/com/merge/api/accounting/RawIncomeStatementsClient.java @@ -52,7 +52,7 @@ public MergeApiHttpResponse> list(IncomeStat */ public MergeApiHttpResponse> list( IncomeStatementsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/income-statements"); if (request.getCompanyId().isPresent()) { @@ -173,7 +173,7 @@ public MergeApiHttpResponse retrieve(String id, IncomeStatement */ public MergeApiHttpResponse retrieve( String id, IncomeStatementsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/income-statements") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/accounting/RawInvoicesClient.java b/src/main/java/com/merge/api/accounting/RawInvoicesClient.java index 9d988258c..fb94301cf 100644 --- a/src/main/java/com/merge/api/accounting/RawInvoicesClient.java +++ b/src/main/java/com/merge/api/accounting/RawInvoicesClient.java @@ -64,7 +64,7 @@ public MergeApiHttpResponse> list(InvoicesListReques */ public MergeApiHttpResponse> list( InvoicesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/invoices"); if (request.getCompanyId().isPresent()) { @@ -224,7 +224,7 @@ public MergeApiHttpResponse create(InvoiceEndpointRequest reque * Including a PurchaseOrder id in the purchase_orders property will generate an Accounts Payable Invoice from the specified Purchase Order(s). */ public MergeApiHttpResponse create(InvoiceEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/invoices"); if (request.getIsDebugMode().isPresent()) { @@ -291,7 +291,7 @@ public MergeApiHttpResponse retrieve(String id, InvoicesRetrieveRequest */ public MergeApiHttpResponse retrieve( String id, InvoicesRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/invoices") .addPathSegment(id); @@ -368,7 +368,7 @@ public MergeApiHttpResponse partialUpdate(String id, PatchedInv */ public MergeApiHttpResponse partialUpdate( String id, PatchedInvoiceEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/invoices") .addPathSegment(id); @@ -438,7 +438,7 @@ public MergeApiHttpResponse> lineItemsRemot */ public MergeApiHttpResponse> lineItemsRemoteFieldClassesList( InvoicesLineItemsRemoteFieldClassesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/invoices/line-items/remote-field-classes"); if (request.getCursor().isPresent()) { @@ -473,6 +473,10 @@ public MergeApiHttpResponse> lineItemsRemot request.getIsCommonModelField().get().toString(), false); } + if (request.getIsCustom().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "is_custom", request.getIsCustom().get().toString(), false); + } if (request.getPageSize().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "page_size", request.getPageSize().get().toString(), false); @@ -529,7 +533,7 @@ public MergeApiHttpResponse metaPatchRetrieve(String id) { * Returns metadata for Invoice PATCHs. */ public MergeApiHttpResponse metaPatchRetrieve(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/invoices/meta/patch") .addPathSegment(id) @@ -573,7 +577,7 @@ public MergeApiHttpResponse metaPostRetrieve() { * Returns metadata for Invoice POSTs. */ public MergeApiHttpResponse metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/invoices/meta/post") .build(); @@ -626,7 +630,7 @@ public MergeApiHttpResponse> remoteFieldCla */ public MergeApiHttpResponse> remoteFieldClassesList( InvoicesRemoteFieldClassesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/invoices/remote-field-classes"); if (request.getCursor().isPresent()) { @@ -661,6 +665,10 @@ public MergeApiHttpResponse> remoteFieldCla request.getIsCommonModelField().get().toString(), false); } + if (request.getIsCustom().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "is_custom", request.getIsCustom().get().toString(), false); + } if (request.getPageSize().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "page_size", request.getPageSize().get().toString(), false); diff --git a/src/main/java/com/merge/api/accounting/RawIssuesClient.java b/src/main/java/com/merge/api/accounting/RawIssuesClient.java index 2f7c99854..beaaa3b5a 100644 --- a/src/main/java/com/merge/api/accounting/RawIssuesClient.java +++ b/src/main/java/com/merge/api/accounting/RawIssuesClient.java @@ -51,7 +51,7 @@ public MergeApiHttpResponse> list(IssuesListRequest re */ public MergeApiHttpResponse> list( IssuesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/issues"); if (request.getAccountToken().isPresent()) { @@ -175,7 +175,7 @@ public MergeApiHttpResponse retrieve(String id) { * Get a specific issue. */ public MergeApiHttpResponse retrieve(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/issues") .addPathSegment(id) diff --git a/src/main/java/com/merge/api/accounting/RawItemsClient.java b/src/main/java/com/merge/api/accounting/RawItemsClient.java index a1f0c77c8..fcf5059b3 100644 --- a/src/main/java/com/merge/api/accounting/RawItemsClient.java +++ b/src/main/java/com/merge/api/accounting/RawItemsClient.java @@ -4,11 +4,16 @@ package com.merge.api.accounting; import com.merge.api.accounting.types.Item; +import com.merge.api.accounting.types.ItemEndpointRequest; +import com.merge.api.accounting.types.ItemResponse; import com.merge.api.accounting.types.ItemsListRequest; import com.merge.api.accounting.types.ItemsRetrieveRequest; +import com.merge.api.accounting.types.MetaResponse; import com.merge.api.accounting.types.PaginatedItemList; +import com.merge.api.accounting.types.PatchedItemEndpointRequest; import com.merge.api.core.ApiError; import com.merge.api.core.ClientOptions; +import com.merge.api.core.MediaTypes; import com.merge.api.core.MergeApiHttpResponse; import com.merge.api.core.MergeException; import com.merge.api.core.ObjectMappers; @@ -17,12 +22,15 @@ import com.merge.api.core.SyncPagingIterable; import java.io.IOException; import java.util.Collections; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Optional; import okhttp3.Headers; import okhttp3.HttpUrl; import okhttp3.OkHttpClient; import okhttp3.Request; +import okhttp3.RequestBody; import okhttp3.Response; import okhttp3.ResponseBody; @@ -52,7 +60,7 @@ public MergeApiHttpResponse> list(ItemsListRequest requ */ public MergeApiHttpResponse> list( ItemsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/items"); if (request.getCompanyId().isPresent()) { @@ -162,6 +170,65 @@ public MergeApiHttpResponse> list( } } + /** + * Creates an Item object with the given values. + */ + public MergeApiHttpResponse create(ItemEndpointRequest request) { + return create(request, null); + } + + /** + * Creates an Item object with the given values. + */ + public MergeApiHttpResponse create(ItemEndpointRequest request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("accounting/v1/items"); + if (request.getIsDebugMode().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "is_debug_mode", request.getIsDebugMode().get().toString(), false); + } + if (request.getRunAsync().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "run_async", request.getRunAsync().get().toString(), false); + } + Map properties = new HashMap<>(); + properties.put("model", request.getModel()); + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + } catch (Exception e) { + throw new RuntimeException(e); + } + Request.Builder _requestBuilder = new Request.Builder() + .url(httpUrl.build()) + .method("POST", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); + Request okhttpRequest = _requestBuilder.build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + if (response.isSuccessful()) { + return new MergeApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), ItemResponse.class), response); + } + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + throw new ApiError( + "Error with status code " + response.code(), + response.code(), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response); + } catch (IOException e) { + throw new MergeException("Network error executing HTTP request", e); + } + } + /** * Returns an Item object with the given id. */ @@ -180,7 +247,7 @@ public MergeApiHttpResponse retrieve(String id, ItemsRetrieveRequest reque * Returns an Item object with the given id. */ public MergeApiHttpResponse retrieve(String id, ItemsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/items") .addPathSegment(id); @@ -237,4 +304,152 @@ public MergeApiHttpResponse retrieve(String id, ItemsRetrieveRequest reque throw new MergeException("Network error executing HTTP request", e); } } + + /** + * Updates an Item object with the given id. + */ + public MergeApiHttpResponse partialUpdate(String id, PatchedItemEndpointRequest request) { + return partialUpdate(id, request, null); + } + + /** + * Updates an Item object with the given id. + */ + public MergeApiHttpResponse partialUpdate( + String id, PatchedItemEndpointRequest request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("accounting/v1/items") + .addPathSegment(id); + if (request.getIsDebugMode().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "is_debug_mode", request.getIsDebugMode().get().toString(), false); + } + if (request.getRunAsync().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "run_async", request.getRunAsync().get().toString(), false); + } + Map properties = new HashMap<>(); + properties.put("model", request.getModel()); + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(properties), MediaTypes.APPLICATION_JSON); + } catch (Exception e) { + throw new RuntimeException(e); + } + Request.Builder _requestBuilder = new Request.Builder() + .url(httpUrl.build()) + .method("PATCH", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); + Request okhttpRequest = _requestBuilder.build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + if (response.isSuccessful()) { + return new MergeApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), ItemResponse.class), response); + } + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + throw new ApiError( + "Error with status code " + response.code(), + response.code(), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response); + } catch (IOException e) { + throw new MergeException("Network error executing HTTP request", e); + } + } + + /** + * Returns metadata for Item PATCHs. + */ + public MergeApiHttpResponse metaPatchRetrieve(String id) { + return metaPatchRetrieve(id, null); + } + + /** + * Returns metadata for Item PATCHs. + */ + public MergeApiHttpResponse metaPatchRetrieve(String id, RequestOptions requestOptions) { + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("accounting/v1/items/meta/patch") + .addPathSegment(id) + .build(); + Request okhttpRequest = new Request.Builder() + .url(httpUrl) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + if (response.isSuccessful()) { + return new MergeApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), response); + } + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + throw new ApiError( + "Error with status code " + response.code(), + response.code(), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response); + } catch (IOException e) { + throw new MergeException("Network error executing HTTP request", e); + } + } + + /** + * Returns metadata for Item POSTs. + */ + public MergeApiHttpResponse metaPostRetrieve() { + return metaPostRetrieve(null); + } + + /** + * Returns metadata for Item POSTs. + */ + public MergeApiHttpResponse metaPostRetrieve(RequestOptions requestOptions) { + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("accounting/v1/items/meta/post") + .build(); + Request okhttpRequest = new Request.Builder() + .url(httpUrl) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + if (response.isSuccessful()) { + return new MergeApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), MetaResponse.class), response); + } + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + throw new ApiError( + "Error with status code " + response.code(), + response.code(), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response); + } catch (IOException e) { + throw new MergeException("Network error executing HTTP request", e); + } + } } diff --git a/src/main/java/com/merge/api/accounting/RawJournalEntriesClient.java b/src/main/java/com/merge/api/accounting/RawJournalEntriesClient.java index c46072cf2..b33f99b3e 100644 --- a/src/main/java/com/merge/api/accounting/RawJournalEntriesClient.java +++ b/src/main/java/com/merge/api/accounting/RawJournalEntriesClient.java @@ -63,7 +63,7 @@ public MergeApiHttpResponse> list(JournalEntrie */ public MergeApiHttpResponse> list( JournalEntriesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/journal-entries"); if (request.getCompanyId().isPresent()) { @@ -198,7 +198,7 @@ public MergeApiHttpResponse create(JournalEntryEndpointReq */ public MergeApiHttpResponse create( JournalEntryEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/journal-entries"); if (request.getIsDebugMode().isPresent()) { @@ -266,7 +266,7 @@ public MergeApiHttpResponse retrieve(String id, JournalEntriesRetr */ public MergeApiHttpResponse retrieve( String id, JournalEntriesRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/journal-entries") .addPathSegment(id); @@ -344,7 +344,7 @@ public MergeApiHttpResponse> linesRemoteFie */ public MergeApiHttpResponse> linesRemoteFieldClassesList( JournalEntriesLinesRemoteFieldClassesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/journal-entries/lines/remote-field-classes"); if (request.getCursor().isPresent()) { @@ -379,6 +379,10 @@ public MergeApiHttpResponse> linesRemoteFie request.getIsCommonModelField().get().toString(), false); } + if (request.getIsCustom().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "is_custom", request.getIsCustom().get().toString(), false); + } if (request.getPageSize().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "page_size", request.getPageSize().get().toString(), false); @@ -435,7 +439,7 @@ public MergeApiHttpResponse metaPostRetrieve() { * Returns metadata for JournalEntry POSTs. */ public MergeApiHttpResponse metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/journal-entries/meta/post") .build(); @@ -488,7 +492,7 @@ public MergeApiHttpResponse> remoteFieldCla */ public MergeApiHttpResponse> remoteFieldClassesList( JournalEntriesRemoteFieldClassesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/journal-entries/remote-field-classes"); if (request.getCursor().isPresent()) { @@ -523,6 +527,10 @@ public MergeApiHttpResponse> remoteFieldCla request.getIsCommonModelField().get().toString(), false); } + if (request.getIsCustom().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "is_custom", request.getIsCustom().get().toString(), false); + } if (request.getPageSize().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "page_size", request.getPageSize().get().toString(), false); diff --git a/src/main/java/com/merge/api/accounting/RawLinkTokenClient.java b/src/main/java/com/merge/api/accounting/RawLinkTokenClient.java index 11b2e650b..42a8e1320 100644 --- a/src/main/java/com/merge/api/accounting/RawLinkTokenClient.java +++ b/src/main/java/com/merge/api/accounting/RawLinkTokenClient.java @@ -40,7 +40,7 @@ public MergeApiHttpResponse create(EndUserDetailsRequest request) { * Creates a link token to be used when linking a new end user. */ public MergeApiHttpResponse create(EndUserDetailsRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/link-token") .build(); diff --git a/src/main/java/com/merge/api/accounting/RawLinkedAccountsClient.java b/src/main/java/com/merge/api/accounting/RawLinkedAccountsClient.java index a16a4dee2..68416ddab 100644 --- a/src/main/java/com/merge/api/accounting/RawLinkedAccountsClient.java +++ b/src/main/java/com/merge/api/accounting/RawLinkedAccountsClient.java @@ -51,7 +51,7 @@ public MergeApiHttpResponse> list(L */ public MergeApiHttpResponse> list( LinkedAccountsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/linked-accounts"); if (request.getCategory().isPresent()) { diff --git a/src/main/java/com/merge/api/accounting/RawPassthroughClient.java b/src/main/java/com/merge/api/accounting/RawPassthroughClient.java index 2bbfa189f..21a2d3dd1 100644 --- a/src/main/java/com/merge/api/accounting/RawPassthroughClient.java +++ b/src/main/java/com/merge/api/accounting/RawPassthroughClient.java @@ -40,7 +40,7 @@ public MergeApiHttpResponse create(DataPassthroughRequest reques * Pull data from an endpoint not currently supported by Merge. */ public MergeApiHttpResponse create(DataPassthroughRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/passthrough") .build(); diff --git a/src/main/java/com/merge/api/accounting/RawPaymentMethodsClient.java b/src/main/java/com/merge/api/accounting/RawPaymentMethodsClient.java index d1b14861f..afc508b36 100644 --- a/src/main/java/com/merge/api/accounting/RawPaymentMethodsClient.java +++ b/src/main/java/com/merge/api/accounting/RawPaymentMethodsClient.java @@ -52,7 +52,7 @@ public MergeApiHttpResponse> list(PaymentMetho */ public MergeApiHttpResponse> list( PaymentMethodsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/payment-methods"); if (request.getCursor().isPresent()) { @@ -142,7 +142,7 @@ public MergeApiHttpResponse retrieve(String id, PaymentMethodsRet */ public MergeApiHttpResponse retrieve( String id, PaymentMethodsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/payment-methods") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/accounting/RawPaymentTermsClient.java b/src/main/java/com/merge/api/accounting/RawPaymentTermsClient.java index 6b08592e7..42b474359 100644 --- a/src/main/java/com/merge/api/accounting/RawPaymentTermsClient.java +++ b/src/main/java/com/merge/api/accounting/RawPaymentTermsClient.java @@ -52,7 +52,7 @@ public MergeApiHttpResponse> list(PaymentTermsLi */ public MergeApiHttpResponse> list( PaymentTermsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/payment-terms"); if (request.getCursor().isPresent()) { @@ -146,7 +146,7 @@ public MergeApiHttpResponse retrieve(String id, PaymentTermsRetriev */ public MergeApiHttpResponse retrieve( String id, PaymentTermsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/payment-terms") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/accounting/RawPaymentsClient.java b/src/main/java/com/merge/api/accounting/RawPaymentsClient.java index 64ba49cd4..e74160af6 100644 --- a/src/main/java/com/merge/api/accounting/RawPaymentsClient.java +++ b/src/main/java/com/merge/api/accounting/RawPaymentsClient.java @@ -64,7 +64,7 @@ public MergeApiHttpResponse> list(PaymentsListReques */ public MergeApiHttpResponse> list( PaymentsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/payments"); if (request.getAccountId().isPresent()) { @@ -206,7 +206,7 @@ public MergeApiHttpResponse create(PaymentEndpointRequest reque * Creates a Payment object with the given values. */ public MergeApiHttpResponse create(PaymentEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/payments"); if (request.getIsDebugMode().isPresent()) { @@ -273,7 +273,7 @@ public MergeApiHttpResponse retrieve(String id, PaymentsRetrieveRequest */ public MergeApiHttpResponse retrieve( String id, PaymentsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/payments") .addPathSegment(id); @@ -342,7 +342,7 @@ public MergeApiHttpResponse partialUpdate(String id, PatchedPay */ public MergeApiHttpResponse partialUpdate( String id, PatchedPaymentEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/payments") .addPathSegment(id); @@ -412,7 +412,7 @@ public MergeApiHttpResponse> lineItemsRemot */ public MergeApiHttpResponse> lineItemsRemoteFieldClassesList( PaymentsLineItemsRemoteFieldClassesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/payments/line-items/remote-field-classes"); if (request.getCursor().isPresent()) { @@ -447,6 +447,10 @@ public MergeApiHttpResponse> lineItemsRemot request.getIsCommonModelField().get().toString(), false); } + if (request.getIsCustom().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "is_custom", request.getIsCustom().get().toString(), false); + } if (request.getPageSize().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "page_size", request.getPageSize().get().toString(), false); @@ -503,7 +507,7 @@ public MergeApiHttpResponse metaPatchRetrieve(String id) { * Returns metadata for Payment PATCHs. */ public MergeApiHttpResponse metaPatchRetrieve(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/payments/meta/patch") .addPathSegment(id) @@ -547,7 +551,7 @@ public MergeApiHttpResponse metaPostRetrieve() { * Returns metadata for Payment POSTs. */ public MergeApiHttpResponse metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/payments/meta/post") .build(); @@ -600,7 +604,7 @@ public MergeApiHttpResponse> remoteFieldCla */ public MergeApiHttpResponse> remoteFieldClassesList( PaymentsRemoteFieldClassesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/payments/remote-field-classes"); if (request.getCursor().isPresent()) { @@ -635,6 +639,10 @@ public MergeApiHttpResponse> remoteFieldCla request.getIsCommonModelField().get().toString(), false); } + if (request.getIsCustom().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "is_custom", request.getIsCustom().get().toString(), false); + } if (request.getPageSize().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "page_size", request.getPageSize().get().toString(), false); diff --git a/src/main/java/com/merge/api/accounting/RawPhoneNumbersClient.java b/src/main/java/com/merge/api/accounting/RawPhoneNumbersClient.java index 173c8c93d..f33e03bad 100644 --- a/src/main/java/com/merge/api/accounting/RawPhoneNumbersClient.java +++ b/src/main/java/com/merge/api/accounting/RawPhoneNumbersClient.java @@ -46,7 +46,7 @@ public MergeApiHttpResponse retrieve(String id, PhoneNumb */ public MergeApiHttpResponse retrieve( String id, PhoneNumbersRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/phone-numbers") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/accounting/RawProjectsClient.java b/src/main/java/com/merge/api/accounting/RawProjectsClient.java new file mode 100644 index 000000000..f89c53473 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/RawProjectsClient.java @@ -0,0 +1,183 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting; + +import com.merge.api.accounting.types.PaginatedProjectList; +import com.merge.api.accounting.types.Project; +import com.merge.api.accounting.types.ProjectsListRequest; +import com.merge.api.accounting.types.ProjectsRetrieveRequest; +import com.merge.api.core.ApiError; +import com.merge.api.core.ClientOptions; +import com.merge.api.core.MergeApiHttpResponse; +import com.merge.api.core.MergeException; +import com.merge.api.core.ObjectMappers; +import com.merge.api.core.QueryStringMapper; +import com.merge.api.core.RequestOptions; +import java.io.IOException; +import okhttp3.Headers; +import okhttp3.HttpUrl; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; +import okhttp3.ResponseBody; + +public class RawProjectsClient { + protected final ClientOptions clientOptions; + + public RawProjectsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + } + + /** + * Returns a list of Project objects. + */ + public MergeApiHttpResponse list() { + return list(ProjectsListRequest.builder().build()); + } + + /** + * Returns a list of Project objects. + */ + public MergeApiHttpResponse list(ProjectsListRequest request) { + return list(request, null); + } + + /** + * Returns a list of Project objects. + */ + public MergeApiHttpResponse list(ProjectsListRequest request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("accounting/v1/projects"); + if (request.getCursor().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "cursor", request.getCursor().get(), false); + } + if (request.getIncludeDeletedData().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, + "include_deleted_data", + request.getIncludeDeletedData().get().toString(), + false); + } + if (request.getIncludeRemoteData().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, + "include_remote_data", + request.getIncludeRemoteData().get().toString(), + false); + } + if (request.getIncludeShellData().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, + "include_shell_data", + request.getIncludeShellData().get().toString(), + false); + } + if (request.getPageSize().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "page_size", request.getPageSize().get().toString(), false); + } + if (request.getExpand().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "expand", request.getExpand().get().toString(), false); + } + Request.Builder _requestBuilder = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); + Request okhttpRequest = _requestBuilder.build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + if (response.isSuccessful()) { + return new MergeApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedProjectList.class), + response); + } + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + throw new ApiError( + "Error with status code " + response.code(), + response.code(), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response); + } catch (IOException e) { + throw new MergeException("Network error executing HTTP request", e); + } + } + + /** + * Returns a Project object with the given id. + */ + public MergeApiHttpResponse retrieve(String id) { + return retrieve(id, ProjectsRetrieveRequest.builder().build()); + } + + /** + * Returns a Project object with the given id. + */ + public MergeApiHttpResponse retrieve(String id, ProjectsRetrieveRequest request) { + return retrieve(id, request, null); + } + + /** + * Returns a Project object with the given id. + */ + public MergeApiHttpResponse retrieve( + String id, ProjectsRetrieveRequest request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("accounting/v1/projects") + .addPathSegment(id); + if (request.getIncludeRemoteData().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, + "include_remote_data", + request.getIncludeRemoteData().get().toString(), + false); + } + if (request.getIncludeShellData().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, + "include_shell_data", + request.getIncludeShellData().get().toString(), + false); + } + if (request.getExpand().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "expand", request.getExpand().get().toString(), false); + } + Request.Builder _requestBuilder = new Request.Builder() + .url(httpUrl.build()) + .method("GET", null) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); + Request okhttpRequest = _requestBuilder.build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + if (response.isSuccessful()) { + return new MergeApiHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), Project.class), response); + } + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + throw new ApiError( + "Error with status code " + response.code(), + response.code(), + ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class), + response); + } catch (IOException e) { + throw new MergeException("Network error executing HTTP request", e); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/RawPurchaseOrdersClient.java b/src/main/java/com/merge/api/accounting/RawPurchaseOrdersClient.java index 975cff3f7..d8a35be4b 100644 --- a/src/main/java/com/merge/api/accounting/RawPurchaseOrdersClient.java +++ b/src/main/java/com/merge/api/accounting/RawPurchaseOrdersClient.java @@ -63,7 +63,7 @@ public MergeApiHttpResponse> list(PurchaseOrde */ public MergeApiHttpResponse> list( PurchaseOrdersListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/purchase-orders"); if (request.getCompanyId().isPresent()) { @@ -206,7 +206,7 @@ public MergeApiHttpResponse create(PurchaseOrderEndpointR */ public MergeApiHttpResponse create( PurchaseOrderEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/purchase-orders"); if (request.getIsDebugMode().isPresent()) { @@ -274,7 +274,7 @@ public MergeApiHttpResponse retrieve(String id, PurchaseOrdersRet */ public MergeApiHttpResponse retrieve( String id, PurchaseOrdersRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/purchase-orders") .addPathSegment(id); @@ -360,7 +360,7 @@ public MergeApiHttpResponse> lineItemsRemot */ public MergeApiHttpResponse> lineItemsRemoteFieldClassesList( PurchaseOrdersLineItemsRemoteFieldClassesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/purchase-orders/line-items/remote-field-classes"); if (request.getCursor().isPresent()) { @@ -395,6 +395,10 @@ public MergeApiHttpResponse> lineItemsRemot request.getIsCommonModelField().get().toString(), false); } + if (request.getIsCustom().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "is_custom", request.getIsCustom().get().toString(), false); + } if (request.getPageSize().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "page_size", request.getPageSize().get().toString(), false); @@ -451,7 +455,7 @@ public MergeApiHttpResponse metaPostRetrieve() { * Returns metadata for PurchaseOrder POSTs. */ public MergeApiHttpResponse metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/purchase-orders/meta/post") .build(); @@ -504,7 +508,7 @@ public MergeApiHttpResponse> remoteFieldCla */ public MergeApiHttpResponse> remoteFieldClassesList( PurchaseOrdersRemoteFieldClassesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/purchase-orders/remote-field-classes"); if (request.getCursor().isPresent()) { @@ -539,6 +543,10 @@ public MergeApiHttpResponse> remoteFieldCla request.getIsCommonModelField().get().toString(), false); } + if (request.getIsCustom().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "is_custom", request.getIsCustom().get().toString(), false); + } if (request.getPageSize().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "page_size", request.getPageSize().get().toString(), false); diff --git a/src/main/java/com/merge/api/accounting/RawRegenerateKeyClient.java b/src/main/java/com/merge/api/accounting/RawRegenerateKeyClient.java index 30ab42c2f..0f4bc9272 100644 --- a/src/main/java/com/merge/api/accounting/RawRegenerateKeyClient.java +++ b/src/main/java/com/merge/api/accounting/RawRegenerateKeyClient.java @@ -41,7 +41,7 @@ public MergeApiHttpResponse create(RemoteKeyForRegenerationRequest re */ public MergeApiHttpResponse create( RemoteKeyForRegenerationRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/regenerate-key") .build(); diff --git a/src/main/java/com/merge/api/accounting/RawScopesClient.java b/src/main/java/com/merge/api/accounting/RawScopesClient.java index 92d61b3ad..a5dc30547 100644 --- a/src/main/java/com/merge/api/accounting/RawScopesClient.java +++ b/src/main/java/com/merge/api/accounting/RawScopesClient.java @@ -40,7 +40,7 @@ public MergeApiHttpResponse defaultScopesRetrieve() { * Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. Learn more. */ public MergeApiHttpResponse defaultScopesRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/default-scopes") .build(); @@ -84,7 +84,7 @@ public MergeApiHttpResponse linkedAccountScopesRetrieve() { * Get all available permissions for Merge Common Models and fields for a single Linked Account. Learn more. */ public MergeApiHttpResponse linkedAccountScopesRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/linked-account-scopes") .build(); @@ -130,7 +130,7 @@ public MergeApiHttpResponse linkedAccountScopesCreate( */ public MergeApiHttpResponse linkedAccountScopesCreate( LinkedAccountCommonModelScopeDeserializerRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/linked-account-scopes") .build(); diff --git a/src/main/java/com/merge/api/accounting/RawSyncStatusClient.java b/src/main/java/com/merge/api/accounting/RawSyncStatusClient.java index d0ae1309d..e9703bd1c 100644 --- a/src/main/java/com/merge/api/accounting/RawSyncStatusClient.java +++ b/src/main/java/com/merge/api/accounting/RawSyncStatusClient.java @@ -51,7 +51,7 @@ public MergeApiHttpResponse> list(SyncStatusListR */ public MergeApiHttpResponse> list( SyncStatusListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/sync-status"); if (request.getCursor().isPresent()) { diff --git a/src/main/java/com/merge/api/accounting/RawTaxRatesClient.java b/src/main/java/com/merge/api/accounting/RawTaxRatesClient.java index 27787c9d5..e375e6c52 100644 --- a/src/main/java/com/merge/api/accounting/RawTaxRatesClient.java +++ b/src/main/java/com/merge/api/accounting/RawTaxRatesClient.java @@ -52,7 +52,7 @@ public MergeApiHttpResponse> list(TaxRatesListReques */ public MergeApiHttpResponse> list( TaxRatesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/tax-rates"); if (request.getCompanyId().isPresent()) { @@ -177,7 +177,7 @@ public MergeApiHttpResponse retrieve(String id, TaxRatesRetrieveRequest */ public MergeApiHttpResponse retrieve( String id, TaxRatesRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/tax-rates") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/accounting/RawTrackingCategoriesClient.java b/src/main/java/com/merge/api/accounting/RawTrackingCategoriesClient.java index 981e18c34..207829361 100644 --- a/src/main/java/com/merge/api/accounting/RawTrackingCategoriesClient.java +++ b/src/main/java/com/merge/api/accounting/RawTrackingCategoriesClient.java @@ -52,7 +52,7 @@ public MergeApiHttpResponse> list(TrackingC */ public MergeApiHttpResponse> list( TrackingCategoriesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/tracking-categories"); if (request.getCategoryType().isPresent()) { @@ -193,7 +193,7 @@ public MergeApiHttpResponse retrieve(String id, TrackingCatego */ public MergeApiHttpResponse retrieve( String id, TrackingCategoriesRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/tracking-categories") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/accounting/RawTransactionsClient.java b/src/main/java/com/merge/api/accounting/RawTransactionsClient.java index 1f412e484..c55187186 100644 --- a/src/main/java/com/merge/api/accounting/RawTransactionsClient.java +++ b/src/main/java/com/merge/api/accounting/RawTransactionsClient.java @@ -52,7 +52,7 @@ public MergeApiHttpResponse> list(TransactionsLi */ public MergeApiHttpResponse> list( TransactionsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/transactions"); if (request.getCompanyId().isPresent()) { @@ -187,7 +187,7 @@ public MergeApiHttpResponse retrieve(String id, TransactionsRetriev */ public MergeApiHttpResponse retrieve( String id, TransactionsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/transactions") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/accounting/RawVendorCreditsClient.java b/src/main/java/com/merge/api/accounting/RawVendorCreditsClient.java index 420b453ee..a2dc6563f 100644 --- a/src/main/java/com/merge/api/accounting/RawVendorCreditsClient.java +++ b/src/main/java/com/merge/api/accounting/RawVendorCreditsClient.java @@ -59,7 +59,7 @@ public MergeApiHttpResponse> list(VendorCredits */ public MergeApiHttpResponse> list( VendorCreditsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/vendor-credits"); if (request.getCompanyId().isPresent()) { @@ -187,7 +187,7 @@ public MergeApiHttpResponse create(VendorCreditEndpointReq */ public MergeApiHttpResponse create( VendorCreditEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/vendor-credits"); if (request.getIsDebugMode().isPresent()) { @@ -255,7 +255,7 @@ public MergeApiHttpResponse retrieve(String id, VendorCreditsRetri */ public MergeApiHttpResponse retrieve( String id, VendorCreditsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/vendor-credits") .addPathSegment(id); @@ -316,7 +316,7 @@ public MergeApiHttpResponse metaPostRetrieve() { * Returns metadata for VendorCredit POSTs. */ public MergeApiHttpResponse metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/vendor-credits/meta/post") .build(); diff --git a/src/main/java/com/merge/api/accounting/RawWebhookReceiversClient.java b/src/main/java/com/merge/api/accounting/RawWebhookReceiversClient.java index 25e1d4d03..65ab9b857 100644 --- a/src/main/java/com/merge/api/accounting/RawWebhookReceiversClient.java +++ b/src/main/java/com/merge/api/accounting/RawWebhookReceiversClient.java @@ -42,7 +42,7 @@ public MergeApiHttpResponse> list() { * Returns a list of WebhookReceiver objects. */ public MergeApiHttpResponse> list(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/webhook-receivers") .build(); @@ -87,7 +87,7 @@ public MergeApiHttpResponse create(WebhookReceiverRequest reque * Creates a WebhookReceiver object with the given values. */ public MergeApiHttpResponse create(WebhookReceiverRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("accounting/v1/webhook-receivers") .build(); diff --git a/src/main/java/com/merge/api/accounting/types/Account.java b/src/main/java/com/merge/api/accounting/types/Account.java index 2d19d2b79..701308416 100644 --- a/src/main/java/com/merge/api/accounting/types/Account.java +++ b/src/main/java/com/merge/api/accounting/types/Account.java @@ -35,17 +35,17 @@ public final class Account { private final Optional description; - private final Optional classification; + private final Optional classification; private final Optional type; - private final Optional accountType; + private final Optional accountType; - private final Optional status; + private final Optional status; private final Optional currentBalance; - private final Optional currency; + private final Optional currency; private final Optional accountNumber; @@ -68,12 +68,12 @@ private Account( Optional modifiedAt, Optional name, Optional description, - Optional classification, + Optional classification, Optional type, - Optional accountType, - Optional status, + Optional accountType, + Optional status, Optional currentBalance, - Optional currency, + Optional currency, Optional accountNumber, Optional parentAccount, Optional company, @@ -158,7 +158,7 @@ public Optional getDescription() { * */ @JsonProperty("classification") - public Optional getClassification() { + public Optional getClassification() { return classification; } @@ -189,7 +189,7 @@ public Optional getType() { * */ @JsonProperty("account_type") - public Optional getAccountType() { + public Optional getAccountType() { return accountType; } @@ -202,7 +202,7 @@ public Optional getAccountType() { * */ @JsonProperty("status") - public Optional getStatus() { + public Optional getStatus() { return status; } @@ -526,7 +526,7 @@ public Optional getCurrentBalance() { * */ @JsonProperty("currency") - public Optional getCurrency() { + public Optional getCurrency() { return currency; } @@ -650,17 +650,17 @@ public static final class Builder { private Optional description = Optional.empty(); - private Optional classification = Optional.empty(); + private Optional classification = Optional.empty(); private Optional type = Optional.empty(); - private Optional accountType = Optional.empty(); + private Optional accountType = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Optional currentBalance = Optional.empty(); - private Optional currency = Optional.empty(); + private Optional currency = Optional.empty(); private Optional accountNumber = Optional.empty(); @@ -712,6 +712,9 @@ public Builder id(String id) { return this; } + /** + *

The third-party API ID of the matching object.

+ */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -723,6 +726,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

The datetime that this object was created by Merge.

+ */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -734,6 +740,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

The datetime that this object was modified by Merge.

+ */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -745,6 +754,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

The account's name.

+ */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -756,6 +768,9 @@ public Builder name(String name) { return this; } + /** + *

The account's description.

+ */ @JsonSetter(value = "description", nulls = Nulls.SKIP) public Builder description(Optional description) { this.description = description; @@ -767,17 +782,30 @@ public Builder description(String description) { return this; } + /** + *

The account's broadest grouping.

+ *
    + *
  • ASSET - ASSET
  • + *
  • EQUITY - EQUITY
  • + *
  • EXPENSE - EXPENSE
  • + *
  • LIABILITY - LIABILITY
  • + *
  • REVENUE - REVENUE
  • + *
+ */ @JsonSetter(value = "classification", nulls = Nulls.SKIP) - public Builder classification(Optional classification) { + public Builder classification(Optional classification) { this.classification = classification; return this; } - public Builder classification(ClassificationEnum classification) { + public Builder classification(AccountClassification classification) { this.classification = Optional.ofNullable(classification); return this; } + /** + *

The account's type is a narrower and more specific grouping within the account's classification.

+ */ @JsonSetter(value = "type", nulls = Nulls.SKIP) public Builder type(Optional type) { this.type = type; @@ -789,28 +817,57 @@ public Builder type(String type) { return this; } + /** + *

Normalized account type- which is a narrower and more specific grouping within the account's classification.

+ *
    + *
  • BANK - BANK
  • + *
  • CREDIT_CARD - CREDIT_CARD
  • + *
  • ACCOUNTS_PAYABLE - ACCOUNTS_PAYABLE
  • + *
  • ACCOUNTS_RECEIVABLE - ACCOUNTS_RECEIVABLE
  • + *
  • FIXED_ASSET - FIXED_ASSET
  • + *
  • OTHER_ASSET - OTHER_ASSET
  • + *
  • OTHER_CURRENT_ASSET - OTHER_CURRENT_ASSET
  • + *
  • OTHER_EXPENSE - OTHER_EXPENSE
  • + *
  • OTHER_INCOME - OTHER_INCOME
  • + *
  • COST_OF_GOODS_SOLD - COST_OF_GOODS_SOLD
  • + *
  • OTHER_CURRENT_LIABILITY - OTHER_CURRENT_LIABILITY
  • + *
  • LONG_TERM_LIABILITY - LONG_TERM_LIABILITY
  • + *
  • NON_POSTING - NON_POSTING
  • + *
+ */ @JsonSetter(value = "account_type", nulls = Nulls.SKIP) - public Builder accountType(Optional accountType) { + public Builder accountType(Optional accountType) { this.accountType = accountType; return this; } - public Builder accountType(AccountAccountTypeEnum accountType) { + public Builder accountType(AccountAccountType accountType) { this.accountType = Optional.ofNullable(accountType); return this; } + /** + *

The account's status.

+ *
    + *
  • ACTIVE - ACTIVE
  • + *
  • PENDING - PENDING
  • + *
  • INACTIVE - INACTIVE
  • + *
+ */ @JsonSetter(value = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { + public Builder status(Optional status) { this.status = status; return this; } - public Builder status(AccountStatusEnum status) { + public Builder status(AccountStatus status) { this.status = Optional.ofNullable(status); return this; } + /** + *

The account's current balance.

+ */ @JsonSetter(value = "current_balance", nulls = Nulls.SKIP) public Builder currentBalance(Optional currentBalance) { this.currentBalance = currentBalance; @@ -822,17 +879,331 @@ public Builder currentBalance(Double currentBalance) { return this; } + /** + *

The account's currency.

+ *
    + *
  • XUA - ADB Unit of Account
  • + *
  • AFN - Afghan Afghani
  • + *
  • AFA - Afghan Afghani (1927–2002)
  • + *
  • ALL - Albanian Lek
  • + *
  • ALK - Albanian Lek (1946–1965)
  • + *
  • DZD - Algerian Dinar
  • + *
  • ADP - Andorran Peseta
  • + *
  • AOA - Angolan Kwanza
  • + *
  • AOK - Angolan Kwanza (1977–1991)
  • + *
  • AON - Angolan New Kwanza (1990–2000)
  • + *
  • AOR - Angolan Readjusted Kwanza (1995–1999)
  • + *
  • ARA - Argentine Austral
  • + *
  • ARS - Argentine Peso
  • + *
  • ARM - Argentine Peso (1881–1970)
  • + *
  • ARP - Argentine Peso (1983–1985)
  • + *
  • ARL - Argentine Peso Ley (1970–1983)
  • + *
  • AMD - Armenian Dram
  • + *
  • AWG - Aruban Florin
  • + *
  • AUD - Australian Dollar
  • + *
  • ATS - Austrian Schilling
  • + *
  • AZN - Azerbaijani Manat
  • + *
  • AZM - Azerbaijani Manat (1993–2006)
  • + *
  • BSD - Bahamian Dollar
  • + *
  • BHD - Bahraini Dinar
  • + *
  • BDT - Bangladeshi Taka
  • + *
  • BBD - Barbadian Dollar
  • + *
  • BYN - Belarusian Ruble
  • + *
  • BYB - Belarusian Ruble (1994–1999)
  • + *
  • BYR - Belarusian Ruble (2000–2016)
  • + *
  • BEF - Belgian Franc
  • + *
  • BEC - Belgian Franc (convertible)
  • + *
  • BEL - Belgian Franc (financial)
  • + *
  • BZD - Belize Dollar
  • + *
  • BMD - Bermudan Dollar
  • + *
  • BTN - Bhutanese Ngultrum
  • + *
  • BOB - Bolivian Boliviano
  • + *
  • BOL - Bolivian Boliviano (1863–1963)
  • + *
  • BOV - Bolivian Mvdol
  • + *
  • BOP - Bolivian Peso
  • + *
  • BAM - Bosnia-Herzegovina Convertible Mark
  • + *
  • BAD - Bosnia-Herzegovina Dinar (1992–1994)
  • + *
  • BAN - Bosnia-Herzegovina New Dinar (1994–1997)
  • + *
  • BWP - Botswanan Pula
  • + *
  • BRC - Brazilian Cruzado (1986–1989)
  • + *
  • BRZ - Brazilian Cruzeiro (1942–1967)
  • + *
  • BRE - Brazilian Cruzeiro (1990–1993)
  • + *
  • BRR - Brazilian Cruzeiro (1993–1994)
  • + *
  • BRN - Brazilian New Cruzado (1989–1990)
  • + *
  • BRB - Brazilian New Cruzeiro (1967–1986)
  • + *
  • BRL - Brazilian Real
  • + *
  • GBP - British Pound
  • + *
  • BND - Brunei Dollar
  • + *
  • BGL - Bulgarian Hard Lev
  • + *
  • BGN - Bulgarian Lev
  • + *
  • BGO - Bulgarian Lev (1879–1952)
  • + *
  • BGM - Bulgarian Socialist Lev
  • + *
  • BUK - Burmese Kyat
  • + *
  • BIF - Burundian Franc
  • + *
  • XPF - CFP Franc
  • + *
  • KHR - Cambodian Riel
  • + *
  • CAD - Canadian Dollar
  • + *
  • CVE - Cape Verdean Escudo
  • + *
  • KYD - Cayman Islands Dollar
  • + *
  • XAF - Central African CFA Franc
  • + *
  • CLE - Chilean Escudo
  • + *
  • CLP - Chilean Peso
  • + *
  • CLF - Chilean Unit of Account (UF)
  • + *
  • CNX - Chinese People’s Bank Dollar
  • + *
  • CNY - Chinese Yuan
  • + *
  • CNH - Chinese Yuan (offshore)
  • + *
  • COP - Colombian Peso
  • + *
  • COU - Colombian Real Value Unit
  • + *
  • KMF - Comorian Franc
  • + *
  • CDF - Congolese Franc
  • + *
  • CRC - Costa Rican Colón
  • + *
  • HRD - Croatian Dinar
  • + *
  • HRK - Croatian Kuna
  • + *
  • CUC - Cuban Convertible Peso
  • + *
  • CUP - Cuban Peso
  • + *
  • CYP - Cypriot Pound
  • + *
  • CZK - Czech Koruna
  • + *
  • CSK - Czechoslovak Hard Koruna
  • + *
  • DKK - Danish Krone
  • + *
  • DJF - Djiboutian Franc
  • + *
  • DOP - Dominican Peso
  • + *
  • NLG - Dutch Guilder
  • + *
  • XCD - East Caribbean Dollar
  • + *
  • DDM - East German Mark
  • + *
  • ECS - Ecuadorian Sucre
  • + *
  • ECV - Ecuadorian Unit of Constant Value
  • + *
  • EGP - Egyptian Pound
  • + *
  • GQE - Equatorial Guinean Ekwele
  • + *
  • ERN - Eritrean Nakfa
  • + *
  • EEK - Estonian Kroon
  • + *
  • ETB - Ethiopian Birr
  • + *
  • EUR - Euro
  • + *
  • XBA - European Composite Unit
  • + *
  • XEU - European Currency Unit
  • + *
  • XBB - European Monetary Unit
  • + *
  • XBC - European Unit of Account (XBC)
  • + *
  • XBD - European Unit of Account (XBD)
  • + *
  • FKP - Falkland Islands Pound
  • + *
  • FJD - Fijian Dollar
  • + *
  • FIM - Finnish Markka
  • + *
  • FRF - French Franc
  • + *
  • XFO - French Gold Franc
  • + *
  • XFU - French UIC-Franc
  • + *
  • GMD - Gambian Dalasi
  • + *
  • GEK - Georgian Kupon Larit
  • + *
  • GEL - Georgian Lari
  • + *
  • DEM - German Mark
  • + *
  • GHS - Ghanaian Cedi
  • + *
  • GHC - Ghanaian Cedi (1979–2007)
  • + *
  • GIP - Gibraltar Pound
  • + *
  • XAU - Gold
  • + *
  • GRD - Greek Drachma
  • + *
  • GTQ - Guatemalan Quetzal
  • + *
  • GWP - Guinea-Bissau Peso
  • + *
  • GNF - Guinean Franc
  • + *
  • GNS - Guinean Syli
  • + *
  • GYD - Guyanaese Dollar
  • + *
  • HTG - Haitian Gourde
  • + *
  • HNL - Honduran Lempira
  • + *
  • HKD - Hong Kong Dollar
  • + *
  • HUF - Hungarian Forint
  • + *
  • IMP - IMP
  • + *
  • ISK - Icelandic Króna
  • + *
  • ISJ - Icelandic Króna (1918–1981)
  • + *
  • INR - Indian Rupee
  • + *
  • IDR - Indonesian Rupiah
  • + *
  • IRR - Iranian Rial
  • + *
  • IQD - Iraqi Dinar
  • + *
  • IEP - Irish Pound
  • + *
  • ILS - Israeli New Shekel
  • + *
  • ILP - Israeli Pound
  • + *
  • ILR - Israeli Shekel (1980–1985)
  • + *
  • ITL - Italian Lira
  • + *
  • JMD - Jamaican Dollar
  • + *
  • JPY - Japanese Yen
  • + *
  • JOD - Jordanian Dinar
  • + *
  • KZT - Kazakhstani Tenge
  • + *
  • KES - Kenyan Shilling
  • + *
  • KWD - Kuwaiti Dinar
  • + *
  • KGS - Kyrgystani Som
  • + *
  • LAK - Laotian Kip
  • + *
  • LVL - Latvian Lats
  • + *
  • LVR - Latvian Ruble
  • + *
  • LBP - Lebanese Pound
  • + *
  • LSL - Lesotho Loti
  • + *
  • LRD - Liberian Dollar
  • + *
  • LYD - Libyan Dinar
  • + *
  • LTL - Lithuanian Litas
  • + *
  • LTT - Lithuanian Talonas
  • + *
  • LUL - Luxembourg Financial Franc
  • + *
  • LUC - Luxembourgian Convertible Franc
  • + *
  • LUF - Luxembourgian Franc
  • + *
  • MOP - Macanese Pataca
  • + *
  • MKD - Macedonian Denar
  • + *
  • MKN - Macedonian Denar (1992–1993)
  • + *
  • MGA - Malagasy Ariary
  • + *
  • MGF - Malagasy Franc
  • + *
  • MWK - Malawian Kwacha
  • + *
  • MYR - Malaysian Ringgit
  • + *
  • MVR - Maldivian Rufiyaa
  • + *
  • MVP - Maldivian Rupee (1947–1981)
  • + *
  • MLF - Malian Franc
  • + *
  • MTL - Maltese Lira
  • + *
  • MTP - Maltese Pound
  • + *
  • MRU - Mauritanian Ouguiya
  • + *
  • MRO - Mauritanian Ouguiya (1973–2017)
  • + *
  • MUR - Mauritian Rupee
  • + *
  • MXV - Mexican Investment Unit
  • + *
  • MXN - Mexican Peso
  • + *
  • MXP - Mexican Silver Peso (1861–1992)
  • + *
  • MDC - Moldovan Cupon
  • + *
  • MDL - Moldovan Leu
  • + *
  • MCF - Monegasque Franc
  • + *
  • MNT - Mongolian Tugrik
  • + *
  • MAD - Moroccan Dirham
  • + *
  • MAF - Moroccan Franc
  • + *
  • MZE - Mozambican Escudo
  • + *
  • MZN - Mozambican Metical
  • + *
  • MZM - Mozambican Metical (1980–2006)
  • + *
  • MMK - Myanmar Kyat
  • + *
  • NAD - Namibian Dollar
  • + *
  • NPR - Nepalese Rupee
  • + *
  • ANG - Netherlands Antillean Guilder
  • + *
  • TWD - New Taiwan Dollar
  • + *
  • NZD - New Zealand Dollar
  • + *
  • NIO - Nicaraguan Córdoba
  • + *
  • NIC - Nicaraguan Córdoba (1988–1991)
  • + *
  • NGN - Nigerian Naira
  • + *
  • KPW - North Korean Won
  • + *
  • NOK - Norwegian Krone
  • + *
  • OMR - Omani Rial
  • + *
  • PKR - Pakistani Rupee
  • + *
  • XPD - Palladium
  • + *
  • PAB - Panamanian Balboa
  • + *
  • PGK - Papua New Guinean Kina
  • + *
  • PYG - Paraguayan Guarani
  • + *
  • PEI - Peruvian Inti
  • + *
  • PEN - Peruvian Sol
  • + *
  • PES - Peruvian Sol (1863–1965)
  • + *
  • PHP - Philippine Peso
  • + *
  • XPT - Platinum
  • + *
  • PLN - Polish Zloty
  • + *
  • PLZ - Polish Zloty (1950–1995)
  • + *
  • PTE - Portuguese Escudo
  • + *
  • GWE - Portuguese Guinea Escudo
  • + *
  • QAR - Qatari Rial
  • + *
  • XRE - RINET Funds
  • + *
  • RHD - Rhodesian Dollar
  • + *
  • RON - Romanian Leu
  • + *
  • ROL - Romanian Leu (1952–2006)
  • + *
  • RUB - Russian Ruble
  • + *
  • RUR - Russian Ruble (1991–1998)
  • + *
  • RWF - Rwandan Franc
  • + *
  • SVC - Salvadoran Colón
  • + *
  • WST - Samoan Tala
  • + *
  • SAR - Saudi Riyal
  • + *
  • RSD - Serbian Dinar
  • + *
  • CSD - Serbian Dinar (2002–2006)
  • + *
  • SCR - Seychellois Rupee
  • + *
  • SLL - Sierra Leonean Leone
  • + *
  • XAG - Silver
  • + *
  • SGD - Singapore Dollar
  • + *
  • SKK - Slovak Koruna
  • + *
  • SIT - Slovenian Tolar
  • + *
  • SBD - Solomon Islands Dollar
  • + *
  • SOS - Somali Shilling
  • + *
  • ZAR - South African Rand
  • + *
  • ZAL - South African Rand (financial)
  • + *
  • KRH - South Korean Hwan (1953–1962)
  • + *
  • KRW - South Korean Won
  • + *
  • KRO - South Korean Won (1945–1953)
  • + *
  • SSP - South Sudanese Pound
  • + *
  • SUR - Soviet Rouble
  • + *
  • ESP - Spanish Peseta
  • + *
  • ESA - Spanish Peseta (A account)
  • + *
  • ESB - Spanish Peseta (convertible account)
  • + *
  • XDR - Special Drawing Rights
  • + *
  • LKR - Sri Lankan Rupee
  • + *
  • SHP - St. Helena Pound
  • + *
  • XSU - Sucre
  • + *
  • SDD - Sudanese Dinar (1992–2007)
  • + *
  • SDG - Sudanese Pound
  • + *
  • SDP - Sudanese Pound (1957–1998)
  • + *
  • SRD - Surinamese Dollar
  • + *
  • SRG - Surinamese Guilder
  • + *
  • SZL - Swazi Lilangeni
  • + *
  • SEK - Swedish Krona
  • + *
  • CHF - Swiss Franc
  • + *
  • SYP - Syrian Pound
  • + *
  • STN - São Tomé & Príncipe Dobra
  • + *
  • STD - São Tomé & Príncipe Dobra (1977–2017)
  • + *
  • TVD - TVD
  • + *
  • TJR - Tajikistani Ruble
  • + *
  • TJS - Tajikistani Somoni
  • + *
  • TZS - Tanzanian Shilling
  • + *
  • XTS - Testing Currency Code
  • + *
  • THB - Thai Baht
  • + *
  • XXX - The codes assigned for transactions where no currency is involved
  • + *
  • TPE - Timorese Escudo
  • + *
  • TOP - Tongan Paʻanga
  • + *
  • TTD - Trinidad & Tobago Dollar
  • + *
  • TND - Tunisian Dinar
  • + *
  • TRY - Turkish Lira
  • + *
  • TRL - Turkish Lira (1922–2005)
  • + *
  • TMT - Turkmenistani Manat
  • + *
  • TMM - Turkmenistani Manat (1993–2009)
  • + *
  • USD - US Dollar
  • + *
  • USN - US Dollar (Next day)
  • + *
  • USS - US Dollar (Same day)
  • + *
  • UGX - Ugandan Shilling
  • + *
  • UGS - Ugandan Shilling (1966–1987)
  • + *
  • UAH - Ukrainian Hryvnia
  • + *
  • UAK - Ukrainian Karbovanets
  • + *
  • AED - United Arab Emirates Dirham
  • + *
  • UYW - Uruguayan Nominal Wage Index Unit
  • + *
  • UYU - Uruguayan Peso
  • + *
  • UYP - Uruguayan Peso (1975–1993)
  • + *
  • UYI - Uruguayan Peso (Indexed Units)
  • + *
  • UZS - Uzbekistani Som
  • + *
  • VUV - Vanuatu Vatu
  • + *
  • VES - Venezuelan Bolívar
  • + *
  • VEB - Venezuelan Bolívar (1871–2008)
  • + *
  • VEF - Venezuelan Bolívar (2008–2018)
  • + *
  • VND - Vietnamese Dong
  • + *
  • VNN - Vietnamese Dong (1978–1985)
  • + *
  • CHE - WIR Euro
  • + *
  • CHW - WIR Franc
  • + *
  • XOF - West African CFA Franc
  • + *
  • YDD - Yemeni Dinar
  • + *
  • YER - Yemeni Rial
  • + *
  • YUN - Yugoslavian Convertible Dinar (1990–1992)
  • + *
  • YUD - Yugoslavian Hard Dinar (1966–1990)
  • + *
  • YUM - Yugoslavian New Dinar (1994–2002)
  • + *
  • YUR - Yugoslavian Reformed Dinar (1992–1993)
  • + *
  • ZWN - ZWN
  • + *
  • ZRN - Zairean New Zaire (1993–1998)
  • + *
  • ZRZ - Zairean Zaire (1971–1993)
  • + *
  • ZMW - Zambian Kwacha
  • + *
  • ZMK - Zambian Kwacha (1968–2012)
  • + *
  • ZWD - Zimbabwean Dollar (1980–2008)
  • + *
  • ZWR - Zimbabwean Dollar (2008)
  • + *
  • ZWL - Zimbabwean Dollar (2009)
  • + *
+ */ @JsonSetter(value = "currency", nulls = Nulls.SKIP) - public Builder currency(Optional currency) { + public Builder currency(Optional currency) { this.currency = currency; return this; } - public Builder currency(TransactionCurrencyEnum currency) { + public Builder currency(AccountCurrency currency) { this.currency = Optional.ofNullable(currency); return this; } + /** + *

The account's number.

+ */ @JsonSetter(value = "account_number", nulls = Nulls.SKIP) public Builder accountNumber(Optional accountNumber) { this.accountNumber = accountNumber; @@ -844,6 +1215,9 @@ public Builder accountNumber(String accountNumber) { return this; } + /** + *

ID of the parent account.

+ */ @JsonSetter(value = "parent_account", nulls = Nulls.SKIP) public Builder parentAccount(Optional parentAccount) { this.parentAccount = parentAccount; @@ -855,6 +1229,9 @@ public Builder parentAccount(String parentAccount) { return this; } + /** + *

The company the account belongs to.

+ */ @JsonSetter(value = "company", nulls = Nulls.SKIP) public Builder company(Optional company) { this.company = company; @@ -866,6 +1243,9 @@ public Builder company(String company) { return this; } + /** + *

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.

+ */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/accounting/types/AccountAccountType.java b/src/main/java/com/merge/api/accounting/types/AccountAccountType.java new file mode 100644 index 000000000..2e2bed065 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/AccountAccountType.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = AccountAccountType.Deserializer.class) +public final class AccountAccountType { + private final Object value; + + private final int type; + + private AccountAccountType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((AccountAccountTypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AccountAccountType && equalTo((AccountAccountType) other); + } + + private boolean equalTo(AccountAccountType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static AccountAccountType of(AccountAccountTypeEnum value) { + return new AccountAccountType(value, 0); + } + + public static AccountAccountType of(String value) { + return new AccountAccountType(value, 1); + } + + public interface Visitor { + T visit(AccountAccountTypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(AccountAccountType.class); + } + + @java.lang.Override + public AccountAccountType deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, AccountAccountTypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/AccountClassification.java b/src/main/java/com/merge/api/accounting/types/AccountClassification.java new file mode 100644 index 000000000..f226138e8 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/AccountClassification.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = AccountClassification.Deserializer.class) +public final class AccountClassification { + private final Object value; + + private final int type; + + private AccountClassification(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((ClassificationEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AccountClassification && equalTo((AccountClassification) other); + } + + private boolean equalTo(AccountClassification other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static AccountClassification of(ClassificationEnum value) { + return new AccountClassification(value, 0); + } + + public static AccountClassification of(String value) { + return new AccountClassification(value, 1); + } + + public interface Visitor { + T visit(ClassificationEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(AccountClassification.class); + } + + @java.lang.Override + public AccountClassification deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, ClassificationEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/AccountCurrency.java b/src/main/java/com/merge/api/accounting/types/AccountCurrency.java new file mode 100644 index 000000000..adb57e7ce --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/AccountCurrency.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = AccountCurrency.Deserializer.class) +public final class AccountCurrency { + private final Object value; + + private final int type; + + private AccountCurrency(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((TransactionCurrencyEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AccountCurrency && equalTo((AccountCurrency) other); + } + + private boolean equalTo(AccountCurrency other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static AccountCurrency of(TransactionCurrencyEnum value) { + return new AccountCurrency(value, 0); + } + + public static AccountCurrency of(String value) { + return new AccountCurrency(value, 1); + } + + public interface Visitor { + T visit(TransactionCurrencyEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(AccountCurrency.class); + } + + @java.lang.Override + public AccountCurrency deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TransactionCurrencyEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/AccountDetails.java b/src/main/java/com/merge/api/accounting/types/AccountDetails.java index 5f29b1d18..836f028a9 100644 --- a/src/main/java/com/merge/api/accounting/types/AccountDetails.java +++ b/src/main/java/com/merge/api/accounting/types/AccountDetails.java @@ -340,6 +340,9 @@ public Builder webhookListenerUrl(String webhookListenerUrl) { return this; } + /** + *

Whether a Production Linked Account's credentials match another existing Production Linked Account. This field is null for Test Linked Accounts, incomplete Production Linked Accounts, and ignored duplicate Production Linked Account sets.

+ */ @JsonSetter(value = "is_duplicate", nulls = Nulls.SKIP) public Builder isDuplicate(Optional isDuplicate) { this.isDuplicate = isDuplicate; @@ -362,6 +365,9 @@ public Builder accountType(String accountType) { return this; } + /** + *

The time at which account completes the linking flow.

+ */ @JsonSetter(value = "completed_at", nulls = Nulls.SKIP) public Builder completedAt(Optional completedAt) { this.completedAt = completedAt; diff --git a/src/main/java/com/merge/api/accounting/types/AccountDetailsAndActions.java b/src/main/java/com/merge/api/accounting/types/AccountDetailsAndActions.java index 625686b95..a68e0c32c 100644 --- a/src/main/java/com/merge/api/accounting/types/AccountDetailsAndActions.java +++ b/src/main/java/com/merge/api/accounting/types/AccountDetailsAndActions.java @@ -24,9 +24,9 @@ public final class AccountDetailsAndActions { private final String id; - private final Optional category; + private final Optional category; - private final AccountDetailsAndActionsStatusEnum status; + private final AccountDetailsAndActionsStatus status; private final Optional statusDetail; @@ -52,8 +52,8 @@ public final class AccountDetailsAndActions { private AccountDetailsAndActions( String id, - Optional category, - AccountDetailsAndActionsStatusEnum status, + Optional category, + AccountDetailsAndActionsStatus status, Optional statusDetail, Optional endUserOriginId, String endUserOrganizationName, @@ -87,12 +87,12 @@ public String getId() { } @JsonProperty("category") - public Optional getCategory() { + public Optional getCategory() { return category; } @JsonProperty("status") - public AccountDetailsAndActionsStatusEnum getStatus() { + public AccountDetailsAndActionsStatus getStatus() { return status; } @@ -213,7 +213,7 @@ public interface IdStage { } public interface StatusStage { - EndUserOrganizationNameStage status(@NotNull AccountDetailsAndActionsStatusEnum status); + EndUserOrganizationNameStage status(@NotNull AccountDetailsAndActionsStatus status); } public interface EndUserOrganizationNameStage { @@ -239,9 +239,9 @@ public interface CompletedAtStage { public interface _FinalStage { AccountDetailsAndActions build(); - _FinalStage category(Optional category); + _FinalStage category(Optional category); - _FinalStage category(CategoryEnum category); + _FinalStage category(AccountDetailsAndActionsCategory category); _FinalStage statusDetail(Optional statusDetail); @@ -251,10 +251,16 @@ public interface _FinalStage { _FinalStage endUserOriginId(String endUserOriginId); + /** + *

The tenant or domain the customer has provided access to.

+ */ _FinalStage subdomain(Optional subdomain); _FinalStage subdomain(String subdomain); + /** + *

Whether a Production Linked Account's credentials match another existing Production Linked Account. This field is null for Test Linked Accounts, incomplete Production Linked Accounts, and ignored duplicate Production Linked Account sets.

+ */ _FinalStage isDuplicate(Optional isDuplicate); _FinalStage isDuplicate(Boolean isDuplicate); @@ -276,7 +282,7 @@ public static final class Builder _FinalStage { private String id; - private AccountDetailsAndActionsStatusEnum status; + private AccountDetailsAndActionsStatus status; private String endUserOrganizationName; @@ -298,7 +304,7 @@ public static final class Builder private Optional statusDetail = Optional.empty(); - private Optional category = Optional.empty(); + private Optional category = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -332,7 +338,7 @@ public StatusStage id(@NotNull String id) { @java.lang.Override @JsonSetter("status") - public EndUserOrganizationNameStage status(@NotNull AccountDetailsAndActionsStatusEnum status) { + public EndUserOrganizationNameStage status(@NotNull AccountDetailsAndActionsStatus status) { this.status = status; return this; } @@ -395,6 +401,9 @@ public _FinalStage isDuplicate(Boolean isDuplicate) { return this; } + /** + *

Whether a Production Linked Account's credentials match another existing Production Linked Account. This field is null for Test Linked Accounts, incomplete Production Linked Accounts, and ignored duplicate Production Linked Account sets.

+ */ @java.lang.Override @JsonSetter(value = "is_duplicate", nulls = Nulls.SKIP) public _FinalStage isDuplicate(Optional isDuplicate) { @@ -412,6 +421,9 @@ public _FinalStage subdomain(String subdomain) { return this; } + /** + *

The tenant or domain the customer has provided access to.

+ */ @java.lang.Override @JsonSetter(value = "subdomain", nulls = Nulls.SKIP) public _FinalStage subdomain(Optional subdomain) { @@ -446,14 +458,14 @@ public _FinalStage statusDetail(Optional statusDetail) { } @java.lang.Override - public _FinalStage category(CategoryEnum category) { + public _FinalStage category(AccountDetailsAndActionsCategory category) { this.category = Optional.ofNullable(category); return this; } @java.lang.Override @JsonSetter(value = "category", nulls = Nulls.SKIP) - public _FinalStage category(Optional category) { + public _FinalStage category(Optional category) { this.category = category; return this; } diff --git a/src/main/java/com/merge/api/accounting/types/AccountDetailsAndActionsCategory.java b/src/main/java/com/merge/api/accounting/types/AccountDetailsAndActionsCategory.java new file mode 100644 index 000000000..f6d3c5baa --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/AccountDetailsAndActionsCategory.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = AccountDetailsAndActionsCategory.Deserializer.class) +public final class AccountDetailsAndActionsCategory { + private final Object value; + + private final int type; + + private AccountDetailsAndActionsCategory(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((CategoryEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AccountDetailsAndActionsCategory && equalTo((AccountDetailsAndActionsCategory) other); + } + + private boolean equalTo(AccountDetailsAndActionsCategory other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static AccountDetailsAndActionsCategory of(CategoryEnum value) { + return new AccountDetailsAndActionsCategory(value, 0); + } + + public static AccountDetailsAndActionsCategory of(String value) { + return new AccountDetailsAndActionsCategory(value, 1); + } + + public interface Visitor { + T visit(CategoryEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(AccountDetailsAndActionsCategory.class); + } + + @java.lang.Override + public AccountDetailsAndActionsCategory deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, CategoryEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/AccountDetailsAndActionsStatus.java b/src/main/java/com/merge/api/accounting/types/AccountDetailsAndActionsStatus.java new file mode 100644 index 000000000..0a2ecef48 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/AccountDetailsAndActionsStatus.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = AccountDetailsAndActionsStatus.Deserializer.class) +public final class AccountDetailsAndActionsStatus { + private final Object value; + + private final int type; + + private AccountDetailsAndActionsStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((AccountDetailsAndActionsStatusEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AccountDetailsAndActionsStatus && equalTo((AccountDetailsAndActionsStatus) other); + } + + private boolean equalTo(AccountDetailsAndActionsStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static AccountDetailsAndActionsStatus of(AccountDetailsAndActionsStatusEnum value) { + return new AccountDetailsAndActionsStatus(value, 0); + } + + public static AccountDetailsAndActionsStatus of(String value) { + return new AccountDetailsAndActionsStatus(value, 1); + } + + public interface Visitor { + T visit(AccountDetailsAndActionsStatusEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(AccountDetailsAndActionsStatus.class); + } + + @java.lang.Override + public AccountDetailsAndActionsStatus deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, AccountDetailsAndActionsStatusEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/AccountEndpointRequest.java b/src/main/java/com/merge/api/accounting/types/AccountEndpointRequest.java index a5d9563e9..9126d7c67 100644 --- a/src/main/java/com/merge/api/accounting/types/AccountEndpointRequest.java +++ b/src/main/java/com/merge/api/accounting/types/AccountEndpointRequest.java @@ -99,10 +99,16 @@ public interface ModelStage { public interface _FinalStage { AccountEndpointRequest build(); + /** + *

Whether to include debug fields (such as log file links) in the response.

+ */ _FinalStage isDebugMode(Optional isDebugMode); _FinalStage isDebugMode(Boolean isDebugMode); + /** + *

Whether or not third-party updates should be run asynchronously.

+ */ _FinalStage runAsync(Optional runAsync); _FinalStage runAsync(Boolean runAsync); @@ -146,6 +152,9 @@ public _FinalStage runAsync(Boolean runAsync) { return this; } + /** + *

Whether or not third-party updates should be run asynchronously.

+ */ @java.lang.Override @JsonSetter(value = "run_async", nulls = Nulls.SKIP) public _FinalStage runAsync(Optional runAsync) { @@ -163,6 +172,9 @@ public _FinalStage isDebugMode(Boolean isDebugMode) { return this; } + /** + *

Whether to include debug fields (such as log file links) in the response.

+ */ @java.lang.Override @JsonSetter(value = "is_debug_mode", nulls = Nulls.SKIP) public _FinalStage isDebugMode(Optional isDebugMode) { diff --git a/src/main/java/com/merge/api/accounting/types/AccountIntegration.java b/src/main/java/com/merge/api/accounting/types/AccountIntegration.java index a7f7ebe16..39ca34c2f 100644 --- a/src/main/java/com/merge/api/accounting/types/AccountIntegration.java +++ b/src/main/java/com/merge/api/accounting/types/AccountIntegration.java @@ -196,6 +196,9 @@ public static NameStage builder() { } public interface NameStage { + /** + * Company name. + */ _FinalStage name(@NotNull String name); Builder from(AccountIntegration other); @@ -204,22 +207,37 @@ public interface NameStage { public interface _FinalStage { AccountIntegration build(); + /** + *

Optional. This shortened name appears in places with limited space, usually in conjunction with the platform's logo (e.g., Merge Link menu).<br><br>Example: <i>Workforce Now (in lieu of ADP Workforce Now), SuccessFactors (in lieu of SAP SuccessFactors)</i>

+ */ _FinalStage abbreviatedName(Optional abbreviatedName); _FinalStage abbreviatedName(String abbreviatedName); + /** + *

Category or categories this integration belongs to. Multiple categories should be comma separated, i.e. [ats, hris].

+ */ _FinalStage categories(Optional> categories); _FinalStage categories(List categories); + /** + *

Company logo in rectangular shape.

+ */ _FinalStage image(Optional image); _FinalStage image(String image); + /** + *

Company logo in square shape.

+ */ _FinalStage squareImage(Optional squareImage); _FinalStage squareImage(String squareImage); + /** + *

The color of this integration used for buttons and text throughout the app and landing pages. <b>Choose a darker, saturated color.</b>

+ */ _FinalStage color(Optional color); _FinalStage color(String color); @@ -228,14 +246,23 @@ public interface _FinalStage { _FinalStage slug(String slug); + /** + *

Mapping of API endpoints to documentation urls for support. Example: {'GET': [['/common-model-scopes', 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], 'POST': []}

+ */ _FinalStage apiEndpointsToDocumentationUrls(Optional> apiEndpointsToDocumentationUrls); _FinalStage apiEndpointsToDocumentationUrls(Map apiEndpointsToDocumentationUrls); + /** + *

Setup guide URL for third party webhook creation. Exposed in Merge Docs.

+ */ _FinalStage webhookSetupGuideUrl(Optional webhookSetupGuideUrl); _FinalStage webhookSetupGuideUrl(String webhookSetupGuideUrl); + /** + *

Category or categories this integration is in beta status for.

+ */ _FinalStage categoryBetaStatus(Optional> categoryBetaStatus); _FinalStage categoryBetaStatus(Map categoryBetaStatus); @@ -284,7 +311,7 @@ public Builder from(AccountIntegration other) { } /** - *

Company name.

+ * Company name.

Company name.

* @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -304,6 +331,9 @@ public _FinalStage categoryBetaStatus(Map categoryBetaStatus) return this; } + /** + *

Category or categories this integration is in beta status for.

+ */ @java.lang.Override @JsonSetter(value = "category_beta_status", nulls = Nulls.SKIP) public _FinalStage categoryBetaStatus(Optional> categoryBetaStatus) { @@ -321,6 +351,9 @@ public _FinalStage webhookSetupGuideUrl(String webhookSetupGuideUrl) { return this; } + /** + *

Setup guide URL for third party webhook creation. Exposed in Merge Docs.

+ */ @java.lang.Override @JsonSetter(value = "webhook_setup_guide_url", nulls = Nulls.SKIP) public _FinalStage webhookSetupGuideUrl(Optional webhookSetupGuideUrl) { @@ -338,6 +371,9 @@ public _FinalStage apiEndpointsToDocumentationUrls(Map apiEndp return this; } + /** + *

Mapping of API endpoints to documentation urls for support. Example: {'GET': [['/common-model-scopes', 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], 'POST': []}

+ */ @java.lang.Override @JsonSetter(value = "api_endpoints_to_documentation_urls", nulls = Nulls.SKIP) public _FinalStage apiEndpointsToDocumentationUrls( @@ -369,6 +405,9 @@ public _FinalStage color(String color) { return this; } + /** + *

The color of this integration used for buttons and text throughout the app and landing pages. <b>Choose a darker, saturated color.</b>

+ */ @java.lang.Override @JsonSetter(value = "color", nulls = Nulls.SKIP) public _FinalStage color(Optional color) { @@ -386,6 +425,9 @@ public _FinalStage squareImage(String squareImage) { return this; } + /** + *

Company logo in square shape.

+ */ @java.lang.Override @JsonSetter(value = "square_image", nulls = Nulls.SKIP) public _FinalStage squareImage(Optional squareImage) { @@ -403,6 +445,9 @@ public _FinalStage image(String image) { return this; } + /** + *

Company logo in rectangular shape.

+ */ @java.lang.Override @JsonSetter(value = "image", nulls = Nulls.SKIP) public _FinalStage image(Optional image) { @@ -420,6 +465,9 @@ public _FinalStage categories(List categories) { return this; } + /** + *

Category or categories this integration belongs to. Multiple categories should be comma separated, i.e. [ats, hris].

+ */ @java.lang.Override @JsonSetter(value = "categories", nulls = Nulls.SKIP) public _FinalStage categories(Optional> categories) { @@ -437,6 +485,9 @@ public _FinalStage abbreviatedName(String abbreviatedName) { return this; } + /** + *

Optional. This shortened name appears in places with limited space, usually in conjunction with the platform's logo (e.g., Merge Link menu).<br><br>Example: <i>Workforce Now (in lieu of ADP Workforce Now), SuccessFactors (in lieu of SAP SuccessFactors)</i>

+ */ @java.lang.Override @JsonSetter(value = "abbreviated_name", nulls = Nulls.SKIP) public _FinalStage abbreviatedName(Optional abbreviatedName) { diff --git a/src/main/java/com/merge/api/accounting/types/AccountRequest.java b/src/main/java/com/merge/api/accounting/types/AccountRequest.java index 71278bee2..752ffe961 100644 --- a/src/main/java/com/merge/api/accounting/types/AccountRequest.java +++ b/src/main/java/com/merge/api/accounting/types/AccountRequest.java @@ -25,17 +25,17 @@ public final class AccountRequest { private final Optional description; - private final Optional classification; + private final Optional classification; private final Optional type; - private final Optional accountType; + private final Optional accountType; - private final Optional status; + private final Optional status; private final Optional currentBalance; - private final Optional currency; + private final Optional currency; private final Optional accountNumber; @@ -52,12 +52,12 @@ public final class AccountRequest { private AccountRequest( Optional name, Optional description, - Optional classification, + Optional classification, Optional type, - Optional accountType, - Optional status, + Optional accountType, + Optional status, Optional currentBalance, - Optional currency, + Optional currency, Optional accountNumber, Optional parentAccount, Optional company, @@ -107,7 +107,7 @@ public Optional getDescription() { * */ @JsonProperty("classification") - public Optional getClassification() { + public Optional getClassification() { return classification; } @@ -138,7 +138,7 @@ public Optional getType() { * */ @JsonProperty("account_type") - public Optional getAccountType() { + public Optional getAccountType() { return accountType; } @@ -151,7 +151,7 @@ public Optional getAccountType() { * */ @JsonProperty("status") - public Optional getStatus() { + public Optional getStatus() { return status; } @@ -475,7 +475,7 @@ public Optional getCurrentBalance() { * */ @JsonProperty("currency") - public Optional getCurrency() { + public Optional getCurrency() { return currency; } @@ -573,17 +573,17 @@ public static final class Builder { private Optional description = Optional.empty(); - private Optional classification = Optional.empty(); + private Optional classification = Optional.empty(); private Optional type = Optional.empty(); - private Optional accountType = Optional.empty(); + private Optional accountType = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Optional currentBalance = Optional.empty(); - private Optional currency = Optional.empty(); + private Optional currency = Optional.empty(); private Optional accountNumber = Optional.empty(); @@ -617,6 +617,9 @@ public Builder from(AccountRequest other) { return this; } + /** + *

The account's name.

+ */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -628,6 +631,9 @@ public Builder name(String name) { return this; } + /** + *

The account's description.

+ */ @JsonSetter(value = "description", nulls = Nulls.SKIP) public Builder description(Optional description) { this.description = description; @@ -639,17 +645,30 @@ public Builder description(String description) { return this; } + /** + *

The account's broadest grouping.

+ *
    + *
  • ASSET - ASSET
  • + *
  • EQUITY - EQUITY
  • + *
  • EXPENSE - EXPENSE
  • + *
  • LIABILITY - LIABILITY
  • + *
  • REVENUE - REVENUE
  • + *
+ */ @JsonSetter(value = "classification", nulls = Nulls.SKIP) - public Builder classification(Optional classification) { + public Builder classification(Optional classification) { this.classification = classification; return this; } - public Builder classification(ClassificationEnum classification) { + public Builder classification(AccountRequestClassification classification) { this.classification = Optional.ofNullable(classification); return this; } + /** + *

The account's type is a narrower and more specific grouping within the account's classification.

+ */ @JsonSetter(value = "type", nulls = Nulls.SKIP) public Builder type(Optional type) { this.type = type; @@ -661,28 +680,57 @@ public Builder type(String type) { return this; } + /** + *

Normalized account type- which is a narrower and more specific grouping within the account's classification.

+ *
    + *
  • BANK - BANK
  • + *
  • CREDIT_CARD - CREDIT_CARD
  • + *
  • ACCOUNTS_PAYABLE - ACCOUNTS_PAYABLE
  • + *
  • ACCOUNTS_RECEIVABLE - ACCOUNTS_RECEIVABLE
  • + *
  • FIXED_ASSET - FIXED_ASSET
  • + *
  • OTHER_ASSET - OTHER_ASSET
  • + *
  • OTHER_CURRENT_ASSET - OTHER_CURRENT_ASSET
  • + *
  • OTHER_EXPENSE - OTHER_EXPENSE
  • + *
  • OTHER_INCOME - OTHER_INCOME
  • + *
  • COST_OF_GOODS_SOLD - COST_OF_GOODS_SOLD
  • + *
  • OTHER_CURRENT_LIABILITY - OTHER_CURRENT_LIABILITY
  • + *
  • LONG_TERM_LIABILITY - LONG_TERM_LIABILITY
  • + *
  • NON_POSTING - NON_POSTING
  • + *
+ */ @JsonSetter(value = "account_type", nulls = Nulls.SKIP) - public Builder accountType(Optional accountType) { + public Builder accountType(Optional accountType) { this.accountType = accountType; return this; } - public Builder accountType(AccountAccountTypeEnum accountType) { + public Builder accountType(AccountRequestAccountType accountType) { this.accountType = Optional.ofNullable(accountType); return this; } + /** + *

The account's status.

+ *
    + *
  • ACTIVE - ACTIVE
  • + *
  • PENDING - PENDING
  • + *
  • INACTIVE - INACTIVE
  • + *
+ */ @JsonSetter(value = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { + public Builder status(Optional status) { this.status = status; return this; } - public Builder status(AccountStatusEnum status) { + public Builder status(AccountRequestStatus status) { this.status = Optional.ofNullable(status); return this; } + /** + *

The account's current balance.

+ */ @JsonSetter(value = "current_balance", nulls = Nulls.SKIP) public Builder currentBalance(Optional currentBalance) { this.currentBalance = currentBalance; @@ -694,17 +742,331 @@ public Builder currentBalance(Double currentBalance) { return this; } + /** + *

The account's currency.

+ *
    + *
  • XUA - ADB Unit of Account
  • + *
  • AFN - Afghan Afghani
  • + *
  • AFA - Afghan Afghani (1927–2002)
  • + *
  • ALL - Albanian Lek
  • + *
  • ALK - Albanian Lek (1946–1965)
  • + *
  • DZD - Algerian Dinar
  • + *
  • ADP - Andorran Peseta
  • + *
  • AOA - Angolan Kwanza
  • + *
  • AOK - Angolan Kwanza (1977–1991)
  • + *
  • AON - Angolan New Kwanza (1990–2000)
  • + *
  • AOR - Angolan Readjusted Kwanza (1995–1999)
  • + *
  • ARA - Argentine Austral
  • + *
  • ARS - Argentine Peso
  • + *
  • ARM - Argentine Peso (1881–1970)
  • + *
  • ARP - Argentine Peso (1983–1985)
  • + *
  • ARL - Argentine Peso Ley (1970–1983)
  • + *
  • AMD - Armenian Dram
  • + *
  • AWG - Aruban Florin
  • + *
  • AUD - Australian Dollar
  • + *
  • ATS - Austrian Schilling
  • + *
  • AZN - Azerbaijani Manat
  • + *
  • AZM - Azerbaijani Manat (1993–2006)
  • + *
  • BSD - Bahamian Dollar
  • + *
  • BHD - Bahraini Dinar
  • + *
  • BDT - Bangladeshi Taka
  • + *
  • BBD - Barbadian Dollar
  • + *
  • BYN - Belarusian Ruble
  • + *
  • BYB - Belarusian Ruble (1994–1999)
  • + *
  • BYR - Belarusian Ruble (2000–2016)
  • + *
  • BEF - Belgian Franc
  • + *
  • BEC - Belgian Franc (convertible)
  • + *
  • BEL - Belgian Franc (financial)
  • + *
  • BZD - Belize Dollar
  • + *
  • BMD - Bermudan Dollar
  • + *
  • BTN - Bhutanese Ngultrum
  • + *
  • BOB - Bolivian Boliviano
  • + *
  • BOL - Bolivian Boliviano (1863–1963)
  • + *
  • BOV - Bolivian Mvdol
  • + *
  • BOP - Bolivian Peso
  • + *
  • BAM - Bosnia-Herzegovina Convertible Mark
  • + *
  • BAD - Bosnia-Herzegovina Dinar (1992–1994)
  • + *
  • BAN - Bosnia-Herzegovina New Dinar (1994–1997)
  • + *
  • BWP - Botswanan Pula
  • + *
  • BRC - Brazilian Cruzado (1986–1989)
  • + *
  • BRZ - Brazilian Cruzeiro (1942–1967)
  • + *
  • BRE - Brazilian Cruzeiro (1990–1993)
  • + *
  • BRR - Brazilian Cruzeiro (1993–1994)
  • + *
  • BRN - Brazilian New Cruzado (1989–1990)
  • + *
  • BRB - Brazilian New Cruzeiro (1967–1986)
  • + *
  • BRL - Brazilian Real
  • + *
  • GBP - British Pound
  • + *
  • BND - Brunei Dollar
  • + *
  • BGL - Bulgarian Hard Lev
  • + *
  • BGN - Bulgarian Lev
  • + *
  • BGO - Bulgarian Lev (1879–1952)
  • + *
  • BGM - Bulgarian Socialist Lev
  • + *
  • BUK - Burmese Kyat
  • + *
  • BIF - Burundian Franc
  • + *
  • XPF - CFP Franc
  • + *
  • KHR - Cambodian Riel
  • + *
  • CAD - Canadian Dollar
  • + *
  • CVE - Cape Verdean Escudo
  • + *
  • KYD - Cayman Islands Dollar
  • + *
  • XAF - Central African CFA Franc
  • + *
  • CLE - Chilean Escudo
  • + *
  • CLP - Chilean Peso
  • + *
  • CLF - Chilean Unit of Account (UF)
  • + *
  • CNX - Chinese People’s Bank Dollar
  • + *
  • CNY - Chinese Yuan
  • + *
  • CNH - Chinese Yuan (offshore)
  • + *
  • COP - Colombian Peso
  • + *
  • COU - Colombian Real Value Unit
  • + *
  • KMF - Comorian Franc
  • + *
  • CDF - Congolese Franc
  • + *
  • CRC - Costa Rican Colón
  • + *
  • HRD - Croatian Dinar
  • + *
  • HRK - Croatian Kuna
  • + *
  • CUC - Cuban Convertible Peso
  • + *
  • CUP - Cuban Peso
  • + *
  • CYP - Cypriot Pound
  • + *
  • CZK - Czech Koruna
  • + *
  • CSK - Czechoslovak Hard Koruna
  • + *
  • DKK - Danish Krone
  • + *
  • DJF - Djiboutian Franc
  • + *
  • DOP - Dominican Peso
  • + *
  • NLG - Dutch Guilder
  • + *
  • XCD - East Caribbean Dollar
  • + *
  • DDM - East German Mark
  • + *
  • ECS - Ecuadorian Sucre
  • + *
  • ECV - Ecuadorian Unit of Constant Value
  • + *
  • EGP - Egyptian Pound
  • + *
  • GQE - Equatorial Guinean Ekwele
  • + *
  • ERN - Eritrean Nakfa
  • + *
  • EEK - Estonian Kroon
  • + *
  • ETB - Ethiopian Birr
  • + *
  • EUR - Euro
  • + *
  • XBA - European Composite Unit
  • + *
  • XEU - European Currency Unit
  • + *
  • XBB - European Monetary Unit
  • + *
  • XBC - European Unit of Account (XBC)
  • + *
  • XBD - European Unit of Account (XBD)
  • + *
  • FKP - Falkland Islands Pound
  • + *
  • FJD - Fijian Dollar
  • + *
  • FIM - Finnish Markka
  • + *
  • FRF - French Franc
  • + *
  • XFO - French Gold Franc
  • + *
  • XFU - French UIC-Franc
  • + *
  • GMD - Gambian Dalasi
  • + *
  • GEK - Georgian Kupon Larit
  • + *
  • GEL - Georgian Lari
  • + *
  • DEM - German Mark
  • + *
  • GHS - Ghanaian Cedi
  • + *
  • GHC - Ghanaian Cedi (1979–2007)
  • + *
  • GIP - Gibraltar Pound
  • + *
  • XAU - Gold
  • + *
  • GRD - Greek Drachma
  • + *
  • GTQ - Guatemalan Quetzal
  • + *
  • GWP - Guinea-Bissau Peso
  • + *
  • GNF - Guinean Franc
  • + *
  • GNS - Guinean Syli
  • + *
  • GYD - Guyanaese Dollar
  • + *
  • HTG - Haitian Gourde
  • + *
  • HNL - Honduran Lempira
  • + *
  • HKD - Hong Kong Dollar
  • + *
  • HUF - Hungarian Forint
  • + *
  • IMP - IMP
  • + *
  • ISK - Icelandic Króna
  • + *
  • ISJ - Icelandic Króna (1918–1981)
  • + *
  • INR - Indian Rupee
  • + *
  • IDR - Indonesian Rupiah
  • + *
  • IRR - Iranian Rial
  • + *
  • IQD - Iraqi Dinar
  • + *
  • IEP - Irish Pound
  • + *
  • ILS - Israeli New Shekel
  • + *
  • ILP - Israeli Pound
  • + *
  • ILR - Israeli Shekel (1980–1985)
  • + *
  • ITL - Italian Lira
  • + *
  • JMD - Jamaican Dollar
  • + *
  • JPY - Japanese Yen
  • + *
  • JOD - Jordanian Dinar
  • + *
  • KZT - Kazakhstani Tenge
  • + *
  • KES - Kenyan Shilling
  • + *
  • KWD - Kuwaiti Dinar
  • + *
  • KGS - Kyrgystani Som
  • + *
  • LAK - Laotian Kip
  • + *
  • LVL - Latvian Lats
  • + *
  • LVR - Latvian Ruble
  • + *
  • LBP - Lebanese Pound
  • + *
  • LSL - Lesotho Loti
  • + *
  • LRD - Liberian Dollar
  • + *
  • LYD - Libyan Dinar
  • + *
  • LTL - Lithuanian Litas
  • + *
  • LTT - Lithuanian Talonas
  • + *
  • LUL - Luxembourg Financial Franc
  • + *
  • LUC - Luxembourgian Convertible Franc
  • + *
  • LUF - Luxembourgian Franc
  • + *
  • MOP - Macanese Pataca
  • + *
  • MKD - Macedonian Denar
  • + *
  • MKN - Macedonian Denar (1992–1993)
  • + *
  • MGA - Malagasy Ariary
  • + *
  • MGF - Malagasy Franc
  • + *
  • MWK - Malawian Kwacha
  • + *
  • MYR - Malaysian Ringgit
  • + *
  • MVR - Maldivian Rufiyaa
  • + *
  • MVP - Maldivian Rupee (1947–1981)
  • + *
  • MLF - Malian Franc
  • + *
  • MTL - Maltese Lira
  • + *
  • MTP - Maltese Pound
  • + *
  • MRU - Mauritanian Ouguiya
  • + *
  • MRO - Mauritanian Ouguiya (1973–2017)
  • + *
  • MUR - Mauritian Rupee
  • + *
  • MXV - Mexican Investment Unit
  • + *
  • MXN - Mexican Peso
  • + *
  • MXP - Mexican Silver Peso (1861–1992)
  • + *
  • MDC - Moldovan Cupon
  • + *
  • MDL - Moldovan Leu
  • + *
  • MCF - Monegasque Franc
  • + *
  • MNT - Mongolian Tugrik
  • + *
  • MAD - Moroccan Dirham
  • + *
  • MAF - Moroccan Franc
  • + *
  • MZE - Mozambican Escudo
  • + *
  • MZN - Mozambican Metical
  • + *
  • MZM - Mozambican Metical (1980–2006)
  • + *
  • MMK - Myanmar Kyat
  • + *
  • NAD - Namibian Dollar
  • + *
  • NPR - Nepalese Rupee
  • + *
  • ANG - Netherlands Antillean Guilder
  • + *
  • TWD - New Taiwan Dollar
  • + *
  • NZD - New Zealand Dollar
  • + *
  • NIO - Nicaraguan Córdoba
  • + *
  • NIC - Nicaraguan Córdoba (1988–1991)
  • + *
  • NGN - Nigerian Naira
  • + *
  • KPW - North Korean Won
  • + *
  • NOK - Norwegian Krone
  • + *
  • OMR - Omani Rial
  • + *
  • PKR - Pakistani Rupee
  • + *
  • XPD - Palladium
  • + *
  • PAB - Panamanian Balboa
  • + *
  • PGK - Papua New Guinean Kina
  • + *
  • PYG - Paraguayan Guarani
  • + *
  • PEI - Peruvian Inti
  • + *
  • PEN - Peruvian Sol
  • + *
  • PES - Peruvian Sol (1863–1965)
  • + *
  • PHP - Philippine Peso
  • + *
  • XPT - Platinum
  • + *
  • PLN - Polish Zloty
  • + *
  • PLZ - Polish Zloty (1950–1995)
  • + *
  • PTE - Portuguese Escudo
  • + *
  • GWE - Portuguese Guinea Escudo
  • + *
  • QAR - Qatari Rial
  • + *
  • XRE - RINET Funds
  • + *
  • RHD - Rhodesian Dollar
  • + *
  • RON - Romanian Leu
  • + *
  • ROL - Romanian Leu (1952–2006)
  • + *
  • RUB - Russian Ruble
  • + *
  • RUR - Russian Ruble (1991–1998)
  • + *
  • RWF - Rwandan Franc
  • + *
  • SVC - Salvadoran Colón
  • + *
  • WST - Samoan Tala
  • + *
  • SAR - Saudi Riyal
  • + *
  • RSD - Serbian Dinar
  • + *
  • CSD - Serbian Dinar (2002–2006)
  • + *
  • SCR - Seychellois Rupee
  • + *
  • SLL - Sierra Leonean Leone
  • + *
  • XAG - Silver
  • + *
  • SGD - Singapore Dollar
  • + *
  • SKK - Slovak Koruna
  • + *
  • SIT - Slovenian Tolar
  • + *
  • SBD - Solomon Islands Dollar
  • + *
  • SOS - Somali Shilling
  • + *
  • ZAR - South African Rand
  • + *
  • ZAL - South African Rand (financial)
  • + *
  • KRH - South Korean Hwan (1953–1962)
  • + *
  • KRW - South Korean Won
  • + *
  • KRO - South Korean Won (1945–1953)
  • + *
  • SSP - South Sudanese Pound
  • + *
  • SUR - Soviet Rouble
  • + *
  • ESP - Spanish Peseta
  • + *
  • ESA - Spanish Peseta (A account)
  • + *
  • ESB - Spanish Peseta (convertible account)
  • + *
  • XDR - Special Drawing Rights
  • + *
  • LKR - Sri Lankan Rupee
  • + *
  • SHP - St. Helena Pound
  • + *
  • XSU - Sucre
  • + *
  • SDD - Sudanese Dinar (1992–2007)
  • + *
  • SDG - Sudanese Pound
  • + *
  • SDP - Sudanese Pound (1957–1998)
  • + *
  • SRD - Surinamese Dollar
  • + *
  • SRG - Surinamese Guilder
  • + *
  • SZL - Swazi Lilangeni
  • + *
  • SEK - Swedish Krona
  • + *
  • CHF - Swiss Franc
  • + *
  • SYP - Syrian Pound
  • + *
  • STN - São Tomé & Príncipe Dobra
  • + *
  • STD - São Tomé & Príncipe Dobra (1977–2017)
  • + *
  • TVD - TVD
  • + *
  • TJR - Tajikistani Ruble
  • + *
  • TJS - Tajikistani Somoni
  • + *
  • TZS - Tanzanian Shilling
  • + *
  • XTS - Testing Currency Code
  • + *
  • THB - Thai Baht
  • + *
  • XXX - The codes assigned for transactions where no currency is involved
  • + *
  • TPE - Timorese Escudo
  • + *
  • TOP - Tongan Paʻanga
  • + *
  • TTD - Trinidad & Tobago Dollar
  • + *
  • TND - Tunisian Dinar
  • + *
  • TRY - Turkish Lira
  • + *
  • TRL - Turkish Lira (1922–2005)
  • + *
  • TMT - Turkmenistani Manat
  • + *
  • TMM - Turkmenistani Manat (1993–2009)
  • + *
  • USD - US Dollar
  • + *
  • USN - US Dollar (Next day)
  • + *
  • USS - US Dollar (Same day)
  • + *
  • UGX - Ugandan Shilling
  • + *
  • UGS - Ugandan Shilling (1966–1987)
  • + *
  • UAH - Ukrainian Hryvnia
  • + *
  • UAK - Ukrainian Karbovanets
  • + *
  • AED - United Arab Emirates Dirham
  • + *
  • UYW - Uruguayan Nominal Wage Index Unit
  • + *
  • UYU - Uruguayan Peso
  • + *
  • UYP - Uruguayan Peso (1975–1993)
  • + *
  • UYI - Uruguayan Peso (Indexed Units)
  • + *
  • UZS - Uzbekistani Som
  • + *
  • VUV - Vanuatu Vatu
  • + *
  • VES - Venezuelan Bolívar
  • + *
  • VEB - Venezuelan Bolívar (1871–2008)
  • + *
  • VEF - Venezuelan Bolívar (2008–2018)
  • + *
  • VND - Vietnamese Dong
  • + *
  • VNN - Vietnamese Dong (1978–1985)
  • + *
  • CHE - WIR Euro
  • + *
  • CHW - WIR Franc
  • + *
  • XOF - West African CFA Franc
  • + *
  • YDD - Yemeni Dinar
  • + *
  • YER - Yemeni Rial
  • + *
  • YUN - Yugoslavian Convertible Dinar (1990–1992)
  • + *
  • YUD - Yugoslavian Hard Dinar (1966–1990)
  • + *
  • YUM - Yugoslavian New Dinar (1994–2002)
  • + *
  • YUR - Yugoslavian Reformed Dinar (1992–1993)
  • + *
  • ZWN - ZWN
  • + *
  • ZRN - Zairean New Zaire (1993–1998)
  • + *
  • ZRZ - Zairean Zaire (1971–1993)
  • + *
  • ZMW - Zambian Kwacha
  • + *
  • ZMK - Zambian Kwacha (1968–2012)
  • + *
  • ZWD - Zimbabwean Dollar (1980–2008)
  • + *
  • ZWR - Zimbabwean Dollar (2008)
  • + *
  • ZWL - Zimbabwean Dollar (2009)
  • + *
+ */ @JsonSetter(value = "currency", nulls = Nulls.SKIP) - public Builder currency(Optional currency) { + public Builder currency(Optional currency) { this.currency = currency; return this; } - public Builder currency(TransactionCurrencyEnum currency) { + public Builder currency(AccountRequestCurrency currency) { this.currency = Optional.ofNullable(currency); return this; } + /** + *

The account's number.

+ */ @JsonSetter(value = "account_number", nulls = Nulls.SKIP) public Builder accountNumber(Optional accountNumber) { this.accountNumber = accountNumber; @@ -716,6 +1078,9 @@ public Builder accountNumber(String accountNumber) { return this; } + /** + *

ID of the parent account.

+ */ @JsonSetter(value = "parent_account", nulls = Nulls.SKIP) public Builder parentAccount(Optional parentAccount) { this.parentAccount = parentAccount; @@ -727,6 +1092,9 @@ public Builder parentAccount(String parentAccount) { return this; } + /** + *

The company the account belongs to.

+ */ @JsonSetter(value = "company", nulls = Nulls.SKIP) public Builder company(Optional company) { this.company = company; diff --git a/src/main/java/com/merge/api/accounting/types/AccountRequestAccountType.java b/src/main/java/com/merge/api/accounting/types/AccountRequestAccountType.java new file mode 100644 index 000000000..2bc3757bd --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/AccountRequestAccountType.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = AccountRequestAccountType.Deserializer.class) +public final class AccountRequestAccountType { + private final Object value; + + private final int type; + + private AccountRequestAccountType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((AccountAccountTypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AccountRequestAccountType && equalTo((AccountRequestAccountType) other); + } + + private boolean equalTo(AccountRequestAccountType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static AccountRequestAccountType of(AccountAccountTypeEnum value) { + return new AccountRequestAccountType(value, 0); + } + + public static AccountRequestAccountType of(String value) { + return new AccountRequestAccountType(value, 1); + } + + public interface Visitor { + T visit(AccountAccountTypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(AccountRequestAccountType.class); + } + + @java.lang.Override + public AccountRequestAccountType deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, AccountAccountTypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/AccountRequestClassification.java b/src/main/java/com/merge/api/accounting/types/AccountRequestClassification.java new file mode 100644 index 000000000..6c1b1add9 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/AccountRequestClassification.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = AccountRequestClassification.Deserializer.class) +public final class AccountRequestClassification { + private final Object value; + + private final int type; + + private AccountRequestClassification(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((ClassificationEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AccountRequestClassification && equalTo((AccountRequestClassification) other); + } + + private boolean equalTo(AccountRequestClassification other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static AccountRequestClassification of(ClassificationEnum value) { + return new AccountRequestClassification(value, 0); + } + + public static AccountRequestClassification of(String value) { + return new AccountRequestClassification(value, 1); + } + + public interface Visitor { + T visit(ClassificationEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(AccountRequestClassification.class); + } + + @java.lang.Override + public AccountRequestClassification deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, ClassificationEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/AccountRequestCurrency.java b/src/main/java/com/merge/api/accounting/types/AccountRequestCurrency.java new file mode 100644 index 000000000..d72843bd4 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/AccountRequestCurrency.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = AccountRequestCurrency.Deserializer.class) +public final class AccountRequestCurrency { + private final Object value; + + private final int type; + + private AccountRequestCurrency(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((TransactionCurrencyEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AccountRequestCurrency && equalTo((AccountRequestCurrency) other); + } + + private boolean equalTo(AccountRequestCurrency other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static AccountRequestCurrency of(TransactionCurrencyEnum value) { + return new AccountRequestCurrency(value, 0); + } + + public static AccountRequestCurrency of(String value) { + return new AccountRequestCurrency(value, 1); + } + + public interface Visitor { + T visit(TransactionCurrencyEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(AccountRequestCurrency.class); + } + + @java.lang.Override + public AccountRequestCurrency deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TransactionCurrencyEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/AccountRequestStatus.java b/src/main/java/com/merge/api/accounting/types/AccountRequestStatus.java new file mode 100644 index 000000000..2aedbbf80 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/AccountRequestStatus.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = AccountRequestStatus.Deserializer.class) +public final class AccountRequestStatus { + private final Object value; + + private final int type; + + private AccountRequestStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((AccountStatusEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AccountRequestStatus && equalTo((AccountRequestStatus) other); + } + + private boolean equalTo(AccountRequestStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static AccountRequestStatus of(AccountStatusEnum value) { + return new AccountRequestStatus(value, 0); + } + + public static AccountRequestStatus of(String value) { + return new AccountRequestStatus(value, 1); + } + + public interface Visitor { + T visit(AccountStatusEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(AccountRequestStatus.class); + } + + @java.lang.Override + public AccountRequestStatus deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, AccountStatusEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/AccountStatus.java b/src/main/java/com/merge/api/accounting/types/AccountStatus.java new file mode 100644 index 000000000..c779e73d1 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/AccountStatus.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = AccountStatus.Deserializer.class) +public final class AccountStatus { + private final Object value; + + private final int type; + + private AccountStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((AccountStatusEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AccountStatus && equalTo((AccountStatus) other); + } + + private boolean equalTo(AccountStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static AccountStatus of(AccountStatusEnum value) { + return new AccountStatus(value, 0); + } + + public static AccountStatus of(String value) { + return new AccountStatus(value, 1); + } + + public interface Visitor { + T visit(AccountStatusEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(AccountStatus.class); + } + + @java.lang.Override + public AccountStatus deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, AccountStatusEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/AccountingAttachment.java b/src/main/java/com/merge/api/accounting/types/AccountingAttachment.java index 1f91d6e7b..42d25d61b 100644 --- a/src/main/java/com/merge/api/accounting/types/AccountingAttachment.java +++ b/src/main/java/com/merge/api/accounting/types/AccountingAttachment.java @@ -241,6 +241,9 @@ public Builder id(String id) { return this; } + /** + *

The third-party API ID of the matching object.

+ */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -252,6 +255,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

The datetime that this object was created by Merge.

+ */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -263,6 +269,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

The datetime that this object was modified by Merge.

+ */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -274,6 +283,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

The attachment's name.

+ */ @JsonSetter(value = "file_name", nulls = Nulls.SKIP) public Builder fileName(Optional fileName) { this.fileName = fileName; @@ -285,6 +297,9 @@ public Builder fileName(String fileName) { return this; } + /** + *

The attachment's url.

+ */ @JsonSetter(value = "file_url", nulls = Nulls.SKIP) public Builder fileUrl(Optional fileUrl) { this.fileUrl = fileUrl; @@ -296,6 +311,9 @@ public Builder fileUrl(String fileUrl) { return this; } + /** + *

The company the accounting attachment belongs to.

+ */ @JsonSetter(value = "company", nulls = Nulls.SKIP) public Builder company(Optional company) { this.company = company; @@ -307,6 +325,9 @@ public Builder company(String company) { return this; } + /** + *

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.

+ */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/accounting/types/AccountingAttachmentEndpointRequest.java b/src/main/java/com/merge/api/accounting/types/AccountingAttachmentEndpointRequest.java index a39abbd05..95e2e7bdf 100644 --- a/src/main/java/com/merge/api/accounting/types/AccountingAttachmentEndpointRequest.java +++ b/src/main/java/com/merge/api/accounting/types/AccountingAttachmentEndpointRequest.java @@ -100,10 +100,16 @@ public interface ModelStage { public interface _FinalStage { AccountingAttachmentEndpointRequest build(); + /** + *

Whether to include debug fields (such as log file links) in the response.

+ */ _FinalStage isDebugMode(Optional isDebugMode); _FinalStage isDebugMode(Boolean isDebugMode); + /** + *

Whether or not third-party updates should be run asynchronously.

+ */ _FinalStage runAsync(Optional runAsync); _FinalStage runAsync(Boolean runAsync); @@ -147,6 +153,9 @@ public _FinalStage runAsync(Boolean runAsync) { return this; } + /** + *

Whether or not third-party updates should be run asynchronously.

+ */ @java.lang.Override @JsonSetter(value = "run_async", nulls = Nulls.SKIP) public _FinalStage runAsync(Optional runAsync) { @@ -164,6 +173,9 @@ public _FinalStage isDebugMode(Boolean isDebugMode) { return this; } + /** + *

Whether to include debug fields (such as log file links) in the response.

+ */ @java.lang.Override @JsonSetter(value = "is_debug_mode", nulls = Nulls.SKIP) public _FinalStage isDebugMode(Optional isDebugMode) { diff --git a/src/main/java/com/merge/api/accounting/types/AccountingAttachmentRequest.java b/src/main/java/com/merge/api/accounting/types/AccountingAttachmentRequest.java index 2a5cf4d2f..e29e73ef6 100644 --- a/src/main/java/com/merge/api/accounting/types/AccountingAttachmentRequest.java +++ b/src/main/java/com/merge/api/accounting/types/AccountingAttachmentRequest.java @@ -142,6 +142,9 @@ public Builder from(AccountingAttachmentRequest other) { return this; } + /** + *

The attachment's name.

+ */ @JsonSetter(value = "file_name", nulls = Nulls.SKIP) public Builder fileName(Optional fileName) { this.fileName = fileName; @@ -153,6 +156,9 @@ public Builder fileName(String fileName) { return this; } + /** + *

The attachment's url.

+ */ @JsonSetter(value = "file_url", nulls = Nulls.SKIP) public Builder fileUrl(Optional fileUrl) { this.fileUrl = fileUrl; @@ -164,6 +170,9 @@ public Builder fileUrl(String fileUrl) { return this; } + /** + *

The company the accounting attachment belongs to.

+ */ @JsonSetter(value = "company", nulls = Nulls.SKIP) public Builder company(Optional company) { this.company = company; diff --git a/src/main/java/com/merge/api/accounting/types/AccountingPeriod.java b/src/main/java/com/merge/api/accounting/types/AccountingPeriod.java index 5b4e836fe..e8e1c31a3 100644 --- a/src/main/java/com/merge/api/accounting/types/AccountingPeriod.java +++ b/src/main/java/com/merge/api/accounting/types/AccountingPeriod.java @@ -33,7 +33,7 @@ public final class AccountingPeriod { private final Optional name; - private final Optional status; + private final Optional status; private final Optional startDate; @@ -51,7 +51,7 @@ private AccountingPeriod( Optional createdAt, Optional modifiedAt, Optional name, - Optional status, + Optional status, Optional startDate, Optional endDate, Optional> fieldMappings, @@ -108,7 +108,7 @@ public Optional getName() { } @JsonProperty("status") - public Optional getStatus() { + public Optional getStatus() { return status; } @@ -198,7 +198,7 @@ public static final class Builder { private Optional name = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Optional startDate = Optional.empty(); @@ -238,6 +238,9 @@ public Builder id(String id) { return this; } + /** + *

The third-party API ID of the matching object.

+ */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -249,6 +252,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

The datetime that this object was created by Merge.

+ */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -260,6 +266,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

The datetime that this object was modified by Merge.

+ */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -271,6 +280,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

Name of the accounting period.

+ */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -283,16 +295,19 @@ public Builder name(String name) { } @JsonSetter(value = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { + public Builder status(Optional status) { this.status = status; return this; } - public Builder status(Status895Enum status) { + public Builder status(AccountingPeriodStatus status) { this.status = Optional.ofNullable(status); return this; } + /** + *

Beginning date of the period

+ */ @JsonSetter(value = "start_date", nulls = Nulls.SKIP) public Builder startDate(Optional startDate) { this.startDate = startDate; @@ -304,6 +319,9 @@ public Builder startDate(OffsetDateTime startDate) { return this; } + /** + *

End date of the period

+ */ @JsonSetter(value = "end_date", nulls = Nulls.SKIP) public Builder endDate(Optional endDate) { this.endDate = endDate; diff --git a/src/main/java/com/merge/api/accounting/types/AccountingPeriodStatus.java b/src/main/java/com/merge/api/accounting/types/AccountingPeriodStatus.java new file mode 100644 index 000000000..b3c5e49a1 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/AccountingPeriodStatus.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = AccountingPeriodStatus.Deserializer.class) +public final class AccountingPeriodStatus { + private final Object value; + + private final int type; + + private AccountingPeriodStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((Status895Enum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AccountingPeriodStatus && equalTo((AccountingPeriodStatus) other); + } + + private boolean equalTo(AccountingPeriodStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static AccountingPeriodStatus of(Status895Enum value) { + return new AccountingPeriodStatus(value, 0); + } + + public static AccountingPeriodStatus of(String value) { + return new AccountingPeriodStatus(value, 1); + } + + public interface Visitor { + T visit(Status895Enum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(AccountingPeriodStatus.class); + } + + @java.lang.Override + public AccountingPeriodStatus deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, Status895Enum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/AccountingPeriodsListRequest.java b/src/main/java/com/merge/api/accounting/types/AccountingPeriodsListRequest.java index 5030612c7..301bc79a6 100644 --- a/src/main/java/com/merge/api/accounting/types/AccountingPeriodsListRequest.java +++ b/src/main/java/com/merge/api/accounting/types/AccountingPeriodsListRequest.java @@ -147,6 +147,9 @@ public Builder from(AccountingPeriodsListRequest other) { return this; } + /** + *

The pagination cursor value.

+ */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -158,6 +161,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

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.

+ */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -169,6 +175,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

Whether to include the original data Merge fetched from the third-party to produce these models.

+ */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -180,6 +189,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

+ */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -191,6 +203,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

Number of results to return per page.

+ */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; diff --git a/src/main/java/com/merge/api/accounting/types/AccountingPeriodsRetrieveRequest.java b/src/main/java/com/merge/api/accounting/types/AccountingPeriodsRetrieveRequest.java index 040d3aeff..69732d855 100644 --- a/src/main/java/com/merge/api/accounting/types/AccountingPeriodsRetrieveRequest.java +++ b/src/main/java/com/merge/api/accounting/types/AccountingPeriodsRetrieveRequest.java @@ -97,6 +97,9 @@ public Builder from(AccountingPeriodsRetrieveRequest other) { return this; } + /** + *

Whether to include the original data Merge fetched from the third-party to produce these models.

+ */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -108,6 +111,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

+ */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/accounting/types/AccountingPhoneNumber.java b/src/main/java/com/merge/api/accounting/types/AccountingPhoneNumber.java index c6239368b..ff074e44c 100644 --- a/src/main/java/com/merge/api/accounting/types/AccountingPhoneNumber.java +++ b/src/main/java/com/merge/api/accounting/types/AccountingPhoneNumber.java @@ -131,6 +131,9 @@ public Builder from(AccountingPhoneNumber other) { return this; } + /** + *

The datetime that this object was created by Merge.

+ */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -142,6 +145,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

The datetime that this object was modified by Merge.

+ */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -153,6 +159,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

The phone number.

+ */ @JsonSetter(value = "number", nulls = Nulls.SKIP) public Builder number(Optional number) { this.number = number; @@ -164,6 +173,9 @@ public Builder number(String number) { return this; } + /** + *

The phone number's type.

+ */ @JsonSetter(value = "type", nulls = Nulls.SKIP) public Builder type(Optional type) { this.type = type; diff --git a/src/main/java/com/merge/api/accounting/types/AccountingPhoneNumberRequest.java b/src/main/java/com/merge/api/accounting/types/AccountingPhoneNumberRequest.java index 864b4366d..556ba145f 100644 --- a/src/main/java/com/merge/api/accounting/types/AccountingPhoneNumberRequest.java +++ b/src/main/java/com/merge/api/accounting/types/AccountingPhoneNumberRequest.java @@ -125,6 +125,9 @@ public Builder from(AccountingPhoneNumberRequest other) { return this; } + /** + *

The phone number.

+ */ @JsonSetter(value = "number", nulls = Nulls.SKIP) public Builder number(Optional number) { this.number = number; @@ -136,6 +139,9 @@ public Builder number(String number) { return this; } + /** + *

The phone number's type.

+ */ @JsonSetter(value = "type", nulls = Nulls.SKIP) public Builder type(Optional type) { this.type = type; diff --git a/src/main/java/com/merge/api/accounting/types/AccountsListRequest.java b/src/main/java/com/merge/api/accounting/types/AccountsListRequest.java index cabe8ca0e..a3e72930f 100644 --- a/src/main/java/com/merge/api/accounting/types/AccountsListRequest.java +++ b/src/main/java/com/merge/api/accounting/types/AccountsListRequest.java @@ -27,6 +27,8 @@ public final class AccountsListRequest { private final Optional accountType; + private final Optional classification; + private final Optional companyId; private final Optional createdAfter; @@ -62,6 +64,7 @@ public final class AccountsListRequest { private AccountsListRequest( Optional> expand, Optional accountType, + Optional classification, Optional companyId, Optional createdAfter, Optional createdBefore, @@ -80,6 +83,7 @@ private AccountsListRequest( Map additionalProperties) { this.expand = expand; this.accountType = accountType; + this.classification = classification; this.companyId = companyId; this.createdAfter = createdAfter; this.createdBefore = createdBefore; @@ -107,13 +111,21 @@ public Optional> getExpand() { } /** - * @return If provided, will only provide accounts with the passed in enum. + * @return If provided, will only return accounts with the passed in enum. */ @JsonProperty("account_type") public Optional getAccountType() { return accountType; } + /** + * @return If provided, will only return accounts with this classification. + */ + @JsonProperty("classification") + public Optional getClassification() { + return classification; + } + /** * @return If provided, will only return accounts for this company. */ @@ -248,6 +260,7 @@ public Map getAdditionalProperties() { private boolean equalTo(AccountsListRequest other) { return expand.equals(other.expand) && accountType.equals(other.accountType) + && classification.equals(other.classification) && companyId.equals(other.companyId) && createdAfter.equals(other.createdAfter) && createdBefore.equals(other.createdBefore) @@ -270,6 +283,7 @@ public int hashCode() { return Objects.hash( this.expand, this.accountType, + this.classification, this.companyId, this.createdAfter, this.createdBefore, @@ -302,6 +316,8 @@ public static final class Builder { private Optional accountType = Optional.empty(); + private Optional classification = Optional.empty(); + private Optional companyId = Optional.empty(); private Optional createdAfter = Optional.empty(); @@ -340,6 +356,7 @@ private Builder() {} public Builder from(AccountsListRequest other) { expand(other.getExpand()); accountType(other.getAccountType()); + classification(other.getClassification()); companyId(other.getCompanyId()); createdAfter(other.getCreatedAfter()); createdBefore(other.getCreatedBefore()); @@ -358,6 +375,9 @@ public Builder from(AccountsListRequest other) { return this; } + /** + *

Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

+ */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -374,6 +394,9 @@ public Builder expand(String expand) { return this; } + /** + *

If provided, will only return accounts with the passed in enum.

+ */ @JsonSetter(value = "account_type", nulls = Nulls.SKIP) public Builder accountType(Optional accountType) { this.accountType = accountType; @@ -385,6 +408,23 @@ public Builder accountType(String accountType) { return this; } + /** + *

If provided, will only return accounts with this classification.

+ */ + @JsonSetter(value = "classification", nulls = Nulls.SKIP) + public Builder classification(Optional classification) { + this.classification = classification; + return this; + } + + public Builder classification(String classification) { + this.classification = Optional.ofNullable(classification); + return this; + } + + /** + *

If provided, will only return accounts for this company.

+ */ @JsonSetter(value = "company_id", nulls = Nulls.SKIP) public Builder companyId(Optional companyId) { this.companyId = companyId; @@ -396,6 +436,9 @@ public Builder companyId(String companyId) { return this; } + /** + *

If provided, will only return objects created after this datetime.

+ */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -407,6 +450,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

If provided, will only return objects created before this datetime.

+ */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -418,6 +464,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

The pagination cursor value.

+ */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -429,6 +478,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

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.

+ */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -440,6 +492,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

Whether to include the original data Merge fetched from the third-party to produce these models.

+ */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -451,6 +506,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

+ */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -462,6 +520,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

If provided, only objects synced by Merge after this date time will be returned.

+ */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -473,6 +534,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

If provided, only objects synced by Merge before this date time will be returned.

+ */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -484,6 +548,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

If provided, will only return Accounts with this name.

+ */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -495,6 +562,9 @@ public Builder name(String name) { return this; } + /** + *

Number of results to return per page.

+ */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -506,6 +576,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

Deprecated. Use show_enum_origins.

+ */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -517,6 +590,9 @@ public Builder remoteFields(AccountsListRequestRemoteFields remoteFields) { return this; } + /** + *

The API provider's ID for the given object.

+ */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -528,6 +604,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

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

+ */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; @@ -539,6 +618,9 @@ public Builder showEnumOrigins(AccountsListRequestShowEnumOrigins showEnumOrigin return this; } + /** + *

If provided, will only return accounts with this status.

+ */ @JsonSetter(value = "status", nulls = Nulls.SKIP) public Builder status(Optional status) { this.status = status; @@ -554,6 +636,7 @@ public AccountsListRequest build() { return new AccountsListRequest( expand, accountType, + classification, companyId, createdAfter, createdBefore, diff --git a/src/main/java/com/merge/api/accounting/types/AccountsRetrieveRequest.java b/src/main/java/com/merge/api/accounting/types/AccountsRetrieveRequest.java index d8afe945b..f8798c8a4 100644 --- a/src/main/java/com/merge/api/accounting/types/AccountsRetrieveRequest.java +++ b/src/main/java/com/merge/api/accounting/types/AccountsRetrieveRequest.java @@ -149,6 +149,9 @@ public Builder from(AccountsRetrieveRequest other) { return this; } + /** + *

Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

+ */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -165,6 +168,9 @@ public Builder expand(String expand) { return this; } + /** + *

Whether to include the original data Merge fetched from the third-party to produce these models.

+ */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -176,6 +182,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

+ */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -187,6 +196,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

Deprecated. Use show_enum_origins.

+ */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -198,6 +210,9 @@ public Builder remoteFields(AccountsRetrieveRequestRemoteFields remoteFields) { return this; } + /** + *

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

+ */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; diff --git a/src/main/java/com/merge/api/accounting/types/Address.java b/src/main/java/com/merge/api/accounting/types/Address.java index 083ea9e0b..f8e223c47 100644 --- a/src/main/java/com/merge/api/accounting/types/Address.java +++ b/src/main/java/com/merge/api/accounting/types/Address.java @@ -26,7 +26,7 @@ public final class Address { private final Optional modifiedAt; - private final Optional type; + private final Optional type; private final Optional street1; @@ -38,7 +38,7 @@ public final class Address { private final Optional countrySubdivision; - private final Optional country; + private final Optional country; private final Optional zipCode; @@ -47,13 +47,13 @@ public final class Address { private Address( Optional createdAt, Optional modifiedAt, - Optional type, + Optional type, Optional street1, Optional street2, Optional city, Optional state, Optional countrySubdivision, - Optional country, + Optional country, Optional zipCode, Map additionalProperties) { this.createdAt = createdAt; @@ -93,7 +93,7 @@ public Optional getModifiedAt() { * */ @JsonProperty("type") - public Optional getType() { + public Optional getType() { return type; } @@ -389,7 +389,7 @@ public Optional getCountrySubdivision() { * */ @JsonProperty("country") - public Optional getCountry() { + public Optional getCountry() { return country; } @@ -455,7 +455,7 @@ public static final class Builder { private Optional modifiedAt = Optional.empty(); - private Optional type = Optional.empty(); + private Optional type = Optional.empty(); private Optional street1 = Optional.empty(); @@ -467,7 +467,7 @@ public static final class Builder { private Optional countrySubdivision = Optional.empty(); - private Optional country = Optional.empty(); + private Optional country = Optional.empty(); private Optional zipCode = Optional.empty(); @@ -490,6 +490,9 @@ public Builder from(Address other) { return this; } + /** + *

The datetime that this object was created by Merge.

+ */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -501,6 +504,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

The datetime that this object was modified by Merge.

+ */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -512,17 +518,27 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

The address type.

+ *
    + *
  • BILLING - BILLING
  • + *
  • SHIPPING - SHIPPING
  • + *
+ */ @JsonSetter(value = "type", nulls = Nulls.SKIP) - public Builder type(Optional type) { + public Builder type(Optional type) { this.type = type; return this; } - public Builder type(AddressTypeEnum type) { + public Builder type(AddressType type) { this.type = Optional.ofNullable(type); return this; } + /** + *

Line 1 of the address's street.

+ */ @JsonSetter(value = "street_1", nulls = Nulls.SKIP) public Builder street1(Optional street1) { this.street1 = street1; @@ -534,6 +550,9 @@ public Builder street1(String street1) { return this; } + /** + *

Line 2 of the address's street.

+ */ @JsonSetter(value = "street_2", nulls = Nulls.SKIP) public Builder street2(Optional street2) { this.street2 = street2; @@ -545,6 +564,9 @@ public Builder street2(String street2) { return this; } + /** + *

The address's city.

+ */ @JsonSetter(value = "city", nulls = Nulls.SKIP) public Builder city(Optional city) { this.city = city; @@ -567,6 +589,9 @@ public Builder state(JsonNode state) { return this; } + /** + *

The address's state or region.

+ */ @JsonSetter(value = "country_subdivision", nulls = Nulls.SKIP) public Builder countrySubdivision(Optional countrySubdivision) { this.countrySubdivision = countrySubdivision; @@ -578,17 +603,274 @@ public Builder countrySubdivision(String countrySubdivision) { return this; } + /** + *

The address's country.

+ *
    + *
  • AF - Afghanistan
  • + *
  • AX - Åland Islands
  • + *
  • AL - Albania
  • + *
  • DZ - Algeria
  • + *
  • AS - American Samoa
  • + *
  • AD - Andorra
  • + *
  • AO - Angola
  • + *
  • AI - Anguilla
  • + *
  • AQ - Antarctica
  • + *
  • AG - Antigua and Barbuda
  • + *
  • AR - Argentina
  • + *
  • AM - Armenia
  • + *
  • AW - Aruba
  • + *
  • AU - Australia
  • + *
  • AT - Austria
  • + *
  • AZ - Azerbaijan
  • + *
  • BS - Bahamas
  • + *
  • BH - Bahrain
  • + *
  • BD - Bangladesh
  • + *
  • BB - Barbados
  • + *
  • BY - Belarus
  • + *
  • BE - Belgium
  • + *
  • BZ - Belize
  • + *
  • BJ - Benin
  • + *
  • BM - Bermuda
  • + *
  • BT - Bhutan
  • + *
  • BO - Bolivia
  • + *
  • BQ - Bonaire, Sint Eustatius and Saba
  • + *
  • BA - Bosnia and Herzegovina
  • + *
  • BW - Botswana
  • + *
  • BV - Bouvet Island
  • + *
  • BR - Brazil
  • + *
  • IO - British Indian Ocean Territory
  • + *
  • BN - Brunei
  • + *
  • BG - Bulgaria
  • + *
  • BF - Burkina Faso
  • + *
  • BI - Burundi
  • + *
  • CV - Cabo Verde
  • + *
  • KH - Cambodia
  • + *
  • CM - Cameroon
  • + *
  • CA - Canada
  • + *
  • KY - Cayman Islands
  • + *
  • CF - Central African Republic
  • + *
  • TD - Chad
  • + *
  • CL - Chile
  • + *
  • CN - China
  • + *
  • CX - Christmas Island
  • + *
  • CC - Cocos (Keeling) Islands
  • + *
  • CO - Colombia
  • + *
  • KM - Comoros
  • + *
  • CG - Congo
  • + *
  • CD - Congo (the Democratic Republic of the)
  • + *
  • CK - Cook Islands
  • + *
  • CR - Costa Rica
  • + *
  • CI - Côte d'Ivoire
  • + *
  • HR - Croatia
  • + *
  • CU - Cuba
  • + *
  • CW - Curaçao
  • + *
  • CY - Cyprus
  • + *
  • CZ - Czechia
  • + *
  • DK - Denmark
  • + *
  • DJ - Djibouti
  • + *
  • DM - Dominica
  • + *
  • DO - Dominican Republic
  • + *
  • EC - Ecuador
  • + *
  • EG - Egypt
  • + *
  • SV - El Salvador
  • + *
  • GQ - Equatorial Guinea
  • + *
  • ER - Eritrea
  • + *
  • EE - Estonia
  • + *
  • SZ - Eswatini
  • + *
  • ET - Ethiopia
  • + *
  • FK - Falkland Islands (Malvinas)
  • + *
  • FO - Faroe Islands
  • + *
  • FJ - Fiji
  • + *
  • FI - Finland
  • + *
  • FR - France
  • + *
  • GF - French Guiana
  • + *
  • PF - French Polynesia
  • + *
  • TF - French Southern Territories
  • + *
  • GA - Gabon
  • + *
  • GM - Gambia
  • + *
  • GE - Georgia
  • + *
  • DE - Germany
  • + *
  • GH - Ghana
  • + *
  • GI - Gibraltar
  • + *
  • GR - Greece
  • + *
  • GL - Greenland
  • + *
  • GD - Grenada
  • + *
  • GP - Guadeloupe
  • + *
  • GU - Guam
  • + *
  • GT - Guatemala
  • + *
  • GG - Guernsey
  • + *
  • GN - Guinea
  • + *
  • GW - Guinea-Bissau
  • + *
  • GY - Guyana
  • + *
  • HT - Haiti
  • + *
  • HM - Heard Island and McDonald Islands
  • + *
  • VA - Holy See
  • + *
  • HN - Honduras
  • + *
  • HK - Hong Kong
  • + *
  • HU - Hungary
  • + *
  • IS - Iceland
  • + *
  • IN - India
  • + *
  • ID - Indonesia
  • + *
  • IR - Iran
  • + *
  • IQ - Iraq
  • + *
  • IE - Ireland
  • + *
  • IM - Isle of Man
  • + *
  • IL - Israel
  • + *
  • IT - Italy
  • + *
  • JM - Jamaica
  • + *
  • JP - Japan
  • + *
  • JE - Jersey
  • + *
  • JO - Jordan
  • + *
  • KZ - Kazakhstan
  • + *
  • KE - Kenya
  • + *
  • KI - Kiribati
  • + *
  • KW - Kuwait
  • + *
  • KG - Kyrgyzstan
  • + *
  • LA - Laos
  • + *
  • LV - Latvia
  • + *
  • LB - Lebanon
  • + *
  • LS - Lesotho
  • + *
  • LR - Liberia
  • + *
  • LY - Libya
  • + *
  • LI - Liechtenstein
  • + *
  • LT - Lithuania
  • + *
  • LU - Luxembourg
  • + *
  • MO - Macao
  • + *
  • MG - Madagascar
  • + *
  • MW - Malawi
  • + *
  • MY - Malaysia
  • + *
  • MV - Maldives
  • + *
  • ML - Mali
  • + *
  • MT - Malta
  • + *
  • MH - Marshall Islands
  • + *
  • MQ - Martinique
  • + *
  • MR - Mauritania
  • + *
  • MU - Mauritius
  • + *
  • YT - Mayotte
  • + *
  • MX - Mexico
  • + *
  • FM - Micronesia (Federated States of)
  • + *
  • MD - Moldova
  • + *
  • MC - Monaco
  • + *
  • MN - Mongolia
  • + *
  • ME - Montenegro
  • + *
  • MS - Montserrat
  • + *
  • MA - Morocco
  • + *
  • MZ - Mozambique
  • + *
  • MM - Myanmar
  • + *
  • NA - Namibia
  • + *
  • NR - Nauru
  • + *
  • NP - Nepal
  • + *
  • NL - Netherlands
  • + *
  • NC - New Caledonia
  • + *
  • NZ - New Zealand
  • + *
  • NI - Nicaragua
  • + *
  • NE - Niger
  • + *
  • NG - Nigeria
  • + *
  • NU - Niue
  • + *
  • NF - Norfolk Island
  • + *
  • KP - North Korea
  • + *
  • MK - North Macedonia
  • + *
  • MP - Northern Mariana Islands
  • + *
  • NO - Norway
  • + *
  • OM - Oman
  • + *
  • PK - Pakistan
  • + *
  • PW - Palau
  • + *
  • PS - Palestine, State of
  • + *
  • PA - Panama
  • + *
  • PG - Papua New Guinea
  • + *
  • PY - Paraguay
  • + *
  • PE - Peru
  • + *
  • PH - Philippines
  • + *
  • PN - Pitcairn
  • + *
  • PL - Poland
  • + *
  • PT - Portugal
  • + *
  • PR - Puerto Rico
  • + *
  • QA - Qatar
  • + *
  • RE - Réunion
  • + *
  • RO - Romania
  • + *
  • RU - Russia
  • + *
  • RW - Rwanda
  • + *
  • BL - Saint Barthélemy
  • + *
  • SH - Saint Helena, Ascension and Tristan da Cunha
  • + *
  • KN - Saint Kitts and Nevis
  • + *
  • LC - Saint Lucia
  • + *
  • MF - Saint Martin (French part)
  • + *
  • PM - Saint Pierre and Miquelon
  • + *
  • VC - Saint Vincent and the Grenadines
  • + *
  • WS - Samoa
  • + *
  • SM - San Marino
  • + *
  • ST - Sao Tome and Principe
  • + *
  • SA - Saudi Arabia
  • + *
  • SN - Senegal
  • + *
  • RS - Serbia
  • + *
  • SC - Seychelles
  • + *
  • SL - Sierra Leone
  • + *
  • SG - Singapore
  • + *
  • SX - Sint Maarten (Dutch part)
  • + *
  • SK - Slovakia
  • + *
  • SI - Slovenia
  • + *
  • SB - Solomon Islands
  • + *
  • SO - Somalia
  • + *
  • ZA - South Africa
  • + *
  • GS - South Georgia and the South Sandwich Islands
  • + *
  • KR - South Korea
  • + *
  • SS - South Sudan
  • + *
  • ES - Spain
  • + *
  • LK - Sri Lanka
  • + *
  • SD - Sudan
  • + *
  • SR - Suriname
  • + *
  • SJ - Svalbard and Jan Mayen
  • + *
  • SE - Sweden
  • + *
  • CH - Switzerland
  • + *
  • SY - Syria
  • + *
  • TW - Taiwan
  • + *
  • TJ - Tajikistan
  • + *
  • TZ - Tanzania
  • + *
  • TH - Thailand
  • + *
  • TL - Timor-Leste
  • + *
  • TG - Togo
  • + *
  • TK - Tokelau
  • + *
  • TO - Tonga
  • + *
  • TT - Trinidad and Tobago
  • + *
  • TN - Tunisia
  • + *
  • TR - Turkey
  • + *
  • TM - Turkmenistan
  • + *
  • TC - Turks and Caicos Islands
  • + *
  • TV - Tuvalu
  • + *
  • UG - Uganda
  • + *
  • UA - Ukraine
  • + *
  • AE - United Arab Emirates
  • + *
  • GB - United Kingdom
  • + *
  • UM - United States Minor Outlying Islands
  • + *
  • US - United States of America
  • + *
  • UY - Uruguay
  • + *
  • UZ - Uzbekistan
  • + *
  • VU - Vanuatu
  • + *
  • VE - Venezuela
  • + *
  • VN - Vietnam
  • + *
  • VG - Virgin Islands (British)
  • + *
  • VI - Virgin Islands (U.S.)
  • + *
  • WF - Wallis and Futuna
  • + *
  • EH - Western Sahara
  • + *
  • YE - Yemen
  • + *
  • ZM - Zambia
  • + *
  • ZW - Zimbabwe
  • + *
+ */ @JsonSetter(value = "country", nulls = Nulls.SKIP) - public Builder country(Optional country) { + public Builder country(Optional country) { this.country = country; return this; } - public Builder country(CountryEnum country) { + public Builder country(AddressCountry country) { this.country = Optional.ofNullable(country); return this; } + /** + *

The address's zip code.

+ */ @JsonSetter(value = "zip_code", nulls = Nulls.SKIP) public Builder zipCode(Optional zipCode) { this.zipCode = zipCode; diff --git a/src/main/java/com/merge/api/accounting/types/AddressCountry.java b/src/main/java/com/merge/api/accounting/types/AddressCountry.java new file mode 100644 index 000000000..31a1151fb --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/AddressCountry.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = AddressCountry.Deserializer.class) +public final class AddressCountry { + private final Object value; + + private final int type; + + private AddressCountry(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((CountryEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AddressCountry && equalTo((AddressCountry) other); + } + + private boolean equalTo(AddressCountry other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static AddressCountry of(CountryEnum value) { + return new AddressCountry(value, 0); + } + + public static AddressCountry of(String value) { + return new AddressCountry(value, 1); + } + + public interface Visitor { + T visit(CountryEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(AddressCountry.class); + } + + @java.lang.Override + public AddressCountry deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, CountryEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/AddressRequest.java b/src/main/java/com/merge/api/accounting/types/AddressRequest.java index cb8e95354..6a71f9a12 100644 --- a/src/main/java/com/merge/api/accounting/types/AddressRequest.java +++ b/src/main/java/com/merge/api/accounting/types/AddressRequest.java @@ -21,7 +21,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AddressRequest.Builder.class) public final class AddressRequest { - private final Optional type; + private final Optional type; private final Optional street1; @@ -31,7 +31,7 @@ public final class AddressRequest { private final Optional countrySubdivision; - private final Optional country; + private final Optional country; private final Optional zipCode; @@ -42,12 +42,12 @@ public final class AddressRequest { private final Map additionalProperties; private AddressRequest( - Optional type, + Optional type, Optional street1, Optional street2, Optional city, Optional countrySubdivision, - Optional country, + Optional country, Optional zipCode, Optional> integrationParams, Optional> linkedAccountParams, @@ -72,7 +72,7 @@ private AddressRequest( * */ @JsonProperty("type") - public Optional getType() { + public Optional getType() { return type; } @@ -363,7 +363,7 @@ public Optional getCountrySubdivision() { * */ @JsonProperty("country") - public Optional getCountry() { + public Optional getCountry() { return country; } @@ -433,7 +433,7 @@ public static Builder builder() { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder { - private Optional type = Optional.empty(); + private Optional type = Optional.empty(); private Optional street1 = Optional.empty(); @@ -443,7 +443,7 @@ public static final class Builder { private Optional countrySubdivision = Optional.empty(); - private Optional country = Optional.empty(); + private Optional country = Optional.empty(); private Optional zipCode = Optional.empty(); @@ -469,17 +469,27 @@ public Builder from(AddressRequest other) { return this; } + /** + *

The address type.

+ *
    + *
  • BILLING - BILLING
  • + *
  • SHIPPING - SHIPPING
  • + *
+ */ @JsonSetter(value = "type", nulls = Nulls.SKIP) - public Builder type(Optional type) { + public Builder type(Optional type) { this.type = type; return this; } - public Builder type(AddressTypeEnum type) { + public Builder type(AddressRequestType type) { this.type = Optional.ofNullable(type); return this; } + /** + *

Line 1 of the address's street.

+ */ @JsonSetter(value = "street_1", nulls = Nulls.SKIP) public Builder street1(Optional street1) { this.street1 = street1; @@ -491,6 +501,9 @@ public Builder street1(String street1) { return this; } + /** + *

Line 2 of the address's street.

+ */ @JsonSetter(value = "street_2", nulls = Nulls.SKIP) public Builder street2(Optional street2) { this.street2 = street2; @@ -502,6 +515,9 @@ public Builder street2(String street2) { return this; } + /** + *

The address's city.

+ */ @JsonSetter(value = "city", nulls = Nulls.SKIP) public Builder city(Optional city) { this.city = city; @@ -513,6 +529,9 @@ public Builder city(String city) { return this; } + /** + *

The address's state or region.

+ */ @JsonSetter(value = "country_subdivision", nulls = Nulls.SKIP) public Builder countrySubdivision(Optional countrySubdivision) { this.countrySubdivision = countrySubdivision; @@ -524,17 +543,274 @@ public Builder countrySubdivision(String countrySubdivision) { return this; } + /** + *

The address's country.

+ *
    + *
  • AF - Afghanistan
  • + *
  • AX - Åland Islands
  • + *
  • AL - Albania
  • + *
  • DZ - Algeria
  • + *
  • AS - American Samoa
  • + *
  • AD - Andorra
  • + *
  • AO - Angola
  • + *
  • AI - Anguilla
  • + *
  • AQ - Antarctica
  • + *
  • AG - Antigua and Barbuda
  • + *
  • AR - Argentina
  • + *
  • AM - Armenia
  • + *
  • AW - Aruba
  • + *
  • AU - Australia
  • + *
  • AT - Austria
  • + *
  • AZ - Azerbaijan
  • + *
  • BS - Bahamas
  • + *
  • BH - Bahrain
  • + *
  • BD - Bangladesh
  • + *
  • BB - Barbados
  • + *
  • BY - Belarus
  • + *
  • BE - Belgium
  • + *
  • BZ - Belize
  • + *
  • BJ - Benin
  • + *
  • BM - Bermuda
  • + *
  • BT - Bhutan
  • + *
  • BO - Bolivia
  • + *
  • BQ - Bonaire, Sint Eustatius and Saba
  • + *
  • BA - Bosnia and Herzegovina
  • + *
  • BW - Botswana
  • + *
  • BV - Bouvet Island
  • + *
  • BR - Brazil
  • + *
  • IO - British Indian Ocean Territory
  • + *
  • BN - Brunei
  • + *
  • BG - Bulgaria
  • + *
  • BF - Burkina Faso
  • + *
  • BI - Burundi
  • + *
  • CV - Cabo Verde
  • + *
  • KH - Cambodia
  • + *
  • CM - Cameroon
  • + *
  • CA - Canada
  • + *
  • KY - Cayman Islands
  • + *
  • CF - Central African Republic
  • + *
  • TD - Chad
  • + *
  • CL - Chile
  • + *
  • CN - China
  • + *
  • CX - Christmas Island
  • + *
  • CC - Cocos (Keeling) Islands
  • + *
  • CO - Colombia
  • + *
  • KM - Comoros
  • + *
  • CG - Congo
  • + *
  • CD - Congo (the Democratic Republic of the)
  • + *
  • CK - Cook Islands
  • + *
  • CR - Costa Rica
  • + *
  • CI - Côte d'Ivoire
  • + *
  • HR - Croatia
  • + *
  • CU - Cuba
  • + *
  • CW - Curaçao
  • + *
  • CY - Cyprus
  • + *
  • CZ - Czechia
  • + *
  • DK - Denmark
  • + *
  • DJ - Djibouti
  • + *
  • DM - Dominica
  • + *
  • DO - Dominican Republic
  • + *
  • EC - Ecuador
  • + *
  • EG - Egypt
  • + *
  • SV - El Salvador
  • + *
  • GQ - Equatorial Guinea
  • + *
  • ER - Eritrea
  • + *
  • EE - Estonia
  • + *
  • SZ - Eswatini
  • + *
  • ET - Ethiopia
  • + *
  • FK - Falkland Islands (Malvinas)
  • + *
  • FO - Faroe Islands
  • + *
  • FJ - Fiji
  • + *
  • FI - Finland
  • + *
  • FR - France
  • + *
  • GF - French Guiana
  • + *
  • PF - French Polynesia
  • + *
  • TF - French Southern Territories
  • + *
  • GA - Gabon
  • + *
  • GM - Gambia
  • + *
  • GE - Georgia
  • + *
  • DE - Germany
  • + *
  • GH - Ghana
  • + *
  • GI - Gibraltar
  • + *
  • GR - Greece
  • + *
  • GL - Greenland
  • + *
  • GD - Grenada
  • + *
  • GP - Guadeloupe
  • + *
  • GU - Guam
  • + *
  • GT - Guatemala
  • + *
  • GG - Guernsey
  • + *
  • GN - Guinea
  • + *
  • GW - Guinea-Bissau
  • + *
  • GY - Guyana
  • + *
  • HT - Haiti
  • + *
  • HM - Heard Island and McDonald Islands
  • + *
  • VA - Holy See
  • + *
  • HN - Honduras
  • + *
  • HK - Hong Kong
  • + *
  • HU - Hungary
  • + *
  • IS - Iceland
  • + *
  • IN - India
  • + *
  • ID - Indonesia
  • + *
  • IR - Iran
  • + *
  • IQ - Iraq
  • + *
  • IE - Ireland
  • + *
  • IM - Isle of Man
  • + *
  • IL - Israel
  • + *
  • IT - Italy
  • + *
  • JM - Jamaica
  • + *
  • JP - Japan
  • + *
  • JE - Jersey
  • + *
  • JO - Jordan
  • + *
  • KZ - Kazakhstan
  • + *
  • KE - Kenya
  • + *
  • KI - Kiribati
  • + *
  • KW - Kuwait
  • + *
  • KG - Kyrgyzstan
  • + *
  • LA - Laos
  • + *
  • LV - Latvia
  • + *
  • LB - Lebanon
  • + *
  • LS - Lesotho
  • + *
  • LR - Liberia
  • + *
  • LY - Libya
  • + *
  • LI - Liechtenstein
  • + *
  • LT - Lithuania
  • + *
  • LU - Luxembourg
  • + *
  • MO - Macao
  • + *
  • MG - Madagascar
  • + *
  • MW - Malawi
  • + *
  • MY - Malaysia
  • + *
  • MV - Maldives
  • + *
  • ML - Mali
  • + *
  • MT - Malta
  • + *
  • MH - Marshall Islands
  • + *
  • MQ - Martinique
  • + *
  • MR - Mauritania
  • + *
  • MU - Mauritius
  • + *
  • YT - Mayotte
  • + *
  • MX - Mexico
  • + *
  • FM - Micronesia (Federated States of)
  • + *
  • MD - Moldova
  • + *
  • MC - Monaco
  • + *
  • MN - Mongolia
  • + *
  • ME - Montenegro
  • + *
  • MS - Montserrat
  • + *
  • MA - Morocco
  • + *
  • MZ - Mozambique
  • + *
  • MM - Myanmar
  • + *
  • NA - Namibia
  • + *
  • NR - Nauru
  • + *
  • NP - Nepal
  • + *
  • NL - Netherlands
  • + *
  • NC - New Caledonia
  • + *
  • NZ - New Zealand
  • + *
  • NI - Nicaragua
  • + *
  • NE - Niger
  • + *
  • NG - Nigeria
  • + *
  • NU - Niue
  • + *
  • NF - Norfolk Island
  • + *
  • KP - North Korea
  • + *
  • MK - North Macedonia
  • + *
  • MP - Northern Mariana Islands
  • + *
  • NO - Norway
  • + *
  • OM - Oman
  • + *
  • PK - Pakistan
  • + *
  • PW - Palau
  • + *
  • PS - Palestine, State of
  • + *
  • PA - Panama
  • + *
  • PG - Papua New Guinea
  • + *
  • PY - Paraguay
  • + *
  • PE - Peru
  • + *
  • PH - Philippines
  • + *
  • PN - Pitcairn
  • + *
  • PL - Poland
  • + *
  • PT - Portugal
  • + *
  • PR - Puerto Rico
  • + *
  • QA - Qatar
  • + *
  • RE - Réunion
  • + *
  • RO - Romania
  • + *
  • RU - Russia
  • + *
  • RW - Rwanda
  • + *
  • BL - Saint Barthélemy
  • + *
  • SH - Saint Helena, Ascension and Tristan da Cunha
  • + *
  • KN - Saint Kitts and Nevis
  • + *
  • LC - Saint Lucia
  • + *
  • MF - Saint Martin (French part)
  • + *
  • PM - Saint Pierre and Miquelon
  • + *
  • VC - Saint Vincent and the Grenadines
  • + *
  • WS - Samoa
  • + *
  • SM - San Marino
  • + *
  • ST - Sao Tome and Principe
  • + *
  • SA - Saudi Arabia
  • + *
  • SN - Senegal
  • + *
  • RS - Serbia
  • + *
  • SC - Seychelles
  • + *
  • SL - Sierra Leone
  • + *
  • SG - Singapore
  • + *
  • SX - Sint Maarten (Dutch part)
  • + *
  • SK - Slovakia
  • + *
  • SI - Slovenia
  • + *
  • SB - Solomon Islands
  • + *
  • SO - Somalia
  • + *
  • ZA - South Africa
  • + *
  • GS - South Georgia and the South Sandwich Islands
  • + *
  • KR - South Korea
  • + *
  • SS - South Sudan
  • + *
  • ES - Spain
  • + *
  • LK - Sri Lanka
  • + *
  • SD - Sudan
  • + *
  • SR - Suriname
  • + *
  • SJ - Svalbard and Jan Mayen
  • + *
  • SE - Sweden
  • + *
  • CH - Switzerland
  • + *
  • SY - Syria
  • + *
  • TW - Taiwan
  • + *
  • TJ - Tajikistan
  • + *
  • TZ - Tanzania
  • + *
  • TH - Thailand
  • + *
  • TL - Timor-Leste
  • + *
  • TG - Togo
  • + *
  • TK - Tokelau
  • + *
  • TO - Tonga
  • + *
  • TT - Trinidad and Tobago
  • + *
  • TN - Tunisia
  • + *
  • TR - Turkey
  • + *
  • TM - Turkmenistan
  • + *
  • TC - Turks and Caicos Islands
  • + *
  • TV - Tuvalu
  • + *
  • UG - Uganda
  • + *
  • UA - Ukraine
  • + *
  • AE - United Arab Emirates
  • + *
  • GB - United Kingdom
  • + *
  • UM - United States Minor Outlying Islands
  • + *
  • US - United States of America
  • + *
  • UY - Uruguay
  • + *
  • UZ - Uzbekistan
  • + *
  • VU - Vanuatu
  • + *
  • VE - Venezuela
  • + *
  • VN - Vietnam
  • + *
  • VG - Virgin Islands (British)
  • + *
  • VI - Virgin Islands (U.S.)
  • + *
  • WF - Wallis and Futuna
  • + *
  • EH - Western Sahara
  • + *
  • YE - Yemen
  • + *
  • ZM - Zambia
  • + *
  • ZW - Zimbabwe
  • + *
+ */ @JsonSetter(value = "country", nulls = Nulls.SKIP) - public Builder country(Optional country) { + public Builder country(Optional country) { this.country = country; return this; } - public Builder country(CountryEnum country) { + public Builder country(AddressRequestCountry country) { this.country = Optional.ofNullable(country); return this; } + /** + *

The address's zip code.

+ */ @JsonSetter(value = "zip_code", nulls = Nulls.SKIP) public Builder zipCode(Optional zipCode) { this.zipCode = zipCode; diff --git a/src/main/java/com/merge/api/accounting/types/AddressRequestCountry.java b/src/main/java/com/merge/api/accounting/types/AddressRequestCountry.java new file mode 100644 index 000000000..a5bf742c7 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/AddressRequestCountry.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = AddressRequestCountry.Deserializer.class) +public final class AddressRequestCountry { + private final Object value; + + private final int type; + + private AddressRequestCountry(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((CountryEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AddressRequestCountry && equalTo((AddressRequestCountry) other); + } + + private boolean equalTo(AddressRequestCountry other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static AddressRequestCountry of(CountryEnum value) { + return new AddressRequestCountry(value, 0); + } + + public static AddressRequestCountry of(String value) { + return new AddressRequestCountry(value, 1); + } + + public interface Visitor { + T visit(CountryEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(AddressRequestCountry.class); + } + + @java.lang.Override + public AddressRequestCountry deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, CountryEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/AddressRequestType.java b/src/main/java/com/merge/api/accounting/types/AddressRequestType.java new file mode 100644 index 000000000..0664e9446 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/AddressRequestType.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = AddressRequestType.Deserializer.class) +public final class AddressRequestType { + private final Object value; + + private final int type; + + private AddressRequestType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((AddressTypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AddressRequestType && equalTo((AddressRequestType) other); + } + + private boolean equalTo(AddressRequestType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static AddressRequestType of(AddressTypeEnum value) { + return new AddressRequestType(value, 0); + } + + public static AddressRequestType of(String value) { + return new AddressRequestType(value, 1); + } + + public interface Visitor { + T visit(AddressTypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(AddressRequestType.class); + } + + @java.lang.Override + public AddressRequestType deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, AddressTypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/AddressType.java b/src/main/java/com/merge/api/accounting/types/AddressType.java new file mode 100644 index 000000000..e7beccff5 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/AddressType.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = AddressType.Deserializer.class) +public final class AddressType { + private final Object value; + + private final int type; + + private AddressType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((AddressTypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AddressType && equalTo((AddressType) other); + } + + private boolean equalTo(AddressType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static AddressType of(AddressTypeEnum value) { + return new AddressType(value, 0); + } + + public static AddressType of(String value) { + return new AddressType(value, 1); + } + + public interface Visitor { + T visit(AddressTypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(AddressType.class); + } + + @java.lang.Override + public AddressType deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, AddressTypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/AddressesRetrieveRequest.java b/src/main/java/com/merge/api/accounting/types/AddressesRetrieveRequest.java index 7de4ccbea..14ce945c4 100644 --- a/src/main/java/com/merge/api/accounting/types/AddressesRetrieveRequest.java +++ b/src/main/java/com/merge/api/accounting/types/AddressesRetrieveRequest.java @@ -130,6 +130,9 @@ public Builder from(AddressesRetrieveRequest other) { return this; } + /** + *

Whether to include the original data Merge fetched from the third-party to produce these models.

+ */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -141,6 +144,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

+ */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -152,6 +158,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

Deprecated. Use show_enum_origins.

+ */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -163,6 +172,9 @@ public Builder remoteFields(String remoteFields) { return this; } + /** + *

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

+ */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; diff --git a/src/main/java/com/merge/api/accounting/types/AsyncPostTask.java b/src/main/java/com/merge/api/accounting/types/AsyncPostTask.java index 110dfc4d7..79e3de93a 100644 --- a/src/main/java/com/merge/api/accounting/types/AsyncPostTask.java +++ b/src/main/java/com/merge/api/accounting/types/AsyncPostTask.java @@ -19,21 +19,21 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AsyncPostTask.Builder.class) public final class AsyncPostTask { - private final AsyncPostTaskStatusEnum status; + private final AsyncPostTaskStatus status; private final AsyncPostTaskResult result; private final Map additionalProperties; private AsyncPostTask( - AsyncPostTaskStatusEnum status, AsyncPostTaskResult result, Map additionalProperties) { + AsyncPostTaskStatus status, AsyncPostTaskResult result, Map additionalProperties) { this.status = status; this.result = result; this.additionalProperties = additionalProperties; } @JsonProperty("status") - public AsyncPostTaskStatusEnum getStatus() { + public AsyncPostTaskStatus getStatus() { return status; } @@ -72,7 +72,7 @@ public static StatusStage builder() { } public interface StatusStage { - ResultStage status(@NotNull AsyncPostTaskStatusEnum status); + ResultStage status(@NotNull AsyncPostTaskStatus status); Builder from(AsyncPostTask other); } @@ -87,7 +87,7 @@ public interface _FinalStage { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements StatusStage, ResultStage, _FinalStage { - private AsyncPostTaskStatusEnum status; + private AsyncPostTaskStatus status; private AsyncPostTaskResult result; @@ -105,7 +105,7 @@ public Builder from(AsyncPostTask other) { @java.lang.Override @JsonSetter("status") - public ResultStage status(@NotNull AsyncPostTaskStatusEnum status) { + public ResultStage status(@NotNull AsyncPostTaskStatus status) { this.status = status; return this; } diff --git a/src/main/java/com/merge/api/accounting/types/AsyncPostTaskStatus.java b/src/main/java/com/merge/api/accounting/types/AsyncPostTaskStatus.java new file mode 100644 index 000000000..f108ff2aa --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/AsyncPostTaskStatus.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = AsyncPostTaskStatus.Deserializer.class) +public final class AsyncPostTaskStatus { + private final Object value; + + private final int type; + + private AsyncPostTaskStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((AsyncPostTaskStatusEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AsyncPostTaskStatus && equalTo((AsyncPostTaskStatus) other); + } + + private boolean equalTo(AsyncPostTaskStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static AsyncPostTaskStatus of(AsyncPostTaskStatusEnum value) { + return new AsyncPostTaskStatus(value, 0); + } + + public static AsyncPostTaskStatus of(String value) { + return new AsyncPostTaskStatus(value, 1); + } + + public interface Visitor { + T visit(AsyncPostTaskStatusEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(AsyncPostTaskStatus.class); + } + + @java.lang.Override + public AsyncPostTaskStatus deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, AsyncPostTaskStatusEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/AttachmentsListRequest.java b/src/main/java/com/merge/api/accounting/types/AttachmentsListRequest.java index 29fbf7188..27ea3586b 100644 --- a/src/main/java/com/merge/api/accounting/types/AttachmentsListRequest.java +++ b/src/main/java/com/merge/api/accounting/types/AttachmentsListRequest.java @@ -254,6 +254,9 @@ public Builder from(AttachmentsListRequest other) { return this; } + /** + *

If provided, will only return accounting attachments for this company.

+ */ @JsonSetter(value = "company_id", nulls = Nulls.SKIP) public Builder companyId(Optional companyId) { this.companyId = companyId; @@ -265,6 +268,9 @@ public Builder companyId(String companyId) { return this; } + /** + *

If provided, will only return objects created after this datetime.

+ */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -276,6 +282,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

If provided, will only return objects created before this datetime.

+ */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -287,6 +296,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

The pagination cursor value.

+ */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -298,6 +310,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

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.

+ */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -309,6 +324,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

Whether to include the original data Merge fetched from the third-party to produce these models.

+ */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -320,6 +338,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

+ */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -331,6 +352,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

If provided, only objects synced by Merge after this date time will be returned.

+ */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -342,6 +366,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

If provided, only objects synced by Merge before this date time will be returned.

+ */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -353,6 +380,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

Number of results to return per page.

+ */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -364,6 +394,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

The API provider's ID for the given object.

+ */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; diff --git a/src/main/java/com/merge/api/accounting/types/AttachmentsRetrieveRequest.java b/src/main/java/com/merge/api/accounting/types/AttachmentsRetrieveRequest.java index 1e9beaae9..915c801e1 100644 --- a/src/main/java/com/merge/api/accounting/types/AttachmentsRetrieveRequest.java +++ b/src/main/java/com/merge/api/accounting/types/AttachmentsRetrieveRequest.java @@ -97,6 +97,9 @@ public Builder from(AttachmentsRetrieveRequest other) { return this; } + /** + *

Whether to include the original data Merge fetched from the third-party to produce these models.

+ */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -108,6 +111,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

+ */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/accounting/types/AuditLogEvent.java b/src/main/java/com/merge/api/accounting/types/AuditLogEvent.java index b058a82bc..935c2b311 100644 --- a/src/main/java/com/merge/api/accounting/types/AuditLogEvent.java +++ b/src/main/java/com/merge/api/accounting/types/AuditLogEvent.java @@ -28,11 +28,11 @@ public final class AuditLogEvent { private final Optional userEmail; - private final RoleEnum role; + private final AuditLogEventRole role; private final String ipAddress; - private final EventTypeEnum eventType; + private final AuditLogEventEventType eventType; private final String eventDescription; @@ -44,9 +44,9 @@ private AuditLogEvent( Optional id, Optional userName, Optional userEmail, - RoleEnum role, + AuditLogEventRole role, String ipAddress, - EventTypeEnum eventType, + AuditLogEventEventType eventType, String eventDescription, Optional createdAt, Map additionalProperties) { @@ -94,7 +94,7 @@ public Optional getUserEmail() { * */ @JsonProperty("role") - public RoleEnum getRole() { + public AuditLogEventRole getRole() { return role; } @@ -111,6 +111,7 @@ public String getIpAddress() { *
  • CREATED_TEST_API_KEY - CREATED_TEST_API_KEY
  • *
  • DELETED_TEST_API_KEY - DELETED_TEST_API_KEY
  • *
  • REGENERATED_PRODUCTION_API_KEY - REGENERATED_PRODUCTION_API_KEY
  • + *
  • REGENERATED_WEBHOOK_SIGNATURE - REGENERATED_WEBHOOK_SIGNATURE
  • *
  • INVITED_USER - INVITED_USER
  • *
  • TWO_FACTOR_AUTH_ENABLED - TWO_FACTOR_AUTH_ENABLED
  • *
  • TWO_FACTOR_AUTH_DISABLED - TWO_FACTOR_AUTH_DISABLED
  • @@ -151,7 +152,7 @@ public String getIpAddress() { * */ @JsonProperty("event_type") - public EventTypeEnum getEventType() { + public AuditLogEventEventType getEventType() { return eventType; } @@ -210,7 +211,17 @@ public static RoleStage builder() { } public interface RoleStage { - IpAddressStage role(@NotNull RoleEnum role); + /** + * Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. + * + * * `ADMIN` - ADMIN + * * `DEVELOPER` - DEVELOPER + * * `MEMBER` - MEMBER + * * `API` - API + * * `SYSTEM` - SYSTEM + * * `MERGE_TEAM` - MERGE_TEAM + */ + IpAddressStage role(@NotNull AuditLogEventRole role); Builder from(AuditLogEvent other); } @@ -220,7 +231,54 @@ public interface IpAddressStage { } public interface EventTypeStage { - EventDescriptionStage eventType(@NotNull EventTypeEnum eventType); + /** + * Designates the type of event that occurred. + * + * * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + * * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + * * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + * * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + * * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + * * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + * * `INVITED_USER` - INVITED_USER + * * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + * * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + * * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + * * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + * * `CREATED_DESTINATION` - CREATED_DESTINATION + * * `DELETED_DESTINATION` - DELETED_DESTINATION + * * `CHANGED_DESTINATION` - CHANGED_DESTINATION + * * `CHANGED_SCOPES` - CHANGED_SCOPES + * * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + * * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + * * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + * * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + * * `ENABLED_CATEGORY` - ENABLED_CATEGORY + * * `DISABLED_CATEGORY` - DISABLED_CATEGORY + * * `CHANGED_PASSWORD` - CHANGED_PASSWORD + * * `RESET_PASSWORD` - RESET_PASSWORD + * * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING + * * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING + * * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + * * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + * * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING + * * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING + * * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + * * `MUTED_ISSUE` - MUTED_ISSUE + * * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + * * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + * * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + * * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + * * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + */ + EventDescriptionStage eventType(@NotNull AuditLogEventEventType eventType); } public interface EventDescriptionStage { @@ -234,10 +292,16 @@ public interface _FinalStage { _FinalStage id(String id); + /** + *

    The User's full name at the time of this Event occurring.

    + */ _FinalStage userName(Optional userName); _FinalStage userName(String userName); + /** + *

    The User's email at the time of this Event occurring.

    + */ _FinalStage userEmail(Optional userEmail); _FinalStage userEmail(String userEmail); @@ -250,11 +314,11 @@ public interface _FinalStage { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements RoleStage, IpAddressStage, EventTypeStage, EventDescriptionStage, _FinalStage { - private RoleEnum role; + private AuditLogEventRole role; private String ipAddress; - private EventTypeEnum eventType; + private AuditLogEventEventType eventType; private String eventDescription; @@ -285,7 +349,14 @@ public Builder from(AuditLogEvent other) { } /** - *

    Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring.

    + * Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. + * + * * `ADMIN` - ADMIN + * * `DEVELOPER` - DEVELOPER + * * `MEMBER` - MEMBER + * * `API` - API + * * `SYSTEM` - SYSTEM + * * `MERGE_TEAM` - MERGE_TEAM

    Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring.

    *
      *
    • ADMIN - ADMIN
    • *
    • DEVELOPER - DEVELOPER
    • @@ -298,7 +369,7 @@ public Builder from(AuditLogEvent other) { */ @java.lang.Override @JsonSetter("role") - public IpAddressStage role(@NotNull RoleEnum role) { + public IpAddressStage role(@NotNull AuditLogEventRole role) { this.role = role; return this; } @@ -311,13 +382,58 @@ public EventTypeStage ipAddress(@NotNull String ipAddress) { } /** - *

      Designates the type of event that occurred.

      + * Designates the type of event that occurred. + * + * * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + * * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + * * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + * * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + * * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + * * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + * * `INVITED_USER` - INVITED_USER + * * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + * * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + * * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + * * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + * * `CREATED_DESTINATION` - CREATED_DESTINATION + * * `DELETED_DESTINATION` - DELETED_DESTINATION + * * `CHANGED_DESTINATION` - CHANGED_DESTINATION + * * `CHANGED_SCOPES` - CHANGED_SCOPES + * * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + * * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + * * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + * * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + * * `ENABLED_CATEGORY` - ENABLED_CATEGORY + * * `DISABLED_CATEGORY` - DISABLED_CATEGORY + * * `CHANGED_PASSWORD` - CHANGED_PASSWORD + * * `RESET_PASSWORD` - RESET_PASSWORD + * * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING + * * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING + * * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + * * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + * * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING + * * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING + * * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + * * `MUTED_ISSUE` - MUTED_ISSUE + * * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + * * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + * * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + * * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + * * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED

      Designates the type of event that occurred.

      *
        *
      • CREATED_REMOTE_PRODUCTION_API_KEY - CREATED_REMOTE_PRODUCTION_API_KEY
      • *
      • DELETED_REMOTE_PRODUCTION_API_KEY - DELETED_REMOTE_PRODUCTION_API_KEY
      • *
      • CREATED_TEST_API_KEY - CREATED_TEST_API_KEY
      • *
      • DELETED_TEST_API_KEY - DELETED_TEST_API_KEY
      • *
      • REGENERATED_PRODUCTION_API_KEY - REGENERATED_PRODUCTION_API_KEY
      • + *
      • REGENERATED_WEBHOOK_SIGNATURE - REGENERATED_WEBHOOK_SIGNATURE
      • *
      • INVITED_USER - INVITED_USER
      • *
      • TWO_FACTOR_AUTH_ENABLED - TWO_FACTOR_AUTH_ENABLED
      • *
      • TWO_FACTOR_AUTH_DISABLED - TWO_FACTOR_AUTH_DISABLED
      • @@ -360,7 +476,7 @@ public EventTypeStage ipAddress(@NotNull String ipAddress) { */ @java.lang.Override @JsonSetter("event_type") - public EventDescriptionStage eventType(@NotNull EventTypeEnum eventType) { + public EventDescriptionStage eventType(@NotNull AuditLogEventEventType eventType) { this.eventType = eventType; return this; } @@ -395,6 +511,9 @@ public _FinalStage userEmail(String userEmail) { return this; } + /** + *

        The User's email at the time of this Event occurring.

        + */ @java.lang.Override @JsonSetter(value = "user_email", nulls = Nulls.SKIP) public _FinalStage userEmail(Optional userEmail) { @@ -412,6 +531,9 @@ public _FinalStage userName(String userName) { return this; } + /** + *

        The User's full name at the time of this Event occurring.

        + */ @java.lang.Override @JsonSetter(value = "user_name", nulls = Nulls.SKIP) public _FinalStage userName(Optional userName) { diff --git a/src/main/java/com/merge/api/accounting/types/AuditLogEventEventType.java b/src/main/java/com/merge/api/accounting/types/AuditLogEventEventType.java new file mode 100644 index 000000000..ed6a68248 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/AuditLogEventEventType.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = AuditLogEventEventType.Deserializer.class) +public final class AuditLogEventEventType { + private final Object value; + + private final int type; + + private AuditLogEventEventType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EventTypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AuditLogEventEventType && equalTo((AuditLogEventEventType) other); + } + + private boolean equalTo(AuditLogEventEventType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static AuditLogEventEventType of(EventTypeEnum value) { + return new AuditLogEventEventType(value, 0); + } + + public static AuditLogEventEventType of(String value) { + return new AuditLogEventEventType(value, 1); + } + + public interface Visitor { + T visit(EventTypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(AuditLogEventEventType.class); + } + + @java.lang.Override + public AuditLogEventEventType deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, EventTypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/AuditLogEventRole.java b/src/main/java/com/merge/api/accounting/types/AuditLogEventRole.java new file mode 100644 index 000000000..4add81b3b --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/AuditLogEventRole.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = AuditLogEventRole.Deserializer.class) +public final class AuditLogEventRole { + private final Object value; + + private final int type; + + private AuditLogEventRole(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((RoleEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AuditLogEventRole && equalTo((AuditLogEventRole) other); + } + + private boolean equalTo(AuditLogEventRole other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static AuditLogEventRole of(RoleEnum value) { + return new AuditLogEventRole(value, 0); + } + + public static AuditLogEventRole of(String value) { + return new AuditLogEventRole(value, 1); + } + + public interface Visitor { + T visit(RoleEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(AuditLogEventRole.class); + } + + @java.lang.Override + public AuditLogEventRole deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, RoleEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/AuditTrailListRequest.java b/src/main/java/com/merge/api/accounting/types/AuditTrailListRequest.java index 16ee0ac9a..bd4c33ce3 100644 --- a/src/main/java/com/merge/api/accounting/types/AuditTrailListRequest.java +++ b/src/main/java/com/merge/api/accounting/types/AuditTrailListRequest.java @@ -68,7 +68,7 @@ public Optional getEndDate() { } /** - * @return If included, will only include events with the given event type. Possible values include: CREATED_REMOTE_PRODUCTION_API_KEY, DELETED_REMOTE_PRODUCTION_API_KEY, CREATED_TEST_API_KEY, DELETED_TEST_API_KEY, REGENERATED_PRODUCTION_API_KEY, INVITED_USER, TWO_FACTOR_AUTH_ENABLED, TWO_FACTOR_AUTH_DISABLED, DELETED_LINKED_ACCOUNT, 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 + * @return 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 */ @JsonProperty("event_type") public Optional getEventType() { @@ -162,6 +162,9 @@ public Builder from(AuditTrailListRequest other) { return this; } + /** + *

        The pagination cursor value.

        + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -173,6 +176,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

        If included, will only include audit trail events that occurred before this time

        + */ @JsonSetter(value = "end_date", nulls = Nulls.SKIP) public Builder endDate(Optional endDate) { this.endDate = endDate; @@ -184,6 +190,9 @@ public Builder endDate(String endDate) { return this; } + /** + *

        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

        + */ @JsonSetter(value = "event_type", nulls = Nulls.SKIP) public Builder eventType(Optional eventType) { this.eventType = eventType; @@ -195,6 +204,9 @@ public Builder eventType(String eventType) { return this; } + /** + *

        Number of results to return per page.

        + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -206,6 +218,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

        If included, will only include audit trail events that occurred after this time

        + */ @JsonSetter(value = "start_date", nulls = Nulls.SKIP) public Builder startDate(Optional startDate) { this.startDate = startDate; @@ -217,6 +232,9 @@ public Builder startDate(String startDate) { return this; } + /** + *

        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.

        + */ @JsonSetter(value = "user_email", nulls = Nulls.SKIP) public Builder userEmail(Optional userEmail) { this.userEmail = userEmail; diff --git a/src/main/java/com/merge/api/accounting/types/BalanceSheet.java b/src/main/java/com/merge/api/accounting/types/BalanceSheet.java index bca1270f3..56351c782 100644 --- a/src/main/java/com/merge/api/accounting/types/BalanceSheet.java +++ b/src/main/java/com/merge/api/accounting/types/BalanceSheet.java @@ -33,7 +33,7 @@ public final class BalanceSheet { private final Optional name; - private final Optional currency; + private final Optional currency; private final Optional company; @@ -63,7 +63,7 @@ private BalanceSheet( Optional createdAt, Optional modifiedAt, Optional name, - Optional currency, + Optional currency, Optional company, Optional date, Optional netAssets, @@ -443,7 +443,7 @@ public Optional getName() { *
      */ @JsonProperty("currency") - public Optional getCurrency() { + public Optional getCurrency() { return currency; } @@ -584,7 +584,7 @@ public static final class Builder { private Optional name = Optional.empty(); - private Optional currency = Optional.empty(); + private Optional currency = Optional.empty(); private Optional company = Optional.empty(); @@ -642,6 +642,9 @@ public Builder id(String id) { return this; } + /** + *

      The third-party API ID of the matching object.

      + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -653,6 +656,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

      The datetime that this object was created by Merge.

      + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -664,6 +670,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

      The datetime that this object was modified by Merge.

      + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -675,6 +684,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

      The balance sheet's name.

      + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -686,17 +698,331 @@ public Builder name(String name) { return this; } + /** + *

      The balance sheet's currency.

      + *
        + *
      • XUA - ADB Unit of Account
      • + *
      • AFN - Afghan Afghani
      • + *
      • AFA - Afghan Afghani (1927–2002)
      • + *
      • ALL - Albanian Lek
      • + *
      • ALK - Albanian Lek (1946–1965)
      • + *
      • DZD - Algerian Dinar
      • + *
      • ADP - Andorran Peseta
      • + *
      • AOA - Angolan Kwanza
      • + *
      • AOK - Angolan Kwanza (1977–1991)
      • + *
      • AON - Angolan New Kwanza (1990–2000)
      • + *
      • AOR - Angolan Readjusted Kwanza (1995–1999)
      • + *
      • ARA - Argentine Austral
      • + *
      • ARS - Argentine Peso
      • + *
      • ARM - Argentine Peso (1881–1970)
      • + *
      • ARP - Argentine Peso (1983–1985)
      • + *
      • ARL - Argentine Peso Ley (1970–1983)
      • + *
      • AMD - Armenian Dram
      • + *
      • AWG - Aruban Florin
      • + *
      • AUD - Australian Dollar
      • + *
      • ATS - Austrian Schilling
      • + *
      • AZN - Azerbaijani Manat
      • + *
      • AZM - Azerbaijani Manat (1993–2006)
      • + *
      • BSD - Bahamian Dollar
      • + *
      • BHD - Bahraini Dinar
      • + *
      • BDT - Bangladeshi Taka
      • + *
      • BBD - Barbadian Dollar
      • + *
      • BYN - Belarusian Ruble
      • + *
      • BYB - Belarusian Ruble (1994–1999)
      • + *
      • BYR - Belarusian Ruble (2000–2016)
      • + *
      • BEF - Belgian Franc
      • + *
      • BEC - Belgian Franc (convertible)
      • + *
      • BEL - Belgian Franc (financial)
      • + *
      • BZD - Belize Dollar
      • + *
      • BMD - Bermudan Dollar
      • + *
      • BTN - Bhutanese Ngultrum
      • + *
      • BOB - Bolivian Boliviano
      • + *
      • BOL - Bolivian Boliviano (1863–1963)
      • + *
      • BOV - Bolivian Mvdol
      • + *
      • BOP - Bolivian Peso
      • + *
      • BAM - Bosnia-Herzegovina Convertible Mark
      • + *
      • BAD - Bosnia-Herzegovina Dinar (1992–1994)
      • + *
      • BAN - Bosnia-Herzegovina New Dinar (1994–1997)
      • + *
      • BWP - Botswanan Pula
      • + *
      • BRC - Brazilian Cruzado (1986–1989)
      • + *
      • BRZ - Brazilian Cruzeiro (1942–1967)
      • + *
      • BRE - Brazilian Cruzeiro (1990–1993)
      • + *
      • BRR - Brazilian Cruzeiro (1993–1994)
      • + *
      • BRN - Brazilian New Cruzado (1989–1990)
      • + *
      • BRB - Brazilian New Cruzeiro (1967–1986)
      • + *
      • BRL - Brazilian Real
      • + *
      • GBP - British Pound
      • + *
      • BND - Brunei Dollar
      • + *
      • BGL - Bulgarian Hard Lev
      • + *
      • BGN - Bulgarian Lev
      • + *
      • BGO - Bulgarian Lev (1879–1952)
      • + *
      • BGM - Bulgarian Socialist Lev
      • + *
      • BUK - Burmese Kyat
      • + *
      • BIF - Burundian Franc
      • + *
      • XPF - CFP Franc
      • + *
      • KHR - Cambodian Riel
      • + *
      • CAD - Canadian Dollar
      • + *
      • CVE - Cape Verdean Escudo
      • + *
      • KYD - Cayman Islands Dollar
      • + *
      • XAF - Central African CFA Franc
      • + *
      • CLE - Chilean Escudo
      • + *
      • CLP - Chilean Peso
      • + *
      • CLF - Chilean Unit of Account (UF)
      • + *
      • CNX - Chinese People’s Bank Dollar
      • + *
      • CNY - Chinese Yuan
      • + *
      • CNH - Chinese Yuan (offshore)
      • + *
      • COP - Colombian Peso
      • + *
      • COU - Colombian Real Value Unit
      • + *
      • KMF - Comorian Franc
      • + *
      • CDF - Congolese Franc
      • + *
      • CRC - Costa Rican Colón
      • + *
      • HRD - Croatian Dinar
      • + *
      • HRK - Croatian Kuna
      • + *
      • CUC - Cuban Convertible Peso
      • + *
      • CUP - Cuban Peso
      • + *
      • CYP - Cypriot Pound
      • + *
      • CZK - Czech Koruna
      • + *
      • CSK - Czechoslovak Hard Koruna
      • + *
      • DKK - Danish Krone
      • + *
      • DJF - Djiboutian Franc
      • + *
      • DOP - Dominican Peso
      • + *
      • NLG - Dutch Guilder
      • + *
      • XCD - East Caribbean Dollar
      • + *
      • DDM - East German Mark
      • + *
      • ECS - Ecuadorian Sucre
      • + *
      • ECV - Ecuadorian Unit of Constant Value
      • + *
      • EGP - Egyptian Pound
      • + *
      • GQE - Equatorial Guinean Ekwele
      • + *
      • ERN - Eritrean Nakfa
      • + *
      • EEK - Estonian Kroon
      • + *
      • ETB - Ethiopian Birr
      • + *
      • EUR - Euro
      • + *
      • XBA - European Composite Unit
      • + *
      • XEU - European Currency Unit
      • + *
      • XBB - European Monetary Unit
      • + *
      • XBC - European Unit of Account (XBC)
      • + *
      • XBD - European Unit of Account (XBD)
      • + *
      • FKP - Falkland Islands Pound
      • + *
      • FJD - Fijian Dollar
      • + *
      • FIM - Finnish Markka
      • + *
      • FRF - French Franc
      • + *
      • XFO - French Gold Franc
      • + *
      • XFU - French UIC-Franc
      • + *
      • GMD - Gambian Dalasi
      • + *
      • GEK - Georgian Kupon Larit
      • + *
      • GEL - Georgian Lari
      • + *
      • DEM - German Mark
      • + *
      • GHS - Ghanaian Cedi
      • + *
      • GHC - Ghanaian Cedi (1979–2007)
      • + *
      • GIP - Gibraltar Pound
      • + *
      • XAU - Gold
      • + *
      • GRD - Greek Drachma
      • + *
      • GTQ - Guatemalan Quetzal
      • + *
      • GWP - Guinea-Bissau Peso
      • + *
      • GNF - Guinean Franc
      • + *
      • GNS - Guinean Syli
      • + *
      • GYD - Guyanaese Dollar
      • + *
      • HTG - Haitian Gourde
      • + *
      • HNL - Honduran Lempira
      • + *
      • HKD - Hong Kong Dollar
      • + *
      • HUF - Hungarian Forint
      • + *
      • IMP - IMP
      • + *
      • ISK - Icelandic Króna
      • + *
      • ISJ - Icelandic Króna (1918–1981)
      • + *
      • INR - Indian Rupee
      • + *
      • IDR - Indonesian Rupiah
      • + *
      • IRR - Iranian Rial
      • + *
      • IQD - Iraqi Dinar
      • + *
      • IEP - Irish Pound
      • + *
      • ILS - Israeli New Shekel
      • + *
      • ILP - Israeli Pound
      • + *
      • ILR - Israeli Shekel (1980–1985)
      • + *
      • ITL - Italian Lira
      • + *
      • JMD - Jamaican Dollar
      • + *
      • JPY - Japanese Yen
      • + *
      • JOD - Jordanian Dinar
      • + *
      • KZT - Kazakhstani Tenge
      • + *
      • KES - Kenyan Shilling
      • + *
      • KWD - Kuwaiti Dinar
      • + *
      • KGS - Kyrgystani Som
      • + *
      • LAK - Laotian Kip
      • + *
      • LVL - Latvian Lats
      • + *
      • LVR - Latvian Ruble
      • + *
      • LBP - Lebanese Pound
      • + *
      • LSL - Lesotho Loti
      • + *
      • LRD - Liberian Dollar
      • + *
      • LYD - Libyan Dinar
      • + *
      • LTL - Lithuanian Litas
      • + *
      • LTT - Lithuanian Talonas
      • + *
      • LUL - Luxembourg Financial Franc
      • + *
      • LUC - Luxembourgian Convertible Franc
      • + *
      • LUF - Luxembourgian Franc
      • + *
      • MOP - Macanese Pataca
      • + *
      • MKD - Macedonian Denar
      • + *
      • MKN - Macedonian Denar (1992–1993)
      • + *
      • MGA - Malagasy Ariary
      • + *
      • MGF - Malagasy Franc
      • + *
      • MWK - Malawian Kwacha
      • + *
      • MYR - Malaysian Ringgit
      • + *
      • MVR - Maldivian Rufiyaa
      • + *
      • MVP - Maldivian Rupee (1947–1981)
      • + *
      • MLF - Malian Franc
      • + *
      • MTL - Maltese Lira
      • + *
      • MTP - Maltese Pound
      • + *
      • MRU - Mauritanian Ouguiya
      • + *
      • MRO - Mauritanian Ouguiya (1973–2017)
      • + *
      • MUR - Mauritian Rupee
      • + *
      • MXV - Mexican Investment Unit
      • + *
      • MXN - Mexican Peso
      • + *
      • MXP - Mexican Silver Peso (1861–1992)
      • + *
      • MDC - Moldovan Cupon
      • + *
      • MDL - Moldovan Leu
      • + *
      • MCF - Monegasque Franc
      • + *
      • MNT - Mongolian Tugrik
      • + *
      • MAD - Moroccan Dirham
      • + *
      • MAF - Moroccan Franc
      • + *
      • MZE - Mozambican Escudo
      • + *
      • MZN - Mozambican Metical
      • + *
      • MZM - Mozambican Metical (1980–2006)
      • + *
      • MMK - Myanmar Kyat
      • + *
      • NAD - Namibian Dollar
      • + *
      • NPR - Nepalese Rupee
      • + *
      • ANG - Netherlands Antillean Guilder
      • + *
      • TWD - New Taiwan Dollar
      • + *
      • NZD - New Zealand Dollar
      • + *
      • NIO - Nicaraguan Córdoba
      • + *
      • NIC - Nicaraguan Córdoba (1988–1991)
      • + *
      • NGN - Nigerian Naira
      • + *
      • KPW - North Korean Won
      • + *
      • NOK - Norwegian Krone
      • + *
      • OMR - Omani Rial
      • + *
      • PKR - Pakistani Rupee
      • + *
      • XPD - Palladium
      • + *
      • PAB - Panamanian Balboa
      • + *
      • PGK - Papua New Guinean Kina
      • + *
      • PYG - Paraguayan Guarani
      • + *
      • PEI - Peruvian Inti
      • + *
      • PEN - Peruvian Sol
      • + *
      • PES - Peruvian Sol (1863–1965)
      • + *
      • PHP - Philippine Peso
      • + *
      • XPT - Platinum
      • + *
      • PLN - Polish Zloty
      • + *
      • PLZ - Polish Zloty (1950–1995)
      • + *
      • PTE - Portuguese Escudo
      • + *
      • GWE - Portuguese Guinea Escudo
      • + *
      • QAR - Qatari Rial
      • + *
      • XRE - RINET Funds
      • + *
      • RHD - Rhodesian Dollar
      • + *
      • RON - Romanian Leu
      • + *
      • ROL - Romanian Leu (1952–2006)
      • + *
      • RUB - Russian Ruble
      • + *
      • RUR - Russian Ruble (1991–1998)
      • + *
      • RWF - Rwandan Franc
      • + *
      • SVC - Salvadoran Colón
      • + *
      • WST - Samoan Tala
      • + *
      • SAR - Saudi Riyal
      • + *
      • RSD - Serbian Dinar
      • + *
      • CSD - Serbian Dinar (2002–2006)
      • + *
      • SCR - Seychellois Rupee
      • + *
      • SLL - Sierra Leonean Leone
      • + *
      • XAG - Silver
      • + *
      • SGD - Singapore Dollar
      • + *
      • SKK - Slovak Koruna
      • + *
      • SIT - Slovenian Tolar
      • + *
      • SBD - Solomon Islands Dollar
      • + *
      • SOS - Somali Shilling
      • + *
      • ZAR - South African Rand
      • + *
      • ZAL - South African Rand (financial)
      • + *
      • KRH - South Korean Hwan (1953–1962)
      • + *
      • KRW - South Korean Won
      • + *
      • KRO - South Korean Won (1945–1953)
      • + *
      • SSP - South Sudanese Pound
      • + *
      • SUR - Soviet Rouble
      • + *
      • ESP - Spanish Peseta
      • + *
      • ESA - Spanish Peseta (A account)
      • + *
      • ESB - Spanish Peseta (convertible account)
      • + *
      • XDR - Special Drawing Rights
      • + *
      • LKR - Sri Lankan Rupee
      • + *
      • SHP - St. Helena Pound
      • + *
      • XSU - Sucre
      • + *
      • SDD - Sudanese Dinar (1992–2007)
      • + *
      • SDG - Sudanese Pound
      • + *
      • SDP - Sudanese Pound (1957–1998)
      • + *
      • SRD - Surinamese Dollar
      • + *
      • SRG - Surinamese Guilder
      • + *
      • SZL - Swazi Lilangeni
      • + *
      • SEK - Swedish Krona
      • + *
      • CHF - Swiss Franc
      • + *
      • SYP - Syrian Pound
      • + *
      • STN - São Tomé & Príncipe Dobra
      • + *
      • STD - São Tomé & Príncipe Dobra (1977–2017)
      • + *
      • TVD - TVD
      • + *
      • TJR - Tajikistani Ruble
      • + *
      • TJS - Tajikistani Somoni
      • + *
      • TZS - Tanzanian Shilling
      • + *
      • XTS - Testing Currency Code
      • + *
      • THB - Thai Baht
      • + *
      • XXX - The codes assigned for transactions where no currency is involved
      • + *
      • TPE - Timorese Escudo
      • + *
      • TOP - Tongan Paʻanga
      • + *
      • TTD - Trinidad & Tobago Dollar
      • + *
      • TND - Tunisian Dinar
      • + *
      • TRY - Turkish Lira
      • + *
      • TRL - Turkish Lira (1922–2005)
      • + *
      • TMT - Turkmenistani Manat
      • + *
      • TMM - Turkmenistani Manat (1993–2009)
      • + *
      • USD - US Dollar
      • + *
      • USN - US Dollar (Next day)
      • + *
      • USS - US Dollar (Same day)
      • + *
      • UGX - Ugandan Shilling
      • + *
      • UGS - Ugandan Shilling (1966–1987)
      • + *
      • UAH - Ukrainian Hryvnia
      • + *
      • UAK - Ukrainian Karbovanets
      • + *
      • AED - United Arab Emirates Dirham
      • + *
      • UYW - Uruguayan Nominal Wage Index Unit
      • + *
      • UYU - Uruguayan Peso
      • + *
      • UYP - Uruguayan Peso (1975–1993)
      • + *
      • UYI - Uruguayan Peso (Indexed Units)
      • + *
      • UZS - Uzbekistani Som
      • + *
      • VUV - Vanuatu Vatu
      • + *
      • VES - Venezuelan Bolívar
      • + *
      • VEB - Venezuelan Bolívar (1871–2008)
      • + *
      • VEF - Venezuelan Bolívar (2008–2018)
      • + *
      • VND - Vietnamese Dong
      • + *
      • VNN - Vietnamese Dong (1978–1985)
      • + *
      • CHE - WIR Euro
      • + *
      • CHW - WIR Franc
      • + *
      • XOF - West African CFA Franc
      • + *
      • YDD - Yemeni Dinar
      • + *
      • YER - Yemeni Rial
      • + *
      • YUN - Yugoslavian Convertible Dinar (1990–1992)
      • + *
      • YUD - Yugoslavian Hard Dinar (1966–1990)
      • + *
      • YUM - Yugoslavian New Dinar (1994–2002)
      • + *
      • YUR - Yugoslavian Reformed Dinar (1992–1993)
      • + *
      • ZWN - ZWN
      • + *
      • ZRN - Zairean New Zaire (1993–1998)
      • + *
      • ZRZ - Zairean Zaire (1971–1993)
      • + *
      • ZMW - Zambian Kwacha
      • + *
      • ZMK - Zambian Kwacha (1968–2012)
      • + *
      • ZWD - Zimbabwean Dollar (1980–2008)
      • + *
      • ZWR - Zimbabwean Dollar (2008)
      • + *
      • ZWL - Zimbabwean Dollar (2009)
      • + *
      + */ @JsonSetter(value = "currency", nulls = Nulls.SKIP) - public Builder currency(Optional currency) { + public Builder currency(Optional currency) { this.currency = currency; return this; } - public Builder currency(TransactionCurrencyEnum currency) { + public Builder currency(BalanceSheetCurrency currency) { this.currency = Optional.ofNullable(currency); return this; } + /** + *

      Company object for the given BalanceSheet object.

      + */ @JsonSetter(value = "company", nulls = Nulls.SKIP) public Builder company(Optional company) { this.company = company; @@ -708,6 +1034,9 @@ public Builder company(BalanceSheetCompany company) { return this; } + /** + *

      The balance sheet's date. The balance sheet data will reflect the company's financial position this point in time.

      + */ @JsonSetter(value = "date", nulls = Nulls.SKIP) public Builder date(Optional date) { this.date = date; @@ -719,6 +1048,9 @@ public Builder date(OffsetDateTime date) { return this; } + /** + *

      The balance sheet's net assets.

      + */ @JsonSetter(value = "net_assets", nulls = Nulls.SKIP) public Builder netAssets(Optional netAssets) { this.netAssets = netAssets; @@ -763,6 +1095,9 @@ public Builder equity(List equity) { return this; } + /** + *

      The time that balance sheet was generated by the accounting system.

      + */ @JsonSetter(value = "remote_generated_at", nulls = Nulls.SKIP) public Builder remoteGeneratedAt(Optional remoteGeneratedAt) { this.remoteGeneratedAt = remoteGeneratedAt; @@ -774,6 +1109,9 @@ public Builder remoteGeneratedAt(OffsetDateTime remoteGeneratedAt) { return this; } + /** + *

      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.

      + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/accounting/types/BalanceSheetCurrency.java b/src/main/java/com/merge/api/accounting/types/BalanceSheetCurrency.java new file mode 100644 index 000000000..727c4e2b8 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/BalanceSheetCurrency.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = BalanceSheetCurrency.Deserializer.class) +public final class BalanceSheetCurrency { + private final Object value; + + private final int type; + + private BalanceSheetCurrency(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((TransactionCurrencyEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof BalanceSheetCurrency && equalTo((BalanceSheetCurrency) other); + } + + private boolean equalTo(BalanceSheetCurrency other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static BalanceSheetCurrency of(TransactionCurrencyEnum value) { + return new BalanceSheetCurrency(value, 0); + } + + public static BalanceSheetCurrency of(String value) { + return new BalanceSheetCurrency(value, 1); + } + + public interface Visitor { + T visit(TransactionCurrencyEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(BalanceSheetCurrency.class); + } + + @java.lang.Override + public BalanceSheetCurrency deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TransactionCurrencyEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/BalanceSheetsListRequest.java b/src/main/java/com/merge/api/accounting/types/BalanceSheetsListRequest.java index f46c44502..e9bef96f3 100644 --- a/src/main/java/com/merge/api/accounting/types/BalanceSheetsListRequest.java +++ b/src/main/java/com/merge/api/accounting/types/BalanceSheetsListRequest.java @@ -273,6 +273,9 @@ public Builder from(BalanceSheetsListRequest other) { return this; } + /** + *

      Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

      + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -289,6 +292,9 @@ public Builder expand(String expand) { return this; } + /** + *

      If provided, will only return balance sheets for this company.

      + */ @JsonSetter(value = "company_id", nulls = Nulls.SKIP) public Builder companyId(Optional companyId) { this.companyId = companyId; @@ -300,6 +306,9 @@ public Builder companyId(String companyId) { return this; } + /** + *

      If provided, will only return objects created after this datetime.

      + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -311,6 +320,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

      If provided, will only return objects created before this datetime.

      + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -322,6 +334,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

      The pagination cursor value.

      + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -333,6 +348,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

      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.

      + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -344,6 +362,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

      Whether to include the original data Merge fetched from the third-party to produce these models.

      + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -355,6 +376,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

      Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

      + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -366,6 +390,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

      If provided, only objects synced by Merge after this date time will be returned.

      + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -377,6 +404,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

      If provided, only objects synced by Merge before this date time will be returned.

      + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -388,6 +418,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

      Number of results to return per page.

      + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -399,6 +432,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

      The API provider's ID for the given object.

      + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; diff --git a/src/main/java/com/merge/api/accounting/types/BalanceSheetsRetrieveRequest.java b/src/main/java/com/merge/api/accounting/types/BalanceSheetsRetrieveRequest.java index 0a709b786..365ecf1a7 100644 --- a/src/main/java/com/merge/api/accounting/types/BalanceSheetsRetrieveRequest.java +++ b/src/main/java/com/merge/api/accounting/types/BalanceSheetsRetrieveRequest.java @@ -116,6 +116,9 @@ public Builder from(BalanceSheetsRetrieveRequest other) { return this; } + /** + *

      Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

      + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -132,6 +135,9 @@ public Builder expand(String expand) { return this; } + /** + *

      Whether to include the original data Merge fetched from the third-party to produce these models.

      + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -143,6 +149,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

      Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

      + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/accounting/types/BankFeedAccount.java b/src/main/java/com/merge/api/accounting/types/BankFeedAccount.java index 4c8bf2d8f..2cc32aea3 100644 --- a/src/main/java/com/merge/api/accounting/types/BankFeedAccount.java +++ b/src/main/java/com/merge/api/accounting/types/BankFeedAccount.java @@ -41,15 +41,15 @@ public final class BankFeedAccount { private final Optional targetAccountName; - private final Optional currency; + private final Optional currency; - private final Optional feedStatus; + private final Optional feedStatus; private final Optional feedStartDate; private final Optional sourceAccountBalance; - private final Optional accountType; + private final Optional accountType; private final Optional remoteWasDeleted; @@ -69,11 +69,11 @@ private BankFeedAccount( Optional sourceAccountName, Optional sourceAccountNumber, Optional targetAccountName, - Optional currency, - Optional feedStatus, + Optional currency, + Optional feedStatus, Optional feedStartDate, Optional sourceAccountBalance, - Optional accountType, + Optional accountType, Optional remoteWasDeleted, Optional> fieldMappings, Optional>>> remoteData, @@ -479,7 +479,7 @@ public Optional getTargetAccountName() { *
    */ @JsonProperty("currency") - public Optional getCurrency() { + public Optional getCurrency() { return currency; } @@ -491,7 +491,7 @@ public Optional getCurrency() { * */ @JsonProperty("feed_status") - public Optional getFeedStatus() { + public Optional getFeedStatus() { return feedStatus; } @@ -519,7 +519,7 @@ public Optional getSourceAccountBalance() { * */ @JsonProperty("account_type") - public Optional getAccountType() { + public Optional getAccountType() { return accountType; } @@ -623,15 +623,15 @@ public static final class Builder { private Optional targetAccountName = Optional.empty(); - private Optional currency = Optional.empty(); + private Optional currency = Optional.empty(); - private Optional feedStatus = Optional.empty(); + private Optional feedStatus = Optional.empty(); private Optional feedStartDate = Optional.empty(); private Optional sourceAccountBalance = Optional.empty(); - private Optional accountType = Optional.empty(); + private Optional accountType = Optional.empty(); private Optional remoteWasDeleted = Optional.empty(); @@ -676,6 +676,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -687,6 +690,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -698,6 +704,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -709,6 +718,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The unique identifier of the source account from our customer’s platform.

    + */ @JsonSetter(value = "source_account_id", nulls = Nulls.SKIP) public Builder sourceAccountId(Optional sourceAccountId) { this.sourceAccountId = sourceAccountId; @@ -720,6 +732,9 @@ public Builder sourceAccountId(String sourceAccountId) { return this; } + /** + *

    The unique identifier of the target account from the third party software.

    + */ @JsonSetter(value = "target_account_id", nulls = Nulls.SKIP) public Builder targetAccountId(Optional targetAccountId) { this.targetAccountId = targetAccountId; @@ -731,6 +746,9 @@ public Builder targetAccountId(String targetAccountId) { return this; } + /** + *

    The name of the source account as stored in our customer’s platform.

    + */ @JsonSetter(value = "source_account_name", nulls = Nulls.SKIP) public Builder sourceAccountName(Optional sourceAccountName) { this.sourceAccountName = sourceAccountName; @@ -742,6 +760,9 @@ public Builder sourceAccountName(String sourceAccountName) { return this; } + /** + *

    The human-readable account number of the source account as stored in our customer’s platform.

    + */ @JsonSetter(value = "source_account_number", nulls = Nulls.SKIP) public Builder sourceAccountNumber(Optional sourceAccountNumber) { this.sourceAccountNumber = sourceAccountNumber; @@ -753,6 +774,9 @@ public Builder sourceAccountNumber(String sourceAccountNumber) { return this; } + /** + *

    The name of the target account from the third party software.

    + */ @JsonSetter(value = "target_account_name", nulls = Nulls.SKIP) public Builder targetAccountName(Optional targetAccountName) { this.targetAccountName = targetAccountName; @@ -764,28 +788,349 @@ public Builder targetAccountName(String targetAccountName) { return this; } + /** + *

    The currency code of the bank feed.

    + *
      + *
    • XUA - ADB Unit of Account
    • + *
    • AFN - Afghan Afghani
    • + *
    • AFA - Afghan Afghani (1927–2002)
    • + *
    • ALL - Albanian Lek
    • + *
    • ALK - Albanian Lek (1946–1965)
    • + *
    • DZD - Algerian Dinar
    • + *
    • ADP - Andorran Peseta
    • + *
    • AOA - Angolan Kwanza
    • + *
    • AOK - Angolan Kwanza (1977–1991)
    • + *
    • AON - Angolan New Kwanza (1990–2000)
    • + *
    • AOR - Angolan Readjusted Kwanza (1995–1999)
    • + *
    • ARA - Argentine Austral
    • + *
    • ARS - Argentine Peso
    • + *
    • ARM - Argentine Peso (1881–1970)
    • + *
    • ARP - Argentine Peso (1983–1985)
    • + *
    • ARL - Argentine Peso Ley (1970–1983)
    • + *
    • AMD - Armenian Dram
    • + *
    • AWG - Aruban Florin
    • + *
    • AUD - Australian Dollar
    • + *
    • ATS - Austrian Schilling
    • + *
    • AZN - Azerbaijani Manat
    • + *
    • AZM - Azerbaijani Manat (1993–2006)
    • + *
    • BSD - Bahamian Dollar
    • + *
    • BHD - Bahraini Dinar
    • + *
    • BDT - Bangladeshi Taka
    • + *
    • BBD - Barbadian Dollar
    • + *
    • BYN - Belarusian Ruble
    • + *
    • BYB - Belarusian Ruble (1994–1999)
    • + *
    • BYR - Belarusian Ruble (2000–2016)
    • + *
    • BEF - Belgian Franc
    • + *
    • BEC - Belgian Franc (convertible)
    • + *
    • BEL - Belgian Franc (financial)
    • + *
    • BZD - Belize Dollar
    • + *
    • BMD - Bermudan Dollar
    • + *
    • BTN - Bhutanese Ngultrum
    • + *
    • BOB - Bolivian Boliviano
    • + *
    • BOL - Bolivian Boliviano (1863–1963)
    • + *
    • BOV - Bolivian Mvdol
    • + *
    • BOP - Bolivian Peso
    • + *
    • BAM - Bosnia-Herzegovina Convertible Mark
    • + *
    • BAD - Bosnia-Herzegovina Dinar (1992–1994)
    • + *
    • BAN - Bosnia-Herzegovina New Dinar (1994–1997)
    • + *
    • BWP - Botswanan Pula
    • + *
    • BRC - Brazilian Cruzado (1986–1989)
    • + *
    • BRZ - Brazilian Cruzeiro (1942–1967)
    • + *
    • BRE - Brazilian Cruzeiro (1990–1993)
    • + *
    • BRR - Brazilian Cruzeiro (1993–1994)
    • + *
    • BRN - Brazilian New Cruzado (1989–1990)
    • + *
    • BRB - Brazilian New Cruzeiro (1967–1986)
    • + *
    • BRL - Brazilian Real
    • + *
    • GBP - British Pound
    • + *
    • BND - Brunei Dollar
    • + *
    • BGL - Bulgarian Hard Lev
    • + *
    • BGN - Bulgarian Lev
    • + *
    • BGO - Bulgarian Lev (1879–1952)
    • + *
    • BGM - Bulgarian Socialist Lev
    • + *
    • BUK - Burmese Kyat
    • + *
    • BIF - Burundian Franc
    • + *
    • XPF - CFP Franc
    • + *
    • KHR - Cambodian Riel
    • + *
    • CAD - Canadian Dollar
    • + *
    • CVE - Cape Verdean Escudo
    • + *
    • KYD - Cayman Islands Dollar
    • + *
    • XAF - Central African CFA Franc
    • + *
    • CLE - Chilean Escudo
    • + *
    • CLP - Chilean Peso
    • + *
    • CLF - Chilean Unit of Account (UF)
    • + *
    • CNX - Chinese People’s Bank Dollar
    • + *
    • CNY - Chinese Yuan
    • + *
    • CNH - Chinese Yuan (offshore)
    • + *
    • COP - Colombian Peso
    • + *
    • COU - Colombian Real Value Unit
    • + *
    • KMF - Comorian Franc
    • + *
    • CDF - Congolese Franc
    • + *
    • CRC - Costa Rican Colón
    • + *
    • HRD - Croatian Dinar
    • + *
    • HRK - Croatian Kuna
    • + *
    • CUC - Cuban Convertible Peso
    • + *
    • CUP - Cuban Peso
    • + *
    • CYP - Cypriot Pound
    • + *
    • CZK - Czech Koruna
    • + *
    • CSK - Czechoslovak Hard Koruna
    • + *
    • DKK - Danish Krone
    • + *
    • DJF - Djiboutian Franc
    • + *
    • DOP - Dominican Peso
    • + *
    • NLG - Dutch Guilder
    • + *
    • XCD - East Caribbean Dollar
    • + *
    • DDM - East German Mark
    • + *
    • ECS - Ecuadorian Sucre
    • + *
    • ECV - Ecuadorian Unit of Constant Value
    • + *
    • EGP - Egyptian Pound
    • + *
    • GQE - Equatorial Guinean Ekwele
    • + *
    • ERN - Eritrean Nakfa
    • + *
    • EEK - Estonian Kroon
    • + *
    • ETB - Ethiopian Birr
    • + *
    • EUR - Euro
    • + *
    • XBA - European Composite Unit
    • + *
    • XEU - European Currency Unit
    • + *
    • XBB - European Monetary Unit
    • + *
    • XBC - European Unit of Account (XBC)
    • + *
    • XBD - European Unit of Account (XBD)
    • + *
    • FKP - Falkland Islands Pound
    • + *
    • FJD - Fijian Dollar
    • + *
    • FIM - Finnish Markka
    • + *
    • FRF - French Franc
    • + *
    • XFO - French Gold Franc
    • + *
    • XFU - French UIC-Franc
    • + *
    • GMD - Gambian Dalasi
    • + *
    • GEK - Georgian Kupon Larit
    • + *
    • GEL - Georgian Lari
    • + *
    • DEM - German Mark
    • + *
    • GHS - Ghanaian Cedi
    • + *
    • GHC - Ghanaian Cedi (1979–2007)
    • + *
    • GIP - Gibraltar Pound
    • + *
    • XAU - Gold
    • + *
    • GRD - Greek Drachma
    • + *
    • GTQ - Guatemalan Quetzal
    • + *
    • GWP - Guinea-Bissau Peso
    • + *
    • GNF - Guinean Franc
    • + *
    • GNS - Guinean Syli
    • + *
    • GYD - Guyanaese Dollar
    • + *
    • HTG - Haitian Gourde
    • + *
    • HNL - Honduran Lempira
    • + *
    • HKD - Hong Kong Dollar
    • + *
    • HUF - Hungarian Forint
    • + *
    • IMP - IMP
    • + *
    • ISK - Icelandic Króna
    • + *
    • ISJ - Icelandic Króna (1918–1981)
    • + *
    • INR - Indian Rupee
    • + *
    • IDR - Indonesian Rupiah
    • + *
    • IRR - Iranian Rial
    • + *
    • IQD - Iraqi Dinar
    • + *
    • IEP - Irish Pound
    • + *
    • ILS - Israeli New Shekel
    • + *
    • ILP - Israeli Pound
    • + *
    • ILR - Israeli Shekel (1980–1985)
    • + *
    • ITL - Italian Lira
    • + *
    • JMD - Jamaican Dollar
    • + *
    • JPY - Japanese Yen
    • + *
    • JOD - Jordanian Dinar
    • + *
    • KZT - Kazakhstani Tenge
    • + *
    • KES - Kenyan Shilling
    • + *
    • KWD - Kuwaiti Dinar
    • + *
    • KGS - Kyrgystani Som
    • + *
    • LAK - Laotian Kip
    • + *
    • LVL - Latvian Lats
    • + *
    • LVR - Latvian Ruble
    • + *
    • LBP - Lebanese Pound
    • + *
    • LSL - Lesotho Loti
    • + *
    • LRD - Liberian Dollar
    • + *
    • LYD - Libyan Dinar
    • + *
    • LTL - Lithuanian Litas
    • + *
    • LTT - Lithuanian Talonas
    • + *
    • LUL - Luxembourg Financial Franc
    • + *
    • LUC - Luxembourgian Convertible Franc
    • + *
    • LUF - Luxembourgian Franc
    • + *
    • MOP - Macanese Pataca
    • + *
    • MKD - Macedonian Denar
    • + *
    • MKN - Macedonian Denar (1992–1993)
    • + *
    • MGA - Malagasy Ariary
    • + *
    • MGF - Malagasy Franc
    • + *
    • MWK - Malawian Kwacha
    • + *
    • MYR - Malaysian Ringgit
    • + *
    • MVR - Maldivian Rufiyaa
    • + *
    • MVP - Maldivian Rupee (1947–1981)
    • + *
    • MLF - Malian Franc
    • + *
    • MTL - Maltese Lira
    • + *
    • MTP - Maltese Pound
    • + *
    • MRU - Mauritanian Ouguiya
    • + *
    • MRO - Mauritanian Ouguiya (1973–2017)
    • + *
    • MUR - Mauritian Rupee
    • + *
    • MXV - Mexican Investment Unit
    • + *
    • MXN - Mexican Peso
    • + *
    • MXP - Mexican Silver Peso (1861–1992)
    • + *
    • MDC - Moldovan Cupon
    • + *
    • MDL - Moldovan Leu
    • + *
    • MCF - Monegasque Franc
    • + *
    • MNT - Mongolian Tugrik
    • + *
    • MAD - Moroccan Dirham
    • + *
    • MAF - Moroccan Franc
    • + *
    • MZE - Mozambican Escudo
    • + *
    • MZN - Mozambican Metical
    • + *
    • MZM - Mozambican Metical (1980–2006)
    • + *
    • MMK - Myanmar Kyat
    • + *
    • NAD - Namibian Dollar
    • + *
    • NPR - Nepalese Rupee
    • + *
    • ANG - Netherlands Antillean Guilder
    • + *
    • TWD - New Taiwan Dollar
    • + *
    • NZD - New Zealand Dollar
    • + *
    • NIO - Nicaraguan Córdoba
    • + *
    • NIC - Nicaraguan Córdoba (1988–1991)
    • + *
    • NGN - Nigerian Naira
    • + *
    • KPW - North Korean Won
    • + *
    • NOK - Norwegian Krone
    • + *
    • OMR - Omani Rial
    • + *
    • PKR - Pakistani Rupee
    • + *
    • XPD - Palladium
    • + *
    • PAB - Panamanian Balboa
    • + *
    • PGK - Papua New Guinean Kina
    • + *
    • PYG - Paraguayan Guarani
    • + *
    • PEI - Peruvian Inti
    • + *
    • PEN - Peruvian Sol
    • + *
    • PES - Peruvian Sol (1863–1965)
    • + *
    • PHP - Philippine Peso
    • + *
    • XPT - Platinum
    • + *
    • PLN - Polish Zloty
    • + *
    • PLZ - Polish Zloty (1950–1995)
    • + *
    • PTE - Portuguese Escudo
    • + *
    • GWE - Portuguese Guinea Escudo
    • + *
    • QAR - Qatari Rial
    • + *
    • XRE - RINET Funds
    • + *
    • RHD - Rhodesian Dollar
    • + *
    • RON - Romanian Leu
    • + *
    • ROL - Romanian Leu (1952–2006)
    • + *
    • RUB - Russian Ruble
    • + *
    • RUR - Russian Ruble (1991–1998)
    • + *
    • RWF - Rwandan Franc
    • + *
    • SVC - Salvadoran Colón
    • + *
    • WST - Samoan Tala
    • + *
    • SAR - Saudi Riyal
    • + *
    • RSD - Serbian Dinar
    • + *
    • CSD - Serbian Dinar (2002–2006)
    • + *
    • SCR - Seychellois Rupee
    • + *
    • SLL - Sierra Leonean Leone
    • + *
    • XAG - Silver
    • + *
    • SGD - Singapore Dollar
    • + *
    • SKK - Slovak Koruna
    • + *
    • SIT - Slovenian Tolar
    • + *
    • SBD - Solomon Islands Dollar
    • + *
    • SOS - Somali Shilling
    • + *
    • ZAR - South African Rand
    • + *
    • ZAL - South African Rand (financial)
    • + *
    • KRH - South Korean Hwan (1953–1962)
    • + *
    • KRW - South Korean Won
    • + *
    • KRO - South Korean Won (1945–1953)
    • + *
    • SSP - South Sudanese Pound
    • + *
    • SUR - Soviet Rouble
    • + *
    • ESP - Spanish Peseta
    • + *
    • ESA - Spanish Peseta (A account)
    • + *
    • ESB - Spanish Peseta (convertible account)
    • + *
    • XDR - Special Drawing Rights
    • + *
    • LKR - Sri Lankan Rupee
    • + *
    • SHP - St. Helena Pound
    • + *
    • XSU - Sucre
    • + *
    • SDD - Sudanese Dinar (1992–2007)
    • + *
    • SDG - Sudanese Pound
    • + *
    • SDP - Sudanese Pound (1957–1998)
    • + *
    • SRD - Surinamese Dollar
    • + *
    • SRG - Surinamese Guilder
    • + *
    • SZL - Swazi Lilangeni
    • + *
    • SEK - Swedish Krona
    • + *
    • CHF - Swiss Franc
    • + *
    • SYP - Syrian Pound
    • + *
    • STN - São Tomé & Príncipe Dobra
    • + *
    • STD - São Tomé & Príncipe Dobra (1977–2017)
    • + *
    • TVD - TVD
    • + *
    • TJR - Tajikistani Ruble
    • + *
    • TJS - Tajikistani Somoni
    • + *
    • TZS - Tanzanian Shilling
    • + *
    • XTS - Testing Currency Code
    • + *
    • THB - Thai Baht
    • + *
    • XXX - The codes assigned for transactions where no currency is involved
    • + *
    • TPE - Timorese Escudo
    • + *
    • TOP - Tongan Paʻanga
    • + *
    • TTD - Trinidad & Tobago Dollar
    • + *
    • TND - Tunisian Dinar
    • + *
    • TRY - Turkish Lira
    • + *
    • TRL - Turkish Lira (1922–2005)
    • + *
    • TMT - Turkmenistani Manat
    • + *
    • TMM - Turkmenistani Manat (1993–2009)
    • + *
    • USD - US Dollar
    • + *
    • USN - US Dollar (Next day)
    • + *
    • USS - US Dollar (Same day)
    • + *
    • UGX - Ugandan Shilling
    • + *
    • UGS - Ugandan Shilling (1966–1987)
    • + *
    • UAH - Ukrainian Hryvnia
    • + *
    • UAK - Ukrainian Karbovanets
    • + *
    • AED - United Arab Emirates Dirham
    • + *
    • UYW - Uruguayan Nominal Wage Index Unit
    • + *
    • UYU - Uruguayan Peso
    • + *
    • UYP - Uruguayan Peso (1975–1993)
    • + *
    • UYI - Uruguayan Peso (Indexed Units)
    • + *
    • UZS - Uzbekistani Som
    • + *
    • VUV - Vanuatu Vatu
    • + *
    • VES - Venezuelan Bolívar
    • + *
    • VEB - Venezuelan Bolívar (1871–2008)
    • + *
    • VEF - Venezuelan Bolívar (2008–2018)
    • + *
    • VND - Vietnamese Dong
    • + *
    • VNN - Vietnamese Dong (1978–1985)
    • + *
    • CHE - WIR Euro
    • + *
    • CHW - WIR Franc
    • + *
    • XOF - West African CFA Franc
    • + *
    • YDD - Yemeni Dinar
    • + *
    • YER - Yemeni Rial
    • + *
    • YUN - Yugoslavian Convertible Dinar (1990–1992)
    • + *
    • YUD - Yugoslavian Hard Dinar (1966–1990)
    • + *
    • YUM - Yugoslavian New Dinar (1994–2002)
    • + *
    • YUR - Yugoslavian Reformed Dinar (1992–1993)
    • + *
    • ZWN - ZWN
    • + *
    • ZRN - Zairean New Zaire (1993–1998)
    • + *
    • ZRZ - Zairean Zaire (1971–1993)
    • + *
    • ZMW - Zambian Kwacha
    • + *
    • ZMK - Zambian Kwacha (1968–2012)
    • + *
    • ZWD - Zimbabwean Dollar (1980–2008)
    • + *
    • ZWR - Zimbabwean Dollar (2008)
    • + *
    • ZWL - Zimbabwean Dollar (2009)
    • + *
    + */ @JsonSetter(value = "currency", nulls = Nulls.SKIP) - public Builder currency(Optional currency) { + public Builder currency(Optional currency) { this.currency = currency; return this; } - public Builder currency(TransactionCurrencyEnum currency) { + public Builder currency(BankFeedAccountCurrency currency) { this.currency = Optional.ofNullable(currency); return this; } + /** + *

    The status of the bank feed.

    + *
      + *
    • ACTIVE - ACTIVE
    • + *
    • INACTIVE - INACTIVE
    • + *
    + */ @JsonSetter(value = "feed_status", nulls = Nulls.SKIP) - public Builder feedStatus(Optional feedStatus) { + public Builder feedStatus(Optional feedStatus) { this.feedStatus = feedStatus; return this; } - public Builder feedStatus(FeedStatusEnum feedStatus) { + public Builder feedStatus(BankFeedAccountFeedStatus feedStatus) { this.feedStatus = Optional.ofNullable(feedStatus); return this; } + /** + *

    The start date of the bank feed’s transactions.

    + */ @JsonSetter(value = "feed_start_date", nulls = Nulls.SKIP) public Builder feedStartDate(Optional feedStartDate) { this.feedStartDate = feedStartDate; @@ -797,6 +1142,9 @@ public Builder feedStartDate(OffsetDateTime feedStartDate) { return this; } + /** + *

    The current balance of funds in the source account.

    + */ @JsonSetter(value = "source_account_balance", nulls = Nulls.SKIP) public Builder sourceAccountBalance(Optional sourceAccountBalance) { this.sourceAccountBalance = sourceAccountBalance; @@ -808,17 +1156,27 @@ public Builder sourceAccountBalance(Double sourceAccountBalance) { return this; } + /** + *

    The type of the account.

    + *
      + *
    • BANK - BANK
    • + *
    • CREDIT_CARD - CREDIT_CARD
    • + *
    + */ @JsonSetter(value = "account_type", nulls = Nulls.SKIP) - public Builder accountType(Optional accountType) { + public Builder accountType(Optional accountType) { this.accountType = accountType; return this; } - public Builder accountType(BankFeedAccountAccountTypeEnum accountType) { + public Builder accountType(BankFeedAccountAccountType accountType) { this.accountType = Optional.ofNullable(accountType); return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/accounting/types/BankFeedAccountAccountType.java b/src/main/java/com/merge/api/accounting/types/BankFeedAccountAccountType.java new file mode 100644 index 000000000..13c9c824b --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/BankFeedAccountAccountType.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = BankFeedAccountAccountType.Deserializer.class) +public final class BankFeedAccountAccountType { + private final Object value; + + private final int type; + + private BankFeedAccountAccountType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((BankFeedAccountAccountTypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof BankFeedAccountAccountType && equalTo((BankFeedAccountAccountType) other); + } + + private boolean equalTo(BankFeedAccountAccountType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static BankFeedAccountAccountType of(BankFeedAccountAccountTypeEnum value) { + return new BankFeedAccountAccountType(value, 0); + } + + public static BankFeedAccountAccountType of(String value) { + return new BankFeedAccountAccountType(value, 1); + } + + public interface Visitor { + T visit(BankFeedAccountAccountTypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(BankFeedAccountAccountType.class); + } + + @java.lang.Override + public BankFeedAccountAccountType deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, BankFeedAccountAccountTypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/BankFeedAccountCurrency.java b/src/main/java/com/merge/api/accounting/types/BankFeedAccountCurrency.java new file mode 100644 index 000000000..06eccc94a --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/BankFeedAccountCurrency.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = BankFeedAccountCurrency.Deserializer.class) +public final class BankFeedAccountCurrency { + private final Object value; + + private final int type; + + private BankFeedAccountCurrency(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((TransactionCurrencyEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof BankFeedAccountCurrency && equalTo((BankFeedAccountCurrency) other); + } + + private boolean equalTo(BankFeedAccountCurrency other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static BankFeedAccountCurrency of(TransactionCurrencyEnum value) { + return new BankFeedAccountCurrency(value, 0); + } + + public static BankFeedAccountCurrency of(String value) { + return new BankFeedAccountCurrency(value, 1); + } + + public interface Visitor { + T visit(TransactionCurrencyEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(BankFeedAccountCurrency.class); + } + + @java.lang.Override + public BankFeedAccountCurrency deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TransactionCurrencyEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/BankFeedAccountEndpointRequest.java b/src/main/java/com/merge/api/accounting/types/BankFeedAccountEndpointRequest.java index 2c1826c16..2893e4c88 100644 --- a/src/main/java/com/merge/api/accounting/types/BankFeedAccountEndpointRequest.java +++ b/src/main/java/com/merge/api/accounting/types/BankFeedAccountEndpointRequest.java @@ -99,10 +99,16 @@ public interface ModelStage { public interface _FinalStage { BankFeedAccountEndpointRequest build(); + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ _FinalStage isDebugMode(Optional isDebugMode); _FinalStage isDebugMode(Boolean isDebugMode); + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ _FinalStage runAsync(Optional runAsync); _FinalStage runAsync(Boolean runAsync); @@ -146,6 +152,9 @@ public _FinalStage runAsync(Boolean runAsync) { return this; } + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ @java.lang.Override @JsonSetter(value = "run_async", nulls = Nulls.SKIP) public _FinalStage runAsync(Optional runAsync) { @@ -163,6 +172,9 @@ public _FinalStage isDebugMode(Boolean isDebugMode) { return this; } + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ @java.lang.Override @JsonSetter(value = "is_debug_mode", nulls = Nulls.SKIP) public _FinalStage isDebugMode(Optional isDebugMode) { diff --git a/src/main/java/com/merge/api/accounting/types/BankFeedAccountFeedStatus.java b/src/main/java/com/merge/api/accounting/types/BankFeedAccountFeedStatus.java new file mode 100644 index 000000000..4a129e41e --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/BankFeedAccountFeedStatus.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = BankFeedAccountFeedStatus.Deserializer.class) +public final class BankFeedAccountFeedStatus { + private final Object value; + + private final int type; + + private BankFeedAccountFeedStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((FeedStatusEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof BankFeedAccountFeedStatus && equalTo((BankFeedAccountFeedStatus) other); + } + + private boolean equalTo(BankFeedAccountFeedStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static BankFeedAccountFeedStatus of(FeedStatusEnum value) { + return new BankFeedAccountFeedStatus(value, 0); + } + + public static BankFeedAccountFeedStatus of(String value) { + return new BankFeedAccountFeedStatus(value, 1); + } + + public interface Visitor { + T visit(FeedStatusEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(BankFeedAccountFeedStatus.class); + } + + @java.lang.Override + public BankFeedAccountFeedStatus deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FeedStatusEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/BankFeedAccountRequest.java b/src/main/java/com/merge/api/accounting/types/BankFeedAccountRequest.java index 364f73469..b42fb877c 100644 --- a/src/main/java/com/merge/api/accounting/types/BankFeedAccountRequest.java +++ b/src/main/java/com/merge/api/accounting/types/BankFeedAccountRequest.java @@ -32,15 +32,15 @@ public final class BankFeedAccountRequest { private final Optional targetAccountName; - private final Optional currency; + private final Optional currency; - private final Optional feedStatus; + private final Optional feedStatus; private final Optional feedStartDate; private final Optional sourceAccountBalance; - private final Optional accountType; + private final Optional accountType; private final Optional> integrationParams; @@ -54,11 +54,11 @@ private BankFeedAccountRequest( Optional sourceAccountName, Optional sourceAccountNumber, Optional targetAccountName, - Optional currency, - Optional feedStatus, + Optional currency, + Optional feedStatus, Optional feedStartDate, Optional sourceAccountBalance, - Optional accountType, + Optional accountType, Optional> integrationParams, Optional> linkedAccountParams, Map additionalProperties) { @@ -429,7 +429,7 @@ public Optional getTargetAccountName() { * */ @JsonProperty("currency") - public Optional getCurrency() { + public Optional getCurrency() { return currency; } @@ -441,7 +441,7 @@ public Optional getCurrency() { * */ @JsonProperty("feed_status") - public Optional getFeedStatus() { + public Optional getFeedStatus() { return feedStatus; } @@ -469,7 +469,7 @@ public Optional getSourceAccountBalance() { * */ @JsonProperty("account_type") - public Optional getAccountType() { + public Optional getAccountType() { return accountType; } @@ -547,15 +547,15 @@ public static final class Builder { private Optional targetAccountName = Optional.empty(); - private Optional currency = Optional.empty(); + private Optional currency = Optional.empty(); - private Optional feedStatus = Optional.empty(); + private Optional feedStatus = Optional.empty(); private Optional feedStartDate = Optional.empty(); private Optional sourceAccountBalance = Optional.empty(); - private Optional accountType = Optional.empty(); + private Optional accountType = Optional.empty(); private Optional> integrationParams = Optional.empty(); @@ -582,6 +582,9 @@ public Builder from(BankFeedAccountRequest other) { return this; } + /** + *

    The unique identifier of the source account from our customer’s platform.

    + */ @JsonSetter(value = "source_account_id", nulls = Nulls.SKIP) public Builder sourceAccountId(Optional sourceAccountId) { this.sourceAccountId = sourceAccountId; @@ -593,6 +596,9 @@ public Builder sourceAccountId(String sourceAccountId) { return this; } + /** + *

    The unique identifier of the target account from the third party software.

    + */ @JsonSetter(value = "target_account_id", nulls = Nulls.SKIP) public Builder targetAccountId(Optional targetAccountId) { this.targetAccountId = targetAccountId; @@ -604,6 +610,9 @@ public Builder targetAccountId(String targetAccountId) { return this; } + /** + *

    The name of the source account as stored in our customer’s platform.

    + */ @JsonSetter(value = "source_account_name", nulls = Nulls.SKIP) public Builder sourceAccountName(Optional sourceAccountName) { this.sourceAccountName = sourceAccountName; @@ -615,6 +624,9 @@ public Builder sourceAccountName(String sourceAccountName) { return this; } + /** + *

    The human-readable account number of the source account as stored in our customer’s platform.

    + */ @JsonSetter(value = "source_account_number", nulls = Nulls.SKIP) public Builder sourceAccountNumber(Optional sourceAccountNumber) { this.sourceAccountNumber = sourceAccountNumber; @@ -626,6 +638,9 @@ public Builder sourceAccountNumber(String sourceAccountNumber) { return this; } + /** + *

    The name of the target account from the third party software.

    + */ @JsonSetter(value = "target_account_name", nulls = Nulls.SKIP) public Builder targetAccountName(Optional targetAccountName) { this.targetAccountName = targetAccountName; @@ -637,28 +652,349 @@ public Builder targetAccountName(String targetAccountName) { return this; } + /** + *

    The currency code of the bank feed.

    + *
      + *
    • XUA - ADB Unit of Account
    • + *
    • AFN - Afghan Afghani
    • + *
    • AFA - Afghan Afghani (1927–2002)
    • + *
    • ALL - Albanian Lek
    • + *
    • ALK - Albanian Lek (1946–1965)
    • + *
    • DZD - Algerian Dinar
    • + *
    • ADP - Andorran Peseta
    • + *
    • AOA - Angolan Kwanza
    • + *
    • AOK - Angolan Kwanza (1977–1991)
    • + *
    • AON - Angolan New Kwanza (1990–2000)
    • + *
    • AOR - Angolan Readjusted Kwanza (1995–1999)
    • + *
    • ARA - Argentine Austral
    • + *
    • ARS - Argentine Peso
    • + *
    • ARM - Argentine Peso (1881–1970)
    • + *
    • ARP - Argentine Peso (1983–1985)
    • + *
    • ARL - Argentine Peso Ley (1970–1983)
    • + *
    • AMD - Armenian Dram
    • + *
    • AWG - Aruban Florin
    • + *
    • AUD - Australian Dollar
    • + *
    • ATS - Austrian Schilling
    • + *
    • AZN - Azerbaijani Manat
    • + *
    • AZM - Azerbaijani Manat (1993–2006)
    • + *
    • BSD - Bahamian Dollar
    • + *
    • BHD - Bahraini Dinar
    • + *
    • BDT - Bangladeshi Taka
    • + *
    • BBD - Barbadian Dollar
    • + *
    • BYN - Belarusian Ruble
    • + *
    • BYB - Belarusian Ruble (1994–1999)
    • + *
    • BYR - Belarusian Ruble (2000–2016)
    • + *
    • BEF - Belgian Franc
    • + *
    • BEC - Belgian Franc (convertible)
    • + *
    • BEL - Belgian Franc (financial)
    • + *
    • BZD - Belize Dollar
    • + *
    • BMD - Bermudan Dollar
    • + *
    • BTN - Bhutanese Ngultrum
    • + *
    • BOB - Bolivian Boliviano
    • + *
    • BOL - Bolivian Boliviano (1863–1963)
    • + *
    • BOV - Bolivian Mvdol
    • + *
    • BOP - Bolivian Peso
    • + *
    • BAM - Bosnia-Herzegovina Convertible Mark
    • + *
    • BAD - Bosnia-Herzegovina Dinar (1992–1994)
    • + *
    • BAN - Bosnia-Herzegovina New Dinar (1994–1997)
    • + *
    • BWP - Botswanan Pula
    • + *
    • BRC - Brazilian Cruzado (1986–1989)
    • + *
    • BRZ - Brazilian Cruzeiro (1942–1967)
    • + *
    • BRE - Brazilian Cruzeiro (1990–1993)
    • + *
    • BRR - Brazilian Cruzeiro (1993–1994)
    • + *
    • BRN - Brazilian New Cruzado (1989–1990)
    • + *
    • BRB - Brazilian New Cruzeiro (1967–1986)
    • + *
    • BRL - Brazilian Real
    • + *
    • GBP - British Pound
    • + *
    • BND - Brunei Dollar
    • + *
    • BGL - Bulgarian Hard Lev
    • + *
    • BGN - Bulgarian Lev
    • + *
    • BGO - Bulgarian Lev (1879–1952)
    • + *
    • BGM - Bulgarian Socialist Lev
    • + *
    • BUK - Burmese Kyat
    • + *
    • BIF - Burundian Franc
    • + *
    • XPF - CFP Franc
    • + *
    • KHR - Cambodian Riel
    • + *
    • CAD - Canadian Dollar
    • + *
    • CVE - Cape Verdean Escudo
    • + *
    • KYD - Cayman Islands Dollar
    • + *
    • XAF - Central African CFA Franc
    • + *
    • CLE - Chilean Escudo
    • + *
    • CLP - Chilean Peso
    • + *
    • CLF - Chilean Unit of Account (UF)
    • + *
    • CNX - Chinese People’s Bank Dollar
    • + *
    • CNY - Chinese Yuan
    • + *
    • CNH - Chinese Yuan (offshore)
    • + *
    • COP - Colombian Peso
    • + *
    • COU - Colombian Real Value Unit
    • + *
    • KMF - Comorian Franc
    • + *
    • CDF - Congolese Franc
    • + *
    • CRC - Costa Rican Colón
    • + *
    • HRD - Croatian Dinar
    • + *
    • HRK - Croatian Kuna
    • + *
    • CUC - Cuban Convertible Peso
    • + *
    • CUP - Cuban Peso
    • + *
    • CYP - Cypriot Pound
    • + *
    • CZK - Czech Koruna
    • + *
    • CSK - Czechoslovak Hard Koruna
    • + *
    • DKK - Danish Krone
    • + *
    • DJF - Djiboutian Franc
    • + *
    • DOP - Dominican Peso
    • + *
    • NLG - Dutch Guilder
    • + *
    • XCD - East Caribbean Dollar
    • + *
    • DDM - East German Mark
    • + *
    • ECS - Ecuadorian Sucre
    • + *
    • ECV - Ecuadorian Unit of Constant Value
    • + *
    • EGP - Egyptian Pound
    • + *
    • GQE - Equatorial Guinean Ekwele
    • + *
    • ERN - Eritrean Nakfa
    • + *
    • EEK - Estonian Kroon
    • + *
    • ETB - Ethiopian Birr
    • + *
    • EUR - Euro
    • + *
    • XBA - European Composite Unit
    • + *
    • XEU - European Currency Unit
    • + *
    • XBB - European Monetary Unit
    • + *
    • XBC - European Unit of Account (XBC)
    • + *
    • XBD - European Unit of Account (XBD)
    • + *
    • FKP - Falkland Islands Pound
    • + *
    • FJD - Fijian Dollar
    • + *
    • FIM - Finnish Markka
    • + *
    • FRF - French Franc
    • + *
    • XFO - French Gold Franc
    • + *
    • XFU - French UIC-Franc
    • + *
    • GMD - Gambian Dalasi
    • + *
    • GEK - Georgian Kupon Larit
    • + *
    • GEL - Georgian Lari
    • + *
    • DEM - German Mark
    • + *
    • GHS - Ghanaian Cedi
    • + *
    • GHC - Ghanaian Cedi (1979–2007)
    • + *
    • GIP - Gibraltar Pound
    • + *
    • XAU - Gold
    • + *
    • GRD - Greek Drachma
    • + *
    • GTQ - Guatemalan Quetzal
    • + *
    • GWP - Guinea-Bissau Peso
    • + *
    • GNF - Guinean Franc
    • + *
    • GNS - Guinean Syli
    • + *
    • GYD - Guyanaese Dollar
    • + *
    • HTG - Haitian Gourde
    • + *
    • HNL - Honduran Lempira
    • + *
    • HKD - Hong Kong Dollar
    • + *
    • HUF - Hungarian Forint
    • + *
    • IMP - IMP
    • + *
    • ISK - Icelandic Króna
    • + *
    • ISJ - Icelandic Króna (1918–1981)
    • + *
    • INR - Indian Rupee
    • + *
    • IDR - Indonesian Rupiah
    • + *
    • IRR - Iranian Rial
    • + *
    • IQD - Iraqi Dinar
    • + *
    • IEP - Irish Pound
    • + *
    • ILS - Israeli New Shekel
    • + *
    • ILP - Israeli Pound
    • + *
    • ILR - Israeli Shekel (1980–1985)
    • + *
    • ITL - Italian Lira
    • + *
    • JMD - Jamaican Dollar
    • + *
    • JPY - Japanese Yen
    • + *
    • JOD - Jordanian Dinar
    • + *
    • KZT - Kazakhstani Tenge
    • + *
    • KES - Kenyan Shilling
    • + *
    • KWD - Kuwaiti Dinar
    • + *
    • KGS - Kyrgystani Som
    • + *
    • LAK - Laotian Kip
    • + *
    • LVL - Latvian Lats
    • + *
    • LVR - Latvian Ruble
    • + *
    • LBP - Lebanese Pound
    • + *
    • LSL - Lesotho Loti
    • + *
    • LRD - Liberian Dollar
    • + *
    • LYD - Libyan Dinar
    • + *
    • LTL - Lithuanian Litas
    • + *
    • LTT - Lithuanian Talonas
    • + *
    • LUL - Luxembourg Financial Franc
    • + *
    • LUC - Luxembourgian Convertible Franc
    • + *
    • LUF - Luxembourgian Franc
    • + *
    • MOP - Macanese Pataca
    • + *
    • MKD - Macedonian Denar
    • + *
    • MKN - Macedonian Denar (1992–1993)
    • + *
    • MGA - Malagasy Ariary
    • + *
    • MGF - Malagasy Franc
    • + *
    • MWK - Malawian Kwacha
    • + *
    • MYR - Malaysian Ringgit
    • + *
    • MVR - Maldivian Rufiyaa
    • + *
    • MVP - Maldivian Rupee (1947–1981)
    • + *
    • MLF - Malian Franc
    • + *
    • MTL - Maltese Lira
    • + *
    • MTP - Maltese Pound
    • + *
    • MRU - Mauritanian Ouguiya
    • + *
    • MRO - Mauritanian Ouguiya (1973–2017)
    • + *
    • MUR - Mauritian Rupee
    • + *
    • MXV - Mexican Investment Unit
    • + *
    • MXN - Mexican Peso
    • + *
    • MXP - Mexican Silver Peso (1861–1992)
    • + *
    • MDC - Moldovan Cupon
    • + *
    • MDL - Moldovan Leu
    • + *
    • MCF - Monegasque Franc
    • + *
    • MNT - Mongolian Tugrik
    • + *
    • MAD - Moroccan Dirham
    • + *
    • MAF - Moroccan Franc
    • + *
    • MZE - Mozambican Escudo
    • + *
    • MZN - Mozambican Metical
    • + *
    • MZM - Mozambican Metical (1980–2006)
    • + *
    • MMK - Myanmar Kyat
    • + *
    • NAD - Namibian Dollar
    • + *
    • NPR - Nepalese Rupee
    • + *
    • ANG - Netherlands Antillean Guilder
    • + *
    • TWD - New Taiwan Dollar
    • + *
    • NZD - New Zealand Dollar
    • + *
    • NIO - Nicaraguan Córdoba
    • + *
    • NIC - Nicaraguan Córdoba (1988–1991)
    • + *
    • NGN - Nigerian Naira
    • + *
    • KPW - North Korean Won
    • + *
    • NOK - Norwegian Krone
    • + *
    • OMR - Omani Rial
    • + *
    • PKR - Pakistani Rupee
    • + *
    • XPD - Palladium
    • + *
    • PAB - Panamanian Balboa
    • + *
    • PGK - Papua New Guinean Kina
    • + *
    • PYG - Paraguayan Guarani
    • + *
    • PEI - Peruvian Inti
    • + *
    • PEN - Peruvian Sol
    • + *
    • PES - Peruvian Sol (1863–1965)
    • + *
    • PHP - Philippine Peso
    • + *
    • XPT - Platinum
    • + *
    • PLN - Polish Zloty
    • + *
    • PLZ - Polish Zloty (1950–1995)
    • + *
    • PTE - Portuguese Escudo
    • + *
    • GWE - Portuguese Guinea Escudo
    • + *
    • QAR - Qatari Rial
    • + *
    • XRE - RINET Funds
    • + *
    • RHD - Rhodesian Dollar
    • + *
    • RON - Romanian Leu
    • + *
    • ROL - Romanian Leu (1952–2006)
    • + *
    • RUB - Russian Ruble
    • + *
    • RUR - Russian Ruble (1991–1998)
    • + *
    • RWF - Rwandan Franc
    • + *
    • SVC - Salvadoran Colón
    • + *
    • WST - Samoan Tala
    • + *
    • SAR - Saudi Riyal
    • + *
    • RSD - Serbian Dinar
    • + *
    • CSD - Serbian Dinar (2002–2006)
    • + *
    • SCR - Seychellois Rupee
    • + *
    • SLL - Sierra Leonean Leone
    • + *
    • XAG - Silver
    • + *
    • SGD - Singapore Dollar
    • + *
    • SKK - Slovak Koruna
    • + *
    • SIT - Slovenian Tolar
    • + *
    • SBD - Solomon Islands Dollar
    • + *
    • SOS - Somali Shilling
    • + *
    • ZAR - South African Rand
    • + *
    • ZAL - South African Rand (financial)
    • + *
    • KRH - South Korean Hwan (1953–1962)
    • + *
    • KRW - South Korean Won
    • + *
    • KRO - South Korean Won (1945–1953)
    • + *
    • SSP - South Sudanese Pound
    • + *
    • SUR - Soviet Rouble
    • + *
    • ESP - Spanish Peseta
    • + *
    • ESA - Spanish Peseta (A account)
    • + *
    • ESB - Spanish Peseta (convertible account)
    • + *
    • XDR - Special Drawing Rights
    • + *
    • LKR - Sri Lankan Rupee
    • + *
    • SHP - St. Helena Pound
    • + *
    • XSU - Sucre
    • + *
    • SDD - Sudanese Dinar (1992–2007)
    • + *
    • SDG - Sudanese Pound
    • + *
    • SDP - Sudanese Pound (1957–1998)
    • + *
    • SRD - Surinamese Dollar
    • + *
    • SRG - Surinamese Guilder
    • + *
    • SZL - Swazi Lilangeni
    • + *
    • SEK - Swedish Krona
    • + *
    • CHF - Swiss Franc
    • + *
    • SYP - Syrian Pound
    • + *
    • STN - São Tomé & Príncipe Dobra
    • + *
    • STD - São Tomé & Príncipe Dobra (1977–2017)
    • + *
    • TVD - TVD
    • + *
    • TJR - Tajikistani Ruble
    • + *
    • TJS - Tajikistani Somoni
    • + *
    • TZS - Tanzanian Shilling
    • + *
    • XTS - Testing Currency Code
    • + *
    • THB - Thai Baht
    • + *
    • XXX - The codes assigned for transactions where no currency is involved
    • + *
    • TPE - Timorese Escudo
    • + *
    • TOP - Tongan Paʻanga
    • + *
    • TTD - Trinidad & Tobago Dollar
    • + *
    • TND - Tunisian Dinar
    • + *
    • TRY - Turkish Lira
    • + *
    • TRL - Turkish Lira (1922–2005)
    • + *
    • TMT - Turkmenistani Manat
    • + *
    • TMM - Turkmenistani Manat (1993–2009)
    • + *
    • USD - US Dollar
    • + *
    • USN - US Dollar (Next day)
    • + *
    • USS - US Dollar (Same day)
    • + *
    • UGX - Ugandan Shilling
    • + *
    • UGS - Ugandan Shilling (1966–1987)
    • + *
    • UAH - Ukrainian Hryvnia
    • + *
    • UAK - Ukrainian Karbovanets
    • + *
    • AED - United Arab Emirates Dirham
    • + *
    • UYW - Uruguayan Nominal Wage Index Unit
    • + *
    • UYU - Uruguayan Peso
    • + *
    • UYP - Uruguayan Peso (1975–1993)
    • + *
    • UYI - Uruguayan Peso (Indexed Units)
    • + *
    • UZS - Uzbekistani Som
    • + *
    • VUV - Vanuatu Vatu
    • + *
    • VES - Venezuelan Bolívar
    • + *
    • VEB - Venezuelan Bolívar (1871–2008)
    • + *
    • VEF - Venezuelan Bolívar (2008–2018)
    • + *
    • VND - Vietnamese Dong
    • + *
    • VNN - Vietnamese Dong (1978–1985)
    • + *
    • CHE - WIR Euro
    • + *
    • CHW - WIR Franc
    • + *
    • XOF - West African CFA Franc
    • + *
    • YDD - Yemeni Dinar
    • + *
    • YER - Yemeni Rial
    • + *
    • YUN - Yugoslavian Convertible Dinar (1990–1992)
    • + *
    • YUD - Yugoslavian Hard Dinar (1966–1990)
    • + *
    • YUM - Yugoslavian New Dinar (1994–2002)
    • + *
    • YUR - Yugoslavian Reformed Dinar (1992–1993)
    • + *
    • ZWN - ZWN
    • + *
    • ZRN - Zairean New Zaire (1993–1998)
    • + *
    • ZRZ - Zairean Zaire (1971–1993)
    • + *
    • ZMW - Zambian Kwacha
    • + *
    • ZMK - Zambian Kwacha (1968–2012)
    • + *
    • ZWD - Zimbabwean Dollar (1980–2008)
    • + *
    • ZWR - Zimbabwean Dollar (2008)
    • + *
    • ZWL - Zimbabwean Dollar (2009)
    • + *
    + */ @JsonSetter(value = "currency", nulls = Nulls.SKIP) - public Builder currency(Optional currency) { + public Builder currency(Optional currency) { this.currency = currency; return this; } - public Builder currency(TransactionCurrencyEnum currency) { + public Builder currency(BankFeedAccountRequestCurrency currency) { this.currency = Optional.ofNullable(currency); return this; } + /** + *

    The status of the bank feed.

    + *
      + *
    • ACTIVE - ACTIVE
    • + *
    • INACTIVE - INACTIVE
    • + *
    + */ @JsonSetter(value = "feed_status", nulls = Nulls.SKIP) - public Builder feedStatus(Optional feedStatus) { + public Builder feedStatus(Optional feedStatus) { this.feedStatus = feedStatus; return this; } - public Builder feedStatus(FeedStatusEnum feedStatus) { + public Builder feedStatus(BankFeedAccountRequestFeedStatus feedStatus) { this.feedStatus = Optional.ofNullable(feedStatus); return this; } + /** + *

    The start date of the bank feed’s transactions.

    + */ @JsonSetter(value = "feed_start_date", nulls = Nulls.SKIP) public Builder feedStartDate(Optional feedStartDate) { this.feedStartDate = feedStartDate; @@ -670,6 +1006,9 @@ public Builder feedStartDate(OffsetDateTime feedStartDate) { return this; } + /** + *

    The current balance of funds in the source account.

    + */ @JsonSetter(value = "source_account_balance", nulls = Nulls.SKIP) public Builder sourceAccountBalance(Optional sourceAccountBalance) { this.sourceAccountBalance = sourceAccountBalance; @@ -681,13 +1020,20 @@ public Builder sourceAccountBalance(Double sourceAccountBalance) { return this; } + /** + *

    The type of the account.

    + *
      + *
    • BANK - BANK
    • + *
    • CREDIT_CARD - CREDIT_CARD
    • + *
    + */ @JsonSetter(value = "account_type", nulls = Nulls.SKIP) - public Builder accountType(Optional accountType) { + public Builder accountType(Optional accountType) { this.accountType = accountType; return this; } - public Builder accountType(BankFeedAccountAccountTypeEnum accountType) { + public Builder accountType(BankFeedAccountRequestAccountType accountType) { this.accountType = Optional.ofNullable(accountType); return this; } diff --git a/src/main/java/com/merge/api/accounting/types/BankFeedAccountRequestAccountType.java b/src/main/java/com/merge/api/accounting/types/BankFeedAccountRequestAccountType.java new file mode 100644 index 000000000..d3d731e83 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/BankFeedAccountRequestAccountType.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = BankFeedAccountRequestAccountType.Deserializer.class) +public final class BankFeedAccountRequestAccountType { + private final Object value; + + private final int type; + + private BankFeedAccountRequestAccountType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((BankFeedAccountAccountTypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof BankFeedAccountRequestAccountType && equalTo((BankFeedAccountRequestAccountType) other); + } + + private boolean equalTo(BankFeedAccountRequestAccountType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static BankFeedAccountRequestAccountType of(BankFeedAccountAccountTypeEnum value) { + return new BankFeedAccountRequestAccountType(value, 0); + } + + public static BankFeedAccountRequestAccountType of(String value) { + return new BankFeedAccountRequestAccountType(value, 1); + } + + public interface Visitor { + T visit(BankFeedAccountAccountTypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(BankFeedAccountRequestAccountType.class); + } + + @java.lang.Override + public BankFeedAccountRequestAccountType deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, BankFeedAccountAccountTypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/BankFeedAccountRequestCurrency.java b/src/main/java/com/merge/api/accounting/types/BankFeedAccountRequestCurrency.java new file mode 100644 index 000000000..10e350bb1 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/BankFeedAccountRequestCurrency.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = BankFeedAccountRequestCurrency.Deserializer.class) +public final class BankFeedAccountRequestCurrency { + private final Object value; + + private final int type; + + private BankFeedAccountRequestCurrency(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((TransactionCurrencyEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof BankFeedAccountRequestCurrency && equalTo((BankFeedAccountRequestCurrency) other); + } + + private boolean equalTo(BankFeedAccountRequestCurrency other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static BankFeedAccountRequestCurrency of(TransactionCurrencyEnum value) { + return new BankFeedAccountRequestCurrency(value, 0); + } + + public static BankFeedAccountRequestCurrency of(String value) { + return new BankFeedAccountRequestCurrency(value, 1); + } + + public interface Visitor { + T visit(TransactionCurrencyEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(BankFeedAccountRequestCurrency.class); + } + + @java.lang.Override + public BankFeedAccountRequestCurrency deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TransactionCurrencyEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/BankFeedAccountRequestFeedStatus.java b/src/main/java/com/merge/api/accounting/types/BankFeedAccountRequestFeedStatus.java new file mode 100644 index 000000000..16fa95c8c --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/BankFeedAccountRequestFeedStatus.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = BankFeedAccountRequestFeedStatus.Deserializer.class) +public final class BankFeedAccountRequestFeedStatus { + private final Object value; + + private final int type; + + private BankFeedAccountRequestFeedStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((FeedStatusEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof BankFeedAccountRequestFeedStatus && equalTo((BankFeedAccountRequestFeedStatus) other); + } + + private boolean equalTo(BankFeedAccountRequestFeedStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static BankFeedAccountRequestFeedStatus of(FeedStatusEnum value) { + return new BankFeedAccountRequestFeedStatus(value, 0); + } + + public static BankFeedAccountRequestFeedStatus of(String value) { + return new BankFeedAccountRequestFeedStatus(value, 1); + } + + public interface Visitor { + T visit(FeedStatusEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(BankFeedAccountRequestFeedStatus.class); + } + + @java.lang.Override + public BankFeedAccountRequestFeedStatus deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FeedStatusEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/BankFeedAccountsListRequest.java b/src/main/java/com/merge/api/accounting/types/BankFeedAccountsListRequest.java index c3591eab5..0505039ae 100644 --- a/src/main/java/com/merge/api/accounting/types/BankFeedAccountsListRequest.java +++ b/src/main/java/com/merge/api/accounting/types/BankFeedAccountsListRequest.java @@ -147,6 +147,9 @@ public Builder from(BankFeedAccountsListRequest other) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -158,6 +161,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -169,6 +175,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -180,6 +189,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -191,6 +203,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; diff --git a/src/main/java/com/merge/api/accounting/types/BankFeedAccountsRetrieveRequest.java b/src/main/java/com/merge/api/accounting/types/BankFeedAccountsRetrieveRequest.java index 88326a7b1..d620af1ab 100644 --- a/src/main/java/com/merge/api/accounting/types/BankFeedAccountsRetrieveRequest.java +++ b/src/main/java/com/merge/api/accounting/types/BankFeedAccountsRetrieveRequest.java @@ -97,6 +97,9 @@ public Builder from(BankFeedAccountsRetrieveRequest other) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -108,6 +111,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/accounting/types/BankFeedTransaction.java b/src/main/java/com/merge/api/accounting/types/BankFeedTransaction.java index 0b8a64bdd..9d6c0022a 100644 --- a/src/main/java/com/merge/api/accounting/types/BankFeedTransaction.java +++ b/src/main/java/com/merge/api/accounting/types/BankFeedTransaction.java @@ -43,7 +43,7 @@ public final class BankFeedTransaction { private final Optional payee; - private final Optional creditOrDebit; + private final Optional creditOrDebit; private final Optional sourceTransactionId; @@ -65,7 +65,7 @@ private BankFeedTransaction( Optional description, Optional transactionType, Optional payee, - Optional creditOrDebit, + Optional creditOrDebit, Optional sourceTransactionId, Optional remoteWasDeleted, Optional isProcessed, @@ -181,7 +181,7 @@ public Optional getPayee() { * */ @JsonProperty("credit_or_debit") - public Optional getCreditOrDebit() { + public Optional getCreditOrDebit() { return creditOrDebit; } @@ -291,7 +291,7 @@ public static final class Builder { private Optional payee = Optional.empty(); - private Optional creditOrDebit = Optional.empty(); + private Optional creditOrDebit = Optional.empty(); private Optional sourceTransactionId = Optional.empty(); @@ -334,6 +334,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -345,6 +348,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -356,6 +362,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -367,6 +376,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The bank feed account associated with the transaction.

    + */ @JsonSetter(value = "bank_feed_account", nulls = Nulls.SKIP) public Builder bankFeedAccount(Optional bankFeedAccount) { this.bankFeedAccount = bankFeedAccount; @@ -378,6 +390,9 @@ public Builder bankFeedAccount(BankFeedTransactionBankFeedAccount bankFeedAccoun return this; } + /** + *

    The date that the transaction occurred.

    + */ @JsonSetter(value = "transaction_date", nulls = Nulls.SKIP) public Builder transactionDate(Optional transactionDate) { this.transactionDate = transactionDate; @@ -389,6 +404,9 @@ public Builder transactionDate(OffsetDateTime transactionDate) { return this; } + /** + *

    The date the transaction was posted to the bank account.

    + */ @JsonSetter(value = "posted_date", nulls = Nulls.SKIP) public Builder postedDate(Optional postedDate) { this.postedDate = postedDate; @@ -400,6 +418,9 @@ public Builder postedDate(OffsetDateTime postedDate) { return this; } + /** + *

    The amount of the transaction.

    + */ @JsonSetter(value = "amount", nulls = Nulls.SKIP) public Builder amount(Optional amount) { this.amount = amount; @@ -411,6 +432,9 @@ public Builder amount(Double amount) { return this; } + /** + *

    The description of the transaction.

    + */ @JsonSetter(value = "description", nulls = Nulls.SKIP) public Builder description(Optional description) { this.description = description; @@ -422,6 +446,9 @@ public Builder description(String description) { return this; } + /** + *

    The underlying type of the transaction.

    + */ @JsonSetter(value = "transaction_type", nulls = Nulls.SKIP) public Builder transactionType(Optional transactionType) { this.transactionType = transactionType; @@ -433,6 +460,9 @@ public Builder transactionType(String transactionType) { return this; } + /** + *

    The person or merchant who initiated the transaction, or alternatively, to whom the transaction was paid.

    + */ @JsonSetter(value = "payee", nulls = Nulls.SKIP) public Builder payee(Optional payee) { this.payee = payee; @@ -444,17 +474,27 @@ public Builder payee(String payee) { return this; } + /** + *

    If the transaction is of type debit or credit.

    + *
      + *
    • CREDIT - CREDIT
    • + *
    • DEBIT - DEBIT
    • + *
    + */ @JsonSetter(value = "credit_or_debit", nulls = Nulls.SKIP) - public Builder creditOrDebit(Optional creditOrDebit) { + public Builder creditOrDebit(Optional creditOrDebit) { this.creditOrDebit = creditOrDebit; return this; } - public Builder creditOrDebit(CreditOrDebitEnum creditOrDebit) { + public Builder creditOrDebit(BankFeedTransactionCreditOrDebit creditOrDebit) { this.creditOrDebit = Optional.ofNullable(creditOrDebit); return this; } + /** + *

    The customer’s identifier for the transaction.

    + */ @JsonSetter(value = "source_transaction_id", nulls = Nulls.SKIP) public Builder sourceTransactionId(Optional sourceTransactionId) { this.sourceTransactionId = sourceTransactionId; @@ -466,6 +506,9 @@ public Builder sourceTransactionId(String sourceTransactionId) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; @@ -477,6 +520,9 @@ public Builder remoteWasDeleted(Boolean remoteWasDeleted) { return this; } + /** + *

    Whether or not this transaction has been processed by the external system. For example, NetSuite writes this field as True when the SuiteApp has processed the transaction.

    + */ @JsonSetter(value = "is_processed", nulls = Nulls.SKIP) public Builder isProcessed(Optional isProcessed) { this.isProcessed = isProcessed; diff --git a/src/main/java/com/merge/api/accounting/types/BankFeedTransactionCreditOrDebit.java b/src/main/java/com/merge/api/accounting/types/BankFeedTransactionCreditOrDebit.java new file mode 100644 index 000000000..bc644dfd7 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/BankFeedTransactionCreditOrDebit.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = BankFeedTransactionCreditOrDebit.Deserializer.class) +public final class BankFeedTransactionCreditOrDebit { + private final Object value; + + private final int type; + + private BankFeedTransactionCreditOrDebit(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((CreditOrDebitEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof BankFeedTransactionCreditOrDebit && equalTo((BankFeedTransactionCreditOrDebit) other); + } + + private boolean equalTo(BankFeedTransactionCreditOrDebit other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static BankFeedTransactionCreditOrDebit of(CreditOrDebitEnum value) { + return new BankFeedTransactionCreditOrDebit(value, 0); + } + + public static BankFeedTransactionCreditOrDebit of(String value) { + return new BankFeedTransactionCreditOrDebit(value, 1); + } + + public interface Visitor { + T visit(CreditOrDebitEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(BankFeedTransactionCreditOrDebit.class); + } + + @java.lang.Override + public BankFeedTransactionCreditOrDebit deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreditOrDebitEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/BankFeedTransactionEndpointRequest.java b/src/main/java/com/merge/api/accounting/types/BankFeedTransactionEndpointRequest.java index 4eead35cc..fb14fbcfc 100644 --- a/src/main/java/com/merge/api/accounting/types/BankFeedTransactionEndpointRequest.java +++ b/src/main/java/com/merge/api/accounting/types/BankFeedTransactionEndpointRequest.java @@ -100,10 +100,16 @@ public interface ModelStage { public interface _FinalStage { BankFeedTransactionEndpointRequest build(); + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ _FinalStage isDebugMode(Optional isDebugMode); _FinalStage isDebugMode(Boolean isDebugMode); + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ _FinalStage runAsync(Optional runAsync); _FinalStage runAsync(Boolean runAsync); @@ -147,6 +153,9 @@ public _FinalStage runAsync(Boolean runAsync) { return this; } + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ @java.lang.Override @JsonSetter(value = "run_async", nulls = Nulls.SKIP) public _FinalStage runAsync(Optional runAsync) { @@ -164,6 +173,9 @@ public _FinalStage isDebugMode(Boolean isDebugMode) { return this; } + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ @java.lang.Override @JsonSetter(value = "is_debug_mode", nulls = Nulls.SKIP) public _FinalStage isDebugMode(Optional isDebugMode) { diff --git a/src/main/java/com/merge/api/accounting/types/BankFeedTransactionRequestRequest.java b/src/main/java/com/merge/api/accounting/types/BankFeedTransactionRequestRequest.java index d5e58aac3..bea10f39c 100644 --- a/src/main/java/com/merge/api/accounting/types/BankFeedTransactionRequestRequest.java +++ b/src/main/java/com/merge/api/accounting/types/BankFeedTransactionRequestRequest.java @@ -36,7 +36,7 @@ public final class BankFeedTransactionRequestRequest { private final Optional payee; - private final Optional creditOrDebit; + private final Optional creditOrDebit; private final Optional sourceTransactionId; @@ -54,7 +54,7 @@ private BankFeedTransactionRequestRequest( Optional description, Optional transactionType, Optional payee, - Optional creditOrDebit, + Optional creditOrDebit, Optional sourceTransactionId, Optional> integrationParams, Optional> linkedAccountParams, @@ -137,7 +137,7 @@ public Optional getPayee() { * */ @JsonProperty("credit_or_debit") - public Optional getCreditOrDebit() { + public Optional getCreditOrDebit() { return creditOrDebit; } @@ -225,7 +225,7 @@ public static final class Builder { private Optional payee = Optional.empty(); - private Optional creditOrDebit = Optional.empty(); + private Optional creditOrDebit = Optional.empty(); private Optional sourceTransactionId = Optional.empty(); @@ -253,6 +253,9 @@ public Builder from(BankFeedTransactionRequestRequest other) { return this; } + /** + *

    The bank feed account associated with the transaction.

    + */ @JsonSetter(value = "bank_feed_account", nulls = Nulls.SKIP) public Builder bankFeedAccount(Optional bankFeedAccount) { this.bankFeedAccount = bankFeedAccount; @@ -264,6 +267,9 @@ public Builder bankFeedAccount(BankFeedTransactionRequestRequestBankFeedAccount return this; } + /** + *

    The date that the transaction occurred.

    + */ @JsonSetter(value = "transaction_date", nulls = Nulls.SKIP) public Builder transactionDate(Optional transactionDate) { this.transactionDate = transactionDate; @@ -275,6 +281,9 @@ public Builder transactionDate(OffsetDateTime transactionDate) { return this; } + /** + *

    The date the transaction was posted to the bank account.

    + */ @JsonSetter(value = "posted_date", nulls = Nulls.SKIP) public Builder postedDate(Optional postedDate) { this.postedDate = postedDate; @@ -286,6 +295,9 @@ public Builder postedDate(OffsetDateTime postedDate) { return this; } + /** + *

    The amount of the transaction.

    + */ @JsonSetter(value = "amount", nulls = Nulls.SKIP) public Builder amount(Optional amount) { this.amount = amount; @@ -297,6 +309,9 @@ public Builder amount(Double amount) { return this; } + /** + *

    The description of the transaction.

    + */ @JsonSetter(value = "description", nulls = Nulls.SKIP) public Builder description(Optional description) { this.description = description; @@ -308,6 +323,9 @@ public Builder description(String description) { return this; } + /** + *

    The underlying type of the transaction.

    + */ @JsonSetter(value = "transaction_type", nulls = Nulls.SKIP) public Builder transactionType(Optional transactionType) { this.transactionType = transactionType; @@ -319,6 +337,9 @@ public Builder transactionType(String transactionType) { return this; } + /** + *

    The person or merchant who initiated the transaction, or alternatively, to whom the transaction was paid.

    + */ @JsonSetter(value = "payee", nulls = Nulls.SKIP) public Builder payee(Optional payee) { this.payee = payee; @@ -330,17 +351,27 @@ public Builder payee(String payee) { return this; } + /** + *

    If the transaction is of type debit or credit.

    + *
      + *
    • CREDIT - CREDIT
    • + *
    • DEBIT - DEBIT
    • + *
    + */ @JsonSetter(value = "credit_or_debit", nulls = Nulls.SKIP) - public Builder creditOrDebit(Optional creditOrDebit) { + public Builder creditOrDebit(Optional creditOrDebit) { this.creditOrDebit = creditOrDebit; return this; } - public Builder creditOrDebit(CreditOrDebitEnum creditOrDebit) { + public Builder creditOrDebit(BankFeedTransactionRequestRequestCreditOrDebit creditOrDebit) { this.creditOrDebit = Optional.ofNullable(creditOrDebit); return this; } + /** + *

    The customer’s identifier for the transaction.

    + */ @JsonSetter(value = "source_transaction_id", nulls = Nulls.SKIP) public Builder sourceTransactionId(Optional sourceTransactionId) { this.sourceTransactionId = sourceTransactionId; diff --git a/src/main/java/com/merge/api/accounting/types/BankFeedTransactionRequestRequestCreditOrDebit.java b/src/main/java/com/merge/api/accounting/types/BankFeedTransactionRequestRequestCreditOrDebit.java new file mode 100644 index 000000000..5754b5530 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/BankFeedTransactionRequestRequestCreditOrDebit.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = BankFeedTransactionRequestRequestCreditOrDebit.Deserializer.class) +public final class BankFeedTransactionRequestRequestCreditOrDebit { + private final Object value; + + private final int type; + + private BankFeedTransactionRequestRequestCreditOrDebit(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((CreditOrDebitEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof BankFeedTransactionRequestRequestCreditOrDebit + && equalTo((BankFeedTransactionRequestRequestCreditOrDebit) other); + } + + private boolean equalTo(BankFeedTransactionRequestRequestCreditOrDebit other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static BankFeedTransactionRequestRequestCreditOrDebit of(CreditOrDebitEnum value) { + return new BankFeedTransactionRequestRequestCreditOrDebit(value, 0); + } + + public static BankFeedTransactionRequestRequestCreditOrDebit of(String value) { + return new BankFeedTransactionRequestRequestCreditOrDebit(value, 1); + } + + public interface Visitor { + T visit(CreditOrDebitEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(BankFeedTransactionRequestRequestCreditOrDebit.class); + } + + @java.lang.Override + public BankFeedTransactionRequestRequestCreditOrDebit deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreditOrDebitEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/BankFeedTransactionsListRequest.java b/src/main/java/com/merge/api/accounting/types/BankFeedTransactionsListRequest.java index 9cc70a337..1b6b95f25 100644 --- a/src/main/java/com/merge/api/accounting/types/BankFeedTransactionsListRequest.java +++ b/src/main/java/com/merge/api/accounting/types/BankFeedTransactionsListRequest.java @@ -273,6 +273,9 @@ public Builder from(BankFeedTransactionsListRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -289,6 +292,9 @@ public Builder expand(String expand) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -300,6 +306,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -311,6 +320,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -322,6 +334,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -333,6 +348,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -344,6 +362,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -355,6 +376,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, will only return bank feed transactions with this is_processed value

    + */ @JsonSetter(value = "is_processed", nulls = Nulls.SKIP) public Builder isProcessed(Optional isProcessed) { this.isProcessed = isProcessed; @@ -366,6 +390,9 @@ public Builder isProcessed(Boolean isProcessed) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -377,6 +404,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -388,6 +418,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -399,6 +432,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; diff --git a/src/main/java/com/merge/api/accounting/types/BankFeedTransactionsRetrieveRequest.java b/src/main/java/com/merge/api/accounting/types/BankFeedTransactionsRetrieveRequest.java index 864cb7fc7..601412edd 100644 --- a/src/main/java/com/merge/api/accounting/types/BankFeedTransactionsRetrieveRequest.java +++ b/src/main/java/com/merge/api/accounting/types/BankFeedTransactionsRetrieveRequest.java @@ -117,6 +117,9 @@ public Builder from(BankFeedTransactionsRetrieveRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -133,6 +136,9 @@ public Builder expand(String expand) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -144,6 +150,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/accounting/types/CashFlowStatement.java b/src/main/java/com/merge/api/accounting/types/CashFlowStatement.java index 5dc0e02f3..cfd45d633 100644 --- a/src/main/java/com/merge/api/accounting/types/CashFlowStatement.java +++ b/src/main/java/com/merge/api/accounting/types/CashFlowStatement.java @@ -33,7 +33,7 @@ public final class CashFlowStatement { private final Optional name; - private final Optional currency; + private final Optional currency; private final Optional company; @@ -67,7 +67,7 @@ private CashFlowStatement( Optional createdAt, Optional modifiedAt, Optional name, - Optional currency, + Optional currency, Optional company, Optional startPeriod, Optional endPeriod, @@ -451,7 +451,7 @@ public Optional getName() { * */ @JsonProperty("currency") - public Optional getCurrency() { + public Optional getCurrency() { return currency; } @@ -612,7 +612,7 @@ public static final class Builder { private Optional name = Optional.empty(); - private Optional currency = Optional.empty(); + private Optional currency = Optional.empty(); private Optional company = Optional.empty(); @@ -676,6 +676,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -687,6 +690,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -698,6 +704,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -709,6 +718,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The cash flow statement's name.

    + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -720,17 +732,331 @@ public Builder name(String name) { return this; } + /** + *

    The cash flow statement's currency.

    + *
      + *
    • XUA - ADB Unit of Account
    • + *
    • AFN - Afghan Afghani
    • + *
    • AFA - Afghan Afghani (1927–2002)
    • + *
    • ALL - Albanian Lek
    • + *
    • ALK - Albanian Lek (1946–1965)
    • + *
    • DZD - Algerian Dinar
    • + *
    • ADP - Andorran Peseta
    • + *
    • AOA - Angolan Kwanza
    • + *
    • AOK - Angolan Kwanza (1977–1991)
    • + *
    • AON - Angolan New Kwanza (1990–2000)
    • + *
    • AOR - Angolan Readjusted Kwanza (1995–1999)
    • + *
    • ARA - Argentine Austral
    • + *
    • ARS - Argentine Peso
    • + *
    • ARM - Argentine Peso (1881–1970)
    • + *
    • ARP - Argentine Peso (1983–1985)
    • + *
    • ARL - Argentine Peso Ley (1970–1983)
    • + *
    • AMD - Armenian Dram
    • + *
    • AWG - Aruban Florin
    • + *
    • AUD - Australian Dollar
    • + *
    • ATS - Austrian Schilling
    • + *
    • AZN - Azerbaijani Manat
    • + *
    • AZM - Azerbaijani Manat (1993–2006)
    • + *
    • BSD - Bahamian Dollar
    • + *
    • BHD - Bahraini Dinar
    • + *
    • BDT - Bangladeshi Taka
    • + *
    • BBD - Barbadian Dollar
    • + *
    • BYN - Belarusian Ruble
    • + *
    • BYB - Belarusian Ruble (1994–1999)
    • + *
    • BYR - Belarusian Ruble (2000–2016)
    • + *
    • BEF - Belgian Franc
    • + *
    • BEC - Belgian Franc (convertible)
    • + *
    • BEL - Belgian Franc (financial)
    • + *
    • BZD - Belize Dollar
    • + *
    • BMD - Bermudan Dollar
    • + *
    • BTN - Bhutanese Ngultrum
    • + *
    • BOB - Bolivian Boliviano
    • + *
    • BOL - Bolivian Boliviano (1863–1963)
    • + *
    • BOV - Bolivian Mvdol
    • + *
    • BOP - Bolivian Peso
    • + *
    • BAM - Bosnia-Herzegovina Convertible Mark
    • + *
    • BAD - Bosnia-Herzegovina Dinar (1992–1994)
    • + *
    • BAN - Bosnia-Herzegovina New Dinar (1994–1997)
    • + *
    • BWP - Botswanan Pula
    • + *
    • BRC - Brazilian Cruzado (1986–1989)
    • + *
    • BRZ - Brazilian Cruzeiro (1942–1967)
    • + *
    • BRE - Brazilian Cruzeiro (1990–1993)
    • + *
    • BRR - Brazilian Cruzeiro (1993–1994)
    • + *
    • BRN - Brazilian New Cruzado (1989–1990)
    • + *
    • BRB - Brazilian New Cruzeiro (1967–1986)
    • + *
    • BRL - Brazilian Real
    • + *
    • GBP - British Pound
    • + *
    • BND - Brunei Dollar
    • + *
    • BGL - Bulgarian Hard Lev
    • + *
    • BGN - Bulgarian Lev
    • + *
    • BGO - Bulgarian Lev (1879–1952)
    • + *
    • BGM - Bulgarian Socialist Lev
    • + *
    • BUK - Burmese Kyat
    • + *
    • BIF - Burundian Franc
    • + *
    • XPF - CFP Franc
    • + *
    • KHR - Cambodian Riel
    • + *
    • CAD - Canadian Dollar
    • + *
    • CVE - Cape Verdean Escudo
    • + *
    • KYD - Cayman Islands Dollar
    • + *
    • XAF - Central African CFA Franc
    • + *
    • CLE - Chilean Escudo
    • + *
    • CLP - Chilean Peso
    • + *
    • CLF - Chilean Unit of Account (UF)
    • + *
    • CNX - Chinese People’s Bank Dollar
    • + *
    • CNY - Chinese Yuan
    • + *
    • CNH - Chinese Yuan (offshore)
    • + *
    • COP - Colombian Peso
    • + *
    • COU - Colombian Real Value Unit
    • + *
    • KMF - Comorian Franc
    • + *
    • CDF - Congolese Franc
    • + *
    • CRC - Costa Rican Colón
    • + *
    • HRD - Croatian Dinar
    • + *
    • HRK - Croatian Kuna
    • + *
    • CUC - Cuban Convertible Peso
    • + *
    • CUP - Cuban Peso
    • + *
    • CYP - Cypriot Pound
    • + *
    • CZK - Czech Koruna
    • + *
    • CSK - Czechoslovak Hard Koruna
    • + *
    • DKK - Danish Krone
    • + *
    • DJF - Djiboutian Franc
    • + *
    • DOP - Dominican Peso
    • + *
    • NLG - Dutch Guilder
    • + *
    • XCD - East Caribbean Dollar
    • + *
    • DDM - East German Mark
    • + *
    • ECS - Ecuadorian Sucre
    • + *
    • ECV - Ecuadorian Unit of Constant Value
    • + *
    • EGP - Egyptian Pound
    • + *
    • GQE - Equatorial Guinean Ekwele
    • + *
    • ERN - Eritrean Nakfa
    • + *
    • EEK - Estonian Kroon
    • + *
    • ETB - Ethiopian Birr
    • + *
    • EUR - Euro
    • + *
    • XBA - European Composite Unit
    • + *
    • XEU - European Currency Unit
    • + *
    • XBB - European Monetary Unit
    • + *
    • XBC - European Unit of Account (XBC)
    • + *
    • XBD - European Unit of Account (XBD)
    • + *
    • FKP - Falkland Islands Pound
    • + *
    • FJD - Fijian Dollar
    • + *
    • FIM - Finnish Markka
    • + *
    • FRF - French Franc
    • + *
    • XFO - French Gold Franc
    • + *
    • XFU - French UIC-Franc
    • + *
    • GMD - Gambian Dalasi
    • + *
    • GEK - Georgian Kupon Larit
    • + *
    • GEL - Georgian Lari
    • + *
    • DEM - German Mark
    • + *
    • GHS - Ghanaian Cedi
    • + *
    • GHC - Ghanaian Cedi (1979–2007)
    • + *
    • GIP - Gibraltar Pound
    • + *
    • XAU - Gold
    • + *
    • GRD - Greek Drachma
    • + *
    • GTQ - Guatemalan Quetzal
    • + *
    • GWP - Guinea-Bissau Peso
    • + *
    • GNF - Guinean Franc
    • + *
    • GNS - Guinean Syli
    • + *
    • GYD - Guyanaese Dollar
    • + *
    • HTG - Haitian Gourde
    • + *
    • HNL - Honduran Lempira
    • + *
    • HKD - Hong Kong Dollar
    • + *
    • HUF - Hungarian Forint
    • + *
    • IMP - IMP
    • + *
    • ISK - Icelandic Króna
    • + *
    • ISJ - Icelandic Króna (1918–1981)
    • + *
    • INR - Indian Rupee
    • + *
    • IDR - Indonesian Rupiah
    • + *
    • IRR - Iranian Rial
    • + *
    • IQD - Iraqi Dinar
    • + *
    • IEP - Irish Pound
    • + *
    • ILS - Israeli New Shekel
    • + *
    • ILP - Israeli Pound
    • + *
    • ILR - Israeli Shekel (1980–1985)
    • + *
    • ITL - Italian Lira
    • + *
    • JMD - Jamaican Dollar
    • + *
    • JPY - Japanese Yen
    • + *
    • JOD - Jordanian Dinar
    • + *
    • KZT - Kazakhstani Tenge
    • + *
    • KES - Kenyan Shilling
    • + *
    • KWD - Kuwaiti Dinar
    • + *
    • KGS - Kyrgystani Som
    • + *
    • LAK - Laotian Kip
    • + *
    • LVL - Latvian Lats
    • + *
    • LVR - Latvian Ruble
    • + *
    • LBP - Lebanese Pound
    • + *
    • LSL - Lesotho Loti
    • + *
    • LRD - Liberian Dollar
    • + *
    • LYD - Libyan Dinar
    • + *
    • LTL - Lithuanian Litas
    • + *
    • LTT - Lithuanian Talonas
    • + *
    • LUL - Luxembourg Financial Franc
    • + *
    • LUC - Luxembourgian Convertible Franc
    • + *
    • LUF - Luxembourgian Franc
    • + *
    • MOP - Macanese Pataca
    • + *
    • MKD - Macedonian Denar
    • + *
    • MKN - Macedonian Denar (1992–1993)
    • + *
    • MGA - Malagasy Ariary
    • + *
    • MGF - Malagasy Franc
    • + *
    • MWK - Malawian Kwacha
    • + *
    • MYR - Malaysian Ringgit
    • + *
    • MVR - Maldivian Rufiyaa
    • + *
    • MVP - Maldivian Rupee (1947–1981)
    • + *
    • MLF - Malian Franc
    • + *
    • MTL - Maltese Lira
    • + *
    • MTP - Maltese Pound
    • + *
    • MRU - Mauritanian Ouguiya
    • + *
    • MRO - Mauritanian Ouguiya (1973–2017)
    • + *
    • MUR - Mauritian Rupee
    • + *
    • MXV - Mexican Investment Unit
    • + *
    • MXN - Mexican Peso
    • + *
    • MXP - Mexican Silver Peso (1861–1992)
    • + *
    • MDC - Moldovan Cupon
    • + *
    • MDL - Moldovan Leu
    • + *
    • MCF - Monegasque Franc
    • + *
    • MNT - Mongolian Tugrik
    • + *
    • MAD - Moroccan Dirham
    • + *
    • MAF - Moroccan Franc
    • + *
    • MZE - Mozambican Escudo
    • + *
    • MZN - Mozambican Metical
    • + *
    • MZM - Mozambican Metical (1980–2006)
    • + *
    • MMK - Myanmar Kyat
    • + *
    • NAD - Namibian Dollar
    • + *
    • NPR - Nepalese Rupee
    • + *
    • ANG - Netherlands Antillean Guilder
    • + *
    • TWD - New Taiwan Dollar
    • + *
    • NZD - New Zealand Dollar
    • + *
    • NIO - Nicaraguan Córdoba
    • + *
    • NIC - Nicaraguan Córdoba (1988–1991)
    • + *
    • NGN - Nigerian Naira
    • + *
    • KPW - North Korean Won
    • + *
    • NOK - Norwegian Krone
    • + *
    • OMR - Omani Rial
    • + *
    • PKR - Pakistani Rupee
    • + *
    • XPD - Palladium
    • + *
    • PAB - Panamanian Balboa
    • + *
    • PGK - Papua New Guinean Kina
    • + *
    • PYG - Paraguayan Guarani
    • + *
    • PEI - Peruvian Inti
    • + *
    • PEN - Peruvian Sol
    • + *
    • PES - Peruvian Sol (1863–1965)
    • + *
    • PHP - Philippine Peso
    • + *
    • XPT - Platinum
    • + *
    • PLN - Polish Zloty
    • + *
    • PLZ - Polish Zloty (1950–1995)
    • + *
    • PTE - Portuguese Escudo
    • + *
    • GWE - Portuguese Guinea Escudo
    • + *
    • QAR - Qatari Rial
    • + *
    • XRE - RINET Funds
    • + *
    • RHD - Rhodesian Dollar
    • + *
    • RON - Romanian Leu
    • + *
    • ROL - Romanian Leu (1952–2006)
    • + *
    • RUB - Russian Ruble
    • + *
    • RUR - Russian Ruble (1991–1998)
    • + *
    • RWF - Rwandan Franc
    • + *
    • SVC - Salvadoran Colón
    • + *
    • WST - Samoan Tala
    • + *
    • SAR - Saudi Riyal
    • + *
    • RSD - Serbian Dinar
    • + *
    • CSD - Serbian Dinar (2002–2006)
    • + *
    • SCR - Seychellois Rupee
    • + *
    • SLL - Sierra Leonean Leone
    • + *
    • XAG - Silver
    • + *
    • SGD - Singapore Dollar
    • + *
    • SKK - Slovak Koruna
    • + *
    • SIT - Slovenian Tolar
    • + *
    • SBD - Solomon Islands Dollar
    • + *
    • SOS - Somali Shilling
    • + *
    • ZAR - South African Rand
    • + *
    • ZAL - South African Rand (financial)
    • + *
    • KRH - South Korean Hwan (1953–1962)
    • + *
    • KRW - South Korean Won
    • + *
    • KRO - South Korean Won (1945–1953)
    • + *
    • SSP - South Sudanese Pound
    • + *
    • SUR - Soviet Rouble
    • + *
    • ESP - Spanish Peseta
    • + *
    • ESA - Spanish Peseta (A account)
    • + *
    • ESB - Spanish Peseta (convertible account)
    • + *
    • XDR - Special Drawing Rights
    • + *
    • LKR - Sri Lankan Rupee
    • + *
    • SHP - St. Helena Pound
    • + *
    • XSU - Sucre
    • + *
    • SDD - Sudanese Dinar (1992–2007)
    • + *
    • SDG - Sudanese Pound
    • + *
    • SDP - Sudanese Pound (1957–1998)
    • + *
    • SRD - Surinamese Dollar
    • + *
    • SRG - Surinamese Guilder
    • + *
    • SZL - Swazi Lilangeni
    • + *
    • SEK - Swedish Krona
    • + *
    • CHF - Swiss Franc
    • + *
    • SYP - Syrian Pound
    • + *
    • STN - São Tomé & Príncipe Dobra
    • + *
    • STD - São Tomé & Príncipe Dobra (1977–2017)
    • + *
    • TVD - TVD
    • + *
    • TJR - Tajikistani Ruble
    • + *
    • TJS - Tajikistani Somoni
    • + *
    • TZS - Tanzanian Shilling
    • + *
    • XTS - Testing Currency Code
    • + *
    • THB - Thai Baht
    • + *
    • XXX - The codes assigned for transactions where no currency is involved
    • + *
    • TPE - Timorese Escudo
    • + *
    • TOP - Tongan Paʻanga
    • + *
    • TTD - Trinidad & Tobago Dollar
    • + *
    • TND - Tunisian Dinar
    • + *
    • TRY - Turkish Lira
    • + *
    • TRL - Turkish Lira (1922–2005)
    • + *
    • TMT - Turkmenistani Manat
    • + *
    • TMM - Turkmenistani Manat (1993–2009)
    • + *
    • USD - US Dollar
    • + *
    • USN - US Dollar (Next day)
    • + *
    • USS - US Dollar (Same day)
    • + *
    • UGX - Ugandan Shilling
    • + *
    • UGS - Ugandan Shilling (1966–1987)
    • + *
    • UAH - Ukrainian Hryvnia
    • + *
    • UAK - Ukrainian Karbovanets
    • + *
    • AED - United Arab Emirates Dirham
    • + *
    • UYW - Uruguayan Nominal Wage Index Unit
    • + *
    • UYU - Uruguayan Peso
    • + *
    • UYP - Uruguayan Peso (1975–1993)
    • + *
    • UYI - Uruguayan Peso (Indexed Units)
    • + *
    • UZS - Uzbekistani Som
    • + *
    • VUV - Vanuatu Vatu
    • + *
    • VES - Venezuelan Bolívar
    • + *
    • VEB - Venezuelan Bolívar (1871–2008)
    • + *
    • VEF - Venezuelan Bolívar (2008–2018)
    • + *
    • VND - Vietnamese Dong
    • + *
    • VNN - Vietnamese Dong (1978–1985)
    • + *
    • CHE - WIR Euro
    • + *
    • CHW - WIR Franc
    • + *
    • XOF - West African CFA Franc
    • + *
    • YDD - Yemeni Dinar
    • + *
    • YER - Yemeni Rial
    • + *
    • YUN - Yugoslavian Convertible Dinar (1990–1992)
    • + *
    • YUD - Yugoslavian Hard Dinar (1966–1990)
    • + *
    • YUM - Yugoslavian New Dinar (1994–2002)
    • + *
    • YUR - Yugoslavian Reformed Dinar (1992–1993)
    • + *
    • ZWN - ZWN
    • + *
    • ZRN - Zairean New Zaire (1993–1998)
    • + *
    • ZRZ - Zairean Zaire (1971–1993)
    • + *
    • ZMW - Zambian Kwacha
    • + *
    • ZMK - Zambian Kwacha (1968–2012)
    • + *
    • ZWD - Zimbabwean Dollar (1980–2008)
    • + *
    • ZWR - Zimbabwean Dollar (2008)
    • + *
    • ZWL - Zimbabwean Dollar (2009)
    • + *
    + */ @JsonSetter(value = "currency", nulls = Nulls.SKIP) - public Builder currency(Optional currency) { + public Builder currency(Optional currency) { this.currency = currency; return this; } - public Builder currency(TransactionCurrencyEnum currency) { + public Builder currency(CashFlowStatementCurrency currency) { this.currency = Optional.ofNullable(currency); return this; } + /** + *

    The company the cash flow statement belongs to.

    + */ @JsonSetter(value = "company", nulls = Nulls.SKIP) public Builder company(Optional company) { this.company = company; @@ -742,6 +1068,9 @@ public Builder company(CashFlowStatementCompany company) { return this; } + /** + *

    The cash flow statement's start period.

    + */ @JsonSetter(value = "start_period", nulls = Nulls.SKIP) public Builder startPeriod(Optional startPeriod) { this.startPeriod = startPeriod; @@ -753,6 +1082,9 @@ public Builder startPeriod(OffsetDateTime startPeriod) { return this; } + /** + *

    The cash flow statement's end period.

    + */ @JsonSetter(value = "end_period", nulls = Nulls.SKIP) public Builder endPeriod(Optional endPeriod) { this.endPeriod = endPeriod; @@ -764,6 +1096,9 @@ public Builder endPeriod(OffsetDateTime endPeriod) { return this; } + /** + *

    Cash and cash equivalents at the beginning of the cash flow statement's period.

    + */ @JsonSetter(value = "cash_at_beginning_of_period", nulls = Nulls.SKIP) public Builder cashAtBeginningOfPeriod(Optional cashAtBeginningOfPeriod) { this.cashAtBeginningOfPeriod = cashAtBeginningOfPeriod; @@ -775,6 +1110,9 @@ public Builder cashAtBeginningOfPeriod(Double cashAtBeginningOfPeriod) { return this; } + /** + *

    Cash and cash equivalents at the beginning of the cash flow statement's period.

    + */ @JsonSetter(value = "cash_at_end_of_period", nulls = Nulls.SKIP) public Builder cashAtEndOfPeriod(Optional cashAtEndOfPeriod) { this.cashAtEndOfPeriod = cashAtEndOfPeriod; @@ -819,6 +1157,9 @@ public Builder financingActivities(List financingActivities) { return this; } + /** + *

    The time that cash flow statement was generated by the accounting system.

    + */ @JsonSetter(value = "remote_generated_at", nulls = Nulls.SKIP) public Builder remoteGeneratedAt(Optional remoteGeneratedAt) { this.remoteGeneratedAt = remoteGeneratedAt; @@ -830,6 +1171,9 @@ public Builder remoteGeneratedAt(OffsetDateTime remoteGeneratedAt) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/accounting/types/CashFlowStatementCurrency.java b/src/main/java/com/merge/api/accounting/types/CashFlowStatementCurrency.java new file mode 100644 index 000000000..579a6fd8b --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/CashFlowStatementCurrency.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = CashFlowStatementCurrency.Deserializer.class) +public final class CashFlowStatementCurrency { + private final Object value; + + private final int type; + + private CashFlowStatementCurrency(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((TransactionCurrencyEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof CashFlowStatementCurrency && equalTo((CashFlowStatementCurrency) other); + } + + private boolean equalTo(CashFlowStatementCurrency other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static CashFlowStatementCurrency of(TransactionCurrencyEnum value) { + return new CashFlowStatementCurrency(value, 0); + } + + public static CashFlowStatementCurrency of(String value) { + return new CashFlowStatementCurrency(value, 1); + } + + public interface Visitor { + T visit(TransactionCurrencyEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(CashFlowStatementCurrency.class); + } + + @java.lang.Override + public CashFlowStatementCurrency deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TransactionCurrencyEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/CashFlowStatementsListRequest.java b/src/main/java/com/merge/api/accounting/types/CashFlowStatementsListRequest.java index 47606d30a..16101b25f 100644 --- a/src/main/java/com/merge/api/accounting/types/CashFlowStatementsListRequest.java +++ b/src/main/java/com/merge/api/accounting/types/CashFlowStatementsListRequest.java @@ -273,6 +273,9 @@ public Builder from(CashFlowStatementsListRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -289,6 +292,9 @@ public Builder expand(String expand) { return this; } + /** + *

    If provided, will only return cash flow statements for this company.

    + */ @JsonSetter(value = "company_id", nulls = Nulls.SKIP) public Builder companyId(Optional companyId) { this.companyId = companyId; @@ -300,6 +306,9 @@ public Builder companyId(String companyId) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -311,6 +320,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -322,6 +334,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -333,6 +348,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -344,6 +362,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -355,6 +376,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -366,6 +390,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -377,6 +404,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -388,6 +418,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -399,6 +432,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; diff --git a/src/main/java/com/merge/api/accounting/types/CashFlowStatementsRetrieveRequest.java b/src/main/java/com/merge/api/accounting/types/CashFlowStatementsRetrieveRequest.java index d07f57c16..0d8ccdfe8 100644 --- a/src/main/java/com/merge/api/accounting/types/CashFlowStatementsRetrieveRequest.java +++ b/src/main/java/com/merge/api/accounting/types/CashFlowStatementsRetrieveRequest.java @@ -116,6 +116,9 @@ public Builder from(CashFlowStatementsRetrieveRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -132,6 +135,9 @@ public Builder expand(String expand) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -143,6 +149,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/accounting/types/CommonModelScopeApi.java b/src/main/java/com/merge/api/accounting/types/CommonModelScopeApi.java index 94aaac58f..b4fbbc954 100644 --- a/src/main/java/com/merge/api/accounting/types/CommonModelScopeApi.java +++ b/src/main/java/com/merge/api/accounting/types/CommonModelScopeApi.java @@ -82,6 +82,9 @@ public Builder from(CommonModelScopeApi other) { return this; } + /** + *

    The common models you want to update the scopes for

    + */ @JsonSetter(value = "common_models", nulls = Nulls.SKIP) public Builder commonModels(List commonModels) { this.commonModels.clear(); diff --git a/src/main/java/com/merge/api/accounting/types/CompanyInfo.java b/src/main/java/com/merge/api/accounting/types/CompanyInfo.java index 1c85dca4d..1a963f04d 100644 --- a/src/main/java/com/merge/api/accounting/types/CompanyInfo.java +++ b/src/main/java/com/merge/api/accounting/types/CompanyInfo.java @@ -41,7 +41,7 @@ public final class CompanyInfo { private final Optional fiscalYearEndDay; - private final Optional currency; + private final Optional currency; private final Optional remoteCreatedAt; @@ -69,7 +69,7 @@ private CompanyInfo( Optional taxNumber, Optional fiscalYearEndMonth, Optional fiscalYearEndDay, - Optional currency, + Optional currency, Optional remoteCreatedAt, Optional>> urls, Optional> addresses, @@ -167,319 +167,8 @@ public Optional getFiscalYearEndDay() { return fiscalYearEndDay; } - /** - * @return The currency set in the company's accounting platform. - *
      - *
    • XUA - ADB Unit of Account
    • - *
    • AFN - Afghan Afghani
    • - *
    • AFA - Afghan Afghani (1927–2002)
    • - *
    • ALL - Albanian Lek
    • - *
    • ALK - Albanian Lek (1946–1965)
    • - *
    • DZD - Algerian Dinar
    • - *
    • ADP - Andorran Peseta
    • - *
    • AOA - Angolan Kwanza
    • - *
    • AOK - Angolan Kwanza (1977–1991)
    • - *
    • AON - Angolan New Kwanza (1990–2000)
    • - *
    • AOR - Angolan Readjusted Kwanza (1995–1999)
    • - *
    • ARA - Argentine Austral
    • - *
    • ARS - Argentine Peso
    • - *
    • ARM - Argentine Peso (1881–1970)
    • - *
    • ARP - Argentine Peso (1983–1985)
    • - *
    • ARL - Argentine Peso Ley (1970–1983)
    • - *
    • AMD - Armenian Dram
    • - *
    • AWG - Aruban Florin
    • - *
    • AUD - Australian Dollar
    • - *
    • ATS - Austrian Schilling
    • - *
    • AZN - Azerbaijani Manat
    • - *
    • AZM - Azerbaijani Manat (1993–2006)
    • - *
    • BSD - Bahamian Dollar
    • - *
    • BHD - Bahraini Dinar
    • - *
    • BDT - Bangladeshi Taka
    • - *
    • BBD - Barbadian Dollar
    • - *
    • BYN - Belarusian Ruble
    • - *
    • BYB - Belarusian Ruble (1994–1999)
    • - *
    • BYR - Belarusian Ruble (2000–2016)
    • - *
    • BEF - Belgian Franc
    • - *
    • BEC - Belgian Franc (convertible)
    • - *
    • BEL - Belgian Franc (financial)
    • - *
    • BZD - Belize Dollar
    • - *
    • BMD - Bermudan Dollar
    • - *
    • BTN - Bhutanese Ngultrum
    • - *
    • BOB - Bolivian Boliviano
    • - *
    • BOL - Bolivian Boliviano (1863–1963)
    • - *
    • BOV - Bolivian Mvdol
    • - *
    • BOP - Bolivian Peso
    • - *
    • BAM - Bosnia-Herzegovina Convertible Mark
    • - *
    • BAD - Bosnia-Herzegovina Dinar (1992–1994)
    • - *
    • BAN - Bosnia-Herzegovina New Dinar (1994–1997)
    • - *
    • BWP - Botswanan Pula
    • - *
    • BRC - Brazilian Cruzado (1986–1989)
    • - *
    • BRZ - Brazilian Cruzeiro (1942–1967)
    • - *
    • BRE - Brazilian Cruzeiro (1990–1993)
    • - *
    • BRR - Brazilian Cruzeiro (1993–1994)
    • - *
    • BRN - Brazilian New Cruzado (1989–1990)
    • - *
    • BRB - Brazilian New Cruzeiro (1967–1986)
    • - *
    • BRL - Brazilian Real
    • - *
    • GBP - British Pound
    • - *
    • BND - Brunei Dollar
    • - *
    • BGL - Bulgarian Hard Lev
    • - *
    • BGN - Bulgarian Lev
    • - *
    • BGO - Bulgarian Lev (1879–1952)
    • - *
    • BGM - Bulgarian Socialist Lev
    • - *
    • BUK - Burmese Kyat
    • - *
    • BIF - Burundian Franc
    • - *
    • XPF - CFP Franc
    • - *
    • KHR - Cambodian Riel
    • - *
    • CAD - Canadian Dollar
    • - *
    • CVE - Cape Verdean Escudo
    • - *
    • KYD - Cayman Islands Dollar
    • - *
    • XAF - Central African CFA Franc
    • - *
    • CLE - Chilean Escudo
    • - *
    • CLP - Chilean Peso
    • - *
    • CLF - Chilean Unit of Account (UF)
    • - *
    • CNX - Chinese People’s Bank Dollar
    • - *
    • CNY - Chinese Yuan
    • - *
    • CNH - Chinese Yuan (offshore)
    • - *
    • COP - Colombian Peso
    • - *
    • COU - Colombian Real Value Unit
    • - *
    • KMF - Comorian Franc
    • - *
    • CDF - Congolese Franc
    • - *
    • CRC - Costa Rican Colón
    • - *
    • HRD - Croatian Dinar
    • - *
    • HRK - Croatian Kuna
    • - *
    • CUC - Cuban Convertible Peso
    • - *
    • CUP - Cuban Peso
    • - *
    • CYP - Cypriot Pound
    • - *
    • CZK - Czech Koruna
    • - *
    • CSK - Czechoslovak Hard Koruna
    • - *
    • DKK - Danish Krone
    • - *
    • DJF - Djiboutian Franc
    • - *
    • DOP - Dominican Peso
    • - *
    • NLG - Dutch Guilder
    • - *
    • XCD - East Caribbean Dollar
    • - *
    • DDM - East German Mark
    • - *
    • ECS - Ecuadorian Sucre
    • - *
    • ECV - Ecuadorian Unit of Constant Value
    • - *
    • EGP - Egyptian Pound
    • - *
    • GQE - Equatorial Guinean Ekwele
    • - *
    • ERN - Eritrean Nakfa
    • - *
    • EEK - Estonian Kroon
    • - *
    • ETB - Ethiopian Birr
    • - *
    • EUR - Euro
    • - *
    • XBA - European Composite Unit
    • - *
    • XEU - European Currency Unit
    • - *
    • XBB - European Monetary Unit
    • - *
    • XBC - European Unit of Account (XBC)
    • - *
    • XBD - European Unit of Account (XBD)
    • - *
    • FKP - Falkland Islands Pound
    • - *
    • FJD - Fijian Dollar
    • - *
    • FIM - Finnish Markka
    • - *
    • FRF - French Franc
    • - *
    • XFO - French Gold Franc
    • - *
    • XFU - French UIC-Franc
    • - *
    • GMD - Gambian Dalasi
    • - *
    • GEK - Georgian Kupon Larit
    • - *
    • GEL - Georgian Lari
    • - *
    • DEM - German Mark
    • - *
    • GHS - Ghanaian Cedi
    • - *
    • GHC - Ghanaian Cedi (1979–2007)
    • - *
    • GIP - Gibraltar Pound
    • - *
    • XAU - Gold
    • - *
    • GRD - Greek Drachma
    • - *
    • GTQ - Guatemalan Quetzal
    • - *
    • GWP - Guinea-Bissau Peso
    • - *
    • GNF - Guinean Franc
    • - *
    • GNS - Guinean Syli
    • - *
    • GYD - Guyanaese Dollar
    • - *
    • HTG - Haitian Gourde
    • - *
    • HNL - Honduran Lempira
    • - *
    • HKD - Hong Kong Dollar
    • - *
    • HUF - Hungarian Forint
    • - *
    • IMP - IMP
    • - *
    • ISK - Icelandic Króna
    • - *
    • ISJ - Icelandic Króna (1918–1981)
    • - *
    • INR - Indian Rupee
    • - *
    • IDR - Indonesian Rupiah
    • - *
    • IRR - Iranian Rial
    • - *
    • IQD - Iraqi Dinar
    • - *
    • IEP - Irish Pound
    • - *
    • ILS - Israeli New Shekel
    • - *
    • ILP - Israeli Pound
    • - *
    • ILR - Israeli Shekel (1980–1985)
    • - *
    • ITL - Italian Lira
    • - *
    • JMD - Jamaican Dollar
    • - *
    • JPY - Japanese Yen
    • - *
    • JOD - Jordanian Dinar
    • - *
    • KZT - Kazakhstani Tenge
    • - *
    • KES - Kenyan Shilling
    • - *
    • KWD - Kuwaiti Dinar
    • - *
    • KGS - Kyrgystani Som
    • - *
    • LAK - Laotian Kip
    • - *
    • LVL - Latvian Lats
    • - *
    • LVR - Latvian Ruble
    • - *
    • LBP - Lebanese Pound
    • - *
    • LSL - Lesotho Loti
    • - *
    • LRD - Liberian Dollar
    • - *
    • LYD - Libyan Dinar
    • - *
    • LTL - Lithuanian Litas
    • - *
    • LTT - Lithuanian Talonas
    • - *
    • LUL - Luxembourg Financial Franc
    • - *
    • LUC - Luxembourgian Convertible Franc
    • - *
    • LUF - Luxembourgian Franc
    • - *
    • MOP - Macanese Pataca
    • - *
    • MKD - Macedonian Denar
    • - *
    • MKN - Macedonian Denar (1992–1993)
    • - *
    • MGA - Malagasy Ariary
    • - *
    • MGF - Malagasy Franc
    • - *
    • MWK - Malawian Kwacha
    • - *
    • MYR - Malaysian Ringgit
    • - *
    • MVR - Maldivian Rufiyaa
    • - *
    • MVP - Maldivian Rupee (1947–1981)
    • - *
    • MLF - Malian Franc
    • - *
    • MTL - Maltese Lira
    • - *
    • MTP - Maltese Pound
    • - *
    • MRU - Mauritanian Ouguiya
    • - *
    • MRO - Mauritanian Ouguiya (1973–2017)
    • - *
    • MUR - Mauritian Rupee
    • - *
    • MXV - Mexican Investment Unit
    • - *
    • MXN - Mexican Peso
    • - *
    • MXP - Mexican Silver Peso (1861–1992)
    • - *
    • MDC - Moldovan Cupon
    • - *
    • MDL - Moldovan Leu
    • - *
    • MCF - Monegasque Franc
    • - *
    • MNT - Mongolian Tugrik
    • - *
    • MAD - Moroccan Dirham
    • - *
    • MAF - Moroccan Franc
    • - *
    • MZE - Mozambican Escudo
    • - *
    • MZN - Mozambican Metical
    • - *
    • MZM - Mozambican Metical (1980–2006)
    • - *
    • MMK - Myanmar Kyat
    • - *
    • NAD - Namibian Dollar
    • - *
    • NPR - Nepalese Rupee
    • - *
    • ANG - Netherlands Antillean Guilder
    • - *
    • TWD - New Taiwan Dollar
    • - *
    • NZD - New Zealand Dollar
    • - *
    • NIO - Nicaraguan Córdoba
    • - *
    • NIC - Nicaraguan Córdoba (1988–1991)
    • - *
    • NGN - Nigerian Naira
    • - *
    • KPW - North Korean Won
    • - *
    • NOK - Norwegian Krone
    • - *
    • OMR - Omani Rial
    • - *
    • PKR - Pakistani Rupee
    • - *
    • XPD - Palladium
    • - *
    • PAB - Panamanian Balboa
    • - *
    • PGK - Papua New Guinean Kina
    • - *
    • PYG - Paraguayan Guarani
    • - *
    • PEI - Peruvian Inti
    • - *
    • PEN - Peruvian Sol
    • - *
    • PES - Peruvian Sol (1863–1965)
    • - *
    • PHP - Philippine Peso
    • - *
    • XPT - Platinum
    • - *
    • PLN - Polish Zloty
    • - *
    • PLZ - Polish Zloty (1950–1995)
    • - *
    • PTE - Portuguese Escudo
    • - *
    • GWE - Portuguese Guinea Escudo
    • - *
    • QAR - Qatari Rial
    • - *
    • XRE - RINET Funds
    • - *
    • RHD - Rhodesian Dollar
    • - *
    • RON - Romanian Leu
    • - *
    • ROL - Romanian Leu (1952–2006)
    • - *
    • RUB - Russian Ruble
    • - *
    • RUR - Russian Ruble (1991–1998)
    • - *
    • RWF - Rwandan Franc
    • - *
    • SVC - Salvadoran Colón
    • - *
    • WST - Samoan Tala
    • - *
    • SAR - Saudi Riyal
    • - *
    • RSD - Serbian Dinar
    • - *
    • CSD - Serbian Dinar (2002–2006)
    • - *
    • SCR - Seychellois Rupee
    • - *
    • SLL - Sierra Leonean Leone
    • - *
    • XAG - Silver
    • - *
    • SGD - Singapore Dollar
    • - *
    • SKK - Slovak Koruna
    • - *
    • SIT - Slovenian Tolar
    • - *
    • SBD - Solomon Islands Dollar
    • - *
    • SOS - Somali Shilling
    • - *
    • ZAR - South African Rand
    • - *
    • ZAL - South African Rand (financial)
    • - *
    • KRH - South Korean Hwan (1953–1962)
    • - *
    • KRW - South Korean Won
    • - *
    • KRO - South Korean Won (1945–1953)
    • - *
    • SSP - South Sudanese Pound
    • - *
    • SUR - Soviet Rouble
    • - *
    • ESP - Spanish Peseta
    • - *
    • ESA - Spanish Peseta (A account)
    • - *
    • ESB - Spanish Peseta (convertible account)
    • - *
    • XDR - Special Drawing Rights
    • - *
    • LKR - Sri Lankan Rupee
    • - *
    • SHP - St. Helena Pound
    • - *
    • XSU - Sucre
    • - *
    • SDD - Sudanese Dinar (1992–2007)
    • - *
    • SDG - Sudanese Pound
    • - *
    • SDP - Sudanese Pound (1957–1998)
    • - *
    • SRD - Surinamese Dollar
    • - *
    • SRG - Surinamese Guilder
    • - *
    • SZL - Swazi Lilangeni
    • - *
    • SEK - Swedish Krona
    • - *
    • CHF - Swiss Franc
    • - *
    • SYP - Syrian Pound
    • - *
    • STN - São Tomé & Príncipe Dobra
    • - *
    • STD - São Tomé & Príncipe Dobra (1977–2017)
    • - *
    • TVD - TVD
    • - *
    • TJR - Tajikistani Ruble
    • - *
    • TJS - Tajikistani Somoni
    • - *
    • TZS - Tanzanian Shilling
    • - *
    • XTS - Testing Currency Code
    • - *
    • THB - Thai Baht
    • - *
    • XXX - The codes assigned for transactions where no currency is involved
    • - *
    • TPE - Timorese Escudo
    • - *
    • TOP - Tongan Paʻanga
    • - *
    • TTD - Trinidad & Tobago Dollar
    • - *
    • TND - Tunisian Dinar
    • - *
    • TRY - Turkish Lira
    • - *
    • TRL - Turkish Lira (1922–2005)
    • - *
    • TMT - Turkmenistani Manat
    • - *
    • TMM - Turkmenistani Manat (1993–2009)
    • - *
    • USD - US Dollar
    • - *
    • USN - US Dollar (Next day)
    • - *
    • USS - US Dollar (Same day)
    • - *
    • UGX - Ugandan Shilling
    • - *
    • UGS - Ugandan Shilling (1966–1987)
    • - *
    • UAH - Ukrainian Hryvnia
    • - *
    • UAK - Ukrainian Karbovanets
    • - *
    • AED - United Arab Emirates Dirham
    • - *
    • UYW - Uruguayan Nominal Wage Index Unit
    • - *
    • UYU - Uruguayan Peso
    • - *
    • UYP - Uruguayan Peso (1975–1993)
    • - *
    • UYI - Uruguayan Peso (Indexed Units)
    • - *
    • UZS - Uzbekistani Som
    • - *
    • VUV - Vanuatu Vatu
    • - *
    • VES - Venezuelan Bolívar
    • - *
    • VEB - Venezuelan Bolívar (1871–2008)
    • - *
    • VEF - Venezuelan Bolívar (2008–2018)
    • - *
    • VND - Vietnamese Dong
    • - *
    • VNN - Vietnamese Dong (1978–1985)
    • - *
    • CHE - WIR Euro
    • - *
    • CHW - WIR Franc
    • - *
    • XOF - West African CFA Franc
    • - *
    • YDD - Yemeni Dinar
    • - *
    • YER - Yemeni Rial
    • - *
    • YUN - Yugoslavian Convertible Dinar (1990–1992)
    • - *
    • YUD - Yugoslavian Hard Dinar (1966–1990)
    • - *
    • YUM - Yugoslavian New Dinar (1994–2002)
    • - *
    • YUR - Yugoslavian Reformed Dinar (1992–1993)
    • - *
    • ZWN - ZWN
    • - *
    • ZRN - Zairean New Zaire (1993–1998)
    • - *
    • ZRZ - Zairean Zaire (1971–1993)
    • - *
    • ZMW - Zambian Kwacha
    • - *
    • ZMK - Zambian Kwacha (1968–2012)
    • - *
    • ZWD - Zimbabwean Dollar (1980–2008)
    • - *
    • ZWR - Zimbabwean Dollar (2008)
    • - *
    • ZWL - Zimbabwean Dollar (2009)
    • - *
    - */ @JsonProperty("currency") - public Optional getCurrency() { + public Optional getCurrency() { return currency; } @@ -609,7 +298,7 @@ public static final class Builder { private Optional fiscalYearEndDay = Optional.empty(); - private Optional currency = Optional.empty(); + private Optional currency = Optional.empty(); private Optional remoteCreatedAt = Optional.empty(); @@ -662,6 +351,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -673,6 +365,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -684,6 +379,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -695,6 +393,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The company's name.

    + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -706,6 +407,9 @@ public Builder name(String name) { return this; } + /** + *

    The company's legal name.

    + */ @JsonSetter(value = "legal_name", nulls = Nulls.SKIP) public Builder legalName(Optional legalName) { this.legalName = legalName; @@ -717,6 +421,9 @@ public Builder legalName(String legalName) { return this; } + /** + *

    The company's tax number.

    + */ @JsonSetter(value = "tax_number", nulls = Nulls.SKIP) public Builder taxNumber(Optional taxNumber) { this.taxNumber = taxNumber; @@ -728,6 +435,9 @@ public Builder taxNumber(String taxNumber) { return this; } + /** + *

    The company's fiscal year end month.

    + */ @JsonSetter(value = "fiscal_year_end_month", nulls = Nulls.SKIP) public Builder fiscalYearEndMonth(Optional fiscalYearEndMonth) { this.fiscalYearEndMonth = fiscalYearEndMonth; @@ -739,6 +449,9 @@ public Builder fiscalYearEndMonth(Integer fiscalYearEndMonth) { return this; } + /** + *

    The company's fiscal year end day.

    + */ @JsonSetter(value = "fiscal_year_end_day", nulls = Nulls.SKIP) public Builder fiscalYearEndDay(Optional fiscalYearEndDay) { this.fiscalYearEndDay = fiscalYearEndDay; @@ -751,16 +464,19 @@ public Builder fiscalYearEndDay(Integer fiscalYearEndDay) { } @JsonSetter(value = "currency", nulls = Nulls.SKIP) - public Builder currency(Optional currency) { + public Builder currency(Optional currency) { this.currency = currency; return this; } - public Builder currency(TransactionCurrencyEnum currency) { + public Builder currency(JsonNode currency) { this.currency = Optional.ofNullable(currency); return this; } + /** + *

    When the third party's company was created.

    + */ @JsonSetter(value = "remote_created_at", nulls = Nulls.SKIP) public Builder remoteCreatedAt(Optional remoteCreatedAt) { this.remoteCreatedAt = remoteCreatedAt; @@ -772,6 +488,9 @@ public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { return this; } + /** + *

    The company's urls.

    + */ @JsonSetter(value = "urls", nulls = Nulls.SKIP) public Builder urls(Optional>> urls) { this.urls = urls; @@ -805,6 +524,9 @@ public Builder phoneNumbers(List phoneNumbers) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/accounting/types/CompanyInfoListRequest.java b/src/main/java/com/merge/api/accounting/types/CompanyInfoListRequest.java index a0eb02b5a..6ba60196d 100644 --- a/src/main/java/com/merge/api/accounting/types/CompanyInfoListRequest.java +++ b/src/main/java/com/merge/api/accounting/types/CompanyInfoListRequest.java @@ -256,6 +256,9 @@ public Builder from(CompanyInfoListRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -272,6 +275,9 @@ public Builder expand(CompanyInfoListRequestExpandItem expand) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -283,6 +289,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -294,6 +303,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -305,6 +317,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -316,6 +331,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -327,6 +345,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -338,6 +359,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -349,6 +373,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -360,6 +387,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -371,6 +401,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; diff --git a/src/main/java/com/merge/api/accounting/types/CompanyInfoRetrieveRequest.java b/src/main/java/com/merge/api/accounting/types/CompanyInfoRetrieveRequest.java index 8fc1e5972..1bdf972db 100644 --- a/src/main/java/com/merge/api/accounting/types/CompanyInfoRetrieveRequest.java +++ b/src/main/java/com/merge/api/accounting/types/CompanyInfoRetrieveRequest.java @@ -116,6 +116,9 @@ public Builder from(CompanyInfoRetrieveRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -132,6 +135,9 @@ public Builder expand(CompanyInfoRetrieveRequestExpandItem expand) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -143,6 +149,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/accounting/types/Contact.java b/src/main/java/com/merge/api/accounting/types/Contact.java index 15c42ba4e..4bb10bc51 100644 --- a/src/main/java/com/merge/api/accounting/types/Contact.java +++ b/src/main/java/com/merge/api/accounting/types/Contact.java @@ -41,7 +41,7 @@ public final class Contact { private final Optional taxNumber; - private final Optional status; + private final Optional status; private final Optional currency; @@ -73,7 +73,7 @@ private Contact( Optional isCustomer, Optional emailAddress, Optional taxNumber, - Optional status, + Optional status, Optional currency, Optional remoteUpdatedAt, Optional company, @@ -183,7 +183,7 @@ public Optional getTaxNumber() { * */ @JsonProperty("status") - public Optional getStatus() { + public Optional getStatus() { return status; } @@ -336,7 +336,7 @@ public static final class Builder { private Optional taxNumber = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Optional currency = Optional.empty(); @@ -395,6 +395,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -406,6 +409,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -417,6 +423,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -428,6 +437,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The contact's name.

    + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -439,6 +451,9 @@ public Builder name(String name) { return this; } + /** + *

    Whether the contact is a supplier.

    + */ @JsonSetter(value = "is_supplier", nulls = Nulls.SKIP) public Builder isSupplier(Optional isSupplier) { this.isSupplier = isSupplier; @@ -450,6 +465,9 @@ public Builder isSupplier(Boolean isSupplier) { return this; } + /** + *

    Whether the contact is a customer.

    + */ @JsonSetter(value = "is_customer", nulls = Nulls.SKIP) public Builder isCustomer(Optional isCustomer) { this.isCustomer = isCustomer; @@ -461,6 +479,9 @@ public Builder isCustomer(Boolean isCustomer) { return this; } + /** + *

    The contact's email address.

    + */ @JsonSetter(value = "email_address", nulls = Nulls.SKIP) public Builder emailAddress(Optional emailAddress) { this.emailAddress = emailAddress; @@ -472,6 +493,9 @@ public Builder emailAddress(String emailAddress) { return this; } + /** + *

    The contact's tax number.

    + */ @JsonSetter(value = "tax_number", nulls = Nulls.SKIP) public Builder taxNumber(Optional taxNumber) { this.taxNumber = taxNumber; @@ -483,17 +507,27 @@ public Builder taxNumber(String taxNumber) { return this; } + /** + *

    The contact's status

    + *
      + *
    • ACTIVE - ACTIVE
    • + *
    • ARCHIVED - ARCHIVED
    • + *
    + */ @JsonSetter(value = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { + public Builder status(Optional status) { this.status = status; return this; } - public Builder status(Status7D1Enum status) { + public Builder status(ContactStatus status) { this.status = Optional.ofNullable(status); return this; } + /** + *

    The currency the contact's transactions are in.

    + */ @JsonSetter(value = "currency", nulls = Nulls.SKIP) public Builder currency(Optional currency) { this.currency = currency; @@ -505,6 +539,9 @@ public Builder currency(String currency) { return this; } + /** + *

    When the third party's contact was updated.

    + */ @JsonSetter(value = "remote_updated_at", nulls = Nulls.SKIP) public Builder remoteUpdatedAt(Optional remoteUpdatedAt) { this.remoteUpdatedAt = remoteUpdatedAt; @@ -516,6 +553,9 @@ public Builder remoteUpdatedAt(OffsetDateTime remoteUpdatedAt) { return this; } + /** + *

    The company the contact belongs to.

    + */ @JsonSetter(value = "company", nulls = Nulls.SKIP) public Builder company(Optional company) { this.company = company; @@ -527,6 +567,9 @@ public Builder company(String company) { return this; } + /** + *

    Address object IDs for the given Contacts object.

    + */ @JsonSetter(value = "addresses", nulls = Nulls.SKIP) public Builder addresses(Optional>> addresses) { this.addresses = addresses; @@ -538,6 +581,9 @@ public Builder addresses(List> addresses) { return this; } + /** + *

    AccountingPhoneNumber object for the given Contacts object.

    + */ @JsonSetter(value = "phone_numbers", nulls = Nulls.SKIP) public Builder phoneNumbers(Optional> phoneNumbers) { this.phoneNumbers = phoneNumbers; @@ -549,6 +595,9 @@ public Builder phoneNumbers(List phoneNumbers) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/accounting/types/ContactEndpointRequest.java b/src/main/java/com/merge/api/accounting/types/ContactEndpointRequest.java index d88cc0610..c34b65afc 100644 --- a/src/main/java/com/merge/api/accounting/types/ContactEndpointRequest.java +++ b/src/main/java/com/merge/api/accounting/types/ContactEndpointRequest.java @@ -99,10 +99,16 @@ public interface ModelStage { public interface _FinalStage { ContactEndpointRequest build(); + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ _FinalStage isDebugMode(Optional isDebugMode); _FinalStage isDebugMode(Boolean isDebugMode); + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ _FinalStage runAsync(Optional runAsync); _FinalStage runAsync(Boolean runAsync); @@ -146,6 +152,9 @@ public _FinalStage runAsync(Boolean runAsync) { return this; } + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ @java.lang.Override @JsonSetter(value = "run_async", nulls = Nulls.SKIP) public _FinalStage runAsync(Optional runAsync) { @@ -163,6 +172,9 @@ public _FinalStage isDebugMode(Boolean isDebugMode) { return this; } + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ @java.lang.Override @JsonSetter(value = "is_debug_mode", nulls = Nulls.SKIP) public _FinalStage isDebugMode(Optional isDebugMode) { diff --git a/src/main/java/com/merge/api/accounting/types/ContactRequest.java b/src/main/java/com/merge/api/accounting/types/ContactRequest.java index 568fb1bbb..b7fc0a8fc 100644 --- a/src/main/java/com/merge/api/accounting/types/ContactRequest.java +++ b/src/main/java/com/merge/api/accounting/types/ContactRequest.java @@ -32,7 +32,7 @@ public final class ContactRequest { private final Optional taxNumber; - private final Optional status; + private final Optional status; private final Optional currency; @@ -56,7 +56,7 @@ private ContactRequest( Optional isCustomer, Optional emailAddress, Optional taxNumber, - Optional status, + Optional status, Optional currency, Optional company, Optional>> addresses, @@ -129,7 +129,7 @@ public Optional getTaxNumber() { * */ @JsonProperty("status") - public Optional getStatus() { + public Optional getStatus() { return status; } @@ -246,7 +246,7 @@ public static final class Builder { private Optional taxNumber = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Optional currency = Optional.empty(); @@ -284,6 +284,9 @@ public Builder from(ContactRequest other) { return this; } + /** + *

    The contact's name.

    + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -295,6 +298,9 @@ public Builder name(String name) { return this; } + /** + *

    Whether the contact is a supplier.

    + */ @JsonSetter(value = "is_supplier", nulls = Nulls.SKIP) public Builder isSupplier(Optional isSupplier) { this.isSupplier = isSupplier; @@ -306,6 +312,9 @@ public Builder isSupplier(Boolean isSupplier) { return this; } + /** + *

    Whether the contact is a customer.

    + */ @JsonSetter(value = "is_customer", nulls = Nulls.SKIP) public Builder isCustomer(Optional isCustomer) { this.isCustomer = isCustomer; @@ -317,6 +326,9 @@ public Builder isCustomer(Boolean isCustomer) { return this; } + /** + *

    The contact's email address.

    + */ @JsonSetter(value = "email_address", nulls = Nulls.SKIP) public Builder emailAddress(Optional emailAddress) { this.emailAddress = emailAddress; @@ -328,6 +340,9 @@ public Builder emailAddress(String emailAddress) { return this; } + /** + *

    The contact's tax number.

    + */ @JsonSetter(value = "tax_number", nulls = Nulls.SKIP) public Builder taxNumber(Optional taxNumber) { this.taxNumber = taxNumber; @@ -339,17 +354,27 @@ public Builder taxNumber(String taxNumber) { return this; } + /** + *

    The contact's status

    + *
      + *
    • ACTIVE - ACTIVE
    • + *
    • ARCHIVED - ARCHIVED
    • + *
    + */ @JsonSetter(value = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { + public Builder status(Optional status) { this.status = status; return this; } - public Builder status(Status7D1Enum status) { + public Builder status(ContactRequestStatus status) { this.status = Optional.ofNullable(status); return this; } + /** + *

    The currency the contact's transactions are in.

    + */ @JsonSetter(value = "currency", nulls = Nulls.SKIP) public Builder currency(Optional currency) { this.currency = currency; @@ -361,6 +386,9 @@ public Builder currency(String currency) { return this; } + /** + *

    The company the contact belongs to.

    + */ @JsonSetter(value = "company", nulls = Nulls.SKIP) public Builder company(Optional company) { this.company = company; @@ -372,6 +400,9 @@ public Builder company(String company) { return this; } + /** + *

    Address object IDs for the given Contacts object.

    + */ @JsonSetter(value = "addresses", nulls = Nulls.SKIP) public Builder addresses(Optional>> addresses) { this.addresses = addresses; @@ -383,6 +414,9 @@ public Builder addresses(List> addresses) return this; } + /** + *

    AccountingPhoneNumber object for the given Contacts object.

    + */ @JsonSetter(value = "phone_numbers", nulls = Nulls.SKIP) public Builder phoneNumbers(Optional> phoneNumbers) { this.phoneNumbers = phoneNumbers; diff --git a/src/main/java/com/merge/api/accounting/types/ContactRequestStatus.java b/src/main/java/com/merge/api/accounting/types/ContactRequestStatus.java new file mode 100644 index 000000000..09b599023 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/ContactRequestStatus.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = ContactRequestStatus.Deserializer.class) +public final class ContactRequestStatus { + private final Object value; + + private final int type; + + private ContactRequestStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((Status7D1Enum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ContactRequestStatus && equalTo((ContactRequestStatus) other); + } + + private boolean equalTo(ContactRequestStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static ContactRequestStatus of(Status7D1Enum value) { + return new ContactRequestStatus(value, 0); + } + + public static ContactRequestStatus of(String value) { + return new ContactRequestStatus(value, 1); + } + + public interface Visitor { + T visit(Status7D1Enum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(ContactRequestStatus.class); + } + + @java.lang.Override + public ContactRequestStatus deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, Status7D1Enum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/ContactStatus.java b/src/main/java/com/merge/api/accounting/types/ContactStatus.java new file mode 100644 index 000000000..86ac199eb --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/ContactStatus.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = ContactStatus.Deserializer.class) +public final class ContactStatus { + private final Object value; + + private final int type; + + private ContactStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((Status7D1Enum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ContactStatus && equalTo((ContactStatus) other); + } + + private boolean equalTo(ContactStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static ContactStatus of(Status7D1Enum value) { + return new ContactStatus(value, 0); + } + + public static ContactStatus of(String value) { + return new ContactStatus(value, 1); + } + + public interface Visitor { + T visit(Status7D1Enum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(ContactStatus.class); + } + + @java.lang.Override + public ContactStatus deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, Status7D1Enum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/ContactsListRequest.java b/src/main/java/com/merge/api/accounting/types/ContactsListRequest.java index c1cc6e056..c87610dc3 100644 --- a/src/main/java/com/merge/api/accounting/types/ContactsListRequest.java +++ b/src/main/java/com/merge/api/accounting/types/ContactsListRequest.java @@ -409,6 +409,9 @@ public Builder from(ContactsListRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -425,6 +428,9 @@ public Builder expand(ContactsListRequestExpandItem expand) { return this; } + /** + *

    If provided, will only return contacts for this company.

    + */ @JsonSetter(value = "company_id", nulls = Nulls.SKIP) public Builder companyId(Optional companyId) { this.companyId = companyId; @@ -436,6 +442,9 @@ public Builder companyId(String companyId) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -447,6 +456,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -458,6 +470,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -469,6 +484,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    If provided, will only return Contacts that match this email.

    + */ @JsonSetter(value = "email_address", nulls = Nulls.SKIP) public Builder emailAddress(Optional emailAddress) { this.emailAddress = emailAddress; @@ -480,6 +498,9 @@ public Builder emailAddress(String emailAddress) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -491,6 +512,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -502,6 +526,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

    + */ @JsonSetter(value = "include_remote_fields", nulls = Nulls.SKIP) public Builder includeRemoteFields(Optional includeRemoteFields) { this.includeRemoteFields = includeRemoteFields; @@ -513,6 +540,9 @@ public Builder includeRemoteFields(Boolean includeRemoteFields) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -524,6 +554,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, will only return Contacts that are denoted as customers.

    + */ @JsonSetter(value = "is_customer", nulls = Nulls.SKIP) public Builder isCustomer(Optional isCustomer) { this.isCustomer = isCustomer; @@ -535,6 +568,9 @@ public Builder isCustomer(String isCustomer) { return this; } + /** + *

    If provided, will only return Contacts that are denoted as suppliers.

    + */ @JsonSetter(value = "is_supplier", nulls = Nulls.SKIP) public Builder isSupplier(Optional isSupplier) { this.isSupplier = isSupplier; @@ -546,6 +582,9 @@ public Builder isSupplier(String isSupplier) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -557,6 +596,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -568,6 +610,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    If provided, will only return Contacts that match this name.

    + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -579,6 +624,9 @@ public Builder name(String name) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -590,6 +638,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    Deprecated. Use show_enum_origins.

    + */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -601,6 +652,9 @@ public Builder remoteFields(String remoteFields) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -612,6 +666,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    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

    + */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; @@ -623,6 +680,9 @@ public Builder showEnumOrigins(String showEnumOrigins) { return this; } + /** + *

    If provided, will only return Contacts that match this status.

    + */ @JsonSetter(value = "status", nulls = Nulls.SKIP) public Builder status(Optional status) { this.status = status; diff --git a/src/main/java/com/merge/api/accounting/types/ContactsRemoteFieldClassesListRequest.java b/src/main/java/com/merge/api/accounting/types/ContactsRemoteFieldClassesListRequest.java index 2f98b6c1b..628a16ad6 100644 --- a/src/main/java/com/merge/api/accounting/types/ContactsRemoteFieldClassesListRequest.java +++ b/src/main/java/com/merge/api/accounting/types/ContactsRemoteFieldClassesListRequest.java @@ -30,6 +30,8 @@ public final class ContactsRemoteFieldClassesListRequest { private final Optional isCommonModelField; + private final Optional isCustom; + private final Optional pageSize; private final Map additionalProperties; @@ -40,6 +42,7 @@ private ContactsRemoteFieldClassesListRequest( Optional includeRemoteData, Optional includeShellData, Optional isCommonModelField, + Optional isCustom, Optional pageSize, Map additionalProperties) { this.cursor = cursor; @@ -47,6 +50,7 @@ private ContactsRemoteFieldClassesListRequest( this.includeRemoteData = includeRemoteData; this.includeShellData = includeShellData; this.isCommonModelField = isCommonModelField; + this.isCustom = isCustom; this.pageSize = pageSize; this.additionalProperties = additionalProperties; } @@ -91,6 +95,14 @@ public Optional getIsCommonModelField() { return isCommonModelField; } + /** + * @return If provided, will only return remote fields classes with this is_custom value + */ + @JsonProperty("is_custom") + public Optional getIsCustom() { + return isCustom; + } + /** * @return Number of results to return per page. */ @@ -117,6 +129,7 @@ private boolean equalTo(ContactsRemoteFieldClassesListRequest other) { && includeRemoteData.equals(other.includeRemoteData) && includeShellData.equals(other.includeShellData) && isCommonModelField.equals(other.isCommonModelField) + && isCustom.equals(other.isCustom) && pageSize.equals(other.pageSize); } @@ -128,6 +141,7 @@ public int hashCode() { this.includeRemoteData, this.includeShellData, this.isCommonModelField, + this.isCustom, this.pageSize); } @@ -152,6 +166,8 @@ public static final class Builder { private Optional isCommonModelField = Optional.empty(); + private Optional isCustom = Optional.empty(); + private Optional pageSize = Optional.empty(); @JsonAnySetter @@ -165,10 +181,14 @@ public Builder from(ContactsRemoteFieldClassesListRequest other) { includeRemoteData(other.getIncludeRemoteData()); includeShellData(other.getIncludeShellData()); isCommonModelField(other.getIsCommonModelField()); + isCustom(other.getIsCustom()); pageSize(other.getPageSize()); return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -180,6 +200,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -191,6 +214,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -202,6 +228,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -213,6 +242,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, will only return remote field classes with this is_common_model_field value

    + */ @JsonSetter(value = "is_common_model_field", nulls = Nulls.SKIP) public Builder isCommonModelField(Optional isCommonModelField) { this.isCommonModelField = isCommonModelField; @@ -224,6 +256,23 @@ public Builder isCommonModelField(Boolean isCommonModelField) { return this; } + /** + *

    If provided, will only return remote fields classes with this is_custom value

    + */ + @JsonSetter(value = "is_custom", nulls = Nulls.SKIP) + public Builder isCustom(Optional isCustom) { + this.isCustom = isCustom; + return this; + } + + public Builder isCustom(Boolean isCustom) { + this.isCustom = Optional.ofNullable(isCustom); + return this; + } + + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -242,6 +291,7 @@ public ContactsRemoteFieldClassesListRequest build() { includeRemoteData, includeShellData, isCommonModelField, + isCustom, pageSize, additionalProperties); } diff --git a/src/main/java/com/merge/api/accounting/types/ContactsRetrieveRequest.java b/src/main/java/com/merge/api/accounting/types/ContactsRetrieveRequest.java index 74cfa0926..995d67fc7 100644 --- a/src/main/java/com/merge/api/accounting/types/ContactsRetrieveRequest.java +++ b/src/main/java/com/merge/api/accounting/types/ContactsRetrieveRequest.java @@ -170,6 +170,9 @@ public Builder from(ContactsRetrieveRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -186,6 +189,9 @@ public Builder expand(ContactsRetrieveRequestExpandItem expand) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -197,6 +203,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

    + */ @JsonSetter(value = "include_remote_fields", nulls = Nulls.SKIP) public Builder includeRemoteFields(Optional includeRemoteFields) { this.includeRemoteFields = includeRemoteFields; @@ -208,6 +217,9 @@ public Builder includeRemoteFields(Boolean includeRemoteFields) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -219,6 +231,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    Deprecated. Use show_enum_origins.

    + */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -230,6 +245,9 @@ public Builder remoteFields(String remoteFields) { return this; } + /** + *

    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

    + */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; diff --git a/src/main/java/com/merge/api/accounting/types/CreateFieldMappingRequest.java b/src/main/java/com/merge/api/accounting/types/CreateFieldMappingRequest.java index 0dfd29e64..9d2fe8d59 100644 --- a/src/main/java/com/merge/api/accounting/types/CreateFieldMappingRequest.java +++ b/src/main/java/com/merge/api/accounting/types/CreateFieldMappingRequest.java @@ -158,34 +158,55 @@ public static TargetFieldNameStage builder() { } public interface TargetFieldNameStage { + /** + * The name of the target field you want this remote field to map to. + */ TargetFieldDescriptionStage targetFieldName(@NotNull String targetFieldName); Builder from(CreateFieldMappingRequest other); } public interface TargetFieldDescriptionStage { + /** + * The description of the target field you want this remote field to map to. + */ RemoteMethodStage targetFieldDescription(@NotNull String targetFieldDescription); } public interface RemoteMethodStage { + /** + * The method of the remote endpoint where the remote field is coming from. + */ RemoteUrlPathStage remoteMethod(@NotNull String remoteMethod); } public interface RemoteUrlPathStage { + /** + * The path of the remote endpoint where the remote field is coming from. + */ CommonModelNameStage remoteUrlPath(@NotNull String remoteUrlPath); } public interface CommonModelNameStage { + /** + * The name of the Common Model that the remote field corresponds to in a given category. + */ _FinalStage commonModelName(@NotNull String commonModelName); } public interface _FinalStage { CreateFieldMappingRequest build(); + /** + *

    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.

    + */ _FinalStage excludeRemoteFieldMetadata(Optional excludeRemoteFieldMetadata); _FinalStage excludeRemoteFieldMetadata(Boolean excludeRemoteFieldMetadata); + /** + *

    The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.

    + */ _FinalStage remoteFieldTraversalPath(List remoteFieldTraversalPath); _FinalStage addRemoteFieldTraversalPath(JsonNode remoteFieldTraversalPath); @@ -233,7 +254,7 @@ public Builder from(CreateFieldMappingRequest other) { } /** - *

    The name of the target field you want this remote field to map to.

    + * The name of the target field you want this remote field to map to.

    The name of the target field you want this remote field to map to.

    * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -244,7 +265,7 @@ public TargetFieldDescriptionStage targetFieldName(@NotNull String targetFieldNa } /** - *

    The description of the target field you want this remote field to map to.

    + * The description of the target field you want this remote field to map to.

    The description of the target field you want this remote field to map to.

    * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -255,7 +276,7 @@ public RemoteMethodStage targetFieldDescription(@NotNull String targetFieldDescr } /** - *

    The method of the remote endpoint where the remote field is coming from.

    + * The method of the remote endpoint where the remote field is coming from.

    The method of the remote endpoint where the remote field is coming from.

    * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -266,7 +287,7 @@ public RemoteUrlPathStage remoteMethod(@NotNull String remoteMethod) { } /** - *

    The path of the remote endpoint where the remote field is coming from.

    + * The path of the remote endpoint where the remote field is coming from.

    The path of the remote endpoint where the remote field is coming from.

    * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -277,7 +298,7 @@ public CommonModelNameStage remoteUrlPath(@NotNull String remoteUrlPath) { } /** - *

    The name of the Common Model that the remote field corresponds to in a given category.

    + * The name of the Common Model that the remote field corresponds to in a given category.

    The name of the Common Model that the remote field corresponds to in a given category.

    * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -307,6 +328,9 @@ public _FinalStage addRemoteFieldTraversalPath(JsonNode remoteFieldTraversalPath return this; } + /** + *

    The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.

    + */ @java.lang.Override @JsonSetter(value = "remote_field_traversal_path", nulls = Nulls.SKIP) public _FinalStage remoteFieldTraversalPath(List remoteFieldTraversalPath) { @@ -325,6 +349,9 @@ public _FinalStage excludeRemoteFieldMetadata(Boolean excludeRemoteFieldMetadata return this; } + /** + *

    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.

    + */ @java.lang.Override @JsonSetter(value = "exclude_remote_field_metadata", nulls = Nulls.SKIP) public _FinalStage excludeRemoteFieldMetadata(Optional excludeRemoteFieldMetadata) { diff --git a/src/main/java/com/merge/api/accounting/types/CreditNote.java b/src/main/java/com/merge/api/accounting/types/CreditNote.java index 1a304dc7f..9d990f8df 100644 --- a/src/main/java/com/merge/api/accounting/types/CreditNote.java +++ b/src/main/java/com/merge/api/accounting/types/CreditNote.java @@ -33,7 +33,7 @@ public final class CreditNote { private final Optional transactionDate; - private final Optional status; + private final Optional status; private final Optional number; @@ -53,7 +53,7 @@ public final class CreditNote { private final Optional>> trackingCategories; - private final Optional currency; + private final Optional currency; private final Optional remoteCreatedAt; @@ -81,7 +81,7 @@ private CreditNote( Optional createdAt, Optional modifiedAt, Optional transactionDate, - Optional status, + Optional status, Optional number, Optional contact, Optional company, @@ -91,7 +91,7 @@ private CreditNote( Optional inclusiveOfTax, Optional> lineItems, Optional>> trackingCategories, - Optional currency, + Optional currency, Optional remoteCreatedAt, Optional remoteUpdatedAt, Optional>> payments, @@ -176,7 +176,7 @@ public Optional getTransactionDate() { * */ @JsonProperty("status") - public Optional getStatus() { + public Optional getStatus() { return status; } @@ -558,7 +558,7 @@ public Optional>> getTrackingCat * */ @JsonProperty("currency") - public Optional getCurrency() { + public Optional getCurrency() { return currency; } @@ -718,7 +718,7 @@ public static final class Builder { private Optional transactionDate = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Optional number = Optional.empty(); @@ -738,7 +738,7 @@ public static final class Builder { private Optional>> trackingCategories = Optional.empty(); - private Optional currency = Optional.empty(); + private Optional currency = Optional.empty(); private Optional remoteCreatedAt = Optional.empty(); @@ -803,6 +803,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -814,6 +817,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -825,6 +831,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -836,6 +845,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The credit note's transaction date.

    + */ @JsonSetter(value = "transaction_date", nulls = Nulls.SKIP) public Builder transactionDate(Optional transactionDate) { this.transactionDate = transactionDate; @@ -847,17 +859,28 @@ public Builder transactionDate(OffsetDateTime transactionDate) { return this; } + /** + *

    The credit note's status.

    + *
      + *
    • SUBMITTED - SUBMITTED
    • + *
    • AUTHORIZED - AUTHORIZED
    • + *
    • PAID - PAID
    • + *
    + */ @JsonSetter(value = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { + public Builder status(Optional status) { this.status = status; return this; } - public Builder status(CreditNoteStatusEnum status) { + public Builder status(CreditNoteStatus status) { this.status = Optional.ofNullable(status); return this; } + /** + *

    The credit note's number.

    + */ @JsonSetter(value = "number", nulls = Nulls.SKIP) public Builder number(Optional number) { this.number = number; @@ -869,6 +892,9 @@ public Builder number(String number) { return this; } + /** + *

    The credit note's contact.

    + */ @JsonSetter(value = "contact", nulls = Nulls.SKIP) public Builder contact(Optional contact) { this.contact = contact; @@ -880,6 +906,9 @@ public Builder contact(CreditNoteContact contact) { return this; } + /** + *

    The company the credit note belongs to.

    + */ @JsonSetter(value = "company", nulls = Nulls.SKIP) public Builder company(Optional company) { this.company = company; @@ -891,6 +920,9 @@ public Builder company(CreditNoteCompany company) { return this; } + /** + *

    The credit note's exchange rate.

    + */ @JsonSetter(value = "exchange_rate", nulls = Nulls.SKIP) public Builder exchangeRate(Optional exchangeRate) { this.exchangeRate = exchangeRate; @@ -902,6 +934,9 @@ public Builder exchangeRate(String exchangeRate) { return this; } + /** + *

    The credit note's total amount.

    + */ @JsonSetter(value = "total_amount", nulls = Nulls.SKIP) public Builder totalAmount(Optional totalAmount) { this.totalAmount = totalAmount; @@ -913,6 +948,9 @@ public Builder totalAmount(Double totalAmount) { return this; } + /** + *

    The amount of value remaining in the credit note that the customer can use.

    + */ @JsonSetter(value = "remaining_credit", nulls = Nulls.SKIP) public Builder remainingCredit(Optional remainingCredit) { this.remainingCredit = remainingCredit; @@ -924,6 +962,9 @@ public Builder remainingCredit(Double remainingCredit) { return this; } + /** + *

    If the transaction is inclusive or exclusive of tax. True if inclusive, False if exclusive.

    + */ @JsonSetter(value = "inclusive_of_tax", nulls = Nulls.SKIP) public Builder inclusiveOfTax(Optional inclusiveOfTax) { this.inclusiveOfTax = inclusiveOfTax; @@ -958,17 +999,331 @@ public Builder trackingCategories(ListThe credit note's currency.

    + *
      + *
    • XUA - ADB Unit of Account
    • + *
    • AFN - Afghan Afghani
    • + *
    • AFA - Afghan Afghani (1927–2002)
    • + *
    • ALL - Albanian Lek
    • + *
    • ALK - Albanian Lek (1946–1965)
    • + *
    • DZD - Algerian Dinar
    • + *
    • ADP - Andorran Peseta
    • + *
    • AOA - Angolan Kwanza
    • + *
    • AOK - Angolan Kwanza (1977–1991)
    • + *
    • AON - Angolan New Kwanza (1990–2000)
    • + *
    • AOR - Angolan Readjusted Kwanza (1995–1999)
    • + *
    • ARA - Argentine Austral
    • + *
    • ARS - Argentine Peso
    • + *
    • ARM - Argentine Peso (1881–1970)
    • + *
    • ARP - Argentine Peso (1983–1985)
    • + *
    • ARL - Argentine Peso Ley (1970–1983)
    • + *
    • AMD - Armenian Dram
    • + *
    • AWG - Aruban Florin
    • + *
    • AUD - Australian Dollar
    • + *
    • ATS - Austrian Schilling
    • + *
    • AZN - Azerbaijani Manat
    • + *
    • AZM - Azerbaijani Manat (1993–2006)
    • + *
    • BSD - Bahamian Dollar
    • + *
    • BHD - Bahraini Dinar
    • + *
    • BDT - Bangladeshi Taka
    • + *
    • BBD - Barbadian Dollar
    • + *
    • BYN - Belarusian Ruble
    • + *
    • BYB - Belarusian Ruble (1994–1999)
    • + *
    • BYR - Belarusian Ruble (2000–2016)
    • + *
    • BEF - Belgian Franc
    • + *
    • BEC - Belgian Franc (convertible)
    • + *
    • BEL - Belgian Franc (financial)
    • + *
    • BZD - Belize Dollar
    • + *
    • BMD - Bermudan Dollar
    • + *
    • BTN - Bhutanese Ngultrum
    • + *
    • BOB - Bolivian Boliviano
    • + *
    • BOL - Bolivian Boliviano (1863–1963)
    • + *
    • BOV - Bolivian Mvdol
    • + *
    • BOP - Bolivian Peso
    • + *
    • BAM - Bosnia-Herzegovina Convertible Mark
    • + *
    • BAD - Bosnia-Herzegovina Dinar (1992–1994)
    • + *
    • BAN - Bosnia-Herzegovina New Dinar (1994–1997)
    • + *
    • BWP - Botswanan Pula
    • + *
    • BRC - Brazilian Cruzado (1986–1989)
    • + *
    • BRZ - Brazilian Cruzeiro (1942–1967)
    • + *
    • BRE - Brazilian Cruzeiro (1990–1993)
    • + *
    • BRR - Brazilian Cruzeiro (1993–1994)
    • + *
    • BRN - Brazilian New Cruzado (1989–1990)
    • + *
    • BRB - Brazilian New Cruzeiro (1967–1986)
    • + *
    • BRL - Brazilian Real
    • + *
    • GBP - British Pound
    • + *
    • BND - Brunei Dollar
    • + *
    • BGL - Bulgarian Hard Lev
    • + *
    • BGN - Bulgarian Lev
    • + *
    • BGO - Bulgarian Lev (1879–1952)
    • + *
    • BGM - Bulgarian Socialist Lev
    • + *
    • BUK - Burmese Kyat
    • + *
    • BIF - Burundian Franc
    • + *
    • XPF - CFP Franc
    • + *
    • KHR - Cambodian Riel
    • + *
    • CAD - Canadian Dollar
    • + *
    • CVE - Cape Verdean Escudo
    • + *
    • KYD - Cayman Islands Dollar
    • + *
    • XAF - Central African CFA Franc
    • + *
    • CLE - Chilean Escudo
    • + *
    • CLP - Chilean Peso
    • + *
    • CLF - Chilean Unit of Account (UF)
    • + *
    • CNX - Chinese People’s Bank Dollar
    • + *
    • CNY - Chinese Yuan
    • + *
    • CNH - Chinese Yuan (offshore)
    • + *
    • COP - Colombian Peso
    • + *
    • COU - Colombian Real Value Unit
    • + *
    • KMF - Comorian Franc
    • + *
    • CDF - Congolese Franc
    • + *
    • CRC - Costa Rican Colón
    • + *
    • HRD - Croatian Dinar
    • + *
    • HRK - Croatian Kuna
    • + *
    • CUC - Cuban Convertible Peso
    • + *
    • CUP - Cuban Peso
    • + *
    • CYP - Cypriot Pound
    • + *
    • CZK - Czech Koruna
    • + *
    • CSK - Czechoslovak Hard Koruna
    • + *
    • DKK - Danish Krone
    • + *
    • DJF - Djiboutian Franc
    • + *
    • DOP - Dominican Peso
    • + *
    • NLG - Dutch Guilder
    • + *
    • XCD - East Caribbean Dollar
    • + *
    • DDM - East German Mark
    • + *
    • ECS - Ecuadorian Sucre
    • + *
    • ECV - Ecuadorian Unit of Constant Value
    • + *
    • EGP - Egyptian Pound
    • + *
    • GQE - Equatorial Guinean Ekwele
    • + *
    • ERN - Eritrean Nakfa
    • + *
    • EEK - Estonian Kroon
    • + *
    • ETB - Ethiopian Birr
    • + *
    • EUR - Euro
    • + *
    • XBA - European Composite Unit
    • + *
    • XEU - European Currency Unit
    • + *
    • XBB - European Monetary Unit
    • + *
    • XBC - European Unit of Account (XBC)
    • + *
    • XBD - European Unit of Account (XBD)
    • + *
    • FKP - Falkland Islands Pound
    • + *
    • FJD - Fijian Dollar
    • + *
    • FIM - Finnish Markka
    • + *
    • FRF - French Franc
    • + *
    • XFO - French Gold Franc
    • + *
    • XFU - French UIC-Franc
    • + *
    • GMD - Gambian Dalasi
    • + *
    • GEK - Georgian Kupon Larit
    • + *
    • GEL - Georgian Lari
    • + *
    • DEM - German Mark
    • + *
    • GHS - Ghanaian Cedi
    • + *
    • GHC - Ghanaian Cedi (1979–2007)
    • + *
    • GIP - Gibraltar Pound
    • + *
    • XAU - Gold
    • + *
    • GRD - Greek Drachma
    • + *
    • GTQ - Guatemalan Quetzal
    • + *
    • GWP - Guinea-Bissau Peso
    • + *
    • GNF - Guinean Franc
    • + *
    • GNS - Guinean Syli
    • + *
    • GYD - Guyanaese Dollar
    • + *
    • HTG - Haitian Gourde
    • + *
    • HNL - Honduran Lempira
    • + *
    • HKD - Hong Kong Dollar
    • + *
    • HUF - Hungarian Forint
    • + *
    • IMP - IMP
    • + *
    • ISK - Icelandic Króna
    • + *
    • ISJ - Icelandic Króna (1918–1981)
    • + *
    • INR - Indian Rupee
    • + *
    • IDR - Indonesian Rupiah
    • + *
    • IRR - Iranian Rial
    • + *
    • IQD - Iraqi Dinar
    • + *
    • IEP - Irish Pound
    • + *
    • ILS - Israeli New Shekel
    • + *
    • ILP - Israeli Pound
    • + *
    • ILR - Israeli Shekel (1980–1985)
    • + *
    • ITL - Italian Lira
    • + *
    • JMD - Jamaican Dollar
    • + *
    • JPY - Japanese Yen
    • + *
    • JOD - Jordanian Dinar
    • + *
    • KZT - Kazakhstani Tenge
    • + *
    • KES - Kenyan Shilling
    • + *
    • KWD - Kuwaiti Dinar
    • + *
    • KGS - Kyrgystani Som
    • + *
    • LAK - Laotian Kip
    • + *
    • LVL - Latvian Lats
    • + *
    • LVR - Latvian Ruble
    • + *
    • LBP - Lebanese Pound
    • + *
    • LSL - Lesotho Loti
    • + *
    • LRD - Liberian Dollar
    • + *
    • LYD - Libyan Dinar
    • + *
    • LTL - Lithuanian Litas
    • + *
    • LTT - Lithuanian Talonas
    • + *
    • LUL - Luxembourg Financial Franc
    • + *
    • LUC - Luxembourgian Convertible Franc
    • + *
    • LUF - Luxembourgian Franc
    • + *
    • MOP - Macanese Pataca
    • + *
    • MKD - Macedonian Denar
    • + *
    • MKN - Macedonian Denar (1992–1993)
    • + *
    • MGA - Malagasy Ariary
    • + *
    • MGF - Malagasy Franc
    • + *
    • MWK - Malawian Kwacha
    • + *
    • MYR - Malaysian Ringgit
    • + *
    • MVR - Maldivian Rufiyaa
    • + *
    • MVP - Maldivian Rupee (1947–1981)
    • + *
    • MLF - Malian Franc
    • + *
    • MTL - Maltese Lira
    • + *
    • MTP - Maltese Pound
    • + *
    • MRU - Mauritanian Ouguiya
    • + *
    • MRO - Mauritanian Ouguiya (1973–2017)
    • + *
    • MUR - Mauritian Rupee
    • + *
    • MXV - Mexican Investment Unit
    • + *
    • MXN - Mexican Peso
    • + *
    • MXP - Mexican Silver Peso (1861–1992)
    • + *
    • MDC - Moldovan Cupon
    • + *
    • MDL - Moldovan Leu
    • + *
    • MCF - Monegasque Franc
    • + *
    • MNT - Mongolian Tugrik
    • + *
    • MAD - Moroccan Dirham
    • + *
    • MAF - Moroccan Franc
    • + *
    • MZE - Mozambican Escudo
    • + *
    • MZN - Mozambican Metical
    • + *
    • MZM - Mozambican Metical (1980–2006)
    • + *
    • MMK - Myanmar Kyat
    • + *
    • NAD - Namibian Dollar
    • + *
    • NPR - Nepalese Rupee
    • + *
    • ANG - Netherlands Antillean Guilder
    • + *
    • TWD - New Taiwan Dollar
    • + *
    • NZD - New Zealand Dollar
    • + *
    • NIO - Nicaraguan Córdoba
    • + *
    • NIC - Nicaraguan Córdoba (1988–1991)
    • + *
    • NGN - Nigerian Naira
    • + *
    • KPW - North Korean Won
    • + *
    • NOK - Norwegian Krone
    • + *
    • OMR - Omani Rial
    • + *
    • PKR - Pakistani Rupee
    • + *
    • XPD - Palladium
    • + *
    • PAB - Panamanian Balboa
    • + *
    • PGK - Papua New Guinean Kina
    • + *
    • PYG - Paraguayan Guarani
    • + *
    • PEI - Peruvian Inti
    • + *
    • PEN - Peruvian Sol
    • + *
    • PES - Peruvian Sol (1863–1965)
    • + *
    • PHP - Philippine Peso
    • + *
    • XPT - Platinum
    • + *
    • PLN - Polish Zloty
    • + *
    • PLZ - Polish Zloty (1950–1995)
    • + *
    • PTE - Portuguese Escudo
    • + *
    • GWE - Portuguese Guinea Escudo
    • + *
    • QAR - Qatari Rial
    • + *
    • XRE - RINET Funds
    • + *
    • RHD - Rhodesian Dollar
    • + *
    • RON - Romanian Leu
    • + *
    • ROL - Romanian Leu (1952–2006)
    • + *
    • RUB - Russian Ruble
    • + *
    • RUR - Russian Ruble (1991–1998)
    • + *
    • RWF - Rwandan Franc
    • + *
    • SVC - Salvadoran Colón
    • + *
    • WST - Samoan Tala
    • + *
    • SAR - Saudi Riyal
    • + *
    • RSD - Serbian Dinar
    • + *
    • CSD - Serbian Dinar (2002–2006)
    • + *
    • SCR - Seychellois Rupee
    • + *
    • SLL - Sierra Leonean Leone
    • + *
    • XAG - Silver
    • + *
    • SGD - Singapore Dollar
    • + *
    • SKK - Slovak Koruna
    • + *
    • SIT - Slovenian Tolar
    • + *
    • SBD - Solomon Islands Dollar
    • + *
    • SOS - Somali Shilling
    • + *
    • ZAR - South African Rand
    • + *
    • ZAL - South African Rand (financial)
    • + *
    • KRH - South Korean Hwan (1953–1962)
    • + *
    • KRW - South Korean Won
    • + *
    • KRO - South Korean Won (1945–1953)
    • + *
    • SSP - South Sudanese Pound
    • + *
    • SUR - Soviet Rouble
    • + *
    • ESP - Spanish Peseta
    • + *
    • ESA - Spanish Peseta (A account)
    • + *
    • ESB - Spanish Peseta (convertible account)
    • + *
    • XDR - Special Drawing Rights
    • + *
    • LKR - Sri Lankan Rupee
    • + *
    • SHP - St. Helena Pound
    • + *
    • XSU - Sucre
    • + *
    • SDD - Sudanese Dinar (1992–2007)
    • + *
    • SDG - Sudanese Pound
    • + *
    • SDP - Sudanese Pound (1957–1998)
    • + *
    • SRD - Surinamese Dollar
    • + *
    • SRG - Surinamese Guilder
    • + *
    • SZL - Swazi Lilangeni
    • + *
    • SEK - Swedish Krona
    • + *
    • CHF - Swiss Franc
    • + *
    • SYP - Syrian Pound
    • + *
    • STN - São Tomé & Príncipe Dobra
    • + *
    • STD - São Tomé & Príncipe Dobra (1977–2017)
    • + *
    • TVD - TVD
    • + *
    • TJR - Tajikistani Ruble
    • + *
    • TJS - Tajikistani Somoni
    • + *
    • TZS - Tanzanian Shilling
    • + *
    • XTS - Testing Currency Code
    • + *
    • THB - Thai Baht
    • + *
    • XXX - The codes assigned for transactions where no currency is involved
    • + *
    • TPE - Timorese Escudo
    • + *
    • TOP - Tongan Paʻanga
    • + *
    • TTD - Trinidad & Tobago Dollar
    • + *
    • TND - Tunisian Dinar
    • + *
    • TRY - Turkish Lira
    • + *
    • TRL - Turkish Lira (1922–2005)
    • + *
    • TMT - Turkmenistani Manat
    • + *
    • TMM - Turkmenistani Manat (1993–2009)
    • + *
    • USD - US Dollar
    • + *
    • USN - US Dollar (Next day)
    • + *
    • USS - US Dollar (Same day)
    • + *
    • UGX - Ugandan Shilling
    • + *
    • UGS - Ugandan Shilling (1966–1987)
    • + *
    • UAH - Ukrainian Hryvnia
    • + *
    • UAK - Ukrainian Karbovanets
    • + *
    • AED - United Arab Emirates Dirham
    • + *
    • UYW - Uruguayan Nominal Wage Index Unit
    • + *
    • UYU - Uruguayan Peso
    • + *
    • UYP - Uruguayan Peso (1975–1993)
    • + *
    • UYI - Uruguayan Peso (Indexed Units)
    • + *
    • UZS - Uzbekistani Som
    • + *
    • VUV - Vanuatu Vatu
    • + *
    • VES - Venezuelan Bolívar
    • + *
    • VEB - Venezuelan Bolívar (1871–2008)
    • + *
    • VEF - Venezuelan Bolívar (2008–2018)
    • + *
    • VND - Vietnamese Dong
    • + *
    • VNN - Vietnamese Dong (1978–1985)
    • + *
    • CHE - WIR Euro
    • + *
    • CHW - WIR Franc
    • + *
    • XOF - West African CFA Franc
    • + *
    • YDD - Yemeni Dinar
    • + *
    • YER - Yemeni Rial
    • + *
    • YUN - Yugoslavian Convertible Dinar (1990–1992)
    • + *
    • YUD - Yugoslavian Hard Dinar (1966–1990)
    • + *
    • YUM - Yugoslavian New Dinar (1994–2002)
    • + *
    • YUR - Yugoslavian Reformed Dinar (1992–1993)
    • + *
    • ZWN - ZWN
    • + *
    • ZRN - Zairean New Zaire (1993–1998)
    • + *
    • ZRZ - Zairean Zaire (1971–1993)
    • + *
    • ZMW - Zambian Kwacha
    • + *
    • ZMK - Zambian Kwacha (1968–2012)
    • + *
    • ZWD - Zimbabwean Dollar (1980–2008)
    • + *
    • ZWR - Zimbabwean Dollar (2008)
    • + *
    • ZWL - Zimbabwean Dollar (2009)
    • + *
    + */ @JsonSetter(value = "currency", nulls = Nulls.SKIP) - public Builder currency(Optional currency) { + public Builder currency(Optional currency) { this.currency = currency; return this; } - public Builder currency(TransactionCurrencyEnum currency) { + public Builder currency(CreditNoteCurrency currency) { this.currency = Optional.ofNullable(currency); return this; } + /** + *

    When the third party's credit note was created.

    + */ @JsonSetter(value = "remote_created_at", nulls = Nulls.SKIP) public Builder remoteCreatedAt(Optional remoteCreatedAt) { this.remoteCreatedAt = remoteCreatedAt; @@ -980,6 +1335,9 @@ public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { return this; } + /** + *

    When the third party's credit note was updated.

    + */ @JsonSetter(value = "remote_updated_at", nulls = Nulls.SKIP) public Builder remoteUpdatedAt(Optional remoteUpdatedAt) { this.remoteUpdatedAt = remoteUpdatedAt; @@ -991,6 +1349,9 @@ public Builder remoteUpdatedAt(OffsetDateTime remoteUpdatedAt) { return this; } + /** + *

    Array of Payment object IDs

    + */ @JsonSetter(value = "payments", nulls = Nulls.SKIP) public Builder payments(Optional>> payments) { this.payments = payments; @@ -1002,6 +1363,9 @@ public Builder payments(List> payments) { return this; } + /** + *

    A list of the Payment Applied to Lines common models related to a given Invoice, Credit Note, or Journal Entry.

    + */ @JsonSetter(value = "applied_payments", nulls = Nulls.SKIP) public Builder appliedPayments(Optional>> appliedPayments) { this.appliedPayments = appliedPayments; @@ -1013,6 +1377,9 @@ public Builder appliedPayments(List> app return this; } + /** + *

    The accounting period that the CreditNote was generated in.

    + */ @JsonSetter(value = "accounting_period", nulls = Nulls.SKIP) public Builder accountingPeriod(Optional accountingPeriod) { this.accountingPeriod = accountingPeriod; @@ -1024,6 +1391,9 @@ public Builder accountingPeriod(CreditNoteAccountingPeriod accountingPeriod) { return this; } + /** + *

    A list of the CreditNote Applied to Lines common models related to a given Credit Note

    + */ @JsonSetter(value = "applied_to_lines", nulls = Nulls.SKIP) public Builder appliedToLines(Optional> appliedToLines) { this.appliedToLines = appliedToLines; @@ -1035,6 +1405,9 @@ public Builder appliedToLines(List appliedToLi return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/accounting/types/CreditNoteApplyLineForCreditNote.java b/src/main/java/com/merge/api/accounting/types/CreditNoteApplyLineForCreditNote.java index 665fe545a..23fa7d11e 100644 --- a/src/main/java/com/merge/api/accounting/types/CreditNoteApplyLineForCreditNote.java +++ b/src/main/java/com/merge/api/accounting/types/CreditNoteApplyLineForCreditNote.java @@ -183,6 +183,9 @@ public Builder from(CreditNoteApplyLineForCreditNote other) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -194,6 +197,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -205,6 +211,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -227,6 +236,9 @@ public Builder invoice(CreditNoteApplyLineForCreditNoteInvoice invoice) { return this; } + /** + *

    Date that the credit note is applied to the invoice.

    + */ @JsonSetter(value = "applied_date", nulls = Nulls.SKIP) public Builder appliedDate(Optional appliedDate) { this.appliedDate = appliedDate; @@ -238,6 +250,9 @@ public Builder appliedDate(OffsetDateTime appliedDate) { return this; } + /** + *

    The amount of the Credit Note applied to the invoice.

    + */ @JsonSetter(value = "applied_amount", nulls = Nulls.SKIP) public Builder appliedAmount(Optional appliedAmount) { this.appliedAmount = appliedAmount; @@ -249,6 +264,9 @@ public Builder appliedAmount(String appliedAmount) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/accounting/types/CreditNoteApplyLineForCreditNoteRequest.java b/src/main/java/com/merge/api/accounting/types/CreditNoteApplyLineForCreditNoteRequest.java index 719aafd36..f256595b0 100644 --- a/src/main/java/com/merge/api/accounting/types/CreditNoteApplyLineForCreditNoteRequest.java +++ b/src/main/java/com/merge/api/accounting/types/CreditNoteApplyLineForCreditNoteRequest.java @@ -162,6 +162,9 @@ public Builder from(CreditNoteApplyLineForCreditNoteRequest other) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -184,6 +187,9 @@ public Builder invoice(CreditNoteApplyLineForCreditNoteRequestInvoice invoice) { return this; } + /** + *

    Date that the credit note is applied to the invoice.

    + */ @JsonSetter(value = "applied_date", nulls = Nulls.SKIP) public Builder appliedDate(Optional appliedDate) { this.appliedDate = appliedDate; @@ -195,6 +201,9 @@ public Builder appliedDate(OffsetDateTime appliedDate) { return this; } + /** + *

    The amount of the Credit Note applied to the invoice.

    + */ @JsonSetter(value = "applied_amount", nulls = Nulls.SKIP) public Builder appliedAmount(Optional appliedAmount) { this.appliedAmount = appliedAmount; diff --git a/src/main/java/com/merge/api/accounting/types/CreditNoteApplyLineForInvoice.java b/src/main/java/com/merge/api/accounting/types/CreditNoteApplyLineForInvoice.java index 4dfb677cd..7b6228362 100644 --- a/src/main/java/com/merge/api/accounting/types/CreditNoteApplyLineForInvoice.java +++ b/src/main/java/com/merge/api/accounting/types/CreditNoteApplyLineForInvoice.java @@ -183,6 +183,9 @@ public Builder from(CreditNoteApplyLineForInvoice other) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -194,6 +197,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -205,6 +211,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -227,6 +236,9 @@ public Builder creditNote(CreditNoteApplyLineForInvoiceCreditNote creditNote) { return this; } + /** + *

    Date that the credit note is applied to the invoice.

    + */ @JsonSetter(value = "applied_date", nulls = Nulls.SKIP) public Builder appliedDate(Optional appliedDate) { this.appliedDate = appliedDate; @@ -238,6 +250,9 @@ public Builder appliedDate(OffsetDateTime appliedDate) { return this; } + /** + *

    The amount of the Credit Note applied to the invoice.

    + */ @JsonSetter(value = "applied_amount", nulls = Nulls.SKIP) public Builder appliedAmount(Optional appliedAmount) { this.appliedAmount = appliedAmount; @@ -249,6 +264,9 @@ public Builder appliedAmount(String appliedAmount) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/accounting/types/CreditNoteCurrency.java b/src/main/java/com/merge/api/accounting/types/CreditNoteCurrency.java new file mode 100644 index 000000000..11ad73567 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/CreditNoteCurrency.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = CreditNoteCurrency.Deserializer.class) +public final class CreditNoteCurrency { + private final Object value; + + private final int type; + + private CreditNoteCurrency(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((TransactionCurrencyEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof CreditNoteCurrency && equalTo((CreditNoteCurrency) other); + } + + private boolean equalTo(CreditNoteCurrency other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static CreditNoteCurrency of(TransactionCurrencyEnum value) { + return new CreditNoteCurrency(value, 0); + } + + public static CreditNoteCurrency of(String value) { + return new CreditNoteCurrency(value, 1); + } + + public interface Visitor { + T visit(TransactionCurrencyEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(CreditNoteCurrency.class); + } + + @java.lang.Override + public CreditNoteCurrency deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TransactionCurrencyEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/CreditNoteEndpointRequest.java b/src/main/java/com/merge/api/accounting/types/CreditNoteEndpointRequest.java index f7e405ca6..99cc332f1 100644 --- a/src/main/java/com/merge/api/accounting/types/CreditNoteEndpointRequest.java +++ b/src/main/java/com/merge/api/accounting/types/CreditNoteEndpointRequest.java @@ -99,10 +99,16 @@ public interface ModelStage { public interface _FinalStage { CreditNoteEndpointRequest build(); + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ _FinalStage isDebugMode(Optional isDebugMode); _FinalStage isDebugMode(Boolean isDebugMode); + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ _FinalStage runAsync(Optional runAsync); _FinalStage runAsync(Boolean runAsync); @@ -146,6 +152,9 @@ public _FinalStage runAsync(Boolean runAsync) { return this; } + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ @java.lang.Override @JsonSetter(value = "run_async", nulls = Nulls.SKIP) public _FinalStage runAsync(Optional runAsync) { @@ -163,6 +172,9 @@ public _FinalStage isDebugMode(Boolean isDebugMode) { return this; } + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ @java.lang.Override @JsonSetter(value = "is_debug_mode", nulls = Nulls.SKIP) public _FinalStage isDebugMode(Optional isDebugMode) { diff --git a/src/main/java/com/merge/api/accounting/types/CreditNoteLineItem.java b/src/main/java/com/merge/api/accounting/types/CreditNoteLineItem.java index 285a81daa..d189295d6 100644 --- a/src/main/java/com/merge/api/accounting/types/CreditNoteLineItem.java +++ b/src/main/java/com/merge/api/accounting/types/CreditNoteLineItem.java @@ -54,6 +54,10 @@ public final class CreditNoteLineItem { private final Optional company; + private final Optional contact; + + private final Optional project; + private final Optional remoteWasDeleted; private final Map additionalProperties; @@ -75,6 +79,8 @@ private CreditNoteLineItem( Optional>> trackingCategories, Optional account, Optional company, + Optional contact, + Optional project, Optional remoteWasDeleted, Map additionalProperties) { this.id = id; @@ -93,6 +99,8 @@ private CreditNoteLineItem( this.trackingCategories = trackingCategories; this.account = account; this.company = company; + this.contact = contact; + this.project = project; this.remoteWasDeleted = remoteWasDeleted; this.additionalProperties = additionalProperties; } @@ -219,6 +227,19 @@ public Optional getCompany() { return company; } + /** + * @return The credit note's contact. + */ + @JsonProperty("contact") + public Optional getContact() { + return contact; + } + + @JsonProperty("project") + public Optional getProject() { + return project; + } + /** * @return 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. */ @@ -255,6 +276,8 @@ private boolean equalTo(CreditNoteLineItem other) { && trackingCategories.equals(other.trackingCategories) && account.equals(other.account) && company.equals(other.company) + && contact.equals(other.contact) + && project.equals(other.project) && remoteWasDeleted.equals(other.remoteWasDeleted); } @@ -277,6 +300,8 @@ public int hashCode() { this.trackingCategories, this.account, this.company, + this.contact, + this.project, this.remoteWasDeleted); } @@ -323,6 +348,10 @@ public static final class Builder { private Optional company = Optional.empty(); + private Optional contact = Optional.empty(); + + private Optional project = Optional.empty(); + private Optional remoteWasDeleted = Optional.empty(); @JsonAnySetter @@ -347,6 +376,8 @@ public Builder from(CreditNoteLineItem other) { trackingCategories(other.getTrackingCategories()); account(other.getAccount()); company(other.getCompany()); + contact(other.getContact()); + project(other.getProject()); remoteWasDeleted(other.getRemoteWasDeleted()); return this; } @@ -362,6 +393,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -373,6 +407,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -384,6 +421,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -406,6 +446,9 @@ public Builder item(CreditNoteLineItemItem item) { return this; } + /** + *

    The credit note line item's name.

    + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -417,6 +460,9 @@ public Builder name(String name) { return this; } + /** + *

    The description of the item that is owed.

    + */ @JsonSetter(value = "description", nulls = Nulls.SKIP) public Builder description(Optional description) { this.description = description; @@ -428,6 +474,9 @@ public Builder description(String description) { return this; } + /** + *

    The credit note line item's quantity.

    + */ @JsonSetter(value = "quantity", nulls = Nulls.SKIP) public Builder quantity(Optional quantity) { this.quantity = quantity; @@ -439,6 +488,9 @@ public Builder quantity(String quantity) { return this; } + /** + *

    The credit note line item's memo.

    + */ @JsonSetter(value = "memo", nulls = Nulls.SKIP) public Builder memo(Optional memo) { this.memo = memo; @@ -450,6 +502,9 @@ public Builder memo(String memo) { return this; } + /** + *

    The credit note line item's unit price.

    + */ @JsonSetter(value = "unit_price", nulls = Nulls.SKIP) public Builder unitPrice(Optional unitPrice) { this.unitPrice = unitPrice; @@ -461,6 +516,9 @@ public Builder unitPrice(String unitPrice) { return this; } + /** + *

    The tax rate that applies to this line item.

    + */ @JsonSetter(value = "tax_rate", nulls = Nulls.SKIP) public Builder taxRate(Optional taxRate) { this.taxRate = taxRate; @@ -472,6 +530,9 @@ public Builder taxRate(String taxRate) { return this; } + /** + *

    The credit note line item's total.

    + */ @JsonSetter(value = "total_line_amount", nulls = Nulls.SKIP) public Builder totalLineAmount(Optional totalLineAmount) { this.totalLineAmount = totalLineAmount; @@ -483,6 +544,9 @@ public Builder totalLineAmount(String totalLineAmount) { return this; } + /** + *

    The credit note line item's associated tracking category.

    + */ @JsonSetter(value = "tracking_category", nulls = Nulls.SKIP) public Builder trackingCategory(Optional trackingCategory) { this.trackingCategory = trackingCategory; @@ -494,6 +558,9 @@ public Builder trackingCategory(String trackingCategory) { return this; } + /** + *

    The credit note line item's associated tracking categories.

    + */ @JsonSetter(value = "tracking_categories", nulls = Nulls.SKIP) public Builder trackingCategories(Optional>> trackingCategories) { this.trackingCategories = trackingCategories; @@ -505,6 +572,9 @@ public Builder trackingCategories(List> trackingCategories) { return this; } + /** + *

    The credit note line item's account.

    + */ @JsonSetter(value = "account", nulls = Nulls.SKIP) public Builder account(Optional account) { this.account = account; @@ -516,6 +586,9 @@ public Builder account(String account) { return this; } + /** + *

    The company the credit note belongs to.

    + */ @JsonSetter(value = "company", nulls = Nulls.SKIP) public Builder company(Optional company) { this.company = company; @@ -527,6 +600,34 @@ public Builder company(CreditNoteLineItemCompany company) { return this; } + /** + *

    The credit note's contact.

    + */ + @JsonSetter(value = "contact", nulls = Nulls.SKIP) + public Builder contact(Optional contact) { + this.contact = contact; + return this; + } + + public Builder contact(CreditNoteLineItemContact contact) { + this.contact = Optional.ofNullable(contact); + return this; + } + + @JsonSetter(value = "project", nulls = Nulls.SKIP) + public Builder project(Optional project) { + this.project = project; + return this; + } + + public Builder project(CreditNoteLineItemProject project) { + this.project = Optional.ofNullable(project); + return this; + } + + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; @@ -556,6 +657,8 @@ public CreditNoteLineItem build() { trackingCategories, account, company, + contact, + project, remoteWasDeleted, additionalProperties); } diff --git a/src/main/java/com/merge/api/accounting/types/CreditNoteLineItemContact.java b/src/main/java/com/merge/api/accounting/types/CreditNoteLineItemContact.java new file mode 100644 index 000000000..c844a4745 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/CreditNoteLineItemContact.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = CreditNoteLineItemContact.Deserializer.class) +public final class CreditNoteLineItemContact { + private final Object value; + + private final int type; + + private CreditNoteLineItemContact(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((Contact) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof CreditNoteLineItemContact && equalTo((CreditNoteLineItemContact) other); + } + + private boolean equalTo(CreditNoteLineItemContact other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static CreditNoteLineItemContact of(String value) { + return new CreditNoteLineItemContact(value, 0); + } + + public static CreditNoteLineItemContact of(Contact value) { + return new CreditNoteLineItemContact(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(Contact value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(CreditNoteLineItemContact.class); + } + + @java.lang.Override + public CreditNoteLineItemContact deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, Contact.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/CreditNoteLineItemProject.java b/src/main/java/com/merge/api/accounting/types/CreditNoteLineItemProject.java new file mode 100644 index 000000000..fe0ddeb6b --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/CreditNoteLineItemProject.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = CreditNoteLineItemProject.Deserializer.class) +public final class CreditNoteLineItemProject { + private final Object value; + + private final int type; + + private CreditNoteLineItemProject(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((Project) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof CreditNoteLineItemProject && equalTo((CreditNoteLineItemProject) other); + } + + private boolean equalTo(CreditNoteLineItemProject other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static CreditNoteLineItemProject of(String value) { + return new CreditNoteLineItemProject(value, 0); + } + + public static CreditNoteLineItemProject of(Project value) { + return new CreditNoteLineItemProject(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(Project value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(CreditNoteLineItemProject.class); + } + + @java.lang.Override + public CreditNoteLineItemProject deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, Project.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/CreditNoteLineItemRequest.java b/src/main/java/com/merge/api/accounting/types/CreditNoteLineItemRequest.java index d5b61b15a..485ca5d1c 100644 --- a/src/main/java/com/merge/api/accounting/types/CreditNoteLineItemRequest.java +++ b/src/main/java/com/merge/api/accounting/types/CreditNoteLineItemRequest.java @@ -48,6 +48,10 @@ public final class CreditNoteLineItemRequest { private final Optional company; + private final Optional contact; + + private final Optional project; + private final Optional> integrationParams; private final Optional> linkedAccountParams; @@ -68,6 +72,8 @@ private CreditNoteLineItemRequest( Optional>> trackingCategories, Optional account, Optional company, + Optional contact, + Optional project, Optional> integrationParams, Optional> linkedAccountParams, Map additionalProperties) { @@ -84,6 +90,8 @@ private CreditNoteLineItemRequest( this.trackingCategories = trackingCategories; this.account = account; this.company = company; + this.contact = contact; + this.project = project; this.integrationParams = integrationParams; this.linkedAccountParams = linkedAccountParams; this.additionalProperties = additionalProperties; @@ -190,6 +198,19 @@ public Optional getCompany() { return company; } + /** + * @return The credit note's contact. + */ + @JsonProperty("contact") + public Optional getContact() { + return contact; + } + + @JsonProperty("project") + public Optional getProject() { + return project; + } + @JsonProperty("integration_params") public Optional> getIntegrationParams() { return integrationParams; @@ -225,6 +246,8 @@ private boolean equalTo(CreditNoteLineItemRequest other) { && trackingCategories.equals(other.trackingCategories) && account.equals(other.account) && company.equals(other.company) + && contact.equals(other.contact) + && project.equals(other.project) && integrationParams.equals(other.integrationParams) && linkedAccountParams.equals(other.linkedAccountParams); } @@ -245,6 +268,8 @@ public int hashCode() { this.trackingCategories, this.account, this.company, + this.contact, + this.project, this.integrationParams, this.linkedAccountParams); } @@ -286,6 +311,10 @@ public static final class Builder { private Optional company = Optional.empty(); + private Optional contact = Optional.empty(); + + private Optional project = Optional.empty(); + private Optional> integrationParams = Optional.empty(); private Optional> linkedAccountParams = Optional.empty(); @@ -309,11 +338,16 @@ public Builder from(CreditNoteLineItemRequest other) { trackingCategories(other.getTrackingCategories()); account(other.getAccount()); company(other.getCompany()); + contact(other.getContact()); + project(other.getProject()); integrationParams(other.getIntegrationParams()); linkedAccountParams(other.getLinkedAccountParams()); return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -336,6 +370,9 @@ public Builder item(CreditNoteLineItemRequestItem item) { return this; } + /** + *

    The credit note line item's name.

    + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -347,6 +384,9 @@ public Builder name(String name) { return this; } + /** + *

    The description of the item that is owed.

    + */ @JsonSetter(value = "description", nulls = Nulls.SKIP) public Builder description(Optional description) { this.description = description; @@ -358,6 +398,9 @@ public Builder description(String description) { return this; } + /** + *

    The credit note line item's quantity.

    + */ @JsonSetter(value = "quantity", nulls = Nulls.SKIP) public Builder quantity(Optional quantity) { this.quantity = quantity; @@ -369,6 +412,9 @@ public Builder quantity(String quantity) { return this; } + /** + *

    The credit note line item's memo.

    + */ @JsonSetter(value = "memo", nulls = Nulls.SKIP) public Builder memo(Optional memo) { this.memo = memo; @@ -380,6 +426,9 @@ public Builder memo(String memo) { return this; } + /** + *

    The credit note line item's unit price.

    + */ @JsonSetter(value = "unit_price", nulls = Nulls.SKIP) public Builder unitPrice(Optional unitPrice) { this.unitPrice = unitPrice; @@ -391,6 +440,9 @@ public Builder unitPrice(String unitPrice) { return this; } + /** + *

    The tax rate that applies to this line item.

    + */ @JsonSetter(value = "tax_rate", nulls = Nulls.SKIP) public Builder taxRate(Optional taxRate) { this.taxRate = taxRate; @@ -402,6 +454,9 @@ public Builder taxRate(String taxRate) { return this; } + /** + *

    The credit note line item's total.

    + */ @JsonSetter(value = "total_line_amount", nulls = Nulls.SKIP) public Builder totalLineAmount(Optional totalLineAmount) { this.totalLineAmount = totalLineAmount; @@ -413,6 +468,9 @@ public Builder totalLineAmount(String totalLineAmount) { return this; } + /** + *

    The credit note line item's associated tracking category.

    + */ @JsonSetter(value = "tracking_category", nulls = Nulls.SKIP) public Builder trackingCategory(Optional trackingCategory) { this.trackingCategory = trackingCategory; @@ -424,6 +482,9 @@ public Builder trackingCategory(String trackingCategory) { return this; } + /** + *

    The credit note line item's associated tracking categories.

    + */ @JsonSetter(value = "tracking_categories", nulls = Nulls.SKIP) public Builder trackingCategories(Optional>> trackingCategories) { this.trackingCategories = trackingCategories; @@ -435,6 +496,9 @@ public Builder trackingCategories(List> trackingCategories) { return this; } + /** + *

    The credit note line item's account.

    + */ @JsonSetter(value = "account", nulls = Nulls.SKIP) public Builder account(Optional account) { this.account = account; @@ -446,6 +510,9 @@ public Builder account(String account) { return this; } + /** + *

    The company the credit note belongs to.

    + */ @JsonSetter(value = "company", nulls = Nulls.SKIP) public Builder company(Optional company) { this.company = company; @@ -457,6 +524,31 @@ public Builder company(CreditNoteLineItemRequestCompany company) { return this; } + /** + *

    The credit note's contact.

    + */ + @JsonSetter(value = "contact", nulls = Nulls.SKIP) + public Builder contact(Optional contact) { + this.contact = contact; + return this; + } + + public Builder contact(CreditNoteLineItemRequestContact contact) { + this.contact = Optional.ofNullable(contact); + return this; + } + + @JsonSetter(value = "project", nulls = Nulls.SKIP) + public Builder project(Optional project) { + this.project = project; + return this; + } + + public Builder project(CreditNoteLineItemRequestProject project) { + this.project = Optional.ofNullable(project); + return this; + } + @JsonSetter(value = "integration_params", nulls = Nulls.SKIP) public Builder integrationParams(Optional> integrationParams) { this.integrationParams = integrationParams; @@ -494,6 +586,8 @@ public CreditNoteLineItemRequest build() { trackingCategories, account, company, + contact, + project, integrationParams, linkedAccountParams, additionalProperties); diff --git a/src/main/java/com/merge/api/accounting/types/CreditNoteLineItemRequestContact.java b/src/main/java/com/merge/api/accounting/types/CreditNoteLineItemRequestContact.java new file mode 100644 index 000000000..a7b5f9a97 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/CreditNoteLineItemRequestContact.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = CreditNoteLineItemRequestContact.Deserializer.class) +public final class CreditNoteLineItemRequestContact { + private final Object value; + + private final int type; + + private CreditNoteLineItemRequestContact(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((Contact) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof CreditNoteLineItemRequestContact && equalTo((CreditNoteLineItemRequestContact) other); + } + + private boolean equalTo(CreditNoteLineItemRequestContact other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static CreditNoteLineItemRequestContact of(String value) { + return new CreditNoteLineItemRequestContact(value, 0); + } + + public static CreditNoteLineItemRequestContact of(Contact value) { + return new CreditNoteLineItemRequestContact(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(Contact value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(CreditNoteLineItemRequestContact.class); + } + + @java.lang.Override + public CreditNoteLineItemRequestContact deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, Contact.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/CreditNoteLineItemRequestProject.java b/src/main/java/com/merge/api/accounting/types/CreditNoteLineItemRequestProject.java new file mode 100644 index 000000000..ff50af455 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/CreditNoteLineItemRequestProject.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = CreditNoteLineItemRequestProject.Deserializer.class) +public final class CreditNoteLineItemRequestProject { + private final Object value; + + private final int type; + + private CreditNoteLineItemRequestProject(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((Project) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof CreditNoteLineItemRequestProject && equalTo((CreditNoteLineItemRequestProject) other); + } + + private boolean equalTo(CreditNoteLineItemRequestProject other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static CreditNoteLineItemRequestProject of(String value) { + return new CreditNoteLineItemRequestProject(value, 0); + } + + public static CreditNoteLineItemRequestProject of(Project value) { + return new CreditNoteLineItemRequestProject(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(Project value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(CreditNoteLineItemRequestProject.class); + } + + @java.lang.Override + public CreditNoteLineItemRequestProject deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, Project.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/CreditNoteRequest.java b/src/main/java/com/merge/api/accounting/types/CreditNoteRequest.java index 45ea67f1d..46176b432 100644 --- a/src/main/java/com/merge/api/accounting/types/CreditNoteRequest.java +++ b/src/main/java/com/merge/api/accounting/types/CreditNoteRequest.java @@ -25,7 +25,7 @@ public final class CreditNoteRequest { private final Optional transactionDate; - private final Optional status; + private final Optional status; private final Optional number; @@ -45,7 +45,7 @@ public final class CreditNoteRequest { private final Optional>> trackingCategories; - private final Optional currency; + private final Optional currency; private final Optional>> payments; @@ -63,7 +63,7 @@ public final class CreditNoteRequest { private CreditNoteRequest( Optional transactionDate, - Optional status, + Optional status, Optional number, Optional contact, Optional company, @@ -73,7 +73,7 @@ private CreditNoteRequest( Optional inclusiveOfTax, Optional> lineItems, Optional>> trackingCategories, - Optional currency, + Optional currency, Optional>> payments, Optional>> appliedPayments, Optional accountingPeriod, @@ -119,7 +119,7 @@ public Optional getTransactionDate() { * */ @JsonProperty("status") - public Optional getStatus() { + public Optional getStatus() { return status; } @@ -501,7 +501,7 @@ public Optional>> getTrac * */ @JsonProperty("currency") - public Optional getCurrency() { + public Optional getCurrency() { return currency; } @@ -615,7 +615,7 @@ public static Builder builder() { public static final class Builder { private Optional transactionDate = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Optional number = Optional.empty(); @@ -635,7 +635,7 @@ public static final class Builder { private Optional>> trackingCategories = Optional.empty(); - private Optional currency = Optional.empty(); + private Optional currency = Optional.empty(); private Optional>> payments = Optional.empty(); @@ -676,6 +676,9 @@ public Builder from(CreditNoteRequest other) { return this; } + /** + *

    The credit note's transaction date.

    + */ @JsonSetter(value = "transaction_date", nulls = Nulls.SKIP) public Builder transactionDate(Optional transactionDate) { this.transactionDate = transactionDate; @@ -687,17 +690,28 @@ public Builder transactionDate(OffsetDateTime transactionDate) { return this; } + /** + *

    The credit note's status.

    + *
      + *
    • SUBMITTED - SUBMITTED
    • + *
    • AUTHORIZED - AUTHORIZED
    • + *
    • PAID - PAID
    • + *
    + */ @JsonSetter(value = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { + public Builder status(Optional status) { this.status = status; return this; } - public Builder status(CreditNoteStatusEnum status) { + public Builder status(CreditNoteRequestStatus status) { this.status = Optional.ofNullable(status); return this; } + /** + *

    The credit note's number.

    + */ @JsonSetter(value = "number", nulls = Nulls.SKIP) public Builder number(Optional number) { this.number = number; @@ -709,6 +723,9 @@ public Builder number(String number) { return this; } + /** + *

    The credit note's contact.

    + */ @JsonSetter(value = "contact", nulls = Nulls.SKIP) public Builder contact(Optional contact) { this.contact = contact; @@ -720,6 +737,9 @@ public Builder contact(CreditNoteRequestContact contact) { return this; } + /** + *

    The company the credit note belongs to.

    + */ @JsonSetter(value = "company", nulls = Nulls.SKIP) public Builder company(Optional company) { this.company = company; @@ -731,6 +751,9 @@ public Builder company(CreditNoteRequestCompany company) { return this; } + /** + *

    The credit note's exchange rate.

    + */ @JsonSetter(value = "exchange_rate", nulls = Nulls.SKIP) public Builder exchangeRate(Optional exchangeRate) { this.exchangeRate = exchangeRate; @@ -742,6 +765,9 @@ public Builder exchangeRate(String exchangeRate) { return this; } + /** + *

    The credit note's total amount.

    + */ @JsonSetter(value = "total_amount", nulls = Nulls.SKIP) public Builder totalAmount(Optional totalAmount) { this.totalAmount = totalAmount; @@ -753,6 +779,9 @@ public Builder totalAmount(Double totalAmount) { return this; } + /** + *

    The amount of value remaining in the credit note that the customer can use.

    + */ @JsonSetter(value = "remaining_credit", nulls = Nulls.SKIP) public Builder remainingCredit(Optional remainingCredit) { this.remainingCredit = remainingCredit; @@ -764,6 +793,9 @@ public Builder remainingCredit(Double remainingCredit) { return this; } + /** + *

    If the transaction is inclusive or exclusive of tax. True if inclusive, False if exclusive.

    + */ @JsonSetter(value = "inclusive_of_tax", nulls = Nulls.SKIP) public Builder inclusiveOfTax(Optional inclusiveOfTax) { this.inclusiveOfTax = inclusiveOfTax; @@ -798,17 +830,331 @@ public Builder trackingCategories(ListThe credit note's currency.

    + *
      + *
    • XUA - ADB Unit of Account
    • + *
    • AFN - Afghan Afghani
    • + *
    • AFA - Afghan Afghani (1927–2002)
    • + *
    • ALL - Albanian Lek
    • + *
    • ALK - Albanian Lek (1946–1965)
    • + *
    • DZD - Algerian Dinar
    • + *
    • ADP - Andorran Peseta
    • + *
    • AOA - Angolan Kwanza
    • + *
    • AOK - Angolan Kwanza (1977–1991)
    • + *
    • AON - Angolan New Kwanza (1990–2000)
    • + *
    • AOR - Angolan Readjusted Kwanza (1995–1999)
    • + *
    • ARA - Argentine Austral
    • + *
    • ARS - Argentine Peso
    • + *
    • ARM - Argentine Peso (1881–1970)
    • + *
    • ARP - Argentine Peso (1983–1985)
    • + *
    • ARL - Argentine Peso Ley (1970–1983)
    • + *
    • AMD - Armenian Dram
    • + *
    • AWG - Aruban Florin
    • + *
    • AUD - Australian Dollar
    • + *
    • ATS - Austrian Schilling
    • + *
    • AZN - Azerbaijani Manat
    • + *
    • AZM - Azerbaijani Manat (1993–2006)
    • + *
    • BSD - Bahamian Dollar
    • + *
    • BHD - Bahraini Dinar
    • + *
    • BDT - Bangladeshi Taka
    • + *
    • BBD - Barbadian Dollar
    • + *
    • BYN - Belarusian Ruble
    • + *
    • BYB - Belarusian Ruble (1994–1999)
    • + *
    • BYR - Belarusian Ruble (2000–2016)
    • + *
    • BEF - Belgian Franc
    • + *
    • BEC - Belgian Franc (convertible)
    • + *
    • BEL - Belgian Franc (financial)
    • + *
    • BZD - Belize Dollar
    • + *
    • BMD - Bermudan Dollar
    • + *
    • BTN - Bhutanese Ngultrum
    • + *
    • BOB - Bolivian Boliviano
    • + *
    • BOL - Bolivian Boliviano (1863–1963)
    • + *
    • BOV - Bolivian Mvdol
    • + *
    • BOP - Bolivian Peso
    • + *
    • BAM - Bosnia-Herzegovina Convertible Mark
    • + *
    • BAD - Bosnia-Herzegovina Dinar (1992–1994)
    • + *
    • BAN - Bosnia-Herzegovina New Dinar (1994–1997)
    • + *
    • BWP - Botswanan Pula
    • + *
    • BRC - Brazilian Cruzado (1986–1989)
    • + *
    • BRZ - Brazilian Cruzeiro (1942–1967)
    • + *
    • BRE - Brazilian Cruzeiro (1990–1993)
    • + *
    • BRR - Brazilian Cruzeiro (1993–1994)
    • + *
    • BRN - Brazilian New Cruzado (1989–1990)
    • + *
    • BRB - Brazilian New Cruzeiro (1967–1986)
    • + *
    • BRL - Brazilian Real
    • + *
    • GBP - British Pound
    • + *
    • BND - Brunei Dollar
    • + *
    • BGL - Bulgarian Hard Lev
    • + *
    • BGN - Bulgarian Lev
    • + *
    • BGO - Bulgarian Lev (1879–1952)
    • + *
    • BGM - Bulgarian Socialist Lev
    • + *
    • BUK - Burmese Kyat
    • + *
    • BIF - Burundian Franc
    • + *
    • XPF - CFP Franc
    • + *
    • KHR - Cambodian Riel
    • + *
    • CAD - Canadian Dollar
    • + *
    • CVE - Cape Verdean Escudo
    • + *
    • KYD - Cayman Islands Dollar
    • + *
    • XAF - Central African CFA Franc
    • + *
    • CLE - Chilean Escudo
    • + *
    • CLP - Chilean Peso
    • + *
    • CLF - Chilean Unit of Account (UF)
    • + *
    • CNX - Chinese People’s Bank Dollar
    • + *
    • CNY - Chinese Yuan
    • + *
    • CNH - Chinese Yuan (offshore)
    • + *
    • COP - Colombian Peso
    • + *
    • COU - Colombian Real Value Unit
    • + *
    • KMF - Comorian Franc
    • + *
    • CDF - Congolese Franc
    • + *
    • CRC - Costa Rican Colón
    • + *
    • HRD - Croatian Dinar
    • + *
    • HRK - Croatian Kuna
    • + *
    • CUC - Cuban Convertible Peso
    • + *
    • CUP - Cuban Peso
    • + *
    • CYP - Cypriot Pound
    • + *
    • CZK - Czech Koruna
    • + *
    • CSK - Czechoslovak Hard Koruna
    • + *
    • DKK - Danish Krone
    • + *
    • DJF - Djiboutian Franc
    • + *
    • DOP - Dominican Peso
    • + *
    • NLG - Dutch Guilder
    • + *
    • XCD - East Caribbean Dollar
    • + *
    • DDM - East German Mark
    • + *
    • ECS - Ecuadorian Sucre
    • + *
    • ECV - Ecuadorian Unit of Constant Value
    • + *
    • EGP - Egyptian Pound
    • + *
    • GQE - Equatorial Guinean Ekwele
    • + *
    • ERN - Eritrean Nakfa
    • + *
    • EEK - Estonian Kroon
    • + *
    • ETB - Ethiopian Birr
    • + *
    • EUR - Euro
    • + *
    • XBA - European Composite Unit
    • + *
    • XEU - European Currency Unit
    • + *
    • XBB - European Monetary Unit
    • + *
    • XBC - European Unit of Account (XBC)
    • + *
    • XBD - European Unit of Account (XBD)
    • + *
    • FKP - Falkland Islands Pound
    • + *
    • FJD - Fijian Dollar
    • + *
    • FIM - Finnish Markka
    • + *
    • FRF - French Franc
    • + *
    • XFO - French Gold Franc
    • + *
    • XFU - French UIC-Franc
    • + *
    • GMD - Gambian Dalasi
    • + *
    • GEK - Georgian Kupon Larit
    • + *
    • GEL - Georgian Lari
    • + *
    • DEM - German Mark
    • + *
    • GHS - Ghanaian Cedi
    • + *
    • GHC - Ghanaian Cedi (1979–2007)
    • + *
    • GIP - Gibraltar Pound
    • + *
    • XAU - Gold
    • + *
    • GRD - Greek Drachma
    • + *
    • GTQ - Guatemalan Quetzal
    • + *
    • GWP - Guinea-Bissau Peso
    • + *
    • GNF - Guinean Franc
    • + *
    • GNS - Guinean Syli
    • + *
    • GYD - Guyanaese Dollar
    • + *
    • HTG - Haitian Gourde
    • + *
    • HNL - Honduran Lempira
    • + *
    • HKD - Hong Kong Dollar
    • + *
    • HUF - Hungarian Forint
    • + *
    • IMP - IMP
    • + *
    • ISK - Icelandic Króna
    • + *
    • ISJ - Icelandic Króna (1918–1981)
    • + *
    • INR - Indian Rupee
    • + *
    • IDR - Indonesian Rupiah
    • + *
    • IRR - Iranian Rial
    • + *
    • IQD - Iraqi Dinar
    • + *
    • IEP - Irish Pound
    • + *
    • ILS - Israeli New Shekel
    • + *
    • ILP - Israeli Pound
    • + *
    • ILR - Israeli Shekel (1980–1985)
    • + *
    • ITL - Italian Lira
    • + *
    • JMD - Jamaican Dollar
    • + *
    • JPY - Japanese Yen
    • + *
    • JOD - Jordanian Dinar
    • + *
    • KZT - Kazakhstani Tenge
    • + *
    • KES - Kenyan Shilling
    • + *
    • KWD - Kuwaiti Dinar
    • + *
    • KGS - Kyrgystani Som
    • + *
    • LAK - Laotian Kip
    • + *
    • LVL - Latvian Lats
    • + *
    • LVR - Latvian Ruble
    • + *
    • LBP - Lebanese Pound
    • + *
    • LSL - Lesotho Loti
    • + *
    • LRD - Liberian Dollar
    • + *
    • LYD - Libyan Dinar
    • + *
    • LTL - Lithuanian Litas
    • + *
    • LTT - Lithuanian Talonas
    • + *
    • LUL - Luxembourg Financial Franc
    • + *
    • LUC - Luxembourgian Convertible Franc
    • + *
    • LUF - Luxembourgian Franc
    • + *
    • MOP - Macanese Pataca
    • + *
    • MKD - Macedonian Denar
    • + *
    • MKN - Macedonian Denar (1992–1993)
    • + *
    • MGA - Malagasy Ariary
    • + *
    • MGF - Malagasy Franc
    • + *
    • MWK - Malawian Kwacha
    • + *
    • MYR - Malaysian Ringgit
    • + *
    • MVR - Maldivian Rufiyaa
    • + *
    • MVP - Maldivian Rupee (1947–1981)
    • + *
    • MLF - Malian Franc
    • + *
    • MTL - Maltese Lira
    • + *
    • MTP - Maltese Pound
    • + *
    • MRU - Mauritanian Ouguiya
    • + *
    • MRO - Mauritanian Ouguiya (1973–2017)
    • + *
    • MUR - Mauritian Rupee
    • + *
    • MXV - Mexican Investment Unit
    • + *
    • MXN - Mexican Peso
    • + *
    • MXP - Mexican Silver Peso (1861–1992)
    • + *
    • MDC - Moldovan Cupon
    • + *
    • MDL - Moldovan Leu
    • + *
    • MCF - Monegasque Franc
    • + *
    • MNT - Mongolian Tugrik
    • + *
    • MAD - Moroccan Dirham
    • + *
    • MAF - Moroccan Franc
    • + *
    • MZE - Mozambican Escudo
    • + *
    • MZN - Mozambican Metical
    • + *
    • MZM - Mozambican Metical (1980–2006)
    • + *
    • MMK - Myanmar Kyat
    • + *
    • NAD - Namibian Dollar
    • + *
    • NPR - Nepalese Rupee
    • + *
    • ANG - Netherlands Antillean Guilder
    • + *
    • TWD - New Taiwan Dollar
    • + *
    • NZD - New Zealand Dollar
    • + *
    • NIO - Nicaraguan Córdoba
    • + *
    • NIC - Nicaraguan Córdoba (1988–1991)
    • + *
    • NGN - Nigerian Naira
    • + *
    • KPW - North Korean Won
    • + *
    • NOK - Norwegian Krone
    • + *
    • OMR - Omani Rial
    • + *
    • PKR - Pakistani Rupee
    • + *
    • XPD - Palladium
    • + *
    • PAB - Panamanian Balboa
    • + *
    • PGK - Papua New Guinean Kina
    • + *
    • PYG - Paraguayan Guarani
    • + *
    • PEI - Peruvian Inti
    • + *
    • PEN - Peruvian Sol
    • + *
    • PES - Peruvian Sol (1863–1965)
    • + *
    • PHP - Philippine Peso
    • + *
    • XPT - Platinum
    • + *
    • PLN - Polish Zloty
    • + *
    • PLZ - Polish Zloty (1950–1995)
    • + *
    • PTE - Portuguese Escudo
    • + *
    • GWE - Portuguese Guinea Escudo
    • + *
    • QAR - Qatari Rial
    • + *
    • XRE - RINET Funds
    • + *
    • RHD - Rhodesian Dollar
    • + *
    • RON - Romanian Leu
    • + *
    • ROL - Romanian Leu (1952–2006)
    • + *
    • RUB - Russian Ruble
    • + *
    • RUR - Russian Ruble (1991–1998)
    • + *
    • RWF - Rwandan Franc
    • + *
    • SVC - Salvadoran Colón
    • + *
    • WST - Samoan Tala
    • + *
    • SAR - Saudi Riyal
    • + *
    • RSD - Serbian Dinar
    • + *
    • CSD - Serbian Dinar (2002–2006)
    • + *
    • SCR - Seychellois Rupee
    • + *
    • SLL - Sierra Leonean Leone
    • + *
    • XAG - Silver
    • + *
    • SGD - Singapore Dollar
    • + *
    • SKK - Slovak Koruna
    • + *
    • SIT - Slovenian Tolar
    • + *
    • SBD - Solomon Islands Dollar
    • + *
    • SOS - Somali Shilling
    • + *
    • ZAR - South African Rand
    • + *
    • ZAL - South African Rand (financial)
    • + *
    • KRH - South Korean Hwan (1953–1962)
    • + *
    • KRW - South Korean Won
    • + *
    • KRO - South Korean Won (1945–1953)
    • + *
    • SSP - South Sudanese Pound
    • + *
    • SUR - Soviet Rouble
    • + *
    • ESP - Spanish Peseta
    • + *
    • ESA - Spanish Peseta (A account)
    • + *
    • ESB - Spanish Peseta (convertible account)
    • + *
    • XDR - Special Drawing Rights
    • + *
    • LKR - Sri Lankan Rupee
    • + *
    • SHP - St. Helena Pound
    • + *
    • XSU - Sucre
    • + *
    • SDD - Sudanese Dinar (1992–2007)
    • + *
    • SDG - Sudanese Pound
    • + *
    • SDP - Sudanese Pound (1957–1998)
    • + *
    • SRD - Surinamese Dollar
    • + *
    • SRG - Surinamese Guilder
    • + *
    • SZL - Swazi Lilangeni
    • + *
    • SEK - Swedish Krona
    • + *
    • CHF - Swiss Franc
    • + *
    • SYP - Syrian Pound
    • + *
    • STN - São Tomé & Príncipe Dobra
    • + *
    • STD - São Tomé & Príncipe Dobra (1977–2017)
    • + *
    • TVD - TVD
    • + *
    • TJR - Tajikistani Ruble
    • + *
    • TJS - Tajikistani Somoni
    • + *
    • TZS - Tanzanian Shilling
    • + *
    • XTS - Testing Currency Code
    • + *
    • THB - Thai Baht
    • + *
    • XXX - The codes assigned for transactions where no currency is involved
    • + *
    • TPE - Timorese Escudo
    • + *
    • TOP - Tongan Paʻanga
    • + *
    • TTD - Trinidad & Tobago Dollar
    • + *
    • TND - Tunisian Dinar
    • + *
    • TRY - Turkish Lira
    • + *
    • TRL - Turkish Lira (1922–2005)
    • + *
    • TMT - Turkmenistani Manat
    • + *
    • TMM - Turkmenistani Manat (1993–2009)
    • + *
    • USD - US Dollar
    • + *
    • USN - US Dollar (Next day)
    • + *
    • USS - US Dollar (Same day)
    • + *
    • UGX - Ugandan Shilling
    • + *
    • UGS - Ugandan Shilling (1966–1987)
    • + *
    • UAH - Ukrainian Hryvnia
    • + *
    • UAK - Ukrainian Karbovanets
    • + *
    • AED - United Arab Emirates Dirham
    • + *
    • UYW - Uruguayan Nominal Wage Index Unit
    • + *
    • UYU - Uruguayan Peso
    • + *
    • UYP - Uruguayan Peso (1975–1993)
    • + *
    • UYI - Uruguayan Peso (Indexed Units)
    • + *
    • UZS - Uzbekistani Som
    • + *
    • VUV - Vanuatu Vatu
    • + *
    • VES - Venezuelan Bolívar
    • + *
    • VEB - Venezuelan Bolívar (1871–2008)
    • + *
    • VEF - Venezuelan Bolívar (2008–2018)
    • + *
    • VND - Vietnamese Dong
    • + *
    • VNN - Vietnamese Dong (1978–1985)
    • + *
    • CHE - WIR Euro
    • + *
    • CHW - WIR Franc
    • + *
    • XOF - West African CFA Franc
    • + *
    • YDD - Yemeni Dinar
    • + *
    • YER - Yemeni Rial
    • + *
    • YUN - Yugoslavian Convertible Dinar (1990–1992)
    • + *
    • YUD - Yugoslavian Hard Dinar (1966–1990)
    • + *
    • YUM - Yugoslavian New Dinar (1994–2002)
    • + *
    • YUR - Yugoslavian Reformed Dinar (1992–1993)
    • + *
    • ZWN - ZWN
    • + *
    • ZRN - Zairean New Zaire (1993–1998)
    • + *
    • ZRZ - Zairean Zaire (1971–1993)
    • + *
    • ZMW - Zambian Kwacha
    • + *
    • ZMK - Zambian Kwacha (1968–2012)
    • + *
    • ZWD - Zimbabwean Dollar (1980–2008)
    • + *
    • ZWR - Zimbabwean Dollar (2008)
    • + *
    • ZWL - Zimbabwean Dollar (2009)
    • + *
    + */ @JsonSetter(value = "currency", nulls = Nulls.SKIP) - public Builder currency(Optional currency) { + public Builder currency(Optional currency) { this.currency = currency; return this; } - public Builder currency(TransactionCurrencyEnum currency) { + public Builder currency(CreditNoteRequestCurrency currency) { this.currency = Optional.ofNullable(currency); return this; } + /** + *

    Array of Payment object IDs

    + */ @JsonSetter(value = "payments", nulls = Nulls.SKIP) public Builder payments(Optional>> payments) { this.payments = payments; @@ -820,6 +1166,9 @@ public Builder payments(List> payments) return this; } + /** + *

    A list of the Payment Applied to Lines common models related to a given Invoice, Credit Note, or Journal Entry.

    + */ @JsonSetter(value = "applied_payments", nulls = Nulls.SKIP) public Builder appliedPayments(Optional>> appliedPayments) { this.appliedPayments = appliedPayments; @@ -831,6 +1180,9 @@ public Builder appliedPayments(ListThe accounting period that the CreditNote was generated in.

    + */ @JsonSetter(value = "accounting_period", nulls = Nulls.SKIP) public Builder accountingPeriod(Optional accountingPeriod) { this.accountingPeriod = accountingPeriod; @@ -842,6 +1194,9 @@ public Builder accountingPeriod(CreditNoteRequestAccountingPeriod accountingPeri return this; } + /** + *

    A list of the CreditNote Applied to Lines common models related to a given Credit Note

    + */ @JsonSetter(value = "applied_to_lines", nulls = Nulls.SKIP) public Builder appliedToLines(Optional> appliedToLines) { this.appliedToLines = appliedToLines; diff --git a/src/main/java/com/merge/api/accounting/types/CreditNoteRequestCurrency.java b/src/main/java/com/merge/api/accounting/types/CreditNoteRequestCurrency.java new file mode 100644 index 000000000..742cdb9e0 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/CreditNoteRequestCurrency.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = CreditNoteRequestCurrency.Deserializer.class) +public final class CreditNoteRequestCurrency { + private final Object value; + + private final int type; + + private CreditNoteRequestCurrency(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((TransactionCurrencyEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof CreditNoteRequestCurrency && equalTo((CreditNoteRequestCurrency) other); + } + + private boolean equalTo(CreditNoteRequestCurrency other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static CreditNoteRequestCurrency of(TransactionCurrencyEnum value) { + return new CreditNoteRequestCurrency(value, 0); + } + + public static CreditNoteRequestCurrency of(String value) { + return new CreditNoteRequestCurrency(value, 1); + } + + public interface Visitor { + T visit(TransactionCurrencyEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(CreditNoteRequestCurrency.class); + } + + @java.lang.Override + public CreditNoteRequestCurrency deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TransactionCurrencyEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/CreditNoteRequestStatus.java b/src/main/java/com/merge/api/accounting/types/CreditNoteRequestStatus.java new file mode 100644 index 000000000..66b7063ef --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/CreditNoteRequestStatus.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = CreditNoteRequestStatus.Deserializer.class) +public final class CreditNoteRequestStatus { + private final Object value; + + private final int type; + + private CreditNoteRequestStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((CreditNoteStatusEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof CreditNoteRequestStatus && equalTo((CreditNoteRequestStatus) other); + } + + private boolean equalTo(CreditNoteRequestStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static CreditNoteRequestStatus of(CreditNoteStatusEnum value) { + return new CreditNoteRequestStatus(value, 0); + } + + public static CreditNoteRequestStatus of(String value) { + return new CreditNoteRequestStatus(value, 1); + } + + public interface Visitor { + T visit(CreditNoteStatusEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(CreditNoteRequestStatus.class); + } + + @java.lang.Override + public CreditNoteRequestStatus deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreditNoteStatusEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/CreditNoteStatus.java b/src/main/java/com/merge/api/accounting/types/CreditNoteStatus.java new file mode 100644 index 000000000..3eabf72f7 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/CreditNoteStatus.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = CreditNoteStatus.Deserializer.class) +public final class CreditNoteStatus { + private final Object value; + + private final int type; + + private CreditNoteStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((CreditNoteStatusEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof CreditNoteStatus && equalTo((CreditNoteStatus) other); + } + + private boolean equalTo(CreditNoteStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static CreditNoteStatus of(CreditNoteStatusEnum value) { + return new CreditNoteStatus(value, 0); + } + + public static CreditNoteStatus of(String value) { + return new CreditNoteStatus(value, 1); + } + + public interface Visitor { + T visit(CreditNoteStatusEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(CreditNoteStatus.class); + } + + @java.lang.Override + public CreditNoteStatus deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, CreditNoteStatusEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/CreditNotesListRequest.java b/src/main/java/com/merge/api/accounting/types/CreditNotesListRequest.java index b3c97fc77..99bb157a2 100644 --- a/src/main/java/com/merge/api/accounting/types/CreditNotesListRequest.java +++ b/src/main/java/com/merge/api/accounting/types/CreditNotesListRequest.java @@ -341,6 +341,9 @@ public Builder from(CreditNotesListRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -357,6 +360,9 @@ public Builder expand(CreditNotesListRequestExpandItem expand) { return this; } + /** + *

    If provided, will only return credit notes for this company.

    + */ @JsonSetter(value = "company_id", nulls = Nulls.SKIP) public Builder companyId(Optional companyId) { this.companyId = companyId; @@ -368,6 +374,9 @@ public Builder companyId(String companyId) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -379,6 +388,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -390,6 +402,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -401,6 +416,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -412,6 +430,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -423,6 +444,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -434,6 +458,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -445,6 +472,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -456,6 +486,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -467,6 +500,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    Deprecated. Use show_enum_origins.

    + */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -478,6 +514,9 @@ public Builder remoteFields(CreditNotesListRequestRemoteFields remoteFields) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -489,6 +528,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    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

    + */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; @@ -500,6 +542,9 @@ public Builder showEnumOrigins(CreditNotesListRequestShowEnumOrigins showEnumOri return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "transaction_date_after", nulls = Nulls.SKIP) public Builder transactionDateAfter(Optional transactionDateAfter) { this.transactionDateAfter = transactionDateAfter; @@ -511,6 +556,9 @@ public Builder transactionDateAfter(OffsetDateTime transactionDateAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "transaction_date_before", nulls = Nulls.SKIP) public Builder transactionDateBefore(Optional transactionDateBefore) { this.transactionDateBefore = transactionDateBefore; diff --git a/src/main/java/com/merge/api/accounting/types/CreditNotesRetrieveRequest.java b/src/main/java/com/merge/api/accounting/types/CreditNotesRetrieveRequest.java index ffecba3e3..3cda6901a 100644 --- a/src/main/java/com/merge/api/accounting/types/CreditNotesRetrieveRequest.java +++ b/src/main/java/com/merge/api/accounting/types/CreditNotesRetrieveRequest.java @@ -149,6 +149,9 @@ public Builder from(CreditNotesRetrieveRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -165,6 +168,9 @@ public Builder expand(CreditNotesRetrieveRequestExpandItem expand) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -176,6 +182,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -187,6 +196,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    Deprecated. Use show_enum_origins.

    + */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -198,6 +210,9 @@ public Builder remoteFields(CreditNotesRetrieveRequestRemoteFields remoteFields) return this; } + /** + *

    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

    + */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; diff --git a/src/main/java/com/merge/api/accounting/types/DataPassthroughRequest.java b/src/main/java/com/merge/api/accounting/types/DataPassthroughRequest.java index 05b1d0ecb..29af16a0e 100644 --- a/src/main/java/com/merge/api/accounting/types/DataPassthroughRequest.java +++ b/src/main/java/com/merge/api/accounting/types/DataPassthroughRequest.java @@ -171,24 +171,39 @@ public interface MethodStage { } public interface PathStage { + /** + * The path of the request in the third party's platform. + */ _FinalStage path(@NotNull String path); } public interface _FinalStage { DataPassthroughRequest build(); + /** + *

    An optional override of the third party's base url for the request.

    + */ _FinalStage baseUrlOverride(Optional baseUrlOverride); _FinalStage baseUrlOverride(String baseUrlOverride); + /** + *

    The data with the request. You must include a request_format parameter matching the data's format

    + */ _FinalStage data(Optional data); _FinalStage data(String data); + /** + *

    Pass an array of MultipartFormField objects in here instead of using the data param if request_format is set to MULTIPART.

    + */ _FinalStage multipartFormData(Optional> multipartFormData); _FinalStage multipartFormData(List multipartFormData); + /** + *

    The headers to use for the request (Merge will handle the account's authorization headers). Content-Type header is required for passthrough. Choose content type corresponding to expected format of receiving server.

    + */ _FinalStage headers(Optional> headers); _FinalStage headers(Map headers); @@ -197,6 +212,9 @@ public interface _FinalStage { _FinalStage requestFormat(RequestFormatEnum requestFormat); + /** + *

    Optional. If true, the response will always be an object of the form {"type": T, "value": ...} where T will be one of string, boolean, number, null, array, object.

    + */ _FinalStage normalizeResponse(Optional normalizeResponse); _FinalStage normalizeResponse(Boolean normalizeResponse); @@ -246,7 +264,7 @@ public PathStage method(@NotNull MethodEnum method) { } /** - *

    The path of the request in the third party's platform.

    + * The path of the request in the third party's platform.

    The path of the request in the third party's platform.

    * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -266,6 +284,9 @@ public _FinalStage normalizeResponse(Boolean normalizeResponse) { return this; } + /** + *

    Optional. If true, the response will always be an object of the form {"type": T, "value": ...} where T will be one of string, boolean, number, null, array, object.

    + */ @java.lang.Override @JsonSetter(value = "normalize_response", nulls = Nulls.SKIP) public _FinalStage normalizeResponse(Optional normalizeResponse) { @@ -296,6 +317,9 @@ public _FinalStage headers(Map headers) { return this; } + /** + *

    The headers to use for the request (Merge will handle the account's authorization headers). Content-Type header is required for passthrough. Choose content type corresponding to expected format of receiving server.

    + */ @java.lang.Override @JsonSetter(value = "headers", nulls = Nulls.SKIP) public _FinalStage headers(Optional> headers) { @@ -313,6 +337,9 @@ public _FinalStage multipartFormData(List multipartFo return this; } + /** + *

    Pass an array of MultipartFormField objects in here instead of using the data param if request_format is set to MULTIPART.

    + */ @java.lang.Override @JsonSetter(value = "multipart_form_data", nulls = Nulls.SKIP) public _FinalStage multipartFormData(Optional> multipartFormData) { @@ -330,6 +357,9 @@ public _FinalStage data(String data) { return this; } + /** + *

    The data with the request. You must include a request_format parameter matching the data's format

    + */ @java.lang.Override @JsonSetter(value = "data", nulls = Nulls.SKIP) public _FinalStage data(Optional data) { @@ -347,6 +377,9 @@ public _FinalStage baseUrlOverride(String baseUrlOverride) { return this; } + /** + *

    An optional override of the third party's base url for the request.

    + */ @java.lang.Override @JsonSetter(value = "base_url_override", nulls = Nulls.SKIP) public _FinalStage baseUrlOverride(Optional baseUrlOverride) { diff --git a/src/main/java/com/merge/api/accounting/types/Employee.java b/src/main/java/com/merge/api/accounting/types/Employee.java index 441ff987e..2580563fa 100644 --- a/src/main/java/com/merge/api/accounting/types/Employee.java +++ b/src/main/java/com/merge/api/accounting/types/Employee.java @@ -44,7 +44,7 @@ public final class Employee { private final Optional company; - private final Status895Enum status; + private final EmployeeStatus status; private final Optional remoteWasDeleted; @@ -65,7 +65,7 @@ private Employee( Optional employeeNumber, Optional emailAddress, Optional company, - Status895Enum status, + EmployeeStatus status, Optional remoteWasDeleted, Optional> fieldMappings, Optional> remoteData, @@ -172,7 +172,7 @@ public Optional getCompany() { * */ @JsonProperty("status") - public Status895Enum getStatus() { + public EmployeeStatus getStatus() { return status; } @@ -251,7 +251,13 @@ public static StatusStage builder() { } public interface StatusStage { - _FinalStage status(@NotNull Status895Enum status); + /** + * The employee's status in the accounting system. + * + * * `ACTIVE` - ACTIVE + * * `INACTIVE` - INACTIVE + */ + _FinalStage status(@NotNull EmployeeStatus status); Builder from(Employee other); } @@ -263,42 +269,72 @@ public interface _FinalStage { _FinalStage id(String id); + /** + *

    The third-party API ID of the matching object.

    + */ _FinalStage remoteId(Optional remoteId); _FinalStage remoteId(String remoteId); + /** + *

    The datetime that this object was created by Merge.

    + */ _FinalStage createdAt(Optional createdAt); _FinalStage createdAt(OffsetDateTime createdAt); + /** + *

    The datetime that this object was modified by Merge.

    + */ _FinalStage modifiedAt(Optional modifiedAt); _FinalStage modifiedAt(OffsetDateTime modifiedAt); + /** + *

    The employee's first name.

    + */ _FinalStage firstName(Optional firstName); _FinalStage firstName(String firstName); + /** + *

    The employee's last name.

    + */ _FinalStage lastName(Optional lastName); _FinalStage lastName(String lastName); + /** + *

    True if the employee is a contractor, False if not.

    + */ _FinalStage isContractor(Optional isContractor); _FinalStage isContractor(Boolean isContractor); + /** + *

    The employee's internal identification number.

    + */ _FinalStage employeeNumber(Optional employeeNumber); _FinalStage employeeNumber(String employeeNumber); + /** + *

    The employee's email address.

    + */ _FinalStage emailAddress(Optional emailAddress); _FinalStage emailAddress(String emailAddress); + /** + *

    The subsidiary that the employee belongs to.

    + */ _FinalStage company(Optional company); _FinalStage company(EmployeeCompany company); + /** + *

    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.

    + */ _FinalStage remoteWasDeleted(Optional remoteWasDeleted); _FinalStage remoteWasDeleted(Boolean remoteWasDeleted); @@ -314,7 +350,7 @@ public interface _FinalStage { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements StatusStage, _FinalStage { - private Status895Enum status; + private EmployeeStatus status; private Optional> remoteData = Optional.empty(); @@ -367,7 +403,10 @@ public Builder from(Employee other) { } /** - *

    The employee's status in the accounting system.

    + * The employee's status in the accounting system. + * + * * `ACTIVE` - ACTIVE + * * `INACTIVE` - INACTIVE

    The employee's status in the accounting system.

    *
      *
    • ACTIVE - ACTIVE
    • *
    • INACTIVE - INACTIVE
    • @@ -376,7 +415,7 @@ public Builder from(Employee other) { */ @java.lang.Override @JsonSetter("status") - public _FinalStage status(@NotNull Status895Enum status) { + public _FinalStage status(@NotNull EmployeeStatus status) { this.status = status; return this; } @@ -417,6 +456,9 @@ public _FinalStage remoteWasDeleted(Boolean remoteWasDeleted) { return this; } + /** + *

      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.

      + */ @java.lang.Override @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public _FinalStage remoteWasDeleted(Optional remoteWasDeleted) { @@ -434,6 +476,9 @@ public _FinalStage company(EmployeeCompany company) { return this; } + /** + *

      The subsidiary that the employee belongs to.

      + */ @java.lang.Override @JsonSetter(value = "company", nulls = Nulls.SKIP) public _FinalStage company(Optional company) { @@ -451,6 +496,9 @@ public _FinalStage emailAddress(String emailAddress) { return this; } + /** + *

      The employee's email address.

      + */ @java.lang.Override @JsonSetter(value = "email_address", nulls = Nulls.SKIP) public _FinalStage emailAddress(Optional emailAddress) { @@ -468,6 +516,9 @@ public _FinalStage employeeNumber(String employeeNumber) { return this; } + /** + *

      The employee's internal identification number.

      + */ @java.lang.Override @JsonSetter(value = "employee_number", nulls = Nulls.SKIP) public _FinalStage employeeNumber(Optional employeeNumber) { @@ -485,6 +536,9 @@ public _FinalStage isContractor(Boolean isContractor) { return this; } + /** + *

      True if the employee is a contractor, False if not.

      + */ @java.lang.Override @JsonSetter(value = "is_contractor", nulls = Nulls.SKIP) public _FinalStage isContractor(Optional isContractor) { @@ -502,6 +556,9 @@ public _FinalStage lastName(String lastName) { return this; } + /** + *

      The employee's last name.

      + */ @java.lang.Override @JsonSetter(value = "last_name", nulls = Nulls.SKIP) public _FinalStage lastName(Optional lastName) { @@ -519,6 +576,9 @@ public _FinalStage firstName(String firstName) { return this; } + /** + *

      The employee's first name.

      + */ @java.lang.Override @JsonSetter(value = "first_name", nulls = Nulls.SKIP) public _FinalStage firstName(Optional firstName) { @@ -536,6 +596,9 @@ public _FinalStage modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

      The datetime that this object was modified by Merge.

      + */ @java.lang.Override @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public _FinalStage modifiedAt(Optional modifiedAt) { @@ -553,6 +616,9 @@ public _FinalStage createdAt(OffsetDateTime createdAt) { return this; } + /** + *

      The datetime that this object was created by Merge.

      + */ @java.lang.Override @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public _FinalStage createdAt(Optional createdAt) { @@ -570,6 +636,9 @@ public _FinalStage remoteId(String remoteId) { return this; } + /** + *

      The third-party API ID of the matching object.

      + */ @java.lang.Override @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public _FinalStage remoteId(Optional remoteId) { diff --git a/src/main/java/com/merge/api/accounting/types/EmployeeStatus.java b/src/main/java/com/merge/api/accounting/types/EmployeeStatus.java new file mode 100644 index 000000000..f8f5101a3 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/EmployeeStatus.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EmployeeStatus.Deserializer.class) +public final class EmployeeStatus { + private final Object value; + + private final int type; + + private EmployeeStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((Status895Enum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EmployeeStatus && equalTo((EmployeeStatus) other); + } + + private boolean equalTo(EmployeeStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EmployeeStatus of(Status895Enum value) { + return new EmployeeStatus(value, 0); + } + + public static EmployeeStatus of(String value) { + return new EmployeeStatus(value, 1); + } + + public interface Visitor { + T visit(Status895Enum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EmployeeStatus.class); + } + + @java.lang.Override + public EmployeeStatus deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, Status895Enum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/EmployeesListRequest.java b/src/main/java/com/merge/api/accounting/types/EmployeesListRequest.java index fdad31887..f8a8d7165 100644 --- a/src/main/java/com/merge/api/accounting/types/EmployeesListRequest.java +++ b/src/main/java/com/merge/api/accounting/types/EmployeesListRequest.java @@ -170,6 +170,9 @@ public Builder from(EmployeesListRequest other) { return this; } + /** + *

      Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

      + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -186,6 +189,9 @@ public Builder expand(String expand) { return this; } + /** + *

      The pagination cursor value.

      + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -197,6 +203,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

      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.

      + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -208,6 +217,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

      Whether to include the original data Merge fetched from the third-party to produce these models.

      + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -219,6 +231,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

      Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

      + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -230,6 +245,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

      Number of results to return per page.

      + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; diff --git a/src/main/java/com/merge/api/accounting/types/EmployeesRetrieveRequest.java b/src/main/java/com/merge/api/accounting/types/EmployeesRetrieveRequest.java index ac3f394e8..cce06cf03 100644 --- a/src/main/java/com/merge/api/accounting/types/EmployeesRetrieveRequest.java +++ b/src/main/java/com/merge/api/accounting/types/EmployeesRetrieveRequest.java @@ -116,6 +116,9 @@ public Builder from(EmployeesRetrieveRequest other) { return this; } + /** + *

      Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

      + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -132,6 +135,9 @@ public Builder expand(String expand) { return this; } + /** + *

      Whether to include the original data Merge fetched from the third-party to produce these models.

      + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -143,6 +149,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

      Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

      + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/accounting/types/EndUserDetailsRequest.java b/src/main/java/com/merge/api/accounting/types/EndUserDetailsRequest.java index 5d47f45a5..6a9cce703 100644 --- a/src/main/java/com/merge/api/accounting/types/EndUserDetailsRequest.java +++ b/src/main/java/com/merge/api/accounting/types/EndUserDetailsRequest.java @@ -45,7 +45,7 @@ public final class EndUserDetailsRequest { private final Optional>>> categoryCommonModelScopes; - private final Optional language; + private final Optional language; private final Optional areSyncsDisabled; @@ -65,7 +65,7 @@ private EndUserDetailsRequest( Optional> commonModels, Optional>>> categoryCommonModelScopes, - Optional language, + Optional language, Optional areSyncsDisabled, Optional> integrationSpecificConfig, Map additionalProperties) { @@ -174,7 +174,7 @@ public Optional> getCommonModels() { *
    */ @JsonProperty("language") - public Optional getLanguage() { + public Optional getLanguage() { return language; } @@ -249,48 +249,78 @@ public static EndUserEmailAddressStage builder() { } public interface EndUserEmailAddressStage { + /** + * Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent. + */ EndUserOrganizationNameStage endUserEmailAddress(@NotNull String endUserEmailAddress); Builder from(EndUserDetailsRequest other); } public interface EndUserOrganizationNameStage { + /** + * Your end user's organization. + */ EndUserOriginIdStage endUserOrganizationName(@NotNull String endUserOrganizationName); } public interface EndUserOriginIdStage { + /** + * 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. + */ _FinalStage endUserOriginId(@NotNull String endUserOriginId); } public interface _FinalStage { EndUserDetailsRequest build(); + /** + *

    The integration categories to show in Merge Link.

    + */ _FinalStage categories(List categories); _FinalStage addCategories(CategoriesEnum categories); _FinalStage addAllCategories(List categories); + /** + *

    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/.

    + */ _FinalStage integration(Optional integration); _FinalStage integration(String integration); + /** + *

    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.

    + */ _FinalStage linkExpiryMins(Optional linkExpiryMins); _FinalStage linkExpiryMins(Integer linkExpiryMins); + /** + *

    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.

    + */ _FinalStage shouldCreateMagicLinkUrl(Optional shouldCreateMagicLinkUrl); _FinalStage shouldCreateMagicLinkUrl(Boolean shouldCreateMagicLinkUrl); + /** + *

    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.

    + */ _FinalStage hideAdminMagicLink(Optional hideAdminMagicLink); _FinalStage hideAdminMagicLink(Boolean hideAdminMagicLink); + /** + *

    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.

    + */ _FinalStage commonModels(Optional> commonModels); _FinalStage commonModels(List commonModels); + /** + *

    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.

    + */ _FinalStage categoryCommonModelScopes( Optional>>> categoryCommonModelScopes); @@ -298,14 +328,27 @@ _FinalStage categoryCommonModelScopes( _FinalStage categoryCommonModelScopes( Map>> categoryCommonModelScopes); - _FinalStage language(Optional language); + /** + *

    The following subset of IETF language tags can be used to configure localization.

    + *
      + *
    • en - en
    • + *
    • de - de
    • + *
    + */ + _FinalStage language(Optional language); - _FinalStage language(LanguageEnum language); + _FinalStage language(EndUserDetailsRequestLanguage language); + /** + *

    The boolean that indicates whether initial, periodic, and force syncs will be disabled.

    + */ _FinalStage areSyncsDisabled(Optional areSyncsDisabled); _FinalStage areSyncsDisabled(Boolean areSyncsDisabled); + /** + *

    A JSON object containing integration-specific configuration options.

    + */ _FinalStage integrationSpecificConfig(Optional> integrationSpecificConfig); _FinalStage integrationSpecificConfig(Map integrationSpecificConfig); @@ -324,7 +367,7 @@ public static final class Builder private Optional areSyncsDisabled = Optional.empty(); - private Optional language = Optional.empty(); + private Optional language = Optional.empty(); private Optional>>> categoryCommonModelScopes = Optional.empty(); @@ -365,7 +408,7 @@ public Builder from(EndUserDetailsRequest other) { } /** - *

    Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent.

    + * Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent.

    Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent.

    * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -376,7 +419,7 @@ public EndUserOrganizationNameStage endUserEmailAddress(@NotNull String endUserE } /** - *

    Your end user's organization.

    + * Your end user's organization.

    Your end user's organization.

    * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -387,7 +430,7 @@ public EndUserOriginIdStage endUserOrganizationName(@NotNull String endUserOrgan } /** - *

    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.

    + * 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.

    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.

    * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -407,6 +450,9 @@ public _FinalStage integrationSpecificConfig(Map integrationSp return this; } + /** + *

    A JSON object containing integration-specific configuration options.

    + */ @java.lang.Override @JsonSetter(value = "integration_specific_config", nulls = Nulls.SKIP) public _FinalStage integrationSpecificConfig(Optional> integrationSpecificConfig) { @@ -424,6 +470,9 @@ public _FinalStage areSyncsDisabled(Boolean areSyncsDisabled) { return this; } + /** + *

    The boolean that indicates whether initial, periodic, and force syncs will be disabled.

    + */ @java.lang.Override @JsonSetter(value = "are_syncs_disabled", nulls = Nulls.SKIP) public _FinalStage areSyncsDisabled(Optional areSyncsDisabled) { @@ -440,14 +489,21 @@ public _FinalStage areSyncsDisabled(Optional areSyncsDisabled) { * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override - public _FinalStage language(LanguageEnum language) { + public _FinalStage language(EndUserDetailsRequestLanguage language) { this.language = Optional.ofNullable(language); return this; } + /** + *

    The following subset of IETF language tags can be used to configure localization.

    + *
      + *
    • en - en
    • + *
    • de - de
    • + *
    + */ @java.lang.Override @JsonSetter(value = "language", nulls = Nulls.SKIP) - public _FinalStage language(Optional language) { + public _FinalStage language(Optional language) { this.language = language; return this; } @@ -463,6 +519,9 @@ public _FinalStage categoryCommonModelScopes( return this; } + /** + *

    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.

    + */ @java.lang.Override @JsonSetter(value = "category_common_model_scopes", nulls = Nulls.SKIP) public _FinalStage categoryCommonModelScopes( @@ -482,6 +541,9 @@ public _FinalStage commonModels(List commonModels) return this; } + /** + *

    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.

    + */ @java.lang.Override @JsonSetter(value = "common_models", nulls = Nulls.SKIP) public _FinalStage commonModels(Optional> commonModels) { @@ -499,6 +561,9 @@ public _FinalStage hideAdminMagicLink(Boolean hideAdminMagicLink) { return this; } + /** + *

    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.

    + */ @java.lang.Override @JsonSetter(value = "hide_admin_magic_link", nulls = Nulls.SKIP) public _FinalStage hideAdminMagicLink(Optional hideAdminMagicLink) { @@ -516,6 +581,9 @@ public _FinalStage shouldCreateMagicLinkUrl(Boolean shouldCreateMagicLinkUrl) { return this; } + /** + *

    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.

    + */ @java.lang.Override @JsonSetter(value = "should_create_magic_link_url", nulls = Nulls.SKIP) public _FinalStage shouldCreateMagicLinkUrl(Optional shouldCreateMagicLinkUrl) { @@ -533,6 +601,9 @@ public _FinalStage linkExpiryMins(Integer linkExpiryMins) { return this; } + /** + *

    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.

    + */ @java.lang.Override @JsonSetter(value = "link_expiry_mins", nulls = Nulls.SKIP) public _FinalStage linkExpiryMins(Optional linkExpiryMins) { @@ -550,6 +621,9 @@ public _FinalStage integration(String integration) { return this; } + /** + *

    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/.

    + */ @java.lang.Override @JsonSetter(value = "integration", nulls = Nulls.SKIP) public _FinalStage integration(Optional integration) { @@ -577,6 +651,9 @@ public _FinalStage addCategories(CategoriesEnum categories) { return this; } + /** + *

    The integration categories to show in Merge Link.

    + */ @java.lang.Override @JsonSetter(value = "categories", nulls = Nulls.SKIP) public _FinalStage categories(List categories) { diff --git a/src/main/java/com/merge/api/accounting/types/EndUserDetailsRequestLanguage.java b/src/main/java/com/merge/api/accounting/types/EndUserDetailsRequestLanguage.java new file mode 100644 index 000000000..6491d8cc7 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/EndUserDetailsRequestLanguage.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EndUserDetailsRequestLanguage.Deserializer.class) +public final class EndUserDetailsRequestLanguage { + private final Object value; + + private final int type; + + private EndUserDetailsRequestLanguage(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((LanguageEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EndUserDetailsRequestLanguage && equalTo((EndUserDetailsRequestLanguage) other); + } + + private boolean equalTo(EndUserDetailsRequestLanguage other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EndUserDetailsRequestLanguage of(LanguageEnum value) { + return new EndUserDetailsRequestLanguage(value, 0); + } + + public static EndUserDetailsRequestLanguage of(String value) { + return new EndUserDetailsRequestLanguage(value, 1); + } + + public interface Visitor { + T visit(LanguageEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EndUserDetailsRequestLanguage.class); + } + + @java.lang.Override + public EndUserDetailsRequestLanguage deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, LanguageEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/EventTypeEnum.java b/src/main/java/com/merge/api/accounting/types/EventTypeEnum.java index 3d5291644..7a3a81899 100644 --- a/src/main/java/com/merge/api/accounting/types/EventTypeEnum.java +++ b/src/main/java/com/merge/api/accounting/types/EventTypeEnum.java @@ -16,6 +16,8 @@ public enum EventTypeEnum { REGENERATED_PRODUCTION_API_KEY("REGENERATED_PRODUCTION_API_KEY"), + REGENERATED_WEBHOOK_SIGNATURE("REGENERATED_WEBHOOK_SIGNATURE"), + INVITED_USER("INVITED_USER"), TWO_FACTOR_AUTH_ENABLED("TWO_FACTOR_AUTH_ENABLED"), diff --git a/src/main/java/com/merge/api/accounting/types/Expense.java b/src/main/java/com/merge/api/accounting/types/Expense.java index 16b9ba32e..3c386a556 100644 --- a/src/main/java/com/merge/api/accounting/types/Expense.java +++ b/src/main/java/com/merge/api/accounting/types/Expense.java @@ -45,7 +45,7 @@ public final class Expense { private final Optional totalTaxAmount; - private final Optional currency; + private final Optional currency; private final Optional exchangeRate; @@ -85,7 +85,7 @@ private Expense( Optional totalAmount, Optional subTotal, Optional totalTaxAmount, - Optional currency, + Optional currency, Optional exchangeRate, Optional inclusiveOfTax, Optional company, @@ -523,7 +523,7 @@ public Optional getTotalTaxAmount() { * */ @JsonProperty("currency") - public Optional getCurrency() { + public Optional getCurrency() { return currency; } @@ -708,7 +708,7 @@ public static final class Builder { private Optional totalTaxAmount = Optional.empty(); - private Optional currency = Optional.empty(); + private Optional currency = Optional.empty(); private Optional exchangeRate = Optional.empty(); @@ -778,6 +778,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -789,6 +792,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -800,6 +806,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -811,6 +820,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    When the transaction occurred.

    + */ @JsonSetter(value = "transaction_date", nulls = Nulls.SKIP) public Builder transactionDate(Optional transactionDate) { this.transactionDate = transactionDate; @@ -822,6 +834,9 @@ public Builder transactionDate(OffsetDateTime transactionDate) { return this; } + /** + *

    When the expense was created.

    + */ @JsonSetter(value = "remote_created_at", nulls = Nulls.SKIP) public Builder remoteCreatedAt(Optional remoteCreatedAt) { this.remoteCreatedAt = remoteCreatedAt; @@ -833,6 +848,9 @@ public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { return this; } + /** + *

    The expense's payment account.

    + */ @JsonSetter(value = "account", nulls = Nulls.SKIP) public Builder account(Optional account) { this.account = account; @@ -844,6 +862,9 @@ public Builder account(ExpenseAccount account) { return this; } + /** + *

    The expense's contact.

    + */ @JsonSetter(value = "contact", nulls = Nulls.SKIP) public Builder contact(Optional contact) { this.contact = contact; @@ -855,6 +876,9 @@ public Builder contact(ExpenseContact contact) { return this; } + /** + *

    The expense's total amount.

    + */ @JsonSetter(value = "total_amount", nulls = Nulls.SKIP) public Builder totalAmount(Optional totalAmount) { this.totalAmount = totalAmount; @@ -866,6 +890,9 @@ public Builder totalAmount(Double totalAmount) { return this; } + /** + *

    The expense's total amount before tax.

    + */ @JsonSetter(value = "sub_total", nulls = Nulls.SKIP) public Builder subTotal(Optional subTotal) { this.subTotal = subTotal; @@ -877,6 +904,9 @@ public Builder subTotal(Double subTotal) { return this; } + /** + *

    The expense's total tax amount.

    + */ @JsonSetter(value = "total_tax_amount", nulls = Nulls.SKIP) public Builder totalTaxAmount(Optional totalTaxAmount) { this.totalTaxAmount = totalTaxAmount; @@ -888,17 +918,331 @@ public Builder totalTaxAmount(Double totalTaxAmount) { return this; } + /** + *

    The expense's currency.

    + *
      + *
    • XUA - ADB Unit of Account
    • + *
    • AFN - Afghan Afghani
    • + *
    • AFA - Afghan Afghani (1927–2002)
    • + *
    • ALL - Albanian Lek
    • + *
    • ALK - Albanian Lek (1946–1965)
    • + *
    • DZD - Algerian Dinar
    • + *
    • ADP - Andorran Peseta
    • + *
    • AOA - Angolan Kwanza
    • + *
    • AOK - Angolan Kwanza (1977–1991)
    • + *
    • AON - Angolan New Kwanza (1990–2000)
    • + *
    • AOR - Angolan Readjusted Kwanza (1995–1999)
    • + *
    • ARA - Argentine Austral
    • + *
    • ARS - Argentine Peso
    • + *
    • ARM - Argentine Peso (1881–1970)
    • + *
    • ARP - Argentine Peso (1983–1985)
    • + *
    • ARL - Argentine Peso Ley (1970–1983)
    • + *
    • AMD - Armenian Dram
    • + *
    • AWG - Aruban Florin
    • + *
    • AUD - Australian Dollar
    • + *
    • ATS - Austrian Schilling
    • + *
    • AZN - Azerbaijani Manat
    • + *
    • AZM - Azerbaijani Manat (1993–2006)
    • + *
    • BSD - Bahamian Dollar
    • + *
    • BHD - Bahraini Dinar
    • + *
    • BDT - Bangladeshi Taka
    • + *
    • BBD - Barbadian Dollar
    • + *
    • BYN - Belarusian Ruble
    • + *
    • BYB - Belarusian Ruble (1994–1999)
    • + *
    • BYR - Belarusian Ruble (2000–2016)
    • + *
    • BEF - Belgian Franc
    • + *
    • BEC - Belgian Franc (convertible)
    • + *
    • BEL - Belgian Franc (financial)
    • + *
    • BZD - Belize Dollar
    • + *
    • BMD - Bermudan Dollar
    • + *
    • BTN - Bhutanese Ngultrum
    • + *
    • BOB - Bolivian Boliviano
    • + *
    • BOL - Bolivian Boliviano (1863–1963)
    • + *
    • BOV - Bolivian Mvdol
    • + *
    • BOP - Bolivian Peso
    • + *
    • BAM - Bosnia-Herzegovina Convertible Mark
    • + *
    • BAD - Bosnia-Herzegovina Dinar (1992–1994)
    • + *
    • BAN - Bosnia-Herzegovina New Dinar (1994–1997)
    • + *
    • BWP - Botswanan Pula
    • + *
    • BRC - Brazilian Cruzado (1986–1989)
    • + *
    • BRZ - Brazilian Cruzeiro (1942–1967)
    • + *
    • BRE - Brazilian Cruzeiro (1990–1993)
    • + *
    • BRR - Brazilian Cruzeiro (1993–1994)
    • + *
    • BRN - Brazilian New Cruzado (1989–1990)
    • + *
    • BRB - Brazilian New Cruzeiro (1967–1986)
    • + *
    • BRL - Brazilian Real
    • + *
    • GBP - British Pound
    • + *
    • BND - Brunei Dollar
    • + *
    • BGL - Bulgarian Hard Lev
    • + *
    • BGN - Bulgarian Lev
    • + *
    • BGO - Bulgarian Lev (1879–1952)
    • + *
    • BGM - Bulgarian Socialist Lev
    • + *
    • BUK - Burmese Kyat
    • + *
    • BIF - Burundian Franc
    • + *
    • XPF - CFP Franc
    • + *
    • KHR - Cambodian Riel
    • + *
    • CAD - Canadian Dollar
    • + *
    • CVE - Cape Verdean Escudo
    • + *
    • KYD - Cayman Islands Dollar
    • + *
    • XAF - Central African CFA Franc
    • + *
    • CLE - Chilean Escudo
    • + *
    • CLP - Chilean Peso
    • + *
    • CLF - Chilean Unit of Account (UF)
    • + *
    • CNX - Chinese People’s Bank Dollar
    • + *
    • CNY - Chinese Yuan
    • + *
    • CNH - Chinese Yuan (offshore)
    • + *
    • COP - Colombian Peso
    • + *
    • COU - Colombian Real Value Unit
    • + *
    • KMF - Comorian Franc
    • + *
    • CDF - Congolese Franc
    • + *
    • CRC - Costa Rican Colón
    • + *
    • HRD - Croatian Dinar
    • + *
    • HRK - Croatian Kuna
    • + *
    • CUC - Cuban Convertible Peso
    • + *
    • CUP - Cuban Peso
    • + *
    • CYP - Cypriot Pound
    • + *
    • CZK - Czech Koruna
    • + *
    • CSK - Czechoslovak Hard Koruna
    • + *
    • DKK - Danish Krone
    • + *
    • DJF - Djiboutian Franc
    • + *
    • DOP - Dominican Peso
    • + *
    • NLG - Dutch Guilder
    • + *
    • XCD - East Caribbean Dollar
    • + *
    • DDM - East German Mark
    • + *
    • ECS - Ecuadorian Sucre
    • + *
    • ECV - Ecuadorian Unit of Constant Value
    • + *
    • EGP - Egyptian Pound
    • + *
    • GQE - Equatorial Guinean Ekwele
    • + *
    • ERN - Eritrean Nakfa
    • + *
    • EEK - Estonian Kroon
    • + *
    • ETB - Ethiopian Birr
    • + *
    • EUR - Euro
    • + *
    • XBA - European Composite Unit
    • + *
    • XEU - European Currency Unit
    • + *
    • XBB - European Monetary Unit
    • + *
    • XBC - European Unit of Account (XBC)
    • + *
    • XBD - European Unit of Account (XBD)
    • + *
    • FKP - Falkland Islands Pound
    • + *
    • FJD - Fijian Dollar
    • + *
    • FIM - Finnish Markka
    • + *
    • FRF - French Franc
    • + *
    • XFO - French Gold Franc
    • + *
    • XFU - French UIC-Franc
    • + *
    • GMD - Gambian Dalasi
    • + *
    • GEK - Georgian Kupon Larit
    • + *
    • GEL - Georgian Lari
    • + *
    • DEM - German Mark
    • + *
    • GHS - Ghanaian Cedi
    • + *
    • GHC - Ghanaian Cedi (1979–2007)
    • + *
    • GIP - Gibraltar Pound
    • + *
    • XAU - Gold
    • + *
    • GRD - Greek Drachma
    • + *
    • GTQ - Guatemalan Quetzal
    • + *
    • GWP - Guinea-Bissau Peso
    • + *
    • GNF - Guinean Franc
    • + *
    • GNS - Guinean Syli
    • + *
    • GYD - Guyanaese Dollar
    • + *
    • HTG - Haitian Gourde
    • + *
    • HNL - Honduran Lempira
    • + *
    • HKD - Hong Kong Dollar
    • + *
    • HUF - Hungarian Forint
    • + *
    • IMP - IMP
    • + *
    • ISK - Icelandic Króna
    • + *
    • ISJ - Icelandic Króna (1918–1981)
    • + *
    • INR - Indian Rupee
    • + *
    • IDR - Indonesian Rupiah
    • + *
    • IRR - Iranian Rial
    • + *
    • IQD - Iraqi Dinar
    • + *
    • IEP - Irish Pound
    • + *
    • ILS - Israeli New Shekel
    • + *
    • ILP - Israeli Pound
    • + *
    • ILR - Israeli Shekel (1980–1985)
    • + *
    • ITL - Italian Lira
    • + *
    • JMD - Jamaican Dollar
    • + *
    • JPY - Japanese Yen
    • + *
    • JOD - Jordanian Dinar
    • + *
    • KZT - Kazakhstani Tenge
    • + *
    • KES - Kenyan Shilling
    • + *
    • KWD - Kuwaiti Dinar
    • + *
    • KGS - Kyrgystani Som
    • + *
    • LAK - Laotian Kip
    • + *
    • LVL - Latvian Lats
    • + *
    • LVR - Latvian Ruble
    • + *
    • LBP - Lebanese Pound
    • + *
    • LSL - Lesotho Loti
    • + *
    • LRD - Liberian Dollar
    • + *
    • LYD - Libyan Dinar
    • + *
    • LTL - Lithuanian Litas
    • + *
    • LTT - Lithuanian Talonas
    • + *
    • LUL - Luxembourg Financial Franc
    • + *
    • LUC - Luxembourgian Convertible Franc
    • + *
    • LUF - Luxembourgian Franc
    • + *
    • MOP - Macanese Pataca
    • + *
    • MKD - Macedonian Denar
    • + *
    • MKN - Macedonian Denar (1992–1993)
    • + *
    • MGA - Malagasy Ariary
    • + *
    • MGF - Malagasy Franc
    • + *
    • MWK - Malawian Kwacha
    • + *
    • MYR - Malaysian Ringgit
    • + *
    • MVR - Maldivian Rufiyaa
    • + *
    • MVP - Maldivian Rupee (1947–1981)
    • + *
    • MLF - Malian Franc
    • + *
    • MTL - Maltese Lira
    • + *
    • MTP - Maltese Pound
    • + *
    • MRU - Mauritanian Ouguiya
    • + *
    • MRO - Mauritanian Ouguiya (1973–2017)
    • + *
    • MUR - Mauritian Rupee
    • + *
    • MXV - Mexican Investment Unit
    • + *
    • MXN - Mexican Peso
    • + *
    • MXP - Mexican Silver Peso (1861–1992)
    • + *
    • MDC - Moldovan Cupon
    • + *
    • MDL - Moldovan Leu
    • + *
    • MCF - Monegasque Franc
    • + *
    • MNT - Mongolian Tugrik
    • + *
    • MAD - Moroccan Dirham
    • + *
    • MAF - Moroccan Franc
    • + *
    • MZE - Mozambican Escudo
    • + *
    • MZN - Mozambican Metical
    • + *
    • MZM - Mozambican Metical (1980–2006)
    • + *
    • MMK - Myanmar Kyat
    • + *
    • NAD - Namibian Dollar
    • + *
    • NPR - Nepalese Rupee
    • + *
    • ANG - Netherlands Antillean Guilder
    • + *
    • TWD - New Taiwan Dollar
    • + *
    • NZD - New Zealand Dollar
    • + *
    • NIO - Nicaraguan Córdoba
    • + *
    • NIC - Nicaraguan Córdoba (1988–1991)
    • + *
    • NGN - Nigerian Naira
    • + *
    • KPW - North Korean Won
    • + *
    • NOK - Norwegian Krone
    • + *
    • OMR - Omani Rial
    • + *
    • PKR - Pakistani Rupee
    • + *
    • XPD - Palladium
    • + *
    • PAB - Panamanian Balboa
    • + *
    • PGK - Papua New Guinean Kina
    • + *
    • PYG - Paraguayan Guarani
    • + *
    • PEI - Peruvian Inti
    • + *
    • PEN - Peruvian Sol
    • + *
    • PES - Peruvian Sol (1863–1965)
    • + *
    • PHP - Philippine Peso
    • + *
    • XPT - Platinum
    • + *
    • PLN - Polish Zloty
    • + *
    • PLZ - Polish Zloty (1950–1995)
    • + *
    • PTE - Portuguese Escudo
    • + *
    • GWE - Portuguese Guinea Escudo
    • + *
    • QAR - Qatari Rial
    • + *
    • XRE - RINET Funds
    • + *
    • RHD - Rhodesian Dollar
    • + *
    • RON - Romanian Leu
    • + *
    • ROL - Romanian Leu (1952–2006)
    • + *
    • RUB - Russian Ruble
    • + *
    • RUR - Russian Ruble (1991–1998)
    • + *
    • RWF - Rwandan Franc
    • + *
    • SVC - Salvadoran Colón
    • + *
    • WST - Samoan Tala
    • + *
    • SAR - Saudi Riyal
    • + *
    • RSD - Serbian Dinar
    • + *
    • CSD - Serbian Dinar (2002–2006)
    • + *
    • SCR - Seychellois Rupee
    • + *
    • SLL - Sierra Leonean Leone
    • + *
    • XAG - Silver
    • + *
    • SGD - Singapore Dollar
    • + *
    • SKK - Slovak Koruna
    • + *
    • SIT - Slovenian Tolar
    • + *
    • SBD - Solomon Islands Dollar
    • + *
    • SOS - Somali Shilling
    • + *
    • ZAR - South African Rand
    • + *
    • ZAL - South African Rand (financial)
    • + *
    • KRH - South Korean Hwan (1953–1962)
    • + *
    • KRW - South Korean Won
    • + *
    • KRO - South Korean Won (1945–1953)
    • + *
    • SSP - South Sudanese Pound
    • + *
    • SUR - Soviet Rouble
    • + *
    • ESP - Spanish Peseta
    • + *
    • ESA - Spanish Peseta (A account)
    • + *
    • ESB - Spanish Peseta (convertible account)
    • + *
    • XDR - Special Drawing Rights
    • + *
    • LKR - Sri Lankan Rupee
    • + *
    • SHP - St. Helena Pound
    • + *
    • XSU - Sucre
    • + *
    • SDD - Sudanese Dinar (1992–2007)
    • + *
    • SDG - Sudanese Pound
    • + *
    • SDP - Sudanese Pound (1957–1998)
    • + *
    • SRD - Surinamese Dollar
    • + *
    • SRG - Surinamese Guilder
    • + *
    • SZL - Swazi Lilangeni
    • + *
    • SEK - Swedish Krona
    • + *
    • CHF - Swiss Franc
    • + *
    • SYP - Syrian Pound
    • + *
    • STN - São Tomé & Príncipe Dobra
    • + *
    • STD - São Tomé & Príncipe Dobra (1977–2017)
    • + *
    • TVD - TVD
    • + *
    • TJR - Tajikistani Ruble
    • + *
    • TJS - Tajikistani Somoni
    • + *
    • TZS - Tanzanian Shilling
    • + *
    • XTS - Testing Currency Code
    • + *
    • THB - Thai Baht
    • + *
    • XXX - The codes assigned for transactions where no currency is involved
    • + *
    • TPE - Timorese Escudo
    • + *
    • TOP - Tongan Paʻanga
    • + *
    • TTD - Trinidad & Tobago Dollar
    • + *
    • TND - Tunisian Dinar
    • + *
    • TRY - Turkish Lira
    • + *
    • TRL - Turkish Lira (1922–2005)
    • + *
    • TMT - Turkmenistani Manat
    • + *
    • TMM - Turkmenistani Manat (1993–2009)
    • + *
    • USD - US Dollar
    • + *
    • USN - US Dollar (Next day)
    • + *
    • USS - US Dollar (Same day)
    • + *
    • UGX - Ugandan Shilling
    • + *
    • UGS - Ugandan Shilling (1966–1987)
    • + *
    • UAH - Ukrainian Hryvnia
    • + *
    • UAK - Ukrainian Karbovanets
    • + *
    • AED - United Arab Emirates Dirham
    • + *
    • UYW - Uruguayan Nominal Wage Index Unit
    • + *
    • UYU - Uruguayan Peso
    • + *
    • UYP - Uruguayan Peso (1975–1993)
    • + *
    • UYI - Uruguayan Peso (Indexed Units)
    • + *
    • UZS - Uzbekistani Som
    • + *
    • VUV - Vanuatu Vatu
    • + *
    • VES - Venezuelan Bolívar
    • + *
    • VEB - Venezuelan Bolívar (1871–2008)
    • + *
    • VEF - Venezuelan Bolívar (2008–2018)
    • + *
    • VND - Vietnamese Dong
    • + *
    • VNN - Vietnamese Dong (1978–1985)
    • + *
    • CHE - WIR Euro
    • + *
    • CHW - WIR Franc
    • + *
    • XOF - West African CFA Franc
    • + *
    • YDD - Yemeni Dinar
    • + *
    • YER - Yemeni Rial
    • + *
    • YUN - Yugoslavian Convertible Dinar (1990–1992)
    • + *
    • YUD - Yugoslavian Hard Dinar (1966–1990)
    • + *
    • YUM - Yugoslavian New Dinar (1994–2002)
    • + *
    • YUR - Yugoslavian Reformed Dinar (1992–1993)
    • + *
    • ZWN - ZWN
    • + *
    • ZRN - Zairean New Zaire (1993–1998)
    • + *
    • ZRZ - Zairean Zaire (1971–1993)
    • + *
    • ZMW - Zambian Kwacha
    • + *
    • ZMK - Zambian Kwacha (1968–2012)
    • + *
    • ZWD - Zimbabwean Dollar (1980–2008)
    • + *
    • ZWR - Zimbabwean Dollar (2008)
    • + *
    • ZWL - Zimbabwean Dollar (2009)
    • + *
    + */ @JsonSetter(value = "currency", nulls = Nulls.SKIP) - public Builder currency(Optional currency) { + public Builder currency(Optional currency) { this.currency = currency; return this; } - public Builder currency(TransactionCurrencyEnum currency) { + public Builder currency(ExpenseCurrency currency) { this.currency = Optional.ofNullable(currency); return this; } + /** + *

    The expense's exchange rate.

    + */ @JsonSetter(value = "exchange_rate", nulls = Nulls.SKIP) public Builder exchangeRate(Optional exchangeRate) { this.exchangeRate = exchangeRate; @@ -910,6 +1254,9 @@ public Builder exchangeRate(String exchangeRate) { return this; } + /** + *

    If the transaction is inclusive or exclusive of tax. True if inclusive, False if exclusive.

    + */ @JsonSetter(value = "inclusive_of_tax", nulls = Nulls.SKIP) public Builder inclusiveOfTax(Optional inclusiveOfTax) { this.inclusiveOfTax = inclusiveOfTax; @@ -921,6 +1268,9 @@ public Builder inclusiveOfTax(Boolean inclusiveOfTax) { return this; } + /** + *

    The company the expense belongs to.

    + */ @JsonSetter(value = "company", nulls = Nulls.SKIP) public Builder company(Optional company) { this.company = company; @@ -932,6 +1282,9 @@ public Builder company(ExpenseCompany company) { return this; } + /** + *

    The employee this overall transaction relates to.

    + */ @JsonSetter(value = "employee", nulls = Nulls.SKIP) public Builder employee(Optional employee) { this.employee = employee; @@ -943,6 +1296,9 @@ public Builder employee(ExpenseEmployee employee) { return this; } + /** + *

    The expense's private note.

    + */ @JsonSetter(value = "memo", nulls = Nulls.SKIP) public Builder memo(Optional memo) { this.memo = memo; @@ -976,6 +1332,9 @@ public Builder trackingCategories(List> return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; @@ -987,6 +1346,9 @@ public Builder remoteWasDeleted(Boolean remoteWasDeleted) { return this; } + /** + *

    The accounting period that the Expense was generated in.

    + */ @JsonSetter(value = "accounting_period", nulls = Nulls.SKIP) public Builder accountingPeriod(Optional accountingPeriod) { this.accountingPeriod = accountingPeriod; diff --git a/src/main/java/com/merge/api/accounting/types/ExpenseCurrency.java b/src/main/java/com/merge/api/accounting/types/ExpenseCurrency.java new file mode 100644 index 000000000..13b6498ee --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/ExpenseCurrency.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = ExpenseCurrency.Deserializer.class) +public final class ExpenseCurrency { + private final Object value; + + private final int type; + + private ExpenseCurrency(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((TransactionCurrencyEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ExpenseCurrency && equalTo((ExpenseCurrency) other); + } + + private boolean equalTo(ExpenseCurrency other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static ExpenseCurrency of(TransactionCurrencyEnum value) { + return new ExpenseCurrency(value, 0); + } + + public static ExpenseCurrency of(String value) { + return new ExpenseCurrency(value, 1); + } + + public interface Visitor { + T visit(TransactionCurrencyEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(ExpenseCurrency.class); + } + + @java.lang.Override + public ExpenseCurrency deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TransactionCurrencyEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/ExpenseEndpointRequest.java b/src/main/java/com/merge/api/accounting/types/ExpenseEndpointRequest.java index 4b5051148..a669571af 100644 --- a/src/main/java/com/merge/api/accounting/types/ExpenseEndpointRequest.java +++ b/src/main/java/com/merge/api/accounting/types/ExpenseEndpointRequest.java @@ -99,10 +99,16 @@ public interface ModelStage { public interface _FinalStage { ExpenseEndpointRequest build(); + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ _FinalStage isDebugMode(Optional isDebugMode); _FinalStage isDebugMode(Boolean isDebugMode); + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ _FinalStage runAsync(Optional runAsync); _FinalStage runAsync(Boolean runAsync); @@ -146,6 +152,9 @@ public _FinalStage runAsync(Boolean runAsync) { return this; } + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ @java.lang.Override @JsonSetter(value = "run_async", nulls = Nulls.SKIP) public _FinalStage runAsync(Optional runAsync) { @@ -163,6 +172,9 @@ public _FinalStage isDebugMode(Boolean isDebugMode) { return this; } + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ @java.lang.Override @JsonSetter(value = "is_debug_mode", nulls = Nulls.SKIP) public _FinalStage isDebugMode(Optional isDebugMode) { diff --git a/src/main/java/com/merge/api/accounting/types/ExpenseLine.java b/src/main/java/com/merge/api/accounting/types/ExpenseLine.java index 08197ec9b..45d40fbd7 100644 --- a/src/main/java/com/merge/api/accounting/types/ExpenseLine.java +++ b/src/main/java/com/merge/api/accounting/types/ExpenseLine.java @@ -48,6 +48,8 @@ public final class ExpenseLine { private final Optional contact; + private final Optional project; + private final Optional description; private final Optional exchangeRate; @@ -72,6 +74,7 @@ private ExpenseLine( Optional currency, Optional account, Optional contact, + Optional project, Optional description, Optional exchangeRate, Optional taxRate, @@ -90,6 +93,7 @@ private ExpenseLine( this.currency = currency; this.account = account; this.contact = contact; + this.project = project; this.description = description; this.exchangeRate = exchangeRate; this.taxRate = taxRate; @@ -503,6 +507,11 @@ public Optional getContact() { return contact; } + @JsonProperty("project") + public Optional getProject() { + return project; + } + /** * @return The description of the item that was purchased by the company. */ @@ -560,6 +569,7 @@ private boolean equalTo(ExpenseLine other) { && currency.equals(other.currency) && account.equals(other.account) && contact.equals(other.contact) + && project.equals(other.project) && description.equals(other.description) && exchangeRate.equals(other.exchangeRate) && taxRate.equals(other.taxRate) @@ -582,6 +592,7 @@ public int hashCode() { this.currency, this.account, this.contact, + this.project, this.description, this.exchangeRate, this.taxRate, @@ -625,6 +636,8 @@ public static final class Builder { private Optional contact = Optional.empty(); + private Optional project = Optional.empty(); + private Optional description = Optional.empty(); private Optional exchangeRate = Optional.empty(); @@ -652,6 +665,7 @@ public Builder from(ExpenseLine other) { currency(other.getCurrency()); account(other.getAccount()); contact(other.getContact()); + project(other.getProject()); description(other.getDescription()); exchangeRate(other.getExchangeRate()); taxRate(other.getTaxRate()); @@ -670,6 +684,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -681,6 +698,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -692,6 +712,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -703,6 +726,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The line's item.

    + */ @JsonSetter(value = "item", nulls = Nulls.SKIP) public Builder item(Optional item) { this.item = item; @@ -714,6 +740,9 @@ public Builder item(ExpenseLineItem item) { return this; } + /** + *

    The line's net amount.

    + */ @JsonSetter(value = "net_amount", nulls = Nulls.SKIP) public Builder netAmount(Optional netAmount) { this.netAmount = netAmount; @@ -736,6 +765,9 @@ public Builder trackingCategory(ExpenseLineTrackingCategory trackingCategory) { return this; } + /** + *

    The expense line item's associated tracking categories.

    + */ @JsonSetter(value = "tracking_categories", nulls = Nulls.SKIP) public Builder trackingCategories( Optional>> trackingCategories) { @@ -748,6 +780,9 @@ public Builder trackingCategories(ListThe company the expense belongs to.

    + */ @JsonSetter(value = "company", nulls = Nulls.SKIP) public Builder company(Optional company) { this.company = company; @@ -759,6 +794,9 @@ public Builder company(String company) { return this; } + /** + *

    The employee this overall transaction relates to.

    + */ @JsonSetter(value = "employee", nulls = Nulls.SKIP) public Builder employee(Optional employee) { this.employee = employee; @@ -770,6 +808,317 @@ public Builder employee(ExpenseLineEmployee employee) { return this; } + /** + *

    The expense line item's currency.

    + *
      + *
    • XUA - ADB Unit of Account
    • + *
    • AFN - Afghan Afghani
    • + *
    • AFA - Afghan Afghani (1927–2002)
    • + *
    • ALL - Albanian Lek
    • + *
    • ALK - Albanian Lek (1946–1965)
    • + *
    • DZD - Algerian Dinar
    • + *
    • ADP - Andorran Peseta
    • + *
    • AOA - Angolan Kwanza
    • + *
    • AOK - Angolan Kwanza (1977–1991)
    • + *
    • AON - Angolan New Kwanza (1990–2000)
    • + *
    • AOR - Angolan Readjusted Kwanza (1995–1999)
    • + *
    • ARA - Argentine Austral
    • + *
    • ARS - Argentine Peso
    • + *
    • ARM - Argentine Peso (1881–1970)
    • + *
    • ARP - Argentine Peso (1983–1985)
    • + *
    • ARL - Argentine Peso Ley (1970–1983)
    • + *
    • AMD - Armenian Dram
    • + *
    • AWG - Aruban Florin
    • + *
    • AUD - Australian Dollar
    • + *
    • ATS - Austrian Schilling
    • + *
    • AZN - Azerbaijani Manat
    • + *
    • AZM - Azerbaijani Manat (1993–2006)
    • + *
    • BSD - Bahamian Dollar
    • + *
    • BHD - Bahraini Dinar
    • + *
    • BDT - Bangladeshi Taka
    • + *
    • BBD - Barbadian Dollar
    • + *
    • BYN - Belarusian Ruble
    • + *
    • BYB - Belarusian Ruble (1994–1999)
    • + *
    • BYR - Belarusian Ruble (2000–2016)
    • + *
    • BEF - Belgian Franc
    • + *
    • BEC - Belgian Franc (convertible)
    • + *
    • BEL - Belgian Franc (financial)
    • + *
    • BZD - Belize Dollar
    • + *
    • BMD - Bermudan Dollar
    • + *
    • BTN - Bhutanese Ngultrum
    • + *
    • BOB - Bolivian Boliviano
    • + *
    • BOL - Bolivian Boliviano (1863–1963)
    • + *
    • BOV - Bolivian Mvdol
    • + *
    • BOP - Bolivian Peso
    • + *
    • BAM - Bosnia-Herzegovina Convertible Mark
    • + *
    • BAD - Bosnia-Herzegovina Dinar (1992–1994)
    • + *
    • BAN - Bosnia-Herzegovina New Dinar (1994–1997)
    • + *
    • BWP - Botswanan Pula
    • + *
    • BRC - Brazilian Cruzado (1986–1989)
    • + *
    • BRZ - Brazilian Cruzeiro (1942–1967)
    • + *
    • BRE - Brazilian Cruzeiro (1990–1993)
    • + *
    • BRR - Brazilian Cruzeiro (1993–1994)
    • + *
    • BRN - Brazilian New Cruzado (1989–1990)
    • + *
    • BRB - Brazilian New Cruzeiro (1967–1986)
    • + *
    • BRL - Brazilian Real
    • + *
    • GBP - British Pound
    • + *
    • BND - Brunei Dollar
    • + *
    • BGL - Bulgarian Hard Lev
    • + *
    • BGN - Bulgarian Lev
    • + *
    • BGO - Bulgarian Lev (1879–1952)
    • + *
    • BGM - Bulgarian Socialist Lev
    • + *
    • BUK - Burmese Kyat
    • + *
    • BIF - Burundian Franc
    • + *
    • XPF - CFP Franc
    • + *
    • KHR - Cambodian Riel
    • + *
    • CAD - Canadian Dollar
    • + *
    • CVE - Cape Verdean Escudo
    • + *
    • KYD - Cayman Islands Dollar
    • + *
    • XAF - Central African CFA Franc
    • + *
    • CLE - Chilean Escudo
    • + *
    • CLP - Chilean Peso
    • + *
    • CLF - Chilean Unit of Account (UF)
    • + *
    • CNX - Chinese People’s Bank Dollar
    • + *
    • CNY - Chinese Yuan
    • + *
    • CNH - Chinese Yuan (offshore)
    • + *
    • COP - Colombian Peso
    • + *
    • COU - Colombian Real Value Unit
    • + *
    • KMF - Comorian Franc
    • + *
    • CDF - Congolese Franc
    • + *
    • CRC - Costa Rican Colón
    • + *
    • HRD - Croatian Dinar
    • + *
    • HRK - Croatian Kuna
    • + *
    • CUC - Cuban Convertible Peso
    • + *
    • CUP - Cuban Peso
    • + *
    • CYP - Cypriot Pound
    • + *
    • CZK - Czech Koruna
    • + *
    • CSK - Czechoslovak Hard Koruna
    • + *
    • DKK - Danish Krone
    • + *
    • DJF - Djiboutian Franc
    • + *
    • DOP - Dominican Peso
    • + *
    • NLG - Dutch Guilder
    • + *
    • XCD - East Caribbean Dollar
    • + *
    • DDM - East German Mark
    • + *
    • ECS - Ecuadorian Sucre
    • + *
    • ECV - Ecuadorian Unit of Constant Value
    • + *
    • EGP - Egyptian Pound
    • + *
    • GQE - Equatorial Guinean Ekwele
    • + *
    • ERN - Eritrean Nakfa
    • + *
    • EEK - Estonian Kroon
    • + *
    • ETB - Ethiopian Birr
    • + *
    • EUR - Euro
    • + *
    • XBA - European Composite Unit
    • + *
    • XEU - European Currency Unit
    • + *
    • XBB - European Monetary Unit
    • + *
    • XBC - European Unit of Account (XBC)
    • + *
    • XBD - European Unit of Account (XBD)
    • + *
    • FKP - Falkland Islands Pound
    • + *
    • FJD - Fijian Dollar
    • + *
    • FIM - Finnish Markka
    • + *
    • FRF - French Franc
    • + *
    • XFO - French Gold Franc
    • + *
    • XFU - French UIC-Franc
    • + *
    • GMD - Gambian Dalasi
    • + *
    • GEK - Georgian Kupon Larit
    • + *
    • GEL - Georgian Lari
    • + *
    • DEM - German Mark
    • + *
    • GHS - Ghanaian Cedi
    • + *
    • GHC - Ghanaian Cedi (1979–2007)
    • + *
    • GIP - Gibraltar Pound
    • + *
    • XAU - Gold
    • + *
    • GRD - Greek Drachma
    • + *
    • GTQ - Guatemalan Quetzal
    • + *
    • GWP - Guinea-Bissau Peso
    • + *
    • GNF - Guinean Franc
    • + *
    • GNS - Guinean Syli
    • + *
    • GYD - Guyanaese Dollar
    • + *
    • HTG - Haitian Gourde
    • + *
    • HNL - Honduran Lempira
    • + *
    • HKD - Hong Kong Dollar
    • + *
    • HUF - Hungarian Forint
    • + *
    • IMP - IMP
    • + *
    • ISK - Icelandic Króna
    • + *
    • ISJ - Icelandic Króna (1918–1981)
    • + *
    • INR - Indian Rupee
    • + *
    • IDR - Indonesian Rupiah
    • + *
    • IRR - Iranian Rial
    • + *
    • IQD - Iraqi Dinar
    • + *
    • IEP - Irish Pound
    • + *
    • ILS - Israeli New Shekel
    • + *
    • ILP - Israeli Pound
    • + *
    • ILR - Israeli Shekel (1980–1985)
    • + *
    • ITL - Italian Lira
    • + *
    • JMD - Jamaican Dollar
    • + *
    • JPY - Japanese Yen
    • + *
    • JOD - Jordanian Dinar
    • + *
    • KZT - Kazakhstani Tenge
    • + *
    • KES - Kenyan Shilling
    • + *
    • KWD - Kuwaiti Dinar
    • + *
    • KGS - Kyrgystani Som
    • + *
    • LAK - Laotian Kip
    • + *
    • LVL - Latvian Lats
    • + *
    • LVR - Latvian Ruble
    • + *
    • LBP - Lebanese Pound
    • + *
    • LSL - Lesotho Loti
    • + *
    • LRD - Liberian Dollar
    • + *
    • LYD - Libyan Dinar
    • + *
    • LTL - Lithuanian Litas
    • + *
    • LTT - Lithuanian Talonas
    • + *
    • LUL - Luxembourg Financial Franc
    • + *
    • LUC - Luxembourgian Convertible Franc
    • + *
    • LUF - Luxembourgian Franc
    • + *
    • MOP - Macanese Pataca
    • + *
    • MKD - Macedonian Denar
    • + *
    • MKN - Macedonian Denar (1992–1993)
    • + *
    • MGA - Malagasy Ariary
    • + *
    • MGF - Malagasy Franc
    • + *
    • MWK - Malawian Kwacha
    • + *
    • MYR - Malaysian Ringgit
    • + *
    • MVR - Maldivian Rufiyaa
    • + *
    • MVP - Maldivian Rupee (1947–1981)
    • + *
    • MLF - Malian Franc
    • + *
    • MTL - Maltese Lira
    • + *
    • MTP - Maltese Pound
    • + *
    • MRU - Mauritanian Ouguiya
    • + *
    • MRO - Mauritanian Ouguiya (1973–2017)
    • + *
    • MUR - Mauritian Rupee
    • + *
    • MXV - Mexican Investment Unit
    • + *
    • MXN - Mexican Peso
    • + *
    • MXP - Mexican Silver Peso (1861–1992)
    • + *
    • MDC - Moldovan Cupon
    • + *
    • MDL - Moldovan Leu
    • + *
    • MCF - Monegasque Franc
    • + *
    • MNT - Mongolian Tugrik
    • + *
    • MAD - Moroccan Dirham
    • + *
    • MAF - Moroccan Franc
    • + *
    • MZE - Mozambican Escudo
    • + *
    • MZN - Mozambican Metical
    • + *
    • MZM - Mozambican Metical (1980–2006)
    • + *
    • MMK - Myanmar Kyat
    • + *
    • NAD - Namibian Dollar
    • + *
    • NPR - Nepalese Rupee
    • + *
    • ANG - Netherlands Antillean Guilder
    • + *
    • TWD - New Taiwan Dollar
    • + *
    • NZD - New Zealand Dollar
    • + *
    • NIO - Nicaraguan Córdoba
    • + *
    • NIC - Nicaraguan Córdoba (1988–1991)
    • + *
    • NGN - Nigerian Naira
    • + *
    • KPW - North Korean Won
    • + *
    • NOK - Norwegian Krone
    • + *
    • OMR - Omani Rial
    • + *
    • PKR - Pakistani Rupee
    • + *
    • XPD - Palladium
    • + *
    • PAB - Panamanian Balboa
    • + *
    • PGK - Papua New Guinean Kina
    • + *
    • PYG - Paraguayan Guarani
    • + *
    • PEI - Peruvian Inti
    • + *
    • PEN - Peruvian Sol
    • + *
    • PES - Peruvian Sol (1863–1965)
    • + *
    • PHP - Philippine Peso
    • + *
    • XPT - Platinum
    • + *
    • PLN - Polish Zloty
    • + *
    • PLZ - Polish Zloty (1950–1995)
    • + *
    • PTE - Portuguese Escudo
    • + *
    • GWE - Portuguese Guinea Escudo
    • + *
    • QAR - Qatari Rial
    • + *
    • XRE - RINET Funds
    • + *
    • RHD - Rhodesian Dollar
    • + *
    • RON - Romanian Leu
    • + *
    • ROL - Romanian Leu (1952–2006)
    • + *
    • RUB - Russian Ruble
    • + *
    • RUR - Russian Ruble (1991–1998)
    • + *
    • RWF - Rwandan Franc
    • + *
    • SVC - Salvadoran Colón
    • + *
    • WST - Samoan Tala
    • + *
    • SAR - Saudi Riyal
    • + *
    • RSD - Serbian Dinar
    • + *
    • CSD - Serbian Dinar (2002–2006)
    • + *
    • SCR - Seychellois Rupee
    • + *
    • SLL - Sierra Leonean Leone
    • + *
    • XAG - Silver
    • + *
    • SGD - Singapore Dollar
    • + *
    • SKK - Slovak Koruna
    • + *
    • SIT - Slovenian Tolar
    • + *
    • SBD - Solomon Islands Dollar
    • + *
    • SOS - Somali Shilling
    • + *
    • ZAR - South African Rand
    • + *
    • ZAL - South African Rand (financial)
    • + *
    • KRH - South Korean Hwan (1953–1962)
    • + *
    • KRW - South Korean Won
    • + *
    • KRO - South Korean Won (1945–1953)
    • + *
    • SSP - South Sudanese Pound
    • + *
    • SUR - Soviet Rouble
    • + *
    • ESP - Spanish Peseta
    • + *
    • ESA - Spanish Peseta (A account)
    • + *
    • ESB - Spanish Peseta (convertible account)
    • + *
    • XDR - Special Drawing Rights
    • + *
    • LKR - Sri Lankan Rupee
    • + *
    • SHP - St. Helena Pound
    • + *
    • XSU - Sucre
    • + *
    • SDD - Sudanese Dinar (1992–2007)
    • + *
    • SDG - Sudanese Pound
    • + *
    • SDP - Sudanese Pound (1957–1998)
    • + *
    • SRD - Surinamese Dollar
    • + *
    • SRG - Surinamese Guilder
    • + *
    • SZL - Swazi Lilangeni
    • + *
    • SEK - Swedish Krona
    • + *
    • CHF - Swiss Franc
    • + *
    • SYP - Syrian Pound
    • + *
    • STN - São Tomé & Príncipe Dobra
    • + *
    • STD - São Tomé & Príncipe Dobra (1977–2017)
    • + *
    • TVD - TVD
    • + *
    • TJR - Tajikistani Ruble
    • + *
    • TJS - Tajikistani Somoni
    • + *
    • TZS - Tanzanian Shilling
    • + *
    • XTS - Testing Currency Code
    • + *
    • THB - Thai Baht
    • + *
    • XXX - The codes assigned for transactions where no currency is involved
    • + *
    • TPE - Timorese Escudo
    • + *
    • TOP - Tongan Paʻanga
    • + *
    • TTD - Trinidad & Tobago Dollar
    • + *
    • TND - Tunisian Dinar
    • + *
    • TRY - Turkish Lira
    • + *
    • TRL - Turkish Lira (1922–2005)
    • + *
    • TMT - Turkmenistani Manat
    • + *
    • TMM - Turkmenistani Manat (1993–2009)
    • + *
    • USD - US Dollar
    • + *
    • USN - US Dollar (Next day)
    • + *
    • USS - US Dollar (Same day)
    • + *
    • UGX - Ugandan Shilling
    • + *
    • UGS - Ugandan Shilling (1966–1987)
    • + *
    • UAH - Ukrainian Hryvnia
    • + *
    • UAK - Ukrainian Karbovanets
    • + *
    • AED - United Arab Emirates Dirham
    • + *
    • UYW - Uruguayan Nominal Wage Index Unit
    • + *
    • UYU - Uruguayan Peso
    • + *
    • UYP - Uruguayan Peso (1975–1993)
    • + *
    • UYI - Uruguayan Peso (Indexed Units)
    • + *
    • UZS - Uzbekistani Som
    • + *
    • VUV - Vanuatu Vatu
    • + *
    • VES - Venezuelan Bolívar
    • + *
    • VEB - Venezuelan Bolívar (1871–2008)
    • + *
    • VEF - Venezuelan Bolívar (2008–2018)
    • + *
    • VND - Vietnamese Dong
    • + *
    • VNN - Vietnamese Dong (1978–1985)
    • + *
    • CHE - WIR Euro
    • + *
    • CHW - WIR Franc
    • + *
    • XOF - West African CFA Franc
    • + *
    • YDD - Yemeni Dinar
    • + *
    • YER - Yemeni Rial
    • + *
    • YUN - Yugoslavian Convertible Dinar (1990–1992)
    • + *
    • YUD - Yugoslavian Hard Dinar (1966–1990)
    • + *
    • YUM - Yugoslavian New Dinar (1994–2002)
    • + *
    • YUR - Yugoslavian Reformed Dinar (1992–1993)
    • + *
    • ZWN - ZWN
    • + *
    • ZRN - Zairean New Zaire (1993–1998)
    • + *
    • ZRZ - Zairean Zaire (1971–1993)
    • + *
    • ZMW - Zambian Kwacha
    • + *
    • ZMK - Zambian Kwacha (1968–2012)
    • + *
    • ZWD - Zimbabwean Dollar (1980–2008)
    • + *
    • ZWR - Zimbabwean Dollar (2008)
    • + *
    • ZWL - Zimbabwean Dollar (2009)
    • + *
    + */ @JsonSetter(value = "currency", nulls = Nulls.SKIP) public Builder currency(Optional currency) { this.currency = currency; @@ -781,6 +1130,9 @@ public Builder currency(TransactionCurrencyEnum currency) { return this; } + /** + *

    The expense's payment account.

    + */ @JsonSetter(value = "account", nulls = Nulls.SKIP) public Builder account(Optional account) { this.account = account; @@ -792,6 +1144,9 @@ public Builder account(ExpenseLineAccount account) { return this; } + /** + *

    The expense's contact.

    + */ @JsonSetter(value = "contact", nulls = Nulls.SKIP) public Builder contact(Optional contact) { this.contact = contact; @@ -803,6 +1158,20 @@ public Builder contact(ExpenseLineContact contact) { return this; } + @JsonSetter(value = "project", nulls = Nulls.SKIP) + public Builder project(Optional project) { + this.project = project; + return this; + } + + public Builder project(ExpenseLineProject project) { + this.project = Optional.ofNullable(project); + return this; + } + + /** + *

    The description of the item that was purchased by the company.

    + */ @JsonSetter(value = "description", nulls = Nulls.SKIP) public Builder description(Optional description) { this.description = description; @@ -814,6 +1183,9 @@ public Builder description(String description) { return this; } + /** + *

    The expense line item's exchange rate.

    + */ @JsonSetter(value = "exchange_rate", nulls = Nulls.SKIP) public Builder exchangeRate(Optional exchangeRate) { this.exchangeRate = exchangeRate; @@ -825,6 +1197,9 @@ public Builder exchangeRate(String exchangeRate) { return this; } + /** + *

    The tax rate that applies to this line item.

    + */ @JsonSetter(value = "tax_rate", nulls = Nulls.SKIP) public Builder taxRate(Optional taxRate) { this.taxRate = taxRate; @@ -836,6 +1211,9 @@ public Builder taxRate(String taxRate) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; @@ -862,6 +1240,7 @@ public ExpenseLine build() { currency, account, contact, + project, description, exchangeRate, taxRate, diff --git a/src/main/java/com/merge/api/accounting/types/ExpenseLineProject.java b/src/main/java/com/merge/api/accounting/types/ExpenseLineProject.java new file mode 100644 index 000000000..3659a1be8 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/ExpenseLineProject.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = ExpenseLineProject.Deserializer.class) +public final class ExpenseLineProject { + private final Object value; + + private final int type; + + private ExpenseLineProject(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((Project) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ExpenseLineProject && equalTo((ExpenseLineProject) other); + } + + private boolean equalTo(ExpenseLineProject other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static ExpenseLineProject of(String value) { + return new ExpenseLineProject(value, 0); + } + + public static ExpenseLineProject of(Project value) { + return new ExpenseLineProject(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(Project value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(ExpenseLineProject.class); + } + + @java.lang.Override + public ExpenseLineProject deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, Project.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/ExpenseLineRequest.java b/src/main/java/com/merge/api/accounting/types/ExpenseLineRequest.java index fc36c329e..85bc8ad6d 100644 --- a/src/main/java/com/merge/api/accounting/types/ExpenseLineRequest.java +++ b/src/main/java/com/merge/api/accounting/types/ExpenseLineRequest.java @@ -36,12 +36,14 @@ public final class ExpenseLineRequest { private final Optional employee; - private final Optional currency; + private final Optional currency; private final Optional account; private final Optional contact; + private final Optional project; + private final Optional description; private final Optional exchangeRate; @@ -64,9 +66,10 @@ private ExpenseLineRequest( Optional>> trackingCategories, Optional company, Optional employee, - Optional currency, + Optional currency, Optional account, Optional contact, + Optional project, Optional description, Optional exchangeRate, Optional taxRate, @@ -84,6 +87,7 @@ private ExpenseLineRequest( this.currency = currency; this.account = account; this.contact = contact; + this.project = project; this.description = description; this.exchangeRate = exchangeRate; this.taxRate = taxRate; @@ -458,7 +462,7 @@ public Optional getEmployee() { * */ @JsonProperty("currency") - public Optional getCurrency() { + public Optional getCurrency() { return currency; } @@ -478,6 +482,11 @@ public Optional getContact() { return contact; } + @JsonProperty("project") + public Optional getProject() { + return project; + } + /** * @return The description of the item that was purchased by the company. */ @@ -539,6 +548,7 @@ private boolean equalTo(ExpenseLineRequest other) { && currency.equals(other.currency) && account.equals(other.account) && contact.equals(other.contact) + && project.equals(other.project) && description.equals(other.description) && exchangeRate.equals(other.exchangeRate) && taxRate.equals(other.taxRate) @@ -560,6 +570,7 @@ public int hashCode() { this.currency, this.account, this.contact, + this.project, this.description, this.exchangeRate, this.taxRate, @@ -594,12 +605,14 @@ public static final class Builder { private Optional employee = Optional.empty(); - private Optional currency = Optional.empty(); + private Optional currency = Optional.empty(); private Optional account = Optional.empty(); private Optional contact = Optional.empty(); + private Optional project = Optional.empty(); + private Optional description = Optional.empty(); private Optional exchangeRate = Optional.empty(); @@ -628,6 +641,7 @@ public Builder from(ExpenseLineRequest other) { currency(other.getCurrency()); account(other.getAccount()); contact(other.getContact()); + project(other.getProject()); description(other.getDescription()); exchangeRate(other.getExchangeRate()); taxRate(other.getTaxRate()); @@ -637,6 +651,9 @@ public Builder from(ExpenseLineRequest other) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -648,6 +665,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The line's item.

    + */ @JsonSetter(value = "item", nulls = Nulls.SKIP) public Builder item(Optional item) { this.item = item; @@ -659,6 +679,9 @@ public Builder item(ExpenseLineRequestItem item) { return this; } + /** + *

    The line's net amount.

    + */ @JsonSetter(value = "net_amount", nulls = Nulls.SKIP) public Builder netAmount(Optional netAmount) { this.netAmount = netAmount; @@ -681,6 +704,9 @@ public Builder trackingCategory(ExpenseLineRequestTrackingCategory trackingCateg return this; } + /** + *

    The expense line item's associated tracking categories.

    + */ @JsonSetter(value = "tracking_categories", nulls = Nulls.SKIP) public Builder trackingCategories( Optional>> trackingCategories) { @@ -693,6 +719,9 @@ public Builder trackingCategories(ListThe company the expense belongs to.

    + */ @JsonSetter(value = "company", nulls = Nulls.SKIP) public Builder company(Optional company) { this.company = company; @@ -704,6 +733,9 @@ public Builder company(String company) { return this; } + /** + *

    The employee this overall transaction relates to.

    + */ @JsonSetter(value = "employee", nulls = Nulls.SKIP) public Builder employee(Optional employee) { this.employee = employee; @@ -715,17 +747,331 @@ public Builder employee(ExpenseLineRequestEmployee employee) { return this; } + /** + *

    The expense line item's currency.

    + *
      + *
    • XUA - ADB Unit of Account
    • + *
    • AFN - Afghan Afghani
    • + *
    • AFA - Afghan Afghani (1927–2002)
    • + *
    • ALL - Albanian Lek
    • + *
    • ALK - Albanian Lek (1946–1965)
    • + *
    • DZD - Algerian Dinar
    • + *
    • ADP - Andorran Peseta
    • + *
    • AOA - Angolan Kwanza
    • + *
    • AOK - Angolan Kwanza (1977–1991)
    • + *
    • AON - Angolan New Kwanza (1990–2000)
    • + *
    • AOR - Angolan Readjusted Kwanza (1995–1999)
    • + *
    • ARA - Argentine Austral
    • + *
    • ARS - Argentine Peso
    • + *
    • ARM - Argentine Peso (1881–1970)
    • + *
    • ARP - Argentine Peso (1983–1985)
    • + *
    • ARL - Argentine Peso Ley (1970–1983)
    • + *
    • AMD - Armenian Dram
    • + *
    • AWG - Aruban Florin
    • + *
    • AUD - Australian Dollar
    • + *
    • ATS - Austrian Schilling
    • + *
    • AZN - Azerbaijani Manat
    • + *
    • AZM - Azerbaijani Manat (1993–2006)
    • + *
    • BSD - Bahamian Dollar
    • + *
    • BHD - Bahraini Dinar
    • + *
    • BDT - Bangladeshi Taka
    • + *
    • BBD - Barbadian Dollar
    • + *
    • BYN - Belarusian Ruble
    • + *
    • BYB - Belarusian Ruble (1994–1999)
    • + *
    • BYR - Belarusian Ruble (2000–2016)
    • + *
    • BEF - Belgian Franc
    • + *
    • BEC - Belgian Franc (convertible)
    • + *
    • BEL - Belgian Franc (financial)
    • + *
    • BZD - Belize Dollar
    • + *
    • BMD - Bermudan Dollar
    • + *
    • BTN - Bhutanese Ngultrum
    • + *
    • BOB - Bolivian Boliviano
    • + *
    • BOL - Bolivian Boliviano (1863–1963)
    • + *
    • BOV - Bolivian Mvdol
    • + *
    • BOP - Bolivian Peso
    • + *
    • BAM - Bosnia-Herzegovina Convertible Mark
    • + *
    • BAD - Bosnia-Herzegovina Dinar (1992–1994)
    • + *
    • BAN - Bosnia-Herzegovina New Dinar (1994–1997)
    • + *
    • BWP - Botswanan Pula
    • + *
    • BRC - Brazilian Cruzado (1986–1989)
    • + *
    • BRZ - Brazilian Cruzeiro (1942–1967)
    • + *
    • BRE - Brazilian Cruzeiro (1990–1993)
    • + *
    • BRR - Brazilian Cruzeiro (1993–1994)
    • + *
    • BRN - Brazilian New Cruzado (1989–1990)
    • + *
    • BRB - Brazilian New Cruzeiro (1967–1986)
    • + *
    • BRL - Brazilian Real
    • + *
    • GBP - British Pound
    • + *
    • BND - Brunei Dollar
    • + *
    • BGL - Bulgarian Hard Lev
    • + *
    • BGN - Bulgarian Lev
    • + *
    • BGO - Bulgarian Lev (1879–1952)
    • + *
    • BGM - Bulgarian Socialist Lev
    • + *
    • BUK - Burmese Kyat
    • + *
    • BIF - Burundian Franc
    • + *
    • XPF - CFP Franc
    • + *
    • KHR - Cambodian Riel
    • + *
    • CAD - Canadian Dollar
    • + *
    • CVE - Cape Verdean Escudo
    • + *
    • KYD - Cayman Islands Dollar
    • + *
    • XAF - Central African CFA Franc
    • + *
    • CLE - Chilean Escudo
    • + *
    • CLP - Chilean Peso
    • + *
    • CLF - Chilean Unit of Account (UF)
    • + *
    • CNX - Chinese People’s Bank Dollar
    • + *
    • CNY - Chinese Yuan
    • + *
    • CNH - Chinese Yuan (offshore)
    • + *
    • COP - Colombian Peso
    • + *
    • COU - Colombian Real Value Unit
    • + *
    • KMF - Comorian Franc
    • + *
    • CDF - Congolese Franc
    • + *
    • CRC - Costa Rican Colón
    • + *
    • HRD - Croatian Dinar
    • + *
    • HRK - Croatian Kuna
    • + *
    • CUC - Cuban Convertible Peso
    • + *
    • CUP - Cuban Peso
    • + *
    • CYP - Cypriot Pound
    • + *
    • CZK - Czech Koruna
    • + *
    • CSK - Czechoslovak Hard Koruna
    • + *
    • DKK - Danish Krone
    • + *
    • DJF - Djiboutian Franc
    • + *
    • DOP - Dominican Peso
    • + *
    • NLG - Dutch Guilder
    • + *
    • XCD - East Caribbean Dollar
    • + *
    • DDM - East German Mark
    • + *
    • ECS - Ecuadorian Sucre
    • + *
    • ECV - Ecuadorian Unit of Constant Value
    • + *
    • EGP - Egyptian Pound
    • + *
    • GQE - Equatorial Guinean Ekwele
    • + *
    • ERN - Eritrean Nakfa
    • + *
    • EEK - Estonian Kroon
    • + *
    • ETB - Ethiopian Birr
    • + *
    • EUR - Euro
    • + *
    • XBA - European Composite Unit
    • + *
    • XEU - European Currency Unit
    • + *
    • XBB - European Monetary Unit
    • + *
    • XBC - European Unit of Account (XBC)
    • + *
    • XBD - European Unit of Account (XBD)
    • + *
    • FKP - Falkland Islands Pound
    • + *
    • FJD - Fijian Dollar
    • + *
    • FIM - Finnish Markka
    • + *
    • FRF - French Franc
    • + *
    • XFO - French Gold Franc
    • + *
    • XFU - French UIC-Franc
    • + *
    • GMD - Gambian Dalasi
    • + *
    • GEK - Georgian Kupon Larit
    • + *
    • GEL - Georgian Lari
    • + *
    • DEM - German Mark
    • + *
    • GHS - Ghanaian Cedi
    • + *
    • GHC - Ghanaian Cedi (1979–2007)
    • + *
    • GIP - Gibraltar Pound
    • + *
    • XAU - Gold
    • + *
    • GRD - Greek Drachma
    • + *
    • GTQ - Guatemalan Quetzal
    • + *
    • GWP - Guinea-Bissau Peso
    • + *
    • GNF - Guinean Franc
    • + *
    • GNS - Guinean Syli
    • + *
    • GYD - Guyanaese Dollar
    • + *
    • HTG - Haitian Gourde
    • + *
    • HNL - Honduran Lempira
    • + *
    • HKD - Hong Kong Dollar
    • + *
    • HUF - Hungarian Forint
    • + *
    • IMP - IMP
    • + *
    • ISK - Icelandic Króna
    • + *
    • ISJ - Icelandic Króna (1918–1981)
    • + *
    • INR - Indian Rupee
    • + *
    • IDR - Indonesian Rupiah
    • + *
    • IRR - Iranian Rial
    • + *
    • IQD - Iraqi Dinar
    • + *
    • IEP - Irish Pound
    • + *
    • ILS - Israeli New Shekel
    • + *
    • ILP - Israeli Pound
    • + *
    • ILR - Israeli Shekel (1980–1985)
    • + *
    • ITL - Italian Lira
    • + *
    • JMD - Jamaican Dollar
    • + *
    • JPY - Japanese Yen
    • + *
    • JOD - Jordanian Dinar
    • + *
    • KZT - Kazakhstani Tenge
    • + *
    • KES - Kenyan Shilling
    • + *
    • KWD - Kuwaiti Dinar
    • + *
    • KGS - Kyrgystani Som
    • + *
    • LAK - Laotian Kip
    • + *
    • LVL - Latvian Lats
    • + *
    • LVR - Latvian Ruble
    • + *
    • LBP - Lebanese Pound
    • + *
    • LSL - Lesotho Loti
    • + *
    • LRD - Liberian Dollar
    • + *
    • LYD - Libyan Dinar
    • + *
    • LTL - Lithuanian Litas
    • + *
    • LTT - Lithuanian Talonas
    • + *
    • LUL - Luxembourg Financial Franc
    • + *
    • LUC - Luxembourgian Convertible Franc
    • + *
    • LUF - Luxembourgian Franc
    • + *
    • MOP - Macanese Pataca
    • + *
    • MKD - Macedonian Denar
    • + *
    • MKN - Macedonian Denar (1992–1993)
    • + *
    • MGA - Malagasy Ariary
    • + *
    • MGF - Malagasy Franc
    • + *
    • MWK - Malawian Kwacha
    • + *
    • MYR - Malaysian Ringgit
    • + *
    • MVR - Maldivian Rufiyaa
    • + *
    • MVP - Maldivian Rupee (1947–1981)
    • + *
    • MLF - Malian Franc
    • + *
    • MTL - Maltese Lira
    • + *
    • MTP - Maltese Pound
    • + *
    • MRU - Mauritanian Ouguiya
    • + *
    • MRO - Mauritanian Ouguiya (1973–2017)
    • + *
    • MUR - Mauritian Rupee
    • + *
    • MXV - Mexican Investment Unit
    • + *
    • MXN - Mexican Peso
    • + *
    • MXP - Mexican Silver Peso (1861–1992)
    • + *
    • MDC - Moldovan Cupon
    • + *
    • MDL - Moldovan Leu
    • + *
    • MCF - Monegasque Franc
    • + *
    • MNT - Mongolian Tugrik
    • + *
    • MAD - Moroccan Dirham
    • + *
    • MAF - Moroccan Franc
    • + *
    • MZE - Mozambican Escudo
    • + *
    • MZN - Mozambican Metical
    • + *
    • MZM - Mozambican Metical (1980–2006)
    • + *
    • MMK - Myanmar Kyat
    • + *
    • NAD - Namibian Dollar
    • + *
    • NPR - Nepalese Rupee
    • + *
    • ANG - Netherlands Antillean Guilder
    • + *
    • TWD - New Taiwan Dollar
    • + *
    • NZD - New Zealand Dollar
    • + *
    • NIO - Nicaraguan Córdoba
    • + *
    • NIC - Nicaraguan Córdoba (1988–1991)
    • + *
    • NGN - Nigerian Naira
    • + *
    • KPW - North Korean Won
    • + *
    • NOK - Norwegian Krone
    • + *
    • OMR - Omani Rial
    • + *
    • PKR - Pakistani Rupee
    • + *
    • XPD - Palladium
    • + *
    • PAB - Panamanian Balboa
    • + *
    • PGK - Papua New Guinean Kina
    • + *
    • PYG - Paraguayan Guarani
    • + *
    • PEI - Peruvian Inti
    • + *
    • PEN - Peruvian Sol
    • + *
    • PES - Peruvian Sol (1863–1965)
    • + *
    • PHP - Philippine Peso
    • + *
    • XPT - Platinum
    • + *
    • PLN - Polish Zloty
    • + *
    • PLZ - Polish Zloty (1950–1995)
    • + *
    • PTE - Portuguese Escudo
    • + *
    • GWE - Portuguese Guinea Escudo
    • + *
    • QAR - Qatari Rial
    • + *
    • XRE - RINET Funds
    • + *
    • RHD - Rhodesian Dollar
    • + *
    • RON - Romanian Leu
    • + *
    • ROL - Romanian Leu (1952–2006)
    • + *
    • RUB - Russian Ruble
    • + *
    • RUR - Russian Ruble (1991–1998)
    • + *
    • RWF - Rwandan Franc
    • + *
    • SVC - Salvadoran Colón
    • + *
    • WST - Samoan Tala
    • + *
    • SAR - Saudi Riyal
    • + *
    • RSD - Serbian Dinar
    • + *
    • CSD - Serbian Dinar (2002–2006)
    • + *
    • SCR - Seychellois Rupee
    • + *
    • SLL - Sierra Leonean Leone
    • + *
    • XAG - Silver
    • + *
    • SGD - Singapore Dollar
    • + *
    • SKK - Slovak Koruna
    • + *
    • SIT - Slovenian Tolar
    • + *
    • SBD - Solomon Islands Dollar
    • + *
    • SOS - Somali Shilling
    • + *
    • ZAR - South African Rand
    • + *
    • ZAL - South African Rand (financial)
    • + *
    • KRH - South Korean Hwan (1953–1962)
    • + *
    • KRW - South Korean Won
    • + *
    • KRO - South Korean Won (1945–1953)
    • + *
    • SSP - South Sudanese Pound
    • + *
    • SUR - Soviet Rouble
    • + *
    • ESP - Spanish Peseta
    • + *
    • ESA - Spanish Peseta (A account)
    • + *
    • ESB - Spanish Peseta (convertible account)
    • + *
    • XDR - Special Drawing Rights
    • + *
    • LKR - Sri Lankan Rupee
    • + *
    • SHP - St. Helena Pound
    • + *
    • XSU - Sucre
    • + *
    • SDD - Sudanese Dinar (1992–2007)
    • + *
    • SDG - Sudanese Pound
    • + *
    • SDP - Sudanese Pound (1957–1998)
    • + *
    • SRD - Surinamese Dollar
    • + *
    • SRG - Surinamese Guilder
    • + *
    • SZL - Swazi Lilangeni
    • + *
    • SEK - Swedish Krona
    • + *
    • CHF - Swiss Franc
    • + *
    • SYP - Syrian Pound
    • + *
    • STN - São Tomé & Príncipe Dobra
    • + *
    • STD - São Tomé & Príncipe Dobra (1977–2017)
    • + *
    • TVD - TVD
    • + *
    • TJR - Tajikistani Ruble
    • + *
    • TJS - Tajikistani Somoni
    • + *
    • TZS - Tanzanian Shilling
    • + *
    • XTS - Testing Currency Code
    • + *
    • THB - Thai Baht
    • + *
    • XXX - The codes assigned for transactions where no currency is involved
    • + *
    • TPE - Timorese Escudo
    • + *
    • TOP - Tongan Paʻanga
    • + *
    • TTD - Trinidad & Tobago Dollar
    • + *
    • TND - Tunisian Dinar
    • + *
    • TRY - Turkish Lira
    • + *
    • TRL - Turkish Lira (1922–2005)
    • + *
    • TMT - Turkmenistani Manat
    • + *
    • TMM - Turkmenistani Manat (1993–2009)
    • + *
    • USD - US Dollar
    • + *
    • USN - US Dollar (Next day)
    • + *
    • USS - US Dollar (Same day)
    • + *
    • UGX - Ugandan Shilling
    • + *
    • UGS - Ugandan Shilling (1966–1987)
    • + *
    • UAH - Ukrainian Hryvnia
    • + *
    • UAK - Ukrainian Karbovanets
    • + *
    • AED - United Arab Emirates Dirham
    • + *
    • UYW - Uruguayan Nominal Wage Index Unit
    • + *
    • UYU - Uruguayan Peso
    • + *
    • UYP - Uruguayan Peso (1975–1993)
    • + *
    • UYI - Uruguayan Peso (Indexed Units)
    • + *
    • UZS - Uzbekistani Som
    • + *
    • VUV - Vanuatu Vatu
    • + *
    • VES - Venezuelan Bolívar
    • + *
    • VEB - Venezuelan Bolívar (1871–2008)
    • + *
    • VEF - Venezuelan Bolívar (2008–2018)
    • + *
    • VND - Vietnamese Dong
    • + *
    • VNN - Vietnamese Dong (1978–1985)
    • + *
    • CHE - WIR Euro
    • + *
    • CHW - WIR Franc
    • + *
    • XOF - West African CFA Franc
    • + *
    • YDD - Yemeni Dinar
    • + *
    • YER - Yemeni Rial
    • + *
    • YUN - Yugoslavian Convertible Dinar (1990–1992)
    • + *
    • YUD - Yugoslavian Hard Dinar (1966–1990)
    • + *
    • YUM - Yugoslavian New Dinar (1994–2002)
    • + *
    • YUR - Yugoslavian Reformed Dinar (1992–1993)
    • + *
    • ZWN - ZWN
    • + *
    • ZRN - Zairean New Zaire (1993–1998)
    • + *
    • ZRZ - Zairean Zaire (1971–1993)
    • + *
    • ZMW - Zambian Kwacha
    • + *
    • ZMK - Zambian Kwacha (1968–2012)
    • + *
    • ZWD - Zimbabwean Dollar (1980–2008)
    • + *
    • ZWR - Zimbabwean Dollar (2008)
    • + *
    • ZWL - Zimbabwean Dollar (2009)
    • + *
    + */ @JsonSetter(value = "currency", nulls = Nulls.SKIP) - public Builder currency(Optional currency) { + public Builder currency(Optional currency) { this.currency = currency; return this; } - public Builder currency(TransactionCurrencyEnum currency) { + public Builder currency(ExpenseLineRequestCurrency currency) { this.currency = Optional.ofNullable(currency); return this; } + /** + *

    The expense's payment account.

    + */ @JsonSetter(value = "account", nulls = Nulls.SKIP) public Builder account(Optional account) { this.account = account; @@ -737,6 +1083,9 @@ public Builder account(ExpenseLineRequestAccount account) { return this; } + /** + *

    The expense's contact.

    + */ @JsonSetter(value = "contact", nulls = Nulls.SKIP) public Builder contact(Optional contact) { this.contact = contact; @@ -748,6 +1097,20 @@ public Builder contact(ExpenseLineRequestContact contact) { return this; } + @JsonSetter(value = "project", nulls = Nulls.SKIP) + public Builder project(Optional project) { + this.project = project; + return this; + } + + public Builder project(ExpenseLineRequestProject project) { + this.project = Optional.ofNullable(project); + return this; + } + + /** + *

    The description of the item that was purchased by the company.

    + */ @JsonSetter(value = "description", nulls = Nulls.SKIP) public Builder description(Optional description) { this.description = description; @@ -759,6 +1122,9 @@ public Builder description(String description) { return this; } + /** + *

    The expense line item's exchange rate.

    + */ @JsonSetter(value = "exchange_rate", nulls = Nulls.SKIP) public Builder exchangeRate(Optional exchangeRate) { this.exchangeRate = exchangeRate; @@ -770,6 +1136,9 @@ public Builder exchangeRate(String exchangeRate) { return this; } + /** + *

    The tax rate that applies to this line item.

    + */ @JsonSetter(value = "tax_rate", nulls = Nulls.SKIP) public Builder taxRate(Optional taxRate) { this.taxRate = taxRate; @@ -826,6 +1195,7 @@ public ExpenseLineRequest build() { currency, account, contact, + project, description, exchangeRate, taxRate, diff --git a/src/main/java/com/merge/api/accounting/types/ExpenseLineRequestCurrency.java b/src/main/java/com/merge/api/accounting/types/ExpenseLineRequestCurrency.java new file mode 100644 index 000000000..bcded0b69 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/ExpenseLineRequestCurrency.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = ExpenseLineRequestCurrency.Deserializer.class) +public final class ExpenseLineRequestCurrency { + private final Object value; + + private final int type; + + private ExpenseLineRequestCurrency(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((TransactionCurrencyEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ExpenseLineRequestCurrency && equalTo((ExpenseLineRequestCurrency) other); + } + + private boolean equalTo(ExpenseLineRequestCurrency other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static ExpenseLineRequestCurrency of(TransactionCurrencyEnum value) { + return new ExpenseLineRequestCurrency(value, 0); + } + + public static ExpenseLineRequestCurrency of(String value) { + return new ExpenseLineRequestCurrency(value, 1); + } + + public interface Visitor { + T visit(TransactionCurrencyEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(ExpenseLineRequestCurrency.class); + } + + @java.lang.Override + public ExpenseLineRequestCurrency deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TransactionCurrencyEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/ExpenseLineRequestProject.java b/src/main/java/com/merge/api/accounting/types/ExpenseLineRequestProject.java new file mode 100644 index 000000000..daa284eb8 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/ExpenseLineRequestProject.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = ExpenseLineRequestProject.Deserializer.class) +public final class ExpenseLineRequestProject { + private final Object value; + + private final int type; + + private ExpenseLineRequestProject(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((Project) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ExpenseLineRequestProject && equalTo((ExpenseLineRequestProject) other); + } + + private boolean equalTo(ExpenseLineRequestProject other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static ExpenseLineRequestProject of(String value) { + return new ExpenseLineRequestProject(value, 0); + } + + public static ExpenseLineRequestProject of(Project value) { + return new ExpenseLineRequestProject(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(Project value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(ExpenseLineRequestProject.class); + } + + @java.lang.Override + public ExpenseLineRequestProject deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, Project.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/ExpenseRequest.java b/src/main/java/com/merge/api/accounting/types/ExpenseRequest.java index 7ce13c93a..166c64509 100644 --- a/src/main/java/com/merge/api/accounting/types/ExpenseRequest.java +++ b/src/main/java/com/merge/api/accounting/types/ExpenseRequest.java @@ -668,6 +668,9 @@ public Builder from(ExpenseRequest other) { return this; } + /** + *

    When the transaction occurred.

    + */ @JsonSetter(value = "transaction_date", nulls = Nulls.SKIP) public Builder transactionDate(Optional transactionDate) { this.transactionDate = transactionDate; @@ -679,6 +682,9 @@ public Builder transactionDate(OffsetDateTime transactionDate) { return this; } + /** + *

    The expense's payment account.

    + */ @JsonSetter(value = "account", nulls = Nulls.SKIP) public Builder account(Optional account) { this.account = account; @@ -690,6 +696,9 @@ public Builder account(ExpenseRequestAccount account) { return this; } + /** + *

    The expense's contact.

    + */ @JsonSetter(value = "contact", nulls = Nulls.SKIP) public Builder contact(Optional contact) { this.contact = contact; @@ -701,6 +710,9 @@ public Builder contact(ExpenseRequestContact contact) { return this; } + /** + *

    The expense's total amount.

    + */ @JsonSetter(value = "total_amount", nulls = Nulls.SKIP) public Builder totalAmount(Optional totalAmount) { this.totalAmount = totalAmount; @@ -712,6 +724,9 @@ public Builder totalAmount(Double totalAmount) { return this; } + /** + *

    The expense's total amount before tax.

    + */ @JsonSetter(value = "sub_total", nulls = Nulls.SKIP) public Builder subTotal(Optional subTotal) { this.subTotal = subTotal; @@ -723,6 +738,9 @@ public Builder subTotal(Double subTotal) { return this; } + /** + *

    The expense's total tax amount.

    + */ @JsonSetter(value = "total_tax_amount", nulls = Nulls.SKIP) public Builder totalTaxAmount(Optional totalTaxAmount) { this.totalTaxAmount = totalTaxAmount; @@ -734,6 +752,317 @@ public Builder totalTaxAmount(Double totalTaxAmount) { return this; } + /** + *

    The expense's currency.

    + *
      + *
    • XUA - ADB Unit of Account
    • + *
    • AFN - Afghan Afghani
    • + *
    • AFA - Afghan Afghani (1927–2002)
    • + *
    • ALL - Albanian Lek
    • + *
    • ALK - Albanian Lek (1946–1965)
    • + *
    • DZD - Algerian Dinar
    • + *
    • ADP - Andorran Peseta
    • + *
    • AOA - Angolan Kwanza
    • + *
    • AOK - Angolan Kwanza (1977–1991)
    • + *
    • AON - Angolan New Kwanza (1990–2000)
    • + *
    • AOR - Angolan Readjusted Kwanza (1995–1999)
    • + *
    • ARA - Argentine Austral
    • + *
    • ARS - Argentine Peso
    • + *
    • ARM - Argentine Peso (1881–1970)
    • + *
    • ARP - Argentine Peso (1983–1985)
    • + *
    • ARL - Argentine Peso Ley (1970–1983)
    • + *
    • AMD - Armenian Dram
    • + *
    • AWG - Aruban Florin
    • + *
    • AUD - Australian Dollar
    • + *
    • ATS - Austrian Schilling
    • + *
    • AZN - Azerbaijani Manat
    • + *
    • AZM - Azerbaijani Manat (1993–2006)
    • + *
    • BSD - Bahamian Dollar
    • + *
    • BHD - Bahraini Dinar
    • + *
    • BDT - Bangladeshi Taka
    • + *
    • BBD - Barbadian Dollar
    • + *
    • BYN - Belarusian Ruble
    • + *
    • BYB - Belarusian Ruble (1994–1999)
    • + *
    • BYR - Belarusian Ruble (2000–2016)
    • + *
    • BEF - Belgian Franc
    • + *
    • BEC - Belgian Franc (convertible)
    • + *
    • BEL - Belgian Franc (financial)
    • + *
    • BZD - Belize Dollar
    • + *
    • BMD - Bermudan Dollar
    • + *
    • BTN - Bhutanese Ngultrum
    • + *
    • BOB - Bolivian Boliviano
    • + *
    • BOL - Bolivian Boliviano (1863–1963)
    • + *
    • BOV - Bolivian Mvdol
    • + *
    • BOP - Bolivian Peso
    • + *
    • BAM - Bosnia-Herzegovina Convertible Mark
    • + *
    • BAD - Bosnia-Herzegovina Dinar (1992–1994)
    • + *
    • BAN - Bosnia-Herzegovina New Dinar (1994–1997)
    • + *
    • BWP - Botswanan Pula
    • + *
    • BRC - Brazilian Cruzado (1986–1989)
    • + *
    • BRZ - Brazilian Cruzeiro (1942–1967)
    • + *
    • BRE - Brazilian Cruzeiro (1990–1993)
    • + *
    • BRR - Brazilian Cruzeiro (1993–1994)
    • + *
    • BRN - Brazilian New Cruzado (1989–1990)
    • + *
    • BRB - Brazilian New Cruzeiro (1967–1986)
    • + *
    • BRL - Brazilian Real
    • + *
    • GBP - British Pound
    • + *
    • BND - Brunei Dollar
    • + *
    • BGL - Bulgarian Hard Lev
    • + *
    • BGN - Bulgarian Lev
    • + *
    • BGO - Bulgarian Lev (1879–1952)
    • + *
    • BGM - Bulgarian Socialist Lev
    • + *
    • BUK - Burmese Kyat
    • + *
    • BIF - Burundian Franc
    • + *
    • XPF - CFP Franc
    • + *
    • KHR - Cambodian Riel
    • + *
    • CAD - Canadian Dollar
    • + *
    • CVE - Cape Verdean Escudo
    • + *
    • KYD - Cayman Islands Dollar
    • + *
    • XAF - Central African CFA Franc
    • + *
    • CLE - Chilean Escudo
    • + *
    • CLP - Chilean Peso
    • + *
    • CLF - Chilean Unit of Account (UF)
    • + *
    • CNX - Chinese People’s Bank Dollar
    • + *
    • CNY - Chinese Yuan
    • + *
    • CNH - Chinese Yuan (offshore)
    • + *
    • COP - Colombian Peso
    • + *
    • COU - Colombian Real Value Unit
    • + *
    • KMF - Comorian Franc
    • + *
    • CDF - Congolese Franc
    • + *
    • CRC - Costa Rican Colón
    • + *
    • HRD - Croatian Dinar
    • + *
    • HRK - Croatian Kuna
    • + *
    • CUC - Cuban Convertible Peso
    • + *
    • CUP - Cuban Peso
    • + *
    • CYP - Cypriot Pound
    • + *
    • CZK - Czech Koruna
    • + *
    • CSK - Czechoslovak Hard Koruna
    • + *
    • DKK - Danish Krone
    • + *
    • DJF - Djiboutian Franc
    • + *
    • DOP - Dominican Peso
    • + *
    • NLG - Dutch Guilder
    • + *
    • XCD - East Caribbean Dollar
    • + *
    • DDM - East German Mark
    • + *
    • ECS - Ecuadorian Sucre
    • + *
    • ECV - Ecuadorian Unit of Constant Value
    • + *
    • EGP - Egyptian Pound
    • + *
    • GQE - Equatorial Guinean Ekwele
    • + *
    • ERN - Eritrean Nakfa
    • + *
    • EEK - Estonian Kroon
    • + *
    • ETB - Ethiopian Birr
    • + *
    • EUR - Euro
    • + *
    • XBA - European Composite Unit
    • + *
    • XEU - European Currency Unit
    • + *
    • XBB - European Monetary Unit
    • + *
    • XBC - European Unit of Account (XBC)
    • + *
    • XBD - European Unit of Account (XBD)
    • + *
    • FKP - Falkland Islands Pound
    • + *
    • FJD - Fijian Dollar
    • + *
    • FIM - Finnish Markka
    • + *
    • FRF - French Franc
    • + *
    • XFO - French Gold Franc
    • + *
    • XFU - French UIC-Franc
    • + *
    • GMD - Gambian Dalasi
    • + *
    • GEK - Georgian Kupon Larit
    • + *
    • GEL - Georgian Lari
    • + *
    • DEM - German Mark
    • + *
    • GHS - Ghanaian Cedi
    • + *
    • GHC - Ghanaian Cedi (1979–2007)
    • + *
    • GIP - Gibraltar Pound
    • + *
    • XAU - Gold
    • + *
    • GRD - Greek Drachma
    • + *
    • GTQ - Guatemalan Quetzal
    • + *
    • GWP - Guinea-Bissau Peso
    • + *
    • GNF - Guinean Franc
    • + *
    • GNS - Guinean Syli
    • + *
    • GYD - Guyanaese Dollar
    • + *
    • HTG - Haitian Gourde
    • + *
    • HNL - Honduran Lempira
    • + *
    • HKD - Hong Kong Dollar
    • + *
    • HUF - Hungarian Forint
    • + *
    • IMP - IMP
    • + *
    • ISK - Icelandic Króna
    • + *
    • ISJ - Icelandic Króna (1918–1981)
    • + *
    • INR - Indian Rupee
    • + *
    • IDR - Indonesian Rupiah
    • + *
    • IRR - Iranian Rial
    • + *
    • IQD - Iraqi Dinar
    • + *
    • IEP - Irish Pound
    • + *
    • ILS - Israeli New Shekel
    • + *
    • ILP - Israeli Pound
    • + *
    • ILR - Israeli Shekel (1980–1985)
    • + *
    • ITL - Italian Lira
    • + *
    • JMD - Jamaican Dollar
    • + *
    • JPY - Japanese Yen
    • + *
    • JOD - Jordanian Dinar
    • + *
    • KZT - Kazakhstani Tenge
    • + *
    • KES - Kenyan Shilling
    • + *
    • KWD - Kuwaiti Dinar
    • + *
    • KGS - Kyrgystani Som
    • + *
    • LAK - Laotian Kip
    • + *
    • LVL - Latvian Lats
    • + *
    • LVR - Latvian Ruble
    • + *
    • LBP - Lebanese Pound
    • + *
    • LSL - Lesotho Loti
    • + *
    • LRD - Liberian Dollar
    • + *
    • LYD - Libyan Dinar
    • + *
    • LTL - Lithuanian Litas
    • + *
    • LTT - Lithuanian Talonas
    • + *
    • LUL - Luxembourg Financial Franc
    • + *
    • LUC - Luxembourgian Convertible Franc
    • + *
    • LUF - Luxembourgian Franc
    • + *
    • MOP - Macanese Pataca
    • + *
    • MKD - Macedonian Denar
    • + *
    • MKN - Macedonian Denar (1992–1993)
    • + *
    • MGA - Malagasy Ariary
    • + *
    • MGF - Malagasy Franc
    • + *
    • MWK - Malawian Kwacha
    • + *
    • MYR - Malaysian Ringgit
    • + *
    • MVR - Maldivian Rufiyaa
    • + *
    • MVP - Maldivian Rupee (1947–1981)
    • + *
    • MLF - Malian Franc
    • + *
    • MTL - Maltese Lira
    • + *
    • MTP - Maltese Pound
    • + *
    • MRU - Mauritanian Ouguiya
    • + *
    • MRO - Mauritanian Ouguiya (1973–2017)
    • + *
    • MUR - Mauritian Rupee
    • + *
    • MXV - Mexican Investment Unit
    • + *
    • MXN - Mexican Peso
    • + *
    • MXP - Mexican Silver Peso (1861–1992)
    • + *
    • MDC - Moldovan Cupon
    • + *
    • MDL - Moldovan Leu
    • + *
    • MCF - Monegasque Franc
    • + *
    • MNT - Mongolian Tugrik
    • + *
    • MAD - Moroccan Dirham
    • + *
    • MAF - Moroccan Franc
    • + *
    • MZE - Mozambican Escudo
    • + *
    • MZN - Mozambican Metical
    • + *
    • MZM - Mozambican Metical (1980–2006)
    • + *
    • MMK - Myanmar Kyat
    • + *
    • NAD - Namibian Dollar
    • + *
    • NPR - Nepalese Rupee
    • + *
    • ANG - Netherlands Antillean Guilder
    • + *
    • TWD - New Taiwan Dollar
    • + *
    • NZD - New Zealand Dollar
    • + *
    • NIO - Nicaraguan Córdoba
    • + *
    • NIC - Nicaraguan Córdoba (1988–1991)
    • + *
    • NGN - Nigerian Naira
    • + *
    • KPW - North Korean Won
    • + *
    • NOK - Norwegian Krone
    • + *
    • OMR - Omani Rial
    • + *
    • PKR - Pakistani Rupee
    • + *
    • XPD - Palladium
    • + *
    • PAB - Panamanian Balboa
    • + *
    • PGK - Papua New Guinean Kina
    • + *
    • PYG - Paraguayan Guarani
    • + *
    • PEI - Peruvian Inti
    • + *
    • PEN - Peruvian Sol
    • + *
    • PES - Peruvian Sol (1863–1965)
    • + *
    • PHP - Philippine Peso
    • + *
    • XPT - Platinum
    • + *
    • PLN - Polish Zloty
    • + *
    • PLZ - Polish Zloty (1950–1995)
    • + *
    • PTE - Portuguese Escudo
    • + *
    • GWE - Portuguese Guinea Escudo
    • + *
    • QAR - Qatari Rial
    • + *
    • XRE - RINET Funds
    • + *
    • RHD - Rhodesian Dollar
    • + *
    • RON - Romanian Leu
    • + *
    • ROL - Romanian Leu (1952–2006)
    • + *
    • RUB - Russian Ruble
    • + *
    • RUR - Russian Ruble (1991–1998)
    • + *
    • RWF - Rwandan Franc
    • + *
    • SVC - Salvadoran Colón
    • + *
    • WST - Samoan Tala
    • + *
    • SAR - Saudi Riyal
    • + *
    • RSD - Serbian Dinar
    • + *
    • CSD - Serbian Dinar (2002–2006)
    • + *
    • SCR - Seychellois Rupee
    • + *
    • SLL - Sierra Leonean Leone
    • + *
    • XAG - Silver
    • + *
    • SGD - Singapore Dollar
    • + *
    • SKK - Slovak Koruna
    • + *
    • SIT - Slovenian Tolar
    • + *
    • SBD - Solomon Islands Dollar
    • + *
    • SOS - Somali Shilling
    • + *
    • ZAR - South African Rand
    • + *
    • ZAL - South African Rand (financial)
    • + *
    • KRH - South Korean Hwan (1953–1962)
    • + *
    • KRW - South Korean Won
    • + *
    • KRO - South Korean Won (1945–1953)
    • + *
    • SSP - South Sudanese Pound
    • + *
    • SUR - Soviet Rouble
    • + *
    • ESP - Spanish Peseta
    • + *
    • ESA - Spanish Peseta (A account)
    • + *
    • ESB - Spanish Peseta (convertible account)
    • + *
    • XDR - Special Drawing Rights
    • + *
    • LKR - Sri Lankan Rupee
    • + *
    • SHP - St. Helena Pound
    • + *
    • XSU - Sucre
    • + *
    • SDD - Sudanese Dinar (1992–2007)
    • + *
    • SDG - Sudanese Pound
    • + *
    • SDP - Sudanese Pound (1957–1998)
    • + *
    • SRD - Surinamese Dollar
    • + *
    • SRG - Surinamese Guilder
    • + *
    • SZL - Swazi Lilangeni
    • + *
    • SEK - Swedish Krona
    • + *
    • CHF - Swiss Franc
    • + *
    • SYP - Syrian Pound
    • + *
    • STN - São Tomé & Príncipe Dobra
    • + *
    • STD - São Tomé & Príncipe Dobra (1977–2017)
    • + *
    • TVD - TVD
    • + *
    • TJR - Tajikistani Ruble
    • + *
    • TJS - Tajikistani Somoni
    • + *
    • TZS - Tanzanian Shilling
    • + *
    • XTS - Testing Currency Code
    • + *
    • THB - Thai Baht
    • + *
    • XXX - The codes assigned for transactions where no currency is involved
    • + *
    • TPE - Timorese Escudo
    • + *
    • TOP - Tongan Paʻanga
    • + *
    • TTD - Trinidad & Tobago Dollar
    • + *
    • TND - Tunisian Dinar
    • + *
    • TRY - Turkish Lira
    • + *
    • TRL - Turkish Lira (1922–2005)
    • + *
    • TMT - Turkmenistani Manat
    • + *
    • TMM - Turkmenistani Manat (1993–2009)
    • + *
    • USD - US Dollar
    • + *
    • USN - US Dollar (Next day)
    • + *
    • USS - US Dollar (Same day)
    • + *
    • UGX - Ugandan Shilling
    • + *
    • UGS - Ugandan Shilling (1966–1987)
    • + *
    • UAH - Ukrainian Hryvnia
    • + *
    • UAK - Ukrainian Karbovanets
    • + *
    • AED - United Arab Emirates Dirham
    • + *
    • UYW - Uruguayan Nominal Wage Index Unit
    • + *
    • UYU - Uruguayan Peso
    • + *
    • UYP - Uruguayan Peso (1975–1993)
    • + *
    • UYI - Uruguayan Peso (Indexed Units)
    • + *
    • UZS - Uzbekistani Som
    • + *
    • VUV - Vanuatu Vatu
    • + *
    • VES - Venezuelan Bolívar
    • + *
    • VEB - Venezuelan Bolívar (1871–2008)
    • + *
    • VEF - Venezuelan Bolívar (2008–2018)
    • + *
    • VND - Vietnamese Dong
    • + *
    • VNN - Vietnamese Dong (1978–1985)
    • + *
    • CHE - WIR Euro
    • + *
    • CHW - WIR Franc
    • + *
    • XOF - West African CFA Franc
    • + *
    • YDD - Yemeni Dinar
    • + *
    • YER - Yemeni Rial
    • + *
    • YUN - Yugoslavian Convertible Dinar (1990–1992)
    • + *
    • YUD - Yugoslavian Hard Dinar (1966–1990)
    • + *
    • YUM - Yugoslavian New Dinar (1994–2002)
    • + *
    • YUR - Yugoslavian Reformed Dinar (1992–1993)
    • + *
    • ZWN - ZWN
    • + *
    • ZRN - Zairean New Zaire (1993–1998)
    • + *
    • ZRZ - Zairean Zaire (1971–1993)
    • + *
    • ZMW - Zambian Kwacha
    • + *
    • ZMK - Zambian Kwacha (1968–2012)
    • + *
    • ZWD - Zimbabwean Dollar (1980–2008)
    • + *
    • ZWR - Zimbabwean Dollar (2008)
    • + *
    • ZWL - Zimbabwean Dollar (2009)
    • + *
    + */ @JsonSetter(value = "currency", nulls = Nulls.SKIP) public Builder currency(Optional currency) { this.currency = currency; @@ -745,6 +1074,9 @@ public Builder currency(TransactionCurrencyEnum currency) { return this; } + /** + *

    The expense's exchange rate.

    + */ @JsonSetter(value = "exchange_rate", nulls = Nulls.SKIP) public Builder exchangeRate(Optional exchangeRate) { this.exchangeRate = exchangeRate; @@ -756,6 +1088,9 @@ public Builder exchangeRate(String exchangeRate) { return this; } + /** + *

    If the transaction is inclusive or exclusive of tax. True if inclusive, False if exclusive.

    + */ @JsonSetter(value = "inclusive_of_tax", nulls = Nulls.SKIP) public Builder inclusiveOfTax(Optional inclusiveOfTax) { this.inclusiveOfTax = inclusiveOfTax; @@ -767,6 +1102,9 @@ public Builder inclusiveOfTax(Boolean inclusiveOfTax) { return this; } + /** + *

    The company the expense belongs to.

    + */ @JsonSetter(value = "company", nulls = Nulls.SKIP) public Builder company(Optional company) { this.company = company; @@ -778,6 +1116,9 @@ public Builder company(ExpenseRequestCompany company) { return this; } + /** + *

    The employee this overall transaction relates to.

    + */ @JsonSetter(value = "employee", nulls = Nulls.SKIP) public Builder employee(Optional employee) { this.employee = employee; @@ -789,6 +1130,9 @@ public Builder employee(ExpenseRequestEmployee employee) { return this; } + /** + *

    The expense's private note.

    + */ @JsonSetter(value = "memo", nulls = Nulls.SKIP) public Builder memo(Optional memo) { this.memo = memo; @@ -823,6 +1167,9 @@ public Builder trackingCategories(ListThe accounting period that the Expense was generated in.

    + */ @JsonSetter(value = "accounting_period", nulls = Nulls.SKIP) public Builder accountingPeriod(Optional accountingPeriod) { this.accountingPeriod = accountingPeriod; diff --git a/src/main/java/com/merge/api/accounting/types/ExpensesLinesRemoteFieldClassesListRequest.java b/src/main/java/com/merge/api/accounting/types/ExpensesLinesRemoteFieldClassesListRequest.java index a88d2ea57..75c1e7290 100644 --- a/src/main/java/com/merge/api/accounting/types/ExpensesLinesRemoteFieldClassesListRequest.java +++ b/src/main/java/com/merge/api/accounting/types/ExpensesLinesRemoteFieldClassesListRequest.java @@ -30,6 +30,8 @@ public final class ExpensesLinesRemoteFieldClassesListRequest { private final Optional isCommonModelField; + private final Optional isCustom; + private final Optional pageSize; private final Map additionalProperties; @@ -40,6 +42,7 @@ private ExpensesLinesRemoteFieldClassesListRequest( Optional includeRemoteData, Optional includeShellData, Optional isCommonModelField, + Optional isCustom, Optional pageSize, Map additionalProperties) { this.cursor = cursor; @@ -47,6 +50,7 @@ private ExpensesLinesRemoteFieldClassesListRequest( this.includeRemoteData = includeRemoteData; this.includeShellData = includeShellData; this.isCommonModelField = isCommonModelField; + this.isCustom = isCustom; this.pageSize = pageSize; this.additionalProperties = additionalProperties; } @@ -91,6 +95,14 @@ public Optional getIsCommonModelField() { return isCommonModelField; } + /** + * @return If provided, will only return remote fields classes with this is_custom value + */ + @JsonProperty("is_custom") + public Optional getIsCustom() { + return isCustom; + } + /** * @return Number of results to return per page. */ @@ -117,6 +129,7 @@ private boolean equalTo(ExpensesLinesRemoteFieldClassesListRequest other) { && includeRemoteData.equals(other.includeRemoteData) && includeShellData.equals(other.includeShellData) && isCommonModelField.equals(other.isCommonModelField) + && isCustom.equals(other.isCustom) && pageSize.equals(other.pageSize); } @@ -128,6 +141,7 @@ public int hashCode() { this.includeRemoteData, this.includeShellData, this.isCommonModelField, + this.isCustom, this.pageSize); } @@ -152,6 +166,8 @@ public static final class Builder { private Optional isCommonModelField = Optional.empty(); + private Optional isCustom = Optional.empty(); + private Optional pageSize = Optional.empty(); @JsonAnySetter @@ -165,10 +181,14 @@ public Builder from(ExpensesLinesRemoteFieldClassesListRequest other) { includeRemoteData(other.getIncludeRemoteData()); includeShellData(other.getIncludeShellData()); isCommonModelField(other.getIsCommonModelField()); + isCustom(other.getIsCustom()); pageSize(other.getPageSize()); return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -180,6 +200,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -191,6 +214,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -202,6 +228,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -213,6 +242,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, will only return remote field classes with this is_common_model_field value

    + */ @JsonSetter(value = "is_common_model_field", nulls = Nulls.SKIP) public Builder isCommonModelField(Optional isCommonModelField) { this.isCommonModelField = isCommonModelField; @@ -224,6 +256,23 @@ public Builder isCommonModelField(Boolean isCommonModelField) { return this; } + /** + *

    If provided, will only return remote fields classes with this is_custom value

    + */ + @JsonSetter(value = "is_custom", nulls = Nulls.SKIP) + public Builder isCustom(Optional isCustom) { + this.isCustom = isCustom; + return this; + } + + public Builder isCustom(Boolean isCustom) { + this.isCustom = Optional.ofNullable(isCustom); + return this; + } + + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -242,6 +291,7 @@ public ExpensesLinesRemoteFieldClassesListRequest build() { includeRemoteData, includeShellData, isCommonModelField, + isCustom, pageSize, additionalProperties); } diff --git a/src/main/java/com/merge/api/accounting/types/ExpensesListRequest.java b/src/main/java/com/merge/api/accounting/types/ExpensesListRequest.java index a47059e43..071444b9d 100644 --- a/src/main/java/com/merge/api/accounting/types/ExpensesListRequest.java +++ b/src/main/java/com/merge/api/accounting/types/ExpensesListRequest.java @@ -324,6 +324,9 @@ public Builder from(ExpensesListRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -340,6 +343,9 @@ public Builder expand(ExpensesListRequestExpandItem expand) { return this; } + /** + *

    If provided, will only return expenses for this company.

    + */ @JsonSetter(value = "company_id", nulls = Nulls.SKIP) public Builder companyId(Optional companyId) { this.companyId = companyId; @@ -351,6 +357,9 @@ public Builder companyId(String companyId) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -362,6 +371,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -373,6 +385,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -384,6 +399,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -395,6 +413,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -406,6 +427,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

    + */ @JsonSetter(value = "include_remote_fields", nulls = Nulls.SKIP) public Builder includeRemoteFields(Optional includeRemoteFields) { this.includeRemoteFields = includeRemoteFields; @@ -417,6 +441,9 @@ public Builder includeRemoteFields(Boolean includeRemoteFields) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -428,6 +455,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -439,6 +469,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -450,6 +483,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -461,6 +497,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -472,6 +511,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "transaction_date_after", nulls = Nulls.SKIP) public Builder transactionDateAfter(Optional transactionDateAfter) { this.transactionDateAfter = transactionDateAfter; @@ -483,6 +525,9 @@ public Builder transactionDateAfter(OffsetDateTime transactionDateAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "transaction_date_before", nulls = Nulls.SKIP) public Builder transactionDateBefore(Optional transactionDateBefore) { this.transactionDateBefore = transactionDateBefore; diff --git a/src/main/java/com/merge/api/accounting/types/ExpensesRemoteFieldClassesListRequest.java b/src/main/java/com/merge/api/accounting/types/ExpensesRemoteFieldClassesListRequest.java index 99e805c69..996d7ebaf 100644 --- a/src/main/java/com/merge/api/accounting/types/ExpensesRemoteFieldClassesListRequest.java +++ b/src/main/java/com/merge/api/accounting/types/ExpensesRemoteFieldClassesListRequest.java @@ -30,6 +30,8 @@ public final class ExpensesRemoteFieldClassesListRequest { private final Optional isCommonModelField; + private final Optional isCustom; + private final Optional pageSize; private final Map additionalProperties; @@ -40,6 +42,7 @@ private ExpensesRemoteFieldClassesListRequest( Optional includeRemoteData, Optional includeShellData, Optional isCommonModelField, + Optional isCustom, Optional pageSize, Map additionalProperties) { this.cursor = cursor; @@ -47,6 +50,7 @@ private ExpensesRemoteFieldClassesListRequest( this.includeRemoteData = includeRemoteData; this.includeShellData = includeShellData; this.isCommonModelField = isCommonModelField; + this.isCustom = isCustom; this.pageSize = pageSize; this.additionalProperties = additionalProperties; } @@ -91,6 +95,14 @@ public Optional getIsCommonModelField() { return isCommonModelField; } + /** + * @return If provided, will only return remote fields classes with this is_custom value + */ + @JsonProperty("is_custom") + public Optional getIsCustom() { + return isCustom; + } + /** * @return Number of results to return per page. */ @@ -117,6 +129,7 @@ private boolean equalTo(ExpensesRemoteFieldClassesListRequest other) { && includeRemoteData.equals(other.includeRemoteData) && includeShellData.equals(other.includeShellData) && isCommonModelField.equals(other.isCommonModelField) + && isCustom.equals(other.isCustom) && pageSize.equals(other.pageSize); } @@ -128,6 +141,7 @@ public int hashCode() { this.includeRemoteData, this.includeShellData, this.isCommonModelField, + this.isCustom, this.pageSize); } @@ -152,6 +166,8 @@ public static final class Builder { private Optional isCommonModelField = Optional.empty(); + private Optional isCustom = Optional.empty(); + private Optional pageSize = Optional.empty(); @JsonAnySetter @@ -165,10 +181,14 @@ public Builder from(ExpensesRemoteFieldClassesListRequest other) { includeRemoteData(other.getIncludeRemoteData()); includeShellData(other.getIncludeShellData()); isCommonModelField(other.getIsCommonModelField()); + isCustom(other.getIsCustom()); pageSize(other.getPageSize()); return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -180,6 +200,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -191,6 +214,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -202,6 +228,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -213,6 +242,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, will only return remote field classes with this is_common_model_field value

    + */ @JsonSetter(value = "is_common_model_field", nulls = Nulls.SKIP) public Builder isCommonModelField(Optional isCommonModelField) { this.isCommonModelField = isCommonModelField; @@ -224,6 +256,23 @@ public Builder isCommonModelField(Boolean isCommonModelField) { return this; } + /** + *

    If provided, will only return remote fields classes with this is_custom value

    + */ + @JsonSetter(value = "is_custom", nulls = Nulls.SKIP) + public Builder isCustom(Optional isCustom) { + this.isCustom = isCustom; + return this; + } + + public Builder isCustom(Boolean isCustom) { + this.isCustom = Optional.ofNullable(isCustom); + return this; + } + + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -242,6 +291,7 @@ public ExpensesRemoteFieldClassesListRequest build() { includeRemoteData, includeShellData, isCommonModelField, + isCustom, pageSize, additionalProperties); } diff --git a/src/main/java/com/merge/api/accounting/types/ExpensesRetrieveRequest.java b/src/main/java/com/merge/api/accounting/types/ExpensesRetrieveRequest.java index cd89ed3a6..5d9186704 100644 --- a/src/main/java/com/merge/api/accounting/types/ExpensesRetrieveRequest.java +++ b/src/main/java/com/merge/api/accounting/types/ExpensesRetrieveRequest.java @@ -132,6 +132,9 @@ public Builder from(ExpensesRetrieveRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -148,6 +151,9 @@ public Builder expand(ExpensesRetrieveRequestExpandItem expand) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -159,6 +165,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

    + */ @JsonSetter(value = "include_remote_fields", nulls = Nulls.SKIP) public Builder includeRemoteFields(Optional includeRemoteFields) { this.includeRemoteFields = includeRemoteFields; @@ -170,6 +179,9 @@ public Builder includeRemoteFields(Boolean includeRemoteFields) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/accounting/types/ExternalTargetFieldApiResponse.java b/src/main/java/com/merge/api/accounting/types/ExternalTargetFieldApiResponse.java index bb23365c4..4ba80d12e 100644 --- a/src/main/java/com/merge/api/accounting/types/ExternalTargetFieldApiResponse.java +++ b/src/main/java/com/merge/api/accounting/types/ExternalTargetFieldApiResponse.java @@ -67,6 +67,8 @@ public final class ExternalTargetFieldApiResponse { private final Optional> paymentMethod; + private final Optional> project; + private final Optional> paymentTerm; private final Map additionalProperties; @@ -95,6 +97,7 @@ private ExternalTargetFieldApiResponse( Optional> bankFeedAccount, Optional> employee, Optional> paymentMethod, + Optional> project, Optional> paymentTerm, Map additionalProperties) { this.account = account; @@ -120,6 +123,7 @@ private ExternalTargetFieldApiResponse( this.bankFeedAccount = bankFeedAccount; this.employee = employee; this.paymentMethod = paymentMethod; + this.project = project; this.paymentTerm = paymentTerm; this.additionalProperties = additionalProperties; } @@ -239,6 +243,11 @@ public Optional> getPaymentMethod() { return paymentMethod; } + @JsonProperty("Project") + public Optional> getProject() { + return project; + } + @JsonProperty("PaymentTerm") public Optional> getPaymentTerm() { return paymentTerm; @@ -279,6 +288,7 @@ private boolean equalTo(ExternalTargetFieldApiResponse other) { && bankFeedAccount.equals(other.bankFeedAccount) && employee.equals(other.employee) && paymentMethod.equals(other.paymentMethod) + && project.equals(other.project) && paymentTerm.equals(other.paymentTerm); } @@ -308,6 +318,7 @@ public int hashCode() { this.bankFeedAccount, this.employee, this.paymentMethod, + this.project, this.paymentTerm); } @@ -368,6 +379,8 @@ public static final class Builder { private Optional> paymentMethod = Optional.empty(); + private Optional> project = Optional.empty(); + private Optional> paymentTerm = Optional.empty(); @JsonAnySetter @@ -399,6 +412,7 @@ public Builder from(ExternalTargetFieldApiResponse other) { bankFeedAccount(other.getBankFeedAccount()); employee(other.getEmployee()); paymentMethod(other.getPaymentMethod()); + project(other.getProject()); paymentTerm(other.getPaymentTerm()); return this; } @@ -656,6 +670,17 @@ public Builder paymentMethod(List paymentMethod) { return this; } + @JsonSetter(value = "Project", nulls = Nulls.SKIP) + public Builder project(Optional> project) { + this.project = project; + return this; + } + + public Builder project(List project) { + this.project = Optional.ofNullable(project); + return this; + } + @JsonSetter(value = "PaymentTerm", nulls = Nulls.SKIP) public Builder paymentTerm(Optional> paymentTerm) { this.paymentTerm = paymentTerm; @@ -692,6 +717,7 @@ public ExternalTargetFieldApiResponse build() { bankFeedAccount, employee, paymentMethod, + project, paymentTerm, additionalProperties); } diff --git a/src/main/java/com/merge/api/accounting/types/FieldMappingApiInstanceResponse.java b/src/main/java/com/merge/api/accounting/types/FieldMappingApiInstanceResponse.java index 9274392d8..a2117d62b 100644 --- a/src/main/java/com/merge/api/accounting/types/FieldMappingApiInstanceResponse.java +++ b/src/main/java/com/merge/api/accounting/types/FieldMappingApiInstanceResponse.java @@ -67,6 +67,8 @@ public final class FieldMappingApiInstanceResponse { private final Optional> paymentMethod; + private final Optional> project; + private final Optional> paymentTerm; private final Map additionalProperties; @@ -95,6 +97,7 @@ private FieldMappingApiInstanceResponse( Optional> bankFeedAccount, Optional> employee, Optional> paymentMethod, + Optional> project, Optional> paymentTerm, Map additionalProperties) { this.account = account; @@ -120,6 +123,7 @@ private FieldMappingApiInstanceResponse( this.bankFeedAccount = bankFeedAccount; this.employee = employee; this.paymentMethod = paymentMethod; + this.project = project; this.paymentTerm = paymentTerm; this.additionalProperties = additionalProperties; } @@ -239,6 +243,11 @@ public Optional> getPaymentMethod() { return paymentMethod; } + @JsonProperty("Project") + public Optional> getProject() { + return project; + } + @JsonProperty("PaymentTerm") public Optional> getPaymentTerm() { return paymentTerm; @@ -279,6 +288,7 @@ private boolean equalTo(FieldMappingApiInstanceResponse other) { && bankFeedAccount.equals(other.bankFeedAccount) && employee.equals(other.employee) && paymentMethod.equals(other.paymentMethod) + && project.equals(other.project) && paymentTerm.equals(other.paymentTerm); } @@ -308,6 +318,7 @@ public int hashCode() { this.bankFeedAccount, this.employee, this.paymentMethod, + this.project, this.paymentTerm); } @@ -368,6 +379,8 @@ public static final class Builder { private Optional> paymentMethod = Optional.empty(); + private Optional> project = Optional.empty(); + private Optional> paymentTerm = Optional.empty(); @JsonAnySetter @@ -399,6 +412,7 @@ public Builder from(FieldMappingApiInstanceResponse other) { bankFeedAccount(other.getBankFeedAccount()); employee(other.getEmployee()); paymentMethod(other.getPaymentMethod()); + project(other.getProject()); paymentTerm(other.getPaymentTerm()); return this; } @@ -656,6 +670,17 @@ public Builder paymentMethod(List paymentMethod) { return this; } + @JsonSetter(value = "Project", nulls = Nulls.SKIP) + public Builder project(Optional> project) { + this.project = project; + return this; + } + + public Builder project(List project) { + this.project = Optional.ofNullable(project); + return this; + } + @JsonSetter(value = "PaymentTerm", nulls = Nulls.SKIP) public Builder paymentTerm(Optional> paymentTerm) { this.paymentTerm = paymentTerm; @@ -692,6 +717,7 @@ public FieldMappingApiInstanceResponse build() { bankFeedAccount, employee, paymentMethod, + project, paymentTerm, additionalProperties); } diff --git a/src/main/java/com/merge/api/accounting/types/FieldMappingsRetrieveRequest.java b/src/main/java/com/merge/api/accounting/types/FieldMappingsRetrieveRequest.java index fd1742ce3..1c60fc94b 100644 --- a/src/main/java/com/merge/api/accounting/types/FieldMappingsRetrieveRequest.java +++ b/src/main/java/com/merge/api/accounting/types/FieldMappingsRetrieveRequest.java @@ -81,6 +81,9 @@ public Builder from(FieldMappingsRetrieveRequest other) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "exclude_remote_field_metadata", nulls = Nulls.SKIP) public Builder excludeRemoteFieldMetadata(Optional excludeRemoteFieldMetadata) { this.excludeRemoteFieldMetadata = excludeRemoteFieldMetadata; diff --git a/src/main/java/com/merge/api/accounting/types/GeneralLedgerTransaction.java b/src/main/java/com/merge/api/accounting/types/GeneralLedgerTransaction.java index 3ef22868d..bf3c4003a 100644 --- a/src/main/java/com/merge/api/accounting/types/GeneralLedgerTransaction.java +++ b/src/main/java/com/merge/api/accounting/types/GeneralLedgerTransaction.java @@ -33,7 +33,7 @@ public final class GeneralLedgerTransaction { private final Optional underlyingTransactionRemoteId; - private final Optional underlyingTransactionType; + private final Optional underlyingTransactionType; private final Optional accountingPeriod; @@ -64,7 +64,7 @@ private GeneralLedgerTransaction( Optional createdAt, Optional modifiedAt, Optional underlyingTransactionRemoteId, - Optional underlyingTransactionType, + Optional underlyingTransactionType, Optional accountingPeriod, Optional company, Optional remoteUpdatedAt, @@ -145,7 +145,7 @@ public Optional getUnderlyingTransactionRemoteId() { * */ @JsonProperty("underlying_transaction_type") - public Optional getUnderlyingTransactionType() { + public Optional getUnderlyingTransactionType() { return underlyingTransactionType; } @@ -293,7 +293,8 @@ public static final class Builder { private Optional underlyingTransactionRemoteId = Optional.empty(); - private Optional underlyingTransactionType = Optional.empty(); + private Optional underlyingTransactionType = + Optional.empty(); private Optional accountingPeriod = Optional.empty(); @@ -353,6 +354,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -364,6 +368,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -375,6 +382,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -386,6 +396,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The third party remote ID of the underlying transaction.

    + */ @JsonSetter(value = "underlying_transaction_remote_id", nulls = Nulls.SKIP) public Builder underlyingTransactionRemoteId(Optional underlyingTransactionRemoteId) { this.underlyingTransactionRemoteId = underlyingTransactionRemoteId; @@ -397,17 +410,34 @@ public Builder underlyingTransactionRemoteId(String underlyingTransactionRemoteI return this; } + /** + *

    The type of the underlying transaction.

    + *
      + *
    • INVOICE - INVOICE
    • + *
    • EXPENSE - EXPENSE
    • + *
    • TRANSACTION - TRANSACTION
    • + *
    • JOURNAL_ENTRY - JOURNAL_ENTRY
    • + *
    • PAYMENT - PAYMENT
    • + *
    • VENDOR_CREDIT - VENDOR_CREDIT
    • + *
    • CREDIT_NOTE - CREDIT_NOTE
    • + *
    + */ @JsonSetter(value = "underlying_transaction_type", nulls = Nulls.SKIP) - public Builder underlyingTransactionType(Optional underlyingTransactionType) { + public Builder underlyingTransactionType( + Optional underlyingTransactionType) { this.underlyingTransactionType = underlyingTransactionType; return this; } - public Builder underlyingTransactionType(UnderlyingTransactionTypeEnum underlyingTransactionType) { + public Builder underlyingTransactionType( + GeneralLedgerTransactionUnderlyingTransactionType underlyingTransactionType) { this.underlyingTransactionType = Optional.ofNullable(underlyingTransactionType); return this; } + /** + *

    The accounting period that the GeneralLedgerTransaction was generated in.

    + */ @JsonSetter(value = "accounting_period", nulls = Nulls.SKIP) public Builder accountingPeriod(Optional accountingPeriod) { this.accountingPeriod = accountingPeriod; @@ -419,6 +449,9 @@ public Builder accountingPeriod(GeneralLedgerTransactionAccountingPeriod account return this; } + /** + *

    The company the GeneralLedgerTransaction belongs to.

    + */ @JsonSetter(value = "company", nulls = Nulls.SKIP) public Builder company(Optional company) { this.company = company; @@ -430,6 +463,9 @@ public Builder company(GeneralLedgerTransactionCompany company) { return this; } + /** + *

    When the third party's GeneralLedgerTransaction entry was updated.

    + */ @JsonSetter(value = "remote_updated_at", nulls = Nulls.SKIP) public Builder remoteUpdatedAt(Optional remoteUpdatedAt) { this.remoteUpdatedAt = remoteUpdatedAt; @@ -441,6 +477,9 @@ public Builder remoteUpdatedAt(OffsetDateTime remoteUpdatedAt) { return this; } + /** + *

    When the third party's GeneralLedgerTransaction entry was created.

    + */ @JsonSetter(value = "remote_created_at", nulls = Nulls.SKIP) public Builder remoteCreatedAt(Optional remoteCreatedAt) { this.remoteCreatedAt = remoteCreatedAt; @@ -465,6 +504,9 @@ public Builder trackingCategories( return this; } + /** + *

    The date that the transaction was posted to the general ledger.

    + */ @JsonSetter(value = "posting_date", nulls = Nulls.SKIP) public Builder postingDate(Optional postingDate) { this.postingDate = postingDate; @@ -476,6 +518,9 @@ public Builder postingDate(OffsetDateTime postingDate) { return this; } + /** + *

    A list of “General Ledger Transaction Applied to Lines” objects.

    + */ @JsonSetter(value = "general_ledger_transaction_lines", nulls = Nulls.SKIP) public Builder generalLedgerTransactionLines( Optional> @@ -490,6 +535,9 @@ public Builder generalLedgerTransactionLines( return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/accounting/types/GeneralLedgerTransactionLine.java b/src/main/java/com/merge/api/accounting/types/GeneralLedgerTransactionLine.java index 93e2ce94c..6c2095e53 100644 --- a/src/main/java/com/merge/api/accounting/types/GeneralLedgerTransactionLine.java +++ b/src/main/java/com/merge/api/accounting/types/GeneralLedgerTransactionLine.java @@ -40,9 +40,11 @@ public final class GeneralLedgerTransactionLine { private final Optional contact; + private final Optional project; + private final Optional baseCurrency; - private final Optional transactionCurrency; + private final Optional transactionCurrency; private final Optional exchangeRate; @@ -75,8 +77,9 @@ private GeneralLedgerTransactionLine( Optional company, Optional employee, Optional contact, + Optional project, Optional baseCurrency, - Optional transactionCurrency, + Optional transactionCurrency, Optional exchangeRate, Optional description, Optional> trackingCategories, @@ -96,6 +99,7 @@ private GeneralLedgerTransactionLine( this.company = company; this.employee = employee; this.contact = contact; + this.project = project; this.baseCurrency = baseCurrency; this.transactionCurrency = transactionCurrency; this.exchangeRate = exchangeRate; @@ -163,6 +167,11 @@ public Optional getContact() { return contact; } + @JsonProperty("project") + public Optional getProject() { + return project; + } + /** * @return The base currency of the transaction *
      @@ -791,7 +800,7 @@ public Optional getBaseCurrency() { *
    */ @JsonProperty("transaction_currency") - public Optional getTransactionCurrency() { + public Optional getTransactionCurrency() { return transactionCurrency; } @@ -874,6 +883,7 @@ private boolean equalTo(GeneralLedgerTransactionLine other) { && company.equals(other.company) && employee.equals(other.employee) && contact.equals(other.contact) + && project.equals(other.project) && baseCurrency.equals(other.baseCurrency) && transactionCurrency.equals(other.transactionCurrency) && exchangeRate.equals(other.exchangeRate) @@ -899,6 +909,7 @@ public int hashCode() { this.company, this.employee, this.contact, + this.project, this.baseCurrency, this.transactionCurrency, this.exchangeRate, @@ -947,14 +958,23 @@ public interface _FinalStage { _FinalStage id(String id); + /** + *

    The third-party API ID of the matching object.

    + */ _FinalStage remoteId(Optional remoteId); _FinalStage remoteId(String remoteId); + /** + *

    The datetime that this object was created by Merge.

    + */ _FinalStage createdAt(Optional createdAt); _FinalStage createdAt(OffsetDateTime createdAt); + /** + *

    The datetime that this object was modified by Merge.

    + */ _FinalStage modifiedAt(Optional modifiedAt); _FinalStage modifiedAt(OffsetDateTime modifiedAt); @@ -963,6 +983,9 @@ public interface _FinalStage { _FinalStage account(GeneralLedgerTransactionLineAccount account); + /** + *

    The company the GeneralLedgerTransaction belongs to.

    + */ _FinalStage company(Optional company); _FinalStage company(GeneralLedgerTransactionLineCompany company); @@ -975,240 +998,12 @@ public interface _FinalStage { _FinalStage contact(GeneralLedgerTransactionLineContact contact); - _FinalStage baseCurrency(Optional baseCurrency); - - _FinalStage baseCurrency(TransactionCurrencyEnum baseCurrency); - - _FinalStage transactionCurrency(Optional transactionCurrency); - - _FinalStage transactionCurrency(TransactionCurrencyEnum transactionCurrency); - - _FinalStage exchangeRate(Optional exchangeRate); - - _FinalStage exchangeRate(String exchangeRate); - - _FinalStage description(Optional description); - - _FinalStage description(String description); - - _FinalStage trackingCategories( - Optional> trackingCategories); - - _FinalStage trackingCategories(List trackingCategories); - - _FinalStage item(Optional item); - - _FinalStage item(GeneralLedgerTransactionLineItem item); - - _FinalStage remoteWasDeleted(Optional remoteWasDeleted); - - _FinalStage remoteWasDeleted(Boolean remoteWasDeleted); - - _FinalStage fieldMappings(Optional> fieldMappings); - - _FinalStage fieldMappings(Map fieldMappings); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder - implements DebitAmountStage, - CreditAmountStage, - ForeignDebitAmountStage, - ForeignCreditAmountStage, - _FinalStage { - private String debitAmount; - - private String creditAmount; - - private String foreignDebitAmount; - - private String foreignCreditAmount; - - private Optional> fieldMappings = Optional.empty(); - - private Optional remoteWasDeleted = Optional.empty(); - - private Optional item = Optional.empty(); - - private Optional> trackingCategories = - Optional.empty(); - - private Optional description = Optional.empty(); - - private Optional exchangeRate = Optional.empty(); - - private Optional transactionCurrency = Optional.empty(); - - private Optional baseCurrency = Optional.empty(); - - private Optional contact = Optional.empty(); - - private Optional employee = Optional.empty(); - - private Optional company = Optional.empty(); - - private Optional account = Optional.empty(); - - private Optional modifiedAt = Optional.empty(); - - private Optional createdAt = Optional.empty(); - - private Optional remoteId = Optional.empty(); - - private Optional id = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - @java.lang.Override - public Builder from(GeneralLedgerTransactionLine other) { - id(other.getId()); - remoteId(other.getRemoteId()); - createdAt(other.getCreatedAt()); - modifiedAt(other.getModifiedAt()); - account(other.getAccount()); - company(other.getCompany()); - employee(other.getEmployee()); - contact(other.getContact()); - baseCurrency(other.getBaseCurrency()); - transactionCurrency(other.getTransactionCurrency()); - exchangeRate(other.getExchangeRate()); - description(other.getDescription()); - trackingCategories(other.getTrackingCategories()); - debitAmount(other.getDebitAmount()); - creditAmount(other.getCreditAmount()); - item(other.getItem()); - foreignDebitAmount(other.getForeignDebitAmount()); - foreignCreditAmount(other.getForeignCreditAmount()); - remoteWasDeleted(other.getRemoteWasDeleted()); - fieldMappings(other.getFieldMappings()); - return this; - } - - @java.lang.Override - @JsonSetter("debit_amount") - public CreditAmountStage debitAmount(@NotNull String debitAmount) { - this.debitAmount = debitAmount; - return this; - } - - @java.lang.Override - @JsonSetter("credit_amount") - public ForeignDebitAmountStage creditAmount(@NotNull String creditAmount) { - this.creditAmount = creditAmount; - return this; - } - - @java.lang.Override - @JsonSetter("foreign_debit_amount") - public ForeignCreditAmountStage foreignDebitAmount(@NotNull String foreignDebitAmount) { - this.foreignDebitAmount = foreignDebitAmount; - return this; - } - - @java.lang.Override - @JsonSetter("foreign_credit_amount") - public _FinalStage foreignCreditAmount(@NotNull String foreignCreditAmount) { - this.foreignCreditAmount = foreignCreditAmount; - return this; - } - - @java.lang.Override - public _FinalStage fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.ofNullable(fieldMappings); - return this; - } - - @java.lang.Override - @JsonSetter(value = "field_mappings", nulls = Nulls.SKIP) - public _FinalStage fieldMappings(Optional> fieldMappings) { - this.fieldMappings = fieldMappings; - return this; - } - - /** - *

    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.

    - * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); - return this; - } - - @java.lang.Override - @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) - public _FinalStage remoteWasDeleted(Optional remoteWasDeleted) { - this.remoteWasDeleted = remoteWasDeleted; - return this; - } - - @java.lang.Override - public _FinalStage item(GeneralLedgerTransactionLineItem item) { - this.item = Optional.ofNullable(item); - return this; - } - - @java.lang.Override - @JsonSetter(value = "item", nulls = Nulls.SKIP) - public _FinalStage item(Optional item) { - this.item = item; - return this; - } - - @java.lang.Override - public _FinalStage trackingCategories( - List trackingCategories) { - this.trackingCategories = Optional.ofNullable(trackingCategories); - return this; - } - - @java.lang.Override - @JsonSetter(value = "tracking_categories", nulls = Nulls.SKIP) - public _FinalStage trackingCategories( - Optional> trackingCategories) { - this.trackingCategories = trackingCategories; - return this; - } - - /** - *

    A description of the line item.

    - * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage description(String description) { - this.description = Optional.ofNullable(description); - return this; - } - - @java.lang.Override - @JsonSetter(value = "description", nulls = Nulls.SKIP) - public _FinalStage description(Optional description) { - this.description = description; - return this; - } - - /** - *

    The exchange rate between the base currency and the transaction currency.

    - * @return Reference to {@code this} so that method calls can be chained together. - */ - @java.lang.Override - public _FinalStage exchangeRate(String exchangeRate) { - this.exchangeRate = Optional.ofNullable(exchangeRate); - return this; - } + _FinalStage project(Optional project); - @java.lang.Override - @JsonSetter(value = "exchange_rate", nulls = Nulls.SKIP) - public _FinalStage exchangeRate(Optional exchangeRate) { - this.exchangeRate = exchangeRate; - return this; - } + _FinalStage project(GeneralLedgerTransactionLineProject project); /** - *

    The transaction currency that the transaction is made in.

    + *

    The base currency of the transaction

    *
      *
    • XUA - ADB Unit of Account
    • *
    • AFN - Afghan Afghani
    • @@ -1517,20 +1312,1525 @@ public _FinalStage exchangeRate(Optional exchangeRate) { *
    • ZWR - Zimbabwean Dollar (2008)
    • *
    • ZWL - Zimbabwean Dollar (2009)
    • *
    - * @return Reference to {@code this} so that method calls can be chained together. */ - @java.lang.Override - public _FinalStage transactionCurrency(TransactionCurrencyEnum transactionCurrency) { - this.transactionCurrency = Optional.ofNullable(transactionCurrency); - return this; - } + _FinalStage baseCurrency(Optional baseCurrency); - @java.lang.Override - @JsonSetter(value = "transaction_currency", nulls = Nulls.SKIP) - public _FinalStage transactionCurrency(Optional transactionCurrency) { - this.transactionCurrency = transactionCurrency; - return this; - } + _FinalStage baseCurrency(TransactionCurrencyEnum baseCurrency); + + /** + *

    The transaction currency that the transaction is made in.

    + *
      + *
    • XUA - ADB Unit of Account
    • + *
    • AFN - Afghan Afghani
    • + *
    • AFA - Afghan Afghani (1927–2002)
    • + *
    • ALL - Albanian Lek
    • + *
    • ALK - Albanian Lek (1946–1965)
    • + *
    • DZD - Algerian Dinar
    • + *
    • ADP - Andorran Peseta
    • + *
    • AOA - Angolan Kwanza
    • + *
    • AOK - Angolan Kwanza (1977–1991)
    • + *
    • AON - Angolan New Kwanza (1990–2000)
    • + *
    • AOR - Angolan Readjusted Kwanza (1995–1999)
    • + *
    • ARA - Argentine Austral
    • + *
    • ARS - Argentine Peso
    • + *
    • ARM - Argentine Peso (1881–1970)
    • + *
    • ARP - Argentine Peso (1983–1985)
    • + *
    • ARL - Argentine Peso Ley (1970–1983)
    • + *
    • AMD - Armenian Dram
    • + *
    • AWG - Aruban Florin
    • + *
    • AUD - Australian Dollar
    • + *
    • ATS - Austrian Schilling
    • + *
    • AZN - Azerbaijani Manat
    • + *
    • AZM - Azerbaijani Manat (1993–2006)
    • + *
    • BSD - Bahamian Dollar
    • + *
    • BHD - Bahraini Dinar
    • + *
    • BDT - Bangladeshi Taka
    • + *
    • BBD - Barbadian Dollar
    • + *
    • BYN - Belarusian Ruble
    • + *
    • BYB - Belarusian Ruble (1994–1999)
    • + *
    • BYR - Belarusian Ruble (2000–2016)
    • + *
    • BEF - Belgian Franc
    • + *
    • BEC - Belgian Franc (convertible)
    • + *
    • BEL - Belgian Franc (financial)
    • + *
    • BZD - Belize Dollar
    • + *
    • BMD - Bermudan Dollar
    • + *
    • BTN - Bhutanese Ngultrum
    • + *
    • BOB - Bolivian Boliviano
    • + *
    • BOL - Bolivian Boliviano (1863–1963)
    • + *
    • BOV - Bolivian Mvdol
    • + *
    • BOP - Bolivian Peso
    • + *
    • BAM - Bosnia-Herzegovina Convertible Mark
    • + *
    • BAD - Bosnia-Herzegovina Dinar (1992–1994)
    • + *
    • BAN - Bosnia-Herzegovina New Dinar (1994–1997)
    • + *
    • BWP - Botswanan Pula
    • + *
    • BRC - Brazilian Cruzado (1986–1989)
    • + *
    • BRZ - Brazilian Cruzeiro (1942–1967)
    • + *
    • BRE - Brazilian Cruzeiro (1990–1993)
    • + *
    • BRR - Brazilian Cruzeiro (1993–1994)
    • + *
    • BRN - Brazilian New Cruzado (1989–1990)
    • + *
    • BRB - Brazilian New Cruzeiro (1967–1986)
    • + *
    • BRL - Brazilian Real
    • + *
    • GBP - British Pound
    • + *
    • BND - Brunei Dollar
    • + *
    • BGL - Bulgarian Hard Lev
    • + *
    • BGN - Bulgarian Lev
    • + *
    • BGO - Bulgarian Lev (1879–1952)
    • + *
    • BGM - Bulgarian Socialist Lev
    • + *
    • BUK - Burmese Kyat
    • + *
    • BIF - Burundian Franc
    • + *
    • XPF - CFP Franc
    • + *
    • KHR - Cambodian Riel
    • + *
    • CAD - Canadian Dollar
    • + *
    • CVE - Cape Verdean Escudo
    • + *
    • KYD - Cayman Islands Dollar
    • + *
    • XAF - Central African CFA Franc
    • + *
    • CLE - Chilean Escudo
    • + *
    • CLP - Chilean Peso
    • + *
    • CLF - Chilean Unit of Account (UF)
    • + *
    • CNX - Chinese People’s Bank Dollar
    • + *
    • CNY - Chinese Yuan
    • + *
    • CNH - Chinese Yuan (offshore)
    • + *
    • COP - Colombian Peso
    • + *
    • COU - Colombian Real Value Unit
    • + *
    • KMF - Comorian Franc
    • + *
    • CDF - Congolese Franc
    • + *
    • CRC - Costa Rican Colón
    • + *
    • HRD - Croatian Dinar
    • + *
    • HRK - Croatian Kuna
    • + *
    • CUC - Cuban Convertible Peso
    • + *
    • CUP - Cuban Peso
    • + *
    • CYP - Cypriot Pound
    • + *
    • CZK - Czech Koruna
    • + *
    • CSK - Czechoslovak Hard Koruna
    • + *
    • DKK - Danish Krone
    • + *
    • DJF - Djiboutian Franc
    • + *
    • DOP - Dominican Peso
    • + *
    • NLG - Dutch Guilder
    • + *
    • XCD - East Caribbean Dollar
    • + *
    • DDM - East German Mark
    • + *
    • ECS - Ecuadorian Sucre
    • + *
    • ECV - Ecuadorian Unit of Constant Value
    • + *
    • EGP - Egyptian Pound
    • + *
    • GQE - Equatorial Guinean Ekwele
    • + *
    • ERN - Eritrean Nakfa
    • + *
    • EEK - Estonian Kroon
    • + *
    • ETB - Ethiopian Birr
    • + *
    • EUR - Euro
    • + *
    • XBA - European Composite Unit
    • + *
    • XEU - European Currency Unit
    • + *
    • XBB - European Monetary Unit
    • + *
    • XBC - European Unit of Account (XBC)
    • + *
    • XBD - European Unit of Account (XBD)
    • + *
    • FKP - Falkland Islands Pound
    • + *
    • FJD - Fijian Dollar
    • + *
    • FIM - Finnish Markka
    • + *
    • FRF - French Franc
    • + *
    • XFO - French Gold Franc
    • + *
    • XFU - French UIC-Franc
    • + *
    • GMD - Gambian Dalasi
    • + *
    • GEK - Georgian Kupon Larit
    • + *
    • GEL - Georgian Lari
    • + *
    • DEM - German Mark
    • + *
    • GHS - Ghanaian Cedi
    • + *
    • GHC - Ghanaian Cedi (1979–2007)
    • + *
    • GIP - Gibraltar Pound
    • + *
    • XAU - Gold
    • + *
    • GRD - Greek Drachma
    • + *
    • GTQ - Guatemalan Quetzal
    • + *
    • GWP - Guinea-Bissau Peso
    • + *
    • GNF - Guinean Franc
    • + *
    • GNS - Guinean Syli
    • + *
    • GYD - Guyanaese Dollar
    • + *
    • HTG - Haitian Gourde
    • + *
    • HNL - Honduran Lempira
    • + *
    • HKD - Hong Kong Dollar
    • + *
    • HUF - Hungarian Forint
    • + *
    • IMP - IMP
    • + *
    • ISK - Icelandic Króna
    • + *
    • ISJ - Icelandic Króna (1918–1981)
    • + *
    • INR - Indian Rupee
    • + *
    • IDR - Indonesian Rupiah
    • + *
    • IRR - Iranian Rial
    • + *
    • IQD - Iraqi Dinar
    • + *
    • IEP - Irish Pound
    • + *
    • ILS - Israeli New Shekel
    • + *
    • ILP - Israeli Pound
    • + *
    • ILR - Israeli Shekel (1980–1985)
    • + *
    • ITL - Italian Lira
    • + *
    • JMD - Jamaican Dollar
    • + *
    • JPY - Japanese Yen
    • + *
    • JOD - Jordanian Dinar
    • + *
    • KZT - Kazakhstani Tenge
    • + *
    • KES - Kenyan Shilling
    • + *
    • KWD - Kuwaiti Dinar
    • + *
    • KGS - Kyrgystani Som
    • + *
    • LAK - Laotian Kip
    • + *
    • LVL - Latvian Lats
    • + *
    • LVR - Latvian Ruble
    • + *
    • LBP - Lebanese Pound
    • + *
    • LSL - Lesotho Loti
    • + *
    • LRD - Liberian Dollar
    • + *
    • LYD - Libyan Dinar
    • + *
    • LTL - Lithuanian Litas
    • + *
    • LTT - Lithuanian Talonas
    • + *
    • LUL - Luxembourg Financial Franc
    • + *
    • LUC - Luxembourgian Convertible Franc
    • + *
    • LUF - Luxembourgian Franc
    • + *
    • MOP - Macanese Pataca
    • + *
    • MKD - Macedonian Denar
    • + *
    • MKN - Macedonian Denar (1992–1993)
    • + *
    • MGA - Malagasy Ariary
    • + *
    • MGF - Malagasy Franc
    • + *
    • MWK - Malawian Kwacha
    • + *
    • MYR - Malaysian Ringgit
    • + *
    • MVR - Maldivian Rufiyaa
    • + *
    • MVP - Maldivian Rupee (1947–1981)
    • + *
    • MLF - Malian Franc
    • + *
    • MTL - Maltese Lira
    • + *
    • MTP - Maltese Pound
    • + *
    • MRU - Mauritanian Ouguiya
    • + *
    • MRO - Mauritanian Ouguiya (1973–2017)
    • + *
    • MUR - Mauritian Rupee
    • + *
    • MXV - Mexican Investment Unit
    • + *
    • MXN - Mexican Peso
    • + *
    • MXP - Mexican Silver Peso (1861–1992)
    • + *
    • MDC - Moldovan Cupon
    • + *
    • MDL - Moldovan Leu
    • + *
    • MCF - Monegasque Franc
    • + *
    • MNT - Mongolian Tugrik
    • + *
    • MAD - Moroccan Dirham
    • + *
    • MAF - Moroccan Franc
    • + *
    • MZE - Mozambican Escudo
    • + *
    • MZN - Mozambican Metical
    • + *
    • MZM - Mozambican Metical (1980–2006)
    • + *
    • MMK - Myanmar Kyat
    • + *
    • NAD - Namibian Dollar
    • + *
    • NPR - Nepalese Rupee
    • + *
    • ANG - Netherlands Antillean Guilder
    • + *
    • TWD - New Taiwan Dollar
    • + *
    • NZD - New Zealand Dollar
    • + *
    • NIO - Nicaraguan Córdoba
    • + *
    • NIC - Nicaraguan Córdoba (1988–1991)
    • + *
    • NGN - Nigerian Naira
    • + *
    • KPW - North Korean Won
    • + *
    • NOK - Norwegian Krone
    • + *
    • OMR - Omani Rial
    • + *
    • PKR - Pakistani Rupee
    • + *
    • XPD - Palladium
    • + *
    • PAB - Panamanian Balboa
    • + *
    • PGK - Papua New Guinean Kina
    • + *
    • PYG - Paraguayan Guarani
    • + *
    • PEI - Peruvian Inti
    • + *
    • PEN - Peruvian Sol
    • + *
    • PES - Peruvian Sol (1863–1965)
    • + *
    • PHP - Philippine Peso
    • + *
    • XPT - Platinum
    • + *
    • PLN - Polish Zloty
    • + *
    • PLZ - Polish Zloty (1950–1995)
    • + *
    • PTE - Portuguese Escudo
    • + *
    • GWE - Portuguese Guinea Escudo
    • + *
    • QAR - Qatari Rial
    • + *
    • XRE - RINET Funds
    • + *
    • RHD - Rhodesian Dollar
    • + *
    • RON - Romanian Leu
    • + *
    • ROL - Romanian Leu (1952–2006)
    • + *
    • RUB - Russian Ruble
    • + *
    • RUR - Russian Ruble (1991–1998)
    • + *
    • RWF - Rwandan Franc
    • + *
    • SVC - Salvadoran Colón
    • + *
    • WST - Samoan Tala
    • + *
    • SAR - Saudi Riyal
    • + *
    • RSD - Serbian Dinar
    • + *
    • CSD - Serbian Dinar (2002–2006)
    • + *
    • SCR - Seychellois Rupee
    • + *
    • SLL - Sierra Leonean Leone
    • + *
    • XAG - Silver
    • + *
    • SGD - Singapore Dollar
    • + *
    • SKK - Slovak Koruna
    • + *
    • SIT - Slovenian Tolar
    • + *
    • SBD - Solomon Islands Dollar
    • + *
    • SOS - Somali Shilling
    • + *
    • ZAR - South African Rand
    • + *
    • ZAL - South African Rand (financial)
    • + *
    • KRH - South Korean Hwan (1953–1962)
    • + *
    • KRW - South Korean Won
    • + *
    • KRO - South Korean Won (1945–1953)
    • + *
    • SSP - South Sudanese Pound
    • + *
    • SUR - Soviet Rouble
    • + *
    • ESP - Spanish Peseta
    • + *
    • ESA - Spanish Peseta (A account)
    • + *
    • ESB - Spanish Peseta (convertible account)
    • + *
    • XDR - Special Drawing Rights
    • + *
    • LKR - Sri Lankan Rupee
    • + *
    • SHP - St. Helena Pound
    • + *
    • XSU - Sucre
    • + *
    • SDD - Sudanese Dinar (1992–2007)
    • + *
    • SDG - Sudanese Pound
    • + *
    • SDP - Sudanese Pound (1957–1998)
    • + *
    • SRD - Surinamese Dollar
    • + *
    • SRG - Surinamese Guilder
    • + *
    • SZL - Swazi Lilangeni
    • + *
    • SEK - Swedish Krona
    • + *
    • CHF - Swiss Franc
    • + *
    • SYP - Syrian Pound
    • + *
    • STN - São Tomé & Príncipe Dobra
    • + *
    • STD - São Tomé & Príncipe Dobra (1977–2017)
    • + *
    • TVD - TVD
    • + *
    • TJR - Tajikistani Ruble
    • + *
    • TJS - Tajikistani Somoni
    • + *
    • TZS - Tanzanian Shilling
    • + *
    • XTS - Testing Currency Code
    • + *
    • THB - Thai Baht
    • + *
    • XXX - The codes assigned for transactions where no currency is involved
    • + *
    • TPE - Timorese Escudo
    • + *
    • TOP - Tongan Paʻanga
    • + *
    • TTD - Trinidad & Tobago Dollar
    • + *
    • TND - Tunisian Dinar
    • + *
    • TRY - Turkish Lira
    • + *
    • TRL - Turkish Lira (1922–2005)
    • + *
    • TMT - Turkmenistani Manat
    • + *
    • TMM - Turkmenistani Manat (1993–2009)
    • + *
    • USD - US Dollar
    • + *
    • USN - US Dollar (Next day)
    • + *
    • USS - US Dollar (Same day)
    • + *
    • UGX - Ugandan Shilling
    • + *
    • UGS - Ugandan Shilling (1966–1987)
    • + *
    • UAH - Ukrainian Hryvnia
    • + *
    • UAK - Ukrainian Karbovanets
    • + *
    • AED - United Arab Emirates Dirham
    • + *
    • UYW - Uruguayan Nominal Wage Index Unit
    • + *
    • UYU - Uruguayan Peso
    • + *
    • UYP - Uruguayan Peso (1975–1993)
    • + *
    • UYI - Uruguayan Peso (Indexed Units)
    • + *
    • UZS - Uzbekistani Som
    • + *
    • VUV - Vanuatu Vatu
    • + *
    • VES - Venezuelan Bolívar
    • + *
    • VEB - Venezuelan Bolívar (1871–2008)
    • + *
    • VEF - Venezuelan Bolívar (2008–2018)
    • + *
    • VND - Vietnamese Dong
    • + *
    • VNN - Vietnamese Dong (1978–1985)
    • + *
    • CHE - WIR Euro
    • + *
    • CHW - WIR Franc
    • + *
    • XOF - West African CFA Franc
    • + *
    • YDD - Yemeni Dinar
    • + *
    • YER - Yemeni Rial
    • + *
    • YUN - Yugoslavian Convertible Dinar (1990–1992)
    • + *
    • YUD - Yugoslavian Hard Dinar (1966–1990)
    • + *
    • YUM - Yugoslavian New Dinar (1994–2002)
    • + *
    • YUR - Yugoslavian Reformed Dinar (1992–1993)
    • + *
    • ZWN - ZWN
    • + *
    • ZRN - Zairean New Zaire (1993–1998)
    • + *
    • ZRZ - Zairean Zaire (1971–1993)
    • + *
    • ZMW - Zambian Kwacha
    • + *
    • ZMK - Zambian Kwacha (1968–2012)
    • + *
    • ZWD - Zimbabwean Dollar (1980–2008)
    • + *
    • ZWR - Zimbabwean Dollar (2008)
    • + *
    • ZWL - Zimbabwean Dollar (2009)
    • + *
    + */ + _FinalStage transactionCurrency(Optional transactionCurrency); + + _FinalStage transactionCurrency(GeneralLedgerTransactionLineTransactionCurrency transactionCurrency); + + /** + *

    The exchange rate between the base currency and the transaction currency.

    + */ + _FinalStage exchangeRate(Optional exchangeRate); + + _FinalStage exchangeRate(String exchangeRate); + + /** + *

    A description of the line item.

    + */ + _FinalStage description(Optional description); + + _FinalStage description(String description); + + _FinalStage trackingCategories( + Optional> trackingCategories); + + _FinalStage trackingCategories(List trackingCategories); + + _FinalStage item(Optional item); + + _FinalStage item(GeneralLedgerTransactionLineItem item); + + /** + *

    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.

    + */ + _FinalStage remoteWasDeleted(Optional remoteWasDeleted); + + _FinalStage remoteWasDeleted(Boolean remoteWasDeleted); + + _FinalStage fieldMappings(Optional> fieldMappings); + + _FinalStage fieldMappings(Map fieldMappings); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder + implements DebitAmountStage, + CreditAmountStage, + ForeignDebitAmountStage, + ForeignCreditAmountStage, + _FinalStage { + private String debitAmount; + + private String creditAmount; + + private String foreignDebitAmount; + + private String foreignCreditAmount; + + private Optional> fieldMappings = Optional.empty(); + + private Optional remoteWasDeleted = Optional.empty(); + + private Optional item = Optional.empty(); + + private Optional> trackingCategories = + Optional.empty(); + + private Optional description = Optional.empty(); + + private Optional exchangeRate = Optional.empty(); + + private Optional transactionCurrency = Optional.empty(); + + private Optional baseCurrency = Optional.empty(); + + private Optional project = Optional.empty(); + + private Optional contact = Optional.empty(); + + private Optional employee = Optional.empty(); + + private Optional company = Optional.empty(); + + private Optional account = Optional.empty(); + + private Optional modifiedAt = Optional.empty(); + + private Optional createdAt = Optional.empty(); + + private Optional remoteId = Optional.empty(); + + private Optional id = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(GeneralLedgerTransactionLine other) { + id(other.getId()); + remoteId(other.getRemoteId()); + createdAt(other.getCreatedAt()); + modifiedAt(other.getModifiedAt()); + account(other.getAccount()); + company(other.getCompany()); + employee(other.getEmployee()); + contact(other.getContact()); + project(other.getProject()); + baseCurrency(other.getBaseCurrency()); + transactionCurrency(other.getTransactionCurrency()); + exchangeRate(other.getExchangeRate()); + description(other.getDescription()); + trackingCategories(other.getTrackingCategories()); + debitAmount(other.getDebitAmount()); + creditAmount(other.getCreditAmount()); + item(other.getItem()); + foreignDebitAmount(other.getForeignDebitAmount()); + foreignCreditAmount(other.getForeignCreditAmount()); + remoteWasDeleted(other.getRemoteWasDeleted()); + fieldMappings(other.getFieldMappings()); + return this; + } + + @java.lang.Override + @JsonSetter("debit_amount") + public CreditAmountStage debitAmount(@NotNull String debitAmount) { + this.debitAmount = debitAmount; + return this; + } + + @java.lang.Override + @JsonSetter("credit_amount") + public ForeignDebitAmountStage creditAmount(@NotNull String creditAmount) { + this.creditAmount = creditAmount; + return this; + } + + @java.lang.Override + @JsonSetter("foreign_debit_amount") + public ForeignCreditAmountStage foreignDebitAmount(@NotNull String foreignDebitAmount) { + this.foreignDebitAmount = foreignDebitAmount; + return this; + } + + @java.lang.Override + @JsonSetter("foreign_credit_amount") + public _FinalStage foreignCreditAmount(@NotNull String foreignCreditAmount) { + this.foreignCreditAmount = foreignCreditAmount; + return this; + } + + @java.lang.Override + public _FinalStage fieldMappings(Map fieldMappings) { + this.fieldMappings = Optional.ofNullable(fieldMappings); + return this; + } + + @java.lang.Override + @JsonSetter(value = "field_mappings", nulls = Nulls.SKIP) + public _FinalStage fieldMappings(Optional> fieldMappings) { + this.fieldMappings = fieldMappings; + return this; + } + + /** + *

    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.

    + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage remoteWasDeleted(Boolean remoteWasDeleted) { + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); + return this; + } + + /** + *

    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.

    + */ + @java.lang.Override + @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) + public _FinalStage remoteWasDeleted(Optional remoteWasDeleted) { + this.remoteWasDeleted = remoteWasDeleted; + return this; + } + + @java.lang.Override + public _FinalStage item(GeneralLedgerTransactionLineItem item) { + this.item = Optional.ofNullable(item); + return this; + } + + @java.lang.Override + @JsonSetter(value = "item", nulls = Nulls.SKIP) + public _FinalStage item(Optional item) { + this.item = item; + return this; + } + + @java.lang.Override + public _FinalStage trackingCategories( + List trackingCategories) { + this.trackingCategories = Optional.ofNullable(trackingCategories); + return this; + } + + @java.lang.Override + @JsonSetter(value = "tracking_categories", nulls = Nulls.SKIP) + public _FinalStage trackingCategories( + Optional> trackingCategories) { + this.trackingCategories = trackingCategories; + return this; + } + + /** + *

    A description of the line item.

    + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage description(String description) { + this.description = Optional.ofNullable(description); + return this; + } + + /** + *

    A description of the line item.

    + */ + @java.lang.Override + @JsonSetter(value = "description", nulls = Nulls.SKIP) + public _FinalStage description(Optional description) { + this.description = description; + return this; + } + + /** + *

    The exchange rate between the base currency and the transaction currency.

    + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage exchangeRate(String exchangeRate) { + this.exchangeRate = Optional.ofNullable(exchangeRate); + return this; + } + + /** + *

    The exchange rate between the base currency and the transaction currency.

    + */ + @java.lang.Override + @JsonSetter(value = "exchange_rate", nulls = Nulls.SKIP) + public _FinalStage exchangeRate(Optional exchangeRate) { + this.exchangeRate = exchangeRate; + return this; + } + + /** + *

    The transaction currency that the transaction is made in.

    + *
      + *
    • XUA - ADB Unit of Account
    • + *
    • AFN - Afghan Afghani
    • + *
    • AFA - Afghan Afghani (1927–2002)
    • + *
    • ALL - Albanian Lek
    • + *
    • ALK - Albanian Lek (1946–1965)
    • + *
    • DZD - Algerian Dinar
    • + *
    • ADP - Andorran Peseta
    • + *
    • AOA - Angolan Kwanza
    • + *
    • AOK - Angolan Kwanza (1977–1991)
    • + *
    • AON - Angolan New Kwanza (1990–2000)
    • + *
    • AOR - Angolan Readjusted Kwanza (1995–1999)
    • + *
    • ARA - Argentine Austral
    • + *
    • ARS - Argentine Peso
    • + *
    • ARM - Argentine Peso (1881–1970)
    • + *
    • ARP - Argentine Peso (1983–1985)
    • + *
    • ARL - Argentine Peso Ley (1970–1983)
    • + *
    • AMD - Armenian Dram
    • + *
    • AWG - Aruban Florin
    • + *
    • AUD - Australian Dollar
    • + *
    • ATS - Austrian Schilling
    • + *
    • AZN - Azerbaijani Manat
    • + *
    • AZM - Azerbaijani Manat (1993–2006)
    • + *
    • BSD - Bahamian Dollar
    • + *
    • BHD - Bahraini Dinar
    • + *
    • BDT - Bangladeshi Taka
    • + *
    • BBD - Barbadian Dollar
    • + *
    • BYN - Belarusian Ruble
    • + *
    • BYB - Belarusian Ruble (1994–1999)
    • + *
    • BYR - Belarusian Ruble (2000–2016)
    • + *
    • BEF - Belgian Franc
    • + *
    • BEC - Belgian Franc (convertible)
    • + *
    • BEL - Belgian Franc (financial)
    • + *
    • BZD - Belize Dollar
    • + *
    • BMD - Bermudan Dollar
    • + *
    • BTN - Bhutanese Ngultrum
    • + *
    • BOB - Bolivian Boliviano
    • + *
    • BOL - Bolivian Boliviano (1863–1963)
    • + *
    • BOV - Bolivian Mvdol
    • + *
    • BOP - Bolivian Peso
    • + *
    • BAM - Bosnia-Herzegovina Convertible Mark
    • + *
    • BAD - Bosnia-Herzegovina Dinar (1992–1994)
    • + *
    • BAN - Bosnia-Herzegovina New Dinar (1994–1997)
    • + *
    • BWP - Botswanan Pula
    • + *
    • BRC - Brazilian Cruzado (1986–1989)
    • + *
    • BRZ - Brazilian Cruzeiro (1942–1967)
    • + *
    • BRE - Brazilian Cruzeiro (1990–1993)
    • + *
    • BRR - Brazilian Cruzeiro (1993–1994)
    • + *
    • BRN - Brazilian New Cruzado (1989–1990)
    • + *
    • BRB - Brazilian New Cruzeiro (1967–1986)
    • + *
    • BRL - Brazilian Real
    • + *
    • GBP - British Pound
    • + *
    • BND - Brunei Dollar
    • + *
    • BGL - Bulgarian Hard Lev
    • + *
    • BGN - Bulgarian Lev
    • + *
    • BGO - Bulgarian Lev (1879–1952)
    • + *
    • BGM - Bulgarian Socialist Lev
    • + *
    • BUK - Burmese Kyat
    • + *
    • BIF - Burundian Franc
    • + *
    • XPF - CFP Franc
    • + *
    • KHR - Cambodian Riel
    • + *
    • CAD - Canadian Dollar
    • + *
    • CVE - Cape Verdean Escudo
    • + *
    • KYD - Cayman Islands Dollar
    • + *
    • XAF - Central African CFA Franc
    • + *
    • CLE - Chilean Escudo
    • + *
    • CLP - Chilean Peso
    • + *
    • CLF - Chilean Unit of Account (UF)
    • + *
    • CNX - Chinese People’s Bank Dollar
    • + *
    • CNY - Chinese Yuan
    • + *
    • CNH - Chinese Yuan (offshore)
    • + *
    • COP - Colombian Peso
    • + *
    • COU - Colombian Real Value Unit
    • + *
    • KMF - Comorian Franc
    • + *
    • CDF - Congolese Franc
    • + *
    • CRC - Costa Rican Colón
    • + *
    • HRD - Croatian Dinar
    • + *
    • HRK - Croatian Kuna
    • + *
    • CUC - Cuban Convertible Peso
    • + *
    • CUP - Cuban Peso
    • + *
    • CYP - Cypriot Pound
    • + *
    • CZK - Czech Koruna
    • + *
    • CSK - Czechoslovak Hard Koruna
    • + *
    • DKK - Danish Krone
    • + *
    • DJF - Djiboutian Franc
    • + *
    • DOP - Dominican Peso
    • + *
    • NLG - Dutch Guilder
    • + *
    • XCD - East Caribbean Dollar
    • + *
    • DDM - East German Mark
    • + *
    • ECS - Ecuadorian Sucre
    • + *
    • ECV - Ecuadorian Unit of Constant Value
    • + *
    • EGP - Egyptian Pound
    • + *
    • GQE - Equatorial Guinean Ekwele
    • + *
    • ERN - Eritrean Nakfa
    • + *
    • EEK - Estonian Kroon
    • + *
    • ETB - Ethiopian Birr
    • + *
    • EUR - Euro
    • + *
    • XBA - European Composite Unit
    • + *
    • XEU - European Currency Unit
    • + *
    • XBB - European Monetary Unit
    • + *
    • XBC - European Unit of Account (XBC)
    • + *
    • XBD - European Unit of Account (XBD)
    • + *
    • FKP - Falkland Islands Pound
    • + *
    • FJD - Fijian Dollar
    • + *
    • FIM - Finnish Markka
    • + *
    • FRF - French Franc
    • + *
    • XFO - French Gold Franc
    • + *
    • XFU - French UIC-Franc
    • + *
    • GMD - Gambian Dalasi
    • + *
    • GEK - Georgian Kupon Larit
    • + *
    • GEL - Georgian Lari
    • + *
    • DEM - German Mark
    • + *
    • GHS - Ghanaian Cedi
    • + *
    • GHC - Ghanaian Cedi (1979–2007)
    • + *
    • GIP - Gibraltar Pound
    • + *
    • XAU - Gold
    • + *
    • GRD - Greek Drachma
    • + *
    • GTQ - Guatemalan Quetzal
    • + *
    • GWP - Guinea-Bissau Peso
    • + *
    • GNF - Guinean Franc
    • + *
    • GNS - Guinean Syli
    • + *
    • GYD - Guyanaese Dollar
    • + *
    • HTG - Haitian Gourde
    • + *
    • HNL - Honduran Lempira
    • + *
    • HKD - Hong Kong Dollar
    • + *
    • HUF - Hungarian Forint
    • + *
    • IMP - IMP
    • + *
    • ISK - Icelandic Króna
    • + *
    • ISJ - Icelandic Króna (1918–1981)
    • + *
    • INR - Indian Rupee
    • + *
    • IDR - Indonesian Rupiah
    • + *
    • IRR - Iranian Rial
    • + *
    • IQD - Iraqi Dinar
    • + *
    • IEP - Irish Pound
    • + *
    • ILS - Israeli New Shekel
    • + *
    • ILP - Israeli Pound
    • + *
    • ILR - Israeli Shekel (1980–1985)
    • + *
    • ITL - Italian Lira
    • + *
    • JMD - Jamaican Dollar
    • + *
    • JPY - Japanese Yen
    • + *
    • JOD - Jordanian Dinar
    • + *
    • KZT - Kazakhstani Tenge
    • + *
    • KES - Kenyan Shilling
    • + *
    • KWD - Kuwaiti Dinar
    • + *
    • KGS - Kyrgystani Som
    • + *
    • LAK - Laotian Kip
    • + *
    • LVL - Latvian Lats
    • + *
    • LVR - Latvian Ruble
    • + *
    • LBP - Lebanese Pound
    • + *
    • LSL - Lesotho Loti
    • + *
    • LRD - Liberian Dollar
    • + *
    • LYD - Libyan Dinar
    • + *
    • LTL - Lithuanian Litas
    • + *
    • LTT - Lithuanian Talonas
    • + *
    • LUL - Luxembourg Financial Franc
    • + *
    • LUC - Luxembourgian Convertible Franc
    • + *
    • LUF - Luxembourgian Franc
    • + *
    • MOP - Macanese Pataca
    • + *
    • MKD - Macedonian Denar
    • + *
    • MKN - Macedonian Denar (1992–1993)
    • + *
    • MGA - Malagasy Ariary
    • + *
    • MGF - Malagasy Franc
    • + *
    • MWK - Malawian Kwacha
    • + *
    • MYR - Malaysian Ringgit
    • + *
    • MVR - Maldivian Rufiyaa
    • + *
    • MVP - Maldivian Rupee (1947–1981)
    • + *
    • MLF - Malian Franc
    • + *
    • MTL - Maltese Lira
    • + *
    • MTP - Maltese Pound
    • + *
    • MRU - Mauritanian Ouguiya
    • + *
    • MRO - Mauritanian Ouguiya (1973–2017)
    • + *
    • MUR - Mauritian Rupee
    • + *
    • MXV - Mexican Investment Unit
    • + *
    • MXN - Mexican Peso
    • + *
    • MXP - Mexican Silver Peso (1861–1992)
    • + *
    • MDC - Moldovan Cupon
    • + *
    • MDL - Moldovan Leu
    • + *
    • MCF - Monegasque Franc
    • + *
    • MNT - Mongolian Tugrik
    • + *
    • MAD - Moroccan Dirham
    • + *
    • MAF - Moroccan Franc
    • + *
    • MZE - Mozambican Escudo
    • + *
    • MZN - Mozambican Metical
    • + *
    • MZM - Mozambican Metical (1980–2006)
    • + *
    • MMK - Myanmar Kyat
    • + *
    • NAD - Namibian Dollar
    • + *
    • NPR - Nepalese Rupee
    • + *
    • ANG - Netherlands Antillean Guilder
    • + *
    • TWD - New Taiwan Dollar
    • + *
    • NZD - New Zealand Dollar
    • + *
    • NIO - Nicaraguan Córdoba
    • + *
    • NIC - Nicaraguan Córdoba (1988–1991)
    • + *
    • NGN - Nigerian Naira
    • + *
    • KPW - North Korean Won
    • + *
    • NOK - Norwegian Krone
    • + *
    • OMR - Omani Rial
    • + *
    • PKR - Pakistani Rupee
    • + *
    • XPD - Palladium
    • + *
    • PAB - Panamanian Balboa
    • + *
    • PGK - Papua New Guinean Kina
    • + *
    • PYG - Paraguayan Guarani
    • + *
    • PEI - Peruvian Inti
    • + *
    • PEN - Peruvian Sol
    • + *
    • PES - Peruvian Sol (1863–1965)
    • + *
    • PHP - Philippine Peso
    • + *
    • XPT - Platinum
    • + *
    • PLN - Polish Zloty
    • + *
    • PLZ - Polish Zloty (1950–1995)
    • + *
    • PTE - Portuguese Escudo
    • + *
    • GWE - Portuguese Guinea Escudo
    • + *
    • QAR - Qatari Rial
    • + *
    • XRE - RINET Funds
    • + *
    • RHD - Rhodesian Dollar
    • + *
    • RON - Romanian Leu
    • + *
    • ROL - Romanian Leu (1952–2006)
    • + *
    • RUB - Russian Ruble
    • + *
    • RUR - Russian Ruble (1991–1998)
    • + *
    • RWF - Rwandan Franc
    • + *
    • SVC - Salvadoran Colón
    • + *
    • WST - Samoan Tala
    • + *
    • SAR - Saudi Riyal
    • + *
    • RSD - Serbian Dinar
    • + *
    • CSD - Serbian Dinar (2002–2006)
    • + *
    • SCR - Seychellois Rupee
    • + *
    • SLL - Sierra Leonean Leone
    • + *
    • XAG - Silver
    • + *
    • SGD - Singapore Dollar
    • + *
    • SKK - Slovak Koruna
    • + *
    • SIT - Slovenian Tolar
    • + *
    • SBD - Solomon Islands Dollar
    • + *
    • SOS - Somali Shilling
    • + *
    • ZAR - South African Rand
    • + *
    • ZAL - South African Rand (financial)
    • + *
    • KRH - South Korean Hwan (1953–1962)
    • + *
    • KRW - South Korean Won
    • + *
    • KRO - South Korean Won (1945–1953)
    • + *
    • SSP - South Sudanese Pound
    • + *
    • SUR - Soviet Rouble
    • + *
    • ESP - Spanish Peseta
    • + *
    • ESA - Spanish Peseta (A account)
    • + *
    • ESB - Spanish Peseta (convertible account)
    • + *
    • XDR - Special Drawing Rights
    • + *
    • LKR - Sri Lankan Rupee
    • + *
    • SHP - St. Helena Pound
    • + *
    • XSU - Sucre
    • + *
    • SDD - Sudanese Dinar (1992–2007)
    • + *
    • SDG - Sudanese Pound
    • + *
    • SDP - Sudanese Pound (1957–1998)
    • + *
    • SRD - Surinamese Dollar
    • + *
    • SRG - Surinamese Guilder
    • + *
    • SZL - Swazi Lilangeni
    • + *
    • SEK - Swedish Krona
    • + *
    • CHF - Swiss Franc
    • + *
    • SYP - Syrian Pound
    • + *
    • STN - São Tomé & Príncipe Dobra
    • + *
    • STD - São Tomé & Príncipe Dobra (1977–2017)
    • + *
    • TVD - TVD
    • + *
    • TJR - Tajikistani Ruble
    • + *
    • TJS - Tajikistani Somoni
    • + *
    • TZS - Tanzanian Shilling
    • + *
    • XTS - Testing Currency Code
    • + *
    • THB - Thai Baht
    • + *
    • XXX - The codes assigned for transactions where no currency is involved
    • + *
    • TPE - Timorese Escudo
    • + *
    • TOP - Tongan Paʻanga
    • + *
    • TTD - Trinidad & Tobago Dollar
    • + *
    • TND - Tunisian Dinar
    • + *
    • TRY - Turkish Lira
    • + *
    • TRL - Turkish Lira (1922–2005)
    • + *
    • TMT - Turkmenistani Manat
    • + *
    • TMM - Turkmenistani Manat (1993–2009)
    • + *
    • USD - US Dollar
    • + *
    • USN - US Dollar (Next day)
    • + *
    • USS - US Dollar (Same day)
    • + *
    • UGX - Ugandan Shilling
    • + *
    • UGS - Ugandan Shilling (1966–1987)
    • + *
    • UAH - Ukrainian Hryvnia
    • + *
    • UAK - Ukrainian Karbovanets
    • + *
    • AED - United Arab Emirates Dirham
    • + *
    • UYW - Uruguayan Nominal Wage Index Unit
    • + *
    • UYU - Uruguayan Peso
    • + *
    • UYP - Uruguayan Peso (1975–1993)
    • + *
    • UYI - Uruguayan Peso (Indexed Units)
    • + *
    • UZS - Uzbekistani Som
    • + *
    • VUV - Vanuatu Vatu
    • + *
    • VES - Venezuelan Bolívar
    • + *
    • VEB - Venezuelan Bolívar (1871–2008)
    • + *
    • VEF - Venezuelan Bolívar (2008–2018)
    • + *
    • VND - Vietnamese Dong
    • + *
    • VNN - Vietnamese Dong (1978–1985)
    • + *
    • CHE - WIR Euro
    • + *
    • CHW - WIR Franc
    • + *
    • XOF - West African CFA Franc
    • + *
    • YDD - Yemeni Dinar
    • + *
    • YER - Yemeni Rial
    • + *
    • YUN - Yugoslavian Convertible Dinar (1990–1992)
    • + *
    • YUD - Yugoslavian Hard Dinar (1966–1990)
    • + *
    • YUM - Yugoslavian New Dinar (1994–2002)
    • + *
    • YUR - Yugoslavian Reformed Dinar (1992–1993)
    • + *
    • ZWN - ZWN
    • + *
    • ZRN - Zairean New Zaire (1993–1998)
    • + *
    • ZRZ - Zairean Zaire (1971–1993)
    • + *
    • ZMW - Zambian Kwacha
    • + *
    • ZMK - Zambian Kwacha (1968–2012)
    • + *
    • ZWD - Zimbabwean Dollar (1980–2008)
    • + *
    • ZWR - Zimbabwean Dollar (2008)
    • + *
    • ZWL - Zimbabwean Dollar (2009)
    • + *
    + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage transactionCurrency(GeneralLedgerTransactionLineTransactionCurrency transactionCurrency) { + this.transactionCurrency = Optional.ofNullable(transactionCurrency); + return this; + } + + /** + *

    The transaction currency that the transaction is made in.

    + *
      + *
    • XUA - ADB Unit of Account
    • + *
    • AFN - Afghan Afghani
    • + *
    • AFA - Afghan Afghani (1927–2002)
    • + *
    • ALL - Albanian Lek
    • + *
    • ALK - Albanian Lek (1946–1965)
    • + *
    • DZD - Algerian Dinar
    • + *
    • ADP - Andorran Peseta
    • + *
    • AOA - Angolan Kwanza
    • + *
    • AOK - Angolan Kwanza (1977–1991)
    • + *
    • AON - Angolan New Kwanza (1990–2000)
    • + *
    • AOR - Angolan Readjusted Kwanza (1995–1999)
    • + *
    • ARA - Argentine Austral
    • + *
    • ARS - Argentine Peso
    • + *
    • ARM - Argentine Peso (1881–1970)
    • + *
    • ARP - Argentine Peso (1983–1985)
    • + *
    • ARL - Argentine Peso Ley (1970–1983)
    • + *
    • AMD - Armenian Dram
    • + *
    • AWG - Aruban Florin
    • + *
    • AUD - Australian Dollar
    • + *
    • ATS - Austrian Schilling
    • + *
    • AZN - Azerbaijani Manat
    • + *
    • AZM - Azerbaijani Manat (1993–2006)
    • + *
    • BSD - Bahamian Dollar
    • + *
    • BHD - Bahraini Dinar
    • + *
    • BDT - Bangladeshi Taka
    • + *
    • BBD - Barbadian Dollar
    • + *
    • BYN - Belarusian Ruble
    • + *
    • BYB - Belarusian Ruble (1994–1999)
    • + *
    • BYR - Belarusian Ruble (2000–2016)
    • + *
    • BEF - Belgian Franc
    • + *
    • BEC - Belgian Franc (convertible)
    • + *
    • BEL - Belgian Franc (financial)
    • + *
    • BZD - Belize Dollar
    • + *
    • BMD - Bermudan Dollar
    • + *
    • BTN - Bhutanese Ngultrum
    • + *
    • BOB - Bolivian Boliviano
    • + *
    • BOL - Bolivian Boliviano (1863–1963)
    • + *
    • BOV - Bolivian Mvdol
    • + *
    • BOP - Bolivian Peso
    • + *
    • BAM - Bosnia-Herzegovina Convertible Mark
    • + *
    • BAD - Bosnia-Herzegovina Dinar (1992–1994)
    • + *
    • BAN - Bosnia-Herzegovina New Dinar (1994–1997)
    • + *
    • BWP - Botswanan Pula
    • + *
    • BRC - Brazilian Cruzado (1986–1989)
    • + *
    • BRZ - Brazilian Cruzeiro (1942–1967)
    • + *
    • BRE - Brazilian Cruzeiro (1990–1993)
    • + *
    • BRR - Brazilian Cruzeiro (1993–1994)
    • + *
    • BRN - Brazilian New Cruzado (1989–1990)
    • + *
    • BRB - Brazilian New Cruzeiro (1967–1986)
    • + *
    • BRL - Brazilian Real
    • + *
    • GBP - British Pound
    • + *
    • BND - Brunei Dollar
    • + *
    • BGL - Bulgarian Hard Lev
    • + *
    • BGN - Bulgarian Lev
    • + *
    • BGO - Bulgarian Lev (1879–1952)
    • + *
    • BGM - Bulgarian Socialist Lev
    • + *
    • BUK - Burmese Kyat
    • + *
    • BIF - Burundian Franc
    • + *
    • XPF - CFP Franc
    • + *
    • KHR - Cambodian Riel
    • + *
    • CAD - Canadian Dollar
    • + *
    • CVE - Cape Verdean Escudo
    • + *
    • KYD - Cayman Islands Dollar
    • + *
    • XAF - Central African CFA Franc
    • + *
    • CLE - Chilean Escudo
    • + *
    • CLP - Chilean Peso
    • + *
    • CLF - Chilean Unit of Account (UF)
    • + *
    • CNX - Chinese People’s Bank Dollar
    • + *
    • CNY - Chinese Yuan
    • + *
    • CNH - Chinese Yuan (offshore)
    • + *
    • COP - Colombian Peso
    • + *
    • COU - Colombian Real Value Unit
    • + *
    • KMF - Comorian Franc
    • + *
    • CDF - Congolese Franc
    • + *
    • CRC - Costa Rican Colón
    • + *
    • HRD - Croatian Dinar
    • + *
    • HRK - Croatian Kuna
    • + *
    • CUC - Cuban Convertible Peso
    • + *
    • CUP - Cuban Peso
    • + *
    • CYP - Cypriot Pound
    • + *
    • CZK - Czech Koruna
    • + *
    • CSK - Czechoslovak Hard Koruna
    • + *
    • DKK - Danish Krone
    • + *
    • DJF - Djiboutian Franc
    • + *
    • DOP - Dominican Peso
    • + *
    • NLG - Dutch Guilder
    • + *
    • XCD - East Caribbean Dollar
    • + *
    • DDM - East German Mark
    • + *
    • ECS - Ecuadorian Sucre
    • + *
    • ECV - Ecuadorian Unit of Constant Value
    • + *
    • EGP - Egyptian Pound
    • + *
    • GQE - Equatorial Guinean Ekwele
    • + *
    • ERN - Eritrean Nakfa
    • + *
    • EEK - Estonian Kroon
    • + *
    • ETB - Ethiopian Birr
    • + *
    • EUR - Euro
    • + *
    • XBA - European Composite Unit
    • + *
    • XEU - European Currency Unit
    • + *
    • XBB - European Monetary Unit
    • + *
    • XBC - European Unit of Account (XBC)
    • + *
    • XBD - European Unit of Account (XBD)
    • + *
    • FKP - Falkland Islands Pound
    • + *
    • FJD - Fijian Dollar
    • + *
    • FIM - Finnish Markka
    • + *
    • FRF - French Franc
    • + *
    • XFO - French Gold Franc
    • + *
    • XFU - French UIC-Franc
    • + *
    • GMD - Gambian Dalasi
    • + *
    • GEK - Georgian Kupon Larit
    • + *
    • GEL - Georgian Lari
    • + *
    • DEM - German Mark
    • + *
    • GHS - Ghanaian Cedi
    • + *
    • GHC - Ghanaian Cedi (1979–2007)
    • + *
    • GIP - Gibraltar Pound
    • + *
    • XAU - Gold
    • + *
    • GRD - Greek Drachma
    • + *
    • GTQ - Guatemalan Quetzal
    • + *
    • GWP - Guinea-Bissau Peso
    • + *
    • GNF - Guinean Franc
    • + *
    • GNS - Guinean Syli
    • + *
    • GYD - Guyanaese Dollar
    • + *
    • HTG - Haitian Gourde
    • + *
    • HNL - Honduran Lempira
    • + *
    • HKD - Hong Kong Dollar
    • + *
    • HUF - Hungarian Forint
    • + *
    • IMP - IMP
    • + *
    • ISK - Icelandic Króna
    • + *
    • ISJ - Icelandic Króna (1918–1981)
    • + *
    • INR - Indian Rupee
    • + *
    • IDR - Indonesian Rupiah
    • + *
    • IRR - Iranian Rial
    • + *
    • IQD - Iraqi Dinar
    • + *
    • IEP - Irish Pound
    • + *
    • ILS - Israeli New Shekel
    • + *
    • ILP - Israeli Pound
    • + *
    • ILR - Israeli Shekel (1980–1985)
    • + *
    • ITL - Italian Lira
    • + *
    • JMD - Jamaican Dollar
    • + *
    • JPY - Japanese Yen
    • + *
    • JOD - Jordanian Dinar
    • + *
    • KZT - Kazakhstani Tenge
    • + *
    • KES - Kenyan Shilling
    • + *
    • KWD - Kuwaiti Dinar
    • + *
    • KGS - Kyrgystani Som
    • + *
    • LAK - Laotian Kip
    • + *
    • LVL - Latvian Lats
    • + *
    • LVR - Latvian Ruble
    • + *
    • LBP - Lebanese Pound
    • + *
    • LSL - Lesotho Loti
    • + *
    • LRD - Liberian Dollar
    • + *
    • LYD - Libyan Dinar
    • + *
    • LTL - Lithuanian Litas
    • + *
    • LTT - Lithuanian Talonas
    • + *
    • LUL - Luxembourg Financial Franc
    • + *
    • LUC - Luxembourgian Convertible Franc
    • + *
    • LUF - Luxembourgian Franc
    • + *
    • MOP - Macanese Pataca
    • + *
    • MKD - Macedonian Denar
    • + *
    • MKN - Macedonian Denar (1992–1993)
    • + *
    • MGA - Malagasy Ariary
    • + *
    • MGF - Malagasy Franc
    • + *
    • MWK - Malawian Kwacha
    • + *
    • MYR - Malaysian Ringgit
    • + *
    • MVR - Maldivian Rufiyaa
    • + *
    • MVP - Maldivian Rupee (1947–1981)
    • + *
    • MLF - Malian Franc
    • + *
    • MTL - Maltese Lira
    • + *
    • MTP - Maltese Pound
    • + *
    • MRU - Mauritanian Ouguiya
    • + *
    • MRO - Mauritanian Ouguiya (1973–2017)
    • + *
    • MUR - Mauritian Rupee
    • + *
    • MXV - Mexican Investment Unit
    • + *
    • MXN - Mexican Peso
    • + *
    • MXP - Mexican Silver Peso (1861–1992)
    • + *
    • MDC - Moldovan Cupon
    • + *
    • MDL - Moldovan Leu
    • + *
    • MCF - Monegasque Franc
    • + *
    • MNT - Mongolian Tugrik
    • + *
    • MAD - Moroccan Dirham
    • + *
    • MAF - Moroccan Franc
    • + *
    • MZE - Mozambican Escudo
    • + *
    • MZN - Mozambican Metical
    • + *
    • MZM - Mozambican Metical (1980–2006)
    • + *
    • MMK - Myanmar Kyat
    • + *
    • NAD - Namibian Dollar
    • + *
    • NPR - Nepalese Rupee
    • + *
    • ANG - Netherlands Antillean Guilder
    • + *
    • TWD - New Taiwan Dollar
    • + *
    • NZD - New Zealand Dollar
    • + *
    • NIO - Nicaraguan Córdoba
    • + *
    • NIC - Nicaraguan Córdoba (1988–1991)
    • + *
    • NGN - Nigerian Naira
    • + *
    • KPW - North Korean Won
    • + *
    • NOK - Norwegian Krone
    • + *
    • OMR - Omani Rial
    • + *
    • PKR - Pakistani Rupee
    • + *
    • XPD - Palladium
    • + *
    • PAB - Panamanian Balboa
    • + *
    • PGK - Papua New Guinean Kina
    • + *
    • PYG - Paraguayan Guarani
    • + *
    • PEI - Peruvian Inti
    • + *
    • PEN - Peruvian Sol
    • + *
    • PES - Peruvian Sol (1863–1965)
    • + *
    • PHP - Philippine Peso
    • + *
    • XPT - Platinum
    • + *
    • PLN - Polish Zloty
    • + *
    • PLZ - Polish Zloty (1950–1995)
    • + *
    • PTE - Portuguese Escudo
    • + *
    • GWE - Portuguese Guinea Escudo
    • + *
    • QAR - Qatari Rial
    • + *
    • XRE - RINET Funds
    • + *
    • RHD - Rhodesian Dollar
    • + *
    • RON - Romanian Leu
    • + *
    • ROL - Romanian Leu (1952–2006)
    • + *
    • RUB - Russian Ruble
    • + *
    • RUR - Russian Ruble (1991–1998)
    • + *
    • RWF - Rwandan Franc
    • + *
    • SVC - Salvadoran Colón
    • + *
    • WST - Samoan Tala
    • + *
    • SAR - Saudi Riyal
    • + *
    • RSD - Serbian Dinar
    • + *
    • CSD - Serbian Dinar (2002–2006)
    • + *
    • SCR - Seychellois Rupee
    • + *
    • SLL - Sierra Leonean Leone
    • + *
    • XAG - Silver
    • + *
    • SGD - Singapore Dollar
    • + *
    • SKK - Slovak Koruna
    • + *
    • SIT - Slovenian Tolar
    • + *
    • SBD - Solomon Islands Dollar
    • + *
    • SOS - Somali Shilling
    • + *
    • ZAR - South African Rand
    • + *
    • ZAL - South African Rand (financial)
    • + *
    • KRH - South Korean Hwan (1953–1962)
    • + *
    • KRW - South Korean Won
    • + *
    • KRO - South Korean Won (1945–1953)
    • + *
    • SSP - South Sudanese Pound
    • + *
    • SUR - Soviet Rouble
    • + *
    • ESP - Spanish Peseta
    • + *
    • ESA - Spanish Peseta (A account)
    • + *
    • ESB - Spanish Peseta (convertible account)
    • + *
    • XDR - Special Drawing Rights
    • + *
    • LKR - Sri Lankan Rupee
    • + *
    • SHP - St. Helena Pound
    • + *
    • XSU - Sucre
    • + *
    • SDD - Sudanese Dinar (1992–2007)
    • + *
    • SDG - Sudanese Pound
    • + *
    • SDP - Sudanese Pound (1957–1998)
    • + *
    • SRD - Surinamese Dollar
    • + *
    • SRG - Surinamese Guilder
    • + *
    • SZL - Swazi Lilangeni
    • + *
    • SEK - Swedish Krona
    • + *
    • CHF - Swiss Franc
    • + *
    • SYP - Syrian Pound
    • + *
    • STN - São Tomé & Príncipe Dobra
    • + *
    • STD - São Tomé & Príncipe Dobra (1977–2017)
    • + *
    • TVD - TVD
    • + *
    • TJR - Tajikistani Ruble
    • + *
    • TJS - Tajikistani Somoni
    • + *
    • TZS - Tanzanian Shilling
    • + *
    • XTS - Testing Currency Code
    • + *
    • THB - Thai Baht
    • + *
    • XXX - The codes assigned for transactions where no currency is involved
    • + *
    • TPE - Timorese Escudo
    • + *
    • TOP - Tongan Paʻanga
    • + *
    • TTD - Trinidad & Tobago Dollar
    • + *
    • TND - Tunisian Dinar
    • + *
    • TRY - Turkish Lira
    • + *
    • TRL - Turkish Lira (1922–2005)
    • + *
    • TMT - Turkmenistani Manat
    • + *
    • TMM - Turkmenistani Manat (1993–2009)
    • + *
    • USD - US Dollar
    • + *
    • USN - US Dollar (Next day)
    • + *
    • USS - US Dollar (Same day)
    • + *
    • UGX - Ugandan Shilling
    • + *
    • UGS - Ugandan Shilling (1966–1987)
    • + *
    • UAH - Ukrainian Hryvnia
    • + *
    • UAK - Ukrainian Karbovanets
    • + *
    • AED - United Arab Emirates Dirham
    • + *
    • UYW - Uruguayan Nominal Wage Index Unit
    • + *
    • UYU - Uruguayan Peso
    • + *
    • UYP - Uruguayan Peso (1975–1993)
    • + *
    • UYI - Uruguayan Peso (Indexed Units)
    • + *
    • UZS - Uzbekistani Som
    • + *
    • VUV - Vanuatu Vatu
    • + *
    • VES - Venezuelan Bolívar
    • + *
    • VEB - Venezuelan Bolívar (1871–2008)
    • + *
    • VEF - Venezuelan Bolívar (2008–2018)
    • + *
    • VND - Vietnamese Dong
    • + *
    • VNN - Vietnamese Dong (1978–1985)
    • + *
    • CHE - WIR Euro
    • + *
    • CHW - WIR Franc
    • + *
    • XOF - West African CFA Franc
    • + *
    • YDD - Yemeni Dinar
    • + *
    • YER - Yemeni Rial
    • + *
    • YUN - Yugoslavian Convertible Dinar (1990–1992)
    • + *
    • YUD - Yugoslavian Hard Dinar (1966–1990)
    • + *
    • YUM - Yugoslavian New Dinar (1994–2002)
    • + *
    • YUR - Yugoslavian Reformed Dinar (1992–1993)
    • + *
    • ZWN - ZWN
    • + *
    • ZRN - Zairean New Zaire (1993–1998)
    • + *
    • ZRZ - Zairean Zaire (1971–1993)
    • + *
    • ZMW - Zambian Kwacha
    • + *
    • ZMK - Zambian Kwacha (1968–2012)
    • + *
    • ZWD - Zimbabwean Dollar (1980–2008)
    • + *
    • ZWR - Zimbabwean Dollar (2008)
    • + *
    • ZWL - Zimbabwean Dollar (2009)
    • + *
    + */ + @java.lang.Override + @JsonSetter(value = "transaction_currency", nulls = Nulls.SKIP) + public _FinalStage transactionCurrency( + Optional transactionCurrency) { + this.transactionCurrency = transactionCurrency; + return this; + } + + /** + *

    The base currency of the transaction

    + *
      + *
    • XUA - ADB Unit of Account
    • + *
    • AFN - Afghan Afghani
    • + *
    • AFA - Afghan Afghani (1927–2002)
    • + *
    • ALL - Albanian Lek
    • + *
    • ALK - Albanian Lek (1946–1965)
    • + *
    • DZD - Algerian Dinar
    • + *
    • ADP - Andorran Peseta
    • + *
    • AOA - Angolan Kwanza
    • + *
    • AOK - Angolan Kwanza (1977–1991)
    • + *
    • AON - Angolan New Kwanza (1990–2000)
    • + *
    • AOR - Angolan Readjusted Kwanza (1995–1999)
    • + *
    • ARA - Argentine Austral
    • + *
    • ARS - Argentine Peso
    • + *
    • ARM - Argentine Peso (1881–1970)
    • + *
    • ARP - Argentine Peso (1983–1985)
    • + *
    • ARL - Argentine Peso Ley (1970–1983)
    • + *
    • AMD - Armenian Dram
    • + *
    • AWG - Aruban Florin
    • + *
    • AUD - Australian Dollar
    • + *
    • ATS - Austrian Schilling
    • + *
    • AZN - Azerbaijani Manat
    • + *
    • AZM - Azerbaijani Manat (1993–2006)
    • + *
    • BSD - Bahamian Dollar
    • + *
    • BHD - Bahraini Dinar
    • + *
    • BDT - Bangladeshi Taka
    • + *
    • BBD - Barbadian Dollar
    • + *
    • BYN - Belarusian Ruble
    • + *
    • BYB - Belarusian Ruble (1994–1999)
    • + *
    • BYR - Belarusian Ruble (2000–2016)
    • + *
    • BEF - Belgian Franc
    • + *
    • BEC - Belgian Franc (convertible)
    • + *
    • BEL - Belgian Franc (financial)
    • + *
    • BZD - Belize Dollar
    • + *
    • BMD - Bermudan Dollar
    • + *
    • BTN - Bhutanese Ngultrum
    • + *
    • BOB - Bolivian Boliviano
    • + *
    • BOL - Bolivian Boliviano (1863–1963)
    • + *
    • BOV - Bolivian Mvdol
    • + *
    • BOP - Bolivian Peso
    • + *
    • BAM - Bosnia-Herzegovina Convertible Mark
    • + *
    • BAD - Bosnia-Herzegovina Dinar (1992–1994)
    • + *
    • BAN - Bosnia-Herzegovina New Dinar (1994–1997)
    • + *
    • BWP - Botswanan Pula
    • + *
    • BRC - Brazilian Cruzado (1986–1989)
    • + *
    • BRZ - Brazilian Cruzeiro (1942–1967)
    • + *
    • BRE - Brazilian Cruzeiro (1990–1993)
    • + *
    • BRR - Brazilian Cruzeiro (1993–1994)
    • + *
    • BRN - Brazilian New Cruzado (1989–1990)
    • + *
    • BRB - Brazilian New Cruzeiro (1967–1986)
    • + *
    • BRL - Brazilian Real
    • + *
    • GBP - British Pound
    • + *
    • BND - Brunei Dollar
    • + *
    • BGL - Bulgarian Hard Lev
    • + *
    • BGN - Bulgarian Lev
    • + *
    • BGO - Bulgarian Lev (1879–1952)
    • + *
    • BGM - Bulgarian Socialist Lev
    • + *
    • BUK - Burmese Kyat
    • + *
    • BIF - Burundian Franc
    • + *
    • XPF - CFP Franc
    • + *
    • KHR - Cambodian Riel
    • + *
    • CAD - Canadian Dollar
    • + *
    • CVE - Cape Verdean Escudo
    • + *
    • KYD - Cayman Islands Dollar
    • + *
    • XAF - Central African CFA Franc
    • + *
    • CLE - Chilean Escudo
    • + *
    • CLP - Chilean Peso
    • + *
    • CLF - Chilean Unit of Account (UF)
    • + *
    • CNX - Chinese People’s Bank Dollar
    • + *
    • CNY - Chinese Yuan
    • + *
    • CNH - Chinese Yuan (offshore)
    • + *
    • COP - Colombian Peso
    • + *
    • COU - Colombian Real Value Unit
    • + *
    • KMF - Comorian Franc
    • + *
    • CDF - Congolese Franc
    • + *
    • CRC - Costa Rican Colón
    • + *
    • HRD - Croatian Dinar
    • + *
    • HRK - Croatian Kuna
    • + *
    • CUC - Cuban Convertible Peso
    • + *
    • CUP - Cuban Peso
    • + *
    • CYP - Cypriot Pound
    • + *
    • CZK - Czech Koruna
    • + *
    • CSK - Czechoslovak Hard Koruna
    • + *
    • DKK - Danish Krone
    • + *
    • DJF - Djiboutian Franc
    • + *
    • DOP - Dominican Peso
    • + *
    • NLG - Dutch Guilder
    • + *
    • XCD - East Caribbean Dollar
    • + *
    • DDM - East German Mark
    • + *
    • ECS - Ecuadorian Sucre
    • + *
    • ECV - Ecuadorian Unit of Constant Value
    • + *
    • EGP - Egyptian Pound
    • + *
    • GQE - Equatorial Guinean Ekwele
    • + *
    • ERN - Eritrean Nakfa
    • + *
    • EEK - Estonian Kroon
    • + *
    • ETB - Ethiopian Birr
    • + *
    • EUR - Euro
    • + *
    • XBA - European Composite Unit
    • + *
    • XEU - European Currency Unit
    • + *
    • XBB - European Monetary Unit
    • + *
    • XBC - European Unit of Account (XBC)
    • + *
    • XBD - European Unit of Account (XBD)
    • + *
    • FKP - Falkland Islands Pound
    • + *
    • FJD - Fijian Dollar
    • + *
    • FIM - Finnish Markka
    • + *
    • FRF - French Franc
    • + *
    • XFO - French Gold Franc
    • + *
    • XFU - French UIC-Franc
    • + *
    • GMD - Gambian Dalasi
    • + *
    • GEK - Georgian Kupon Larit
    • + *
    • GEL - Georgian Lari
    • + *
    • DEM - German Mark
    • + *
    • GHS - Ghanaian Cedi
    • + *
    • GHC - Ghanaian Cedi (1979–2007)
    • + *
    • GIP - Gibraltar Pound
    • + *
    • XAU - Gold
    • + *
    • GRD - Greek Drachma
    • + *
    • GTQ - Guatemalan Quetzal
    • + *
    • GWP - Guinea-Bissau Peso
    • + *
    • GNF - Guinean Franc
    • + *
    • GNS - Guinean Syli
    • + *
    • GYD - Guyanaese Dollar
    • + *
    • HTG - Haitian Gourde
    • + *
    • HNL - Honduran Lempira
    • + *
    • HKD - Hong Kong Dollar
    • + *
    • HUF - Hungarian Forint
    • + *
    • IMP - IMP
    • + *
    • ISK - Icelandic Króna
    • + *
    • ISJ - Icelandic Króna (1918–1981)
    • + *
    • INR - Indian Rupee
    • + *
    • IDR - Indonesian Rupiah
    • + *
    • IRR - Iranian Rial
    • + *
    • IQD - Iraqi Dinar
    • + *
    • IEP - Irish Pound
    • + *
    • ILS - Israeli New Shekel
    • + *
    • ILP - Israeli Pound
    • + *
    • ILR - Israeli Shekel (1980–1985)
    • + *
    • ITL - Italian Lira
    • + *
    • JMD - Jamaican Dollar
    • + *
    • JPY - Japanese Yen
    • + *
    • JOD - Jordanian Dinar
    • + *
    • KZT - Kazakhstani Tenge
    • + *
    • KES - Kenyan Shilling
    • + *
    • KWD - Kuwaiti Dinar
    • + *
    • KGS - Kyrgystani Som
    • + *
    • LAK - Laotian Kip
    • + *
    • LVL - Latvian Lats
    • + *
    • LVR - Latvian Ruble
    • + *
    • LBP - Lebanese Pound
    • + *
    • LSL - Lesotho Loti
    • + *
    • LRD - Liberian Dollar
    • + *
    • LYD - Libyan Dinar
    • + *
    • LTL - Lithuanian Litas
    • + *
    • LTT - Lithuanian Talonas
    • + *
    • LUL - Luxembourg Financial Franc
    • + *
    • LUC - Luxembourgian Convertible Franc
    • + *
    • LUF - Luxembourgian Franc
    • + *
    • MOP - Macanese Pataca
    • + *
    • MKD - Macedonian Denar
    • + *
    • MKN - Macedonian Denar (1992–1993)
    • + *
    • MGA - Malagasy Ariary
    • + *
    • MGF - Malagasy Franc
    • + *
    • MWK - Malawian Kwacha
    • + *
    • MYR - Malaysian Ringgit
    • + *
    • MVR - Maldivian Rufiyaa
    • + *
    • MVP - Maldivian Rupee (1947–1981)
    • + *
    • MLF - Malian Franc
    • + *
    • MTL - Maltese Lira
    • + *
    • MTP - Maltese Pound
    • + *
    • MRU - Mauritanian Ouguiya
    • + *
    • MRO - Mauritanian Ouguiya (1973–2017)
    • + *
    • MUR - Mauritian Rupee
    • + *
    • MXV - Mexican Investment Unit
    • + *
    • MXN - Mexican Peso
    • + *
    • MXP - Mexican Silver Peso (1861–1992)
    • + *
    • MDC - Moldovan Cupon
    • + *
    • MDL - Moldovan Leu
    • + *
    • MCF - Monegasque Franc
    • + *
    • MNT - Mongolian Tugrik
    • + *
    • MAD - Moroccan Dirham
    • + *
    • MAF - Moroccan Franc
    • + *
    • MZE - Mozambican Escudo
    • + *
    • MZN - Mozambican Metical
    • + *
    • MZM - Mozambican Metical (1980–2006)
    • + *
    • MMK - Myanmar Kyat
    • + *
    • NAD - Namibian Dollar
    • + *
    • NPR - Nepalese Rupee
    • + *
    • ANG - Netherlands Antillean Guilder
    • + *
    • TWD - New Taiwan Dollar
    • + *
    • NZD - New Zealand Dollar
    • + *
    • NIO - Nicaraguan Córdoba
    • + *
    • NIC - Nicaraguan Córdoba (1988–1991)
    • + *
    • NGN - Nigerian Naira
    • + *
    • KPW - North Korean Won
    • + *
    • NOK - Norwegian Krone
    • + *
    • OMR - Omani Rial
    • + *
    • PKR - Pakistani Rupee
    • + *
    • XPD - Palladium
    • + *
    • PAB - Panamanian Balboa
    • + *
    • PGK - Papua New Guinean Kina
    • + *
    • PYG - Paraguayan Guarani
    • + *
    • PEI - Peruvian Inti
    • + *
    • PEN - Peruvian Sol
    • + *
    • PES - Peruvian Sol (1863–1965)
    • + *
    • PHP - Philippine Peso
    • + *
    • XPT - Platinum
    • + *
    • PLN - Polish Zloty
    • + *
    • PLZ - Polish Zloty (1950–1995)
    • + *
    • PTE - Portuguese Escudo
    • + *
    • GWE - Portuguese Guinea Escudo
    • + *
    • QAR - Qatari Rial
    • + *
    • XRE - RINET Funds
    • + *
    • RHD - Rhodesian Dollar
    • + *
    • RON - Romanian Leu
    • + *
    • ROL - Romanian Leu (1952–2006)
    • + *
    • RUB - Russian Ruble
    • + *
    • RUR - Russian Ruble (1991–1998)
    • + *
    • RWF - Rwandan Franc
    • + *
    • SVC - Salvadoran Colón
    • + *
    • WST - Samoan Tala
    • + *
    • SAR - Saudi Riyal
    • + *
    • RSD - Serbian Dinar
    • + *
    • CSD - Serbian Dinar (2002–2006)
    • + *
    • SCR - Seychellois Rupee
    • + *
    • SLL - Sierra Leonean Leone
    • + *
    • XAG - Silver
    • + *
    • SGD - Singapore Dollar
    • + *
    • SKK - Slovak Koruna
    • + *
    • SIT - Slovenian Tolar
    • + *
    • SBD - Solomon Islands Dollar
    • + *
    • SOS - Somali Shilling
    • + *
    • ZAR - South African Rand
    • + *
    • ZAL - South African Rand (financial)
    • + *
    • KRH - South Korean Hwan (1953–1962)
    • + *
    • KRW - South Korean Won
    • + *
    • KRO - South Korean Won (1945–1953)
    • + *
    • SSP - South Sudanese Pound
    • + *
    • SUR - Soviet Rouble
    • + *
    • ESP - Spanish Peseta
    • + *
    • ESA - Spanish Peseta (A account)
    • + *
    • ESB - Spanish Peseta (convertible account)
    • + *
    • XDR - Special Drawing Rights
    • + *
    • LKR - Sri Lankan Rupee
    • + *
    • SHP - St. Helena Pound
    • + *
    • XSU - Sucre
    • + *
    • SDD - Sudanese Dinar (1992–2007)
    • + *
    • SDG - Sudanese Pound
    • + *
    • SDP - Sudanese Pound (1957–1998)
    • + *
    • SRD - Surinamese Dollar
    • + *
    • SRG - Surinamese Guilder
    • + *
    • SZL - Swazi Lilangeni
    • + *
    • SEK - Swedish Krona
    • + *
    • CHF - Swiss Franc
    • + *
    • SYP - Syrian Pound
    • + *
    • STN - São Tomé & Príncipe Dobra
    • + *
    • STD - São Tomé & Príncipe Dobra (1977–2017)
    • + *
    • TVD - TVD
    • + *
    • TJR - Tajikistani Ruble
    • + *
    • TJS - Tajikistani Somoni
    • + *
    • TZS - Tanzanian Shilling
    • + *
    • XTS - Testing Currency Code
    • + *
    • THB - Thai Baht
    • + *
    • XXX - The codes assigned for transactions where no currency is involved
    • + *
    • TPE - Timorese Escudo
    • + *
    • TOP - Tongan Paʻanga
    • + *
    • TTD - Trinidad & Tobago Dollar
    • + *
    • TND - Tunisian Dinar
    • + *
    • TRY - Turkish Lira
    • + *
    • TRL - Turkish Lira (1922–2005)
    • + *
    • TMT - Turkmenistani Manat
    • + *
    • TMM - Turkmenistani Manat (1993–2009)
    • + *
    • USD - US Dollar
    • + *
    • USN - US Dollar (Next day)
    • + *
    • USS - US Dollar (Same day)
    • + *
    • UGX - Ugandan Shilling
    • + *
    • UGS - Ugandan Shilling (1966–1987)
    • + *
    • UAH - Ukrainian Hryvnia
    • + *
    • UAK - Ukrainian Karbovanets
    • + *
    • AED - United Arab Emirates Dirham
    • + *
    • UYW - Uruguayan Nominal Wage Index Unit
    • + *
    • UYU - Uruguayan Peso
    • + *
    • UYP - Uruguayan Peso (1975–1993)
    • + *
    • UYI - Uruguayan Peso (Indexed Units)
    • + *
    • UZS - Uzbekistani Som
    • + *
    • VUV - Vanuatu Vatu
    • + *
    • VES - Venezuelan Bolívar
    • + *
    • VEB - Venezuelan Bolívar (1871–2008)
    • + *
    • VEF - Venezuelan Bolívar (2008–2018)
    • + *
    • VND - Vietnamese Dong
    • + *
    • VNN - Vietnamese Dong (1978–1985)
    • + *
    • CHE - WIR Euro
    • + *
    • CHW - WIR Franc
    • + *
    • XOF - West African CFA Franc
    • + *
    • YDD - Yemeni Dinar
    • + *
    • YER - Yemeni Rial
    • + *
    • YUN - Yugoslavian Convertible Dinar (1990–1992)
    • + *
    • YUD - Yugoslavian Hard Dinar (1966–1990)
    • + *
    • YUM - Yugoslavian New Dinar (1994–2002)
    • + *
    • YUR - Yugoslavian Reformed Dinar (1992–1993)
    • + *
    • ZWN - ZWN
    • + *
    • ZRN - Zairean New Zaire (1993–1998)
    • + *
    • ZRZ - Zairean Zaire (1971–1993)
    • + *
    • ZMW - Zambian Kwacha
    • + *
    • ZMK - Zambian Kwacha (1968–2012)
    • + *
    • ZWD - Zimbabwean Dollar (1980–2008)
    • + *
    • ZWR - Zimbabwean Dollar (2008)
    • + *
    • ZWL - Zimbabwean Dollar (2009)
    • + *
    + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage baseCurrency(TransactionCurrencyEnum baseCurrency) { + this.baseCurrency = Optional.ofNullable(baseCurrency); + return this; + } /** *

    The base currency of the transaction

    @@ -1842,18 +3142,24 @@ public _FinalStage transactionCurrency(Optional transac *
  • ZWR - Zimbabwean Dollar (2008)
  • *
  • ZWL - Zimbabwean Dollar (2009)
  • * - * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override - public _FinalStage baseCurrency(TransactionCurrencyEnum baseCurrency) { - this.baseCurrency = Optional.ofNullable(baseCurrency); + @JsonSetter(value = "base_currency", nulls = Nulls.SKIP) + public _FinalStage baseCurrency(Optional baseCurrency) { + this.baseCurrency = baseCurrency; return this; } @java.lang.Override - @JsonSetter(value = "base_currency", nulls = Nulls.SKIP) - public _FinalStage baseCurrency(Optional baseCurrency) { - this.baseCurrency = baseCurrency; + public _FinalStage project(GeneralLedgerTransactionLineProject project) { + this.project = Optional.ofNullable(project); + return this; + } + + @java.lang.Override + @JsonSetter(value = "project", nulls = Nulls.SKIP) + public _FinalStage project(Optional project) { + this.project = project; return this; } @@ -1893,6 +3199,9 @@ public _FinalStage company(GeneralLedgerTransactionLineCompany company) { return this; } + /** + *

    The company the GeneralLedgerTransaction belongs to.

    + */ @java.lang.Override @JsonSetter(value = "company", nulls = Nulls.SKIP) public _FinalStage company(Optional company) { @@ -1923,6 +3232,9 @@ public _FinalStage modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @java.lang.Override @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public _FinalStage modifiedAt(Optional modifiedAt) { @@ -1940,6 +3252,9 @@ public _FinalStage createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @java.lang.Override @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public _FinalStage createdAt(Optional createdAt) { @@ -1957,6 +3272,9 @@ public _FinalStage remoteId(String remoteId) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @java.lang.Override @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public _FinalStage remoteId(Optional remoteId) { @@ -1988,6 +3306,7 @@ public GeneralLedgerTransactionLine build() { company, employee, contact, + project, baseCurrency, transactionCurrency, exchangeRate, diff --git a/src/main/java/com/merge/api/accounting/types/GeneralLedgerTransactionLineProject.java b/src/main/java/com/merge/api/accounting/types/GeneralLedgerTransactionLineProject.java new file mode 100644 index 000000000..691ba1f52 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/GeneralLedgerTransactionLineProject.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = GeneralLedgerTransactionLineProject.Deserializer.class) +public final class GeneralLedgerTransactionLineProject { + private final Object value; + + private final int type; + + private GeneralLedgerTransactionLineProject(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((Project) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof GeneralLedgerTransactionLineProject + && equalTo((GeneralLedgerTransactionLineProject) other); + } + + private boolean equalTo(GeneralLedgerTransactionLineProject other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static GeneralLedgerTransactionLineProject of(String value) { + return new GeneralLedgerTransactionLineProject(value, 0); + } + + public static GeneralLedgerTransactionLineProject of(Project value) { + return new GeneralLedgerTransactionLineProject(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(Project value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(GeneralLedgerTransactionLineProject.class); + } + + @java.lang.Override + public GeneralLedgerTransactionLineProject deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, Project.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/GeneralLedgerTransactionLineTransactionCurrency.java b/src/main/java/com/merge/api/accounting/types/GeneralLedgerTransactionLineTransactionCurrency.java new file mode 100644 index 000000000..c64dae487 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/GeneralLedgerTransactionLineTransactionCurrency.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = GeneralLedgerTransactionLineTransactionCurrency.Deserializer.class) +public final class GeneralLedgerTransactionLineTransactionCurrency { + private final Object value; + + private final int type; + + private GeneralLedgerTransactionLineTransactionCurrency(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((TransactionCurrencyEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof GeneralLedgerTransactionLineTransactionCurrency + && equalTo((GeneralLedgerTransactionLineTransactionCurrency) other); + } + + private boolean equalTo(GeneralLedgerTransactionLineTransactionCurrency other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static GeneralLedgerTransactionLineTransactionCurrency of(TransactionCurrencyEnum value) { + return new GeneralLedgerTransactionLineTransactionCurrency(value, 0); + } + + public static GeneralLedgerTransactionLineTransactionCurrency of(String value) { + return new GeneralLedgerTransactionLineTransactionCurrency(value, 1); + } + + public interface Visitor { + T visit(TransactionCurrencyEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(GeneralLedgerTransactionLineTransactionCurrency.class); + } + + @java.lang.Override + public GeneralLedgerTransactionLineTransactionCurrency deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TransactionCurrencyEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/GeneralLedgerTransactionUnderlyingTransactionType.java b/src/main/java/com/merge/api/accounting/types/GeneralLedgerTransactionUnderlyingTransactionType.java new file mode 100644 index 000000000..676198f4f --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/GeneralLedgerTransactionUnderlyingTransactionType.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = GeneralLedgerTransactionUnderlyingTransactionType.Deserializer.class) +public final class GeneralLedgerTransactionUnderlyingTransactionType { + private final Object value; + + private final int type; + + private GeneralLedgerTransactionUnderlyingTransactionType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((UnderlyingTransactionTypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof GeneralLedgerTransactionUnderlyingTransactionType + && equalTo((GeneralLedgerTransactionUnderlyingTransactionType) other); + } + + private boolean equalTo(GeneralLedgerTransactionUnderlyingTransactionType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static GeneralLedgerTransactionUnderlyingTransactionType of(UnderlyingTransactionTypeEnum value) { + return new GeneralLedgerTransactionUnderlyingTransactionType(value, 0); + } + + public static GeneralLedgerTransactionUnderlyingTransactionType of(String value) { + return new GeneralLedgerTransactionUnderlyingTransactionType(value, 1); + } + + public interface Visitor { + T visit(UnderlyingTransactionTypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(GeneralLedgerTransactionUnderlyingTransactionType.class); + } + + @java.lang.Override + public GeneralLedgerTransactionUnderlyingTransactionType deserialize( + JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, UnderlyingTransactionTypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/GeneralLedgerTransactionsListRequest.java b/src/main/java/com/merge/api/accounting/types/GeneralLedgerTransactionsListRequest.java index 2921dd4cc..19c8e1e38 100644 --- a/src/main/java/com/merge/api/accounting/types/GeneralLedgerTransactionsListRequest.java +++ b/src/main/java/com/merge/api/accounting/types/GeneralLedgerTransactionsListRequest.java @@ -308,6 +308,9 @@ public Builder from(GeneralLedgerTransactionsListRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -324,6 +327,9 @@ public Builder expand(GeneralLedgerTransactionsListRequestExpandItem expand) { return this; } + /** + *

    If provided, will only return general ledger transactions for this company.

    + */ @JsonSetter(value = "company_id", nulls = Nulls.SKIP) public Builder companyId(Optional companyId) { this.companyId = companyId; @@ -335,6 +341,9 @@ public Builder companyId(String companyId) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -346,6 +355,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -357,6 +369,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -368,6 +383,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -379,6 +397,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -390,6 +411,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -401,6 +425,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -412,6 +439,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -423,6 +453,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -434,6 +467,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    If provided, will only return objects posted after this datetime.

    + */ @JsonSetter(value = "posted_date_after", nulls = Nulls.SKIP) public Builder postedDateAfter(Optional postedDateAfter) { this.postedDateAfter = postedDateAfter; @@ -445,6 +481,9 @@ public Builder postedDateAfter(OffsetDateTime postedDateAfter) { return this; } + /** + *

    If provided, will only return objects posted before this datetime.

    + */ @JsonSetter(value = "posted_date_before", nulls = Nulls.SKIP) public Builder postedDateBefore(Optional postedDateBefore) { this.postedDateBefore = postedDateBefore; @@ -456,6 +495,9 @@ public Builder postedDateBefore(OffsetDateTime postedDateBefore) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; diff --git a/src/main/java/com/merge/api/accounting/types/GeneralLedgerTransactionsRetrieveRequest.java b/src/main/java/com/merge/api/accounting/types/GeneralLedgerTransactionsRetrieveRequest.java index 7d0416684..e386514e0 100644 --- a/src/main/java/com/merge/api/accounting/types/GeneralLedgerTransactionsRetrieveRequest.java +++ b/src/main/java/com/merge/api/accounting/types/GeneralLedgerTransactionsRetrieveRequest.java @@ -117,6 +117,9 @@ public Builder from(GeneralLedgerTransactionsRetrieveRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -133,6 +136,9 @@ public Builder expand(GeneralLedgerTransactionsRetrieveRequestExpandItem expand) return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -144,6 +150,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/accounting/types/GenerateRemoteKeyRequest.java b/src/main/java/com/merge/api/accounting/types/GenerateRemoteKeyRequest.java index d8a316a57..5a5cdf96a 100644 --- a/src/main/java/com/merge/api/accounting/types/GenerateRemoteKeyRequest.java +++ b/src/main/java/com/merge/api/accounting/types/GenerateRemoteKeyRequest.java @@ -66,6 +66,9 @@ public static NameStage builder() { } public interface NameStage { + /** + * The name of the remote key + */ _FinalStage name(@NotNull String name); Builder from(GenerateRemoteKeyRequest other); @@ -91,7 +94,7 @@ public Builder from(GenerateRemoteKeyRequest other) { } /** - *

    The name of the remote key

    + * The name of the remote key

    The name of the remote key

    * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override diff --git a/src/main/java/com/merge/api/accounting/types/IncomeStatement.java b/src/main/java/com/merge/api/accounting/types/IncomeStatement.java index 5d7e3f616..46064548a 100644 --- a/src/main/java/com/merge/api/accounting/types/IncomeStatement.java +++ b/src/main/java/com/merge/api/accounting/types/IncomeStatement.java @@ -33,7 +33,7 @@ public final class IncomeStatement { private final Optional name; - private final Optional currency; + private final Optional currency; private final Optional company; @@ -69,7 +69,7 @@ private IncomeStatement( Optional createdAt, Optional modifiedAt, Optional name, - Optional currency, + Optional currency, Optional company, Optional startPeriod, Optional endPeriod, @@ -455,7 +455,7 @@ public Optional getName() { * */ @JsonProperty("currency") - public Optional getCurrency() { + public Optional getCurrency() { return currency; } @@ -623,7 +623,7 @@ public static final class Builder { private Optional name = Optional.empty(); - private Optional currency = Optional.empty(); + private Optional currency = Optional.empty(); private Optional company = Optional.empty(); @@ -690,6 +690,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -701,6 +704,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -712,6 +718,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -723,6 +732,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The income statement's name.

    + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -734,17 +746,331 @@ public Builder name(String name) { return this; } + /** + *

    The income statement's currency.

    + *
      + *
    • XUA - ADB Unit of Account
    • + *
    • AFN - Afghan Afghani
    • + *
    • AFA - Afghan Afghani (1927–2002)
    • + *
    • ALL - Albanian Lek
    • + *
    • ALK - Albanian Lek (1946–1965)
    • + *
    • DZD - Algerian Dinar
    • + *
    • ADP - Andorran Peseta
    • + *
    • AOA - Angolan Kwanza
    • + *
    • AOK - Angolan Kwanza (1977–1991)
    • + *
    • AON - Angolan New Kwanza (1990–2000)
    • + *
    • AOR - Angolan Readjusted Kwanza (1995–1999)
    • + *
    • ARA - Argentine Austral
    • + *
    • ARS - Argentine Peso
    • + *
    • ARM - Argentine Peso (1881–1970)
    • + *
    • ARP - Argentine Peso (1983–1985)
    • + *
    • ARL - Argentine Peso Ley (1970–1983)
    • + *
    • AMD - Armenian Dram
    • + *
    • AWG - Aruban Florin
    • + *
    • AUD - Australian Dollar
    • + *
    • ATS - Austrian Schilling
    • + *
    • AZN - Azerbaijani Manat
    • + *
    • AZM - Azerbaijani Manat (1993–2006)
    • + *
    • BSD - Bahamian Dollar
    • + *
    • BHD - Bahraini Dinar
    • + *
    • BDT - Bangladeshi Taka
    • + *
    • BBD - Barbadian Dollar
    • + *
    • BYN - Belarusian Ruble
    • + *
    • BYB - Belarusian Ruble (1994–1999)
    • + *
    • BYR - Belarusian Ruble (2000–2016)
    • + *
    • BEF - Belgian Franc
    • + *
    • BEC - Belgian Franc (convertible)
    • + *
    • BEL - Belgian Franc (financial)
    • + *
    • BZD - Belize Dollar
    • + *
    • BMD - Bermudan Dollar
    • + *
    • BTN - Bhutanese Ngultrum
    • + *
    • BOB - Bolivian Boliviano
    • + *
    • BOL - Bolivian Boliviano (1863–1963)
    • + *
    • BOV - Bolivian Mvdol
    • + *
    • BOP - Bolivian Peso
    • + *
    • BAM - Bosnia-Herzegovina Convertible Mark
    • + *
    • BAD - Bosnia-Herzegovina Dinar (1992–1994)
    • + *
    • BAN - Bosnia-Herzegovina New Dinar (1994–1997)
    • + *
    • BWP - Botswanan Pula
    • + *
    • BRC - Brazilian Cruzado (1986–1989)
    • + *
    • BRZ - Brazilian Cruzeiro (1942–1967)
    • + *
    • BRE - Brazilian Cruzeiro (1990–1993)
    • + *
    • BRR - Brazilian Cruzeiro (1993–1994)
    • + *
    • BRN - Brazilian New Cruzado (1989–1990)
    • + *
    • BRB - Brazilian New Cruzeiro (1967–1986)
    • + *
    • BRL - Brazilian Real
    • + *
    • GBP - British Pound
    • + *
    • BND - Brunei Dollar
    • + *
    • BGL - Bulgarian Hard Lev
    • + *
    • BGN - Bulgarian Lev
    • + *
    • BGO - Bulgarian Lev (1879–1952)
    • + *
    • BGM - Bulgarian Socialist Lev
    • + *
    • BUK - Burmese Kyat
    • + *
    • BIF - Burundian Franc
    • + *
    • XPF - CFP Franc
    • + *
    • KHR - Cambodian Riel
    • + *
    • CAD - Canadian Dollar
    • + *
    • CVE - Cape Verdean Escudo
    • + *
    • KYD - Cayman Islands Dollar
    • + *
    • XAF - Central African CFA Franc
    • + *
    • CLE - Chilean Escudo
    • + *
    • CLP - Chilean Peso
    • + *
    • CLF - Chilean Unit of Account (UF)
    • + *
    • CNX - Chinese People’s Bank Dollar
    • + *
    • CNY - Chinese Yuan
    • + *
    • CNH - Chinese Yuan (offshore)
    • + *
    • COP - Colombian Peso
    • + *
    • COU - Colombian Real Value Unit
    • + *
    • KMF - Comorian Franc
    • + *
    • CDF - Congolese Franc
    • + *
    • CRC - Costa Rican Colón
    • + *
    • HRD - Croatian Dinar
    • + *
    • HRK - Croatian Kuna
    • + *
    • CUC - Cuban Convertible Peso
    • + *
    • CUP - Cuban Peso
    • + *
    • CYP - Cypriot Pound
    • + *
    • CZK - Czech Koruna
    • + *
    • CSK - Czechoslovak Hard Koruna
    • + *
    • DKK - Danish Krone
    • + *
    • DJF - Djiboutian Franc
    • + *
    • DOP - Dominican Peso
    • + *
    • NLG - Dutch Guilder
    • + *
    • XCD - East Caribbean Dollar
    • + *
    • DDM - East German Mark
    • + *
    • ECS - Ecuadorian Sucre
    • + *
    • ECV - Ecuadorian Unit of Constant Value
    • + *
    • EGP - Egyptian Pound
    • + *
    • GQE - Equatorial Guinean Ekwele
    • + *
    • ERN - Eritrean Nakfa
    • + *
    • EEK - Estonian Kroon
    • + *
    • ETB - Ethiopian Birr
    • + *
    • EUR - Euro
    • + *
    • XBA - European Composite Unit
    • + *
    • XEU - European Currency Unit
    • + *
    • XBB - European Monetary Unit
    • + *
    • XBC - European Unit of Account (XBC)
    • + *
    • XBD - European Unit of Account (XBD)
    • + *
    • FKP - Falkland Islands Pound
    • + *
    • FJD - Fijian Dollar
    • + *
    • FIM - Finnish Markka
    • + *
    • FRF - French Franc
    • + *
    • XFO - French Gold Franc
    • + *
    • XFU - French UIC-Franc
    • + *
    • GMD - Gambian Dalasi
    • + *
    • GEK - Georgian Kupon Larit
    • + *
    • GEL - Georgian Lari
    • + *
    • DEM - German Mark
    • + *
    • GHS - Ghanaian Cedi
    • + *
    • GHC - Ghanaian Cedi (1979–2007)
    • + *
    • GIP - Gibraltar Pound
    • + *
    • XAU - Gold
    • + *
    • GRD - Greek Drachma
    • + *
    • GTQ - Guatemalan Quetzal
    • + *
    • GWP - Guinea-Bissau Peso
    • + *
    • GNF - Guinean Franc
    • + *
    • GNS - Guinean Syli
    • + *
    • GYD - Guyanaese Dollar
    • + *
    • HTG - Haitian Gourde
    • + *
    • HNL - Honduran Lempira
    • + *
    • HKD - Hong Kong Dollar
    • + *
    • HUF - Hungarian Forint
    • + *
    • IMP - IMP
    • + *
    • ISK - Icelandic Króna
    • + *
    • ISJ - Icelandic Króna (1918–1981)
    • + *
    • INR - Indian Rupee
    • + *
    • IDR - Indonesian Rupiah
    • + *
    • IRR - Iranian Rial
    • + *
    • IQD - Iraqi Dinar
    • + *
    • IEP - Irish Pound
    • + *
    • ILS - Israeli New Shekel
    • + *
    • ILP - Israeli Pound
    • + *
    • ILR - Israeli Shekel (1980–1985)
    • + *
    • ITL - Italian Lira
    • + *
    • JMD - Jamaican Dollar
    • + *
    • JPY - Japanese Yen
    • + *
    • JOD - Jordanian Dinar
    • + *
    • KZT - Kazakhstani Tenge
    • + *
    • KES - Kenyan Shilling
    • + *
    • KWD - Kuwaiti Dinar
    • + *
    • KGS - Kyrgystani Som
    • + *
    • LAK - Laotian Kip
    • + *
    • LVL - Latvian Lats
    • + *
    • LVR - Latvian Ruble
    • + *
    • LBP - Lebanese Pound
    • + *
    • LSL - Lesotho Loti
    • + *
    • LRD - Liberian Dollar
    • + *
    • LYD - Libyan Dinar
    • + *
    • LTL - Lithuanian Litas
    • + *
    • LTT - Lithuanian Talonas
    • + *
    • LUL - Luxembourg Financial Franc
    • + *
    • LUC - Luxembourgian Convertible Franc
    • + *
    • LUF - Luxembourgian Franc
    • + *
    • MOP - Macanese Pataca
    • + *
    • MKD - Macedonian Denar
    • + *
    • MKN - Macedonian Denar (1992–1993)
    • + *
    • MGA - Malagasy Ariary
    • + *
    • MGF - Malagasy Franc
    • + *
    • MWK - Malawian Kwacha
    • + *
    • MYR - Malaysian Ringgit
    • + *
    • MVR - Maldivian Rufiyaa
    • + *
    • MVP - Maldivian Rupee (1947–1981)
    • + *
    • MLF - Malian Franc
    • + *
    • MTL - Maltese Lira
    • + *
    • MTP - Maltese Pound
    • + *
    • MRU - Mauritanian Ouguiya
    • + *
    • MRO - Mauritanian Ouguiya (1973–2017)
    • + *
    • MUR - Mauritian Rupee
    • + *
    • MXV - Mexican Investment Unit
    • + *
    • MXN - Mexican Peso
    • + *
    • MXP - Mexican Silver Peso (1861–1992)
    • + *
    • MDC - Moldovan Cupon
    • + *
    • MDL - Moldovan Leu
    • + *
    • MCF - Monegasque Franc
    • + *
    • MNT - Mongolian Tugrik
    • + *
    • MAD - Moroccan Dirham
    • + *
    • MAF - Moroccan Franc
    • + *
    • MZE - Mozambican Escudo
    • + *
    • MZN - Mozambican Metical
    • + *
    • MZM - Mozambican Metical (1980–2006)
    • + *
    • MMK - Myanmar Kyat
    • + *
    • NAD - Namibian Dollar
    • + *
    • NPR - Nepalese Rupee
    • + *
    • ANG - Netherlands Antillean Guilder
    • + *
    • TWD - New Taiwan Dollar
    • + *
    • NZD - New Zealand Dollar
    • + *
    • NIO - Nicaraguan Córdoba
    • + *
    • NIC - Nicaraguan Córdoba (1988–1991)
    • + *
    • NGN - Nigerian Naira
    • + *
    • KPW - North Korean Won
    • + *
    • NOK - Norwegian Krone
    • + *
    • OMR - Omani Rial
    • + *
    • PKR - Pakistani Rupee
    • + *
    • XPD - Palladium
    • + *
    • PAB - Panamanian Balboa
    • + *
    • PGK - Papua New Guinean Kina
    • + *
    • PYG - Paraguayan Guarani
    • + *
    • PEI - Peruvian Inti
    • + *
    • PEN - Peruvian Sol
    • + *
    • PES - Peruvian Sol (1863–1965)
    • + *
    • PHP - Philippine Peso
    • + *
    • XPT - Platinum
    • + *
    • PLN - Polish Zloty
    • + *
    • PLZ - Polish Zloty (1950–1995)
    • + *
    • PTE - Portuguese Escudo
    • + *
    • GWE - Portuguese Guinea Escudo
    • + *
    • QAR - Qatari Rial
    • + *
    • XRE - RINET Funds
    • + *
    • RHD - Rhodesian Dollar
    • + *
    • RON - Romanian Leu
    • + *
    • ROL - Romanian Leu (1952–2006)
    • + *
    • RUB - Russian Ruble
    • + *
    • RUR - Russian Ruble (1991–1998)
    • + *
    • RWF - Rwandan Franc
    • + *
    • SVC - Salvadoran Colón
    • + *
    • WST - Samoan Tala
    • + *
    • SAR - Saudi Riyal
    • + *
    • RSD - Serbian Dinar
    • + *
    • CSD - Serbian Dinar (2002–2006)
    • + *
    • SCR - Seychellois Rupee
    • + *
    • SLL - Sierra Leonean Leone
    • + *
    • XAG - Silver
    • + *
    • SGD - Singapore Dollar
    • + *
    • SKK - Slovak Koruna
    • + *
    • SIT - Slovenian Tolar
    • + *
    • SBD - Solomon Islands Dollar
    • + *
    • SOS - Somali Shilling
    • + *
    • ZAR - South African Rand
    • + *
    • ZAL - South African Rand (financial)
    • + *
    • KRH - South Korean Hwan (1953–1962)
    • + *
    • KRW - South Korean Won
    • + *
    • KRO - South Korean Won (1945–1953)
    • + *
    • SSP - South Sudanese Pound
    • + *
    • SUR - Soviet Rouble
    • + *
    • ESP - Spanish Peseta
    • + *
    • ESA - Spanish Peseta (A account)
    • + *
    • ESB - Spanish Peseta (convertible account)
    • + *
    • XDR - Special Drawing Rights
    • + *
    • LKR - Sri Lankan Rupee
    • + *
    • SHP - St. Helena Pound
    • + *
    • XSU - Sucre
    • + *
    • SDD - Sudanese Dinar (1992–2007)
    • + *
    • SDG - Sudanese Pound
    • + *
    • SDP - Sudanese Pound (1957–1998)
    • + *
    • SRD - Surinamese Dollar
    • + *
    • SRG - Surinamese Guilder
    • + *
    • SZL - Swazi Lilangeni
    • + *
    • SEK - Swedish Krona
    • + *
    • CHF - Swiss Franc
    • + *
    • SYP - Syrian Pound
    • + *
    • STN - São Tomé & Príncipe Dobra
    • + *
    • STD - São Tomé & Príncipe Dobra (1977–2017)
    • + *
    • TVD - TVD
    • + *
    • TJR - Tajikistani Ruble
    • + *
    • TJS - Tajikistani Somoni
    • + *
    • TZS - Tanzanian Shilling
    • + *
    • XTS - Testing Currency Code
    • + *
    • THB - Thai Baht
    • + *
    • XXX - The codes assigned for transactions where no currency is involved
    • + *
    • TPE - Timorese Escudo
    • + *
    • TOP - Tongan Paʻanga
    • + *
    • TTD - Trinidad & Tobago Dollar
    • + *
    • TND - Tunisian Dinar
    • + *
    • TRY - Turkish Lira
    • + *
    • TRL - Turkish Lira (1922–2005)
    • + *
    • TMT - Turkmenistani Manat
    • + *
    • TMM - Turkmenistani Manat (1993–2009)
    • + *
    • USD - US Dollar
    • + *
    • USN - US Dollar (Next day)
    • + *
    • USS - US Dollar (Same day)
    • + *
    • UGX - Ugandan Shilling
    • + *
    • UGS - Ugandan Shilling (1966–1987)
    • + *
    • UAH - Ukrainian Hryvnia
    • + *
    • UAK - Ukrainian Karbovanets
    • + *
    • AED - United Arab Emirates Dirham
    • + *
    • UYW - Uruguayan Nominal Wage Index Unit
    • + *
    • UYU - Uruguayan Peso
    • + *
    • UYP - Uruguayan Peso (1975–1993)
    • + *
    • UYI - Uruguayan Peso (Indexed Units)
    • + *
    • UZS - Uzbekistani Som
    • + *
    • VUV - Vanuatu Vatu
    • + *
    • VES - Venezuelan Bolívar
    • + *
    • VEB - Venezuelan Bolívar (1871–2008)
    • + *
    • VEF - Venezuelan Bolívar (2008–2018)
    • + *
    • VND - Vietnamese Dong
    • + *
    • VNN - Vietnamese Dong (1978–1985)
    • + *
    • CHE - WIR Euro
    • + *
    • CHW - WIR Franc
    • + *
    • XOF - West African CFA Franc
    • + *
    • YDD - Yemeni Dinar
    • + *
    • YER - Yemeni Rial
    • + *
    • YUN - Yugoslavian Convertible Dinar (1990–1992)
    • + *
    • YUD - Yugoslavian Hard Dinar (1966–1990)
    • + *
    • YUM - Yugoslavian New Dinar (1994–2002)
    • + *
    • YUR - Yugoslavian Reformed Dinar (1992–1993)
    • + *
    • ZWN - ZWN
    • + *
    • ZRN - Zairean New Zaire (1993–1998)
    • + *
    • ZRZ - Zairean Zaire (1971–1993)
    • + *
    • ZMW - Zambian Kwacha
    • + *
    • ZMK - Zambian Kwacha (1968–2012)
    • + *
    • ZWD - Zimbabwean Dollar (1980–2008)
    • + *
    • ZWR - Zimbabwean Dollar (2008)
    • + *
    • ZWL - Zimbabwean Dollar (2009)
    • + *
    + */ @JsonSetter(value = "currency", nulls = Nulls.SKIP) - public Builder currency(Optional currency) { + public Builder currency(Optional currency) { this.currency = currency; return this; } - public Builder currency(TransactionCurrencyEnum currency) { + public Builder currency(IncomeStatementCurrency currency) { this.currency = Optional.ofNullable(currency); return this; } + /** + *

    The company the income statement belongs to.

    + */ @JsonSetter(value = "company", nulls = Nulls.SKIP) public Builder company(Optional company) { this.company = company; @@ -756,6 +1082,9 @@ public Builder company(IncomeStatementCompany company) { return this; } + /** + *

    The income statement's start period.

    + */ @JsonSetter(value = "start_period", nulls = Nulls.SKIP) public Builder startPeriod(Optional startPeriod) { this.startPeriod = startPeriod; @@ -767,6 +1096,9 @@ public Builder startPeriod(OffsetDateTime startPeriod) { return this; } + /** + *

    The income statement's end period.

    + */ @JsonSetter(value = "end_period", nulls = Nulls.SKIP) public Builder endPeriod(Optional endPeriod) { this.endPeriod = endPeriod; @@ -800,6 +1132,9 @@ public Builder costOfSales(List costOfSales) { return this; } + /** + *

    The revenue minus the cost of sale.

    + */ @JsonSetter(value = "gross_profit", nulls = Nulls.SKIP) public Builder grossProfit(Optional grossProfit) { this.grossProfit = grossProfit; @@ -822,6 +1157,9 @@ public Builder operatingExpenses(List operatingExpenses) { return this; } + /** + *

    The revenue minus the operating expenses.

    + */ @JsonSetter(value = "net_operating_income", nulls = Nulls.SKIP) public Builder netOperatingIncome(Optional netOperatingIncome) { this.netOperatingIncome = netOperatingIncome; @@ -844,6 +1182,9 @@ public Builder nonOperatingExpenses(List nonOperatingExpenses) { return this; } + /** + *

    The gross profit minus the total expenses.

    + */ @JsonSetter(value = "net_income", nulls = Nulls.SKIP) public Builder netIncome(Optional netIncome) { this.netIncome = netIncome; @@ -855,6 +1196,9 @@ public Builder netIncome(Double netIncome) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/accounting/types/IncomeStatementCurrency.java b/src/main/java/com/merge/api/accounting/types/IncomeStatementCurrency.java new file mode 100644 index 000000000..8adccea30 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/IncomeStatementCurrency.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = IncomeStatementCurrency.Deserializer.class) +public final class IncomeStatementCurrency { + private final Object value; + + private final int type; + + private IncomeStatementCurrency(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((TransactionCurrencyEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof IncomeStatementCurrency && equalTo((IncomeStatementCurrency) other); + } + + private boolean equalTo(IncomeStatementCurrency other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static IncomeStatementCurrency of(TransactionCurrencyEnum value) { + return new IncomeStatementCurrency(value, 0); + } + + public static IncomeStatementCurrency of(String value) { + return new IncomeStatementCurrency(value, 1); + } + + public interface Visitor { + T visit(TransactionCurrencyEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(IncomeStatementCurrency.class); + } + + @java.lang.Override + public IncomeStatementCurrency deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TransactionCurrencyEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/IncomeStatementsListRequest.java b/src/main/java/com/merge/api/accounting/types/IncomeStatementsListRequest.java index e0395e0a1..b671a49d0 100644 --- a/src/main/java/com/merge/api/accounting/types/IncomeStatementsListRequest.java +++ b/src/main/java/com/merge/api/accounting/types/IncomeStatementsListRequest.java @@ -273,6 +273,9 @@ public Builder from(IncomeStatementsListRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -289,6 +292,9 @@ public Builder expand(String expand) { return this; } + /** + *

    If provided, will only return income statements for this company.

    + */ @JsonSetter(value = "company_id", nulls = Nulls.SKIP) public Builder companyId(Optional companyId) { this.companyId = companyId; @@ -300,6 +306,9 @@ public Builder companyId(String companyId) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -311,6 +320,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -322,6 +334,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -333,6 +348,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -344,6 +362,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -355,6 +376,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -366,6 +390,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -377,6 +404,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -388,6 +418,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -399,6 +432,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; diff --git a/src/main/java/com/merge/api/accounting/types/IncomeStatementsRetrieveRequest.java b/src/main/java/com/merge/api/accounting/types/IncomeStatementsRetrieveRequest.java index b67054e37..497bc4788 100644 --- a/src/main/java/com/merge/api/accounting/types/IncomeStatementsRetrieveRequest.java +++ b/src/main/java/com/merge/api/accounting/types/IncomeStatementsRetrieveRequest.java @@ -116,6 +116,9 @@ public Builder from(IncomeStatementsRetrieveRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -132,6 +135,9 @@ public Builder expand(String expand) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -143,6 +149,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/accounting/types/Invoice.java b/src/main/java/com/merge/api/accounting/types/Invoice.java index 2bcee59f9..092869cd4 100644 --- a/src/main/java/com/merge/api/accounting/types/Invoice.java +++ b/src/main/java/com/merge/api/accounting/types/Invoice.java @@ -49,7 +49,7 @@ public final class Invoice { private final Optional employee; - private final Optional currency; + private final Optional currency; private final Optional exchangeRate; @@ -59,7 +59,7 @@ public final class Invoice { private final Optional subTotal; - private final Optional status; + private final Optional status; private final Optional totalTaxAmount; @@ -111,12 +111,12 @@ private Invoice( Optional memo, Optional company, Optional employee, - Optional currency, + Optional currency, Optional exchangeRate, Optional paymentTerm, Optional totalDiscount, Optional subTotal, - Optional status, + Optional status, Optional totalTaxAmount, Optional totalAmount, Optional balance, @@ -591,7 +591,7 @@ public Optional getEmployee() { * */ @JsonProperty("currency") - public Optional getCurrency() { + public Optional getCurrency() { return currency; } @@ -639,7 +639,7 @@ public Optional getSubTotal() { * */ @JsonProperty("status") - public Optional getStatus() { + public Optional getStatus() { return status; } @@ -889,7 +889,7 @@ public static final class Builder { private Optional employee = Optional.empty(); - private Optional currency = Optional.empty(); + private Optional currency = Optional.empty(); private Optional exchangeRate = Optional.empty(); @@ -899,7 +899,7 @@ public static final class Builder { private Optional subTotal = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Optional totalTaxAmount = Optional.empty(); @@ -991,6 +991,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -1002,6 +1005,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -1013,6 +1019,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -1024,6 +1033,13 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    Whether the invoice is an accounts receivable or accounts payable. If type is ACCOUNTS_PAYABLE, the invoice is a bill. If type is ACCOUNTS_RECEIVABLE, it is an invoice.

    + *
      + *
    • ACCOUNTS_RECEIVABLE - ACCOUNTS_RECEIVABLE
    • + *
    • ACCOUNTS_PAYABLE - ACCOUNTS_PAYABLE
    • + *
    + */ @JsonSetter(value = "type", nulls = Nulls.SKIP) public Builder type(Optional type) { this.type = type; @@ -1035,6 +1051,9 @@ public Builder type(InvoiceTypeEnum type) { return this; } + /** + *

    The invoice's contact.

    + */ @JsonSetter(value = "contact", nulls = Nulls.SKIP) public Builder contact(Optional contact) { this.contact = contact; @@ -1046,6 +1065,9 @@ public Builder contact(InvoiceContact contact) { return this; } + /** + *

    The invoice's number.

    + */ @JsonSetter(value = "number", nulls = Nulls.SKIP) public Builder number(Optional number) { this.number = number; @@ -1057,6 +1079,9 @@ public Builder number(String number) { return this; } + /** + *

    The invoice's issue date.

    + */ @JsonSetter(value = "issue_date", nulls = Nulls.SKIP) public Builder issueDate(Optional issueDate) { this.issueDate = issueDate; @@ -1068,6 +1093,9 @@ public Builder issueDate(OffsetDateTime issueDate) { return this; } + /** + *

    The invoice's due date.

    + */ @JsonSetter(value = "due_date", nulls = Nulls.SKIP) public Builder dueDate(Optional dueDate) { this.dueDate = dueDate; @@ -1079,6 +1107,9 @@ public Builder dueDate(OffsetDateTime dueDate) { return this; } + /** + *

    The invoice's paid date.

    + */ @JsonSetter(value = "paid_on_date", nulls = Nulls.SKIP) public Builder paidOnDate(Optional paidOnDate) { this.paidOnDate = paidOnDate; @@ -1090,6 +1121,9 @@ public Builder paidOnDate(OffsetDateTime paidOnDate) { return this; } + /** + *

    The invoice's private note.

    + */ @JsonSetter(value = "memo", nulls = Nulls.SKIP) public Builder memo(Optional memo) { this.memo = memo; @@ -1101,6 +1135,9 @@ public Builder memo(String memo) { return this; } + /** + *

    The company the invoice belongs to.

    + */ @JsonSetter(value = "company", nulls = Nulls.SKIP) public Builder company(Optional company) { this.company = company; @@ -1112,6 +1149,9 @@ public Builder company(InvoiceCompany company) { return this; } + /** + *

    The employee this overall transaction relates to.

    + */ @JsonSetter(value = "employee", nulls = Nulls.SKIP) public Builder employee(Optional employee) { this.employee = employee; @@ -1123,17 +1163,331 @@ public Builder employee(InvoiceEmployee employee) { return this; } + /** + *

    The invoice's currency.

    + *
      + *
    • XUA - ADB Unit of Account
    • + *
    • AFN - Afghan Afghani
    • + *
    • AFA - Afghan Afghani (1927–2002)
    • + *
    • ALL - Albanian Lek
    • + *
    • ALK - Albanian Lek (1946–1965)
    • + *
    • DZD - Algerian Dinar
    • + *
    • ADP - Andorran Peseta
    • + *
    • AOA - Angolan Kwanza
    • + *
    • AOK - Angolan Kwanza (1977–1991)
    • + *
    • AON - Angolan New Kwanza (1990–2000)
    • + *
    • AOR - Angolan Readjusted Kwanza (1995–1999)
    • + *
    • ARA - Argentine Austral
    • + *
    • ARS - Argentine Peso
    • + *
    • ARM - Argentine Peso (1881–1970)
    • + *
    • ARP - Argentine Peso (1983–1985)
    • + *
    • ARL - Argentine Peso Ley (1970–1983)
    • + *
    • AMD - Armenian Dram
    • + *
    • AWG - Aruban Florin
    • + *
    • AUD - Australian Dollar
    • + *
    • ATS - Austrian Schilling
    • + *
    • AZN - Azerbaijani Manat
    • + *
    • AZM - Azerbaijani Manat (1993–2006)
    • + *
    • BSD - Bahamian Dollar
    • + *
    • BHD - Bahraini Dinar
    • + *
    • BDT - Bangladeshi Taka
    • + *
    • BBD - Barbadian Dollar
    • + *
    • BYN - Belarusian Ruble
    • + *
    • BYB - Belarusian Ruble (1994–1999)
    • + *
    • BYR - Belarusian Ruble (2000–2016)
    • + *
    • BEF - Belgian Franc
    • + *
    • BEC - Belgian Franc (convertible)
    • + *
    • BEL - Belgian Franc (financial)
    • + *
    • BZD - Belize Dollar
    • + *
    • BMD - Bermudan Dollar
    • + *
    • BTN - Bhutanese Ngultrum
    • + *
    • BOB - Bolivian Boliviano
    • + *
    • BOL - Bolivian Boliviano (1863–1963)
    • + *
    • BOV - Bolivian Mvdol
    • + *
    • BOP - Bolivian Peso
    • + *
    • BAM - Bosnia-Herzegovina Convertible Mark
    • + *
    • BAD - Bosnia-Herzegovina Dinar (1992–1994)
    • + *
    • BAN - Bosnia-Herzegovina New Dinar (1994–1997)
    • + *
    • BWP - Botswanan Pula
    • + *
    • BRC - Brazilian Cruzado (1986–1989)
    • + *
    • BRZ - Brazilian Cruzeiro (1942–1967)
    • + *
    • BRE - Brazilian Cruzeiro (1990–1993)
    • + *
    • BRR - Brazilian Cruzeiro (1993–1994)
    • + *
    • BRN - Brazilian New Cruzado (1989–1990)
    • + *
    • BRB - Brazilian New Cruzeiro (1967–1986)
    • + *
    • BRL - Brazilian Real
    • + *
    • GBP - British Pound
    • + *
    • BND - Brunei Dollar
    • + *
    • BGL - Bulgarian Hard Lev
    • + *
    • BGN - Bulgarian Lev
    • + *
    • BGO - Bulgarian Lev (1879–1952)
    • + *
    • BGM - Bulgarian Socialist Lev
    • + *
    • BUK - Burmese Kyat
    • + *
    • BIF - Burundian Franc
    • + *
    • XPF - CFP Franc
    • + *
    • KHR - Cambodian Riel
    • + *
    • CAD - Canadian Dollar
    • + *
    • CVE - Cape Verdean Escudo
    • + *
    • KYD - Cayman Islands Dollar
    • + *
    • XAF - Central African CFA Franc
    • + *
    • CLE - Chilean Escudo
    • + *
    • CLP - Chilean Peso
    • + *
    • CLF - Chilean Unit of Account (UF)
    • + *
    • CNX - Chinese People’s Bank Dollar
    • + *
    • CNY - Chinese Yuan
    • + *
    • CNH - Chinese Yuan (offshore)
    • + *
    • COP - Colombian Peso
    • + *
    • COU - Colombian Real Value Unit
    • + *
    • KMF - Comorian Franc
    • + *
    • CDF - Congolese Franc
    • + *
    • CRC - Costa Rican Colón
    • + *
    • HRD - Croatian Dinar
    • + *
    • HRK - Croatian Kuna
    • + *
    • CUC - Cuban Convertible Peso
    • + *
    • CUP - Cuban Peso
    • + *
    • CYP - Cypriot Pound
    • + *
    • CZK - Czech Koruna
    • + *
    • CSK - Czechoslovak Hard Koruna
    • + *
    • DKK - Danish Krone
    • + *
    • DJF - Djiboutian Franc
    • + *
    • DOP - Dominican Peso
    • + *
    • NLG - Dutch Guilder
    • + *
    • XCD - East Caribbean Dollar
    • + *
    • DDM - East German Mark
    • + *
    • ECS - Ecuadorian Sucre
    • + *
    • ECV - Ecuadorian Unit of Constant Value
    • + *
    • EGP - Egyptian Pound
    • + *
    • GQE - Equatorial Guinean Ekwele
    • + *
    • ERN - Eritrean Nakfa
    • + *
    • EEK - Estonian Kroon
    • + *
    • ETB - Ethiopian Birr
    • + *
    • EUR - Euro
    • + *
    • XBA - European Composite Unit
    • + *
    • XEU - European Currency Unit
    • + *
    • XBB - European Monetary Unit
    • + *
    • XBC - European Unit of Account (XBC)
    • + *
    • XBD - European Unit of Account (XBD)
    • + *
    • FKP - Falkland Islands Pound
    • + *
    • FJD - Fijian Dollar
    • + *
    • FIM - Finnish Markka
    • + *
    • FRF - French Franc
    • + *
    • XFO - French Gold Franc
    • + *
    • XFU - French UIC-Franc
    • + *
    • GMD - Gambian Dalasi
    • + *
    • GEK - Georgian Kupon Larit
    • + *
    • GEL - Georgian Lari
    • + *
    • DEM - German Mark
    • + *
    • GHS - Ghanaian Cedi
    • + *
    • GHC - Ghanaian Cedi (1979–2007)
    • + *
    • GIP - Gibraltar Pound
    • + *
    • XAU - Gold
    • + *
    • GRD - Greek Drachma
    • + *
    • GTQ - Guatemalan Quetzal
    • + *
    • GWP - Guinea-Bissau Peso
    • + *
    • GNF - Guinean Franc
    • + *
    • GNS - Guinean Syli
    • + *
    • GYD - Guyanaese Dollar
    • + *
    • HTG - Haitian Gourde
    • + *
    • HNL - Honduran Lempira
    • + *
    • HKD - Hong Kong Dollar
    • + *
    • HUF - Hungarian Forint
    • + *
    • IMP - IMP
    • + *
    • ISK - Icelandic Króna
    • + *
    • ISJ - Icelandic Króna (1918–1981)
    • + *
    • INR - Indian Rupee
    • + *
    • IDR - Indonesian Rupiah
    • + *
    • IRR - Iranian Rial
    • + *
    • IQD - Iraqi Dinar
    • + *
    • IEP - Irish Pound
    • + *
    • ILS - Israeli New Shekel
    • + *
    • ILP - Israeli Pound
    • + *
    • ILR - Israeli Shekel (1980–1985)
    • + *
    • ITL - Italian Lira
    • + *
    • JMD - Jamaican Dollar
    • + *
    • JPY - Japanese Yen
    • + *
    • JOD - Jordanian Dinar
    • + *
    • KZT - Kazakhstani Tenge
    • + *
    • KES - Kenyan Shilling
    • + *
    • KWD - Kuwaiti Dinar
    • + *
    • KGS - Kyrgystani Som
    • + *
    • LAK - Laotian Kip
    • + *
    • LVL - Latvian Lats
    • + *
    • LVR - Latvian Ruble
    • + *
    • LBP - Lebanese Pound
    • + *
    • LSL - Lesotho Loti
    • + *
    • LRD - Liberian Dollar
    • + *
    • LYD - Libyan Dinar
    • + *
    • LTL - Lithuanian Litas
    • + *
    • LTT - Lithuanian Talonas
    • + *
    • LUL - Luxembourg Financial Franc
    • + *
    • LUC - Luxembourgian Convertible Franc
    • + *
    • LUF - Luxembourgian Franc
    • + *
    • MOP - Macanese Pataca
    • + *
    • MKD - Macedonian Denar
    • + *
    • MKN - Macedonian Denar (1992–1993)
    • + *
    • MGA - Malagasy Ariary
    • + *
    • MGF - Malagasy Franc
    • + *
    • MWK - Malawian Kwacha
    • + *
    • MYR - Malaysian Ringgit
    • + *
    • MVR - Maldivian Rufiyaa
    • + *
    • MVP - Maldivian Rupee (1947–1981)
    • + *
    • MLF - Malian Franc
    • + *
    • MTL - Maltese Lira
    • + *
    • MTP - Maltese Pound
    • + *
    • MRU - Mauritanian Ouguiya
    • + *
    • MRO - Mauritanian Ouguiya (1973–2017)
    • + *
    • MUR - Mauritian Rupee
    • + *
    • MXV - Mexican Investment Unit
    • + *
    • MXN - Mexican Peso
    • + *
    • MXP - Mexican Silver Peso (1861–1992)
    • + *
    • MDC - Moldovan Cupon
    • + *
    • MDL - Moldovan Leu
    • + *
    • MCF - Monegasque Franc
    • + *
    • MNT - Mongolian Tugrik
    • + *
    • MAD - Moroccan Dirham
    • + *
    • MAF - Moroccan Franc
    • + *
    • MZE - Mozambican Escudo
    • + *
    • MZN - Mozambican Metical
    • + *
    • MZM - Mozambican Metical (1980–2006)
    • + *
    • MMK - Myanmar Kyat
    • + *
    • NAD - Namibian Dollar
    • + *
    • NPR - Nepalese Rupee
    • + *
    • ANG - Netherlands Antillean Guilder
    • + *
    • TWD - New Taiwan Dollar
    • + *
    • NZD - New Zealand Dollar
    • + *
    • NIO - Nicaraguan Córdoba
    • + *
    • NIC - Nicaraguan Córdoba (1988–1991)
    • + *
    • NGN - Nigerian Naira
    • + *
    • KPW - North Korean Won
    • + *
    • NOK - Norwegian Krone
    • + *
    • OMR - Omani Rial
    • + *
    • PKR - Pakistani Rupee
    • + *
    • XPD - Palladium
    • + *
    • PAB - Panamanian Balboa
    • + *
    • PGK - Papua New Guinean Kina
    • + *
    • PYG - Paraguayan Guarani
    • + *
    • PEI - Peruvian Inti
    • + *
    • PEN - Peruvian Sol
    • + *
    • PES - Peruvian Sol (1863–1965)
    • + *
    • PHP - Philippine Peso
    • + *
    • XPT - Platinum
    • + *
    • PLN - Polish Zloty
    • + *
    • PLZ - Polish Zloty (1950–1995)
    • + *
    • PTE - Portuguese Escudo
    • + *
    • GWE - Portuguese Guinea Escudo
    • + *
    • QAR - Qatari Rial
    • + *
    • XRE - RINET Funds
    • + *
    • RHD - Rhodesian Dollar
    • + *
    • RON - Romanian Leu
    • + *
    • ROL - Romanian Leu (1952–2006)
    • + *
    • RUB - Russian Ruble
    • + *
    • RUR - Russian Ruble (1991–1998)
    • + *
    • RWF - Rwandan Franc
    • + *
    • SVC - Salvadoran Colón
    • + *
    • WST - Samoan Tala
    • + *
    • SAR - Saudi Riyal
    • + *
    • RSD - Serbian Dinar
    • + *
    • CSD - Serbian Dinar (2002–2006)
    • + *
    • SCR - Seychellois Rupee
    • + *
    • SLL - Sierra Leonean Leone
    • + *
    • XAG - Silver
    • + *
    • SGD - Singapore Dollar
    • + *
    • SKK - Slovak Koruna
    • + *
    • SIT - Slovenian Tolar
    • + *
    • SBD - Solomon Islands Dollar
    • + *
    • SOS - Somali Shilling
    • + *
    • ZAR - South African Rand
    • + *
    • ZAL - South African Rand (financial)
    • + *
    • KRH - South Korean Hwan (1953–1962)
    • + *
    • KRW - South Korean Won
    • + *
    • KRO - South Korean Won (1945–1953)
    • + *
    • SSP - South Sudanese Pound
    • + *
    • SUR - Soviet Rouble
    • + *
    • ESP - Spanish Peseta
    • + *
    • ESA - Spanish Peseta (A account)
    • + *
    • ESB - Spanish Peseta (convertible account)
    • + *
    • XDR - Special Drawing Rights
    • + *
    • LKR - Sri Lankan Rupee
    • + *
    • SHP - St. Helena Pound
    • + *
    • XSU - Sucre
    • + *
    • SDD - Sudanese Dinar (1992–2007)
    • + *
    • SDG - Sudanese Pound
    • + *
    • SDP - Sudanese Pound (1957–1998)
    • + *
    • SRD - Surinamese Dollar
    • + *
    • SRG - Surinamese Guilder
    • + *
    • SZL - Swazi Lilangeni
    • + *
    • SEK - Swedish Krona
    • + *
    • CHF - Swiss Franc
    • + *
    • SYP - Syrian Pound
    • + *
    • STN - São Tomé & Príncipe Dobra
    • + *
    • STD - São Tomé & Príncipe Dobra (1977–2017)
    • + *
    • TVD - TVD
    • + *
    • TJR - Tajikistani Ruble
    • + *
    • TJS - Tajikistani Somoni
    • + *
    • TZS - Tanzanian Shilling
    • + *
    • XTS - Testing Currency Code
    • + *
    • THB - Thai Baht
    • + *
    • XXX - The codes assigned for transactions where no currency is involved
    • + *
    • TPE - Timorese Escudo
    • + *
    • TOP - Tongan Paʻanga
    • + *
    • TTD - Trinidad & Tobago Dollar
    • + *
    • TND - Tunisian Dinar
    • + *
    • TRY - Turkish Lira
    • + *
    • TRL - Turkish Lira (1922–2005)
    • + *
    • TMT - Turkmenistani Manat
    • + *
    • TMM - Turkmenistani Manat (1993–2009)
    • + *
    • USD - US Dollar
    • + *
    • USN - US Dollar (Next day)
    • + *
    • USS - US Dollar (Same day)
    • + *
    • UGX - Ugandan Shilling
    • + *
    • UGS - Ugandan Shilling (1966–1987)
    • + *
    • UAH - Ukrainian Hryvnia
    • + *
    • UAK - Ukrainian Karbovanets
    • + *
    • AED - United Arab Emirates Dirham
    • + *
    • UYW - Uruguayan Nominal Wage Index Unit
    • + *
    • UYU - Uruguayan Peso
    • + *
    • UYP - Uruguayan Peso (1975–1993)
    • + *
    • UYI - Uruguayan Peso (Indexed Units)
    • + *
    • UZS - Uzbekistani Som
    • + *
    • VUV - Vanuatu Vatu
    • + *
    • VES - Venezuelan Bolívar
    • + *
    • VEB - Venezuelan Bolívar (1871–2008)
    • + *
    • VEF - Venezuelan Bolívar (2008–2018)
    • + *
    • VND - Vietnamese Dong
    • + *
    • VNN - Vietnamese Dong (1978–1985)
    • + *
    • CHE - WIR Euro
    • + *
    • CHW - WIR Franc
    • + *
    • XOF - West African CFA Franc
    • + *
    • YDD - Yemeni Dinar
    • + *
    • YER - Yemeni Rial
    • + *
    • YUN - Yugoslavian Convertible Dinar (1990–1992)
    • + *
    • YUD - Yugoslavian Hard Dinar (1966–1990)
    • + *
    • YUM - Yugoslavian New Dinar (1994–2002)
    • + *
    • YUR - Yugoslavian Reformed Dinar (1992–1993)
    • + *
    • ZWN - ZWN
    • + *
    • ZRN - Zairean New Zaire (1993–1998)
    • + *
    • ZRZ - Zairean Zaire (1971–1993)
    • + *
    • ZMW - Zambian Kwacha
    • + *
    • ZMK - Zambian Kwacha (1968–2012)
    • + *
    • ZWD - Zimbabwean Dollar (1980–2008)
    • + *
    • ZWR - Zimbabwean Dollar (2008)
    • + *
    • ZWL - Zimbabwean Dollar (2009)
    • + *
    + */ @JsonSetter(value = "currency", nulls = Nulls.SKIP) - public Builder currency(Optional currency) { + public Builder currency(Optional currency) { this.currency = currency; return this; } - public Builder currency(TransactionCurrencyEnum currency) { + public Builder currency(InvoiceCurrency currency) { this.currency = Optional.ofNullable(currency); return this; } + /** + *

    The invoice's exchange rate.

    + */ @JsonSetter(value = "exchange_rate", nulls = Nulls.SKIP) public Builder exchangeRate(Optional exchangeRate) { this.exchangeRate = exchangeRate; @@ -1145,6 +1499,9 @@ public Builder exchangeRate(String exchangeRate) { return this; } + /** + *

    The payment term that applies to this transaction.

    + */ @JsonSetter(value = "payment_term", nulls = Nulls.SKIP) public Builder paymentTerm(Optional paymentTerm) { this.paymentTerm = paymentTerm; @@ -1156,6 +1513,9 @@ public Builder paymentTerm(InvoicePaymentTerm paymentTerm) { return this; } + /** + *

    The total discounts applied to the total cost.

    + */ @JsonSetter(value = "total_discount", nulls = Nulls.SKIP) public Builder totalDiscount(Optional totalDiscount) { this.totalDiscount = totalDiscount; @@ -1167,6 +1527,9 @@ public Builder totalDiscount(Double totalDiscount) { return this; } + /** + *

    The total amount being paid before taxes.

    + */ @JsonSetter(value = "sub_total", nulls = Nulls.SKIP) public Builder subTotal(Optional subTotal) { this.subTotal = subTotal; @@ -1178,17 +1541,31 @@ public Builder subTotal(Double subTotal) { return this; } + /** + *

    The status of the invoice.

    + *
      + *
    • PAID - PAID
    • + *
    • DRAFT - DRAFT
    • + *
    • SUBMITTED - SUBMITTED
    • + *
    • PARTIALLY_PAID - PARTIALLY_PAID
    • + *
    • OPEN - OPEN
    • + *
    • VOID - VOID
    • + *
    + */ @JsonSetter(value = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { + public Builder status(Optional status) { this.status = status; return this; } - public Builder status(InvoiceStatusEnum status) { + public Builder status(InvoiceStatus status) { this.status = Optional.ofNullable(status); return this; } + /** + *

    The total amount being paid in taxes.

    + */ @JsonSetter(value = "total_tax_amount", nulls = Nulls.SKIP) public Builder totalTaxAmount(Optional totalTaxAmount) { this.totalTaxAmount = totalTaxAmount; @@ -1200,6 +1577,9 @@ public Builder totalTaxAmount(Double totalTaxAmount) { return this; } + /** + *

    The invoice's total amount.

    + */ @JsonSetter(value = "total_amount", nulls = Nulls.SKIP) public Builder totalAmount(Optional totalAmount) { this.totalAmount = totalAmount; @@ -1211,6 +1591,9 @@ public Builder totalAmount(Double totalAmount) { return this; } + /** + *

    The invoice's remaining balance.

    + */ @JsonSetter(value = "balance", nulls = Nulls.SKIP) public Builder balance(Optional balance) { this.balance = balance; @@ -1222,6 +1605,9 @@ public Builder balance(Double balance) { return this; } + /** + *

    When the third party's invoice entry was updated.

    + */ @JsonSetter(value = "remote_updated_at", nulls = Nulls.SKIP) public Builder remoteUpdatedAt(Optional remoteUpdatedAt) { this.remoteUpdatedAt = remoteUpdatedAt; @@ -1244,6 +1630,9 @@ public Builder trackingCategories(List> return this; } + /** + *

    The accounting period that the Invoice was generated in.

    + */ @JsonSetter(value = "accounting_period", nulls = Nulls.SKIP) public Builder accountingPeriod(Optional accountingPeriod) { this.accountingPeriod = accountingPeriod; @@ -1266,6 +1655,9 @@ public Builder purchaseOrders(List> purchase return this; } + /** + *

    Array of Payment object IDs.

    + */ @JsonSetter(value = "payments", nulls = Nulls.SKIP) public Builder payments(Optional>> payments) { this.payments = payments; @@ -1277,6 +1669,9 @@ public Builder payments(List> payments) { return this; } + /** + *

    A list of the Payment Applied to Lines common models related to a given Invoice, Credit Note, or Journal Entry.

    + */ @JsonSetter(value = "applied_payments", nulls = Nulls.SKIP) public Builder appliedPayments(Optional>> appliedPayments) { this.appliedPayments = appliedPayments; @@ -1299,6 +1694,9 @@ public Builder lineItems(List lineItems) { return this; } + /** + *

    CreditNoteApplyLines applied to the Invoice.

    + */ @JsonSetter(value = "applied_credit_notes", nulls = Nulls.SKIP) public Builder appliedCreditNotes(Optional> appliedCreditNotes) { this.appliedCreditNotes = appliedCreditNotes; @@ -1310,6 +1708,9 @@ public Builder appliedCreditNotes(List appliedCre return this; } + /** + *

    VendorCreditApplyLines applied to the Invoice.

    + */ @JsonSetter(value = "applied_vendor_credits", nulls = Nulls.SKIP) public Builder appliedVendorCredits(Optional> appliedVendorCredits) { this.appliedVendorCredits = appliedVendorCredits; @@ -1321,6 +1722,9 @@ public Builder appliedVendorCredits(List applie return this; } + /** + *

    If the transaction is inclusive or exclusive of tax. True if inclusive, False if exclusive.

    + */ @JsonSetter(value = "inclusive_of_tax", nulls = Nulls.SKIP) public Builder inclusiveOfTax(Optional inclusiveOfTax) { this.inclusiveOfTax = inclusiveOfTax; @@ -1332,6 +1736,9 @@ public Builder inclusiveOfTax(Boolean inclusiveOfTax) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/accounting/types/InvoiceCurrency.java b/src/main/java/com/merge/api/accounting/types/InvoiceCurrency.java new file mode 100644 index 000000000..acedaebe7 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/InvoiceCurrency.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = InvoiceCurrency.Deserializer.class) +public final class InvoiceCurrency { + private final Object value; + + private final int type; + + private InvoiceCurrency(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((TransactionCurrencyEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof InvoiceCurrency && equalTo((InvoiceCurrency) other); + } + + private boolean equalTo(InvoiceCurrency other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static InvoiceCurrency of(TransactionCurrencyEnum value) { + return new InvoiceCurrency(value, 0); + } + + public static InvoiceCurrency of(String value) { + return new InvoiceCurrency(value, 1); + } + + public interface Visitor { + T visit(TransactionCurrencyEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(InvoiceCurrency.class); + } + + @java.lang.Override + public InvoiceCurrency deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TransactionCurrencyEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/InvoiceEndpointRequest.java b/src/main/java/com/merge/api/accounting/types/InvoiceEndpointRequest.java index 425868a5b..c195616cb 100644 --- a/src/main/java/com/merge/api/accounting/types/InvoiceEndpointRequest.java +++ b/src/main/java/com/merge/api/accounting/types/InvoiceEndpointRequest.java @@ -99,10 +99,16 @@ public interface ModelStage { public interface _FinalStage { InvoiceEndpointRequest build(); + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ _FinalStage isDebugMode(Optional isDebugMode); _FinalStage isDebugMode(Boolean isDebugMode); + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ _FinalStage runAsync(Optional runAsync); _FinalStage runAsync(Boolean runAsync); @@ -146,6 +152,9 @@ public _FinalStage runAsync(Boolean runAsync) { return this; } + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ @java.lang.Override @JsonSetter(value = "run_async", nulls = Nulls.SKIP) public _FinalStage runAsync(Optional runAsync) { @@ -163,6 +172,9 @@ public _FinalStage isDebugMode(Boolean isDebugMode) { return this; } + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ @java.lang.Override @JsonSetter(value = "is_debug_mode", nulls = Nulls.SKIP) public _FinalStage isDebugMode(Optional isDebugMode) { diff --git a/src/main/java/com/merge/api/accounting/types/InvoiceLineItem.java b/src/main/java/com/merge/api/accounting/types/InvoiceLineItem.java index 659a3f5d1..84487173f 100644 --- a/src/main/java/com/merge/api/accounting/types/InvoiceLineItem.java +++ b/src/main/java/com/merge/api/accounting/types/InvoiceLineItem.java @@ -41,7 +41,11 @@ public final class InvoiceLineItem { private final Optional employee; - private final Optional currency; + private final Optional project; + + private final Optional contact; + + private final Optional currency; private final Optional exchangeRate; @@ -75,7 +79,9 @@ private InvoiceLineItem( Optional quantity, Optional totalAmount, Optional employee, - Optional currency, + Optional project, + Optional contact, + Optional currency, Optional exchangeRate, Optional item, Optional account, @@ -96,6 +102,8 @@ private InvoiceLineItem( this.quantity = quantity; this.totalAmount = totalAmount; this.employee = employee; + this.project = project; + this.contact = contact; this.currency = currency; this.exchangeRate = exchangeRate; this.item = item; @@ -179,6 +187,19 @@ public Optional getEmployee() { return employee; } + @JsonProperty("project") + public Optional getProject() { + return project; + } + + /** + * @return The invoice's contact. + */ + @JsonProperty("contact") + public Optional getContact() { + return contact; + } + /** * @return The line item's currency. *
      @@ -491,7 +512,7 @@ public Optional getEmployee() { *
    */ @JsonProperty("currency") - public Optional getCurrency() { + public Optional getCurrency() { return currency; } @@ -581,6 +602,8 @@ private boolean equalTo(InvoiceLineItem other) { && quantity.equals(other.quantity) && totalAmount.equals(other.totalAmount) && employee.equals(other.employee) + && project.equals(other.project) + && contact.equals(other.contact) && currency.equals(other.currency) && exchangeRate.equals(other.exchangeRate) && item.equals(other.item) @@ -606,6 +629,8 @@ public int hashCode() { this.quantity, this.totalAmount, this.employee, + this.project, + this.contact, this.currency, this.exchangeRate, this.item, @@ -648,7 +673,11 @@ public static final class Builder { private Optional employee = Optional.empty(); - private Optional currency = Optional.empty(); + private Optional project = Optional.empty(); + + private Optional contact = Optional.empty(); + + private Optional currency = Optional.empty(); private Optional exchangeRate = Optional.empty(); @@ -685,6 +714,8 @@ public Builder from(InvoiceLineItem other) { quantity(other.getQuantity()); totalAmount(other.getTotalAmount()); employee(other.getEmployee()); + project(other.getProject()); + contact(other.getContact()); currency(other.getCurrency()); exchangeRate(other.getExchangeRate()); item(other.getItem()); @@ -710,6 +741,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -721,6 +755,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -732,6 +769,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -743,6 +783,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The line item's description.

    + */ @JsonSetter(value = "description", nulls = Nulls.SKIP) public Builder description(Optional description) { this.description = description; @@ -754,6 +797,9 @@ public Builder description(String description) { return this; } + /** + *

    The line item's unit price.

    + */ @JsonSetter(value = "unit_price", nulls = Nulls.SKIP) public Builder unitPrice(Optional unitPrice) { this.unitPrice = unitPrice; @@ -765,6 +811,9 @@ public Builder unitPrice(Double unitPrice) { return this; } + /** + *

    The line item's quantity.

    + */ @JsonSetter(value = "quantity", nulls = Nulls.SKIP) public Builder quantity(Optional quantity) { this.quantity = quantity; @@ -776,6 +825,9 @@ public Builder quantity(Double quantity) { return this; } + /** + *

    The line item's total amount.

    + */ @JsonSetter(value = "total_amount", nulls = Nulls.SKIP) public Builder totalAmount(Optional totalAmount) { this.totalAmount = totalAmount; @@ -787,6 +839,9 @@ public Builder totalAmount(Double totalAmount) { return this; } + /** + *

    The employee this overall transaction relates to.

    + */ @JsonSetter(value = "employee", nulls = Nulls.SKIP) public Builder employee(Optional employee) { this.employee = employee; @@ -798,17 +853,356 @@ public Builder employee(InvoiceLineItemEmployee employee) { return this; } + @JsonSetter(value = "project", nulls = Nulls.SKIP) + public Builder project(Optional project) { + this.project = project; + return this; + } + + public Builder project(InvoiceLineItemProject project) { + this.project = Optional.ofNullable(project); + return this; + } + + /** + *

    The invoice's contact.

    + */ + @JsonSetter(value = "contact", nulls = Nulls.SKIP) + public Builder contact(Optional contact) { + this.contact = contact; + return this; + } + + public Builder contact(InvoiceLineItemContact contact) { + this.contact = Optional.ofNullable(contact); + return this; + } + + /** + *

    The line item's currency.

    + *
      + *
    • XUA - ADB Unit of Account
    • + *
    • AFN - Afghan Afghani
    • + *
    • AFA - Afghan Afghani (1927–2002)
    • + *
    • ALL - Albanian Lek
    • + *
    • ALK - Albanian Lek (1946–1965)
    • + *
    • DZD - Algerian Dinar
    • + *
    • ADP - Andorran Peseta
    • + *
    • AOA - Angolan Kwanza
    • + *
    • AOK - Angolan Kwanza (1977–1991)
    • + *
    • AON - Angolan New Kwanza (1990–2000)
    • + *
    • AOR - Angolan Readjusted Kwanza (1995–1999)
    • + *
    • ARA - Argentine Austral
    • + *
    • ARS - Argentine Peso
    • + *
    • ARM - Argentine Peso (1881–1970)
    • + *
    • ARP - Argentine Peso (1983–1985)
    • + *
    • ARL - Argentine Peso Ley (1970–1983)
    • + *
    • AMD - Armenian Dram
    • + *
    • AWG - Aruban Florin
    • + *
    • AUD - Australian Dollar
    • + *
    • ATS - Austrian Schilling
    • + *
    • AZN - Azerbaijani Manat
    • + *
    • AZM - Azerbaijani Manat (1993–2006)
    • + *
    • BSD - Bahamian Dollar
    • + *
    • BHD - Bahraini Dinar
    • + *
    • BDT - Bangladeshi Taka
    • + *
    • BBD - Barbadian Dollar
    • + *
    • BYN - Belarusian Ruble
    • + *
    • BYB - Belarusian Ruble (1994–1999)
    • + *
    • BYR - Belarusian Ruble (2000–2016)
    • + *
    • BEF - Belgian Franc
    • + *
    • BEC - Belgian Franc (convertible)
    • + *
    • BEL - Belgian Franc (financial)
    • + *
    • BZD - Belize Dollar
    • + *
    • BMD - Bermudan Dollar
    • + *
    • BTN - Bhutanese Ngultrum
    • + *
    • BOB - Bolivian Boliviano
    • + *
    • BOL - Bolivian Boliviano (1863–1963)
    • + *
    • BOV - Bolivian Mvdol
    • + *
    • BOP - Bolivian Peso
    • + *
    • BAM - Bosnia-Herzegovina Convertible Mark
    • + *
    • BAD - Bosnia-Herzegovina Dinar (1992–1994)
    • + *
    • BAN - Bosnia-Herzegovina New Dinar (1994–1997)
    • + *
    • BWP - Botswanan Pula
    • + *
    • BRC - Brazilian Cruzado (1986–1989)
    • + *
    • BRZ - Brazilian Cruzeiro (1942–1967)
    • + *
    • BRE - Brazilian Cruzeiro (1990–1993)
    • + *
    • BRR - Brazilian Cruzeiro (1993–1994)
    • + *
    • BRN - Brazilian New Cruzado (1989–1990)
    • + *
    • BRB - Brazilian New Cruzeiro (1967–1986)
    • + *
    • BRL - Brazilian Real
    • + *
    • GBP - British Pound
    • + *
    • BND - Brunei Dollar
    • + *
    • BGL - Bulgarian Hard Lev
    • + *
    • BGN - Bulgarian Lev
    • + *
    • BGO - Bulgarian Lev (1879–1952)
    • + *
    • BGM - Bulgarian Socialist Lev
    • + *
    • BUK - Burmese Kyat
    • + *
    • BIF - Burundian Franc
    • + *
    • XPF - CFP Franc
    • + *
    • KHR - Cambodian Riel
    • + *
    • CAD - Canadian Dollar
    • + *
    • CVE - Cape Verdean Escudo
    • + *
    • KYD - Cayman Islands Dollar
    • + *
    • XAF - Central African CFA Franc
    • + *
    • CLE - Chilean Escudo
    • + *
    • CLP - Chilean Peso
    • + *
    • CLF - Chilean Unit of Account (UF)
    • + *
    • CNX - Chinese People’s Bank Dollar
    • + *
    • CNY - Chinese Yuan
    • + *
    • CNH - Chinese Yuan (offshore)
    • + *
    • COP - Colombian Peso
    • + *
    • COU - Colombian Real Value Unit
    • + *
    • KMF - Comorian Franc
    • + *
    • CDF - Congolese Franc
    • + *
    • CRC - Costa Rican Colón
    • + *
    • HRD - Croatian Dinar
    • + *
    • HRK - Croatian Kuna
    • + *
    • CUC - Cuban Convertible Peso
    • + *
    • CUP - Cuban Peso
    • + *
    • CYP - Cypriot Pound
    • + *
    • CZK - Czech Koruna
    • + *
    • CSK - Czechoslovak Hard Koruna
    • + *
    • DKK - Danish Krone
    • + *
    • DJF - Djiboutian Franc
    • + *
    • DOP - Dominican Peso
    • + *
    • NLG - Dutch Guilder
    • + *
    • XCD - East Caribbean Dollar
    • + *
    • DDM - East German Mark
    • + *
    • ECS - Ecuadorian Sucre
    • + *
    • ECV - Ecuadorian Unit of Constant Value
    • + *
    • EGP - Egyptian Pound
    • + *
    • GQE - Equatorial Guinean Ekwele
    • + *
    • ERN - Eritrean Nakfa
    • + *
    • EEK - Estonian Kroon
    • + *
    • ETB - Ethiopian Birr
    • + *
    • EUR - Euro
    • + *
    • XBA - European Composite Unit
    • + *
    • XEU - European Currency Unit
    • + *
    • XBB - European Monetary Unit
    • + *
    • XBC - European Unit of Account (XBC)
    • + *
    • XBD - European Unit of Account (XBD)
    • + *
    • FKP - Falkland Islands Pound
    • + *
    • FJD - Fijian Dollar
    • + *
    • FIM - Finnish Markka
    • + *
    • FRF - French Franc
    • + *
    • XFO - French Gold Franc
    • + *
    • XFU - French UIC-Franc
    • + *
    • GMD - Gambian Dalasi
    • + *
    • GEK - Georgian Kupon Larit
    • + *
    • GEL - Georgian Lari
    • + *
    • DEM - German Mark
    • + *
    • GHS - Ghanaian Cedi
    • + *
    • GHC - Ghanaian Cedi (1979–2007)
    • + *
    • GIP - Gibraltar Pound
    • + *
    • XAU - Gold
    • + *
    • GRD - Greek Drachma
    • + *
    • GTQ - Guatemalan Quetzal
    • + *
    • GWP - Guinea-Bissau Peso
    • + *
    • GNF - Guinean Franc
    • + *
    • GNS - Guinean Syli
    • + *
    • GYD - Guyanaese Dollar
    • + *
    • HTG - Haitian Gourde
    • + *
    • HNL - Honduran Lempira
    • + *
    • HKD - Hong Kong Dollar
    • + *
    • HUF - Hungarian Forint
    • + *
    • IMP - IMP
    • + *
    • ISK - Icelandic Króna
    • + *
    • ISJ - Icelandic Króna (1918–1981)
    • + *
    • INR - Indian Rupee
    • + *
    • IDR - Indonesian Rupiah
    • + *
    • IRR - Iranian Rial
    • + *
    • IQD - Iraqi Dinar
    • + *
    • IEP - Irish Pound
    • + *
    • ILS - Israeli New Shekel
    • + *
    • ILP - Israeli Pound
    • + *
    • ILR - Israeli Shekel (1980–1985)
    • + *
    • ITL - Italian Lira
    • + *
    • JMD - Jamaican Dollar
    • + *
    • JPY - Japanese Yen
    • + *
    • JOD - Jordanian Dinar
    • + *
    • KZT - Kazakhstani Tenge
    • + *
    • KES - Kenyan Shilling
    • + *
    • KWD - Kuwaiti Dinar
    • + *
    • KGS - Kyrgystani Som
    • + *
    • LAK - Laotian Kip
    • + *
    • LVL - Latvian Lats
    • + *
    • LVR - Latvian Ruble
    • + *
    • LBP - Lebanese Pound
    • + *
    • LSL - Lesotho Loti
    • + *
    • LRD - Liberian Dollar
    • + *
    • LYD - Libyan Dinar
    • + *
    • LTL - Lithuanian Litas
    • + *
    • LTT - Lithuanian Talonas
    • + *
    • LUL - Luxembourg Financial Franc
    • + *
    • LUC - Luxembourgian Convertible Franc
    • + *
    • LUF - Luxembourgian Franc
    • + *
    • MOP - Macanese Pataca
    • + *
    • MKD - Macedonian Denar
    • + *
    • MKN - Macedonian Denar (1992–1993)
    • + *
    • MGA - Malagasy Ariary
    • + *
    • MGF - Malagasy Franc
    • + *
    • MWK - Malawian Kwacha
    • + *
    • MYR - Malaysian Ringgit
    • + *
    • MVR - Maldivian Rufiyaa
    • + *
    • MVP - Maldivian Rupee (1947–1981)
    • + *
    • MLF - Malian Franc
    • + *
    • MTL - Maltese Lira
    • + *
    • MTP - Maltese Pound
    • + *
    • MRU - Mauritanian Ouguiya
    • + *
    • MRO - Mauritanian Ouguiya (1973–2017)
    • + *
    • MUR - Mauritian Rupee
    • + *
    • MXV - Mexican Investment Unit
    • + *
    • MXN - Mexican Peso
    • + *
    • MXP - Mexican Silver Peso (1861–1992)
    • + *
    • MDC - Moldovan Cupon
    • + *
    • MDL - Moldovan Leu
    • + *
    • MCF - Monegasque Franc
    • + *
    • MNT - Mongolian Tugrik
    • + *
    • MAD - Moroccan Dirham
    • + *
    • MAF - Moroccan Franc
    • + *
    • MZE - Mozambican Escudo
    • + *
    • MZN - Mozambican Metical
    • + *
    • MZM - Mozambican Metical (1980–2006)
    • + *
    • MMK - Myanmar Kyat
    • + *
    • NAD - Namibian Dollar
    • + *
    • NPR - Nepalese Rupee
    • + *
    • ANG - Netherlands Antillean Guilder
    • + *
    • TWD - New Taiwan Dollar
    • + *
    • NZD - New Zealand Dollar
    • + *
    • NIO - Nicaraguan Córdoba
    • + *
    • NIC - Nicaraguan Córdoba (1988–1991)
    • + *
    • NGN - Nigerian Naira
    • + *
    • KPW - North Korean Won
    • + *
    • NOK - Norwegian Krone
    • + *
    • OMR - Omani Rial
    • + *
    • PKR - Pakistani Rupee
    • + *
    • XPD - Palladium
    • + *
    • PAB - Panamanian Balboa
    • + *
    • PGK - Papua New Guinean Kina
    • + *
    • PYG - Paraguayan Guarani
    • + *
    • PEI - Peruvian Inti
    • + *
    • PEN - Peruvian Sol
    • + *
    • PES - Peruvian Sol (1863–1965)
    • + *
    • PHP - Philippine Peso
    • + *
    • XPT - Platinum
    • + *
    • PLN - Polish Zloty
    • + *
    • PLZ - Polish Zloty (1950–1995)
    • + *
    • PTE - Portuguese Escudo
    • + *
    • GWE - Portuguese Guinea Escudo
    • + *
    • QAR - Qatari Rial
    • + *
    • XRE - RINET Funds
    • + *
    • RHD - Rhodesian Dollar
    • + *
    • RON - Romanian Leu
    • + *
    • ROL - Romanian Leu (1952–2006)
    • + *
    • RUB - Russian Ruble
    • + *
    • RUR - Russian Ruble (1991–1998)
    • + *
    • RWF - Rwandan Franc
    • + *
    • SVC - Salvadoran Colón
    • + *
    • WST - Samoan Tala
    • + *
    • SAR - Saudi Riyal
    • + *
    • RSD - Serbian Dinar
    • + *
    • CSD - Serbian Dinar (2002–2006)
    • + *
    • SCR - Seychellois Rupee
    • + *
    • SLL - Sierra Leonean Leone
    • + *
    • XAG - Silver
    • + *
    • SGD - Singapore Dollar
    • + *
    • SKK - Slovak Koruna
    • + *
    • SIT - Slovenian Tolar
    • + *
    • SBD - Solomon Islands Dollar
    • + *
    • SOS - Somali Shilling
    • + *
    • ZAR - South African Rand
    • + *
    • ZAL - South African Rand (financial)
    • + *
    • KRH - South Korean Hwan (1953–1962)
    • + *
    • KRW - South Korean Won
    • + *
    • KRO - South Korean Won (1945–1953)
    • + *
    • SSP - South Sudanese Pound
    • + *
    • SUR - Soviet Rouble
    • + *
    • ESP - Spanish Peseta
    • + *
    • ESA - Spanish Peseta (A account)
    • + *
    • ESB - Spanish Peseta (convertible account)
    • + *
    • XDR - Special Drawing Rights
    • + *
    • LKR - Sri Lankan Rupee
    • + *
    • SHP - St. Helena Pound
    • + *
    • XSU - Sucre
    • + *
    • SDD - Sudanese Dinar (1992–2007)
    • + *
    • SDG - Sudanese Pound
    • + *
    • SDP - Sudanese Pound (1957–1998)
    • + *
    • SRD - Surinamese Dollar
    • + *
    • SRG - Surinamese Guilder
    • + *
    • SZL - Swazi Lilangeni
    • + *
    • SEK - Swedish Krona
    • + *
    • CHF - Swiss Franc
    • + *
    • SYP - Syrian Pound
    • + *
    • STN - São Tomé & Príncipe Dobra
    • + *
    • STD - São Tomé & Príncipe Dobra (1977–2017)
    • + *
    • TVD - TVD
    • + *
    • TJR - Tajikistani Ruble
    • + *
    • TJS - Tajikistani Somoni
    • + *
    • TZS - Tanzanian Shilling
    • + *
    • XTS - Testing Currency Code
    • + *
    • THB - Thai Baht
    • + *
    • XXX - The codes assigned for transactions where no currency is involved
    • + *
    • TPE - Timorese Escudo
    • + *
    • TOP - Tongan Paʻanga
    • + *
    • TTD - Trinidad & Tobago Dollar
    • + *
    • TND - Tunisian Dinar
    • + *
    • TRY - Turkish Lira
    • + *
    • TRL - Turkish Lira (1922–2005)
    • + *
    • TMT - Turkmenistani Manat
    • + *
    • TMM - Turkmenistani Manat (1993–2009)
    • + *
    • USD - US Dollar
    • + *
    • USN - US Dollar (Next day)
    • + *
    • USS - US Dollar (Same day)
    • + *
    • UGX - Ugandan Shilling
    • + *
    • UGS - Ugandan Shilling (1966–1987)
    • + *
    • UAH - Ukrainian Hryvnia
    • + *
    • UAK - Ukrainian Karbovanets
    • + *
    • AED - United Arab Emirates Dirham
    • + *
    • UYW - Uruguayan Nominal Wage Index Unit
    • + *
    • UYU - Uruguayan Peso
    • + *
    • UYP - Uruguayan Peso (1975–1993)
    • + *
    • UYI - Uruguayan Peso (Indexed Units)
    • + *
    • UZS - Uzbekistani Som
    • + *
    • VUV - Vanuatu Vatu
    • + *
    • VES - Venezuelan Bolívar
    • + *
    • VEB - Venezuelan Bolívar (1871–2008)
    • + *
    • VEF - Venezuelan Bolívar (2008–2018)
    • + *
    • VND - Vietnamese Dong
    • + *
    • VNN - Vietnamese Dong (1978–1985)
    • + *
    • CHE - WIR Euro
    • + *
    • CHW - WIR Franc
    • + *
    • XOF - West African CFA Franc
    • + *
    • YDD - Yemeni Dinar
    • + *
    • YER - Yemeni Rial
    • + *
    • YUN - Yugoslavian Convertible Dinar (1990–1992)
    • + *
    • YUD - Yugoslavian Hard Dinar (1966–1990)
    • + *
    • YUM - Yugoslavian New Dinar (1994–2002)
    • + *
    • YUR - Yugoslavian Reformed Dinar (1992–1993)
    • + *
    • ZWN - ZWN
    • + *
    • ZRN - Zairean New Zaire (1993–1998)
    • + *
    • ZRZ - Zairean Zaire (1971–1993)
    • + *
    • ZMW - Zambian Kwacha
    • + *
    • ZMK - Zambian Kwacha (1968–2012)
    • + *
    • ZWD - Zimbabwean Dollar (1980–2008)
    • + *
    • ZWR - Zimbabwean Dollar (2008)
    • + *
    • ZWL - Zimbabwean Dollar (2009)
    • + *
    + */ @JsonSetter(value = "currency", nulls = Nulls.SKIP) - public Builder currency(Optional currency) { + public Builder currency(Optional currency) { this.currency = currency; return this; } - public Builder currency(TransactionCurrencyEnum currency) { + public Builder currency(InvoiceLineItemCurrency currency) { this.currency = Optional.ofNullable(currency); return this; } + /** + *

    The line item's exchange rate.

    + */ @JsonSetter(value = "exchange_rate", nulls = Nulls.SKIP) public Builder exchangeRate(Optional exchangeRate) { this.exchangeRate = exchangeRate; @@ -842,6 +1236,9 @@ public Builder account(InvoiceLineItemAccount account) { return this; } + /** + *

    The tax rate that applies to this line item.

    + */ @JsonSetter(value = "tax_rate", nulls = Nulls.SKIP) public Builder taxRate(Optional taxRate) { this.taxRate = taxRate; @@ -864,6 +1261,9 @@ public Builder trackingCategory(InvoiceLineItemTrackingCategory trackingCategory return this; } + /** + *

    The invoice line item's associated tracking categories.

    + */ @JsonSetter(value = "tracking_categories", nulls = Nulls.SKIP) public Builder trackingCategories( Optional>> trackingCategories) { @@ -876,6 +1276,9 @@ public Builder trackingCategories(ListThe company the invoice belongs to.

    + */ @JsonSetter(value = "company", nulls = Nulls.SKIP) public Builder company(Optional company) { this.company = company; @@ -887,6 +1290,9 @@ public Builder company(String company) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; @@ -931,6 +1337,8 @@ public InvoiceLineItem build() { quantity, totalAmount, employee, + project, + contact, currency, exchangeRate, item, diff --git a/src/main/java/com/merge/api/accounting/types/InvoiceLineItemContact.java b/src/main/java/com/merge/api/accounting/types/InvoiceLineItemContact.java new file mode 100644 index 000000000..173d95935 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/InvoiceLineItemContact.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = InvoiceLineItemContact.Deserializer.class) +public final class InvoiceLineItemContact { + private final Object value; + + private final int type; + + private InvoiceLineItemContact(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((Contact) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof InvoiceLineItemContact && equalTo((InvoiceLineItemContact) other); + } + + private boolean equalTo(InvoiceLineItemContact other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static InvoiceLineItemContact of(String value) { + return new InvoiceLineItemContact(value, 0); + } + + public static InvoiceLineItemContact of(Contact value) { + return new InvoiceLineItemContact(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(Contact value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(InvoiceLineItemContact.class); + } + + @java.lang.Override + public InvoiceLineItemContact deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, Contact.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/InvoiceLineItemCurrency.java b/src/main/java/com/merge/api/accounting/types/InvoiceLineItemCurrency.java new file mode 100644 index 000000000..7d10ef117 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/InvoiceLineItemCurrency.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = InvoiceLineItemCurrency.Deserializer.class) +public final class InvoiceLineItemCurrency { + private final Object value; + + private final int type; + + private InvoiceLineItemCurrency(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((TransactionCurrencyEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof InvoiceLineItemCurrency && equalTo((InvoiceLineItemCurrency) other); + } + + private boolean equalTo(InvoiceLineItemCurrency other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static InvoiceLineItemCurrency of(TransactionCurrencyEnum value) { + return new InvoiceLineItemCurrency(value, 0); + } + + public static InvoiceLineItemCurrency of(String value) { + return new InvoiceLineItemCurrency(value, 1); + } + + public interface Visitor { + T visit(TransactionCurrencyEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(InvoiceLineItemCurrency.class); + } + + @java.lang.Override + public InvoiceLineItemCurrency deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TransactionCurrencyEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/InvoiceLineItemProject.java b/src/main/java/com/merge/api/accounting/types/InvoiceLineItemProject.java new file mode 100644 index 000000000..ff57e43d4 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/InvoiceLineItemProject.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = InvoiceLineItemProject.Deserializer.class) +public final class InvoiceLineItemProject { + private final Object value; + + private final int type; + + private InvoiceLineItemProject(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((Project) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof InvoiceLineItemProject && equalTo((InvoiceLineItemProject) other); + } + + private boolean equalTo(InvoiceLineItemProject other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static InvoiceLineItemProject of(String value) { + return new InvoiceLineItemProject(value, 0); + } + + public static InvoiceLineItemProject of(Project value) { + return new InvoiceLineItemProject(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(Project value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(InvoiceLineItemProject.class); + } + + @java.lang.Override + public InvoiceLineItemProject deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, Project.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/InvoiceLineItemRequest.java b/src/main/java/com/merge/api/accounting/types/InvoiceLineItemRequest.java index 6701e050c..7bcd76f72 100644 --- a/src/main/java/com/merge/api/accounting/types/InvoiceLineItemRequest.java +++ b/src/main/java/com/merge/api/accounting/types/InvoiceLineItemRequest.java @@ -34,7 +34,11 @@ public final class InvoiceLineItemRequest { private final Optional employee; - private final Optional currency; + private final Optional project; + + private final Optional contact; + + private final Optional currency; private final Optional exchangeRate; @@ -65,7 +69,9 @@ private InvoiceLineItemRequest( Optional quantity, Optional totalAmount, Optional employee, - Optional currency, + Optional project, + Optional contact, + Optional currency, Optional exchangeRate, Optional item, Optional account, @@ -83,6 +89,8 @@ private InvoiceLineItemRequest( this.quantity = quantity; this.totalAmount = totalAmount; this.employee = employee; + this.project = project; + this.contact = contact; this.currency = currency; this.exchangeRate = exchangeRate; this.item = item; @@ -145,6 +153,19 @@ public Optional getEmployee() { return employee; } + @JsonProperty("project") + public Optional getProject() { + return project; + } + + /** + * @return The invoice's contact. + */ + @JsonProperty("contact") + public Optional getContact() { + return contact; + } + /** * @return The line item's currency. *
      @@ -457,7 +478,7 @@ public Optional getEmployee() { *
    */ @JsonProperty("currency") - public Optional getCurrency() { + public Optional getCurrency() { return currency; } @@ -541,6 +562,8 @@ private boolean equalTo(InvoiceLineItemRequest other) { && quantity.equals(other.quantity) && totalAmount.equals(other.totalAmount) && employee.equals(other.employee) + && project.equals(other.project) + && contact.equals(other.contact) && currency.equals(other.currency) && exchangeRate.equals(other.exchangeRate) && item.equals(other.item) @@ -563,6 +586,8 @@ public int hashCode() { this.quantity, this.totalAmount, this.employee, + this.project, + this.contact, this.currency, this.exchangeRate, this.item, @@ -599,7 +624,11 @@ public static final class Builder { private Optional employee = Optional.empty(); - private Optional currency = Optional.empty(); + private Optional project = Optional.empty(); + + private Optional contact = Optional.empty(); + + private Optional currency = Optional.empty(); private Optional exchangeRate = Optional.empty(); @@ -634,6 +663,8 @@ public Builder from(InvoiceLineItemRequest other) { quantity(other.getQuantity()); totalAmount(other.getTotalAmount()); employee(other.getEmployee()); + project(other.getProject()); + contact(other.getContact()); currency(other.getCurrency()); exchangeRate(other.getExchangeRate()); item(other.getItem()); @@ -648,6 +679,9 @@ public Builder from(InvoiceLineItemRequest other) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -659,6 +693,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The line item's description.

    + */ @JsonSetter(value = "description", nulls = Nulls.SKIP) public Builder description(Optional description) { this.description = description; @@ -670,6 +707,9 @@ public Builder description(String description) { return this; } + /** + *

    The line item's unit price.

    + */ @JsonSetter(value = "unit_price", nulls = Nulls.SKIP) public Builder unitPrice(Optional unitPrice) { this.unitPrice = unitPrice; @@ -681,6 +721,9 @@ public Builder unitPrice(Double unitPrice) { return this; } + /** + *

    The line item's quantity.

    + */ @JsonSetter(value = "quantity", nulls = Nulls.SKIP) public Builder quantity(Optional quantity) { this.quantity = quantity; @@ -692,6 +735,9 @@ public Builder quantity(Double quantity) { return this; } + /** + *

    The line item's total amount.

    + */ @JsonSetter(value = "total_amount", nulls = Nulls.SKIP) public Builder totalAmount(Optional totalAmount) { this.totalAmount = totalAmount; @@ -703,6 +749,9 @@ public Builder totalAmount(Double totalAmount) { return this; } + /** + *

    The employee this overall transaction relates to.

    + */ @JsonSetter(value = "employee", nulls = Nulls.SKIP) public Builder employee(Optional employee) { this.employee = employee; @@ -714,17 +763,356 @@ public Builder employee(InvoiceLineItemRequestEmployee employee) { return this; } + @JsonSetter(value = "project", nulls = Nulls.SKIP) + public Builder project(Optional project) { + this.project = project; + return this; + } + + public Builder project(InvoiceLineItemRequestProject project) { + this.project = Optional.ofNullable(project); + return this; + } + + /** + *

    The invoice's contact.

    + */ + @JsonSetter(value = "contact", nulls = Nulls.SKIP) + public Builder contact(Optional contact) { + this.contact = contact; + return this; + } + + public Builder contact(InvoiceLineItemRequestContact contact) { + this.contact = Optional.ofNullable(contact); + return this; + } + + /** + *

    The line item's currency.

    + *
      + *
    • XUA - ADB Unit of Account
    • + *
    • AFN - Afghan Afghani
    • + *
    • AFA - Afghan Afghani (1927–2002)
    • + *
    • ALL - Albanian Lek
    • + *
    • ALK - Albanian Lek (1946–1965)
    • + *
    • DZD - Algerian Dinar
    • + *
    • ADP - Andorran Peseta
    • + *
    • AOA - Angolan Kwanza
    • + *
    • AOK - Angolan Kwanza (1977–1991)
    • + *
    • AON - Angolan New Kwanza (1990–2000)
    • + *
    • AOR - Angolan Readjusted Kwanza (1995–1999)
    • + *
    • ARA - Argentine Austral
    • + *
    • ARS - Argentine Peso
    • + *
    • ARM - Argentine Peso (1881–1970)
    • + *
    • ARP - Argentine Peso (1983–1985)
    • + *
    • ARL - Argentine Peso Ley (1970–1983)
    • + *
    • AMD - Armenian Dram
    • + *
    • AWG - Aruban Florin
    • + *
    • AUD - Australian Dollar
    • + *
    • ATS - Austrian Schilling
    • + *
    • AZN - Azerbaijani Manat
    • + *
    • AZM - Azerbaijani Manat (1993–2006)
    • + *
    • BSD - Bahamian Dollar
    • + *
    • BHD - Bahraini Dinar
    • + *
    • BDT - Bangladeshi Taka
    • + *
    • BBD - Barbadian Dollar
    • + *
    • BYN - Belarusian Ruble
    • + *
    • BYB - Belarusian Ruble (1994–1999)
    • + *
    • BYR - Belarusian Ruble (2000–2016)
    • + *
    • BEF - Belgian Franc
    • + *
    • BEC - Belgian Franc (convertible)
    • + *
    • BEL - Belgian Franc (financial)
    • + *
    • BZD - Belize Dollar
    • + *
    • BMD - Bermudan Dollar
    • + *
    • BTN - Bhutanese Ngultrum
    • + *
    • BOB - Bolivian Boliviano
    • + *
    • BOL - Bolivian Boliviano (1863–1963)
    • + *
    • BOV - Bolivian Mvdol
    • + *
    • BOP - Bolivian Peso
    • + *
    • BAM - Bosnia-Herzegovina Convertible Mark
    • + *
    • BAD - Bosnia-Herzegovina Dinar (1992–1994)
    • + *
    • BAN - Bosnia-Herzegovina New Dinar (1994–1997)
    • + *
    • BWP - Botswanan Pula
    • + *
    • BRC - Brazilian Cruzado (1986–1989)
    • + *
    • BRZ - Brazilian Cruzeiro (1942–1967)
    • + *
    • BRE - Brazilian Cruzeiro (1990–1993)
    • + *
    • BRR - Brazilian Cruzeiro (1993–1994)
    • + *
    • BRN - Brazilian New Cruzado (1989–1990)
    • + *
    • BRB - Brazilian New Cruzeiro (1967–1986)
    • + *
    • BRL - Brazilian Real
    • + *
    • GBP - British Pound
    • + *
    • BND - Brunei Dollar
    • + *
    • BGL - Bulgarian Hard Lev
    • + *
    • BGN - Bulgarian Lev
    • + *
    • BGO - Bulgarian Lev (1879–1952)
    • + *
    • BGM - Bulgarian Socialist Lev
    • + *
    • BUK - Burmese Kyat
    • + *
    • BIF - Burundian Franc
    • + *
    • XPF - CFP Franc
    • + *
    • KHR - Cambodian Riel
    • + *
    • CAD - Canadian Dollar
    • + *
    • CVE - Cape Verdean Escudo
    • + *
    • KYD - Cayman Islands Dollar
    • + *
    • XAF - Central African CFA Franc
    • + *
    • CLE - Chilean Escudo
    • + *
    • CLP - Chilean Peso
    • + *
    • CLF - Chilean Unit of Account (UF)
    • + *
    • CNX - Chinese People’s Bank Dollar
    • + *
    • CNY - Chinese Yuan
    • + *
    • CNH - Chinese Yuan (offshore)
    • + *
    • COP - Colombian Peso
    • + *
    • COU - Colombian Real Value Unit
    • + *
    • KMF - Comorian Franc
    • + *
    • CDF - Congolese Franc
    • + *
    • CRC - Costa Rican Colón
    • + *
    • HRD - Croatian Dinar
    • + *
    • HRK - Croatian Kuna
    • + *
    • CUC - Cuban Convertible Peso
    • + *
    • CUP - Cuban Peso
    • + *
    • CYP - Cypriot Pound
    • + *
    • CZK - Czech Koruna
    • + *
    • CSK - Czechoslovak Hard Koruna
    • + *
    • DKK - Danish Krone
    • + *
    • DJF - Djiboutian Franc
    • + *
    • DOP - Dominican Peso
    • + *
    • NLG - Dutch Guilder
    • + *
    • XCD - East Caribbean Dollar
    • + *
    • DDM - East German Mark
    • + *
    • ECS - Ecuadorian Sucre
    • + *
    • ECV - Ecuadorian Unit of Constant Value
    • + *
    • EGP - Egyptian Pound
    • + *
    • GQE - Equatorial Guinean Ekwele
    • + *
    • ERN - Eritrean Nakfa
    • + *
    • EEK - Estonian Kroon
    • + *
    • ETB - Ethiopian Birr
    • + *
    • EUR - Euro
    • + *
    • XBA - European Composite Unit
    • + *
    • XEU - European Currency Unit
    • + *
    • XBB - European Monetary Unit
    • + *
    • XBC - European Unit of Account (XBC)
    • + *
    • XBD - European Unit of Account (XBD)
    • + *
    • FKP - Falkland Islands Pound
    • + *
    • FJD - Fijian Dollar
    • + *
    • FIM - Finnish Markka
    • + *
    • FRF - French Franc
    • + *
    • XFO - French Gold Franc
    • + *
    • XFU - French UIC-Franc
    • + *
    • GMD - Gambian Dalasi
    • + *
    • GEK - Georgian Kupon Larit
    • + *
    • GEL - Georgian Lari
    • + *
    • DEM - German Mark
    • + *
    • GHS - Ghanaian Cedi
    • + *
    • GHC - Ghanaian Cedi (1979–2007)
    • + *
    • GIP - Gibraltar Pound
    • + *
    • XAU - Gold
    • + *
    • GRD - Greek Drachma
    • + *
    • GTQ - Guatemalan Quetzal
    • + *
    • GWP - Guinea-Bissau Peso
    • + *
    • GNF - Guinean Franc
    • + *
    • GNS - Guinean Syli
    • + *
    • GYD - Guyanaese Dollar
    • + *
    • HTG - Haitian Gourde
    • + *
    • HNL - Honduran Lempira
    • + *
    • HKD - Hong Kong Dollar
    • + *
    • HUF - Hungarian Forint
    • + *
    • IMP - IMP
    • + *
    • ISK - Icelandic Króna
    • + *
    • ISJ - Icelandic Króna (1918–1981)
    • + *
    • INR - Indian Rupee
    • + *
    • IDR - Indonesian Rupiah
    • + *
    • IRR - Iranian Rial
    • + *
    • IQD - Iraqi Dinar
    • + *
    • IEP - Irish Pound
    • + *
    • ILS - Israeli New Shekel
    • + *
    • ILP - Israeli Pound
    • + *
    • ILR - Israeli Shekel (1980–1985)
    • + *
    • ITL - Italian Lira
    • + *
    • JMD - Jamaican Dollar
    • + *
    • JPY - Japanese Yen
    • + *
    • JOD - Jordanian Dinar
    • + *
    • KZT - Kazakhstani Tenge
    • + *
    • KES - Kenyan Shilling
    • + *
    • KWD - Kuwaiti Dinar
    • + *
    • KGS - Kyrgystani Som
    • + *
    • LAK - Laotian Kip
    • + *
    • LVL - Latvian Lats
    • + *
    • LVR - Latvian Ruble
    • + *
    • LBP - Lebanese Pound
    • + *
    • LSL - Lesotho Loti
    • + *
    • LRD - Liberian Dollar
    • + *
    • LYD - Libyan Dinar
    • + *
    • LTL - Lithuanian Litas
    • + *
    • LTT - Lithuanian Talonas
    • + *
    • LUL - Luxembourg Financial Franc
    • + *
    • LUC - Luxembourgian Convertible Franc
    • + *
    • LUF - Luxembourgian Franc
    • + *
    • MOP - Macanese Pataca
    • + *
    • MKD - Macedonian Denar
    • + *
    • MKN - Macedonian Denar (1992–1993)
    • + *
    • MGA - Malagasy Ariary
    • + *
    • MGF - Malagasy Franc
    • + *
    • MWK - Malawian Kwacha
    • + *
    • MYR - Malaysian Ringgit
    • + *
    • MVR - Maldivian Rufiyaa
    • + *
    • MVP - Maldivian Rupee (1947–1981)
    • + *
    • MLF - Malian Franc
    • + *
    • MTL - Maltese Lira
    • + *
    • MTP - Maltese Pound
    • + *
    • MRU - Mauritanian Ouguiya
    • + *
    • MRO - Mauritanian Ouguiya (1973–2017)
    • + *
    • MUR - Mauritian Rupee
    • + *
    • MXV - Mexican Investment Unit
    • + *
    • MXN - Mexican Peso
    • + *
    • MXP - Mexican Silver Peso (1861–1992)
    • + *
    • MDC - Moldovan Cupon
    • + *
    • MDL - Moldovan Leu
    • + *
    • MCF - Monegasque Franc
    • + *
    • MNT - Mongolian Tugrik
    • + *
    • MAD - Moroccan Dirham
    • + *
    • MAF - Moroccan Franc
    • + *
    • MZE - Mozambican Escudo
    • + *
    • MZN - Mozambican Metical
    • + *
    • MZM - Mozambican Metical (1980–2006)
    • + *
    • MMK - Myanmar Kyat
    • + *
    • NAD - Namibian Dollar
    • + *
    • NPR - Nepalese Rupee
    • + *
    • ANG - Netherlands Antillean Guilder
    • + *
    • TWD - New Taiwan Dollar
    • + *
    • NZD - New Zealand Dollar
    • + *
    • NIO - Nicaraguan Córdoba
    • + *
    • NIC - Nicaraguan Córdoba (1988–1991)
    • + *
    • NGN - Nigerian Naira
    • + *
    • KPW - North Korean Won
    • + *
    • NOK - Norwegian Krone
    • + *
    • OMR - Omani Rial
    • + *
    • PKR - Pakistani Rupee
    • + *
    • XPD - Palladium
    • + *
    • PAB - Panamanian Balboa
    • + *
    • PGK - Papua New Guinean Kina
    • + *
    • PYG - Paraguayan Guarani
    • + *
    • PEI - Peruvian Inti
    • + *
    • PEN - Peruvian Sol
    • + *
    • PES - Peruvian Sol (1863–1965)
    • + *
    • PHP - Philippine Peso
    • + *
    • XPT - Platinum
    • + *
    • PLN - Polish Zloty
    • + *
    • PLZ - Polish Zloty (1950–1995)
    • + *
    • PTE - Portuguese Escudo
    • + *
    • GWE - Portuguese Guinea Escudo
    • + *
    • QAR - Qatari Rial
    • + *
    • XRE - RINET Funds
    • + *
    • RHD - Rhodesian Dollar
    • + *
    • RON - Romanian Leu
    • + *
    • ROL - Romanian Leu (1952–2006)
    • + *
    • RUB - Russian Ruble
    • + *
    • RUR - Russian Ruble (1991–1998)
    • + *
    • RWF - Rwandan Franc
    • + *
    • SVC - Salvadoran Colón
    • + *
    • WST - Samoan Tala
    • + *
    • SAR - Saudi Riyal
    • + *
    • RSD - Serbian Dinar
    • + *
    • CSD - Serbian Dinar (2002–2006)
    • + *
    • SCR - Seychellois Rupee
    • + *
    • SLL - Sierra Leonean Leone
    • + *
    • XAG - Silver
    • + *
    • SGD - Singapore Dollar
    • + *
    • SKK - Slovak Koruna
    • + *
    • SIT - Slovenian Tolar
    • + *
    • SBD - Solomon Islands Dollar
    • + *
    • SOS - Somali Shilling
    • + *
    • ZAR - South African Rand
    • + *
    • ZAL - South African Rand (financial)
    • + *
    • KRH - South Korean Hwan (1953–1962)
    • + *
    • KRW - South Korean Won
    • + *
    • KRO - South Korean Won (1945–1953)
    • + *
    • SSP - South Sudanese Pound
    • + *
    • SUR - Soviet Rouble
    • + *
    • ESP - Spanish Peseta
    • + *
    • ESA - Spanish Peseta (A account)
    • + *
    • ESB - Spanish Peseta (convertible account)
    • + *
    • XDR - Special Drawing Rights
    • + *
    • LKR - Sri Lankan Rupee
    • + *
    • SHP - St. Helena Pound
    • + *
    • XSU - Sucre
    • + *
    • SDD - Sudanese Dinar (1992–2007)
    • + *
    • SDG - Sudanese Pound
    • + *
    • SDP - Sudanese Pound (1957–1998)
    • + *
    • SRD - Surinamese Dollar
    • + *
    • SRG - Surinamese Guilder
    • + *
    • SZL - Swazi Lilangeni
    • + *
    • SEK - Swedish Krona
    • + *
    • CHF - Swiss Franc
    • + *
    • SYP - Syrian Pound
    • + *
    • STN - São Tomé & Príncipe Dobra
    • + *
    • STD - São Tomé & Príncipe Dobra (1977–2017)
    • + *
    • TVD - TVD
    • + *
    • TJR - Tajikistani Ruble
    • + *
    • TJS - Tajikistani Somoni
    • + *
    • TZS - Tanzanian Shilling
    • + *
    • XTS - Testing Currency Code
    • + *
    • THB - Thai Baht
    • + *
    • XXX - The codes assigned for transactions where no currency is involved
    • + *
    • TPE - Timorese Escudo
    • + *
    • TOP - Tongan Paʻanga
    • + *
    • TTD - Trinidad & Tobago Dollar
    • + *
    • TND - Tunisian Dinar
    • + *
    • TRY - Turkish Lira
    • + *
    • TRL - Turkish Lira (1922–2005)
    • + *
    • TMT - Turkmenistani Manat
    • + *
    • TMM - Turkmenistani Manat (1993–2009)
    • + *
    • USD - US Dollar
    • + *
    • USN - US Dollar (Next day)
    • + *
    • USS - US Dollar (Same day)
    • + *
    • UGX - Ugandan Shilling
    • + *
    • UGS - Ugandan Shilling (1966–1987)
    • + *
    • UAH - Ukrainian Hryvnia
    • + *
    • UAK - Ukrainian Karbovanets
    • + *
    • AED - United Arab Emirates Dirham
    • + *
    • UYW - Uruguayan Nominal Wage Index Unit
    • + *
    • UYU - Uruguayan Peso
    • + *
    • UYP - Uruguayan Peso (1975–1993)
    • + *
    • UYI - Uruguayan Peso (Indexed Units)
    • + *
    • UZS - Uzbekistani Som
    • + *
    • VUV - Vanuatu Vatu
    • + *
    • VES - Venezuelan Bolívar
    • + *
    • VEB - Venezuelan Bolívar (1871–2008)
    • + *
    • VEF - Venezuelan Bolívar (2008–2018)
    • + *
    • VND - Vietnamese Dong
    • + *
    • VNN - Vietnamese Dong (1978–1985)
    • + *
    • CHE - WIR Euro
    • + *
    • CHW - WIR Franc
    • + *
    • XOF - West African CFA Franc
    • + *
    • YDD - Yemeni Dinar
    • + *
    • YER - Yemeni Rial
    • + *
    • YUN - Yugoslavian Convertible Dinar (1990–1992)
    • + *
    • YUD - Yugoslavian Hard Dinar (1966–1990)
    • + *
    • YUM - Yugoslavian New Dinar (1994–2002)
    • + *
    • YUR - Yugoslavian Reformed Dinar (1992–1993)
    • + *
    • ZWN - ZWN
    • + *
    • ZRN - Zairean New Zaire (1993–1998)
    • + *
    • ZRZ - Zairean Zaire (1971–1993)
    • + *
    • ZMW - Zambian Kwacha
    • + *
    • ZMK - Zambian Kwacha (1968–2012)
    • + *
    • ZWD - Zimbabwean Dollar (1980–2008)
    • + *
    • ZWR - Zimbabwean Dollar (2008)
    • + *
    • ZWL - Zimbabwean Dollar (2009)
    • + *
    + */ @JsonSetter(value = "currency", nulls = Nulls.SKIP) - public Builder currency(Optional currency) { + public Builder currency(Optional currency) { this.currency = currency; return this; } - public Builder currency(TransactionCurrencyEnum currency) { + public Builder currency(InvoiceLineItemRequestCurrency currency) { this.currency = Optional.ofNullable(currency); return this; } + /** + *

    The line item's exchange rate.

    + */ @JsonSetter(value = "exchange_rate", nulls = Nulls.SKIP) public Builder exchangeRate(Optional exchangeRate) { this.exchangeRate = exchangeRate; @@ -758,6 +1146,9 @@ public Builder account(InvoiceLineItemRequestAccount account) { return this; } + /** + *

    The tax rate that applies to this line item.

    + */ @JsonSetter(value = "tax_rate", nulls = Nulls.SKIP) public Builder taxRate(Optional taxRate) { this.taxRate = taxRate; @@ -780,6 +1171,9 @@ public Builder trackingCategory(InvoiceLineItemRequestTrackingCategory trackingC return this; } + /** + *

    The invoice line item's associated tracking categories.

    + */ @JsonSetter(value = "tracking_categories", nulls = Nulls.SKIP) public Builder trackingCategories( Optional>> trackingCategories) { @@ -793,6 +1187,9 @@ public Builder trackingCategories( return this; } + /** + *

    The company the invoice belongs to.

    + */ @JsonSetter(value = "company", nulls = Nulls.SKIP) public Builder company(Optional company) { this.company = company; @@ -845,6 +1242,8 @@ public InvoiceLineItemRequest build() { quantity, totalAmount, employee, + project, + contact, currency, exchangeRate, item, diff --git a/src/main/java/com/merge/api/accounting/types/InvoiceLineItemRequestContact.java b/src/main/java/com/merge/api/accounting/types/InvoiceLineItemRequestContact.java new file mode 100644 index 000000000..ef0753db8 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/InvoiceLineItemRequestContact.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = InvoiceLineItemRequestContact.Deserializer.class) +public final class InvoiceLineItemRequestContact { + private final Object value; + + private final int type; + + private InvoiceLineItemRequestContact(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((Contact) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof InvoiceLineItemRequestContact && equalTo((InvoiceLineItemRequestContact) other); + } + + private boolean equalTo(InvoiceLineItemRequestContact other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static InvoiceLineItemRequestContact of(String value) { + return new InvoiceLineItemRequestContact(value, 0); + } + + public static InvoiceLineItemRequestContact of(Contact value) { + return new InvoiceLineItemRequestContact(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(Contact value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(InvoiceLineItemRequestContact.class); + } + + @java.lang.Override + public InvoiceLineItemRequestContact deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, Contact.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/InvoiceLineItemRequestCurrency.java b/src/main/java/com/merge/api/accounting/types/InvoiceLineItemRequestCurrency.java new file mode 100644 index 000000000..f5babd858 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/InvoiceLineItemRequestCurrency.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = InvoiceLineItemRequestCurrency.Deserializer.class) +public final class InvoiceLineItemRequestCurrency { + private final Object value; + + private final int type; + + private InvoiceLineItemRequestCurrency(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((TransactionCurrencyEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof InvoiceLineItemRequestCurrency && equalTo((InvoiceLineItemRequestCurrency) other); + } + + private boolean equalTo(InvoiceLineItemRequestCurrency other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static InvoiceLineItemRequestCurrency of(TransactionCurrencyEnum value) { + return new InvoiceLineItemRequestCurrency(value, 0); + } + + public static InvoiceLineItemRequestCurrency of(String value) { + return new InvoiceLineItemRequestCurrency(value, 1); + } + + public interface Visitor { + T visit(TransactionCurrencyEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(InvoiceLineItemRequestCurrency.class); + } + + @java.lang.Override + public InvoiceLineItemRequestCurrency deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TransactionCurrencyEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/InvoiceLineItemRequestProject.java b/src/main/java/com/merge/api/accounting/types/InvoiceLineItemRequestProject.java new file mode 100644 index 000000000..982469a90 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/InvoiceLineItemRequestProject.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = InvoiceLineItemRequestProject.Deserializer.class) +public final class InvoiceLineItemRequestProject { + private final Object value; + + private final int type; + + private InvoiceLineItemRequestProject(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((Project) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof InvoiceLineItemRequestProject && equalTo((InvoiceLineItemRequestProject) other); + } + + private boolean equalTo(InvoiceLineItemRequestProject other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static InvoiceLineItemRequestProject of(String value) { + return new InvoiceLineItemRequestProject(value, 0); + } + + public static InvoiceLineItemRequestProject of(Project value) { + return new InvoiceLineItemRequestProject(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(Project value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(InvoiceLineItemRequestProject.class); + } + + @java.lang.Override + public InvoiceLineItemRequestProject deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, Project.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/InvoiceRequest.java b/src/main/java/com/merge/api/accounting/types/InvoiceRequest.java index 389148ccc..4a0ca35e5 100644 --- a/src/main/java/com/merge/api/accounting/types/InvoiceRequest.java +++ b/src/main/java/com/merge/api/accounting/types/InvoiceRequest.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = InvoiceRequest.Builder.class) public final class InvoiceRequest { - private final Optional type; + private final Optional type; private final Optional contact; @@ -39,11 +39,11 @@ public final class InvoiceRequest { private final Optional memo; - private final Optional status; + private final Optional status; private final Optional company; - private final Optional currency; + private final Optional currency; private final Optional exchangeRate; @@ -78,7 +78,7 @@ public final class InvoiceRequest { private final Map additionalProperties; private InvoiceRequest( - Optional type, + Optional type, Optional contact, Optional number, Optional issueDate, @@ -86,9 +86,9 @@ private InvoiceRequest( Optional paidOnDate, Optional employee, Optional memo, - Optional status, + Optional status, Optional company, - Optional currency, + Optional currency, Optional exchangeRate, Optional totalDiscount, Optional subTotal, @@ -142,7 +142,7 @@ private InvoiceRequest( * */ @JsonProperty("type") - public Optional getType() { + public Optional getType() { return type; } @@ -214,7 +214,7 @@ public Optional getMemo() { * */ @JsonProperty("status") - public Optional getStatus() { + public Optional getStatus() { return status; } @@ -538,7 +538,7 @@ public Optional getCompany() { * */ @JsonProperty("currency") - public Optional getCurrency() { + public Optional getCurrency() { return currency; } @@ -726,7 +726,7 @@ public static Builder builder() { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder { - private Optional type = Optional.empty(); + private Optional type = Optional.empty(); private Optional contact = Optional.empty(); @@ -742,11 +742,11 @@ public static final class Builder { private Optional memo = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Optional company = Optional.empty(); - private Optional currency = Optional.empty(); + private Optional currency = Optional.empty(); private Optional exchangeRate = Optional.empty(); @@ -813,17 +813,27 @@ public Builder from(InvoiceRequest other) { return this; } + /** + *

    Whether the invoice is an accounts receivable or accounts payable. If type is ACCOUNTS_PAYABLE, the invoice is a bill. If type is ACCOUNTS_RECEIVABLE, it is an invoice.

    + *
      + *
    • ACCOUNTS_RECEIVABLE - ACCOUNTS_RECEIVABLE
    • + *
    • ACCOUNTS_PAYABLE - ACCOUNTS_PAYABLE
    • + *
    + */ @JsonSetter(value = "type", nulls = Nulls.SKIP) - public Builder type(Optional type) { + public Builder type(Optional type) { this.type = type; return this; } - public Builder type(InvoiceTypeEnum type) { + public Builder type(InvoiceRequestType type) { this.type = Optional.ofNullable(type); return this; } + /** + *

    The invoice's contact.

    + */ @JsonSetter(value = "contact", nulls = Nulls.SKIP) public Builder contact(Optional contact) { this.contact = contact; @@ -835,6 +845,9 @@ public Builder contact(InvoiceRequestContact contact) { return this; } + /** + *

    The invoice's number.

    + */ @JsonSetter(value = "number", nulls = Nulls.SKIP) public Builder number(Optional number) { this.number = number; @@ -846,6 +859,9 @@ public Builder number(String number) { return this; } + /** + *

    The invoice's issue date.

    + */ @JsonSetter(value = "issue_date", nulls = Nulls.SKIP) public Builder issueDate(Optional issueDate) { this.issueDate = issueDate; @@ -857,6 +873,9 @@ public Builder issueDate(OffsetDateTime issueDate) { return this; } + /** + *

    The invoice's due date.

    + */ @JsonSetter(value = "due_date", nulls = Nulls.SKIP) public Builder dueDate(Optional dueDate) { this.dueDate = dueDate; @@ -868,6 +887,9 @@ public Builder dueDate(OffsetDateTime dueDate) { return this; } + /** + *

    The invoice's paid date.

    + */ @JsonSetter(value = "paid_on_date", nulls = Nulls.SKIP) public Builder paidOnDate(Optional paidOnDate) { this.paidOnDate = paidOnDate; @@ -879,6 +901,9 @@ public Builder paidOnDate(OffsetDateTime paidOnDate) { return this; } + /** + *

    The employee this overall transaction relates to.

    + */ @JsonSetter(value = "employee", nulls = Nulls.SKIP) public Builder employee(Optional employee) { this.employee = employee; @@ -890,6 +915,9 @@ public Builder employee(InvoiceRequestEmployee employee) { return this; } + /** + *

    The invoice's private note.

    + */ @JsonSetter(value = "memo", nulls = Nulls.SKIP) public Builder memo(Optional memo) { this.memo = memo; @@ -901,17 +929,31 @@ public Builder memo(String memo) { return this; } + /** + *

    The status of the invoice.

    + *
      + *
    • PAID - PAID
    • + *
    • DRAFT - DRAFT
    • + *
    • SUBMITTED - SUBMITTED
    • + *
    • PARTIALLY_PAID - PARTIALLY_PAID
    • + *
    • OPEN - OPEN
    • + *
    • VOID - VOID
    • + *
    + */ @JsonSetter(value = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { + public Builder status(Optional status) { this.status = status; return this; } - public Builder status(InvoiceStatusEnum status) { + public Builder status(InvoiceRequestStatus status) { this.status = Optional.ofNullable(status); return this; } + /** + *

    The company the invoice belongs to.

    + */ @JsonSetter(value = "company", nulls = Nulls.SKIP) public Builder company(Optional company) { this.company = company; @@ -923,17 +965,331 @@ public Builder company(InvoiceRequestCompany company) { return this; } + /** + *

    The invoice's currency.

    + *
      + *
    • XUA - ADB Unit of Account
    • + *
    • AFN - Afghan Afghani
    • + *
    • AFA - Afghan Afghani (1927–2002)
    • + *
    • ALL - Albanian Lek
    • + *
    • ALK - Albanian Lek (1946–1965)
    • + *
    • DZD - Algerian Dinar
    • + *
    • ADP - Andorran Peseta
    • + *
    • AOA - Angolan Kwanza
    • + *
    • AOK - Angolan Kwanza (1977–1991)
    • + *
    • AON - Angolan New Kwanza (1990–2000)
    • + *
    • AOR - Angolan Readjusted Kwanza (1995–1999)
    • + *
    • ARA - Argentine Austral
    • + *
    • ARS - Argentine Peso
    • + *
    • ARM - Argentine Peso (1881–1970)
    • + *
    • ARP - Argentine Peso (1983–1985)
    • + *
    • ARL - Argentine Peso Ley (1970–1983)
    • + *
    • AMD - Armenian Dram
    • + *
    • AWG - Aruban Florin
    • + *
    • AUD - Australian Dollar
    • + *
    • ATS - Austrian Schilling
    • + *
    • AZN - Azerbaijani Manat
    • + *
    • AZM - Azerbaijani Manat (1993–2006)
    • + *
    • BSD - Bahamian Dollar
    • + *
    • BHD - Bahraini Dinar
    • + *
    • BDT - Bangladeshi Taka
    • + *
    • BBD - Barbadian Dollar
    • + *
    • BYN - Belarusian Ruble
    • + *
    • BYB - Belarusian Ruble (1994–1999)
    • + *
    • BYR - Belarusian Ruble (2000–2016)
    • + *
    • BEF - Belgian Franc
    • + *
    • BEC - Belgian Franc (convertible)
    • + *
    • BEL - Belgian Franc (financial)
    • + *
    • BZD - Belize Dollar
    • + *
    • BMD - Bermudan Dollar
    • + *
    • BTN - Bhutanese Ngultrum
    • + *
    • BOB - Bolivian Boliviano
    • + *
    • BOL - Bolivian Boliviano (1863–1963)
    • + *
    • BOV - Bolivian Mvdol
    • + *
    • BOP - Bolivian Peso
    • + *
    • BAM - Bosnia-Herzegovina Convertible Mark
    • + *
    • BAD - Bosnia-Herzegovina Dinar (1992–1994)
    • + *
    • BAN - Bosnia-Herzegovina New Dinar (1994–1997)
    • + *
    • BWP - Botswanan Pula
    • + *
    • BRC - Brazilian Cruzado (1986–1989)
    • + *
    • BRZ - Brazilian Cruzeiro (1942–1967)
    • + *
    • BRE - Brazilian Cruzeiro (1990–1993)
    • + *
    • BRR - Brazilian Cruzeiro (1993–1994)
    • + *
    • BRN - Brazilian New Cruzado (1989–1990)
    • + *
    • BRB - Brazilian New Cruzeiro (1967–1986)
    • + *
    • BRL - Brazilian Real
    • + *
    • GBP - British Pound
    • + *
    • BND - Brunei Dollar
    • + *
    • BGL - Bulgarian Hard Lev
    • + *
    • BGN - Bulgarian Lev
    • + *
    • BGO - Bulgarian Lev (1879–1952)
    • + *
    • BGM - Bulgarian Socialist Lev
    • + *
    • BUK - Burmese Kyat
    • + *
    • BIF - Burundian Franc
    • + *
    • XPF - CFP Franc
    • + *
    • KHR - Cambodian Riel
    • + *
    • CAD - Canadian Dollar
    • + *
    • CVE - Cape Verdean Escudo
    • + *
    • KYD - Cayman Islands Dollar
    • + *
    • XAF - Central African CFA Franc
    • + *
    • CLE - Chilean Escudo
    • + *
    • CLP - Chilean Peso
    • + *
    • CLF - Chilean Unit of Account (UF)
    • + *
    • CNX - Chinese People’s Bank Dollar
    • + *
    • CNY - Chinese Yuan
    • + *
    • CNH - Chinese Yuan (offshore)
    • + *
    • COP - Colombian Peso
    • + *
    • COU - Colombian Real Value Unit
    • + *
    • KMF - Comorian Franc
    • + *
    • CDF - Congolese Franc
    • + *
    • CRC - Costa Rican Colón
    • + *
    • HRD - Croatian Dinar
    • + *
    • HRK - Croatian Kuna
    • + *
    • CUC - Cuban Convertible Peso
    • + *
    • CUP - Cuban Peso
    • + *
    • CYP - Cypriot Pound
    • + *
    • CZK - Czech Koruna
    • + *
    • CSK - Czechoslovak Hard Koruna
    • + *
    • DKK - Danish Krone
    • + *
    • DJF - Djiboutian Franc
    • + *
    • DOP - Dominican Peso
    • + *
    • NLG - Dutch Guilder
    • + *
    • XCD - East Caribbean Dollar
    • + *
    • DDM - East German Mark
    • + *
    • ECS - Ecuadorian Sucre
    • + *
    • ECV - Ecuadorian Unit of Constant Value
    • + *
    • EGP - Egyptian Pound
    • + *
    • GQE - Equatorial Guinean Ekwele
    • + *
    • ERN - Eritrean Nakfa
    • + *
    • EEK - Estonian Kroon
    • + *
    • ETB - Ethiopian Birr
    • + *
    • EUR - Euro
    • + *
    • XBA - European Composite Unit
    • + *
    • XEU - European Currency Unit
    • + *
    • XBB - European Monetary Unit
    • + *
    • XBC - European Unit of Account (XBC)
    • + *
    • XBD - European Unit of Account (XBD)
    • + *
    • FKP - Falkland Islands Pound
    • + *
    • FJD - Fijian Dollar
    • + *
    • FIM - Finnish Markka
    • + *
    • FRF - French Franc
    • + *
    • XFO - French Gold Franc
    • + *
    • XFU - French UIC-Franc
    • + *
    • GMD - Gambian Dalasi
    • + *
    • GEK - Georgian Kupon Larit
    • + *
    • GEL - Georgian Lari
    • + *
    • DEM - German Mark
    • + *
    • GHS - Ghanaian Cedi
    • + *
    • GHC - Ghanaian Cedi (1979–2007)
    • + *
    • GIP - Gibraltar Pound
    • + *
    • XAU - Gold
    • + *
    • GRD - Greek Drachma
    • + *
    • GTQ - Guatemalan Quetzal
    • + *
    • GWP - Guinea-Bissau Peso
    • + *
    • GNF - Guinean Franc
    • + *
    • GNS - Guinean Syli
    • + *
    • GYD - Guyanaese Dollar
    • + *
    • HTG - Haitian Gourde
    • + *
    • HNL - Honduran Lempira
    • + *
    • HKD - Hong Kong Dollar
    • + *
    • HUF - Hungarian Forint
    • + *
    • IMP - IMP
    • + *
    • ISK - Icelandic Króna
    • + *
    • ISJ - Icelandic Króna (1918–1981)
    • + *
    • INR - Indian Rupee
    • + *
    • IDR - Indonesian Rupiah
    • + *
    • IRR - Iranian Rial
    • + *
    • IQD - Iraqi Dinar
    • + *
    • IEP - Irish Pound
    • + *
    • ILS - Israeli New Shekel
    • + *
    • ILP - Israeli Pound
    • + *
    • ILR - Israeli Shekel (1980–1985)
    • + *
    • ITL - Italian Lira
    • + *
    • JMD - Jamaican Dollar
    • + *
    • JPY - Japanese Yen
    • + *
    • JOD - Jordanian Dinar
    • + *
    • KZT - Kazakhstani Tenge
    • + *
    • KES - Kenyan Shilling
    • + *
    • KWD - Kuwaiti Dinar
    • + *
    • KGS - Kyrgystani Som
    • + *
    • LAK - Laotian Kip
    • + *
    • LVL - Latvian Lats
    • + *
    • LVR - Latvian Ruble
    • + *
    • LBP - Lebanese Pound
    • + *
    • LSL - Lesotho Loti
    • + *
    • LRD - Liberian Dollar
    • + *
    • LYD - Libyan Dinar
    • + *
    • LTL - Lithuanian Litas
    • + *
    • LTT - Lithuanian Talonas
    • + *
    • LUL - Luxembourg Financial Franc
    • + *
    • LUC - Luxembourgian Convertible Franc
    • + *
    • LUF - Luxembourgian Franc
    • + *
    • MOP - Macanese Pataca
    • + *
    • MKD - Macedonian Denar
    • + *
    • MKN - Macedonian Denar (1992–1993)
    • + *
    • MGA - Malagasy Ariary
    • + *
    • MGF - Malagasy Franc
    • + *
    • MWK - Malawian Kwacha
    • + *
    • MYR - Malaysian Ringgit
    • + *
    • MVR - Maldivian Rufiyaa
    • + *
    • MVP - Maldivian Rupee (1947–1981)
    • + *
    • MLF - Malian Franc
    • + *
    • MTL - Maltese Lira
    • + *
    • MTP - Maltese Pound
    • + *
    • MRU - Mauritanian Ouguiya
    • + *
    • MRO - Mauritanian Ouguiya (1973–2017)
    • + *
    • MUR - Mauritian Rupee
    • + *
    • MXV - Mexican Investment Unit
    • + *
    • MXN - Mexican Peso
    • + *
    • MXP - Mexican Silver Peso (1861–1992)
    • + *
    • MDC - Moldovan Cupon
    • + *
    • MDL - Moldovan Leu
    • + *
    • MCF - Monegasque Franc
    • + *
    • MNT - Mongolian Tugrik
    • + *
    • MAD - Moroccan Dirham
    • + *
    • MAF - Moroccan Franc
    • + *
    • MZE - Mozambican Escudo
    • + *
    • MZN - Mozambican Metical
    • + *
    • MZM - Mozambican Metical (1980–2006)
    • + *
    • MMK - Myanmar Kyat
    • + *
    • NAD - Namibian Dollar
    • + *
    • NPR - Nepalese Rupee
    • + *
    • ANG - Netherlands Antillean Guilder
    • + *
    • TWD - New Taiwan Dollar
    • + *
    • NZD - New Zealand Dollar
    • + *
    • NIO - Nicaraguan Córdoba
    • + *
    • NIC - Nicaraguan Córdoba (1988–1991)
    • + *
    • NGN - Nigerian Naira
    • + *
    • KPW - North Korean Won
    • + *
    • NOK - Norwegian Krone
    • + *
    • OMR - Omani Rial
    • + *
    • PKR - Pakistani Rupee
    • + *
    • XPD - Palladium
    • + *
    • PAB - Panamanian Balboa
    • + *
    • PGK - Papua New Guinean Kina
    • + *
    • PYG - Paraguayan Guarani
    • + *
    • PEI - Peruvian Inti
    • + *
    • PEN - Peruvian Sol
    • + *
    • PES - Peruvian Sol (1863–1965)
    • + *
    • PHP - Philippine Peso
    • + *
    • XPT - Platinum
    • + *
    • PLN - Polish Zloty
    • + *
    • PLZ - Polish Zloty (1950–1995)
    • + *
    • PTE - Portuguese Escudo
    • + *
    • GWE - Portuguese Guinea Escudo
    • + *
    • QAR - Qatari Rial
    • + *
    • XRE - RINET Funds
    • + *
    • RHD - Rhodesian Dollar
    • + *
    • RON - Romanian Leu
    • + *
    • ROL - Romanian Leu (1952–2006)
    • + *
    • RUB - Russian Ruble
    • + *
    • RUR - Russian Ruble (1991–1998)
    • + *
    • RWF - Rwandan Franc
    • + *
    • SVC - Salvadoran Colón
    • + *
    • WST - Samoan Tala
    • + *
    • SAR - Saudi Riyal
    • + *
    • RSD - Serbian Dinar
    • + *
    • CSD - Serbian Dinar (2002–2006)
    • + *
    • SCR - Seychellois Rupee
    • + *
    • SLL - Sierra Leonean Leone
    • + *
    • XAG - Silver
    • + *
    • SGD - Singapore Dollar
    • + *
    • SKK - Slovak Koruna
    • + *
    • SIT - Slovenian Tolar
    • + *
    • SBD - Solomon Islands Dollar
    • + *
    • SOS - Somali Shilling
    • + *
    • ZAR - South African Rand
    • + *
    • ZAL - South African Rand (financial)
    • + *
    • KRH - South Korean Hwan (1953–1962)
    • + *
    • KRW - South Korean Won
    • + *
    • KRO - South Korean Won (1945–1953)
    • + *
    • SSP - South Sudanese Pound
    • + *
    • SUR - Soviet Rouble
    • + *
    • ESP - Spanish Peseta
    • + *
    • ESA - Spanish Peseta (A account)
    • + *
    • ESB - Spanish Peseta (convertible account)
    • + *
    • XDR - Special Drawing Rights
    • + *
    • LKR - Sri Lankan Rupee
    • + *
    • SHP - St. Helena Pound
    • + *
    • XSU - Sucre
    • + *
    • SDD - Sudanese Dinar (1992–2007)
    • + *
    • SDG - Sudanese Pound
    • + *
    • SDP - Sudanese Pound (1957–1998)
    • + *
    • SRD - Surinamese Dollar
    • + *
    • SRG - Surinamese Guilder
    • + *
    • SZL - Swazi Lilangeni
    • + *
    • SEK - Swedish Krona
    • + *
    • CHF - Swiss Franc
    • + *
    • SYP - Syrian Pound
    • + *
    • STN - São Tomé & Príncipe Dobra
    • + *
    • STD - São Tomé & Príncipe Dobra (1977–2017)
    • + *
    • TVD - TVD
    • + *
    • TJR - Tajikistani Ruble
    • + *
    • TJS - Tajikistani Somoni
    • + *
    • TZS - Tanzanian Shilling
    • + *
    • XTS - Testing Currency Code
    • + *
    • THB - Thai Baht
    • + *
    • XXX - The codes assigned for transactions where no currency is involved
    • + *
    • TPE - Timorese Escudo
    • + *
    • TOP - Tongan Paʻanga
    • + *
    • TTD - Trinidad & Tobago Dollar
    • + *
    • TND - Tunisian Dinar
    • + *
    • TRY - Turkish Lira
    • + *
    • TRL - Turkish Lira (1922–2005)
    • + *
    • TMT - Turkmenistani Manat
    • + *
    • TMM - Turkmenistani Manat (1993–2009)
    • + *
    • USD - US Dollar
    • + *
    • USN - US Dollar (Next day)
    • + *
    • USS - US Dollar (Same day)
    • + *
    • UGX - Ugandan Shilling
    • + *
    • UGS - Ugandan Shilling (1966–1987)
    • + *
    • UAH - Ukrainian Hryvnia
    • + *
    • UAK - Ukrainian Karbovanets
    • + *
    • AED - United Arab Emirates Dirham
    • + *
    • UYW - Uruguayan Nominal Wage Index Unit
    • + *
    • UYU - Uruguayan Peso
    • + *
    • UYP - Uruguayan Peso (1975–1993)
    • + *
    • UYI - Uruguayan Peso (Indexed Units)
    • + *
    • UZS - Uzbekistani Som
    • + *
    • VUV - Vanuatu Vatu
    • + *
    • VES - Venezuelan Bolívar
    • + *
    • VEB - Venezuelan Bolívar (1871–2008)
    • + *
    • VEF - Venezuelan Bolívar (2008–2018)
    • + *
    • VND - Vietnamese Dong
    • + *
    • VNN - Vietnamese Dong (1978–1985)
    • + *
    • CHE - WIR Euro
    • + *
    • CHW - WIR Franc
    • + *
    • XOF - West African CFA Franc
    • + *
    • YDD - Yemeni Dinar
    • + *
    • YER - Yemeni Rial
    • + *
    • YUN - Yugoslavian Convertible Dinar (1990–1992)
    • + *
    • YUD - Yugoslavian Hard Dinar (1966–1990)
    • + *
    • YUM - Yugoslavian New Dinar (1994–2002)
    • + *
    • YUR - Yugoslavian Reformed Dinar (1992–1993)
    • + *
    • ZWN - ZWN
    • + *
    • ZRN - Zairean New Zaire (1993–1998)
    • + *
    • ZRZ - Zairean Zaire (1971–1993)
    • + *
    • ZMW - Zambian Kwacha
    • + *
    • ZMK - Zambian Kwacha (1968–2012)
    • + *
    • ZWD - Zimbabwean Dollar (1980–2008)
    • + *
    • ZWR - Zimbabwean Dollar (2008)
    • + *
    • ZWL - Zimbabwean Dollar (2009)
    • + *
    + */ @JsonSetter(value = "currency", nulls = Nulls.SKIP) - public Builder currency(Optional currency) { + public Builder currency(Optional currency) { this.currency = currency; return this; } - public Builder currency(TransactionCurrencyEnum currency) { + public Builder currency(InvoiceRequestCurrency currency) { this.currency = Optional.ofNullable(currency); return this; } + /** + *

    The invoice's exchange rate.

    + */ @JsonSetter(value = "exchange_rate", nulls = Nulls.SKIP) public Builder exchangeRate(Optional exchangeRate) { this.exchangeRate = exchangeRate; @@ -945,6 +1301,9 @@ public Builder exchangeRate(String exchangeRate) { return this; } + /** + *

    The total discounts applied to the total cost.

    + */ @JsonSetter(value = "total_discount", nulls = Nulls.SKIP) public Builder totalDiscount(Optional totalDiscount) { this.totalDiscount = totalDiscount; @@ -956,6 +1315,9 @@ public Builder totalDiscount(Double totalDiscount) { return this; } + /** + *

    The total amount being paid before taxes.

    + */ @JsonSetter(value = "sub_total", nulls = Nulls.SKIP) public Builder subTotal(Optional subTotal) { this.subTotal = subTotal; @@ -967,6 +1329,9 @@ public Builder subTotal(Double subTotal) { return this; } + /** + *

    The payment term that applies to this transaction.

    + */ @JsonSetter(value = "payment_term", nulls = Nulls.SKIP) public Builder paymentTerm(Optional paymentTerm) { this.paymentTerm = paymentTerm; @@ -978,6 +1343,9 @@ public Builder paymentTerm(InvoiceRequestPaymentTerm paymentTerm) { return this; } + /** + *

    The total amount being paid in taxes.

    + */ @JsonSetter(value = "total_tax_amount", nulls = Nulls.SKIP) public Builder totalTaxAmount(Optional totalTaxAmount) { this.totalTaxAmount = totalTaxAmount; @@ -989,6 +1357,9 @@ public Builder totalTaxAmount(Double totalTaxAmount) { return this; } + /** + *

    If the transaction is inclusive or exclusive of tax. True if inclusive, False if exclusive.

    + */ @JsonSetter(value = "inclusive_of_tax", nulls = Nulls.SKIP) public Builder inclusiveOfTax(Optional inclusiveOfTax) { this.inclusiveOfTax = inclusiveOfTax; @@ -1000,6 +1371,9 @@ public Builder inclusiveOfTax(Boolean inclusiveOfTax) { return this; } + /** + *

    The invoice's total amount.

    + */ @JsonSetter(value = "total_amount", nulls = Nulls.SKIP) public Builder totalAmount(Optional totalAmount) { this.totalAmount = totalAmount; @@ -1011,6 +1385,9 @@ public Builder totalAmount(Double totalAmount) { return this; } + /** + *

    The invoice's remaining balance.

    + */ @JsonSetter(value = "balance", nulls = Nulls.SKIP) public Builder balance(Optional balance) { this.balance = balance; @@ -1022,6 +1399,9 @@ public Builder balance(Double balance) { return this; } + /** + *

    Array of Payment object IDs.

    + */ @JsonSetter(value = "payments", nulls = Nulls.SKIP) public Builder payments(Optional>> payments) { this.payments = payments; diff --git a/src/main/java/com/merge/api/accounting/types/InvoiceRequestCurrency.java b/src/main/java/com/merge/api/accounting/types/InvoiceRequestCurrency.java new file mode 100644 index 000000000..b683b74d6 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/InvoiceRequestCurrency.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = InvoiceRequestCurrency.Deserializer.class) +public final class InvoiceRequestCurrency { + private final Object value; + + private final int type; + + private InvoiceRequestCurrency(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((TransactionCurrencyEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof InvoiceRequestCurrency && equalTo((InvoiceRequestCurrency) other); + } + + private boolean equalTo(InvoiceRequestCurrency other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static InvoiceRequestCurrency of(TransactionCurrencyEnum value) { + return new InvoiceRequestCurrency(value, 0); + } + + public static InvoiceRequestCurrency of(String value) { + return new InvoiceRequestCurrency(value, 1); + } + + public interface Visitor { + T visit(TransactionCurrencyEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(InvoiceRequestCurrency.class); + } + + @java.lang.Override + public InvoiceRequestCurrency deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TransactionCurrencyEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/InvoiceRequestStatus.java b/src/main/java/com/merge/api/accounting/types/InvoiceRequestStatus.java new file mode 100644 index 000000000..4f3be7529 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/InvoiceRequestStatus.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = InvoiceRequestStatus.Deserializer.class) +public final class InvoiceRequestStatus { + private final Object value; + + private final int type; + + private InvoiceRequestStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((InvoiceStatusEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof InvoiceRequestStatus && equalTo((InvoiceRequestStatus) other); + } + + private boolean equalTo(InvoiceRequestStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static InvoiceRequestStatus of(InvoiceStatusEnum value) { + return new InvoiceRequestStatus(value, 0); + } + + public static InvoiceRequestStatus of(String value) { + return new InvoiceRequestStatus(value, 1); + } + + public interface Visitor { + T visit(InvoiceStatusEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(InvoiceRequestStatus.class); + } + + @java.lang.Override + public InvoiceRequestStatus deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, InvoiceStatusEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/InvoiceRequestType.java b/src/main/java/com/merge/api/accounting/types/InvoiceRequestType.java new file mode 100644 index 000000000..4dbf0448c --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/InvoiceRequestType.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = InvoiceRequestType.Deserializer.class) +public final class InvoiceRequestType { + private final Object value; + + private final int type; + + private InvoiceRequestType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((InvoiceTypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof InvoiceRequestType && equalTo((InvoiceRequestType) other); + } + + private boolean equalTo(InvoiceRequestType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static InvoiceRequestType of(InvoiceTypeEnum value) { + return new InvoiceRequestType(value, 0); + } + + public static InvoiceRequestType of(String value) { + return new InvoiceRequestType(value, 1); + } + + public interface Visitor { + T visit(InvoiceTypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(InvoiceRequestType.class); + } + + @java.lang.Override + public InvoiceRequestType deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, InvoiceTypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/InvoiceStatus.java b/src/main/java/com/merge/api/accounting/types/InvoiceStatus.java new file mode 100644 index 000000000..14eed0d1b --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/InvoiceStatus.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = InvoiceStatus.Deserializer.class) +public final class InvoiceStatus { + private final Object value; + + private final int type; + + private InvoiceStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((InvoiceStatusEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof InvoiceStatus && equalTo((InvoiceStatus) other); + } + + private boolean equalTo(InvoiceStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static InvoiceStatus of(InvoiceStatusEnum value) { + return new InvoiceStatus(value, 0); + } + + public static InvoiceStatus of(String value) { + return new InvoiceStatus(value, 1); + } + + public interface Visitor { + T visit(InvoiceStatusEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(InvoiceStatus.class); + } + + @java.lang.Override + public InvoiceStatus deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, InvoiceStatusEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/InvoicesLineItemsRemoteFieldClassesListRequest.java b/src/main/java/com/merge/api/accounting/types/InvoicesLineItemsRemoteFieldClassesListRequest.java index 7a895e627..e2a7b7513 100644 --- a/src/main/java/com/merge/api/accounting/types/InvoicesLineItemsRemoteFieldClassesListRequest.java +++ b/src/main/java/com/merge/api/accounting/types/InvoicesLineItemsRemoteFieldClassesListRequest.java @@ -30,6 +30,8 @@ public final class InvoicesLineItemsRemoteFieldClassesListRequest { private final Optional isCommonModelField; + private final Optional isCustom; + private final Optional pageSize; private final Map additionalProperties; @@ -40,6 +42,7 @@ private InvoicesLineItemsRemoteFieldClassesListRequest( Optional includeRemoteData, Optional includeShellData, Optional isCommonModelField, + Optional isCustom, Optional pageSize, Map additionalProperties) { this.cursor = cursor; @@ -47,6 +50,7 @@ private InvoicesLineItemsRemoteFieldClassesListRequest( this.includeRemoteData = includeRemoteData; this.includeShellData = includeShellData; this.isCommonModelField = isCommonModelField; + this.isCustom = isCustom; this.pageSize = pageSize; this.additionalProperties = additionalProperties; } @@ -91,6 +95,14 @@ public Optional getIsCommonModelField() { return isCommonModelField; } + /** + * @return If provided, will only return remote fields classes with this is_custom value + */ + @JsonProperty("is_custom") + public Optional getIsCustom() { + return isCustom; + } + /** * @return Number of results to return per page. */ @@ -117,6 +129,7 @@ private boolean equalTo(InvoicesLineItemsRemoteFieldClassesListRequest other) { && includeRemoteData.equals(other.includeRemoteData) && includeShellData.equals(other.includeShellData) && isCommonModelField.equals(other.isCommonModelField) + && isCustom.equals(other.isCustom) && pageSize.equals(other.pageSize); } @@ -128,6 +141,7 @@ public int hashCode() { this.includeRemoteData, this.includeShellData, this.isCommonModelField, + this.isCustom, this.pageSize); } @@ -152,6 +166,8 @@ public static final class Builder { private Optional isCommonModelField = Optional.empty(); + private Optional isCustom = Optional.empty(); + private Optional pageSize = Optional.empty(); @JsonAnySetter @@ -165,10 +181,14 @@ public Builder from(InvoicesLineItemsRemoteFieldClassesListRequest other) { includeRemoteData(other.getIncludeRemoteData()); includeShellData(other.getIncludeShellData()); isCommonModelField(other.getIsCommonModelField()); + isCustom(other.getIsCustom()); pageSize(other.getPageSize()); return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -180,6 +200,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -191,6 +214,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -202,6 +228,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -213,6 +242,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, will only return remote field classes with this is_common_model_field value

    + */ @JsonSetter(value = "is_common_model_field", nulls = Nulls.SKIP) public Builder isCommonModelField(Optional isCommonModelField) { this.isCommonModelField = isCommonModelField; @@ -224,6 +256,23 @@ public Builder isCommonModelField(Boolean isCommonModelField) { return this; } + /** + *

    If provided, will only return remote fields classes with this is_custom value

    + */ + @JsonSetter(value = "is_custom", nulls = Nulls.SKIP) + public Builder isCustom(Optional isCustom) { + this.isCustom = isCustom; + return this; + } + + public Builder isCustom(Boolean isCustom) { + this.isCustom = Optional.ofNullable(isCustom); + return this; + } + + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -242,6 +291,7 @@ public InvoicesLineItemsRemoteFieldClassesListRequest build() { includeRemoteData, includeShellData, isCommonModelField, + isCustom, pageSize, additionalProperties); } diff --git a/src/main/java/com/merge/api/accounting/types/InvoicesListRequest.java b/src/main/java/com/merge/api/accounting/types/InvoicesListRequest.java index 7a99b1f53..c11247b58 100644 --- a/src/main/java/com/merge/api/accounting/types/InvoicesListRequest.java +++ b/src/main/java/com/merge/api/accounting/types/InvoicesListRequest.java @@ -438,6 +438,9 @@ public Builder from(InvoicesListRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -454,6 +457,9 @@ public Builder expand(InvoicesListRequestExpandItem expand) { return this; } + /** + *

    If provided, will only return invoices for this company.

    + */ @JsonSetter(value = "company_id", nulls = Nulls.SKIP) public Builder companyId(Optional companyId) { this.companyId = companyId; @@ -465,6 +471,9 @@ public Builder companyId(String companyId) { return this; } + /** + *

    If provided, will only return invoices for this contact.

    + */ @JsonSetter(value = "contact_id", nulls = Nulls.SKIP) public Builder contactId(Optional contactId) { this.contactId = contactId; @@ -476,6 +485,9 @@ public Builder contactId(String contactId) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -487,6 +499,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -498,6 +513,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -509,6 +527,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -520,6 +541,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -531,6 +555,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

    + */ @JsonSetter(value = "include_remote_fields", nulls = Nulls.SKIP) public Builder includeRemoteFields(Optional includeRemoteFields) { this.includeRemoteFields = includeRemoteFields; @@ -542,6 +569,9 @@ public Builder includeRemoteFields(Boolean includeRemoteFields) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -553,6 +583,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "issue_date_after", nulls = Nulls.SKIP) public Builder issueDateAfter(Optional issueDateAfter) { this.issueDateAfter = issueDateAfter; @@ -564,6 +597,9 @@ public Builder issueDateAfter(OffsetDateTime issueDateAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "issue_date_before", nulls = Nulls.SKIP) public Builder issueDateBefore(Optional issueDateBefore) { this.issueDateBefore = issueDateBefore; @@ -575,6 +611,9 @@ public Builder issueDateBefore(OffsetDateTime issueDateBefore) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -586,6 +625,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -597,6 +639,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    If provided, will only return Invoices with this number.

    + */ @JsonSetter(value = "number", nulls = Nulls.SKIP) public Builder number(Optional number) { this.number = number; @@ -608,6 +653,9 @@ public Builder number(String number) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -619,6 +667,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    Deprecated. Use show_enum_origins.

    + */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -630,6 +681,9 @@ public Builder remoteFields(String remoteFields) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -641,6 +695,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    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

    + */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; @@ -652,6 +709,17 @@ public Builder showEnumOrigins(String showEnumOrigins) { return this; } + /** + *

    If provided, will only return Invoices with this status.

    + *
      + *
    • PAID - PAID
    • + *
    • DRAFT - DRAFT
    • + *
    • SUBMITTED - SUBMITTED
    • + *
    • PARTIALLY_PAID - PARTIALLY_PAID
    • + *
    • OPEN - OPEN
    • + *
    • VOID - VOID
    • + *
    + */ @JsonSetter(value = "status", nulls = Nulls.SKIP) public Builder status(Optional status) { this.status = status; @@ -663,6 +731,13 @@ public Builder status(InvoicesListRequestStatus status) { return this; } + /** + *

    If provided, will only return Invoices with this type.

    + *
      + *
    • ACCOUNTS_RECEIVABLE - ACCOUNTS_RECEIVABLE
    • + *
    • ACCOUNTS_PAYABLE - ACCOUNTS_PAYABLE
    • + *
    + */ @JsonSetter(value = "type", nulls = Nulls.SKIP) public Builder type(Optional type) { this.type = type; diff --git a/src/main/java/com/merge/api/accounting/types/InvoicesRemoteFieldClassesListRequest.java b/src/main/java/com/merge/api/accounting/types/InvoicesRemoteFieldClassesListRequest.java index 685970c2c..51a6fd8de 100644 --- a/src/main/java/com/merge/api/accounting/types/InvoicesRemoteFieldClassesListRequest.java +++ b/src/main/java/com/merge/api/accounting/types/InvoicesRemoteFieldClassesListRequest.java @@ -30,6 +30,8 @@ public final class InvoicesRemoteFieldClassesListRequest { private final Optional isCommonModelField; + private final Optional isCustom; + private final Optional pageSize; private final Map additionalProperties; @@ -40,6 +42,7 @@ private InvoicesRemoteFieldClassesListRequest( Optional includeRemoteData, Optional includeShellData, Optional isCommonModelField, + Optional isCustom, Optional pageSize, Map additionalProperties) { this.cursor = cursor; @@ -47,6 +50,7 @@ private InvoicesRemoteFieldClassesListRequest( this.includeRemoteData = includeRemoteData; this.includeShellData = includeShellData; this.isCommonModelField = isCommonModelField; + this.isCustom = isCustom; this.pageSize = pageSize; this.additionalProperties = additionalProperties; } @@ -91,6 +95,14 @@ public Optional getIsCommonModelField() { return isCommonModelField; } + /** + * @return If provided, will only return remote fields classes with this is_custom value + */ + @JsonProperty("is_custom") + public Optional getIsCustom() { + return isCustom; + } + /** * @return Number of results to return per page. */ @@ -117,6 +129,7 @@ private boolean equalTo(InvoicesRemoteFieldClassesListRequest other) { && includeRemoteData.equals(other.includeRemoteData) && includeShellData.equals(other.includeShellData) && isCommonModelField.equals(other.isCommonModelField) + && isCustom.equals(other.isCustom) && pageSize.equals(other.pageSize); } @@ -128,6 +141,7 @@ public int hashCode() { this.includeRemoteData, this.includeShellData, this.isCommonModelField, + this.isCustom, this.pageSize); } @@ -152,6 +166,8 @@ public static final class Builder { private Optional isCommonModelField = Optional.empty(); + private Optional isCustom = Optional.empty(); + private Optional pageSize = Optional.empty(); @JsonAnySetter @@ -165,10 +181,14 @@ public Builder from(InvoicesRemoteFieldClassesListRequest other) { includeRemoteData(other.getIncludeRemoteData()); includeShellData(other.getIncludeShellData()); isCommonModelField(other.getIsCommonModelField()); + isCustom(other.getIsCustom()); pageSize(other.getPageSize()); return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -180,6 +200,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -191,6 +214,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -202,6 +228,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -213,6 +242,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, will only return remote field classes with this is_common_model_field value

    + */ @JsonSetter(value = "is_common_model_field", nulls = Nulls.SKIP) public Builder isCommonModelField(Optional isCommonModelField) { this.isCommonModelField = isCommonModelField; @@ -224,6 +256,23 @@ public Builder isCommonModelField(Boolean isCommonModelField) { return this; } + /** + *

    If provided, will only return remote fields classes with this is_custom value

    + */ + @JsonSetter(value = "is_custom", nulls = Nulls.SKIP) + public Builder isCustom(Optional isCustom) { + this.isCustom = isCustom; + return this; + } + + public Builder isCustom(Boolean isCustom) { + this.isCustom = Optional.ofNullable(isCustom); + return this; + } + + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -242,6 +291,7 @@ public InvoicesRemoteFieldClassesListRequest build() { includeRemoteData, includeShellData, isCommonModelField, + isCustom, pageSize, additionalProperties); } diff --git a/src/main/java/com/merge/api/accounting/types/InvoicesRetrieveRequest.java b/src/main/java/com/merge/api/accounting/types/InvoicesRetrieveRequest.java index a8cf26b6f..b79fb3f20 100644 --- a/src/main/java/com/merge/api/accounting/types/InvoicesRetrieveRequest.java +++ b/src/main/java/com/merge/api/accounting/types/InvoicesRetrieveRequest.java @@ -170,6 +170,9 @@ public Builder from(InvoicesRetrieveRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -186,6 +189,9 @@ public Builder expand(InvoicesRetrieveRequestExpandItem expand) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -197,6 +203,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

    + */ @JsonSetter(value = "include_remote_fields", nulls = Nulls.SKIP) public Builder includeRemoteFields(Optional includeRemoteFields) { this.includeRemoteFields = includeRemoteFields; @@ -208,6 +217,9 @@ public Builder includeRemoteFields(Boolean includeRemoteFields) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -219,6 +231,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    Deprecated. Use show_enum_origins.

    + */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -230,6 +245,9 @@ public Builder remoteFields(String remoteFields) { return this; } + /** + *

    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

    + */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; diff --git a/src/main/java/com/merge/api/accounting/types/Issue.java b/src/main/java/com/merge/api/accounting/types/Issue.java index b40ad40f5..f307b7d67 100644 --- a/src/main/java/com/merge/api/accounting/types/Issue.java +++ b/src/main/java/com/merge/api/accounting/types/Issue.java @@ -26,7 +26,7 @@ public final class Issue { private final Optional id; - private final Optional status; + private final Optional status; private final String errorDescription; @@ -44,7 +44,7 @@ public final class Issue { private Issue( Optional id, - Optional status, + Optional status, String errorDescription, Optional> endUser, Optional firstIncidentTime, @@ -76,7 +76,7 @@ public Optional getId() { * */ @JsonProperty("status") - public Optional getStatus() { + public Optional getStatus() { return status; } @@ -167,9 +167,16 @@ public interface _FinalStage { _FinalStage id(String id); - _FinalStage status(Optional status); + /** + *

    Status of the issue. Options: ('ONGOING', 'RESOLVED')

    + *
      + *
    • ONGOING - ONGOING
    • + *
    • RESOLVED - RESOLVED
    • + *
    + */ + _FinalStage status(Optional status); - _FinalStage status(IssueStatusEnum status); + _FinalStage status(IssueStatus status); _FinalStage endUser(Optional> endUser); @@ -206,7 +213,7 @@ public static final class Builder implements ErrorDescriptionStage, _FinalStage private Optional> endUser = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Optional id = Optional.empty(); @@ -309,14 +316,21 @@ public _FinalStage endUser(Optional> endUser) { * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override - public _FinalStage status(IssueStatusEnum status) { + public _FinalStage status(IssueStatus status) { this.status = Optional.ofNullable(status); return this; } + /** + *

    Status of the issue. Options: ('ONGOING', 'RESOLVED')

    + *
      + *
    • ONGOING - ONGOING
    • + *
    • RESOLVED - RESOLVED
    • + *
    + */ @java.lang.Override @JsonSetter(value = "status", nulls = Nulls.SKIP) - public _FinalStage status(Optional status) { + public _FinalStage status(Optional status) { this.status = status; return this; } diff --git a/src/main/java/com/merge/api/accounting/types/IssueStatus.java b/src/main/java/com/merge/api/accounting/types/IssueStatus.java new file mode 100644 index 000000000..3ea0325ba --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/IssueStatus.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = IssueStatus.Deserializer.class) +public final class IssueStatus { + private final Object value; + + private final int type; + + private IssueStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((IssueStatusEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof IssueStatus && equalTo((IssueStatus) other); + } + + private boolean equalTo(IssueStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static IssueStatus of(IssueStatusEnum value) { + return new IssueStatus(value, 0); + } + + public static IssueStatus of(String value) { + return new IssueStatus(value, 1); + } + + public interface Visitor { + T visit(IssueStatusEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(IssueStatus.class); + } + + @java.lang.Override + public IssueStatus deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, IssueStatusEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/IssuesListRequest.java b/src/main/java/com/merge/api/accounting/types/IssuesListRequest.java index 154ce0159..eb1b9428f 100644 --- a/src/main/java/com/merge/api/accounting/types/IssuesListRequest.java +++ b/src/main/java/com/merge/api/accounting/types/IssuesListRequest.java @@ -311,6 +311,9 @@ public Builder accountToken(String accountToken) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -322,6 +325,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    If included, will only include issues whose most recent action occurred before this time

    + */ @JsonSetter(value = "end_date", nulls = Nulls.SKIP) public Builder endDate(Optional endDate) { this.endDate = endDate; @@ -344,6 +350,9 @@ public Builder endUserOrganizationName(String endUserOrganizationName) { return this; } + /** + *

    If provided, will only return issues whose first incident time was after this datetime.

    + */ @JsonSetter(value = "first_incident_time_after", nulls = Nulls.SKIP) public Builder firstIncidentTimeAfter(Optional firstIncidentTimeAfter) { this.firstIncidentTimeAfter = firstIncidentTimeAfter; @@ -355,6 +364,9 @@ public Builder firstIncidentTimeAfter(OffsetDateTime firstIncidentTimeAfter) { return this; } + /** + *

    If provided, will only return issues whose first incident time was before this datetime.

    + */ @JsonSetter(value = "first_incident_time_before", nulls = Nulls.SKIP) public Builder firstIncidentTimeBefore(Optional firstIncidentTimeBefore) { this.firstIncidentTimeBefore = firstIncidentTimeBefore; @@ -366,6 +378,9 @@ public Builder firstIncidentTimeBefore(OffsetDateTime firstIncidentTimeBefore) { return this; } + /** + *

    If true, will include muted issues

    + */ @JsonSetter(value = "include_muted", nulls = Nulls.SKIP) public Builder includeMuted(Optional includeMuted) { this.includeMuted = includeMuted; @@ -388,6 +403,9 @@ public Builder integrationName(String integrationName) { return this; } + /** + *

    If provided, will only return issues whose last incident time was after this datetime.

    + */ @JsonSetter(value = "last_incident_time_after", nulls = Nulls.SKIP) public Builder lastIncidentTimeAfter(Optional lastIncidentTimeAfter) { this.lastIncidentTimeAfter = lastIncidentTimeAfter; @@ -399,6 +417,9 @@ public Builder lastIncidentTimeAfter(OffsetDateTime lastIncidentTimeAfter) { return this; } + /** + *

    If provided, will only return issues whose last incident time was before this datetime.

    + */ @JsonSetter(value = "last_incident_time_before", nulls = Nulls.SKIP) public Builder lastIncidentTimeBefore(Optional lastIncidentTimeBefore) { this.lastIncidentTimeBefore = lastIncidentTimeBefore; @@ -410,6 +431,9 @@ public Builder lastIncidentTimeBefore(OffsetDateTime lastIncidentTimeBefore) { return this; } + /** + *

    If provided, will only include issues pertaining to the linked account passed in.

    + */ @JsonSetter(value = "linked_account_id", nulls = Nulls.SKIP) public Builder linkedAccountId(Optional linkedAccountId) { this.linkedAccountId = linkedAccountId; @@ -421,6 +445,9 @@ public Builder linkedAccountId(String linkedAccountId) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -432,6 +459,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    If included, will only include issues whose most recent action occurred after this time

    + */ @JsonSetter(value = "start_date", nulls = Nulls.SKIP) public Builder startDate(Optional startDate) { this.startDate = startDate; @@ -443,6 +473,13 @@ public Builder startDate(String startDate) { return this; } + /** + *

    Status of the issue. Options: ('ONGOING', 'RESOLVED')

    + *
      + *
    • ONGOING - ONGOING
    • + *
    • RESOLVED - RESOLVED
    • + *
    + */ @JsonSetter(value = "status", nulls = Nulls.SKIP) public Builder status(Optional status) { this.status = status; diff --git a/src/main/java/com/merge/api/accounting/types/Item.java b/src/main/java/com/merge/api/accounting/types/Item.java index 975bbaf20..6e8bf096f 100644 --- a/src/main/java/com/merge/api/accounting/types/Item.java +++ b/src/main/java/com/merge/api/accounting/types/Item.java @@ -33,7 +33,9 @@ public final class Item { private final Optional name; - private final Optional status; + private final Optional status; + + private final Optional type; private final Optional unitPrice; @@ -65,7 +67,8 @@ private Item( Optional createdAt, Optional modifiedAt, Optional name, - Optional status, + Optional status, + Optional type, Optional unitPrice, Optional purchasePrice, Optional purchaseAccount, @@ -84,6 +87,7 @@ private Item( this.modifiedAt = modifiedAt; this.name = name; this.status = status; + this.type = type; this.unitPrice = unitPrice; this.purchasePrice = purchasePrice; this.purchaseAccount = purchaseAccount; @@ -143,10 +147,24 @@ public Optional getName() { * */ @JsonProperty("status") - public Optional getStatus() { + public Optional getStatus() { return status; } + /** + * @return The item's type. + *
      + *
    • INVENTORY - INVENTORY
    • + *
    • NON_INVENTORY - NON_INVENTORY
    • + *
    • SERVICE - SERVICE
    • + *
    • UNKNOWN - UNKNOWN
    • + *
    + */ + @JsonProperty("type") + public Optional getType() { + return type; + } + /** * @return The item's unit price. */ @@ -247,6 +265,7 @@ private boolean equalTo(Item other) { && modifiedAt.equals(other.modifiedAt) && name.equals(other.name) && status.equals(other.status) + && type.equals(other.type) && unitPrice.equals(other.unitPrice) && purchasePrice.equals(other.purchasePrice) && purchaseAccount.equals(other.purchaseAccount) @@ -269,6 +288,7 @@ public int hashCode() { this.modifiedAt, this.name, this.status, + this.type, this.unitPrice, this.purchasePrice, this.purchaseAccount, @@ -303,7 +323,9 @@ public static final class Builder { private Optional name = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); + + private Optional type = Optional.empty(); private Optional unitPrice = Optional.empty(); @@ -339,6 +361,7 @@ public Builder from(Item other) { modifiedAt(other.getModifiedAt()); name(other.getName()); status(other.getStatus()); + type(other.getType()); unitPrice(other.getUnitPrice()); purchasePrice(other.getPurchasePrice()); purchaseAccount(other.getPurchaseAccount()); @@ -364,6 +387,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -375,6 +401,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -386,6 +415,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -397,6 +429,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The item's name.

    + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -408,17 +443,47 @@ public Builder name(String name) { return this; } + /** + *

    The item's status.

    + *
      + *
    • ACTIVE - ACTIVE
    • + *
    • ARCHIVED - ARCHIVED
    • + *
    + */ @JsonSetter(value = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { + public Builder status(Optional status) { this.status = status; return this; } - public Builder status(Status7D1Enum status) { + public Builder status(ItemStatus status) { this.status = Optional.ofNullable(status); return this; } + /** + *

    The item's type.

    + *
      + *
    • INVENTORY - INVENTORY
    • + *
    • NON_INVENTORY - NON_INVENTORY
    • + *
    • SERVICE - SERVICE
    • + *
    • UNKNOWN - UNKNOWN
    • + *
    + */ + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public Builder type(Optional type) { + this.type = type; + return this; + } + + public Builder type(ItemType type) { + this.type = Optional.ofNullable(type); + return this; + } + + /** + *

    The item's unit price.

    + */ @JsonSetter(value = "unit_price", nulls = Nulls.SKIP) public Builder unitPrice(Optional unitPrice) { this.unitPrice = unitPrice; @@ -430,6 +495,9 @@ public Builder unitPrice(Double unitPrice) { return this; } + /** + *

    The price at which the item is purchased from a vendor.

    + */ @JsonSetter(value = "purchase_price", nulls = Nulls.SKIP) public Builder purchasePrice(Optional purchasePrice) { this.purchasePrice = purchasePrice; @@ -441,6 +509,9 @@ public Builder purchasePrice(Double purchasePrice) { return this; } + /** + *

    References the default account used to record a purchase of the item.

    + */ @JsonSetter(value = "purchase_account", nulls = Nulls.SKIP) public Builder purchaseAccount(Optional purchaseAccount) { this.purchaseAccount = purchaseAccount; @@ -452,6 +523,9 @@ public Builder purchaseAccount(ItemPurchaseAccount purchaseAccount) { return this; } + /** + *

    References the default account used to record a sale.

    + */ @JsonSetter(value = "sales_account", nulls = Nulls.SKIP) public Builder salesAccount(Optional salesAccount) { this.salesAccount = salesAccount; @@ -463,6 +537,9 @@ public Builder salesAccount(ItemSalesAccount salesAccount) { return this; } + /** + *

    The company the item belongs to.

    + */ @JsonSetter(value = "company", nulls = Nulls.SKIP) public Builder company(Optional company) { this.company = company; @@ -474,6 +551,9 @@ public Builder company(ItemCompany company) { return this; } + /** + *

    The default purchase tax rate for this item.

    + */ @JsonSetter(value = "purchase_tax_rate", nulls = Nulls.SKIP) public Builder purchaseTaxRate(Optional purchaseTaxRate) { this.purchaseTaxRate = purchaseTaxRate; @@ -485,6 +565,9 @@ public Builder purchaseTaxRate(ItemPurchaseTaxRate purchaseTaxRate) { return this; } + /** + *

    The default sales tax rate for this item.

    + */ @JsonSetter(value = "sales_tax_rate", nulls = Nulls.SKIP) public Builder salesTaxRate(Optional salesTaxRate) { this.salesTaxRate = salesTaxRate; @@ -496,6 +579,9 @@ public Builder salesTaxRate(ItemSalesTaxRate salesTaxRate) { return this; } + /** + *

    When the third party's item note was updated.

    + */ @JsonSetter(value = "remote_updated_at", nulls = Nulls.SKIP) public Builder remoteUpdatedAt(Optional remoteUpdatedAt) { this.remoteUpdatedAt = remoteUpdatedAt; @@ -507,6 +593,9 @@ public Builder remoteUpdatedAt(OffsetDateTime remoteUpdatedAt) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; @@ -548,6 +637,7 @@ public Item build() { modifiedAt, name, status, + type, unitPrice, purchasePrice, purchaseAccount, diff --git a/src/main/java/com/merge/api/accounting/types/ItemEndpointRequest.java b/src/main/java/com/merge/api/accounting/types/ItemEndpointRequest.java new file mode 100644 index 000000000..64ed1806b --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/ItemEndpointRequest.java @@ -0,0 +1,190 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.merge.api.core.ObjectMappers; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ItemEndpointRequest.Builder.class) +public final class ItemEndpointRequest { + private final Optional isDebugMode; + + private final Optional runAsync; + + private final ItemRequestRequest model; + + private final Map additionalProperties; + + private ItemEndpointRequest( + Optional isDebugMode, + Optional runAsync, + ItemRequestRequest model, + Map additionalProperties) { + this.isDebugMode = isDebugMode; + this.runAsync = runAsync; + this.model = model; + this.additionalProperties = additionalProperties; + } + + /** + * @return Whether to include debug fields (such as log file links) in the response. + */ + @JsonProperty("is_debug_mode") + public Optional getIsDebugMode() { + return isDebugMode; + } + + /** + * @return Whether or not third-party updates should be run asynchronously. + */ + @JsonProperty("run_async") + public Optional getRunAsync() { + return runAsync; + } + + @JsonProperty("model") + public ItemRequestRequest getModel() { + return model; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ItemEndpointRequest && equalTo((ItemEndpointRequest) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ItemEndpointRequest other) { + return isDebugMode.equals(other.isDebugMode) && runAsync.equals(other.runAsync) && model.equals(other.model); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.isDebugMode, this.runAsync, this.model); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ModelStage builder() { + return new Builder(); + } + + public interface ModelStage { + _FinalStage model(@NotNull ItemRequestRequest model); + + Builder from(ItemEndpointRequest other); + } + + public interface _FinalStage { + ItemEndpointRequest build(); + + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ + _FinalStage isDebugMode(Optional isDebugMode); + + _FinalStage isDebugMode(Boolean isDebugMode); + + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ + _FinalStage runAsync(Optional runAsync); + + _FinalStage runAsync(Boolean runAsync); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ModelStage, _FinalStage { + private ItemRequestRequest model; + + private Optional runAsync = Optional.empty(); + + private Optional isDebugMode = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ItemEndpointRequest other) { + isDebugMode(other.getIsDebugMode()); + runAsync(other.getRunAsync()); + model(other.getModel()); + return this; + } + + @java.lang.Override + @JsonSetter("model") + public _FinalStage model(@NotNull ItemRequestRequest model) { + this.model = model; + return this; + } + + /** + *

    Whether or not third-party updates should be run asynchronously.

    + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage runAsync(Boolean runAsync) { + this.runAsync = Optional.ofNullable(runAsync); + return this; + } + + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ + @java.lang.Override + @JsonSetter(value = "run_async", nulls = Nulls.SKIP) + public _FinalStage runAsync(Optional runAsync) { + this.runAsync = runAsync; + return this; + } + + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage isDebugMode(Boolean isDebugMode) { + this.isDebugMode = Optional.ofNullable(isDebugMode); + return this; + } + + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ + @java.lang.Override + @JsonSetter(value = "is_debug_mode", nulls = Nulls.SKIP) + public _FinalStage isDebugMode(Optional isDebugMode) { + this.isDebugMode = isDebugMode; + return this; + } + + @java.lang.Override + public ItemEndpointRequest build() { + return new ItemEndpointRequest(isDebugMode, runAsync, model, additionalProperties); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/ItemRequestRequest.java b/src/main/java/com/merge/api/accounting/types/ItemRequestRequest.java new file mode 100644 index 000000000..1ff085658 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/ItemRequestRequest.java @@ -0,0 +1,467 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.merge.api.core.ObjectMappers; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ItemRequestRequest.Builder.class) +public final class ItemRequestRequest { + private final Optional name; + + private final Optional status; + + private final Optional type; + + private final Optional unitPrice; + + private final Optional purchasePrice; + + private final Optional purchaseAccount; + + private final Optional salesAccount; + + private final Optional company; + + private final Optional purchaseTaxRate; + + private final Optional salesTaxRate; + + private final Optional> integrationParams; + + private final Optional> linkedAccountParams; + + private final Map additionalProperties; + + private ItemRequestRequest( + Optional name, + Optional status, + Optional type, + Optional unitPrice, + Optional purchasePrice, + Optional purchaseAccount, + Optional salesAccount, + Optional company, + Optional purchaseTaxRate, + Optional salesTaxRate, + Optional> integrationParams, + Optional> linkedAccountParams, + Map additionalProperties) { + this.name = name; + this.status = status; + this.type = type; + this.unitPrice = unitPrice; + this.purchasePrice = purchasePrice; + this.purchaseAccount = purchaseAccount; + this.salesAccount = salesAccount; + this.company = company; + this.purchaseTaxRate = purchaseTaxRate; + this.salesTaxRate = salesTaxRate; + this.integrationParams = integrationParams; + this.linkedAccountParams = linkedAccountParams; + this.additionalProperties = additionalProperties; + } + + /** + * @return The item's name. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return The item's status. + *
      + *
    • ACTIVE - ACTIVE
    • + *
    • ARCHIVED - ARCHIVED
    • + *
    + */ + @JsonProperty("status") + public Optional getStatus() { + return status; + } + + /** + * @return The item's type. + *
      + *
    • INVENTORY - INVENTORY
    • + *
    • NON_INVENTORY - NON_INVENTORY
    • + *
    • SERVICE - SERVICE
    • + *
    • UNKNOWN - UNKNOWN
    • + *
    + */ + @JsonProperty("type") + public Optional getType() { + return type; + } + + /** + * @return The item's unit price. + */ + @JsonProperty("unit_price") + public Optional getUnitPrice() { + return unitPrice; + } + + /** + * @return The price at which the item is purchased from a vendor. + */ + @JsonProperty("purchase_price") + public Optional getPurchasePrice() { + return purchasePrice; + } + + /** + * @return References the default account used to record a purchase of the item. + */ + @JsonProperty("purchase_account") + public Optional getPurchaseAccount() { + return purchaseAccount; + } + + /** + * @return References the default account used to record a sale. + */ + @JsonProperty("sales_account") + public Optional getSalesAccount() { + return salesAccount; + } + + /** + * @return The company the item belongs to. + */ + @JsonProperty("company") + public Optional getCompany() { + return company; + } + + /** + * @return The default purchase tax rate for this item. + */ + @JsonProperty("purchase_tax_rate") + public Optional getPurchaseTaxRate() { + return purchaseTaxRate; + } + + /** + * @return The default sales tax rate for this item. + */ + @JsonProperty("sales_tax_rate") + public Optional getSalesTaxRate() { + return salesTaxRate; + } + + @JsonProperty("integration_params") + public Optional> getIntegrationParams() { + return integrationParams; + } + + @JsonProperty("linked_account_params") + public Optional> getLinkedAccountParams() { + return linkedAccountParams; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ItemRequestRequest && equalTo((ItemRequestRequest) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ItemRequestRequest other) { + return name.equals(other.name) + && status.equals(other.status) + && type.equals(other.type) + && unitPrice.equals(other.unitPrice) + && purchasePrice.equals(other.purchasePrice) + && purchaseAccount.equals(other.purchaseAccount) + && salesAccount.equals(other.salesAccount) + && company.equals(other.company) + && purchaseTaxRate.equals(other.purchaseTaxRate) + && salesTaxRate.equals(other.salesTaxRate) + && integrationParams.equals(other.integrationParams) + && linkedAccountParams.equals(other.linkedAccountParams); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.name, + this.status, + this.type, + this.unitPrice, + this.purchasePrice, + this.purchaseAccount, + this.salesAccount, + this.company, + this.purchaseTaxRate, + this.salesTaxRate, + this.integrationParams, + this.linkedAccountParams); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional name = Optional.empty(); + + private Optional status = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional unitPrice = Optional.empty(); + + private Optional purchasePrice = Optional.empty(); + + private Optional purchaseAccount = Optional.empty(); + + private Optional salesAccount = Optional.empty(); + + private Optional company = Optional.empty(); + + private Optional purchaseTaxRate = Optional.empty(); + + private Optional salesTaxRate = Optional.empty(); + + private Optional> integrationParams = Optional.empty(); + + private Optional> linkedAccountParams = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ItemRequestRequest other) { + name(other.getName()); + status(other.getStatus()); + type(other.getType()); + unitPrice(other.getUnitPrice()); + purchasePrice(other.getPurchasePrice()); + purchaseAccount(other.getPurchaseAccount()); + salesAccount(other.getSalesAccount()); + company(other.getCompany()); + purchaseTaxRate(other.getPurchaseTaxRate()); + salesTaxRate(other.getSalesTaxRate()); + integrationParams(other.getIntegrationParams()); + linkedAccountParams(other.getLinkedAccountParams()); + return this; + } + + /** + *

    The item's name.

    + */ + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; + return this; + } + + public Builder name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

    The item's status.

    + *
      + *
    • ACTIVE - ACTIVE
    • + *
    • ARCHIVED - ARCHIVED
    • + *
    + */ + @JsonSetter(value = "status", nulls = Nulls.SKIP) + public Builder status(Optional status) { + this.status = status; + return this; + } + + public Builder status(ItemRequestRequestStatus status) { + this.status = Optional.ofNullable(status); + return this; + } + + /** + *

    The item's type.

    + *
      + *
    • INVENTORY - INVENTORY
    • + *
    • NON_INVENTORY - NON_INVENTORY
    • + *
    • SERVICE - SERVICE
    • + *
    • UNKNOWN - UNKNOWN
    • + *
    + */ + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public Builder type(Optional type) { + this.type = type; + return this; + } + + public Builder type(ItemRequestRequestType type) { + this.type = Optional.ofNullable(type); + return this; + } + + /** + *

    The item's unit price.

    + */ + @JsonSetter(value = "unit_price", nulls = Nulls.SKIP) + public Builder unitPrice(Optional unitPrice) { + this.unitPrice = unitPrice; + return this; + } + + public Builder unitPrice(Double unitPrice) { + this.unitPrice = Optional.ofNullable(unitPrice); + return this; + } + + /** + *

    The price at which the item is purchased from a vendor.

    + */ + @JsonSetter(value = "purchase_price", nulls = Nulls.SKIP) + public Builder purchasePrice(Optional purchasePrice) { + this.purchasePrice = purchasePrice; + return this; + } + + public Builder purchasePrice(Double purchasePrice) { + this.purchasePrice = Optional.ofNullable(purchasePrice); + return this; + } + + /** + *

    References the default account used to record a purchase of the item.

    + */ + @JsonSetter(value = "purchase_account", nulls = Nulls.SKIP) + public Builder purchaseAccount(Optional purchaseAccount) { + this.purchaseAccount = purchaseAccount; + return this; + } + + public Builder purchaseAccount(ItemRequestRequestPurchaseAccount purchaseAccount) { + this.purchaseAccount = Optional.ofNullable(purchaseAccount); + return this; + } + + /** + *

    References the default account used to record a sale.

    + */ + @JsonSetter(value = "sales_account", nulls = Nulls.SKIP) + public Builder salesAccount(Optional salesAccount) { + this.salesAccount = salesAccount; + return this; + } + + public Builder salesAccount(ItemRequestRequestSalesAccount salesAccount) { + this.salesAccount = Optional.ofNullable(salesAccount); + return this; + } + + /** + *

    The company the item belongs to.

    + */ + @JsonSetter(value = "company", nulls = Nulls.SKIP) + public Builder company(Optional company) { + this.company = company; + return this; + } + + public Builder company(ItemRequestRequestCompany company) { + this.company = Optional.ofNullable(company); + return this; + } + + /** + *

    The default purchase tax rate for this item.

    + */ + @JsonSetter(value = "purchase_tax_rate", nulls = Nulls.SKIP) + public Builder purchaseTaxRate(Optional purchaseTaxRate) { + this.purchaseTaxRate = purchaseTaxRate; + return this; + } + + public Builder purchaseTaxRate(ItemRequestRequestPurchaseTaxRate purchaseTaxRate) { + this.purchaseTaxRate = Optional.ofNullable(purchaseTaxRate); + return this; + } + + /** + *

    The default sales tax rate for this item.

    + */ + @JsonSetter(value = "sales_tax_rate", nulls = Nulls.SKIP) + public Builder salesTaxRate(Optional salesTaxRate) { + this.salesTaxRate = salesTaxRate; + return this; + } + + public Builder salesTaxRate(ItemRequestRequestSalesTaxRate salesTaxRate) { + this.salesTaxRate = Optional.ofNullable(salesTaxRate); + return this; + } + + @JsonSetter(value = "integration_params", nulls = Nulls.SKIP) + public Builder integrationParams(Optional> integrationParams) { + this.integrationParams = integrationParams; + return this; + } + + public Builder integrationParams(Map integrationParams) { + this.integrationParams = Optional.ofNullable(integrationParams); + return this; + } + + @JsonSetter(value = "linked_account_params", nulls = Nulls.SKIP) + public Builder linkedAccountParams(Optional> linkedAccountParams) { + this.linkedAccountParams = linkedAccountParams; + return this; + } + + public Builder linkedAccountParams(Map linkedAccountParams) { + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); + return this; + } + + public ItemRequestRequest build() { + return new ItemRequestRequest( + name, + status, + type, + unitPrice, + purchasePrice, + purchaseAccount, + salesAccount, + company, + purchaseTaxRate, + salesTaxRate, + integrationParams, + linkedAccountParams, + additionalProperties); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/ItemRequestRequestCompany.java b/src/main/java/com/merge/api/accounting/types/ItemRequestRequestCompany.java new file mode 100644 index 000000000..27a97781e --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/ItemRequestRequestCompany.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = ItemRequestRequestCompany.Deserializer.class) +public final class ItemRequestRequestCompany { + private final Object value; + + private final int type; + + private ItemRequestRequestCompany(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((CompanyInfo) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ItemRequestRequestCompany && equalTo((ItemRequestRequestCompany) other); + } + + private boolean equalTo(ItemRequestRequestCompany other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static ItemRequestRequestCompany of(String value) { + return new ItemRequestRequestCompany(value, 0); + } + + public static ItemRequestRequestCompany of(CompanyInfo value) { + return new ItemRequestRequestCompany(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(CompanyInfo value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(ItemRequestRequestCompany.class); + } + + @java.lang.Override + public ItemRequestRequestCompany deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, CompanyInfo.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/ItemRequestRequestPurchaseAccount.java b/src/main/java/com/merge/api/accounting/types/ItemRequestRequestPurchaseAccount.java new file mode 100644 index 000000000..3b6b41bd6 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/ItemRequestRequestPurchaseAccount.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = ItemRequestRequestPurchaseAccount.Deserializer.class) +public final class ItemRequestRequestPurchaseAccount { + private final Object value; + + private final int type; + + private ItemRequestRequestPurchaseAccount(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((Account) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ItemRequestRequestPurchaseAccount && equalTo((ItemRequestRequestPurchaseAccount) other); + } + + private boolean equalTo(ItemRequestRequestPurchaseAccount other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static ItemRequestRequestPurchaseAccount of(String value) { + return new ItemRequestRequestPurchaseAccount(value, 0); + } + + public static ItemRequestRequestPurchaseAccount of(Account value) { + return new ItemRequestRequestPurchaseAccount(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(Account value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(ItemRequestRequestPurchaseAccount.class); + } + + @java.lang.Override + public ItemRequestRequestPurchaseAccount deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, Account.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/ItemRequestRequestPurchaseTaxRate.java b/src/main/java/com/merge/api/accounting/types/ItemRequestRequestPurchaseTaxRate.java new file mode 100644 index 000000000..8c14398a8 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/ItemRequestRequestPurchaseTaxRate.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = ItemRequestRequestPurchaseTaxRate.Deserializer.class) +public final class ItemRequestRequestPurchaseTaxRate { + private final Object value; + + private final int type; + + private ItemRequestRequestPurchaseTaxRate(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((TaxRate) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ItemRequestRequestPurchaseTaxRate && equalTo((ItemRequestRequestPurchaseTaxRate) other); + } + + private boolean equalTo(ItemRequestRequestPurchaseTaxRate other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static ItemRequestRequestPurchaseTaxRate of(String value) { + return new ItemRequestRequestPurchaseTaxRate(value, 0); + } + + public static ItemRequestRequestPurchaseTaxRate of(TaxRate value) { + return new ItemRequestRequestPurchaseTaxRate(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(TaxRate value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(ItemRequestRequestPurchaseTaxRate.class); + } + + @java.lang.Override + public ItemRequestRequestPurchaseTaxRate deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TaxRate.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/ItemRequestRequestSalesAccount.java b/src/main/java/com/merge/api/accounting/types/ItemRequestRequestSalesAccount.java new file mode 100644 index 000000000..d551c8506 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/ItemRequestRequestSalesAccount.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = ItemRequestRequestSalesAccount.Deserializer.class) +public final class ItemRequestRequestSalesAccount { + private final Object value; + + private final int type; + + private ItemRequestRequestSalesAccount(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((Account) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ItemRequestRequestSalesAccount && equalTo((ItemRequestRequestSalesAccount) other); + } + + private boolean equalTo(ItemRequestRequestSalesAccount other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static ItemRequestRequestSalesAccount of(String value) { + return new ItemRequestRequestSalesAccount(value, 0); + } + + public static ItemRequestRequestSalesAccount of(Account value) { + return new ItemRequestRequestSalesAccount(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(Account value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(ItemRequestRequestSalesAccount.class); + } + + @java.lang.Override + public ItemRequestRequestSalesAccount deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, Account.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/ItemRequestRequestSalesTaxRate.java b/src/main/java/com/merge/api/accounting/types/ItemRequestRequestSalesTaxRate.java new file mode 100644 index 000000000..277f999cc --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/ItemRequestRequestSalesTaxRate.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = ItemRequestRequestSalesTaxRate.Deserializer.class) +public final class ItemRequestRequestSalesTaxRate { + private final Object value; + + private final int type; + + private ItemRequestRequestSalesTaxRate(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((TaxRate) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ItemRequestRequestSalesTaxRate && equalTo((ItemRequestRequestSalesTaxRate) other); + } + + private boolean equalTo(ItemRequestRequestSalesTaxRate other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static ItemRequestRequestSalesTaxRate of(String value) { + return new ItemRequestRequestSalesTaxRate(value, 0); + } + + public static ItemRequestRequestSalesTaxRate of(TaxRate value) { + return new ItemRequestRequestSalesTaxRate(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(TaxRate value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(ItemRequestRequestSalesTaxRate.class); + } + + @java.lang.Override + public ItemRequestRequestSalesTaxRate deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TaxRate.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/ItemRequestRequestStatus.java b/src/main/java/com/merge/api/accounting/types/ItemRequestRequestStatus.java new file mode 100644 index 000000000..575751cd6 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/ItemRequestRequestStatus.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = ItemRequestRequestStatus.Deserializer.class) +public final class ItemRequestRequestStatus { + private final Object value; + + private final int type; + + private ItemRequestRequestStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((Status7D1Enum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ItemRequestRequestStatus && equalTo((ItemRequestRequestStatus) other); + } + + private boolean equalTo(ItemRequestRequestStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static ItemRequestRequestStatus of(Status7D1Enum value) { + return new ItemRequestRequestStatus(value, 0); + } + + public static ItemRequestRequestStatus of(String value) { + return new ItemRequestRequestStatus(value, 1); + } + + public interface Visitor { + T visit(Status7D1Enum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(ItemRequestRequestStatus.class); + } + + @java.lang.Override + public ItemRequestRequestStatus deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, Status7D1Enum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/ItemRequestRequestType.java b/src/main/java/com/merge/api/accounting/types/ItemRequestRequestType.java new file mode 100644 index 000000000..c20835b14 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/ItemRequestRequestType.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = ItemRequestRequestType.Deserializer.class) +public final class ItemRequestRequestType { + private final Object value; + + private final int type; + + private ItemRequestRequestType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((Type2BbEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ItemRequestRequestType && equalTo((ItemRequestRequestType) other); + } + + private boolean equalTo(ItemRequestRequestType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static ItemRequestRequestType of(Type2BbEnum value) { + return new ItemRequestRequestType(value, 0); + } + + public static ItemRequestRequestType of(String value) { + return new ItemRequestRequestType(value, 1); + } + + public interface Visitor { + T visit(Type2BbEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(ItemRequestRequestType.class); + } + + @java.lang.Override + public ItemRequestRequestType deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, Type2BbEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/ItemResponse.java b/src/main/java/com/merge/api/accounting/types/ItemResponse.java new file mode 100644 index 000000000..bf228a7ea --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/ItemResponse.java @@ -0,0 +1,216 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.merge.api.core.ObjectMappers; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ItemResponse.Builder.class) +public final class ItemResponse { + private final Item model; + + private final List warnings; + + private final List errors; + + private final Optional> logs; + + private final Map additionalProperties; + + private ItemResponse( + Item model, + List warnings, + List errors, + Optional> logs, + Map additionalProperties) { + this.model = model; + this.warnings = warnings; + this.errors = errors; + this.logs = logs; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("model") + public Item getModel() { + return model; + } + + @JsonProperty("warnings") + public List getWarnings() { + return warnings; + } + + @JsonProperty("errors") + public List getErrors() { + return errors; + } + + @JsonProperty("logs") + public Optional> getLogs() { + return logs; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ItemResponse && equalTo((ItemResponse) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ItemResponse other) { + return model.equals(other.model) + && warnings.equals(other.warnings) + && errors.equals(other.errors) + && logs.equals(other.logs); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.model, this.warnings, this.errors, this.logs); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ModelStage builder() { + return new Builder(); + } + + public interface ModelStage { + _FinalStage model(@NotNull Item model); + + Builder from(ItemResponse other); + } + + public interface _FinalStage { + ItemResponse build(); + + _FinalStage warnings(List warnings); + + _FinalStage addWarnings(WarningValidationProblem warnings); + + _FinalStage addAllWarnings(List warnings); + + _FinalStage errors(List errors); + + _FinalStage addErrors(ErrorValidationProblem errors); + + _FinalStage addAllErrors(List errors); + + _FinalStage logs(Optional> logs); + + _FinalStage logs(List logs); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ModelStage, _FinalStage { + private Item model; + + private Optional> logs = Optional.empty(); + + private List errors = new ArrayList<>(); + + private List warnings = new ArrayList<>(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(ItemResponse other) { + model(other.getModel()); + warnings(other.getWarnings()); + errors(other.getErrors()); + logs(other.getLogs()); + return this; + } + + @java.lang.Override + @JsonSetter("model") + public _FinalStage model(@NotNull Item model) { + this.model = model; + return this; + } + + @java.lang.Override + public _FinalStage logs(List logs) { + this.logs = Optional.ofNullable(logs); + return this; + } + + @java.lang.Override + @JsonSetter(value = "logs", nulls = Nulls.SKIP) + public _FinalStage logs(Optional> logs) { + this.logs = logs; + return this; + } + + @java.lang.Override + public _FinalStage addAllErrors(List errors) { + this.errors.addAll(errors); + return this; + } + + @java.lang.Override + public _FinalStage addErrors(ErrorValidationProblem errors) { + this.errors.add(errors); + return this; + } + + @java.lang.Override + @JsonSetter(value = "errors", nulls = Nulls.SKIP) + public _FinalStage errors(List errors) { + this.errors.clear(); + this.errors.addAll(errors); + return this; + } + + @java.lang.Override + public _FinalStage addAllWarnings(List warnings) { + this.warnings.addAll(warnings); + return this; + } + + @java.lang.Override + public _FinalStage addWarnings(WarningValidationProblem warnings) { + this.warnings.add(warnings); + return this; + } + + @java.lang.Override + @JsonSetter(value = "warnings", nulls = Nulls.SKIP) + public _FinalStage warnings(List warnings) { + this.warnings.clear(); + this.warnings.addAll(warnings); + return this; + } + + @java.lang.Override + public ItemResponse build() { + return new ItemResponse(model, warnings, errors, logs, additionalProperties); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/ItemStatus.java b/src/main/java/com/merge/api/accounting/types/ItemStatus.java new file mode 100644 index 000000000..f8aedebe0 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/ItemStatus.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = ItemStatus.Deserializer.class) +public final class ItemStatus { + private final Object value; + + private final int type; + + private ItemStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((Status7D1Enum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ItemStatus && equalTo((ItemStatus) other); + } + + private boolean equalTo(ItemStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static ItemStatus of(Status7D1Enum value) { + return new ItemStatus(value, 0); + } + + public static ItemStatus of(String value) { + return new ItemStatus(value, 1); + } + + public interface Visitor { + T visit(Status7D1Enum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(ItemStatus.class); + } + + @java.lang.Override + public ItemStatus deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, Status7D1Enum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/ItemType.java b/src/main/java/com/merge/api/accounting/types/ItemType.java new file mode 100644 index 000000000..e86e5bf3e --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/ItemType.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = ItemType.Deserializer.class) +public final class ItemType { + private final Object value; + + private final int type; + + private ItemType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((Type2BbEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ItemType && equalTo((ItemType) other); + } + + private boolean equalTo(ItemType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static ItemType of(Type2BbEnum value) { + return new ItemType(value, 0); + } + + public static ItemType of(String value) { + return new ItemType(value, 1); + } + + public interface Visitor { + T visit(Type2BbEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(ItemType.class); + } + + @java.lang.Override + public ItemType deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, Type2BbEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/ItemsListRequest.java b/src/main/java/com/merge/api/accounting/types/ItemsListRequest.java index 655dcfc8e..717195b53 100644 --- a/src/main/java/com/merge/api/accounting/types/ItemsListRequest.java +++ b/src/main/java/com/merge/api/accounting/types/ItemsListRequest.java @@ -307,6 +307,9 @@ public Builder from(ItemsListRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -323,6 +326,9 @@ public Builder expand(ItemsListRequestExpandItem expand) { return this; } + /** + *

    If provided, will only return items for this company.

    + */ @JsonSetter(value = "company_id", nulls = Nulls.SKIP) public Builder companyId(Optional companyId) { this.companyId = companyId; @@ -334,6 +340,9 @@ public Builder companyId(String companyId) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -345,6 +354,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -356,6 +368,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -367,6 +382,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -378,6 +396,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -389,6 +410,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -400,6 +424,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -411,6 +438,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -422,6 +452,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -433,6 +466,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    Deprecated. Use show_enum_origins.

    + */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -444,6 +480,9 @@ public Builder remoteFields(String remoteFields) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -455,6 +494,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    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

    + */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; diff --git a/src/main/java/com/merge/api/accounting/types/ItemsRetrieveRequest.java b/src/main/java/com/merge/api/accounting/types/ItemsRetrieveRequest.java index 43ac4857d..1af183b67 100644 --- a/src/main/java/com/merge/api/accounting/types/ItemsRetrieveRequest.java +++ b/src/main/java/com/merge/api/accounting/types/ItemsRetrieveRequest.java @@ -149,6 +149,9 @@ public Builder from(ItemsRetrieveRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -165,6 +168,9 @@ public Builder expand(ItemsRetrieveRequestExpandItem expand) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -176,6 +182,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -187,6 +196,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    Deprecated. Use show_enum_origins.

    + */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -198,6 +210,9 @@ public Builder remoteFields(String remoteFields) { return this; } + /** + *

    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

    + */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; diff --git a/src/main/java/com/merge/api/accounting/types/JournalEntriesLinesRemoteFieldClassesListRequest.java b/src/main/java/com/merge/api/accounting/types/JournalEntriesLinesRemoteFieldClassesListRequest.java index a02c8bfff..6085e22de 100644 --- a/src/main/java/com/merge/api/accounting/types/JournalEntriesLinesRemoteFieldClassesListRequest.java +++ b/src/main/java/com/merge/api/accounting/types/JournalEntriesLinesRemoteFieldClassesListRequest.java @@ -30,6 +30,8 @@ public final class JournalEntriesLinesRemoteFieldClassesListRequest { private final Optional isCommonModelField; + private final Optional isCustom; + private final Optional pageSize; private final Map additionalProperties; @@ -40,6 +42,7 @@ private JournalEntriesLinesRemoteFieldClassesListRequest( Optional includeRemoteData, Optional includeShellData, Optional isCommonModelField, + Optional isCustom, Optional pageSize, Map additionalProperties) { this.cursor = cursor; @@ -47,6 +50,7 @@ private JournalEntriesLinesRemoteFieldClassesListRequest( this.includeRemoteData = includeRemoteData; this.includeShellData = includeShellData; this.isCommonModelField = isCommonModelField; + this.isCustom = isCustom; this.pageSize = pageSize; this.additionalProperties = additionalProperties; } @@ -91,6 +95,14 @@ public Optional getIsCommonModelField() { return isCommonModelField; } + /** + * @return If provided, will only return remote fields classes with this is_custom value + */ + @JsonProperty("is_custom") + public Optional getIsCustom() { + return isCustom; + } + /** * @return Number of results to return per page. */ @@ -117,6 +129,7 @@ private boolean equalTo(JournalEntriesLinesRemoteFieldClassesListRequest other) && includeRemoteData.equals(other.includeRemoteData) && includeShellData.equals(other.includeShellData) && isCommonModelField.equals(other.isCommonModelField) + && isCustom.equals(other.isCustom) && pageSize.equals(other.pageSize); } @@ -128,6 +141,7 @@ public int hashCode() { this.includeRemoteData, this.includeShellData, this.isCommonModelField, + this.isCustom, this.pageSize); } @@ -152,6 +166,8 @@ public static final class Builder { private Optional isCommonModelField = Optional.empty(); + private Optional isCustom = Optional.empty(); + private Optional pageSize = Optional.empty(); @JsonAnySetter @@ -165,10 +181,14 @@ public Builder from(JournalEntriesLinesRemoteFieldClassesListRequest other) { includeRemoteData(other.getIncludeRemoteData()); includeShellData(other.getIncludeShellData()); isCommonModelField(other.getIsCommonModelField()); + isCustom(other.getIsCustom()); pageSize(other.getPageSize()); return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -180,6 +200,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -191,6 +214,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -202,6 +228,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -213,6 +242,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, will only return remote field classes with this is_common_model_field value

    + */ @JsonSetter(value = "is_common_model_field", nulls = Nulls.SKIP) public Builder isCommonModelField(Optional isCommonModelField) { this.isCommonModelField = isCommonModelField; @@ -224,6 +256,23 @@ public Builder isCommonModelField(Boolean isCommonModelField) { return this; } + /** + *

    If provided, will only return remote fields classes with this is_custom value

    + */ + @JsonSetter(value = "is_custom", nulls = Nulls.SKIP) + public Builder isCustom(Optional isCustom) { + this.isCustom = isCustom; + return this; + } + + public Builder isCustom(Boolean isCustom) { + this.isCustom = Optional.ofNullable(isCustom); + return this; + } + + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -242,6 +291,7 @@ public JournalEntriesLinesRemoteFieldClassesListRequest build() { includeRemoteData, includeShellData, isCommonModelField, + isCustom, pageSize, additionalProperties); } diff --git a/src/main/java/com/merge/api/accounting/types/JournalEntriesListRequest.java b/src/main/java/com/merge/api/accounting/types/JournalEntriesListRequest.java index 9aa496330..30ce7318e 100644 --- a/src/main/java/com/merge/api/accounting/types/JournalEntriesListRequest.java +++ b/src/main/java/com/merge/api/accounting/types/JournalEntriesListRequest.java @@ -324,6 +324,9 @@ public Builder from(JournalEntriesListRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -340,6 +343,9 @@ public Builder expand(JournalEntriesListRequestExpandItem expand) { return this; } + /** + *

    If provided, will only return journal entries for this company.

    + */ @JsonSetter(value = "company_id", nulls = Nulls.SKIP) public Builder companyId(Optional companyId) { this.companyId = companyId; @@ -351,6 +357,9 @@ public Builder companyId(String companyId) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -362,6 +371,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -373,6 +385,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -384,6 +399,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -395,6 +413,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -406,6 +427,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

    + */ @JsonSetter(value = "include_remote_fields", nulls = Nulls.SKIP) public Builder includeRemoteFields(Optional includeRemoteFields) { this.includeRemoteFields = includeRemoteFields; @@ -417,6 +441,9 @@ public Builder includeRemoteFields(Boolean includeRemoteFields) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -428,6 +455,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -439,6 +469,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -450,6 +483,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -461,6 +497,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -472,6 +511,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "transaction_date_after", nulls = Nulls.SKIP) public Builder transactionDateAfter(Optional transactionDateAfter) { this.transactionDateAfter = transactionDateAfter; @@ -483,6 +525,9 @@ public Builder transactionDateAfter(OffsetDateTime transactionDateAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "transaction_date_before", nulls = Nulls.SKIP) public Builder transactionDateBefore(Optional transactionDateBefore) { this.transactionDateBefore = transactionDateBefore; diff --git a/src/main/java/com/merge/api/accounting/types/JournalEntriesRemoteFieldClassesListRequest.java b/src/main/java/com/merge/api/accounting/types/JournalEntriesRemoteFieldClassesListRequest.java index 92de713d0..9d39cb83f 100644 --- a/src/main/java/com/merge/api/accounting/types/JournalEntriesRemoteFieldClassesListRequest.java +++ b/src/main/java/com/merge/api/accounting/types/JournalEntriesRemoteFieldClassesListRequest.java @@ -30,6 +30,8 @@ public final class JournalEntriesRemoteFieldClassesListRequest { private final Optional isCommonModelField; + private final Optional isCustom; + private final Optional pageSize; private final Map additionalProperties; @@ -40,6 +42,7 @@ private JournalEntriesRemoteFieldClassesListRequest( Optional includeRemoteData, Optional includeShellData, Optional isCommonModelField, + Optional isCustom, Optional pageSize, Map additionalProperties) { this.cursor = cursor; @@ -47,6 +50,7 @@ private JournalEntriesRemoteFieldClassesListRequest( this.includeRemoteData = includeRemoteData; this.includeShellData = includeShellData; this.isCommonModelField = isCommonModelField; + this.isCustom = isCustom; this.pageSize = pageSize; this.additionalProperties = additionalProperties; } @@ -91,6 +95,14 @@ public Optional getIsCommonModelField() { return isCommonModelField; } + /** + * @return If provided, will only return remote fields classes with this is_custom value + */ + @JsonProperty("is_custom") + public Optional getIsCustom() { + return isCustom; + } + /** * @return Number of results to return per page. */ @@ -117,6 +129,7 @@ private boolean equalTo(JournalEntriesRemoteFieldClassesListRequest other) { && includeRemoteData.equals(other.includeRemoteData) && includeShellData.equals(other.includeShellData) && isCommonModelField.equals(other.isCommonModelField) + && isCustom.equals(other.isCustom) && pageSize.equals(other.pageSize); } @@ -128,6 +141,7 @@ public int hashCode() { this.includeRemoteData, this.includeShellData, this.isCommonModelField, + this.isCustom, this.pageSize); } @@ -152,6 +166,8 @@ public static final class Builder { private Optional isCommonModelField = Optional.empty(); + private Optional isCustom = Optional.empty(); + private Optional pageSize = Optional.empty(); @JsonAnySetter @@ -165,10 +181,14 @@ public Builder from(JournalEntriesRemoteFieldClassesListRequest other) { includeRemoteData(other.getIncludeRemoteData()); includeShellData(other.getIncludeShellData()); isCommonModelField(other.getIsCommonModelField()); + isCustom(other.getIsCustom()); pageSize(other.getPageSize()); return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -180,6 +200,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -191,6 +214,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -202,6 +228,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -213,6 +242,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, will only return remote field classes with this is_common_model_field value

    + */ @JsonSetter(value = "is_common_model_field", nulls = Nulls.SKIP) public Builder isCommonModelField(Optional isCommonModelField) { this.isCommonModelField = isCommonModelField; @@ -224,6 +256,23 @@ public Builder isCommonModelField(Boolean isCommonModelField) { return this; } + /** + *

    If provided, will only return remote fields classes with this is_custom value

    + */ + @JsonSetter(value = "is_custom", nulls = Nulls.SKIP) + public Builder isCustom(Optional isCustom) { + this.isCustom = isCustom; + return this; + } + + public Builder isCustom(Boolean isCustom) { + this.isCustom = Optional.ofNullable(isCustom); + return this; + } + + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -242,6 +291,7 @@ public JournalEntriesRemoteFieldClassesListRequest build() { includeRemoteData, includeShellData, isCommonModelField, + isCustom, pageSize, additionalProperties); } diff --git a/src/main/java/com/merge/api/accounting/types/JournalEntriesRetrieveRequest.java b/src/main/java/com/merge/api/accounting/types/JournalEntriesRetrieveRequest.java index e7edfb7fe..91d33b4aa 100644 --- a/src/main/java/com/merge/api/accounting/types/JournalEntriesRetrieveRequest.java +++ b/src/main/java/com/merge/api/accounting/types/JournalEntriesRetrieveRequest.java @@ -132,6 +132,9 @@ public Builder from(JournalEntriesRetrieveRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -148,6 +151,9 @@ public Builder expand(JournalEntriesRetrieveRequestExpandItem expand) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -159,6 +165,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

    + */ @JsonSetter(value = "include_remote_fields", nulls = Nulls.SKIP) public Builder includeRemoteFields(Optional includeRemoteFields) { this.includeRemoteFields = includeRemoteFields; @@ -170,6 +179,9 @@ public Builder includeRemoteFields(Boolean includeRemoteFields) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/accounting/types/JournalEntry.java b/src/main/java/com/merge/api/accounting/types/JournalEntry.java index 6b992d3a2..ef61d5c49 100644 --- a/src/main/java/com/merge/api/accounting/types/JournalEntry.java +++ b/src/main/java/com/merge/api/accounting/types/JournalEntry.java @@ -39,7 +39,7 @@ public final class JournalEntry { private final Optional memo; - private final Optional currency; + private final Optional currency; private final Optional exchangeRate; @@ -55,7 +55,7 @@ public final class JournalEntry { private final Optional remoteWasDeleted; - private final Optional postingStatus; + private final Optional postingStatus; private final Optional accountingPeriod; @@ -80,7 +80,7 @@ private JournalEntry( Optional>> payments, Optional>> appliedPayments, Optional memo, - Optional currency, + Optional currency, Optional exchangeRate, Optional company, Optional inclusiveOfTax, @@ -88,7 +88,7 @@ private JournalEntry( Optional journalNumber, Optional>> trackingCategories, Optional remoteWasDeleted, - Optional postingStatus, + Optional postingStatus, Optional accountingPeriod, Optional remoteCreatedAt, Optional remoteUpdatedAt, @@ -495,7 +495,7 @@ public Optional getMemo() { * */ @JsonProperty("currency") - public Optional getCurrency() { + public Optional getCurrency() { return currency; } @@ -557,7 +557,7 @@ public Optional getRemoteWasDeleted() { * */ @JsonProperty("posting_status") - public Optional getPostingStatus() { + public Optional getPostingStatus() { return postingStatus; } @@ -692,7 +692,7 @@ public static final class Builder { private Optional memo = Optional.empty(); - private Optional currency = Optional.empty(); + private Optional currency = Optional.empty(); private Optional exchangeRate = Optional.empty(); @@ -708,7 +708,7 @@ public static final class Builder { private Optional remoteWasDeleted = Optional.empty(); - private Optional postingStatus = Optional.empty(); + private Optional postingStatus = Optional.empty(); private Optional accountingPeriod = Optional.empty(); @@ -765,6 +765,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -776,6 +779,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -787,6 +793,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -798,6 +807,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The journal entry's transaction date.

    + */ @JsonSetter(value = "transaction_date", nulls = Nulls.SKIP) public Builder transactionDate(Optional transactionDate) { this.transactionDate = transactionDate; @@ -809,6 +821,9 @@ public Builder transactionDate(OffsetDateTime transactionDate) { return this; } + /** + *

    Array of Payment object IDs.

    + */ @JsonSetter(value = "payments", nulls = Nulls.SKIP) public Builder payments(Optional>> payments) { this.payments = payments; @@ -820,6 +835,9 @@ public Builder payments(List> payments) { return this; } + /** + *

    A list of the Payment Applied to Lines common models related to a given Invoice, Credit Note, or Journal Entry.

    + */ @JsonSetter(value = "applied_payments", nulls = Nulls.SKIP) public Builder appliedPayments(Optional>> appliedPayments) { this.appliedPayments = appliedPayments; @@ -831,6 +849,9 @@ public Builder appliedPayments(List> a return this; } + /** + *

    The journal entry's private note.

    + */ @JsonSetter(value = "memo", nulls = Nulls.SKIP) public Builder memo(Optional memo) { this.memo = memo; @@ -842,17 +863,331 @@ public Builder memo(String memo) { return this; } + /** + *

    The journal's currency.

    + *
      + *
    • XUA - ADB Unit of Account
    • + *
    • AFN - Afghan Afghani
    • + *
    • AFA - Afghan Afghani (1927–2002)
    • + *
    • ALL - Albanian Lek
    • + *
    • ALK - Albanian Lek (1946–1965)
    • + *
    • DZD - Algerian Dinar
    • + *
    • ADP - Andorran Peseta
    • + *
    • AOA - Angolan Kwanza
    • + *
    • AOK - Angolan Kwanza (1977–1991)
    • + *
    • AON - Angolan New Kwanza (1990–2000)
    • + *
    • AOR - Angolan Readjusted Kwanza (1995–1999)
    • + *
    • ARA - Argentine Austral
    • + *
    • ARS - Argentine Peso
    • + *
    • ARM - Argentine Peso (1881–1970)
    • + *
    • ARP - Argentine Peso (1983–1985)
    • + *
    • ARL - Argentine Peso Ley (1970–1983)
    • + *
    • AMD - Armenian Dram
    • + *
    • AWG - Aruban Florin
    • + *
    • AUD - Australian Dollar
    • + *
    • ATS - Austrian Schilling
    • + *
    • AZN - Azerbaijani Manat
    • + *
    • AZM - Azerbaijani Manat (1993–2006)
    • + *
    • BSD - Bahamian Dollar
    • + *
    • BHD - Bahraini Dinar
    • + *
    • BDT - Bangladeshi Taka
    • + *
    • BBD - Barbadian Dollar
    • + *
    • BYN - Belarusian Ruble
    • + *
    • BYB - Belarusian Ruble (1994–1999)
    • + *
    • BYR - Belarusian Ruble (2000–2016)
    • + *
    • BEF - Belgian Franc
    • + *
    • BEC - Belgian Franc (convertible)
    • + *
    • BEL - Belgian Franc (financial)
    • + *
    • BZD - Belize Dollar
    • + *
    • BMD - Bermudan Dollar
    • + *
    • BTN - Bhutanese Ngultrum
    • + *
    • BOB - Bolivian Boliviano
    • + *
    • BOL - Bolivian Boliviano (1863–1963)
    • + *
    • BOV - Bolivian Mvdol
    • + *
    • BOP - Bolivian Peso
    • + *
    • BAM - Bosnia-Herzegovina Convertible Mark
    • + *
    • BAD - Bosnia-Herzegovina Dinar (1992–1994)
    • + *
    • BAN - Bosnia-Herzegovina New Dinar (1994–1997)
    • + *
    • BWP - Botswanan Pula
    • + *
    • BRC - Brazilian Cruzado (1986–1989)
    • + *
    • BRZ - Brazilian Cruzeiro (1942–1967)
    • + *
    • BRE - Brazilian Cruzeiro (1990–1993)
    • + *
    • BRR - Brazilian Cruzeiro (1993–1994)
    • + *
    • BRN - Brazilian New Cruzado (1989–1990)
    • + *
    • BRB - Brazilian New Cruzeiro (1967–1986)
    • + *
    • BRL - Brazilian Real
    • + *
    • GBP - British Pound
    • + *
    • BND - Brunei Dollar
    • + *
    • BGL - Bulgarian Hard Lev
    • + *
    • BGN - Bulgarian Lev
    • + *
    • BGO - Bulgarian Lev (1879–1952)
    • + *
    • BGM - Bulgarian Socialist Lev
    • + *
    • BUK - Burmese Kyat
    • + *
    • BIF - Burundian Franc
    • + *
    • XPF - CFP Franc
    • + *
    • KHR - Cambodian Riel
    • + *
    • CAD - Canadian Dollar
    • + *
    • CVE - Cape Verdean Escudo
    • + *
    • KYD - Cayman Islands Dollar
    • + *
    • XAF - Central African CFA Franc
    • + *
    • CLE - Chilean Escudo
    • + *
    • CLP - Chilean Peso
    • + *
    • CLF - Chilean Unit of Account (UF)
    • + *
    • CNX - Chinese People’s Bank Dollar
    • + *
    • CNY - Chinese Yuan
    • + *
    • CNH - Chinese Yuan (offshore)
    • + *
    • COP - Colombian Peso
    • + *
    • COU - Colombian Real Value Unit
    • + *
    • KMF - Comorian Franc
    • + *
    • CDF - Congolese Franc
    • + *
    • CRC - Costa Rican Colón
    • + *
    • HRD - Croatian Dinar
    • + *
    • HRK - Croatian Kuna
    • + *
    • CUC - Cuban Convertible Peso
    • + *
    • CUP - Cuban Peso
    • + *
    • CYP - Cypriot Pound
    • + *
    • CZK - Czech Koruna
    • + *
    • CSK - Czechoslovak Hard Koruna
    • + *
    • DKK - Danish Krone
    • + *
    • DJF - Djiboutian Franc
    • + *
    • DOP - Dominican Peso
    • + *
    • NLG - Dutch Guilder
    • + *
    • XCD - East Caribbean Dollar
    • + *
    • DDM - East German Mark
    • + *
    • ECS - Ecuadorian Sucre
    • + *
    • ECV - Ecuadorian Unit of Constant Value
    • + *
    • EGP - Egyptian Pound
    • + *
    • GQE - Equatorial Guinean Ekwele
    • + *
    • ERN - Eritrean Nakfa
    • + *
    • EEK - Estonian Kroon
    • + *
    • ETB - Ethiopian Birr
    • + *
    • EUR - Euro
    • + *
    • XBA - European Composite Unit
    • + *
    • XEU - European Currency Unit
    • + *
    • XBB - European Monetary Unit
    • + *
    • XBC - European Unit of Account (XBC)
    • + *
    • XBD - European Unit of Account (XBD)
    • + *
    • FKP - Falkland Islands Pound
    • + *
    • FJD - Fijian Dollar
    • + *
    • FIM - Finnish Markka
    • + *
    • FRF - French Franc
    • + *
    • XFO - French Gold Franc
    • + *
    • XFU - French UIC-Franc
    • + *
    • GMD - Gambian Dalasi
    • + *
    • GEK - Georgian Kupon Larit
    • + *
    • GEL - Georgian Lari
    • + *
    • DEM - German Mark
    • + *
    • GHS - Ghanaian Cedi
    • + *
    • GHC - Ghanaian Cedi (1979–2007)
    • + *
    • GIP - Gibraltar Pound
    • + *
    • XAU - Gold
    • + *
    • GRD - Greek Drachma
    • + *
    • GTQ - Guatemalan Quetzal
    • + *
    • GWP - Guinea-Bissau Peso
    • + *
    • GNF - Guinean Franc
    • + *
    • GNS - Guinean Syli
    • + *
    • GYD - Guyanaese Dollar
    • + *
    • HTG - Haitian Gourde
    • + *
    • HNL - Honduran Lempira
    • + *
    • HKD - Hong Kong Dollar
    • + *
    • HUF - Hungarian Forint
    • + *
    • IMP - IMP
    • + *
    • ISK - Icelandic Króna
    • + *
    • ISJ - Icelandic Króna (1918–1981)
    • + *
    • INR - Indian Rupee
    • + *
    • IDR - Indonesian Rupiah
    • + *
    • IRR - Iranian Rial
    • + *
    • IQD - Iraqi Dinar
    • + *
    • IEP - Irish Pound
    • + *
    • ILS - Israeli New Shekel
    • + *
    • ILP - Israeli Pound
    • + *
    • ILR - Israeli Shekel (1980–1985)
    • + *
    • ITL - Italian Lira
    • + *
    • JMD - Jamaican Dollar
    • + *
    • JPY - Japanese Yen
    • + *
    • JOD - Jordanian Dinar
    • + *
    • KZT - Kazakhstani Tenge
    • + *
    • KES - Kenyan Shilling
    • + *
    • KWD - Kuwaiti Dinar
    • + *
    • KGS - Kyrgystani Som
    • + *
    • LAK - Laotian Kip
    • + *
    • LVL - Latvian Lats
    • + *
    • LVR - Latvian Ruble
    • + *
    • LBP - Lebanese Pound
    • + *
    • LSL - Lesotho Loti
    • + *
    • LRD - Liberian Dollar
    • + *
    • LYD - Libyan Dinar
    • + *
    • LTL - Lithuanian Litas
    • + *
    • LTT - Lithuanian Talonas
    • + *
    • LUL - Luxembourg Financial Franc
    • + *
    • LUC - Luxembourgian Convertible Franc
    • + *
    • LUF - Luxembourgian Franc
    • + *
    • MOP - Macanese Pataca
    • + *
    • MKD - Macedonian Denar
    • + *
    • MKN - Macedonian Denar (1992–1993)
    • + *
    • MGA - Malagasy Ariary
    • + *
    • MGF - Malagasy Franc
    • + *
    • MWK - Malawian Kwacha
    • + *
    • MYR - Malaysian Ringgit
    • + *
    • MVR - Maldivian Rufiyaa
    • + *
    • MVP - Maldivian Rupee (1947–1981)
    • + *
    • MLF - Malian Franc
    • + *
    • MTL - Maltese Lira
    • + *
    • MTP - Maltese Pound
    • + *
    • MRU - Mauritanian Ouguiya
    • + *
    • MRO - Mauritanian Ouguiya (1973–2017)
    • + *
    • MUR - Mauritian Rupee
    • + *
    • MXV - Mexican Investment Unit
    • + *
    • MXN - Mexican Peso
    • + *
    • MXP - Mexican Silver Peso (1861–1992)
    • + *
    • MDC - Moldovan Cupon
    • + *
    • MDL - Moldovan Leu
    • + *
    • MCF - Monegasque Franc
    • + *
    • MNT - Mongolian Tugrik
    • + *
    • MAD - Moroccan Dirham
    • + *
    • MAF - Moroccan Franc
    • + *
    • MZE - Mozambican Escudo
    • + *
    • MZN - Mozambican Metical
    • + *
    • MZM - Mozambican Metical (1980–2006)
    • + *
    • MMK - Myanmar Kyat
    • + *
    • NAD - Namibian Dollar
    • + *
    • NPR - Nepalese Rupee
    • + *
    • ANG - Netherlands Antillean Guilder
    • + *
    • TWD - New Taiwan Dollar
    • + *
    • NZD - New Zealand Dollar
    • + *
    • NIO - Nicaraguan Córdoba
    • + *
    • NIC - Nicaraguan Córdoba (1988–1991)
    • + *
    • NGN - Nigerian Naira
    • + *
    • KPW - North Korean Won
    • + *
    • NOK - Norwegian Krone
    • + *
    • OMR - Omani Rial
    • + *
    • PKR - Pakistani Rupee
    • + *
    • XPD - Palladium
    • + *
    • PAB - Panamanian Balboa
    • + *
    • PGK - Papua New Guinean Kina
    • + *
    • PYG - Paraguayan Guarani
    • + *
    • PEI - Peruvian Inti
    • + *
    • PEN - Peruvian Sol
    • + *
    • PES - Peruvian Sol (1863–1965)
    • + *
    • PHP - Philippine Peso
    • + *
    • XPT - Platinum
    • + *
    • PLN - Polish Zloty
    • + *
    • PLZ - Polish Zloty (1950–1995)
    • + *
    • PTE - Portuguese Escudo
    • + *
    • GWE - Portuguese Guinea Escudo
    • + *
    • QAR - Qatari Rial
    • + *
    • XRE - RINET Funds
    • + *
    • RHD - Rhodesian Dollar
    • + *
    • RON - Romanian Leu
    • + *
    • ROL - Romanian Leu (1952–2006)
    • + *
    • RUB - Russian Ruble
    • + *
    • RUR - Russian Ruble (1991–1998)
    • + *
    • RWF - Rwandan Franc
    • + *
    • SVC - Salvadoran Colón
    • + *
    • WST - Samoan Tala
    • + *
    • SAR - Saudi Riyal
    • + *
    • RSD - Serbian Dinar
    • + *
    • CSD - Serbian Dinar (2002–2006)
    • + *
    • SCR - Seychellois Rupee
    • + *
    • SLL - Sierra Leonean Leone
    • + *
    • XAG - Silver
    • + *
    • SGD - Singapore Dollar
    • + *
    • SKK - Slovak Koruna
    • + *
    • SIT - Slovenian Tolar
    • + *
    • SBD - Solomon Islands Dollar
    • + *
    • SOS - Somali Shilling
    • + *
    • ZAR - South African Rand
    • + *
    • ZAL - South African Rand (financial)
    • + *
    • KRH - South Korean Hwan (1953–1962)
    • + *
    • KRW - South Korean Won
    • + *
    • KRO - South Korean Won (1945–1953)
    • + *
    • SSP - South Sudanese Pound
    • + *
    • SUR - Soviet Rouble
    • + *
    • ESP - Spanish Peseta
    • + *
    • ESA - Spanish Peseta (A account)
    • + *
    • ESB - Spanish Peseta (convertible account)
    • + *
    • XDR - Special Drawing Rights
    • + *
    • LKR - Sri Lankan Rupee
    • + *
    • SHP - St. Helena Pound
    • + *
    • XSU - Sucre
    • + *
    • SDD - Sudanese Dinar (1992–2007)
    • + *
    • SDG - Sudanese Pound
    • + *
    • SDP - Sudanese Pound (1957–1998)
    • + *
    • SRD - Surinamese Dollar
    • + *
    • SRG - Surinamese Guilder
    • + *
    • SZL - Swazi Lilangeni
    • + *
    • SEK - Swedish Krona
    • + *
    • CHF - Swiss Franc
    • + *
    • SYP - Syrian Pound
    • + *
    • STN - São Tomé & Príncipe Dobra
    • + *
    • STD - São Tomé & Príncipe Dobra (1977–2017)
    • + *
    • TVD - TVD
    • + *
    • TJR - Tajikistani Ruble
    • + *
    • TJS - Tajikistani Somoni
    • + *
    • TZS - Tanzanian Shilling
    • + *
    • XTS - Testing Currency Code
    • + *
    • THB - Thai Baht
    • + *
    • XXX - The codes assigned for transactions where no currency is involved
    • + *
    • TPE - Timorese Escudo
    • + *
    • TOP - Tongan Paʻanga
    • + *
    • TTD - Trinidad & Tobago Dollar
    • + *
    • TND - Tunisian Dinar
    • + *
    • TRY - Turkish Lira
    • + *
    • TRL - Turkish Lira (1922–2005)
    • + *
    • TMT - Turkmenistani Manat
    • + *
    • TMM - Turkmenistani Manat (1993–2009)
    • + *
    • USD - US Dollar
    • + *
    • USN - US Dollar (Next day)
    • + *
    • USS - US Dollar (Same day)
    • + *
    • UGX - Ugandan Shilling
    • + *
    • UGS - Ugandan Shilling (1966–1987)
    • + *
    • UAH - Ukrainian Hryvnia
    • + *
    • UAK - Ukrainian Karbovanets
    • + *
    • AED - United Arab Emirates Dirham
    • + *
    • UYW - Uruguayan Nominal Wage Index Unit
    • + *
    • UYU - Uruguayan Peso
    • + *
    • UYP - Uruguayan Peso (1975–1993)
    • + *
    • UYI - Uruguayan Peso (Indexed Units)
    • + *
    • UZS - Uzbekistani Som
    • + *
    • VUV - Vanuatu Vatu
    • + *
    • VES - Venezuelan Bolívar
    • + *
    • VEB - Venezuelan Bolívar (1871–2008)
    • + *
    • VEF - Venezuelan Bolívar (2008–2018)
    • + *
    • VND - Vietnamese Dong
    • + *
    • VNN - Vietnamese Dong (1978–1985)
    • + *
    • CHE - WIR Euro
    • + *
    • CHW - WIR Franc
    • + *
    • XOF - West African CFA Franc
    • + *
    • YDD - Yemeni Dinar
    • + *
    • YER - Yemeni Rial
    • + *
    • YUN - Yugoslavian Convertible Dinar (1990–1992)
    • + *
    • YUD - Yugoslavian Hard Dinar (1966–1990)
    • + *
    • YUM - Yugoslavian New Dinar (1994–2002)
    • + *
    • YUR - Yugoslavian Reformed Dinar (1992–1993)
    • + *
    • ZWN - ZWN
    • + *
    • ZRN - Zairean New Zaire (1993–1998)
    • + *
    • ZRZ - Zairean Zaire (1971–1993)
    • + *
    • ZMW - Zambian Kwacha
    • + *
    • ZMK - Zambian Kwacha (1968–2012)
    • + *
    • ZWD - Zimbabwean Dollar (1980–2008)
    • + *
    • ZWR - Zimbabwean Dollar (2008)
    • + *
    • ZWL - Zimbabwean Dollar (2009)
    • + *
    + */ @JsonSetter(value = "currency", nulls = Nulls.SKIP) - public Builder currency(Optional currency) { + public Builder currency(Optional currency) { this.currency = currency; return this; } - public Builder currency(TransactionCurrencyEnum currency) { + public Builder currency(JournalEntryCurrency currency) { this.currency = Optional.ofNullable(currency); return this; } + /** + *

    The journal entry's exchange rate.

    + */ @JsonSetter(value = "exchange_rate", nulls = Nulls.SKIP) public Builder exchangeRate(Optional exchangeRate) { this.exchangeRate = exchangeRate; @@ -864,6 +1199,9 @@ public Builder exchangeRate(String exchangeRate) { return this; } + /** + *

    The company the journal entry belongs to.

    + */ @JsonSetter(value = "company", nulls = Nulls.SKIP) public Builder company(Optional company) { this.company = company; @@ -875,6 +1213,9 @@ public Builder company(JournalEntryCompany company) { return this; } + /** + *

    If the transaction is inclusive or exclusive of tax. True if inclusive, False if exclusive.

    + */ @JsonSetter(value = "inclusive_of_tax", nulls = Nulls.SKIP) public Builder inclusiveOfTax(Optional inclusiveOfTax) { this.inclusiveOfTax = inclusiveOfTax; @@ -897,6 +1238,9 @@ public Builder lines(List lines) { return this; } + /** + *

    Reference number for identifying journal entries.

    + */ @JsonSetter(value = "journal_number", nulls = Nulls.SKIP) public Builder journalNumber(Optional journalNumber) { this.journalNumber = journalNumber; @@ -920,6 +1264,9 @@ public Builder trackingCategories(ListIndicates 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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; @@ -931,17 +1278,27 @@ public Builder remoteWasDeleted(Boolean remoteWasDeleted) { return this; } + /** + *

    The journal's posting status.

    + *
      + *
    • UNPOSTED - UNPOSTED
    • + *
    • POSTED - POSTED
    • + *
    + */ @JsonSetter(value = "posting_status", nulls = Nulls.SKIP) - public Builder postingStatus(Optional postingStatus) { + public Builder postingStatus(Optional postingStatus) { this.postingStatus = postingStatus; return this; } - public Builder postingStatus(PostingStatusEnum postingStatus) { + public Builder postingStatus(JournalEntryPostingStatus postingStatus) { this.postingStatus = Optional.ofNullable(postingStatus); return this; } + /** + *

    The accounting period that the JournalEntry was generated in.

    + */ @JsonSetter(value = "accounting_period", nulls = Nulls.SKIP) public Builder accountingPeriod(Optional accountingPeriod) { this.accountingPeriod = accountingPeriod; @@ -953,6 +1310,9 @@ public Builder accountingPeriod(JournalEntryAccountingPeriod accountingPeriod) { return this; } + /** + *

    When the third party's journal entry was created.

    + */ @JsonSetter(value = "remote_created_at", nulls = Nulls.SKIP) public Builder remoteCreatedAt(Optional remoteCreatedAt) { this.remoteCreatedAt = remoteCreatedAt; @@ -964,6 +1324,9 @@ public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { return this; } + /** + *

    When the third party's journal entry was updated.

    + */ @JsonSetter(value = "remote_updated_at", nulls = Nulls.SKIP) public Builder remoteUpdatedAt(Optional remoteUpdatedAt) { this.remoteUpdatedAt = remoteUpdatedAt; diff --git a/src/main/java/com/merge/api/accounting/types/JournalEntryCurrency.java b/src/main/java/com/merge/api/accounting/types/JournalEntryCurrency.java new file mode 100644 index 000000000..a7fd8ded0 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/JournalEntryCurrency.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = JournalEntryCurrency.Deserializer.class) +public final class JournalEntryCurrency { + private final Object value; + + private final int type; + + private JournalEntryCurrency(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((TransactionCurrencyEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof JournalEntryCurrency && equalTo((JournalEntryCurrency) other); + } + + private boolean equalTo(JournalEntryCurrency other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static JournalEntryCurrency of(TransactionCurrencyEnum value) { + return new JournalEntryCurrency(value, 0); + } + + public static JournalEntryCurrency of(String value) { + return new JournalEntryCurrency(value, 1); + } + + public interface Visitor { + T visit(TransactionCurrencyEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(JournalEntryCurrency.class); + } + + @java.lang.Override + public JournalEntryCurrency deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TransactionCurrencyEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/JournalEntryEndpointRequest.java b/src/main/java/com/merge/api/accounting/types/JournalEntryEndpointRequest.java index 156217006..789896ad1 100644 --- a/src/main/java/com/merge/api/accounting/types/JournalEntryEndpointRequest.java +++ b/src/main/java/com/merge/api/accounting/types/JournalEntryEndpointRequest.java @@ -99,10 +99,16 @@ public interface ModelStage { public interface _FinalStage { JournalEntryEndpointRequest build(); + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ _FinalStage isDebugMode(Optional isDebugMode); _FinalStage isDebugMode(Boolean isDebugMode); + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ _FinalStage runAsync(Optional runAsync); _FinalStage runAsync(Boolean runAsync); @@ -146,6 +152,9 @@ public _FinalStage runAsync(Boolean runAsync) { return this; } + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ @java.lang.Override @JsonSetter(value = "run_async", nulls = Nulls.SKIP) public _FinalStage runAsync(Optional runAsync) { @@ -163,6 +172,9 @@ public _FinalStage isDebugMode(Boolean isDebugMode) { return this; } + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ @java.lang.Override @JsonSetter(value = "is_debug_mode", nulls = Nulls.SKIP) public _FinalStage isDebugMode(Optional isDebugMode) { diff --git a/src/main/java/com/merge/api/accounting/types/JournalEntryPostingStatus.java b/src/main/java/com/merge/api/accounting/types/JournalEntryPostingStatus.java new file mode 100644 index 000000000..9e26412f9 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/JournalEntryPostingStatus.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = JournalEntryPostingStatus.Deserializer.class) +public final class JournalEntryPostingStatus { + private final Object value; + + private final int type; + + private JournalEntryPostingStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((PostingStatusEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof JournalEntryPostingStatus && equalTo((JournalEntryPostingStatus) other); + } + + private boolean equalTo(JournalEntryPostingStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static JournalEntryPostingStatus of(PostingStatusEnum value) { + return new JournalEntryPostingStatus(value, 0); + } + + public static JournalEntryPostingStatus of(String value) { + return new JournalEntryPostingStatus(value, 1); + } + + public interface Visitor { + T visit(PostingStatusEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(JournalEntryPostingStatus.class); + } + + @java.lang.Override + public JournalEntryPostingStatus deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, PostingStatusEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/JournalEntryRequest.java b/src/main/java/com/merge/api/accounting/types/JournalEntryRequest.java index eb2a860a4..4f032ea3a 100644 --- a/src/main/java/com/merge/api/accounting/types/JournalEntryRequest.java +++ b/src/main/java/com/merge/api/accounting/types/JournalEntryRequest.java @@ -29,7 +29,7 @@ public final class JournalEntryRequest { private final Optional memo; - private final Optional currency; + private final Optional currency; private final Optional exchangeRate; @@ -43,7 +43,7 @@ public final class JournalEntryRequest { private final Optional journalNumber; - private final Optional postingStatus; + private final Optional postingStatus; private final Optional> integrationParams; @@ -57,14 +57,14 @@ private JournalEntryRequest( Optional transactionDate, Optional>> payments, Optional memo, - Optional currency, + Optional currency, Optional exchangeRate, Optional company, Optional>> trackingCategories, Optional inclusiveOfTax, Optional> lines, Optional journalNumber, - Optional postingStatus, + Optional postingStatus, Optional> integrationParams, Optional> linkedAccountParams, Optional> remoteFields, @@ -422,7 +422,7 @@ public Optional getMemo() { * */ @JsonProperty("currency") - public Optional getCurrency() { + public Optional getCurrency() { return currency; } @@ -476,7 +476,7 @@ public Optional getJournalNumber() { * */ @JsonProperty("posting_status") - public Optional getPostingStatus() { + public Optional getPostingStatus() { return postingStatus; } @@ -559,7 +559,7 @@ public static final class Builder { private Optional memo = Optional.empty(); - private Optional currency = Optional.empty(); + private Optional currency = Optional.empty(); private Optional exchangeRate = Optional.empty(); @@ -574,7 +574,7 @@ public static final class Builder { private Optional journalNumber = Optional.empty(); - private Optional postingStatus = Optional.empty(); + private Optional postingStatus = Optional.empty(); private Optional> integrationParams = Optional.empty(); @@ -605,6 +605,9 @@ public Builder from(JournalEntryRequest other) { return this; } + /** + *

    The journal entry's transaction date.

    + */ @JsonSetter(value = "transaction_date", nulls = Nulls.SKIP) public Builder transactionDate(Optional transactionDate) { this.transactionDate = transactionDate; @@ -616,6 +619,9 @@ public Builder transactionDate(OffsetDateTime transactionDate) { return this; } + /** + *

    Array of Payment object IDs.

    + */ @JsonSetter(value = "payments", nulls = Nulls.SKIP) public Builder payments(Optional>> payments) { this.payments = payments; @@ -627,6 +633,9 @@ public Builder payments(List> payments return this; } + /** + *

    The journal entry's private note.

    + */ @JsonSetter(value = "memo", nulls = Nulls.SKIP) public Builder memo(Optional memo) { this.memo = memo; @@ -638,17 +647,331 @@ public Builder memo(String memo) { return this; } + /** + *

    The journal's currency.

    + *
      + *
    • XUA - ADB Unit of Account
    • + *
    • AFN - Afghan Afghani
    • + *
    • AFA - Afghan Afghani (1927–2002)
    • + *
    • ALL - Albanian Lek
    • + *
    • ALK - Albanian Lek (1946–1965)
    • + *
    • DZD - Algerian Dinar
    • + *
    • ADP - Andorran Peseta
    • + *
    • AOA - Angolan Kwanza
    • + *
    • AOK - Angolan Kwanza (1977–1991)
    • + *
    • AON - Angolan New Kwanza (1990–2000)
    • + *
    • AOR - Angolan Readjusted Kwanza (1995–1999)
    • + *
    • ARA - Argentine Austral
    • + *
    • ARS - Argentine Peso
    • + *
    • ARM - Argentine Peso (1881–1970)
    • + *
    • ARP - Argentine Peso (1983–1985)
    • + *
    • ARL - Argentine Peso Ley (1970–1983)
    • + *
    • AMD - Armenian Dram
    • + *
    • AWG - Aruban Florin
    • + *
    • AUD - Australian Dollar
    • + *
    • ATS - Austrian Schilling
    • + *
    • AZN - Azerbaijani Manat
    • + *
    • AZM - Azerbaijani Manat (1993–2006)
    • + *
    • BSD - Bahamian Dollar
    • + *
    • BHD - Bahraini Dinar
    • + *
    • BDT - Bangladeshi Taka
    • + *
    • BBD - Barbadian Dollar
    • + *
    • BYN - Belarusian Ruble
    • + *
    • BYB - Belarusian Ruble (1994–1999)
    • + *
    • BYR - Belarusian Ruble (2000–2016)
    • + *
    • BEF - Belgian Franc
    • + *
    • BEC - Belgian Franc (convertible)
    • + *
    • BEL - Belgian Franc (financial)
    • + *
    • BZD - Belize Dollar
    • + *
    • BMD - Bermudan Dollar
    • + *
    • BTN - Bhutanese Ngultrum
    • + *
    • BOB - Bolivian Boliviano
    • + *
    • BOL - Bolivian Boliviano (1863–1963)
    • + *
    • BOV - Bolivian Mvdol
    • + *
    • BOP - Bolivian Peso
    • + *
    • BAM - Bosnia-Herzegovina Convertible Mark
    • + *
    • BAD - Bosnia-Herzegovina Dinar (1992–1994)
    • + *
    • BAN - Bosnia-Herzegovina New Dinar (1994–1997)
    • + *
    • BWP - Botswanan Pula
    • + *
    • BRC - Brazilian Cruzado (1986–1989)
    • + *
    • BRZ - Brazilian Cruzeiro (1942–1967)
    • + *
    • BRE - Brazilian Cruzeiro (1990–1993)
    • + *
    • BRR - Brazilian Cruzeiro (1993–1994)
    • + *
    • BRN - Brazilian New Cruzado (1989–1990)
    • + *
    • BRB - Brazilian New Cruzeiro (1967–1986)
    • + *
    • BRL - Brazilian Real
    • + *
    • GBP - British Pound
    • + *
    • BND - Brunei Dollar
    • + *
    • BGL - Bulgarian Hard Lev
    • + *
    • BGN - Bulgarian Lev
    • + *
    • BGO - Bulgarian Lev (1879–1952)
    • + *
    • BGM - Bulgarian Socialist Lev
    • + *
    • BUK - Burmese Kyat
    • + *
    • BIF - Burundian Franc
    • + *
    • XPF - CFP Franc
    • + *
    • KHR - Cambodian Riel
    • + *
    • CAD - Canadian Dollar
    • + *
    • CVE - Cape Verdean Escudo
    • + *
    • KYD - Cayman Islands Dollar
    • + *
    • XAF - Central African CFA Franc
    • + *
    • CLE - Chilean Escudo
    • + *
    • CLP - Chilean Peso
    • + *
    • CLF - Chilean Unit of Account (UF)
    • + *
    • CNX - Chinese People’s Bank Dollar
    • + *
    • CNY - Chinese Yuan
    • + *
    • CNH - Chinese Yuan (offshore)
    • + *
    • COP - Colombian Peso
    • + *
    • COU - Colombian Real Value Unit
    • + *
    • KMF - Comorian Franc
    • + *
    • CDF - Congolese Franc
    • + *
    • CRC - Costa Rican Colón
    • + *
    • HRD - Croatian Dinar
    • + *
    • HRK - Croatian Kuna
    • + *
    • CUC - Cuban Convertible Peso
    • + *
    • CUP - Cuban Peso
    • + *
    • CYP - Cypriot Pound
    • + *
    • CZK - Czech Koruna
    • + *
    • CSK - Czechoslovak Hard Koruna
    • + *
    • DKK - Danish Krone
    • + *
    • DJF - Djiboutian Franc
    • + *
    • DOP - Dominican Peso
    • + *
    • NLG - Dutch Guilder
    • + *
    • XCD - East Caribbean Dollar
    • + *
    • DDM - East German Mark
    • + *
    • ECS - Ecuadorian Sucre
    • + *
    • ECV - Ecuadorian Unit of Constant Value
    • + *
    • EGP - Egyptian Pound
    • + *
    • GQE - Equatorial Guinean Ekwele
    • + *
    • ERN - Eritrean Nakfa
    • + *
    • EEK - Estonian Kroon
    • + *
    • ETB - Ethiopian Birr
    • + *
    • EUR - Euro
    • + *
    • XBA - European Composite Unit
    • + *
    • XEU - European Currency Unit
    • + *
    • XBB - European Monetary Unit
    • + *
    • XBC - European Unit of Account (XBC)
    • + *
    • XBD - European Unit of Account (XBD)
    • + *
    • FKP - Falkland Islands Pound
    • + *
    • FJD - Fijian Dollar
    • + *
    • FIM - Finnish Markka
    • + *
    • FRF - French Franc
    • + *
    • XFO - French Gold Franc
    • + *
    • XFU - French UIC-Franc
    • + *
    • GMD - Gambian Dalasi
    • + *
    • GEK - Georgian Kupon Larit
    • + *
    • GEL - Georgian Lari
    • + *
    • DEM - German Mark
    • + *
    • GHS - Ghanaian Cedi
    • + *
    • GHC - Ghanaian Cedi (1979–2007)
    • + *
    • GIP - Gibraltar Pound
    • + *
    • XAU - Gold
    • + *
    • GRD - Greek Drachma
    • + *
    • GTQ - Guatemalan Quetzal
    • + *
    • GWP - Guinea-Bissau Peso
    • + *
    • GNF - Guinean Franc
    • + *
    • GNS - Guinean Syli
    • + *
    • GYD - Guyanaese Dollar
    • + *
    • HTG - Haitian Gourde
    • + *
    • HNL - Honduran Lempira
    • + *
    • HKD - Hong Kong Dollar
    • + *
    • HUF - Hungarian Forint
    • + *
    • IMP - IMP
    • + *
    • ISK - Icelandic Króna
    • + *
    • ISJ - Icelandic Króna (1918–1981)
    • + *
    • INR - Indian Rupee
    • + *
    • IDR - Indonesian Rupiah
    • + *
    • IRR - Iranian Rial
    • + *
    • IQD - Iraqi Dinar
    • + *
    • IEP - Irish Pound
    • + *
    • ILS - Israeli New Shekel
    • + *
    • ILP - Israeli Pound
    • + *
    • ILR - Israeli Shekel (1980–1985)
    • + *
    • ITL - Italian Lira
    • + *
    • JMD - Jamaican Dollar
    • + *
    • JPY - Japanese Yen
    • + *
    • JOD - Jordanian Dinar
    • + *
    • KZT - Kazakhstani Tenge
    • + *
    • KES - Kenyan Shilling
    • + *
    • KWD - Kuwaiti Dinar
    • + *
    • KGS - Kyrgystani Som
    • + *
    • LAK - Laotian Kip
    • + *
    • LVL - Latvian Lats
    • + *
    • LVR - Latvian Ruble
    • + *
    • LBP - Lebanese Pound
    • + *
    • LSL - Lesotho Loti
    • + *
    • LRD - Liberian Dollar
    • + *
    • LYD - Libyan Dinar
    • + *
    • LTL - Lithuanian Litas
    • + *
    • LTT - Lithuanian Talonas
    • + *
    • LUL - Luxembourg Financial Franc
    • + *
    • LUC - Luxembourgian Convertible Franc
    • + *
    • LUF - Luxembourgian Franc
    • + *
    • MOP - Macanese Pataca
    • + *
    • MKD - Macedonian Denar
    • + *
    • MKN - Macedonian Denar (1992–1993)
    • + *
    • MGA - Malagasy Ariary
    • + *
    • MGF - Malagasy Franc
    • + *
    • MWK - Malawian Kwacha
    • + *
    • MYR - Malaysian Ringgit
    • + *
    • MVR - Maldivian Rufiyaa
    • + *
    • MVP - Maldivian Rupee (1947–1981)
    • + *
    • MLF - Malian Franc
    • + *
    • MTL - Maltese Lira
    • + *
    • MTP - Maltese Pound
    • + *
    • MRU - Mauritanian Ouguiya
    • + *
    • MRO - Mauritanian Ouguiya (1973–2017)
    • + *
    • MUR - Mauritian Rupee
    • + *
    • MXV - Mexican Investment Unit
    • + *
    • MXN - Mexican Peso
    • + *
    • MXP - Mexican Silver Peso (1861–1992)
    • + *
    • MDC - Moldovan Cupon
    • + *
    • MDL - Moldovan Leu
    • + *
    • MCF - Monegasque Franc
    • + *
    • MNT - Mongolian Tugrik
    • + *
    • MAD - Moroccan Dirham
    • + *
    • MAF - Moroccan Franc
    • + *
    • MZE - Mozambican Escudo
    • + *
    • MZN - Mozambican Metical
    • + *
    • MZM - Mozambican Metical (1980–2006)
    • + *
    • MMK - Myanmar Kyat
    • + *
    • NAD - Namibian Dollar
    • + *
    • NPR - Nepalese Rupee
    • + *
    • ANG - Netherlands Antillean Guilder
    • + *
    • TWD - New Taiwan Dollar
    • + *
    • NZD - New Zealand Dollar
    • + *
    • NIO - Nicaraguan Córdoba
    • + *
    • NIC - Nicaraguan Córdoba (1988–1991)
    • + *
    • NGN - Nigerian Naira
    • + *
    • KPW - North Korean Won
    • + *
    • NOK - Norwegian Krone
    • + *
    • OMR - Omani Rial
    • + *
    • PKR - Pakistani Rupee
    • + *
    • XPD - Palladium
    • + *
    • PAB - Panamanian Balboa
    • + *
    • PGK - Papua New Guinean Kina
    • + *
    • PYG - Paraguayan Guarani
    • + *
    • PEI - Peruvian Inti
    • + *
    • PEN - Peruvian Sol
    • + *
    • PES - Peruvian Sol (1863–1965)
    • + *
    • PHP - Philippine Peso
    • + *
    • XPT - Platinum
    • + *
    • PLN - Polish Zloty
    • + *
    • PLZ - Polish Zloty (1950–1995)
    • + *
    • PTE - Portuguese Escudo
    • + *
    • GWE - Portuguese Guinea Escudo
    • + *
    • QAR - Qatari Rial
    • + *
    • XRE - RINET Funds
    • + *
    • RHD - Rhodesian Dollar
    • + *
    • RON - Romanian Leu
    • + *
    • ROL - Romanian Leu (1952–2006)
    • + *
    • RUB - Russian Ruble
    • + *
    • RUR - Russian Ruble (1991–1998)
    • + *
    • RWF - Rwandan Franc
    • + *
    • SVC - Salvadoran Colón
    • + *
    • WST - Samoan Tala
    • + *
    • SAR - Saudi Riyal
    • + *
    • RSD - Serbian Dinar
    • + *
    • CSD - Serbian Dinar (2002–2006)
    • + *
    • SCR - Seychellois Rupee
    • + *
    • SLL - Sierra Leonean Leone
    • + *
    • XAG - Silver
    • + *
    • SGD - Singapore Dollar
    • + *
    • SKK - Slovak Koruna
    • + *
    • SIT - Slovenian Tolar
    • + *
    • SBD - Solomon Islands Dollar
    • + *
    • SOS - Somali Shilling
    • + *
    • ZAR - South African Rand
    • + *
    • ZAL - South African Rand (financial)
    • + *
    • KRH - South Korean Hwan (1953–1962)
    • + *
    • KRW - South Korean Won
    • + *
    • KRO - South Korean Won (1945–1953)
    • + *
    • SSP - South Sudanese Pound
    • + *
    • SUR - Soviet Rouble
    • + *
    • ESP - Spanish Peseta
    • + *
    • ESA - Spanish Peseta (A account)
    • + *
    • ESB - Spanish Peseta (convertible account)
    • + *
    • XDR - Special Drawing Rights
    • + *
    • LKR - Sri Lankan Rupee
    • + *
    • SHP - St. Helena Pound
    • + *
    • XSU - Sucre
    • + *
    • SDD - Sudanese Dinar (1992–2007)
    • + *
    • SDG - Sudanese Pound
    • + *
    • SDP - Sudanese Pound (1957–1998)
    • + *
    • SRD - Surinamese Dollar
    • + *
    • SRG - Surinamese Guilder
    • + *
    • SZL - Swazi Lilangeni
    • + *
    • SEK - Swedish Krona
    • + *
    • CHF - Swiss Franc
    • + *
    • SYP - Syrian Pound
    • + *
    • STN - São Tomé & Príncipe Dobra
    • + *
    • STD - São Tomé & Príncipe Dobra (1977–2017)
    • + *
    • TVD - TVD
    • + *
    • TJR - Tajikistani Ruble
    • + *
    • TJS - Tajikistani Somoni
    • + *
    • TZS - Tanzanian Shilling
    • + *
    • XTS - Testing Currency Code
    • + *
    • THB - Thai Baht
    • + *
    • XXX - The codes assigned for transactions where no currency is involved
    • + *
    • TPE - Timorese Escudo
    • + *
    • TOP - Tongan Paʻanga
    • + *
    • TTD - Trinidad & Tobago Dollar
    • + *
    • TND - Tunisian Dinar
    • + *
    • TRY - Turkish Lira
    • + *
    • TRL - Turkish Lira (1922–2005)
    • + *
    • TMT - Turkmenistani Manat
    • + *
    • TMM - Turkmenistani Manat (1993–2009)
    • + *
    • USD - US Dollar
    • + *
    • USN - US Dollar (Next day)
    • + *
    • USS - US Dollar (Same day)
    • + *
    • UGX - Ugandan Shilling
    • + *
    • UGS - Ugandan Shilling (1966–1987)
    • + *
    • UAH - Ukrainian Hryvnia
    • + *
    • UAK - Ukrainian Karbovanets
    • + *
    • AED - United Arab Emirates Dirham
    • + *
    • UYW - Uruguayan Nominal Wage Index Unit
    • + *
    • UYU - Uruguayan Peso
    • + *
    • UYP - Uruguayan Peso (1975–1993)
    • + *
    • UYI - Uruguayan Peso (Indexed Units)
    • + *
    • UZS - Uzbekistani Som
    • + *
    • VUV - Vanuatu Vatu
    • + *
    • VES - Venezuelan Bolívar
    • + *
    • VEB - Venezuelan Bolívar (1871–2008)
    • + *
    • VEF - Venezuelan Bolívar (2008–2018)
    • + *
    • VND - Vietnamese Dong
    • + *
    • VNN - Vietnamese Dong (1978–1985)
    • + *
    • CHE - WIR Euro
    • + *
    • CHW - WIR Franc
    • + *
    • XOF - West African CFA Franc
    • + *
    • YDD - Yemeni Dinar
    • + *
    • YER - Yemeni Rial
    • + *
    • YUN - Yugoslavian Convertible Dinar (1990–1992)
    • + *
    • YUD - Yugoslavian Hard Dinar (1966–1990)
    • + *
    • YUM - Yugoslavian New Dinar (1994–2002)
    • + *
    • YUR - Yugoslavian Reformed Dinar (1992–1993)
    • + *
    • ZWN - ZWN
    • + *
    • ZRN - Zairean New Zaire (1993–1998)
    • + *
    • ZRZ - Zairean Zaire (1971–1993)
    • + *
    • ZMW - Zambian Kwacha
    • + *
    • ZMK - Zambian Kwacha (1968–2012)
    • + *
    • ZWD - Zimbabwean Dollar (1980–2008)
    • + *
    • ZWR - Zimbabwean Dollar (2008)
    • + *
    • ZWL - Zimbabwean Dollar (2009)
    • + *
    + */ @JsonSetter(value = "currency", nulls = Nulls.SKIP) - public Builder currency(Optional currency) { + public Builder currency(Optional currency) { this.currency = currency; return this; } - public Builder currency(TransactionCurrencyEnum currency) { + public Builder currency(JournalEntryRequestCurrency currency) { this.currency = Optional.ofNullable(currency); return this; } + /** + *

    The journal entry's exchange rate.

    + */ @JsonSetter(value = "exchange_rate", nulls = Nulls.SKIP) public Builder exchangeRate(Optional exchangeRate) { this.exchangeRate = exchangeRate; @@ -660,6 +983,9 @@ public Builder exchangeRate(String exchangeRate) { return this; } + /** + *

    The company the journal entry belongs to.

    + */ @JsonSetter(value = "company", nulls = Nulls.SKIP) public Builder company(Optional company) { this.company = company; @@ -684,6 +1010,9 @@ public Builder trackingCategories( return this; } + /** + *

    If the transaction is inclusive or exclusive of tax. True if inclusive, False if exclusive.

    + */ @JsonSetter(value = "inclusive_of_tax", nulls = Nulls.SKIP) public Builder inclusiveOfTax(Optional inclusiveOfTax) { this.inclusiveOfTax = inclusiveOfTax; @@ -706,6 +1035,9 @@ public Builder lines(List lines) { return this; } + /** + *

    Reference number for identifying journal entries.

    + */ @JsonSetter(value = "journal_number", nulls = Nulls.SKIP) public Builder journalNumber(Optional journalNumber) { this.journalNumber = journalNumber; @@ -717,13 +1049,20 @@ public Builder journalNumber(String journalNumber) { return this; } + /** + *

    The journal's posting status.

    + *
      + *
    • UNPOSTED - UNPOSTED
    • + *
    • POSTED - POSTED
    • + *
    + */ @JsonSetter(value = "posting_status", nulls = Nulls.SKIP) - public Builder postingStatus(Optional postingStatus) { + public Builder postingStatus(Optional postingStatus) { this.postingStatus = postingStatus; return this; } - public Builder postingStatus(PostingStatusEnum postingStatus) { + public Builder postingStatus(JournalEntryRequestPostingStatus postingStatus) { this.postingStatus = Optional.ofNullable(postingStatus); return this; } diff --git a/src/main/java/com/merge/api/accounting/types/JournalEntryRequestCurrency.java b/src/main/java/com/merge/api/accounting/types/JournalEntryRequestCurrency.java new file mode 100644 index 000000000..878444785 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/JournalEntryRequestCurrency.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = JournalEntryRequestCurrency.Deserializer.class) +public final class JournalEntryRequestCurrency { + private final Object value; + + private final int type; + + private JournalEntryRequestCurrency(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((TransactionCurrencyEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof JournalEntryRequestCurrency && equalTo((JournalEntryRequestCurrency) other); + } + + private boolean equalTo(JournalEntryRequestCurrency other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static JournalEntryRequestCurrency of(TransactionCurrencyEnum value) { + return new JournalEntryRequestCurrency(value, 0); + } + + public static JournalEntryRequestCurrency of(String value) { + return new JournalEntryRequestCurrency(value, 1); + } + + public interface Visitor { + T visit(TransactionCurrencyEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(JournalEntryRequestCurrency.class); + } + + @java.lang.Override + public JournalEntryRequestCurrency deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TransactionCurrencyEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/JournalEntryRequestPostingStatus.java b/src/main/java/com/merge/api/accounting/types/JournalEntryRequestPostingStatus.java new file mode 100644 index 000000000..3dc4df3ed --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/JournalEntryRequestPostingStatus.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = JournalEntryRequestPostingStatus.Deserializer.class) +public final class JournalEntryRequestPostingStatus { + private final Object value; + + private final int type; + + private JournalEntryRequestPostingStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((PostingStatusEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof JournalEntryRequestPostingStatus && equalTo((JournalEntryRequestPostingStatus) other); + } + + private boolean equalTo(JournalEntryRequestPostingStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static JournalEntryRequestPostingStatus of(PostingStatusEnum value) { + return new JournalEntryRequestPostingStatus(value, 0); + } + + public static JournalEntryRequestPostingStatus of(String value) { + return new JournalEntryRequestPostingStatus(value, 1); + } + + public interface Visitor { + T visit(PostingStatusEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(JournalEntryRequestPostingStatus.class); + } + + @java.lang.Override + public JournalEntryRequestPostingStatus deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, PostingStatusEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/JournalLine.java b/src/main/java/com/merge/api/accounting/types/JournalLine.java index bb82b25d0..de0f17d7f 100644 --- a/src/main/java/com/merge/api/accounting/types/JournalLine.java +++ b/src/main/java/com/merge/api/accounting/types/JournalLine.java @@ -38,12 +38,14 @@ public final class JournalLine { private final Optional>> trackingCategories; - private final Optional currency; + private final Optional currency; private final Optional company; private final Optional employee; + private final Optional project; + private final Optional contact; private final Optional taxRate; @@ -67,9 +69,10 @@ private JournalLine( Optional netAmount, Optional trackingCategory, Optional>> trackingCategories, - Optional currency, + Optional currency, Optional company, Optional employee, + Optional project, Optional contact, Optional taxRate, Optional description, @@ -88,6 +91,7 @@ private JournalLine( this.currency = currency; this.company = company; this.employee = employee; + this.project = project; this.contact = contact; this.taxRate = taxRate; this.description = description; @@ -464,7 +468,7 @@ public Optional>> getTrackingCa * */ @JsonProperty("currency") - public Optional getCurrency() { + public Optional getCurrency() { return currency; } @@ -481,6 +485,11 @@ public Optional getEmployee() { return employee; } + @JsonProperty("project") + public Optional getProject() { + return project; + } + @JsonProperty("contact") public Optional getContact() { return contact; @@ -546,6 +555,7 @@ private boolean equalTo(JournalLine other) { && currency.equals(other.currency) && company.equals(other.company) && employee.equals(other.employee) + && project.equals(other.project) && contact.equals(other.contact) && taxRate.equals(other.taxRate) && description.equals(other.description) @@ -568,6 +578,7 @@ public int hashCode() { this.currency, this.company, this.employee, + this.project, this.contact, this.taxRate, this.description, @@ -603,12 +614,14 @@ public static final class Builder { private Optional>> trackingCategories = Optional.empty(); - private Optional currency = Optional.empty(); + private Optional currency = Optional.empty(); private Optional company = Optional.empty(); private Optional employee = Optional.empty(); + private Optional project = Optional.empty(); + private Optional contact = Optional.empty(); private Optional taxRate = Optional.empty(); @@ -638,6 +651,7 @@ public Builder from(JournalLine other) { currency(other.getCurrency()); company(other.getCompany()); employee(other.getEmployee()); + project(other.getProject()); contact(other.getContact()); taxRate(other.getTaxRate()); description(other.getDescription()); @@ -658,6 +672,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -669,6 +686,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -680,6 +700,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -702,6 +725,9 @@ public Builder account(JournalLineAccount account) { return this; } + /** + *

    The value of the line item including taxes and other fees.

    + */ @JsonSetter(value = "net_amount", nulls = Nulls.SKIP) public Builder netAmount(Optional netAmount) { this.netAmount = netAmount; @@ -724,6 +750,9 @@ public Builder trackingCategory(JournalLineTrackingCategory trackingCategory) { return this; } + /** + *

    The journal line item's associated tracking categories.

    + */ @JsonSetter(value = "tracking_categories", nulls = Nulls.SKIP) public Builder trackingCategories( Optional>> trackingCategories) { @@ -736,17 +765,331 @@ public Builder trackingCategories(ListThe journal line item's currency.

    + *
      + *
    • XUA - ADB Unit of Account
    • + *
    • AFN - Afghan Afghani
    • + *
    • AFA - Afghan Afghani (1927–2002)
    • + *
    • ALL - Albanian Lek
    • + *
    • ALK - Albanian Lek (1946–1965)
    • + *
    • DZD - Algerian Dinar
    • + *
    • ADP - Andorran Peseta
    • + *
    • AOA - Angolan Kwanza
    • + *
    • AOK - Angolan Kwanza (1977–1991)
    • + *
    • AON - Angolan New Kwanza (1990–2000)
    • + *
    • AOR - Angolan Readjusted Kwanza (1995–1999)
    • + *
    • ARA - Argentine Austral
    • + *
    • ARS - Argentine Peso
    • + *
    • ARM - Argentine Peso (1881–1970)
    • + *
    • ARP - Argentine Peso (1983–1985)
    • + *
    • ARL - Argentine Peso Ley (1970–1983)
    • + *
    • AMD - Armenian Dram
    • + *
    • AWG - Aruban Florin
    • + *
    • AUD - Australian Dollar
    • + *
    • ATS - Austrian Schilling
    • + *
    • AZN - Azerbaijani Manat
    • + *
    • AZM - Azerbaijani Manat (1993–2006)
    • + *
    • BSD - Bahamian Dollar
    • + *
    • BHD - Bahraini Dinar
    • + *
    • BDT - Bangladeshi Taka
    • + *
    • BBD - Barbadian Dollar
    • + *
    • BYN - Belarusian Ruble
    • + *
    • BYB - Belarusian Ruble (1994–1999)
    • + *
    • BYR - Belarusian Ruble (2000–2016)
    • + *
    • BEF - Belgian Franc
    • + *
    • BEC - Belgian Franc (convertible)
    • + *
    • BEL - Belgian Franc (financial)
    • + *
    • BZD - Belize Dollar
    • + *
    • BMD - Bermudan Dollar
    • + *
    • BTN - Bhutanese Ngultrum
    • + *
    • BOB - Bolivian Boliviano
    • + *
    • BOL - Bolivian Boliviano (1863–1963)
    • + *
    • BOV - Bolivian Mvdol
    • + *
    • BOP - Bolivian Peso
    • + *
    • BAM - Bosnia-Herzegovina Convertible Mark
    • + *
    • BAD - Bosnia-Herzegovina Dinar (1992–1994)
    • + *
    • BAN - Bosnia-Herzegovina New Dinar (1994–1997)
    • + *
    • BWP - Botswanan Pula
    • + *
    • BRC - Brazilian Cruzado (1986–1989)
    • + *
    • BRZ - Brazilian Cruzeiro (1942–1967)
    • + *
    • BRE - Brazilian Cruzeiro (1990–1993)
    • + *
    • BRR - Brazilian Cruzeiro (1993–1994)
    • + *
    • BRN - Brazilian New Cruzado (1989–1990)
    • + *
    • BRB - Brazilian New Cruzeiro (1967–1986)
    • + *
    • BRL - Brazilian Real
    • + *
    • GBP - British Pound
    • + *
    • BND - Brunei Dollar
    • + *
    • BGL - Bulgarian Hard Lev
    • + *
    • BGN - Bulgarian Lev
    • + *
    • BGO - Bulgarian Lev (1879–1952)
    • + *
    • BGM - Bulgarian Socialist Lev
    • + *
    • BUK - Burmese Kyat
    • + *
    • BIF - Burundian Franc
    • + *
    • XPF - CFP Franc
    • + *
    • KHR - Cambodian Riel
    • + *
    • CAD - Canadian Dollar
    • + *
    • CVE - Cape Verdean Escudo
    • + *
    • KYD - Cayman Islands Dollar
    • + *
    • XAF - Central African CFA Franc
    • + *
    • CLE - Chilean Escudo
    • + *
    • CLP - Chilean Peso
    • + *
    • CLF - Chilean Unit of Account (UF)
    • + *
    • CNX - Chinese People’s Bank Dollar
    • + *
    • CNY - Chinese Yuan
    • + *
    • CNH - Chinese Yuan (offshore)
    • + *
    • COP - Colombian Peso
    • + *
    • COU - Colombian Real Value Unit
    • + *
    • KMF - Comorian Franc
    • + *
    • CDF - Congolese Franc
    • + *
    • CRC - Costa Rican Colón
    • + *
    • HRD - Croatian Dinar
    • + *
    • HRK - Croatian Kuna
    • + *
    • CUC - Cuban Convertible Peso
    • + *
    • CUP - Cuban Peso
    • + *
    • CYP - Cypriot Pound
    • + *
    • CZK - Czech Koruna
    • + *
    • CSK - Czechoslovak Hard Koruna
    • + *
    • DKK - Danish Krone
    • + *
    • DJF - Djiboutian Franc
    • + *
    • DOP - Dominican Peso
    • + *
    • NLG - Dutch Guilder
    • + *
    • XCD - East Caribbean Dollar
    • + *
    • DDM - East German Mark
    • + *
    • ECS - Ecuadorian Sucre
    • + *
    • ECV - Ecuadorian Unit of Constant Value
    • + *
    • EGP - Egyptian Pound
    • + *
    • GQE - Equatorial Guinean Ekwele
    • + *
    • ERN - Eritrean Nakfa
    • + *
    • EEK - Estonian Kroon
    • + *
    • ETB - Ethiopian Birr
    • + *
    • EUR - Euro
    • + *
    • XBA - European Composite Unit
    • + *
    • XEU - European Currency Unit
    • + *
    • XBB - European Monetary Unit
    • + *
    • XBC - European Unit of Account (XBC)
    • + *
    • XBD - European Unit of Account (XBD)
    • + *
    • FKP - Falkland Islands Pound
    • + *
    • FJD - Fijian Dollar
    • + *
    • FIM - Finnish Markka
    • + *
    • FRF - French Franc
    • + *
    • XFO - French Gold Franc
    • + *
    • XFU - French UIC-Franc
    • + *
    • GMD - Gambian Dalasi
    • + *
    • GEK - Georgian Kupon Larit
    • + *
    • GEL - Georgian Lari
    • + *
    • DEM - German Mark
    • + *
    • GHS - Ghanaian Cedi
    • + *
    • GHC - Ghanaian Cedi (1979–2007)
    • + *
    • GIP - Gibraltar Pound
    • + *
    • XAU - Gold
    • + *
    • GRD - Greek Drachma
    • + *
    • GTQ - Guatemalan Quetzal
    • + *
    • GWP - Guinea-Bissau Peso
    • + *
    • GNF - Guinean Franc
    • + *
    • GNS - Guinean Syli
    • + *
    • GYD - Guyanaese Dollar
    • + *
    • HTG - Haitian Gourde
    • + *
    • HNL - Honduran Lempira
    • + *
    • HKD - Hong Kong Dollar
    • + *
    • HUF - Hungarian Forint
    • + *
    • IMP - IMP
    • + *
    • ISK - Icelandic Króna
    • + *
    • ISJ - Icelandic Króna (1918–1981)
    • + *
    • INR - Indian Rupee
    • + *
    • IDR - Indonesian Rupiah
    • + *
    • IRR - Iranian Rial
    • + *
    • IQD - Iraqi Dinar
    • + *
    • IEP - Irish Pound
    • + *
    • ILS - Israeli New Shekel
    • + *
    • ILP - Israeli Pound
    • + *
    • ILR - Israeli Shekel (1980–1985)
    • + *
    • ITL - Italian Lira
    • + *
    • JMD - Jamaican Dollar
    • + *
    • JPY - Japanese Yen
    • + *
    • JOD - Jordanian Dinar
    • + *
    • KZT - Kazakhstani Tenge
    • + *
    • KES - Kenyan Shilling
    • + *
    • KWD - Kuwaiti Dinar
    • + *
    • KGS - Kyrgystani Som
    • + *
    • LAK - Laotian Kip
    • + *
    • LVL - Latvian Lats
    • + *
    • LVR - Latvian Ruble
    • + *
    • LBP - Lebanese Pound
    • + *
    • LSL - Lesotho Loti
    • + *
    • LRD - Liberian Dollar
    • + *
    • LYD - Libyan Dinar
    • + *
    • LTL - Lithuanian Litas
    • + *
    • LTT - Lithuanian Talonas
    • + *
    • LUL - Luxembourg Financial Franc
    • + *
    • LUC - Luxembourgian Convertible Franc
    • + *
    • LUF - Luxembourgian Franc
    • + *
    • MOP - Macanese Pataca
    • + *
    • MKD - Macedonian Denar
    • + *
    • MKN - Macedonian Denar (1992–1993)
    • + *
    • MGA - Malagasy Ariary
    • + *
    • MGF - Malagasy Franc
    • + *
    • MWK - Malawian Kwacha
    • + *
    • MYR - Malaysian Ringgit
    • + *
    • MVR - Maldivian Rufiyaa
    • + *
    • MVP - Maldivian Rupee (1947–1981)
    • + *
    • MLF - Malian Franc
    • + *
    • MTL - Maltese Lira
    • + *
    • MTP - Maltese Pound
    • + *
    • MRU - Mauritanian Ouguiya
    • + *
    • MRO - Mauritanian Ouguiya (1973–2017)
    • + *
    • MUR - Mauritian Rupee
    • + *
    • MXV - Mexican Investment Unit
    • + *
    • MXN - Mexican Peso
    • + *
    • MXP - Mexican Silver Peso (1861–1992)
    • + *
    • MDC - Moldovan Cupon
    • + *
    • MDL - Moldovan Leu
    • + *
    • MCF - Monegasque Franc
    • + *
    • MNT - Mongolian Tugrik
    • + *
    • MAD - Moroccan Dirham
    • + *
    • MAF - Moroccan Franc
    • + *
    • MZE - Mozambican Escudo
    • + *
    • MZN - Mozambican Metical
    • + *
    • MZM - Mozambican Metical (1980–2006)
    • + *
    • MMK - Myanmar Kyat
    • + *
    • NAD - Namibian Dollar
    • + *
    • NPR - Nepalese Rupee
    • + *
    • ANG - Netherlands Antillean Guilder
    • + *
    • TWD - New Taiwan Dollar
    • + *
    • NZD - New Zealand Dollar
    • + *
    • NIO - Nicaraguan Córdoba
    • + *
    • NIC - Nicaraguan Córdoba (1988–1991)
    • + *
    • NGN - Nigerian Naira
    • + *
    • KPW - North Korean Won
    • + *
    • NOK - Norwegian Krone
    • + *
    • OMR - Omani Rial
    • + *
    • PKR - Pakistani Rupee
    • + *
    • XPD - Palladium
    • + *
    • PAB - Panamanian Balboa
    • + *
    • PGK - Papua New Guinean Kina
    • + *
    • PYG - Paraguayan Guarani
    • + *
    • PEI - Peruvian Inti
    • + *
    • PEN - Peruvian Sol
    • + *
    • PES - Peruvian Sol (1863–1965)
    • + *
    • PHP - Philippine Peso
    • + *
    • XPT - Platinum
    • + *
    • PLN - Polish Zloty
    • + *
    • PLZ - Polish Zloty (1950–1995)
    • + *
    • PTE - Portuguese Escudo
    • + *
    • GWE - Portuguese Guinea Escudo
    • + *
    • QAR - Qatari Rial
    • + *
    • XRE - RINET Funds
    • + *
    • RHD - Rhodesian Dollar
    • + *
    • RON - Romanian Leu
    • + *
    • ROL - Romanian Leu (1952–2006)
    • + *
    • RUB - Russian Ruble
    • + *
    • RUR - Russian Ruble (1991–1998)
    • + *
    • RWF - Rwandan Franc
    • + *
    • SVC - Salvadoran Colón
    • + *
    • WST - Samoan Tala
    • + *
    • SAR - Saudi Riyal
    • + *
    • RSD - Serbian Dinar
    • + *
    • CSD - Serbian Dinar (2002–2006)
    • + *
    • SCR - Seychellois Rupee
    • + *
    • SLL - Sierra Leonean Leone
    • + *
    • XAG - Silver
    • + *
    • SGD - Singapore Dollar
    • + *
    • SKK - Slovak Koruna
    • + *
    • SIT - Slovenian Tolar
    • + *
    • SBD - Solomon Islands Dollar
    • + *
    • SOS - Somali Shilling
    • + *
    • ZAR - South African Rand
    • + *
    • ZAL - South African Rand (financial)
    • + *
    • KRH - South Korean Hwan (1953–1962)
    • + *
    • KRW - South Korean Won
    • + *
    • KRO - South Korean Won (1945–1953)
    • + *
    • SSP - South Sudanese Pound
    • + *
    • SUR - Soviet Rouble
    • + *
    • ESP - Spanish Peseta
    • + *
    • ESA - Spanish Peseta (A account)
    • + *
    • ESB - Spanish Peseta (convertible account)
    • + *
    • XDR - Special Drawing Rights
    • + *
    • LKR - Sri Lankan Rupee
    • + *
    • SHP - St. Helena Pound
    • + *
    • XSU - Sucre
    • + *
    • SDD - Sudanese Dinar (1992–2007)
    • + *
    • SDG - Sudanese Pound
    • + *
    • SDP - Sudanese Pound (1957–1998)
    • + *
    • SRD - Surinamese Dollar
    • + *
    • SRG - Surinamese Guilder
    • + *
    • SZL - Swazi Lilangeni
    • + *
    • SEK - Swedish Krona
    • + *
    • CHF - Swiss Franc
    • + *
    • SYP - Syrian Pound
    • + *
    • STN - São Tomé & Príncipe Dobra
    • + *
    • STD - São Tomé & Príncipe Dobra (1977–2017)
    • + *
    • TVD - TVD
    • + *
    • TJR - Tajikistani Ruble
    • + *
    • TJS - Tajikistani Somoni
    • + *
    • TZS - Tanzanian Shilling
    • + *
    • XTS - Testing Currency Code
    • + *
    • THB - Thai Baht
    • + *
    • XXX - The codes assigned for transactions where no currency is involved
    • + *
    • TPE - Timorese Escudo
    • + *
    • TOP - Tongan Paʻanga
    • + *
    • TTD - Trinidad & Tobago Dollar
    • + *
    • TND - Tunisian Dinar
    • + *
    • TRY - Turkish Lira
    • + *
    • TRL - Turkish Lira (1922–2005)
    • + *
    • TMT - Turkmenistani Manat
    • + *
    • TMM - Turkmenistani Manat (1993–2009)
    • + *
    • USD - US Dollar
    • + *
    • USN - US Dollar (Next day)
    • + *
    • USS - US Dollar (Same day)
    • + *
    • UGX - Ugandan Shilling
    • + *
    • UGS - Ugandan Shilling (1966–1987)
    • + *
    • UAH - Ukrainian Hryvnia
    • + *
    • UAK - Ukrainian Karbovanets
    • + *
    • AED - United Arab Emirates Dirham
    • + *
    • UYW - Uruguayan Nominal Wage Index Unit
    • + *
    • UYU - Uruguayan Peso
    • + *
    • UYP - Uruguayan Peso (1975–1993)
    • + *
    • UYI - Uruguayan Peso (Indexed Units)
    • + *
    • UZS - Uzbekistani Som
    • + *
    • VUV - Vanuatu Vatu
    • + *
    • VES - Venezuelan Bolívar
    • + *
    • VEB - Venezuelan Bolívar (1871–2008)
    • + *
    • VEF - Venezuelan Bolívar (2008–2018)
    • + *
    • VND - Vietnamese Dong
    • + *
    • VNN - Vietnamese Dong (1978–1985)
    • + *
    • CHE - WIR Euro
    • + *
    • CHW - WIR Franc
    • + *
    • XOF - West African CFA Franc
    • + *
    • YDD - Yemeni Dinar
    • + *
    • YER - Yemeni Rial
    • + *
    • YUN - Yugoslavian Convertible Dinar (1990–1992)
    • + *
    • YUD - Yugoslavian Hard Dinar (1966–1990)
    • + *
    • YUM - Yugoslavian New Dinar (1994–2002)
    • + *
    • YUR - Yugoslavian Reformed Dinar (1992–1993)
    • + *
    • ZWN - ZWN
    • + *
    • ZRN - Zairean New Zaire (1993–1998)
    • + *
    • ZRZ - Zairean Zaire (1971–1993)
    • + *
    • ZMW - Zambian Kwacha
    • + *
    • ZMK - Zambian Kwacha (1968–2012)
    • + *
    • ZWD - Zimbabwean Dollar (1980–2008)
    • + *
    • ZWR - Zimbabwean Dollar (2008)
    • + *
    • ZWL - Zimbabwean Dollar (2009)
    • + *
    + */ @JsonSetter(value = "currency", nulls = Nulls.SKIP) - public Builder currency(Optional currency) { + public Builder currency(Optional currency) { this.currency = currency; return this; } - public Builder currency(TransactionCurrencyEnum currency) { + public Builder currency(JournalLineCurrency currency) { this.currency = Optional.ofNullable(currency); return this; } + /** + *

    The company the journal entry belongs to.

    + */ @JsonSetter(value = "company", nulls = Nulls.SKIP) public Builder company(Optional company) { this.company = company; @@ -769,6 +1112,17 @@ public Builder employee(String employee) { return this; } + @JsonSetter(value = "project", nulls = Nulls.SKIP) + public Builder project(Optional project) { + this.project = project; + return this; + } + + public Builder project(JournalLineProject project) { + this.project = Optional.ofNullable(project); + return this; + } + @JsonSetter(value = "contact", nulls = Nulls.SKIP) public Builder contact(Optional contact) { this.contact = contact; @@ -780,6 +1134,9 @@ public Builder contact(String contact) { return this; } + /** + *

    The tax rate that applies to this line item.

    + */ @JsonSetter(value = "tax_rate", nulls = Nulls.SKIP) public Builder taxRate(Optional taxRate) { this.taxRate = taxRate; @@ -791,6 +1148,9 @@ public Builder taxRate(String taxRate) { return this; } + /** + *

    The line's description.

    + */ @JsonSetter(value = "description", nulls = Nulls.SKIP) public Builder description(Optional description) { this.description = description; @@ -802,6 +1162,9 @@ public Builder description(String description) { return this; } + /** + *

    The journal line item's exchange rate.

    + */ @JsonSetter(value = "exchange_rate", nulls = Nulls.SKIP) public Builder exchangeRate(Optional exchangeRate) { this.exchangeRate = exchangeRate; @@ -813,6 +1176,9 @@ public Builder exchangeRate(String exchangeRate) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; @@ -848,6 +1214,7 @@ public JournalLine build() { currency, company, employee, + project, contact, taxRate, description, diff --git a/src/main/java/com/merge/api/accounting/types/JournalLineCurrency.java b/src/main/java/com/merge/api/accounting/types/JournalLineCurrency.java new file mode 100644 index 000000000..d93554cee --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/JournalLineCurrency.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = JournalLineCurrency.Deserializer.class) +public final class JournalLineCurrency { + private final Object value; + + private final int type; + + private JournalLineCurrency(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((TransactionCurrencyEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof JournalLineCurrency && equalTo((JournalLineCurrency) other); + } + + private boolean equalTo(JournalLineCurrency other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static JournalLineCurrency of(TransactionCurrencyEnum value) { + return new JournalLineCurrency(value, 0); + } + + public static JournalLineCurrency of(String value) { + return new JournalLineCurrency(value, 1); + } + + public interface Visitor { + T visit(TransactionCurrencyEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(JournalLineCurrency.class); + } + + @java.lang.Override + public JournalLineCurrency deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TransactionCurrencyEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/JournalLineProject.java b/src/main/java/com/merge/api/accounting/types/JournalLineProject.java new file mode 100644 index 000000000..6ae28ba93 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/JournalLineProject.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = JournalLineProject.Deserializer.class) +public final class JournalLineProject { + private final Object value; + + private final int type; + + private JournalLineProject(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((Project) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof JournalLineProject && equalTo((JournalLineProject) other); + } + + private boolean equalTo(JournalLineProject other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static JournalLineProject of(String value) { + return new JournalLineProject(value, 0); + } + + public static JournalLineProject of(Project value) { + return new JournalLineProject(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(Project value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(JournalLineProject.class); + } + + @java.lang.Override + public JournalLineProject deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, Project.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/JournalLineRequest.java b/src/main/java/com/merge/api/accounting/types/JournalLineRequest.java index 151745bc2..38c183ba5 100644 --- a/src/main/java/com/merge/api/accounting/types/JournalLineRequest.java +++ b/src/main/java/com/merge/api/accounting/types/JournalLineRequest.java @@ -32,12 +32,14 @@ public final class JournalLineRequest { private final Optional>> trackingCategories; - private final Optional currency; + private final Optional currency; private final Optional company; private final Optional employee; + private final Optional project; + private final Optional contact; private final Optional taxRate; @@ -60,9 +62,10 @@ private JournalLineRequest( Optional netAmount, Optional trackingCategory, Optional>> trackingCategories, - Optional currency, + Optional currency, Optional company, Optional employee, + Optional project, Optional contact, Optional taxRate, Optional description, @@ -79,6 +82,7 @@ private JournalLineRequest( this.currency = currency; this.company = company; this.employee = employee; + this.project = project; this.contact = contact; this.taxRate = taxRate; this.description = description; @@ -435,7 +439,7 @@ public Optional>> getTra * */ @JsonProperty("currency") - public Optional getCurrency() { + public Optional getCurrency() { return currency; } @@ -452,6 +456,11 @@ public Optional getEmployee() { return employee; } + @JsonProperty("project") + public Optional getProject() { + return project; + } + @JsonProperty("contact") public Optional getContact() { return contact; @@ -516,6 +525,7 @@ private boolean equalTo(JournalLineRequest other) { && currency.equals(other.currency) && company.equals(other.company) && employee.equals(other.employee) + && project.equals(other.project) && contact.equals(other.contact) && taxRate.equals(other.taxRate) && description.equals(other.description) @@ -536,6 +546,7 @@ public int hashCode() { this.currency, this.company, this.employee, + this.project, this.contact, this.taxRate, this.description, @@ -567,12 +578,14 @@ public static final class Builder { private Optional>> trackingCategories = Optional.empty(); - private Optional currency = Optional.empty(); + private Optional currency = Optional.empty(); private Optional company = Optional.empty(); private Optional employee = Optional.empty(); + private Optional project = Optional.empty(); + private Optional contact = Optional.empty(); private Optional taxRate = Optional.empty(); @@ -601,6 +614,7 @@ public Builder from(JournalLineRequest other) { currency(other.getCurrency()); company(other.getCompany()); employee(other.getEmployee()); + project(other.getProject()); contact(other.getContact()); taxRate(other.getTaxRate()); description(other.getDescription()); @@ -611,6 +625,9 @@ public Builder from(JournalLineRequest other) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -633,6 +650,9 @@ public Builder account(JournalLineRequestAccount account) { return this; } + /** + *

    The value of the line item including taxes and other fees.

    + */ @JsonSetter(value = "net_amount", nulls = Nulls.SKIP) public Builder netAmount(Optional netAmount) { this.netAmount = netAmount; @@ -655,6 +675,9 @@ public Builder trackingCategory(JournalLineRequestTrackingCategory trackingCateg return this; } + /** + *

    The journal line item's associated tracking categories.

    + */ @JsonSetter(value = "tracking_categories", nulls = Nulls.SKIP) public Builder trackingCategories( Optional>> trackingCategories) { @@ -667,17 +690,331 @@ public Builder trackingCategories(ListThe journal line item's currency.

    + *
      + *
    • XUA - ADB Unit of Account
    • + *
    • AFN - Afghan Afghani
    • + *
    • AFA - Afghan Afghani (1927–2002)
    • + *
    • ALL - Albanian Lek
    • + *
    • ALK - Albanian Lek (1946–1965)
    • + *
    • DZD - Algerian Dinar
    • + *
    • ADP - Andorran Peseta
    • + *
    • AOA - Angolan Kwanza
    • + *
    • AOK - Angolan Kwanza (1977–1991)
    • + *
    • AON - Angolan New Kwanza (1990–2000)
    • + *
    • AOR - Angolan Readjusted Kwanza (1995–1999)
    • + *
    • ARA - Argentine Austral
    • + *
    • ARS - Argentine Peso
    • + *
    • ARM - Argentine Peso (1881–1970)
    • + *
    • ARP - Argentine Peso (1983–1985)
    • + *
    • ARL - Argentine Peso Ley (1970–1983)
    • + *
    • AMD - Armenian Dram
    • + *
    • AWG - Aruban Florin
    • + *
    • AUD - Australian Dollar
    • + *
    • ATS - Austrian Schilling
    • + *
    • AZN - Azerbaijani Manat
    • + *
    • AZM - Azerbaijani Manat (1993–2006)
    • + *
    • BSD - Bahamian Dollar
    • + *
    • BHD - Bahraini Dinar
    • + *
    • BDT - Bangladeshi Taka
    • + *
    • BBD - Barbadian Dollar
    • + *
    • BYN - Belarusian Ruble
    • + *
    • BYB - Belarusian Ruble (1994–1999)
    • + *
    • BYR - Belarusian Ruble (2000–2016)
    • + *
    • BEF - Belgian Franc
    • + *
    • BEC - Belgian Franc (convertible)
    • + *
    • BEL - Belgian Franc (financial)
    • + *
    • BZD - Belize Dollar
    • + *
    • BMD - Bermudan Dollar
    • + *
    • BTN - Bhutanese Ngultrum
    • + *
    • BOB - Bolivian Boliviano
    • + *
    • BOL - Bolivian Boliviano (1863–1963)
    • + *
    • BOV - Bolivian Mvdol
    • + *
    • BOP - Bolivian Peso
    • + *
    • BAM - Bosnia-Herzegovina Convertible Mark
    • + *
    • BAD - Bosnia-Herzegovina Dinar (1992–1994)
    • + *
    • BAN - Bosnia-Herzegovina New Dinar (1994–1997)
    • + *
    • BWP - Botswanan Pula
    • + *
    • BRC - Brazilian Cruzado (1986–1989)
    • + *
    • BRZ - Brazilian Cruzeiro (1942–1967)
    • + *
    • BRE - Brazilian Cruzeiro (1990–1993)
    • + *
    • BRR - Brazilian Cruzeiro (1993–1994)
    • + *
    • BRN - Brazilian New Cruzado (1989–1990)
    • + *
    • BRB - Brazilian New Cruzeiro (1967–1986)
    • + *
    • BRL - Brazilian Real
    • + *
    • GBP - British Pound
    • + *
    • BND - Brunei Dollar
    • + *
    • BGL - Bulgarian Hard Lev
    • + *
    • BGN - Bulgarian Lev
    • + *
    • BGO - Bulgarian Lev (1879–1952)
    • + *
    • BGM - Bulgarian Socialist Lev
    • + *
    • BUK - Burmese Kyat
    • + *
    • BIF - Burundian Franc
    • + *
    • XPF - CFP Franc
    • + *
    • KHR - Cambodian Riel
    • + *
    • CAD - Canadian Dollar
    • + *
    • CVE - Cape Verdean Escudo
    • + *
    • KYD - Cayman Islands Dollar
    • + *
    • XAF - Central African CFA Franc
    • + *
    • CLE - Chilean Escudo
    • + *
    • CLP - Chilean Peso
    • + *
    • CLF - Chilean Unit of Account (UF)
    • + *
    • CNX - Chinese People’s Bank Dollar
    • + *
    • CNY - Chinese Yuan
    • + *
    • CNH - Chinese Yuan (offshore)
    • + *
    • COP - Colombian Peso
    • + *
    • COU - Colombian Real Value Unit
    • + *
    • KMF - Comorian Franc
    • + *
    • CDF - Congolese Franc
    • + *
    • CRC - Costa Rican Colón
    • + *
    • HRD - Croatian Dinar
    • + *
    • HRK - Croatian Kuna
    • + *
    • CUC - Cuban Convertible Peso
    • + *
    • CUP - Cuban Peso
    • + *
    • CYP - Cypriot Pound
    • + *
    • CZK - Czech Koruna
    • + *
    • CSK - Czechoslovak Hard Koruna
    • + *
    • DKK - Danish Krone
    • + *
    • DJF - Djiboutian Franc
    • + *
    • DOP - Dominican Peso
    • + *
    • NLG - Dutch Guilder
    • + *
    • XCD - East Caribbean Dollar
    • + *
    • DDM - East German Mark
    • + *
    • ECS - Ecuadorian Sucre
    • + *
    • ECV - Ecuadorian Unit of Constant Value
    • + *
    • EGP - Egyptian Pound
    • + *
    • GQE - Equatorial Guinean Ekwele
    • + *
    • ERN - Eritrean Nakfa
    • + *
    • EEK - Estonian Kroon
    • + *
    • ETB - Ethiopian Birr
    • + *
    • EUR - Euro
    • + *
    • XBA - European Composite Unit
    • + *
    • XEU - European Currency Unit
    • + *
    • XBB - European Monetary Unit
    • + *
    • XBC - European Unit of Account (XBC)
    • + *
    • XBD - European Unit of Account (XBD)
    • + *
    • FKP - Falkland Islands Pound
    • + *
    • FJD - Fijian Dollar
    • + *
    • FIM - Finnish Markka
    • + *
    • FRF - French Franc
    • + *
    • XFO - French Gold Franc
    • + *
    • XFU - French UIC-Franc
    • + *
    • GMD - Gambian Dalasi
    • + *
    • GEK - Georgian Kupon Larit
    • + *
    • GEL - Georgian Lari
    • + *
    • DEM - German Mark
    • + *
    • GHS - Ghanaian Cedi
    • + *
    • GHC - Ghanaian Cedi (1979–2007)
    • + *
    • GIP - Gibraltar Pound
    • + *
    • XAU - Gold
    • + *
    • GRD - Greek Drachma
    • + *
    • GTQ - Guatemalan Quetzal
    • + *
    • GWP - Guinea-Bissau Peso
    • + *
    • GNF - Guinean Franc
    • + *
    • GNS - Guinean Syli
    • + *
    • GYD - Guyanaese Dollar
    • + *
    • HTG - Haitian Gourde
    • + *
    • HNL - Honduran Lempira
    • + *
    • HKD - Hong Kong Dollar
    • + *
    • HUF - Hungarian Forint
    • + *
    • IMP - IMP
    • + *
    • ISK - Icelandic Króna
    • + *
    • ISJ - Icelandic Króna (1918–1981)
    • + *
    • INR - Indian Rupee
    • + *
    • IDR - Indonesian Rupiah
    • + *
    • IRR - Iranian Rial
    • + *
    • IQD - Iraqi Dinar
    • + *
    • IEP - Irish Pound
    • + *
    • ILS - Israeli New Shekel
    • + *
    • ILP - Israeli Pound
    • + *
    • ILR - Israeli Shekel (1980–1985)
    • + *
    • ITL - Italian Lira
    • + *
    • JMD - Jamaican Dollar
    • + *
    • JPY - Japanese Yen
    • + *
    • JOD - Jordanian Dinar
    • + *
    • KZT - Kazakhstani Tenge
    • + *
    • KES - Kenyan Shilling
    • + *
    • KWD - Kuwaiti Dinar
    • + *
    • KGS - Kyrgystani Som
    • + *
    • LAK - Laotian Kip
    • + *
    • LVL - Latvian Lats
    • + *
    • LVR - Latvian Ruble
    • + *
    • LBP - Lebanese Pound
    • + *
    • LSL - Lesotho Loti
    • + *
    • LRD - Liberian Dollar
    • + *
    • LYD - Libyan Dinar
    • + *
    • LTL - Lithuanian Litas
    • + *
    • LTT - Lithuanian Talonas
    • + *
    • LUL - Luxembourg Financial Franc
    • + *
    • LUC - Luxembourgian Convertible Franc
    • + *
    • LUF - Luxembourgian Franc
    • + *
    • MOP - Macanese Pataca
    • + *
    • MKD - Macedonian Denar
    • + *
    • MKN - Macedonian Denar (1992–1993)
    • + *
    • MGA - Malagasy Ariary
    • + *
    • MGF - Malagasy Franc
    • + *
    • MWK - Malawian Kwacha
    • + *
    • MYR - Malaysian Ringgit
    • + *
    • MVR - Maldivian Rufiyaa
    • + *
    • MVP - Maldivian Rupee (1947–1981)
    • + *
    • MLF - Malian Franc
    • + *
    • MTL - Maltese Lira
    • + *
    • MTP - Maltese Pound
    • + *
    • MRU - Mauritanian Ouguiya
    • + *
    • MRO - Mauritanian Ouguiya (1973–2017)
    • + *
    • MUR - Mauritian Rupee
    • + *
    • MXV - Mexican Investment Unit
    • + *
    • MXN - Mexican Peso
    • + *
    • MXP - Mexican Silver Peso (1861–1992)
    • + *
    • MDC - Moldovan Cupon
    • + *
    • MDL - Moldovan Leu
    • + *
    • MCF - Monegasque Franc
    • + *
    • MNT - Mongolian Tugrik
    • + *
    • MAD - Moroccan Dirham
    • + *
    • MAF - Moroccan Franc
    • + *
    • MZE - Mozambican Escudo
    • + *
    • MZN - Mozambican Metical
    • + *
    • MZM - Mozambican Metical (1980–2006)
    • + *
    • MMK - Myanmar Kyat
    • + *
    • NAD - Namibian Dollar
    • + *
    • NPR - Nepalese Rupee
    • + *
    • ANG - Netherlands Antillean Guilder
    • + *
    • TWD - New Taiwan Dollar
    • + *
    • NZD - New Zealand Dollar
    • + *
    • NIO - Nicaraguan Córdoba
    • + *
    • NIC - Nicaraguan Córdoba (1988–1991)
    • + *
    • NGN - Nigerian Naira
    • + *
    • KPW - North Korean Won
    • + *
    • NOK - Norwegian Krone
    • + *
    • OMR - Omani Rial
    • + *
    • PKR - Pakistani Rupee
    • + *
    • XPD - Palladium
    • + *
    • PAB - Panamanian Balboa
    • + *
    • PGK - Papua New Guinean Kina
    • + *
    • PYG - Paraguayan Guarani
    • + *
    • PEI - Peruvian Inti
    • + *
    • PEN - Peruvian Sol
    • + *
    • PES - Peruvian Sol (1863–1965)
    • + *
    • PHP - Philippine Peso
    • + *
    • XPT - Platinum
    • + *
    • PLN - Polish Zloty
    • + *
    • PLZ - Polish Zloty (1950–1995)
    • + *
    • PTE - Portuguese Escudo
    • + *
    • GWE - Portuguese Guinea Escudo
    • + *
    • QAR - Qatari Rial
    • + *
    • XRE - RINET Funds
    • + *
    • RHD - Rhodesian Dollar
    • + *
    • RON - Romanian Leu
    • + *
    • ROL - Romanian Leu (1952–2006)
    • + *
    • RUB - Russian Ruble
    • + *
    • RUR - Russian Ruble (1991–1998)
    • + *
    • RWF - Rwandan Franc
    • + *
    • SVC - Salvadoran Colón
    • + *
    • WST - Samoan Tala
    • + *
    • SAR - Saudi Riyal
    • + *
    • RSD - Serbian Dinar
    • + *
    • CSD - Serbian Dinar (2002–2006)
    • + *
    • SCR - Seychellois Rupee
    • + *
    • SLL - Sierra Leonean Leone
    • + *
    • XAG - Silver
    • + *
    • SGD - Singapore Dollar
    • + *
    • SKK - Slovak Koruna
    • + *
    • SIT - Slovenian Tolar
    • + *
    • SBD - Solomon Islands Dollar
    • + *
    • SOS - Somali Shilling
    • + *
    • ZAR - South African Rand
    • + *
    • ZAL - South African Rand (financial)
    • + *
    • KRH - South Korean Hwan (1953–1962)
    • + *
    • KRW - South Korean Won
    • + *
    • KRO - South Korean Won (1945–1953)
    • + *
    • SSP - South Sudanese Pound
    • + *
    • SUR - Soviet Rouble
    • + *
    • ESP - Spanish Peseta
    • + *
    • ESA - Spanish Peseta (A account)
    • + *
    • ESB - Spanish Peseta (convertible account)
    • + *
    • XDR - Special Drawing Rights
    • + *
    • LKR - Sri Lankan Rupee
    • + *
    • SHP - St. Helena Pound
    • + *
    • XSU - Sucre
    • + *
    • SDD - Sudanese Dinar (1992–2007)
    • + *
    • SDG - Sudanese Pound
    • + *
    • SDP - Sudanese Pound (1957–1998)
    • + *
    • SRD - Surinamese Dollar
    • + *
    • SRG - Surinamese Guilder
    • + *
    • SZL - Swazi Lilangeni
    • + *
    • SEK - Swedish Krona
    • + *
    • CHF - Swiss Franc
    • + *
    • SYP - Syrian Pound
    • + *
    • STN - São Tomé & Príncipe Dobra
    • + *
    • STD - São Tomé & Príncipe Dobra (1977–2017)
    • + *
    • TVD - TVD
    • + *
    • TJR - Tajikistani Ruble
    • + *
    • TJS - Tajikistani Somoni
    • + *
    • TZS - Tanzanian Shilling
    • + *
    • XTS - Testing Currency Code
    • + *
    • THB - Thai Baht
    • + *
    • XXX - The codes assigned for transactions where no currency is involved
    • + *
    • TPE - Timorese Escudo
    • + *
    • TOP - Tongan Paʻanga
    • + *
    • TTD - Trinidad & Tobago Dollar
    • + *
    • TND - Tunisian Dinar
    • + *
    • TRY - Turkish Lira
    • + *
    • TRL - Turkish Lira (1922–2005)
    • + *
    • TMT - Turkmenistani Manat
    • + *
    • TMM - Turkmenistani Manat (1993–2009)
    • + *
    • USD - US Dollar
    • + *
    • USN - US Dollar (Next day)
    • + *
    • USS - US Dollar (Same day)
    • + *
    • UGX - Ugandan Shilling
    • + *
    • UGS - Ugandan Shilling (1966–1987)
    • + *
    • UAH - Ukrainian Hryvnia
    • + *
    • UAK - Ukrainian Karbovanets
    • + *
    • AED - United Arab Emirates Dirham
    • + *
    • UYW - Uruguayan Nominal Wage Index Unit
    • + *
    • UYU - Uruguayan Peso
    • + *
    • UYP - Uruguayan Peso (1975–1993)
    • + *
    • UYI - Uruguayan Peso (Indexed Units)
    • + *
    • UZS - Uzbekistani Som
    • + *
    • VUV - Vanuatu Vatu
    • + *
    • VES - Venezuelan Bolívar
    • + *
    • VEB - Venezuelan Bolívar (1871–2008)
    • + *
    • VEF - Venezuelan Bolívar (2008–2018)
    • + *
    • VND - Vietnamese Dong
    • + *
    • VNN - Vietnamese Dong (1978–1985)
    • + *
    • CHE - WIR Euro
    • + *
    • CHW - WIR Franc
    • + *
    • XOF - West African CFA Franc
    • + *
    • YDD - Yemeni Dinar
    • + *
    • YER - Yemeni Rial
    • + *
    • YUN - Yugoslavian Convertible Dinar (1990–1992)
    • + *
    • YUD - Yugoslavian Hard Dinar (1966–1990)
    • + *
    • YUM - Yugoslavian New Dinar (1994–2002)
    • + *
    • YUR - Yugoslavian Reformed Dinar (1992–1993)
    • + *
    • ZWN - ZWN
    • + *
    • ZRN - Zairean New Zaire (1993–1998)
    • + *
    • ZRZ - Zairean Zaire (1971–1993)
    • + *
    • ZMW - Zambian Kwacha
    • + *
    • ZMK - Zambian Kwacha (1968–2012)
    • + *
    • ZWD - Zimbabwean Dollar (1980–2008)
    • + *
    • ZWR - Zimbabwean Dollar (2008)
    • + *
    • ZWL - Zimbabwean Dollar (2009)
    • + *
    + */ @JsonSetter(value = "currency", nulls = Nulls.SKIP) - public Builder currency(Optional currency) { + public Builder currency(Optional currency) { this.currency = currency; return this; } - public Builder currency(TransactionCurrencyEnum currency) { + public Builder currency(JournalLineRequestCurrency currency) { this.currency = Optional.ofNullable(currency); return this; } + /** + *

    The company the journal entry belongs to.

    + */ @JsonSetter(value = "company", nulls = Nulls.SKIP) public Builder company(Optional company) { this.company = company; @@ -700,6 +1037,17 @@ public Builder employee(String employee) { return this; } + @JsonSetter(value = "project", nulls = Nulls.SKIP) + public Builder project(Optional project) { + this.project = project; + return this; + } + + public Builder project(JournalLineRequestProject project) { + this.project = Optional.ofNullable(project); + return this; + } + @JsonSetter(value = "contact", nulls = Nulls.SKIP) public Builder contact(Optional contact) { this.contact = contact; @@ -711,6 +1059,9 @@ public Builder contact(String contact) { return this; } + /** + *

    The tax rate that applies to this line item.

    + */ @JsonSetter(value = "tax_rate", nulls = Nulls.SKIP) public Builder taxRate(Optional taxRate) { this.taxRate = taxRate; @@ -722,6 +1073,9 @@ public Builder taxRate(String taxRate) { return this; } + /** + *

    The line's description.

    + */ @JsonSetter(value = "description", nulls = Nulls.SKIP) public Builder description(Optional description) { this.description = description; @@ -733,6 +1087,9 @@ public Builder description(String description) { return this; } + /** + *

    The journal line item's exchange rate.

    + */ @JsonSetter(value = "exchange_rate", nulls = Nulls.SKIP) public Builder exchangeRate(Optional exchangeRate) { this.exchangeRate = exchangeRate; @@ -787,6 +1144,7 @@ public JournalLineRequest build() { currency, company, employee, + project, contact, taxRate, description, diff --git a/src/main/java/com/merge/api/accounting/types/JournalLineRequestCurrency.java b/src/main/java/com/merge/api/accounting/types/JournalLineRequestCurrency.java new file mode 100644 index 000000000..5aecfc65b --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/JournalLineRequestCurrency.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = JournalLineRequestCurrency.Deserializer.class) +public final class JournalLineRequestCurrency { + private final Object value; + + private final int type; + + private JournalLineRequestCurrency(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((TransactionCurrencyEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof JournalLineRequestCurrency && equalTo((JournalLineRequestCurrency) other); + } + + private boolean equalTo(JournalLineRequestCurrency other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static JournalLineRequestCurrency of(TransactionCurrencyEnum value) { + return new JournalLineRequestCurrency(value, 0); + } + + public static JournalLineRequestCurrency of(String value) { + return new JournalLineRequestCurrency(value, 1); + } + + public interface Visitor { + T visit(TransactionCurrencyEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(JournalLineRequestCurrency.class); + } + + @java.lang.Override + public JournalLineRequestCurrency deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TransactionCurrencyEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/JournalLineRequestProject.java b/src/main/java/com/merge/api/accounting/types/JournalLineRequestProject.java new file mode 100644 index 000000000..2849b2e67 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/JournalLineRequestProject.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = JournalLineRequestProject.Deserializer.class) +public final class JournalLineRequestProject { + private final Object value; + + private final int type; + + private JournalLineRequestProject(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((Project) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof JournalLineRequestProject && equalTo((JournalLineRequestProject) other); + } + + private boolean equalTo(JournalLineRequestProject other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static JournalLineRequestProject of(String value) { + return new JournalLineRequestProject(value, 0); + } + + public static JournalLineRequestProject of(Project value) { + return new JournalLineRequestProject(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(Project value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(JournalLineRequestProject.class); + } + + @java.lang.Override + public JournalLineRequestProject deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, Project.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/LinkedAccountCommonModelScopeDeserializerRequest.java b/src/main/java/com/merge/api/accounting/types/LinkedAccountCommonModelScopeDeserializerRequest.java index 9fdf28300..47399000e 100644 --- a/src/main/java/com/merge/api/accounting/types/LinkedAccountCommonModelScopeDeserializerRequest.java +++ b/src/main/java/com/merge/api/accounting/types/LinkedAccountCommonModelScopeDeserializerRequest.java @@ -84,6 +84,9 @@ public Builder from(LinkedAccountCommonModelScopeDeserializerRequest other) { return this; } + /** + *

    The common models you want to update the scopes for

    + */ @JsonSetter(value = "common_models", nulls = Nulls.SKIP) public Builder commonModels(List commonModels) { this.commonModels.clear(); diff --git a/src/main/java/com/merge/api/accounting/types/LinkedAccountsListRequest.java b/src/main/java/com/merge/api/accounting/types/LinkedAccountsListRequest.java index 3723ed6de..a2347eafd 100644 --- a/src/main/java/com/merge/api/accounting/types/LinkedAccountsListRequest.java +++ b/src/main/java/com/merge/api/accounting/types/LinkedAccountsListRequest.java @@ -293,6 +293,18 @@ public Builder from(LinkedAccountsListRequest other) { return this; } + /** + *

    Options: accounting, ats, crm, filestorage, hris, mktg, ticketing

    + *
      + *
    • hris - hris
    • + *
    • ats - ats
    • + *
    • accounting - accounting
    • + *
    • ticketing - ticketing
    • + *
    • crm - crm
    • + *
    • mktg - mktg
    • + *
    • filestorage - filestorage
    • + *
    + */ @JsonSetter(value = "category", nulls = Nulls.SKIP) public Builder category(Optional category) { this.category = category; @@ -304,6 +316,9 @@ public Builder category(LinkedAccountsListRequestCategory category) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -315,6 +330,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    If provided, will only return linked accounts associated with the given email address.

    + */ @JsonSetter(value = "end_user_email_address", nulls = Nulls.SKIP) public Builder endUserEmailAddress(Optional endUserEmailAddress) { this.endUserEmailAddress = endUserEmailAddress; @@ -326,6 +344,9 @@ public Builder endUserEmailAddress(String endUserEmailAddress) { return this; } + /** + *

    If provided, will only return linked accounts associated with the given organization name.

    + */ @JsonSetter(value = "end_user_organization_name", nulls = Nulls.SKIP) public Builder endUserOrganizationName(Optional endUserOrganizationName) { this.endUserOrganizationName = endUserOrganizationName; @@ -337,6 +358,9 @@ public Builder endUserOrganizationName(String endUserOrganizationName) { return this; } + /** + *

    If provided, will only return linked accounts associated with the given origin ID.

    + */ @JsonSetter(value = "end_user_origin_id", nulls = Nulls.SKIP) public Builder endUserOriginId(Optional endUserOriginId) { this.endUserOriginId = endUserOriginId; @@ -348,6 +372,9 @@ public Builder endUserOriginId(String endUserOriginId) { return this; } + /** + *

    Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once.

    + */ @JsonSetter(value = "end_user_origin_ids", nulls = Nulls.SKIP) public Builder endUserOriginIds(Optional endUserOriginIds) { this.endUserOriginIds = endUserOriginIds; @@ -370,6 +397,9 @@ public Builder id(String id) { return this; } + /** + *

    Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once.

    + */ @JsonSetter(value = "ids", nulls = Nulls.SKIP) public Builder ids(Optional ids) { this.ids = ids; @@ -381,6 +411,9 @@ public Builder ids(String ids) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_duplicates", nulls = Nulls.SKIP) public Builder includeDuplicates(Optional includeDuplicates) { this.includeDuplicates = includeDuplicates; @@ -392,6 +425,9 @@ public Builder includeDuplicates(Boolean includeDuplicates) { return this; } + /** + *

    If provided, will only return linked accounts associated with the given integration name.

    + */ @JsonSetter(value = "integration_name", nulls = Nulls.SKIP) public Builder integrationName(Optional integrationName) { this.integrationName = integrationName; @@ -403,6 +439,9 @@ public Builder integrationName(String integrationName) { return this; } + /** + *

    If included, will only include test linked accounts. If not included, will only include non-test linked accounts.

    + */ @JsonSetter(value = "is_test_account", nulls = Nulls.SKIP) public Builder isTestAccount(Optional isTestAccount) { this.isTestAccount = isTestAccount; @@ -414,6 +453,9 @@ public Builder isTestAccount(String isTestAccount) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -425,6 +467,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    Filter by status. Options: COMPLETE, IDLE, INCOMPLETE, RELINK_NEEDED

    + */ @JsonSetter(value = "status", nulls = Nulls.SKIP) public Builder status(Optional status) { this.status = status; diff --git a/src/main/java/com/merge/api/accounting/types/MultipartFormFieldRequest.java b/src/main/java/com/merge/api/accounting/types/MultipartFormFieldRequest.java index a02a7453e..baf8e3602 100644 --- a/src/main/java/com/merge/api/accounting/types/MultipartFormFieldRequest.java +++ b/src/main/java/com/merge/api/accounting/types/MultipartFormFieldRequest.java @@ -127,26 +127,46 @@ public static NameStage builder() { } public interface NameStage { + /** + * The name of the form field + */ DataStage name(@NotNull String name); Builder from(MultipartFormFieldRequest other); } public interface DataStage { + /** + * The data for the form field. + */ _FinalStage data(@NotNull String data); } public interface _FinalStage { MultipartFormFieldRequest build(); + /** + *

    The encoding of the value of data. Defaults to RAW if not defined.

    + *
      + *
    • RAW - RAW
    • + *
    • BASE64 - BASE64
    • + *
    • GZIP_BASE64 - GZIP_BASE64
    • + *
    + */ _FinalStage encoding(Optional encoding); _FinalStage encoding(EncodingEnum encoding); + /** + *

    The file name of the form field, if the field is for a file.

    + */ _FinalStage fileName(Optional fileName); _FinalStage fileName(String fileName); + /** + *

    The MIME type of the file, if the field is for a file.

    + */ _FinalStage contentType(Optional contentType); _FinalStage contentType(String contentType); @@ -180,7 +200,7 @@ public Builder from(MultipartFormFieldRequest other) { } /** - *

    The name of the form field

    + * The name of the form field

    The name of the form field

    * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -191,7 +211,7 @@ public DataStage name(@NotNull String name) { } /** - *

    The data for the form field.

    + * The data for the form field.

    The data for the form field.

    * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -211,6 +231,9 @@ public _FinalStage contentType(String contentType) { return this; } + /** + *

    The MIME type of the file, if the field is for a file.

    + */ @java.lang.Override @JsonSetter(value = "content_type", nulls = Nulls.SKIP) public _FinalStage contentType(Optional contentType) { @@ -228,6 +251,9 @@ public _FinalStage fileName(String fileName) { return this; } + /** + *

    The file name of the form field, if the field is for a file.

    + */ @java.lang.Override @JsonSetter(value = "file_name", nulls = Nulls.SKIP) public _FinalStage fileName(Optional fileName) { @@ -250,6 +276,14 @@ public _FinalStage encoding(EncodingEnum encoding) { return this; } + /** + *

    The encoding of the value of data. Defaults to RAW if not defined.

    + *
      + *
    • RAW - RAW
    • + *
    • BASE64 - BASE64
    • + *
    • GZIP_BASE64 - GZIP_BASE64
    • + *
    + */ @java.lang.Override @JsonSetter(value = "encoding", nulls = Nulls.SKIP) public _FinalStage encoding(Optional encoding) { diff --git a/src/main/java/com/merge/api/accounting/types/PaginatedProjectList.java b/src/main/java/com/merge/api/accounting/types/PaginatedProjectList.java new file mode 100644 index 000000000..29c4cf79d --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/PaginatedProjectList.java @@ -0,0 +1,144 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.merge.api.core.ObjectMappers; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = PaginatedProjectList.Builder.class) +public final class PaginatedProjectList { + private final Optional next; + + private final Optional previous; + + private final Optional> results; + + private final Map additionalProperties; + + private PaginatedProjectList( + Optional next, + Optional previous, + Optional> results, + Map additionalProperties) { + this.next = next; + this.previous = previous; + this.results = results; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("next") + public Optional getNext() { + return next; + } + + @JsonProperty("previous") + public Optional getPrevious() { + return previous; + } + + @JsonProperty("results") + public Optional> getResults() { + return results; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PaginatedProjectList && equalTo((PaginatedProjectList) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(PaginatedProjectList other) { + return next.equals(other.next) && previous.equals(other.previous) && results.equals(other.results); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.next, this.previous, this.results); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional next = Optional.empty(); + + private Optional previous = Optional.empty(); + + private Optional> results = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(PaginatedProjectList other) { + next(other.getNext()); + previous(other.getPrevious()); + results(other.getResults()); + return this; + } + + @JsonSetter(value = "next", nulls = Nulls.SKIP) + public Builder next(Optional next) { + this.next = next; + return this; + } + + public Builder next(String next) { + this.next = Optional.ofNullable(next); + return this; + } + + @JsonSetter(value = "previous", nulls = Nulls.SKIP) + public Builder previous(Optional previous) { + this.previous = previous; + return this; + } + + public Builder previous(String previous) { + this.previous = Optional.ofNullable(previous); + return this; + } + + @JsonSetter(value = "results", nulls = Nulls.SKIP) + public Builder results(Optional> results) { + this.results = results; + return this; + } + + public Builder results(List results) { + this.results = Optional.ofNullable(results); + return this; + } + + public PaginatedProjectList build() { + return new PaginatedProjectList(next, previous, results, additionalProperties); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/PatchedEditFieldMappingRequest.java b/src/main/java/com/merge/api/accounting/types/PatchedEditFieldMappingRequest.java index 0700d7468..ae506e399 100644 --- a/src/main/java/com/merge/api/accounting/types/PatchedEditFieldMappingRequest.java +++ b/src/main/java/com/merge/api/accounting/types/PatchedEditFieldMappingRequest.java @@ -116,6 +116,9 @@ public Builder from(PatchedEditFieldMappingRequest other) { return this; } + /** + *

    The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.

    + */ @JsonSetter(value = "remote_field_traversal_path", nulls = Nulls.SKIP) public Builder remoteFieldTraversalPath(Optional> remoteFieldTraversalPath) { this.remoteFieldTraversalPath = remoteFieldTraversalPath; @@ -127,6 +130,9 @@ public Builder remoteFieldTraversalPath(List remoteFieldTraversalPath) return this; } + /** + *

    The method of the remote endpoint where the remote field is coming from.

    + */ @JsonSetter(value = "remote_method", nulls = Nulls.SKIP) public Builder remoteMethod(Optional remoteMethod) { this.remoteMethod = remoteMethod; @@ -138,6 +144,9 @@ public Builder remoteMethod(String remoteMethod) { return this; } + /** + *

    The path of the remote endpoint where the remote field is coming from.

    + */ @JsonSetter(value = "remote_url_path", nulls = Nulls.SKIP) public Builder remoteUrlPath(Optional remoteUrlPath) { this.remoteUrlPath = remoteUrlPath; diff --git a/src/main/java/com/merge/api/accounting/types/PatchedInvoiceEndpointRequest.java b/src/main/java/com/merge/api/accounting/types/PatchedInvoiceEndpointRequest.java index 84811dfab..6b5d28583 100644 --- a/src/main/java/com/merge/api/accounting/types/PatchedInvoiceEndpointRequest.java +++ b/src/main/java/com/merge/api/accounting/types/PatchedInvoiceEndpointRequest.java @@ -99,10 +99,16 @@ public interface ModelStage { public interface _FinalStage { PatchedInvoiceEndpointRequest build(); + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ _FinalStage isDebugMode(Optional isDebugMode); _FinalStage isDebugMode(Boolean isDebugMode); + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ _FinalStage runAsync(Optional runAsync); _FinalStage runAsync(Boolean runAsync); @@ -146,6 +152,9 @@ public _FinalStage runAsync(Boolean runAsync) { return this; } + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ @java.lang.Override @JsonSetter(value = "run_async", nulls = Nulls.SKIP) public _FinalStage runAsync(Optional runAsync) { @@ -163,6 +172,9 @@ public _FinalStage isDebugMode(Boolean isDebugMode) { return this; } + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ @java.lang.Override @JsonSetter(value = "is_debug_mode", nulls = Nulls.SKIP) public _FinalStage isDebugMode(Optional isDebugMode) { diff --git a/src/main/java/com/merge/api/accounting/types/PatchedItemEndpointRequest.java b/src/main/java/com/merge/api/accounting/types/PatchedItemEndpointRequest.java new file mode 100644 index 000000000..2b441e666 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/PatchedItemEndpointRequest.java @@ -0,0 +1,190 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.merge.api.core.ObjectMappers; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = PatchedItemEndpointRequest.Builder.class) +public final class PatchedItemEndpointRequest { + private final Optional isDebugMode; + + private final Optional runAsync; + + private final PatchedItemRequestRequest model; + + private final Map additionalProperties; + + private PatchedItemEndpointRequest( + Optional isDebugMode, + Optional runAsync, + PatchedItemRequestRequest model, + Map additionalProperties) { + this.isDebugMode = isDebugMode; + this.runAsync = runAsync; + this.model = model; + this.additionalProperties = additionalProperties; + } + + /** + * @return Whether to include debug fields (such as log file links) in the response. + */ + @JsonProperty("is_debug_mode") + public Optional getIsDebugMode() { + return isDebugMode; + } + + /** + * @return Whether or not third-party updates should be run asynchronously. + */ + @JsonProperty("run_async") + public Optional getRunAsync() { + return runAsync; + } + + @JsonProperty("model") + public PatchedItemRequestRequest getModel() { + return model; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PatchedItemEndpointRequest && equalTo((PatchedItemEndpointRequest) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(PatchedItemEndpointRequest other) { + return isDebugMode.equals(other.isDebugMode) && runAsync.equals(other.runAsync) && model.equals(other.model); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.isDebugMode, this.runAsync, this.model); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static ModelStage builder() { + return new Builder(); + } + + public interface ModelStage { + _FinalStage model(@NotNull PatchedItemRequestRequest model); + + Builder from(PatchedItemEndpointRequest other); + } + + public interface _FinalStage { + PatchedItemEndpointRequest build(); + + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ + _FinalStage isDebugMode(Optional isDebugMode); + + _FinalStage isDebugMode(Boolean isDebugMode); + + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ + _FinalStage runAsync(Optional runAsync); + + _FinalStage runAsync(Boolean runAsync); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements ModelStage, _FinalStage { + private PatchedItemRequestRequest model; + + private Optional runAsync = Optional.empty(); + + private Optional isDebugMode = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(PatchedItemEndpointRequest other) { + isDebugMode(other.getIsDebugMode()); + runAsync(other.getRunAsync()); + model(other.getModel()); + return this; + } + + @java.lang.Override + @JsonSetter("model") + public _FinalStage model(@NotNull PatchedItemRequestRequest model) { + this.model = model; + return this; + } + + /** + *

    Whether or not third-party updates should be run asynchronously.

    + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage runAsync(Boolean runAsync) { + this.runAsync = Optional.ofNullable(runAsync); + return this; + } + + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ + @java.lang.Override + @JsonSetter(value = "run_async", nulls = Nulls.SKIP) + public _FinalStage runAsync(Optional runAsync) { + this.runAsync = runAsync; + return this; + } + + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage isDebugMode(Boolean isDebugMode) { + this.isDebugMode = Optional.ofNullable(isDebugMode); + return this; + } + + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ + @java.lang.Override + @JsonSetter(value = "is_debug_mode", nulls = Nulls.SKIP) + public _FinalStage isDebugMode(Optional isDebugMode) { + this.isDebugMode = isDebugMode; + return this; + } + + @java.lang.Override + public PatchedItemEndpointRequest build() { + return new PatchedItemEndpointRequest(isDebugMode, runAsync, model, additionalProperties); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/PatchedItemRequestRequest.java b/src/main/java/com/merge/api/accounting/types/PatchedItemRequestRequest.java new file mode 100644 index 000000000..a173ca58f --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/PatchedItemRequestRequest.java @@ -0,0 +1,467 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.merge.api.core.ObjectMappers; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = PatchedItemRequestRequest.Builder.class) +public final class PatchedItemRequestRequest { + private final Optional name; + + private final Optional status; + + private final Optional type; + + private final Optional unitPrice; + + private final Optional purchasePrice; + + private final Optional purchaseAccount; + + private final Optional salesAccount; + + private final Optional company; + + private final Optional purchaseTaxRate; + + private final Optional salesTaxRate; + + private final Optional> integrationParams; + + private final Optional> linkedAccountParams; + + private final Map additionalProperties; + + private PatchedItemRequestRequest( + Optional name, + Optional status, + Optional type, + Optional unitPrice, + Optional purchasePrice, + Optional purchaseAccount, + Optional salesAccount, + Optional company, + Optional purchaseTaxRate, + Optional salesTaxRate, + Optional> integrationParams, + Optional> linkedAccountParams, + Map additionalProperties) { + this.name = name; + this.status = status; + this.type = type; + this.unitPrice = unitPrice; + this.purchasePrice = purchasePrice; + this.purchaseAccount = purchaseAccount; + this.salesAccount = salesAccount; + this.company = company; + this.purchaseTaxRate = purchaseTaxRate; + this.salesTaxRate = salesTaxRate; + this.integrationParams = integrationParams; + this.linkedAccountParams = linkedAccountParams; + this.additionalProperties = additionalProperties; + } + + /** + * @return The item's name. + */ + @JsonProperty("name") + public Optional getName() { + return name; + } + + /** + * @return The item's status. + *
      + *
    • ACTIVE - ACTIVE
    • + *
    • ARCHIVED - ARCHIVED
    • + *
    + */ + @JsonProperty("status") + public Optional getStatus() { + return status; + } + + /** + * @return The item's type. + *
      + *
    • INVENTORY - INVENTORY
    • + *
    • NON_INVENTORY - NON_INVENTORY
    • + *
    • SERVICE - SERVICE
    • + *
    • UNKNOWN - UNKNOWN
    • + *
    + */ + @JsonProperty("type") + public Optional getType() { + return type; + } + + /** + * @return The item's unit price. + */ + @JsonProperty("unit_price") + public Optional getUnitPrice() { + return unitPrice; + } + + /** + * @return The price at which the item is purchased from a vendor. + */ + @JsonProperty("purchase_price") + public Optional getPurchasePrice() { + return purchasePrice; + } + + /** + * @return References the default account used to record a purchase of the item. + */ + @JsonProperty("purchase_account") + public Optional getPurchaseAccount() { + return purchaseAccount; + } + + /** + * @return References the default account used to record a sale. + */ + @JsonProperty("sales_account") + public Optional getSalesAccount() { + return salesAccount; + } + + /** + * @return The company the item belongs to. + */ + @JsonProperty("company") + public Optional getCompany() { + return company; + } + + /** + * @return The default purchase tax rate for this item. + */ + @JsonProperty("purchase_tax_rate") + public Optional getPurchaseTaxRate() { + return purchaseTaxRate; + } + + /** + * @return The default sales tax rate for this item. + */ + @JsonProperty("sales_tax_rate") + public Optional getSalesTaxRate() { + return salesTaxRate; + } + + @JsonProperty("integration_params") + public Optional> getIntegrationParams() { + return integrationParams; + } + + @JsonProperty("linked_account_params") + public Optional> getLinkedAccountParams() { + return linkedAccountParams; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PatchedItemRequestRequest && equalTo((PatchedItemRequestRequest) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(PatchedItemRequestRequest other) { + return name.equals(other.name) + && status.equals(other.status) + && type.equals(other.type) + && unitPrice.equals(other.unitPrice) + && purchasePrice.equals(other.purchasePrice) + && purchaseAccount.equals(other.purchaseAccount) + && salesAccount.equals(other.salesAccount) + && company.equals(other.company) + && purchaseTaxRate.equals(other.purchaseTaxRate) + && salesTaxRate.equals(other.salesTaxRate) + && integrationParams.equals(other.integrationParams) + && linkedAccountParams.equals(other.linkedAccountParams); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.name, + this.status, + this.type, + this.unitPrice, + this.purchasePrice, + this.purchaseAccount, + this.salesAccount, + this.company, + this.purchaseTaxRate, + this.salesTaxRate, + this.integrationParams, + this.linkedAccountParams); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional name = Optional.empty(); + + private Optional status = Optional.empty(); + + private Optional type = Optional.empty(); + + private Optional unitPrice = Optional.empty(); + + private Optional purchasePrice = Optional.empty(); + + private Optional purchaseAccount = Optional.empty(); + + private Optional salesAccount = Optional.empty(); + + private Optional company = Optional.empty(); + + private Optional purchaseTaxRate = Optional.empty(); + + private Optional salesTaxRate = Optional.empty(); + + private Optional> integrationParams = Optional.empty(); + + private Optional> linkedAccountParams = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(PatchedItemRequestRequest other) { + name(other.getName()); + status(other.getStatus()); + type(other.getType()); + unitPrice(other.getUnitPrice()); + purchasePrice(other.getPurchasePrice()); + purchaseAccount(other.getPurchaseAccount()); + salesAccount(other.getSalesAccount()); + company(other.getCompany()); + purchaseTaxRate(other.getPurchaseTaxRate()); + salesTaxRate(other.getSalesTaxRate()); + integrationParams(other.getIntegrationParams()); + linkedAccountParams(other.getLinkedAccountParams()); + return this; + } + + /** + *

    The item's name.

    + */ + @JsonSetter(value = "name", nulls = Nulls.SKIP) + public Builder name(Optional name) { + this.name = name; + return this; + } + + public Builder name(String name) { + this.name = Optional.ofNullable(name); + return this; + } + + /** + *

    The item's status.

    + *
      + *
    • ACTIVE - ACTIVE
    • + *
    • ARCHIVED - ARCHIVED
    • + *
    + */ + @JsonSetter(value = "status", nulls = Nulls.SKIP) + public Builder status(Optional status) { + this.status = status; + return this; + } + + public Builder status(PatchedItemRequestRequestStatus status) { + this.status = Optional.ofNullable(status); + return this; + } + + /** + *

    The item's type.

    + *
      + *
    • INVENTORY - INVENTORY
    • + *
    • NON_INVENTORY - NON_INVENTORY
    • + *
    • SERVICE - SERVICE
    • + *
    • UNKNOWN - UNKNOWN
    • + *
    + */ + @JsonSetter(value = "type", nulls = Nulls.SKIP) + public Builder type(Optional type) { + this.type = type; + return this; + } + + public Builder type(PatchedItemRequestRequestType type) { + this.type = Optional.ofNullable(type); + return this; + } + + /** + *

    The item's unit price.

    + */ + @JsonSetter(value = "unit_price", nulls = Nulls.SKIP) + public Builder unitPrice(Optional unitPrice) { + this.unitPrice = unitPrice; + return this; + } + + public Builder unitPrice(Double unitPrice) { + this.unitPrice = Optional.ofNullable(unitPrice); + return this; + } + + /** + *

    The price at which the item is purchased from a vendor.

    + */ + @JsonSetter(value = "purchase_price", nulls = Nulls.SKIP) + public Builder purchasePrice(Optional purchasePrice) { + this.purchasePrice = purchasePrice; + return this; + } + + public Builder purchasePrice(Double purchasePrice) { + this.purchasePrice = Optional.ofNullable(purchasePrice); + return this; + } + + /** + *

    References the default account used to record a purchase of the item.

    + */ + @JsonSetter(value = "purchase_account", nulls = Nulls.SKIP) + public Builder purchaseAccount(Optional purchaseAccount) { + this.purchaseAccount = purchaseAccount; + return this; + } + + public Builder purchaseAccount(String purchaseAccount) { + this.purchaseAccount = Optional.ofNullable(purchaseAccount); + return this; + } + + /** + *

    References the default account used to record a sale.

    + */ + @JsonSetter(value = "sales_account", nulls = Nulls.SKIP) + public Builder salesAccount(Optional salesAccount) { + this.salesAccount = salesAccount; + return this; + } + + public Builder salesAccount(String salesAccount) { + this.salesAccount = Optional.ofNullable(salesAccount); + return this; + } + + /** + *

    The company the item belongs to.

    + */ + @JsonSetter(value = "company", nulls = Nulls.SKIP) + public Builder company(Optional company) { + this.company = company; + return this; + } + + public Builder company(String company) { + this.company = Optional.ofNullable(company); + return this; + } + + /** + *

    The default purchase tax rate for this item.

    + */ + @JsonSetter(value = "purchase_tax_rate", nulls = Nulls.SKIP) + public Builder purchaseTaxRate(Optional purchaseTaxRate) { + this.purchaseTaxRate = purchaseTaxRate; + return this; + } + + public Builder purchaseTaxRate(String purchaseTaxRate) { + this.purchaseTaxRate = Optional.ofNullable(purchaseTaxRate); + return this; + } + + /** + *

    The default sales tax rate for this item.

    + */ + @JsonSetter(value = "sales_tax_rate", nulls = Nulls.SKIP) + public Builder salesTaxRate(Optional salesTaxRate) { + this.salesTaxRate = salesTaxRate; + return this; + } + + public Builder salesTaxRate(String salesTaxRate) { + this.salesTaxRate = Optional.ofNullable(salesTaxRate); + return this; + } + + @JsonSetter(value = "integration_params", nulls = Nulls.SKIP) + public Builder integrationParams(Optional> integrationParams) { + this.integrationParams = integrationParams; + return this; + } + + public Builder integrationParams(Map integrationParams) { + this.integrationParams = Optional.ofNullable(integrationParams); + return this; + } + + @JsonSetter(value = "linked_account_params", nulls = Nulls.SKIP) + public Builder linkedAccountParams(Optional> linkedAccountParams) { + this.linkedAccountParams = linkedAccountParams; + return this; + } + + public Builder linkedAccountParams(Map linkedAccountParams) { + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); + return this; + } + + public PatchedItemRequestRequest build() { + return new PatchedItemRequestRequest( + name, + status, + type, + unitPrice, + purchasePrice, + purchaseAccount, + salesAccount, + company, + purchaseTaxRate, + salesTaxRate, + integrationParams, + linkedAccountParams, + additionalProperties); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/PatchedItemRequestRequestStatus.java b/src/main/java/com/merge/api/accounting/types/PatchedItemRequestRequestStatus.java new file mode 100644 index 000000000..07537217a --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/PatchedItemRequestRequestStatus.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = PatchedItemRequestRequestStatus.Deserializer.class) +public final class PatchedItemRequestRequestStatus { + private final Object value; + + private final int type; + + private PatchedItemRequestRequestStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((Status7D1Enum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PatchedItemRequestRequestStatus && equalTo((PatchedItemRequestRequestStatus) other); + } + + private boolean equalTo(PatchedItemRequestRequestStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static PatchedItemRequestRequestStatus of(Status7D1Enum value) { + return new PatchedItemRequestRequestStatus(value, 0); + } + + public static PatchedItemRequestRequestStatus of(String value) { + return new PatchedItemRequestRequestStatus(value, 1); + } + + public interface Visitor { + T visit(Status7D1Enum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(PatchedItemRequestRequestStatus.class); + } + + @java.lang.Override + public PatchedItemRequestRequestStatus deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, Status7D1Enum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/PatchedItemRequestRequestType.java b/src/main/java/com/merge/api/accounting/types/PatchedItemRequestRequestType.java new file mode 100644 index 000000000..ab0349848 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/PatchedItemRequestRequestType.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = PatchedItemRequestRequestType.Deserializer.class) +public final class PatchedItemRequestRequestType { + private final Object value; + + private final int type; + + private PatchedItemRequestRequestType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((Type2BbEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PatchedItemRequestRequestType && equalTo((PatchedItemRequestRequestType) other); + } + + private boolean equalTo(PatchedItemRequestRequestType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static PatchedItemRequestRequestType of(Type2BbEnum value) { + return new PatchedItemRequestRequestType(value, 0); + } + + public static PatchedItemRequestRequestType of(String value) { + return new PatchedItemRequestRequestType(value, 1); + } + + public interface Visitor { + T visit(Type2BbEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(PatchedItemRequestRequestType.class); + } + + @java.lang.Override + public PatchedItemRequestRequestType deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, Type2BbEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/PatchedPaymentEndpointRequest.java b/src/main/java/com/merge/api/accounting/types/PatchedPaymentEndpointRequest.java index af78af8d4..b483e7252 100644 --- a/src/main/java/com/merge/api/accounting/types/PatchedPaymentEndpointRequest.java +++ b/src/main/java/com/merge/api/accounting/types/PatchedPaymentEndpointRequest.java @@ -99,10 +99,16 @@ public interface ModelStage { public interface _FinalStage { PatchedPaymentEndpointRequest build(); + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ _FinalStage isDebugMode(Optional isDebugMode); _FinalStage isDebugMode(Boolean isDebugMode); + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ _FinalStage runAsync(Optional runAsync); _FinalStage runAsync(Boolean runAsync); @@ -146,6 +152,9 @@ public _FinalStage runAsync(Boolean runAsync) { return this; } + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ @java.lang.Override @JsonSetter(value = "run_async", nulls = Nulls.SKIP) public _FinalStage runAsync(Optional runAsync) { @@ -163,6 +172,9 @@ public _FinalStage isDebugMode(Boolean isDebugMode) { return this; } + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ @java.lang.Override @JsonSetter(value = "is_debug_mode", nulls = Nulls.SKIP) public _FinalStage isDebugMode(Optional isDebugMode) { diff --git a/src/main/java/com/merge/api/accounting/types/PatchedPaymentRequest.java b/src/main/java/com/merge/api/accounting/types/PatchedPaymentRequest.java index 7e1660a83..6c0917f19 100644 --- a/src/main/java/com/merge/api/accounting/types/PatchedPaymentRequest.java +++ b/src/main/java/com/merge/api/accounting/types/PatchedPaymentRequest.java @@ -31,7 +31,7 @@ public final class PatchedPaymentRequest { private final Optional paymentMethod; - private final Optional currency; + private final Optional currency; private final Optional exchangeRate; @@ -39,7 +39,7 @@ public final class PatchedPaymentRequest { private final Optional totalAmount; - private final Optional type; + private final Optional type; private final Optional>> trackingCategories; @@ -60,11 +60,11 @@ private PatchedPaymentRequest( Optional contact, Optional account, Optional paymentMethod, - Optional currency, + Optional currency, Optional exchangeRate, Optional company, Optional totalAmount, - Optional type, + Optional type, Optional>> trackingCategories, Optional accountingPeriod, Optional> appliedToLines, @@ -434,7 +434,7 @@ public Optional getPaymentMethod() { * */ @JsonProperty("currency") - public Optional getCurrency() { + public Optional getCurrency() { return currency; } @@ -470,7 +470,7 @@ public Optional getTotalAmount() { * */ @JsonProperty("type") - public Optional getType() { + public Optional getType() { return type; } @@ -578,7 +578,7 @@ public static final class Builder { private Optional paymentMethod = Optional.empty(); - private Optional currency = Optional.empty(); + private Optional currency = Optional.empty(); private Optional exchangeRate = Optional.empty(); @@ -586,7 +586,7 @@ public static final class Builder { private Optional totalAmount = Optional.empty(); - private Optional type = Optional.empty(); + private Optional type = Optional.empty(); private Optional>> trackingCategories = Optional.empty(); @@ -625,6 +625,9 @@ public Builder from(PatchedPaymentRequest other) { return this; } + /** + *

    The payment's transaction date.

    + */ @JsonSetter(value = "transaction_date", nulls = Nulls.SKIP) public Builder transactionDate(Optional transactionDate) { this.transactionDate = transactionDate; @@ -636,6 +639,9 @@ public Builder transactionDate(OffsetDateTime transactionDate) { return this; } + /** + *

    The supplier, or customer involved in the payment.

    + */ @JsonSetter(value = "contact", nulls = Nulls.SKIP) public Builder contact(Optional contact) { this.contact = contact; @@ -647,6 +653,9 @@ public Builder contact(PatchedPaymentRequestContact contact) { return this; } + /** + *

    The supplier’s or customer’s account in which the payment is made.

    + */ @JsonSetter(value = "account", nulls = Nulls.SKIP) public Builder account(Optional account) { this.account = account; @@ -658,6 +667,9 @@ public Builder account(PatchedPaymentRequestAccount account) { return this; } + /** + *

    The method which this payment was made by.

    + */ @JsonSetter(value = "payment_method", nulls = Nulls.SKIP) public Builder paymentMethod(Optional paymentMethod) { this.paymentMethod = paymentMethod; @@ -669,17 +681,331 @@ public Builder paymentMethod(PatchedPaymentRequestPaymentMethod paymentMethod) { return this; } + /** + *

    The payment's currency.

    + *
      + *
    • XUA - ADB Unit of Account
    • + *
    • AFN - Afghan Afghani
    • + *
    • AFA - Afghan Afghani (1927–2002)
    • + *
    • ALL - Albanian Lek
    • + *
    • ALK - Albanian Lek (1946–1965)
    • + *
    • DZD - Algerian Dinar
    • + *
    • ADP - Andorran Peseta
    • + *
    • AOA - Angolan Kwanza
    • + *
    • AOK - Angolan Kwanza (1977–1991)
    • + *
    • AON - Angolan New Kwanza (1990–2000)
    • + *
    • AOR - Angolan Readjusted Kwanza (1995–1999)
    • + *
    • ARA - Argentine Austral
    • + *
    • ARS - Argentine Peso
    • + *
    • ARM - Argentine Peso (1881–1970)
    • + *
    • ARP - Argentine Peso (1983–1985)
    • + *
    • ARL - Argentine Peso Ley (1970–1983)
    • + *
    • AMD - Armenian Dram
    • + *
    • AWG - Aruban Florin
    • + *
    • AUD - Australian Dollar
    • + *
    • ATS - Austrian Schilling
    • + *
    • AZN - Azerbaijani Manat
    • + *
    • AZM - Azerbaijani Manat (1993–2006)
    • + *
    • BSD - Bahamian Dollar
    • + *
    • BHD - Bahraini Dinar
    • + *
    • BDT - Bangladeshi Taka
    • + *
    • BBD - Barbadian Dollar
    • + *
    • BYN - Belarusian Ruble
    • + *
    • BYB - Belarusian Ruble (1994–1999)
    • + *
    • BYR - Belarusian Ruble (2000–2016)
    • + *
    • BEF - Belgian Franc
    • + *
    • BEC - Belgian Franc (convertible)
    • + *
    • BEL - Belgian Franc (financial)
    • + *
    • BZD - Belize Dollar
    • + *
    • BMD - Bermudan Dollar
    • + *
    • BTN - Bhutanese Ngultrum
    • + *
    • BOB - Bolivian Boliviano
    • + *
    • BOL - Bolivian Boliviano (1863–1963)
    • + *
    • BOV - Bolivian Mvdol
    • + *
    • BOP - Bolivian Peso
    • + *
    • BAM - Bosnia-Herzegovina Convertible Mark
    • + *
    • BAD - Bosnia-Herzegovina Dinar (1992–1994)
    • + *
    • BAN - Bosnia-Herzegovina New Dinar (1994–1997)
    • + *
    • BWP - Botswanan Pula
    • + *
    • BRC - Brazilian Cruzado (1986–1989)
    • + *
    • BRZ - Brazilian Cruzeiro (1942–1967)
    • + *
    • BRE - Brazilian Cruzeiro (1990–1993)
    • + *
    • BRR - Brazilian Cruzeiro (1993–1994)
    • + *
    • BRN - Brazilian New Cruzado (1989–1990)
    • + *
    • BRB - Brazilian New Cruzeiro (1967–1986)
    • + *
    • BRL - Brazilian Real
    • + *
    • GBP - British Pound
    • + *
    • BND - Brunei Dollar
    • + *
    • BGL - Bulgarian Hard Lev
    • + *
    • BGN - Bulgarian Lev
    • + *
    • BGO - Bulgarian Lev (1879–1952)
    • + *
    • BGM - Bulgarian Socialist Lev
    • + *
    • BUK - Burmese Kyat
    • + *
    • BIF - Burundian Franc
    • + *
    • XPF - CFP Franc
    • + *
    • KHR - Cambodian Riel
    • + *
    • CAD - Canadian Dollar
    • + *
    • CVE - Cape Verdean Escudo
    • + *
    • KYD - Cayman Islands Dollar
    • + *
    • XAF - Central African CFA Franc
    • + *
    • CLE - Chilean Escudo
    • + *
    • CLP - Chilean Peso
    • + *
    • CLF - Chilean Unit of Account (UF)
    • + *
    • CNX - Chinese People’s Bank Dollar
    • + *
    • CNY - Chinese Yuan
    • + *
    • CNH - Chinese Yuan (offshore)
    • + *
    • COP - Colombian Peso
    • + *
    • COU - Colombian Real Value Unit
    • + *
    • KMF - Comorian Franc
    • + *
    • CDF - Congolese Franc
    • + *
    • CRC - Costa Rican Colón
    • + *
    • HRD - Croatian Dinar
    • + *
    • HRK - Croatian Kuna
    • + *
    • CUC - Cuban Convertible Peso
    • + *
    • CUP - Cuban Peso
    • + *
    • CYP - Cypriot Pound
    • + *
    • CZK - Czech Koruna
    • + *
    • CSK - Czechoslovak Hard Koruna
    • + *
    • DKK - Danish Krone
    • + *
    • DJF - Djiboutian Franc
    • + *
    • DOP - Dominican Peso
    • + *
    • NLG - Dutch Guilder
    • + *
    • XCD - East Caribbean Dollar
    • + *
    • DDM - East German Mark
    • + *
    • ECS - Ecuadorian Sucre
    • + *
    • ECV - Ecuadorian Unit of Constant Value
    • + *
    • EGP - Egyptian Pound
    • + *
    • GQE - Equatorial Guinean Ekwele
    • + *
    • ERN - Eritrean Nakfa
    • + *
    • EEK - Estonian Kroon
    • + *
    • ETB - Ethiopian Birr
    • + *
    • EUR - Euro
    • + *
    • XBA - European Composite Unit
    • + *
    • XEU - European Currency Unit
    • + *
    • XBB - European Monetary Unit
    • + *
    • XBC - European Unit of Account (XBC)
    • + *
    • XBD - European Unit of Account (XBD)
    • + *
    • FKP - Falkland Islands Pound
    • + *
    • FJD - Fijian Dollar
    • + *
    • FIM - Finnish Markka
    • + *
    • FRF - French Franc
    • + *
    • XFO - French Gold Franc
    • + *
    • XFU - French UIC-Franc
    • + *
    • GMD - Gambian Dalasi
    • + *
    • GEK - Georgian Kupon Larit
    • + *
    • GEL - Georgian Lari
    • + *
    • DEM - German Mark
    • + *
    • GHS - Ghanaian Cedi
    • + *
    • GHC - Ghanaian Cedi (1979–2007)
    • + *
    • GIP - Gibraltar Pound
    • + *
    • XAU - Gold
    • + *
    • GRD - Greek Drachma
    • + *
    • GTQ - Guatemalan Quetzal
    • + *
    • GWP - Guinea-Bissau Peso
    • + *
    • GNF - Guinean Franc
    • + *
    • GNS - Guinean Syli
    • + *
    • GYD - Guyanaese Dollar
    • + *
    • HTG - Haitian Gourde
    • + *
    • HNL - Honduran Lempira
    • + *
    • HKD - Hong Kong Dollar
    • + *
    • HUF - Hungarian Forint
    • + *
    • IMP - IMP
    • + *
    • ISK - Icelandic Króna
    • + *
    • ISJ - Icelandic Króna (1918–1981)
    • + *
    • INR - Indian Rupee
    • + *
    • IDR - Indonesian Rupiah
    • + *
    • IRR - Iranian Rial
    • + *
    • IQD - Iraqi Dinar
    • + *
    • IEP - Irish Pound
    • + *
    • ILS - Israeli New Shekel
    • + *
    • ILP - Israeli Pound
    • + *
    • ILR - Israeli Shekel (1980–1985)
    • + *
    • ITL - Italian Lira
    • + *
    • JMD - Jamaican Dollar
    • + *
    • JPY - Japanese Yen
    • + *
    • JOD - Jordanian Dinar
    • + *
    • KZT - Kazakhstani Tenge
    • + *
    • KES - Kenyan Shilling
    • + *
    • KWD - Kuwaiti Dinar
    • + *
    • KGS - Kyrgystani Som
    • + *
    • LAK - Laotian Kip
    • + *
    • LVL - Latvian Lats
    • + *
    • LVR - Latvian Ruble
    • + *
    • LBP - Lebanese Pound
    • + *
    • LSL - Lesotho Loti
    • + *
    • LRD - Liberian Dollar
    • + *
    • LYD - Libyan Dinar
    • + *
    • LTL - Lithuanian Litas
    • + *
    • LTT - Lithuanian Talonas
    • + *
    • LUL - Luxembourg Financial Franc
    • + *
    • LUC - Luxembourgian Convertible Franc
    • + *
    • LUF - Luxembourgian Franc
    • + *
    • MOP - Macanese Pataca
    • + *
    • MKD - Macedonian Denar
    • + *
    • MKN - Macedonian Denar (1992–1993)
    • + *
    • MGA - Malagasy Ariary
    • + *
    • MGF - Malagasy Franc
    • + *
    • MWK - Malawian Kwacha
    • + *
    • MYR - Malaysian Ringgit
    • + *
    • MVR - Maldivian Rufiyaa
    • + *
    • MVP - Maldivian Rupee (1947–1981)
    • + *
    • MLF - Malian Franc
    • + *
    • MTL - Maltese Lira
    • + *
    • MTP - Maltese Pound
    • + *
    • MRU - Mauritanian Ouguiya
    • + *
    • MRO - Mauritanian Ouguiya (1973–2017)
    • + *
    • MUR - Mauritian Rupee
    • + *
    • MXV - Mexican Investment Unit
    • + *
    • MXN - Mexican Peso
    • + *
    • MXP - Mexican Silver Peso (1861–1992)
    • + *
    • MDC - Moldovan Cupon
    • + *
    • MDL - Moldovan Leu
    • + *
    • MCF - Monegasque Franc
    • + *
    • MNT - Mongolian Tugrik
    • + *
    • MAD - Moroccan Dirham
    • + *
    • MAF - Moroccan Franc
    • + *
    • MZE - Mozambican Escudo
    • + *
    • MZN - Mozambican Metical
    • + *
    • MZM - Mozambican Metical (1980–2006)
    • + *
    • MMK - Myanmar Kyat
    • + *
    • NAD - Namibian Dollar
    • + *
    • NPR - Nepalese Rupee
    • + *
    • ANG - Netherlands Antillean Guilder
    • + *
    • TWD - New Taiwan Dollar
    • + *
    • NZD - New Zealand Dollar
    • + *
    • NIO - Nicaraguan Córdoba
    • + *
    • NIC - Nicaraguan Córdoba (1988–1991)
    • + *
    • NGN - Nigerian Naira
    • + *
    • KPW - North Korean Won
    • + *
    • NOK - Norwegian Krone
    • + *
    • OMR - Omani Rial
    • + *
    • PKR - Pakistani Rupee
    • + *
    • XPD - Palladium
    • + *
    • PAB - Panamanian Balboa
    • + *
    • PGK - Papua New Guinean Kina
    • + *
    • PYG - Paraguayan Guarani
    • + *
    • PEI - Peruvian Inti
    • + *
    • PEN - Peruvian Sol
    • + *
    • PES - Peruvian Sol (1863–1965)
    • + *
    • PHP - Philippine Peso
    • + *
    • XPT - Platinum
    • + *
    • PLN - Polish Zloty
    • + *
    • PLZ - Polish Zloty (1950–1995)
    • + *
    • PTE - Portuguese Escudo
    • + *
    • GWE - Portuguese Guinea Escudo
    • + *
    • QAR - Qatari Rial
    • + *
    • XRE - RINET Funds
    • + *
    • RHD - Rhodesian Dollar
    • + *
    • RON - Romanian Leu
    • + *
    • ROL - Romanian Leu (1952–2006)
    • + *
    • RUB - Russian Ruble
    • + *
    • RUR - Russian Ruble (1991–1998)
    • + *
    • RWF - Rwandan Franc
    • + *
    • SVC - Salvadoran Colón
    • + *
    • WST - Samoan Tala
    • + *
    • SAR - Saudi Riyal
    • + *
    • RSD - Serbian Dinar
    • + *
    • CSD - Serbian Dinar (2002–2006)
    • + *
    • SCR - Seychellois Rupee
    • + *
    • SLL - Sierra Leonean Leone
    • + *
    • XAG - Silver
    • + *
    • SGD - Singapore Dollar
    • + *
    • SKK - Slovak Koruna
    • + *
    • SIT - Slovenian Tolar
    • + *
    • SBD - Solomon Islands Dollar
    • + *
    • SOS - Somali Shilling
    • + *
    • ZAR - South African Rand
    • + *
    • ZAL - South African Rand (financial)
    • + *
    • KRH - South Korean Hwan (1953–1962)
    • + *
    • KRW - South Korean Won
    • + *
    • KRO - South Korean Won (1945–1953)
    • + *
    • SSP - South Sudanese Pound
    • + *
    • SUR - Soviet Rouble
    • + *
    • ESP - Spanish Peseta
    • + *
    • ESA - Spanish Peseta (A account)
    • + *
    • ESB - Spanish Peseta (convertible account)
    • + *
    • XDR - Special Drawing Rights
    • + *
    • LKR - Sri Lankan Rupee
    • + *
    • SHP - St. Helena Pound
    • + *
    • XSU - Sucre
    • + *
    • SDD - Sudanese Dinar (1992–2007)
    • + *
    • SDG - Sudanese Pound
    • + *
    • SDP - Sudanese Pound (1957–1998)
    • + *
    • SRD - Surinamese Dollar
    • + *
    • SRG - Surinamese Guilder
    • + *
    • SZL - Swazi Lilangeni
    • + *
    • SEK - Swedish Krona
    • + *
    • CHF - Swiss Franc
    • + *
    • SYP - Syrian Pound
    • + *
    • STN - São Tomé & Príncipe Dobra
    • + *
    • STD - São Tomé & Príncipe Dobra (1977–2017)
    • + *
    • TVD - TVD
    • + *
    • TJR - Tajikistani Ruble
    • + *
    • TJS - Tajikistani Somoni
    • + *
    • TZS - Tanzanian Shilling
    • + *
    • XTS - Testing Currency Code
    • + *
    • THB - Thai Baht
    • + *
    • XXX - The codes assigned for transactions where no currency is involved
    • + *
    • TPE - Timorese Escudo
    • + *
    • TOP - Tongan Paʻanga
    • + *
    • TTD - Trinidad & Tobago Dollar
    • + *
    • TND - Tunisian Dinar
    • + *
    • TRY - Turkish Lira
    • + *
    • TRL - Turkish Lira (1922–2005)
    • + *
    • TMT - Turkmenistani Manat
    • + *
    • TMM - Turkmenistani Manat (1993–2009)
    • + *
    • USD - US Dollar
    • + *
    • USN - US Dollar (Next day)
    • + *
    • USS - US Dollar (Same day)
    • + *
    • UGX - Ugandan Shilling
    • + *
    • UGS - Ugandan Shilling (1966–1987)
    • + *
    • UAH - Ukrainian Hryvnia
    • + *
    • UAK - Ukrainian Karbovanets
    • + *
    • AED - United Arab Emirates Dirham
    • + *
    • UYW - Uruguayan Nominal Wage Index Unit
    • + *
    • UYU - Uruguayan Peso
    • + *
    • UYP - Uruguayan Peso (1975–1993)
    • + *
    • UYI - Uruguayan Peso (Indexed Units)
    • + *
    • UZS - Uzbekistani Som
    • + *
    • VUV - Vanuatu Vatu
    • + *
    • VES - Venezuelan Bolívar
    • + *
    • VEB - Venezuelan Bolívar (1871–2008)
    • + *
    • VEF - Venezuelan Bolívar (2008–2018)
    • + *
    • VND - Vietnamese Dong
    • + *
    • VNN - Vietnamese Dong (1978–1985)
    • + *
    • CHE - WIR Euro
    • + *
    • CHW - WIR Franc
    • + *
    • XOF - West African CFA Franc
    • + *
    • YDD - Yemeni Dinar
    • + *
    • YER - Yemeni Rial
    • + *
    • YUN - Yugoslavian Convertible Dinar (1990–1992)
    • + *
    • YUD - Yugoslavian Hard Dinar (1966–1990)
    • + *
    • YUM - Yugoslavian New Dinar (1994–2002)
    • + *
    • YUR - Yugoslavian Reformed Dinar (1992–1993)
    • + *
    • ZWN - ZWN
    • + *
    • ZRN - Zairean New Zaire (1993–1998)
    • + *
    • ZRZ - Zairean Zaire (1971–1993)
    • + *
    • ZMW - Zambian Kwacha
    • + *
    • ZMK - Zambian Kwacha (1968–2012)
    • + *
    • ZWD - Zimbabwean Dollar (1980–2008)
    • + *
    • ZWR - Zimbabwean Dollar (2008)
    • + *
    • ZWL - Zimbabwean Dollar (2009)
    • + *
    + */ @JsonSetter(value = "currency", nulls = Nulls.SKIP) - public Builder currency(Optional currency) { + public Builder currency(Optional currency) { this.currency = currency; return this; } - public Builder currency(TransactionCurrencyEnum currency) { + public Builder currency(PatchedPaymentRequestCurrency currency) { this.currency = Optional.ofNullable(currency); return this; } + /** + *

    The payment's exchange rate.

    + */ @JsonSetter(value = "exchange_rate", nulls = Nulls.SKIP) public Builder exchangeRate(Optional exchangeRate) { this.exchangeRate = exchangeRate; @@ -691,6 +1017,9 @@ public Builder exchangeRate(String exchangeRate) { return this; } + /** + *

    The company the payment belongs to.

    + */ @JsonSetter(value = "company", nulls = Nulls.SKIP) public Builder company(Optional company) { this.company = company; @@ -702,6 +1031,9 @@ public Builder company(PatchedPaymentRequestCompany company) { return this; } + /** + *

    The total amount of money being paid to the supplier, or customer, after taxes.

    + */ @JsonSetter(value = "total_amount", nulls = Nulls.SKIP) public Builder totalAmount(Optional totalAmount) { this.totalAmount = totalAmount; @@ -713,13 +1045,20 @@ public Builder totalAmount(Double totalAmount) { return this; } + /** + *

    The type of the invoice.

    + *
      + *
    • ACCOUNTS_PAYABLE - ACCOUNTS_PAYABLE
    • + *
    • ACCOUNTS_RECEIVABLE - ACCOUNTS_RECEIVABLE
    • + *
    + */ @JsonSetter(value = "type", nulls = Nulls.SKIP) - public Builder type(Optional type) { + public Builder type(Optional type) { this.type = type; return this; } - public Builder type(PaymentTypeEnum type) { + public Builder type(PatchedPaymentRequestType type) { this.type = Optional.ofNullable(type); return this; } @@ -737,6 +1076,9 @@ public Builder trackingCategories( return this; } + /** + *

    The accounting period that the Payment was generated in.

    + */ @JsonSetter(value = "accounting_period", nulls = Nulls.SKIP) public Builder accountingPeriod(Optional accountingPeriod) { this.accountingPeriod = accountingPeriod; @@ -748,6 +1090,9 @@ public Builder accountingPeriod(PatchedPaymentRequestAccountingPeriod accounting return this; } + /** + *

    A list of “Payment Applied to Lines” objects.

    + */ @JsonSetter(value = "applied_to_lines", nulls = Nulls.SKIP) public Builder appliedToLines(Optional> appliedToLines) { this.appliedToLines = appliedToLines; diff --git a/src/main/java/com/merge/api/accounting/types/PatchedPaymentRequestCurrency.java b/src/main/java/com/merge/api/accounting/types/PatchedPaymentRequestCurrency.java new file mode 100644 index 000000000..5f0de1b39 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/PatchedPaymentRequestCurrency.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = PatchedPaymentRequestCurrency.Deserializer.class) +public final class PatchedPaymentRequestCurrency { + private final Object value; + + private final int type; + + private PatchedPaymentRequestCurrency(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((TransactionCurrencyEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PatchedPaymentRequestCurrency && equalTo((PatchedPaymentRequestCurrency) other); + } + + private boolean equalTo(PatchedPaymentRequestCurrency other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static PatchedPaymentRequestCurrency of(TransactionCurrencyEnum value) { + return new PatchedPaymentRequestCurrency(value, 0); + } + + public static PatchedPaymentRequestCurrency of(String value) { + return new PatchedPaymentRequestCurrency(value, 1); + } + + public interface Visitor { + T visit(TransactionCurrencyEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(PatchedPaymentRequestCurrency.class); + } + + @java.lang.Override + public PatchedPaymentRequestCurrency deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TransactionCurrencyEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/PatchedPaymentRequestType.java b/src/main/java/com/merge/api/accounting/types/PatchedPaymentRequestType.java new file mode 100644 index 000000000..0751d13ef --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/PatchedPaymentRequestType.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = PatchedPaymentRequestType.Deserializer.class) +public final class PatchedPaymentRequestType { + private final Object value; + + private final int type; + + private PatchedPaymentRequestType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((PaymentTypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PatchedPaymentRequestType && equalTo((PatchedPaymentRequestType) other); + } + + private boolean equalTo(PatchedPaymentRequestType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static PatchedPaymentRequestType of(PaymentTypeEnum value) { + return new PatchedPaymentRequestType(value, 0); + } + + public static PatchedPaymentRequestType of(String value) { + return new PatchedPaymentRequestType(value, 1); + } + + public interface Visitor { + T visit(PaymentTypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(PatchedPaymentRequestType.class); + } + + @java.lang.Override + public PatchedPaymentRequestType deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, PaymentTypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/Payment.java b/src/main/java/com/merge/api/accounting/types/Payment.java index 829b1faed..6052c8114 100644 --- a/src/main/java/com/merge/api/accounting/types/Payment.java +++ b/src/main/java/com/merge/api/accounting/types/Payment.java @@ -39,7 +39,7 @@ public final class Payment { private final Optional paymentMethod; - private final Optional currency; + private final Optional currency; private final Optional exchangeRate; @@ -47,7 +47,7 @@ public final class Payment { private final Optional totalAmount; - private final Optional type; + private final Optional type; private final Optional>> trackingCategories; @@ -76,11 +76,11 @@ private Payment( Optional contact, Optional account, Optional paymentMethod, - Optional currency, + Optional currency, Optional exchangeRate, Optional company, Optional totalAmount, - Optional type, + Optional type, Optional>> trackingCategories, Optional accountingPeriod, Optional> appliedToLines, @@ -487,7 +487,7 @@ public Optional getPaymentMethod() { * */ @JsonProperty("currency") - public Optional getCurrency() { + public Optional getCurrency() { return currency; } @@ -523,7 +523,7 @@ public Optional getTotalAmount() { * */ @JsonProperty("type") - public Optional getType() { + public Optional getType() { return type; } @@ -667,7 +667,7 @@ public static final class Builder { private Optional paymentMethod = Optional.empty(); - private Optional currency = Optional.empty(); + private Optional currency = Optional.empty(); private Optional exchangeRate = Optional.empty(); @@ -675,7 +675,7 @@ public static final class Builder { private Optional totalAmount = Optional.empty(); - private Optional type = Optional.empty(); + private Optional type = Optional.empty(); private Optional>> trackingCategories = Optional.empty(); @@ -734,6 +734,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -745,6 +748,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -756,6 +762,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -767,6 +776,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The payment's transaction date.

    + */ @JsonSetter(value = "transaction_date", nulls = Nulls.SKIP) public Builder transactionDate(Optional transactionDate) { this.transactionDate = transactionDate; @@ -778,6 +790,9 @@ public Builder transactionDate(OffsetDateTime transactionDate) { return this; } + /** + *

    The supplier, or customer involved in the payment.

    + */ @JsonSetter(value = "contact", nulls = Nulls.SKIP) public Builder contact(Optional contact) { this.contact = contact; @@ -789,6 +804,9 @@ public Builder contact(PaymentContact contact) { return this; } + /** + *

    The supplier’s or customer’s account in which the payment is made.

    + */ @JsonSetter(value = "account", nulls = Nulls.SKIP) public Builder account(Optional account) { this.account = account; @@ -800,6 +818,9 @@ public Builder account(PaymentAccount account) { return this; } + /** + *

    The method which this payment was made by.

    + */ @JsonSetter(value = "payment_method", nulls = Nulls.SKIP) public Builder paymentMethod(Optional paymentMethod) { this.paymentMethod = paymentMethod; @@ -811,17 +832,331 @@ public Builder paymentMethod(PaymentPaymentMethod paymentMethod) { return this; } + /** + *

    The payment's currency.

    + *
      + *
    • XUA - ADB Unit of Account
    • + *
    • AFN - Afghan Afghani
    • + *
    • AFA - Afghan Afghani (1927–2002)
    • + *
    • ALL - Albanian Lek
    • + *
    • ALK - Albanian Lek (1946–1965)
    • + *
    • DZD - Algerian Dinar
    • + *
    • ADP - Andorran Peseta
    • + *
    • AOA - Angolan Kwanza
    • + *
    • AOK - Angolan Kwanza (1977–1991)
    • + *
    • AON - Angolan New Kwanza (1990–2000)
    • + *
    • AOR - Angolan Readjusted Kwanza (1995–1999)
    • + *
    • ARA - Argentine Austral
    • + *
    • ARS - Argentine Peso
    • + *
    • ARM - Argentine Peso (1881–1970)
    • + *
    • ARP - Argentine Peso (1983–1985)
    • + *
    • ARL - Argentine Peso Ley (1970–1983)
    • + *
    • AMD - Armenian Dram
    • + *
    • AWG - Aruban Florin
    • + *
    • AUD - Australian Dollar
    • + *
    • ATS - Austrian Schilling
    • + *
    • AZN - Azerbaijani Manat
    • + *
    • AZM - Azerbaijani Manat (1993–2006)
    • + *
    • BSD - Bahamian Dollar
    • + *
    • BHD - Bahraini Dinar
    • + *
    • BDT - Bangladeshi Taka
    • + *
    • BBD - Barbadian Dollar
    • + *
    • BYN - Belarusian Ruble
    • + *
    • BYB - Belarusian Ruble (1994–1999)
    • + *
    • BYR - Belarusian Ruble (2000–2016)
    • + *
    • BEF - Belgian Franc
    • + *
    • BEC - Belgian Franc (convertible)
    • + *
    • BEL - Belgian Franc (financial)
    • + *
    • BZD - Belize Dollar
    • + *
    • BMD - Bermudan Dollar
    • + *
    • BTN - Bhutanese Ngultrum
    • + *
    • BOB - Bolivian Boliviano
    • + *
    • BOL - Bolivian Boliviano (1863–1963)
    • + *
    • BOV - Bolivian Mvdol
    • + *
    • BOP - Bolivian Peso
    • + *
    • BAM - Bosnia-Herzegovina Convertible Mark
    • + *
    • BAD - Bosnia-Herzegovina Dinar (1992–1994)
    • + *
    • BAN - Bosnia-Herzegovina New Dinar (1994–1997)
    • + *
    • BWP - Botswanan Pula
    • + *
    • BRC - Brazilian Cruzado (1986–1989)
    • + *
    • BRZ - Brazilian Cruzeiro (1942–1967)
    • + *
    • BRE - Brazilian Cruzeiro (1990–1993)
    • + *
    • BRR - Brazilian Cruzeiro (1993–1994)
    • + *
    • BRN - Brazilian New Cruzado (1989–1990)
    • + *
    • BRB - Brazilian New Cruzeiro (1967–1986)
    • + *
    • BRL - Brazilian Real
    • + *
    • GBP - British Pound
    • + *
    • BND - Brunei Dollar
    • + *
    • BGL - Bulgarian Hard Lev
    • + *
    • BGN - Bulgarian Lev
    • + *
    • BGO - Bulgarian Lev (1879–1952)
    • + *
    • BGM - Bulgarian Socialist Lev
    • + *
    • BUK - Burmese Kyat
    • + *
    • BIF - Burundian Franc
    • + *
    • XPF - CFP Franc
    • + *
    • KHR - Cambodian Riel
    • + *
    • CAD - Canadian Dollar
    • + *
    • CVE - Cape Verdean Escudo
    • + *
    • KYD - Cayman Islands Dollar
    • + *
    • XAF - Central African CFA Franc
    • + *
    • CLE - Chilean Escudo
    • + *
    • CLP - Chilean Peso
    • + *
    • CLF - Chilean Unit of Account (UF)
    • + *
    • CNX - Chinese People’s Bank Dollar
    • + *
    • CNY - Chinese Yuan
    • + *
    • CNH - Chinese Yuan (offshore)
    • + *
    • COP - Colombian Peso
    • + *
    • COU - Colombian Real Value Unit
    • + *
    • KMF - Comorian Franc
    • + *
    • CDF - Congolese Franc
    • + *
    • CRC - Costa Rican Colón
    • + *
    • HRD - Croatian Dinar
    • + *
    • HRK - Croatian Kuna
    • + *
    • CUC - Cuban Convertible Peso
    • + *
    • CUP - Cuban Peso
    • + *
    • CYP - Cypriot Pound
    • + *
    • CZK - Czech Koruna
    • + *
    • CSK - Czechoslovak Hard Koruna
    • + *
    • DKK - Danish Krone
    • + *
    • DJF - Djiboutian Franc
    • + *
    • DOP - Dominican Peso
    • + *
    • NLG - Dutch Guilder
    • + *
    • XCD - East Caribbean Dollar
    • + *
    • DDM - East German Mark
    • + *
    • ECS - Ecuadorian Sucre
    • + *
    • ECV - Ecuadorian Unit of Constant Value
    • + *
    • EGP - Egyptian Pound
    • + *
    • GQE - Equatorial Guinean Ekwele
    • + *
    • ERN - Eritrean Nakfa
    • + *
    • EEK - Estonian Kroon
    • + *
    • ETB - Ethiopian Birr
    • + *
    • EUR - Euro
    • + *
    • XBA - European Composite Unit
    • + *
    • XEU - European Currency Unit
    • + *
    • XBB - European Monetary Unit
    • + *
    • XBC - European Unit of Account (XBC)
    • + *
    • XBD - European Unit of Account (XBD)
    • + *
    • FKP - Falkland Islands Pound
    • + *
    • FJD - Fijian Dollar
    • + *
    • FIM - Finnish Markka
    • + *
    • FRF - French Franc
    • + *
    • XFO - French Gold Franc
    • + *
    • XFU - French UIC-Franc
    • + *
    • GMD - Gambian Dalasi
    • + *
    • GEK - Georgian Kupon Larit
    • + *
    • GEL - Georgian Lari
    • + *
    • DEM - German Mark
    • + *
    • GHS - Ghanaian Cedi
    • + *
    • GHC - Ghanaian Cedi (1979–2007)
    • + *
    • GIP - Gibraltar Pound
    • + *
    • XAU - Gold
    • + *
    • GRD - Greek Drachma
    • + *
    • GTQ - Guatemalan Quetzal
    • + *
    • GWP - Guinea-Bissau Peso
    • + *
    • GNF - Guinean Franc
    • + *
    • GNS - Guinean Syli
    • + *
    • GYD - Guyanaese Dollar
    • + *
    • HTG - Haitian Gourde
    • + *
    • HNL - Honduran Lempira
    • + *
    • HKD - Hong Kong Dollar
    • + *
    • HUF - Hungarian Forint
    • + *
    • IMP - IMP
    • + *
    • ISK - Icelandic Króna
    • + *
    • ISJ - Icelandic Króna (1918–1981)
    • + *
    • INR - Indian Rupee
    • + *
    • IDR - Indonesian Rupiah
    • + *
    • IRR - Iranian Rial
    • + *
    • IQD - Iraqi Dinar
    • + *
    • IEP - Irish Pound
    • + *
    • ILS - Israeli New Shekel
    • + *
    • ILP - Israeli Pound
    • + *
    • ILR - Israeli Shekel (1980–1985)
    • + *
    • ITL - Italian Lira
    • + *
    • JMD - Jamaican Dollar
    • + *
    • JPY - Japanese Yen
    • + *
    • JOD - Jordanian Dinar
    • + *
    • KZT - Kazakhstani Tenge
    • + *
    • KES - Kenyan Shilling
    • + *
    • KWD - Kuwaiti Dinar
    • + *
    • KGS - Kyrgystani Som
    • + *
    • LAK - Laotian Kip
    • + *
    • LVL - Latvian Lats
    • + *
    • LVR - Latvian Ruble
    • + *
    • LBP - Lebanese Pound
    • + *
    • LSL - Lesotho Loti
    • + *
    • LRD - Liberian Dollar
    • + *
    • LYD - Libyan Dinar
    • + *
    • LTL - Lithuanian Litas
    • + *
    • LTT - Lithuanian Talonas
    • + *
    • LUL - Luxembourg Financial Franc
    • + *
    • LUC - Luxembourgian Convertible Franc
    • + *
    • LUF - Luxembourgian Franc
    • + *
    • MOP - Macanese Pataca
    • + *
    • MKD - Macedonian Denar
    • + *
    • MKN - Macedonian Denar (1992–1993)
    • + *
    • MGA - Malagasy Ariary
    • + *
    • MGF - Malagasy Franc
    • + *
    • MWK - Malawian Kwacha
    • + *
    • MYR - Malaysian Ringgit
    • + *
    • MVR - Maldivian Rufiyaa
    • + *
    • MVP - Maldivian Rupee (1947–1981)
    • + *
    • MLF - Malian Franc
    • + *
    • MTL - Maltese Lira
    • + *
    • MTP - Maltese Pound
    • + *
    • MRU - Mauritanian Ouguiya
    • + *
    • MRO - Mauritanian Ouguiya (1973–2017)
    • + *
    • MUR - Mauritian Rupee
    • + *
    • MXV - Mexican Investment Unit
    • + *
    • MXN - Mexican Peso
    • + *
    • MXP - Mexican Silver Peso (1861–1992)
    • + *
    • MDC - Moldovan Cupon
    • + *
    • MDL - Moldovan Leu
    • + *
    • MCF - Monegasque Franc
    • + *
    • MNT - Mongolian Tugrik
    • + *
    • MAD - Moroccan Dirham
    • + *
    • MAF - Moroccan Franc
    • + *
    • MZE - Mozambican Escudo
    • + *
    • MZN - Mozambican Metical
    • + *
    • MZM - Mozambican Metical (1980–2006)
    • + *
    • MMK - Myanmar Kyat
    • + *
    • NAD - Namibian Dollar
    • + *
    • NPR - Nepalese Rupee
    • + *
    • ANG - Netherlands Antillean Guilder
    • + *
    • TWD - New Taiwan Dollar
    • + *
    • NZD - New Zealand Dollar
    • + *
    • NIO - Nicaraguan Córdoba
    • + *
    • NIC - Nicaraguan Córdoba (1988–1991)
    • + *
    • NGN - Nigerian Naira
    • + *
    • KPW - North Korean Won
    • + *
    • NOK - Norwegian Krone
    • + *
    • OMR - Omani Rial
    • + *
    • PKR - Pakistani Rupee
    • + *
    • XPD - Palladium
    • + *
    • PAB - Panamanian Balboa
    • + *
    • PGK - Papua New Guinean Kina
    • + *
    • PYG - Paraguayan Guarani
    • + *
    • PEI - Peruvian Inti
    • + *
    • PEN - Peruvian Sol
    • + *
    • PES - Peruvian Sol (1863–1965)
    • + *
    • PHP - Philippine Peso
    • + *
    • XPT - Platinum
    • + *
    • PLN - Polish Zloty
    • + *
    • PLZ - Polish Zloty (1950–1995)
    • + *
    • PTE - Portuguese Escudo
    • + *
    • GWE - Portuguese Guinea Escudo
    • + *
    • QAR - Qatari Rial
    • + *
    • XRE - RINET Funds
    • + *
    • RHD - Rhodesian Dollar
    • + *
    • RON - Romanian Leu
    • + *
    • ROL - Romanian Leu (1952–2006)
    • + *
    • RUB - Russian Ruble
    • + *
    • RUR - Russian Ruble (1991–1998)
    • + *
    • RWF - Rwandan Franc
    • + *
    • SVC - Salvadoran Colón
    • + *
    • WST - Samoan Tala
    • + *
    • SAR - Saudi Riyal
    • + *
    • RSD - Serbian Dinar
    • + *
    • CSD - Serbian Dinar (2002–2006)
    • + *
    • SCR - Seychellois Rupee
    • + *
    • SLL - Sierra Leonean Leone
    • + *
    • XAG - Silver
    • + *
    • SGD - Singapore Dollar
    • + *
    • SKK - Slovak Koruna
    • + *
    • SIT - Slovenian Tolar
    • + *
    • SBD - Solomon Islands Dollar
    • + *
    • SOS - Somali Shilling
    • + *
    • ZAR - South African Rand
    • + *
    • ZAL - South African Rand (financial)
    • + *
    • KRH - South Korean Hwan (1953–1962)
    • + *
    • KRW - South Korean Won
    • + *
    • KRO - South Korean Won (1945–1953)
    • + *
    • SSP - South Sudanese Pound
    • + *
    • SUR - Soviet Rouble
    • + *
    • ESP - Spanish Peseta
    • + *
    • ESA - Spanish Peseta (A account)
    • + *
    • ESB - Spanish Peseta (convertible account)
    • + *
    • XDR - Special Drawing Rights
    • + *
    • LKR - Sri Lankan Rupee
    • + *
    • SHP - St. Helena Pound
    • + *
    • XSU - Sucre
    • + *
    • SDD - Sudanese Dinar (1992–2007)
    • + *
    • SDG - Sudanese Pound
    • + *
    • SDP - Sudanese Pound (1957–1998)
    • + *
    • SRD - Surinamese Dollar
    • + *
    • SRG - Surinamese Guilder
    • + *
    • SZL - Swazi Lilangeni
    • + *
    • SEK - Swedish Krona
    • + *
    • CHF - Swiss Franc
    • + *
    • SYP - Syrian Pound
    • + *
    • STN - São Tomé & Príncipe Dobra
    • + *
    • STD - São Tomé & Príncipe Dobra (1977–2017)
    • + *
    • TVD - TVD
    • + *
    • TJR - Tajikistani Ruble
    • + *
    • TJS - Tajikistani Somoni
    • + *
    • TZS - Tanzanian Shilling
    • + *
    • XTS - Testing Currency Code
    • + *
    • THB - Thai Baht
    • + *
    • XXX - The codes assigned for transactions where no currency is involved
    • + *
    • TPE - Timorese Escudo
    • + *
    • TOP - Tongan Paʻanga
    • + *
    • TTD - Trinidad & Tobago Dollar
    • + *
    • TND - Tunisian Dinar
    • + *
    • TRY - Turkish Lira
    • + *
    • TRL - Turkish Lira (1922–2005)
    • + *
    • TMT - Turkmenistani Manat
    • + *
    • TMM - Turkmenistani Manat (1993–2009)
    • + *
    • USD - US Dollar
    • + *
    • USN - US Dollar (Next day)
    • + *
    • USS - US Dollar (Same day)
    • + *
    • UGX - Ugandan Shilling
    • + *
    • UGS - Ugandan Shilling (1966–1987)
    • + *
    • UAH - Ukrainian Hryvnia
    • + *
    • UAK - Ukrainian Karbovanets
    • + *
    • AED - United Arab Emirates Dirham
    • + *
    • UYW - Uruguayan Nominal Wage Index Unit
    • + *
    • UYU - Uruguayan Peso
    • + *
    • UYP - Uruguayan Peso (1975–1993)
    • + *
    • UYI - Uruguayan Peso (Indexed Units)
    • + *
    • UZS - Uzbekistani Som
    • + *
    • VUV - Vanuatu Vatu
    • + *
    • VES - Venezuelan Bolívar
    • + *
    • VEB - Venezuelan Bolívar (1871–2008)
    • + *
    • VEF - Venezuelan Bolívar (2008–2018)
    • + *
    • VND - Vietnamese Dong
    • + *
    • VNN - Vietnamese Dong (1978–1985)
    • + *
    • CHE - WIR Euro
    • + *
    • CHW - WIR Franc
    • + *
    • XOF - West African CFA Franc
    • + *
    • YDD - Yemeni Dinar
    • + *
    • YER - Yemeni Rial
    • + *
    • YUN - Yugoslavian Convertible Dinar (1990–1992)
    • + *
    • YUD - Yugoslavian Hard Dinar (1966–1990)
    • + *
    • YUM - Yugoslavian New Dinar (1994–2002)
    • + *
    • YUR - Yugoslavian Reformed Dinar (1992–1993)
    • + *
    • ZWN - ZWN
    • + *
    • ZRN - Zairean New Zaire (1993–1998)
    • + *
    • ZRZ - Zairean Zaire (1971–1993)
    • + *
    • ZMW - Zambian Kwacha
    • + *
    • ZMK - Zambian Kwacha (1968–2012)
    • + *
    • ZWD - Zimbabwean Dollar (1980–2008)
    • + *
    • ZWR - Zimbabwean Dollar (2008)
    • + *
    • ZWL - Zimbabwean Dollar (2009)
    • + *
    + */ @JsonSetter(value = "currency", nulls = Nulls.SKIP) - public Builder currency(Optional currency) { + public Builder currency(Optional currency) { this.currency = currency; return this; } - public Builder currency(TransactionCurrencyEnum currency) { + public Builder currency(PaymentCurrency currency) { this.currency = Optional.ofNullable(currency); return this; } + /** + *

    The payment's exchange rate.

    + */ @JsonSetter(value = "exchange_rate", nulls = Nulls.SKIP) public Builder exchangeRate(Optional exchangeRate) { this.exchangeRate = exchangeRate; @@ -833,6 +1168,9 @@ public Builder exchangeRate(String exchangeRate) { return this; } + /** + *

    The company the payment belongs to.

    + */ @JsonSetter(value = "company", nulls = Nulls.SKIP) public Builder company(Optional company) { this.company = company; @@ -844,6 +1182,9 @@ public Builder company(PaymentCompany company) { return this; } + /** + *

    The total amount of money being paid to the supplier, or customer, after taxes.

    + */ @JsonSetter(value = "total_amount", nulls = Nulls.SKIP) public Builder totalAmount(Optional totalAmount) { this.totalAmount = totalAmount; @@ -855,13 +1196,20 @@ public Builder totalAmount(Double totalAmount) { return this; } + /** + *

    The type of the invoice.

    + *
      + *
    • ACCOUNTS_PAYABLE - ACCOUNTS_PAYABLE
    • + *
    • ACCOUNTS_RECEIVABLE - ACCOUNTS_RECEIVABLE
    • + *
    + */ @JsonSetter(value = "type", nulls = Nulls.SKIP) - public Builder type(Optional type) { + public Builder type(Optional type) { this.type = type; return this; } - public Builder type(PaymentTypeEnum type) { + public Builder type(PaymentType type) { this.type = Optional.ofNullable(type); return this; } @@ -877,6 +1225,9 @@ public Builder trackingCategories(List> return this; } + /** + *

    The accounting period that the Payment was generated in.

    + */ @JsonSetter(value = "accounting_period", nulls = Nulls.SKIP) public Builder accountingPeriod(Optional accountingPeriod) { this.accountingPeriod = accountingPeriod; @@ -888,6 +1239,9 @@ public Builder accountingPeriod(PaymentAccountingPeriod accountingPeriod) { return this; } + /** + *

    A list of “Payment Applied to Lines” objects.

    + */ @JsonSetter(value = "applied_to_lines", nulls = Nulls.SKIP) public Builder appliedToLines(Optional> appliedToLines) { this.appliedToLines = appliedToLines; @@ -899,6 +1253,9 @@ public Builder appliedToLines(List appliedToLines) { return this; } + /** + *

    When the third party's payment entry was updated.

    + */ @JsonSetter(value = "remote_updated_at", nulls = Nulls.SKIP) public Builder remoteUpdatedAt(Optional remoteUpdatedAt) { this.remoteUpdatedAt = remoteUpdatedAt; @@ -910,6 +1267,9 @@ public Builder remoteUpdatedAt(OffsetDateTime remoteUpdatedAt) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/accounting/types/PaymentCurrency.java b/src/main/java/com/merge/api/accounting/types/PaymentCurrency.java new file mode 100644 index 000000000..6724e3a39 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/PaymentCurrency.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = PaymentCurrency.Deserializer.class) +public final class PaymentCurrency { + private final Object value; + + private final int type; + + private PaymentCurrency(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((TransactionCurrencyEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PaymentCurrency && equalTo((PaymentCurrency) other); + } + + private boolean equalTo(PaymentCurrency other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static PaymentCurrency of(TransactionCurrencyEnum value) { + return new PaymentCurrency(value, 0); + } + + public static PaymentCurrency of(String value) { + return new PaymentCurrency(value, 1); + } + + public interface Visitor { + T visit(TransactionCurrencyEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(PaymentCurrency.class); + } + + @java.lang.Override + public PaymentCurrency deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TransactionCurrencyEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/PaymentEndpointRequest.java b/src/main/java/com/merge/api/accounting/types/PaymentEndpointRequest.java index 2018d5a40..0f27df81f 100644 --- a/src/main/java/com/merge/api/accounting/types/PaymentEndpointRequest.java +++ b/src/main/java/com/merge/api/accounting/types/PaymentEndpointRequest.java @@ -99,10 +99,16 @@ public interface ModelStage { public interface _FinalStage { PaymentEndpointRequest build(); + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ _FinalStage isDebugMode(Optional isDebugMode); _FinalStage isDebugMode(Boolean isDebugMode); + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ _FinalStage runAsync(Optional runAsync); _FinalStage runAsync(Boolean runAsync); @@ -146,6 +152,9 @@ public _FinalStage runAsync(Boolean runAsync) { return this; } + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ @java.lang.Override @JsonSetter(value = "run_async", nulls = Nulls.SKIP) public _FinalStage runAsync(Optional runAsync) { @@ -163,6 +172,9 @@ public _FinalStage isDebugMode(Boolean isDebugMode) { return this; } + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ @java.lang.Override @JsonSetter(value = "is_debug_mode", nulls = Nulls.SKIP) public _FinalStage isDebugMode(Optional isDebugMode) { diff --git a/src/main/java/com/merge/api/accounting/types/PaymentLineItem.java b/src/main/java/com/merge/api/accounting/types/PaymentLineItem.java index a6b684101..640d4b467 100644 --- a/src/main/java/com/merge/api/accounting/types/PaymentLineItem.java +++ b/src/main/java/com/merge/api/accounting/types/PaymentLineItem.java @@ -211,6 +211,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -222,6 +225,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -233,6 +239,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -244,6 +253,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The amount being applied to the transaction.

    + */ @JsonSetter(value = "applied_amount", nulls = Nulls.SKIP) public Builder appliedAmount(Optional appliedAmount) { this.appliedAmount = appliedAmount; @@ -255,6 +267,9 @@ public Builder appliedAmount(String appliedAmount) { return this; } + /** + *

    The date the payment portion is applied.

    + */ @JsonSetter(value = "applied_date", nulls = Nulls.SKIP) public Builder appliedDate(Optional appliedDate) { this.appliedDate = appliedDate; @@ -266,6 +281,9 @@ public Builder appliedDate(OffsetDateTime appliedDate) { return this; } + /** + *

    The Merge ID of the transaction the payment portion is being applied to.

    + */ @JsonSetter(value = "related_object_id", nulls = Nulls.SKIP) public Builder relatedObjectId(Optional relatedObjectId) { this.relatedObjectId = relatedObjectId; @@ -277,6 +295,9 @@ public Builder relatedObjectId(String relatedObjectId) { return this; } + /** + *

    The type of transaction the payment portion is being applied to. Possible values include: INVOICE, JOURNAL_ENTRY, or CREDIT_NOTE.

    + */ @JsonSetter(value = "related_object_type", nulls = Nulls.SKIP) public Builder relatedObjectType(Optional relatedObjectType) { this.relatedObjectType = relatedObjectType; diff --git a/src/main/java/com/merge/api/accounting/types/PaymentLineItemRequest.java b/src/main/java/com/merge/api/accounting/types/PaymentLineItemRequest.java index 619fa7183..383bdc0fc 100644 --- a/src/main/java/com/merge/api/accounting/types/PaymentLineItemRequest.java +++ b/src/main/java/com/merge/api/accounting/types/PaymentLineItemRequest.java @@ -196,6 +196,9 @@ public Builder from(PaymentLineItemRequest other) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -207,6 +210,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The amount being applied to the transaction.

    + */ @JsonSetter(value = "applied_amount", nulls = Nulls.SKIP) public Builder appliedAmount(Optional appliedAmount) { this.appliedAmount = appliedAmount; @@ -218,6 +224,9 @@ public Builder appliedAmount(String appliedAmount) { return this; } + /** + *

    The date the payment portion is applied.

    + */ @JsonSetter(value = "applied_date", nulls = Nulls.SKIP) public Builder appliedDate(Optional appliedDate) { this.appliedDate = appliedDate; @@ -229,6 +238,9 @@ public Builder appliedDate(OffsetDateTime appliedDate) { return this; } + /** + *

    The Merge ID of the transaction the payment portion is being applied to.

    + */ @JsonSetter(value = "related_object_id", nulls = Nulls.SKIP) public Builder relatedObjectId(Optional relatedObjectId) { this.relatedObjectId = relatedObjectId; @@ -240,6 +252,9 @@ public Builder relatedObjectId(String relatedObjectId) { return this; } + /** + *

    The type of transaction the payment portion is being applied to. Possible values include: INVOICE, JOURNAL_ENTRY, or CREDIT_NOTE.

    + */ @JsonSetter(value = "related_object_type", nulls = Nulls.SKIP) public Builder relatedObjectType(Optional relatedObjectType) { this.relatedObjectType = relatedObjectType; diff --git a/src/main/java/com/merge/api/accounting/types/PaymentMethod.java b/src/main/java/com/merge/api/accounting/types/PaymentMethod.java index ec1098824..e89a2d55c 100644 --- a/src/main/java/com/merge/api/accounting/types/PaymentMethod.java +++ b/src/main/java/com/merge/api/accounting/types/PaymentMethod.java @@ -32,7 +32,7 @@ public final class PaymentMethod { private final Optional modifiedAt; - private final MethodTypeEnum methodType; + private final PaymentMethodMethodType methodType; private final String name; @@ -51,7 +51,7 @@ private PaymentMethod( Optional remoteId, Optional createdAt, Optional modifiedAt, - MethodTypeEnum methodType, + PaymentMethodMethodType methodType, String name, Optional isActive, Optional remoteUpdatedAt, @@ -111,7 +111,7 @@ public Optional getModifiedAt() { * */ @JsonProperty("method_type") - public MethodTypeEnum getMethodType() { + public PaymentMethodMethodType getMethodType() { return methodType; } @@ -198,12 +198,24 @@ public static MethodTypeStage builder() { } public interface MethodTypeStage { - NameStage methodType(@NotNull MethodTypeEnum methodType); + /** + * The type of the payment method. + * + * * `CREDIT_CARD` - CREDIT_CARD + * * `DEBIT_CARD` - DEBIT_CARD + * * `ACH` - ACH + * * `CASH` - CASH + * * `CHECK` - CHECK + */ + NameStage methodType(@NotNull PaymentMethodMethodType methodType); Builder from(PaymentMethod other); } public interface NameStage { + /** + * The payment method’s name + */ _FinalStage name(@NotNull String name); } @@ -214,22 +226,37 @@ public interface _FinalStage { _FinalStage id(String id); + /** + *

    The third-party API ID of the matching object.

    + */ _FinalStage remoteId(Optional remoteId); _FinalStage remoteId(String remoteId); + /** + *

    The datetime that this object was created by Merge.

    + */ _FinalStage createdAt(Optional createdAt); _FinalStage createdAt(OffsetDateTime createdAt); + /** + *

    The datetime that this object was modified by Merge.

    + */ _FinalStage modifiedAt(Optional modifiedAt); _FinalStage modifiedAt(OffsetDateTime modifiedAt); + /** + *

    True if the payment method is active, False if not.

    + */ _FinalStage isActive(Optional isActive); _FinalStage isActive(Boolean isActive); + /** + *

    When the third party's payment method was updated.

    + */ _FinalStage remoteUpdatedAt(Optional remoteUpdatedAt); _FinalStage remoteUpdatedAt(OffsetDateTime remoteUpdatedAt); @@ -245,7 +272,7 @@ public interface _FinalStage { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements MethodTypeStage, NameStage, _FinalStage { - private MethodTypeEnum methodType; + private PaymentMethodMethodType methodType; private String name; @@ -286,7 +313,13 @@ public Builder from(PaymentMethod other) { } /** - *

    The type of the payment method.

    + * The type of the payment method. + * + * * `CREDIT_CARD` - CREDIT_CARD + * * `DEBIT_CARD` - DEBIT_CARD + * * `ACH` - ACH + * * `CASH` - CASH + * * `CHECK` - CHECK

    The type of the payment method.

    *
      *
    • CREDIT_CARD - CREDIT_CARD
    • *
    • DEBIT_CARD - DEBIT_CARD
    • @@ -298,13 +331,13 @@ public Builder from(PaymentMethod other) { */ @java.lang.Override @JsonSetter("method_type") - public NameStage methodType(@NotNull MethodTypeEnum methodType) { + public NameStage methodType(@NotNull PaymentMethodMethodType methodType) { this.methodType = methodType; return this; } /** - *

      The payment method’s name

      + * The payment method’s name

      The payment method’s name

      * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -350,6 +383,9 @@ public _FinalStage remoteUpdatedAt(OffsetDateTime remoteUpdatedAt) { return this; } + /** + *

      When the third party's payment method was updated.

      + */ @java.lang.Override @JsonSetter(value = "remote_updated_at", nulls = Nulls.SKIP) public _FinalStage remoteUpdatedAt(Optional remoteUpdatedAt) { @@ -367,6 +403,9 @@ public _FinalStage isActive(Boolean isActive) { return this; } + /** + *

      True if the payment method is active, False if not.

      + */ @java.lang.Override @JsonSetter(value = "is_active", nulls = Nulls.SKIP) public _FinalStage isActive(Optional isActive) { @@ -384,6 +423,9 @@ public _FinalStage modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

      The datetime that this object was modified by Merge.

      + */ @java.lang.Override @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public _FinalStage modifiedAt(Optional modifiedAt) { @@ -401,6 +443,9 @@ public _FinalStage createdAt(OffsetDateTime createdAt) { return this; } + /** + *

      The datetime that this object was created by Merge.

      + */ @java.lang.Override @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public _FinalStage createdAt(Optional createdAt) { @@ -418,6 +463,9 @@ public _FinalStage remoteId(String remoteId) { return this; } + /** + *

      The third-party API ID of the matching object.

      + */ @java.lang.Override @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public _FinalStage remoteId(Optional remoteId) { diff --git a/src/main/java/com/merge/api/accounting/types/PaymentMethodMethodType.java b/src/main/java/com/merge/api/accounting/types/PaymentMethodMethodType.java new file mode 100644 index 000000000..4d7b1ffdc --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/PaymentMethodMethodType.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = PaymentMethodMethodType.Deserializer.class) +public final class PaymentMethodMethodType { + private final Object value; + + private final int type; + + private PaymentMethodMethodType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((MethodTypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PaymentMethodMethodType && equalTo((PaymentMethodMethodType) other); + } + + private boolean equalTo(PaymentMethodMethodType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static PaymentMethodMethodType of(MethodTypeEnum value) { + return new PaymentMethodMethodType(value, 0); + } + + public static PaymentMethodMethodType of(String value) { + return new PaymentMethodMethodType(value, 1); + } + + public interface Visitor { + T visit(MethodTypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(PaymentMethodMethodType.class); + } + + @java.lang.Override + public PaymentMethodMethodType deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, MethodTypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/PaymentMethodsListRequest.java b/src/main/java/com/merge/api/accounting/types/PaymentMethodsListRequest.java index 3fb1028f6..3417f92b0 100644 --- a/src/main/java/com/merge/api/accounting/types/PaymentMethodsListRequest.java +++ b/src/main/java/com/merge/api/accounting/types/PaymentMethodsListRequest.java @@ -147,6 +147,9 @@ public Builder from(PaymentMethodsListRequest other) { return this; } + /** + *

      The pagination cursor value.

      + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -158,6 +161,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

      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.

      + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -169,6 +175,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

      Whether to include the original data Merge fetched from the third-party to produce these models.

      + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -180,6 +189,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

      Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

      + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -191,6 +203,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

      Number of results to return per page.

      + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; diff --git a/src/main/java/com/merge/api/accounting/types/PaymentMethodsRetrieveRequest.java b/src/main/java/com/merge/api/accounting/types/PaymentMethodsRetrieveRequest.java index 3ccaa3b44..49f0d02d8 100644 --- a/src/main/java/com/merge/api/accounting/types/PaymentMethodsRetrieveRequest.java +++ b/src/main/java/com/merge/api/accounting/types/PaymentMethodsRetrieveRequest.java @@ -97,6 +97,9 @@ public Builder from(PaymentMethodsRetrieveRequest other) { return this; } + /** + *

      Whether to include the original data Merge fetched from the third-party to produce these models.

      + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -108,6 +111,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

      Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

      + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/accounting/types/PaymentRequest.java b/src/main/java/com/merge/api/accounting/types/PaymentRequest.java index 33dfb5907..7ede2c853 100644 --- a/src/main/java/com/merge/api/accounting/types/PaymentRequest.java +++ b/src/main/java/com/merge/api/accounting/types/PaymentRequest.java @@ -31,7 +31,7 @@ public final class PaymentRequest { private final Optional paymentMethod; - private final Optional currency; + private final Optional currency; private final Optional exchangeRate; @@ -39,7 +39,7 @@ public final class PaymentRequest { private final Optional totalAmount; - private final Optional type; + private final Optional type; private final Optional>> trackingCategories; @@ -60,11 +60,11 @@ private PaymentRequest( Optional contact, Optional account, Optional paymentMethod, - Optional currency, + Optional currency, Optional exchangeRate, Optional company, Optional totalAmount, - Optional type, + Optional type, Optional>> trackingCategories, Optional accountingPeriod, Optional> appliedToLines, @@ -434,7 +434,7 @@ public Optional getPaymentMethod() { *
    */ @JsonProperty("currency") - public Optional getCurrency() { + public Optional getCurrency() { return currency; } @@ -470,7 +470,7 @@ public Optional getTotalAmount() { * */ @JsonProperty("type") - public Optional getType() { + public Optional getType() { return type; } @@ -578,7 +578,7 @@ public static final class Builder { private Optional paymentMethod = Optional.empty(); - private Optional currency = Optional.empty(); + private Optional currency = Optional.empty(); private Optional exchangeRate = Optional.empty(); @@ -586,7 +586,7 @@ public static final class Builder { private Optional totalAmount = Optional.empty(); - private Optional type = Optional.empty(); + private Optional type = Optional.empty(); private Optional>> trackingCategories = Optional.empty(); @@ -624,6 +624,9 @@ public Builder from(PaymentRequest other) { return this; } + /** + *

    The payment's transaction date.

    + */ @JsonSetter(value = "transaction_date", nulls = Nulls.SKIP) public Builder transactionDate(Optional transactionDate) { this.transactionDate = transactionDate; @@ -635,6 +638,9 @@ public Builder transactionDate(OffsetDateTime transactionDate) { return this; } + /** + *

    The supplier, or customer involved in the payment.

    + */ @JsonSetter(value = "contact", nulls = Nulls.SKIP) public Builder contact(Optional contact) { this.contact = contact; @@ -646,6 +652,9 @@ public Builder contact(PaymentRequestContact contact) { return this; } + /** + *

    The supplier’s or customer’s account in which the payment is made.

    + */ @JsonSetter(value = "account", nulls = Nulls.SKIP) public Builder account(Optional account) { this.account = account; @@ -657,6 +666,9 @@ public Builder account(PaymentRequestAccount account) { return this; } + /** + *

    The method which this payment was made by.

    + */ @JsonSetter(value = "payment_method", nulls = Nulls.SKIP) public Builder paymentMethod(Optional paymentMethod) { this.paymentMethod = paymentMethod; @@ -668,17 +680,331 @@ public Builder paymentMethod(PaymentRequestPaymentMethod paymentMethod) { return this; } + /** + *

    The payment's currency.

    + *
      + *
    • XUA - ADB Unit of Account
    • + *
    • AFN - Afghan Afghani
    • + *
    • AFA - Afghan Afghani (1927–2002)
    • + *
    • ALL - Albanian Lek
    • + *
    • ALK - Albanian Lek (1946–1965)
    • + *
    • DZD - Algerian Dinar
    • + *
    • ADP - Andorran Peseta
    • + *
    • AOA - Angolan Kwanza
    • + *
    • AOK - Angolan Kwanza (1977–1991)
    • + *
    • AON - Angolan New Kwanza (1990–2000)
    • + *
    • AOR - Angolan Readjusted Kwanza (1995–1999)
    • + *
    • ARA - Argentine Austral
    • + *
    • ARS - Argentine Peso
    • + *
    • ARM - Argentine Peso (1881–1970)
    • + *
    • ARP - Argentine Peso (1983–1985)
    • + *
    • ARL - Argentine Peso Ley (1970–1983)
    • + *
    • AMD - Armenian Dram
    • + *
    • AWG - Aruban Florin
    • + *
    • AUD - Australian Dollar
    • + *
    • ATS - Austrian Schilling
    • + *
    • AZN - Azerbaijani Manat
    • + *
    • AZM - Azerbaijani Manat (1993–2006)
    • + *
    • BSD - Bahamian Dollar
    • + *
    • BHD - Bahraini Dinar
    • + *
    • BDT - Bangladeshi Taka
    • + *
    • BBD - Barbadian Dollar
    • + *
    • BYN - Belarusian Ruble
    • + *
    • BYB - Belarusian Ruble (1994–1999)
    • + *
    • BYR - Belarusian Ruble (2000–2016)
    • + *
    • BEF - Belgian Franc
    • + *
    • BEC - Belgian Franc (convertible)
    • + *
    • BEL - Belgian Franc (financial)
    • + *
    • BZD - Belize Dollar
    • + *
    • BMD - Bermudan Dollar
    • + *
    • BTN - Bhutanese Ngultrum
    • + *
    • BOB - Bolivian Boliviano
    • + *
    • BOL - Bolivian Boliviano (1863–1963)
    • + *
    • BOV - Bolivian Mvdol
    • + *
    • BOP - Bolivian Peso
    • + *
    • BAM - Bosnia-Herzegovina Convertible Mark
    • + *
    • BAD - Bosnia-Herzegovina Dinar (1992–1994)
    • + *
    • BAN - Bosnia-Herzegovina New Dinar (1994–1997)
    • + *
    • BWP - Botswanan Pula
    • + *
    • BRC - Brazilian Cruzado (1986–1989)
    • + *
    • BRZ - Brazilian Cruzeiro (1942–1967)
    • + *
    • BRE - Brazilian Cruzeiro (1990–1993)
    • + *
    • BRR - Brazilian Cruzeiro (1993–1994)
    • + *
    • BRN - Brazilian New Cruzado (1989–1990)
    • + *
    • BRB - Brazilian New Cruzeiro (1967–1986)
    • + *
    • BRL - Brazilian Real
    • + *
    • GBP - British Pound
    • + *
    • BND - Brunei Dollar
    • + *
    • BGL - Bulgarian Hard Lev
    • + *
    • BGN - Bulgarian Lev
    • + *
    • BGO - Bulgarian Lev (1879–1952)
    • + *
    • BGM - Bulgarian Socialist Lev
    • + *
    • BUK - Burmese Kyat
    • + *
    • BIF - Burundian Franc
    • + *
    • XPF - CFP Franc
    • + *
    • KHR - Cambodian Riel
    • + *
    • CAD - Canadian Dollar
    • + *
    • CVE - Cape Verdean Escudo
    • + *
    • KYD - Cayman Islands Dollar
    • + *
    • XAF - Central African CFA Franc
    • + *
    • CLE - Chilean Escudo
    • + *
    • CLP - Chilean Peso
    • + *
    • CLF - Chilean Unit of Account (UF)
    • + *
    • CNX - Chinese People’s Bank Dollar
    • + *
    • CNY - Chinese Yuan
    • + *
    • CNH - Chinese Yuan (offshore)
    • + *
    • COP - Colombian Peso
    • + *
    • COU - Colombian Real Value Unit
    • + *
    • KMF - Comorian Franc
    • + *
    • CDF - Congolese Franc
    • + *
    • CRC - Costa Rican Colón
    • + *
    • HRD - Croatian Dinar
    • + *
    • HRK - Croatian Kuna
    • + *
    • CUC - Cuban Convertible Peso
    • + *
    • CUP - Cuban Peso
    • + *
    • CYP - Cypriot Pound
    • + *
    • CZK - Czech Koruna
    • + *
    • CSK - Czechoslovak Hard Koruna
    • + *
    • DKK - Danish Krone
    • + *
    • DJF - Djiboutian Franc
    • + *
    • DOP - Dominican Peso
    • + *
    • NLG - Dutch Guilder
    • + *
    • XCD - East Caribbean Dollar
    • + *
    • DDM - East German Mark
    • + *
    • ECS - Ecuadorian Sucre
    • + *
    • ECV - Ecuadorian Unit of Constant Value
    • + *
    • EGP - Egyptian Pound
    • + *
    • GQE - Equatorial Guinean Ekwele
    • + *
    • ERN - Eritrean Nakfa
    • + *
    • EEK - Estonian Kroon
    • + *
    • ETB - Ethiopian Birr
    • + *
    • EUR - Euro
    • + *
    • XBA - European Composite Unit
    • + *
    • XEU - European Currency Unit
    • + *
    • XBB - European Monetary Unit
    • + *
    • XBC - European Unit of Account (XBC)
    • + *
    • XBD - European Unit of Account (XBD)
    • + *
    • FKP - Falkland Islands Pound
    • + *
    • FJD - Fijian Dollar
    • + *
    • FIM - Finnish Markka
    • + *
    • FRF - French Franc
    • + *
    • XFO - French Gold Franc
    • + *
    • XFU - French UIC-Franc
    • + *
    • GMD - Gambian Dalasi
    • + *
    • GEK - Georgian Kupon Larit
    • + *
    • GEL - Georgian Lari
    • + *
    • DEM - German Mark
    • + *
    • GHS - Ghanaian Cedi
    • + *
    • GHC - Ghanaian Cedi (1979–2007)
    • + *
    • GIP - Gibraltar Pound
    • + *
    • XAU - Gold
    • + *
    • GRD - Greek Drachma
    • + *
    • GTQ - Guatemalan Quetzal
    • + *
    • GWP - Guinea-Bissau Peso
    • + *
    • GNF - Guinean Franc
    • + *
    • GNS - Guinean Syli
    • + *
    • GYD - Guyanaese Dollar
    • + *
    • HTG - Haitian Gourde
    • + *
    • HNL - Honduran Lempira
    • + *
    • HKD - Hong Kong Dollar
    • + *
    • HUF - Hungarian Forint
    • + *
    • IMP - IMP
    • + *
    • ISK - Icelandic Króna
    • + *
    • ISJ - Icelandic Króna (1918–1981)
    • + *
    • INR - Indian Rupee
    • + *
    • IDR - Indonesian Rupiah
    • + *
    • IRR - Iranian Rial
    • + *
    • IQD - Iraqi Dinar
    • + *
    • IEP - Irish Pound
    • + *
    • ILS - Israeli New Shekel
    • + *
    • ILP - Israeli Pound
    • + *
    • ILR - Israeli Shekel (1980–1985)
    • + *
    • ITL - Italian Lira
    • + *
    • JMD - Jamaican Dollar
    • + *
    • JPY - Japanese Yen
    • + *
    • JOD - Jordanian Dinar
    • + *
    • KZT - Kazakhstani Tenge
    • + *
    • KES - Kenyan Shilling
    • + *
    • KWD - Kuwaiti Dinar
    • + *
    • KGS - Kyrgystani Som
    • + *
    • LAK - Laotian Kip
    • + *
    • LVL - Latvian Lats
    • + *
    • LVR - Latvian Ruble
    • + *
    • LBP - Lebanese Pound
    • + *
    • LSL - Lesotho Loti
    • + *
    • LRD - Liberian Dollar
    • + *
    • LYD - Libyan Dinar
    • + *
    • LTL - Lithuanian Litas
    • + *
    • LTT - Lithuanian Talonas
    • + *
    • LUL - Luxembourg Financial Franc
    • + *
    • LUC - Luxembourgian Convertible Franc
    • + *
    • LUF - Luxembourgian Franc
    • + *
    • MOP - Macanese Pataca
    • + *
    • MKD - Macedonian Denar
    • + *
    • MKN - Macedonian Denar (1992–1993)
    • + *
    • MGA - Malagasy Ariary
    • + *
    • MGF - Malagasy Franc
    • + *
    • MWK - Malawian Kwacha
    • + *
    • MYR - Malaysian Ringgit
    • + *
    • MVR - Maldivian Rufiyaa
    • + *
    • MVP - Maldivian Rupee (1947–1981)
    • + *
    • MLF - Malian Franc
    • + *
    • MTL - Maltese Lira
    • + *
    • MTP - Maltese Pound
    • + *
    • MRU - Mauritanian Ouguiya
    • + *
    • MRO - Mauritanian Ouguiya (1973–2017)
    • + *
    • MUR - Mauritian Rupee
    • + *
    • MXV - Mexican Investment Unit
    • + *
    • MXN - Mexican Peso
    • + *
    • MXP - Mexican Silver Peso (1861–1992)
    • + *
    • MDC - Moldovan Cupon
    • + *
    • MDL - Moldovan Leu
    • + *
    • MCF - Monegasque Franc
    • + *
    • MNT - Mongolian Tugrik
    • + *
    • MAD - Moroccan Dirham
    • + *
    • MAF - Moroccan Franc
    • + *
    • MZE - Mozambican Escudo
    • + *
    • MZN - Mozambican Metical
    • + *
    • MZM - Mozambican Metical (1980–2006)
    • + *
    • MMK - Myanmar Kyat
    • + *
    • NAD - Namibian Dollar
    • + *
    • NPR - Nepalese Rupee
    • + *
    • ANG - Netherlands Antillean Guilder
    • + *
    • TWD - New Taiwan Dollar
    • + *
    • NZD - New Zealand Dollar
    • + *
    • NIO - Nicaraguan Córdoba
    • + *
    • NIC - Nicaraguan Córdoba (1988–1991)
    • + *
    • NGN - Nigerian Naira
    • + *
    • KPW - North Korean Won
    • + *
    • NOK - Norwegian Krone
    • + *
    • OMR - Omani Rial
    • + *
    • PKR - Pakistani Rupee
    • + *
    • XPD - Palladium
    • + *
    • PAB - Panamanian Balboa
    • + *
    • PGK - Papua New Guinean Kina
    • + *
    • PYG - Paraguayan Guarani
    • + *
    • PEI - Peruvian Inti
    • + *
    • PEN - Peruvian Sol
    • + *
    • PES - Peruvian Sol (1863–1965)
    • + *
    • PHP - Philippine Peso
    • + *
    • XPT - Platinum
    • + *
    • PLN - Polish Zloty
    • + *
    • PLZ - Polish Zloty (1950–1995)
    • + *
    • PTE - Portuguese Escudo
    • + *
    • GWE - Portuguese Guinea Escudo
    • + *
    • QAR - Qatari Rial
    • + *
    • XRE - RINET Funds
    • + *
    • RHD - Rhodesian Dollar
    • + *
    • RON - Romanian Leu
    • + *
    • ROL - Romanian Leu (1952–2006)
    • + *
    • RUB - Russian Ruble
    • + *
    • RUR - Russian Ruble (1991–1998)
    • + *
    • RWF - Rwandan Franc
    • + *
    • SVC - Salvadoran Colón
    • + *
    • WST - Samoan Tala
    • + *
    • SAR - Saudi Riyal
    • + *
    • RSD - Serbian Dinar
    • + *
    • CSD - Serbian Dinar (2002–2006)
    • + *
    • SCR - Seychellois Rupee
    • + *
    • SLL - Sierra Leonean Leone
    • + *
    • XAG - Silver
    • + *
    • SGD - Singapore Dollar
    • + *
    • SKK - Slovak Koruna
    • + *
    • SIT - Slovenian Tolar
    • + *
    • SBD - Solomon Islands Dollar
    • + *
    • SOS - Somali Shilling
    • + *
    • ZAR - South African Rand
    • + *
    • ZAL - South African Rand (financial)
    • + *
    • KRH - South Korean Hwan (1953–1962)
    • + *
    • KRW - South Korean Won
    • + *
    • KRO - South Korean Won (1945–1953)
    • + *
    • SSP - South Sudanese Pound
    • + *
    • SUR - Soviet Rouble
    • + *
    • ESP - Spanish Peseta
    • + *
    • ESA - Spanish Peseta (A account)
    • + *
    • ESB - Spanish Peseta (convertible account)
    • + *
    • XDR - Special Drawing Rights
    • + *
    • LKR - Sri Lankan Rupee
    • + *
    • SHP - St. Helena Pound
    • + *
    • XSU - Sucre
    • + *
    • SDD - Sudanese Dinar (1992–2007)
    • + *
    • SDG - Sudanese Pound
    • + *
    • SDP - Sudanese Pound (1957–1998)
    • + *
    • SRD - Surinamese Dollar
    • + *
    • SRG - Surinamese Guilder
    • + *
    • SZL - Swazi Lilangeni
    • + *
    • SEK - Swedish Krona
    • + *
    • CHF - Swiss Franc
    • + *
    • SYP - Syrian Pound
    • + *
    • STN - São Tomé & Príncipe Dobra
    • + *
    • STD - São Tomé & Príncipe Dobra (1977–2017)
    • + *
    • TVD - TVD
    • + *
    • TJR - Tajikistani Ruble
    • + *
    • TJS - Tajikistani Somoni
    • + *
    • TZS - Tanzanian Shilling
    • + *
    • XTS - Testing Currency Code
    • + *
    • THB - Thai Baht
    • + *
    • XXX - The codes assigned for transactions where no currency is involved
    • + *
    • TPE - Timorese Escudo
    • + *
    • TOP - Tongan Paʻanga
    • + *
    • TTD - Trinidad & Tobago Dollar
    • + *
    • TND - Tunisian Dinar
    • + *
    • TRY - Turkish Lira
    • + *
    • TRL - Turkish Lira (1922–2005)
    • + *
    • TMT - Turkmenistani Manat
    • + *
    • TMM - Turkmenistani Manat (1993–2009)
    • + *
    • USD - US Dollar
    • + *
    • USN - US Dollar (Next day)
    • + *
    • USS - US Dollar (Same day)
    • + *
    • UGX - Ugandan Shilling
    • + *
    • UGS - Ugandan Shilling (1966–1987)
    • + *
    • UAH - Ukrainian Hryvnia
    • + *
    • UAK - Ukrainian Karbovanets
    • + *
    • AED - United Arab Emirates Dirham
    • + *
    • UYW - Uruguayan Nominal Wage Index Unit
    • + *
    • UYU - Uruguayan Peso
    • + *
    • UYP - Uruguayan Peso (1975–1993)
    • + *
    • UYI - Uruguayan Peso (Indexed Units)
    • + *
    • UZS - Uzbekistani Som
    • + *
    • VUV - Vanuatu Vatu
    • + *
    • VES - Venezuelan Bolívar
    • + *
    • VEB - Venezuelan Bolívar (1871–2008)
    • + *
    • VEF - Venezuelan Bolívar (2008–2018)
    • + *
    • VND - Vietnamese Dong
    • + *
    • VNN - Vietnamese Dong (1978–1985)
    • + *
    • CHE - WIR Euro
    • + *
    • CHW - WIR Franc
    • + *
    • XOF - West African CFA Franc
    • + *
    • YDD - Yemeni Dinar
    • + *
    • YER - Yemeni Rial
    • + *
    • YUN - Yugoslavian Convertible Dinar (1990–1992)
    • + *
    • YUD - Yugoslavian Hard Dinar (1966–1990)
    • + *
    • YUM - Yugoslavian New Dinar (1994–2002)
    • + *
    • YUR - Yugoslavian Reformed Dinar (1992–1993)
    • + *
    • ZWN - ZWN
    • + *
    • ZRN - Zairean New Zaire (1993–1998)
    • + *
    • ZRZ - Zairean Zaire (1971–1993)
    • + *
    • ZMW - Zambian Kwacha
    • + *
    • ZMK - Zambian Kwacha (1968–2012)
    • + *
    • ZWD - Zimbabwean Dollar (1980–2008)
    • + *
    • ZWR - Zimbabwean Dollar (2008)
    • + *
    • ZWL - Zimbabwean Dollar (2009)
    • + *
    + */ @JsonSetter(value = "currency", nulls = Nulls.SKIP) - public Builder currency(Optional currency) { + public Builder currency(Optional currency) { this.currency = currency; return this; } - public Builder currency(TransactionCurrencyEnum currency) { + public Builder currency(PaymentRequestCurrency currency) { this.currency = Optional.ofNullable(currency); return this; } + /** + *

    The payment's exchange rate.

    + */ @JsonSetter(value = "exchange_rate", nulls = Nulls.SKIP) public Builder exchangeRate(Optional exchangeRate) { this.exchangeRate = exchangeRate; @@ -690,6 +1016,9 @@ public Builder exchangeRate(String exchangeRate) { return this; } + /** + *

    The company the payment belongs to.

    + */ @JsonSetter(value = "company", nulls = Nulls.SKIP) public Builder company(Optional company) { this.company = company; @@ -701,6 +1030,9 @@ public Builder company(PaymentRequestCompany company) { return this; } + /** + *

    The total amount of money being paid to the supplier, or customer, after taxes.

    + */ @JsonSetter(value = "total_amount", nulls = Nulls.SKIP) public Builder totalAmount(Optional totalAmount) { this.totalAmount = totalAmount; @@ -712,13 +1044,20 @@ public Builder totalAmount(Double totalAmount) { return this; } + /** + *

    The type of the invoice.

    + *
      + *
    • ACCOUNTS_PAYABLE - ACCOUNTS_PAYABLE
    • + *
    • ACCOUNTS_RECEIVABLE - ACCOUNTS_RECEIVABLE
    • + *
    + */ @JsonSetter(value = "type", nulls = Nulls.SKIP) - public Builder type(Optional type) { + public Builder type(Optional type) { this.type = type; return this; } - public Builder type(PaymentTypeEnum type) { + public Builder type(PaymentRequestType type) { this.type = Optional.ofNullable(type); return this; } @@ -735,6 +1074,9 @@ public Builder trackingCategories(ListThe accounting period that the Payment was generated in.

    + */ @JsonSetter(value = "accounting_period", nulls = Nulls.SKIP) public Builder accountingPeriod(Optional accountingPeriod) { this.accountingPeriod = accountingPeriod; @@ -746,6 +1088,9 @@ public Builder accountingPeriod(PaymentRequestAccountingPeriod accountingPeriod) return this; } + /** + *

    A list of “Payment Applied to Lines” objects.

    + */ @JsonSetter(value = "applied_to_lines", nulls = Nulls.SKIP) public Builder appliedToLines(Optional> appliedToLines) { this.appliedToLines = appliedToLines; diff --git a/src/main/java/com/merge/api/accounting/types/PaymentRequestCurrency.java b/src/main/java/com/merge/api/accounting/types/PaymentRequestCurrency.java new file mode 100644 index 000000000..c1e555978 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/PaymentRequestCurrency.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = PaymentRequestCurrency.Deserializer.class) +public final class PaymentRequestCurrency { + private final Object value; + + private final int type; + + private PaymentRequestCurrency(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((TransactionCurrencyEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PaymentRequestCurrency && equalTo((PaymentRequestCurrency) other); + } + + private boolean equalTo(PaymentRequestCurrency other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static PaymentRequestCurrency of(TransactionCurrencyEnum value) { + return new PaymentRequestCurrency(value, 0); + } + + public static PaymentRequestCurrency of(String value) { + return new PaymentRequestCurrency(value, 1); + } + + public interface Visitor { + T visit(TransactionCurrencyEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(PaymentRequestCurrency.class); + } + + @java.lang.Override + public PaymentRequestCurrency deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TransactionCurrencyEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/PaymentRequestType.java b/src/main/java/com/merge/api/accounting/types/PaymentRequestType.java new file mode 100644 index 000000000..e698bae91 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/PaymentRequestType.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = PaymentRequestType.Deserializer.class) +public final class PaymentRequestType { + private final Object value; + + private final int type; + + private PaymentRequestType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((PaymentTypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PaymentRequestType && equalTo((PaymentRequestType) other); + } + + private boolean equalTo(PaymentRequestType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static PaymentRequestType of(PaymentTypeEnum value) { + return new PaymentRequestType(value, 0); + } + + public static PaymentRequestType of(String value) { + return new PaymentRequestType(value, 1); + } + + public interface Visitor { + T visit(PaymentTypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(PaymentRequestType.class); + } + + @java.lang.Override + public PaymentRequestType deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, PaymentTypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/PaymentTerm.java b/src/main/java/com/merge/api/accounting/types/PaymentTerm.java index eab77936c..1ec02c9ef 100644 --- a/src/main/java/com/merge/api/accounting/types/PaymentTerm.java +++ b/src/main/java/com/merge/api/accounting/types/PaymentTerm.java @@ -219,6 +219,9 @@ public static NameStage builder() { } public interface NameStage { + /** + * The name of the payment term. + */ _FinalStage name(@NotNull String name); Builder from(PaymentTerm other); @@ -231,34 +234,58 @@ public interface _FinalStage { _FinalStage id(String id); + /** + *

    The third-party API ID of the matching object.

    + */ _FinalStage remoteId(Optional remoteId); _FinalStage remoteId(String remoteId); + /** + *

    The datetime that this object was created by Merge.

    + */ _FinalStage createdAt(Optional createdAt); _FinalStage createdAt(OffsetDateTime createdAt); + /** + *

    The datetime that this object was modified by Merge.

    + */ _FinalStage modifiedAt(Optional modifiedAt); _FinalStage modifiedAt(OffsetDateTime modifiedAt); + /** + *

    True if the payment term is active, False if not.

    + */ _FinalStage isActive(Optional isActive); _FinalStage isActive(Boolean isActive); + /** + *

    The subsidiary that the payment term belongs to.

    + */ _FinalStage company(Optional company); _FinalStage company(PaymentTermCompany company); + /** + *

    The number of days after the invoice date that payment is due.

    + */ _FinalStage daysUntilDue(Optional daysUntilDue); _FinalStage daysUntilDue(Integer daysUntilDue); + /** + *

    The number of days the invoice must be paid before discounts expire.

    + */ _FinalStage discountDays(Optional discountDays); _FinalStage discountDays(Integer discountDays); + /** + *

    When the third party's payment term was modified.

    + */ _FinalStage remoteLastModifiedAt(Optional remoteLastModifiedAt); _FinalStage remoteLastModifiedAt(OffsetDateTime remoteLastModifiedAt); @@ -321,7 +348,7 @@ public Builder from(PaymentTerm other) { } /** - *

    The name of the payment term.

    + * The name of the payment term.

    The name of the payment term.

    * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -367,6 +394,9 @@ public _FinalStage remoteLastModifiedAt(OffsetDateTime remoteLastModifiedAt) { return this; } + /** + *

    When the third party's payment term was modified.

    + */ @java.lang.Override @JsonSetter(value = "remote_last_modified_at", nulls = Nulls.SKIP) public _FinalStage remoteLastModifiedAt(Optional remoteLastModifiedAt) { @@ -384,6 +414,9 @@ public _FinalStage discountDays(Integer discountDays) { return this; } + /** + *

    The number of days the invoice must be paid before discounts expire.

    + */ @java.lang.Override @JsonSetter(value = "discount_days", nulls = Nulls.SKIP) public _FinalStage discountDays(Optional discountDays) { @@ -401,6 +434,9 @@ public _FinalStage daysUntilDue(Integer daysUntilDue) { return this; } + /** + *

    The number of days after the invoice date that payment is due.

    + */ @java.lang.Override @JsonSetter(value = "days_until_due", nulls = Nulls.SKIP) public _FinalStage daysUntilDue(Optional daysUntilDue) { @@ -418,6 +454,9 @@ public _FinalStage company(PaymentTermCompany company) { return this; } + /** + *

    The subsidiary that the payment term belongs to.

    + */ @java.lang.Override @JsonSetter(value = "company", nulls = Nulls.SKIP) public _FinalStage company(Optional company) { @@ -435,6 +474,9 @@ public _FinalStage isActive(Boolean isActive) { return this; } + /** + *

    True if the payment term is active, False if not.

    + */ @java.lang.Override @JsonSetter(value = "is_active", nulls = Nulls.SKIP) public _FinalStage isActive(Optional isActive) { @@ -452,6 +494,9 @@ public _FinalStage modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @java.lang.Override @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public _FinalStage modifiedAt(Optional modifiedAt) { @@ -469,6 +514,9 @@ public _FinalStage createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @java.lang.Override @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public _FinalStage createdAt(Optional createdAt) { @@ -486,6 +534,9 @@ public _FinalStage remoteId(String remoteId) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @java.lang.Override @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public _FinalStage remoteId(Optional remoteId) { diff --git a/src/main/java/com/merge/api/accounting/types/PaymentTermsListRequest.java b/src/main/java/com/merge/api/accounting/types/PaymentTermsListRequest.java index a52d85b99..c53bc58b6 100644 --- a/src/main/java/com/merge/api/accounting/types/PaymentTermsListRequest.java +++ b/src/main/java/com/merge/api/accounting/types/PaymentTermsListRequest.java @@ -170,6 +170,9 @@ public Builder from(PaymentTermsListRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -186,6 +189,9 @@ public Builder expand(String expand) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -197,6 +203,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -208,6 +217,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -219,6 +231,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -230,6 +245,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; diff --git a/src/main/java/com/merge/api/accounting/types/PaymentTermsRetrieveRequest.java b/src/main/java/com/merge/api/accounting/types/PaymentTermsRetrieveRequest.java index b2a1d006c..6408c1345 100644 --- a/src/main/java/com/merge/api/accounting/types/PaymentTermsRetrieveRequest.java +++ b/src/main/java/com/merge/api/accounting/types/PaymentTermsRetrieveRequest.java @@ -116,6 +116,9 @@ public Builder from(PaymentTermsRetrieveRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -132,6 +135,9 @@ public Builder expand(String expand) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -143,6 +149,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/accounting/types/PaymentType.java b/src/main/java/com/merge/api/accounting/types/PaymentType.java new file mode 100644 index 000000000..f6003b9ef --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/PaymentType.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = PaymentType.Deserializer.class) +public final class PaymentType { + private final Object value; + + private final int type; + + private PaymentType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((PaymentTypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PaymentType && equalTo((PaymentType) other); + } + + private boolean equalTo(PaymentType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static PaymentType of(PaymentTypeEnum value) { + return new PaymentType(value, 0); + } + + public static PaymentType of(String value) { + return new PaymentType(value, 1); + } + + public interface Visitor { + T visit(PaymentTypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(PaymentType.class); + } + + @java.lang.Override + public PaymentType deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, PaymentTypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/PaymentsLineItemsRemoteFieldClassesListRequest.java b/src/main/java/com/merge/api/accounting/types/PaymentsLineItemsRemoteFieldClassesListRequest.java index 0347ad39d..c27d272e5 100644 --- a/src/main/java/com/merge/api/accounting/types/PaymentsLineItemsRemoteFieldClassesListRequest.java +++ b/src/main/java/com/merge/api/accounting/types/PaymentsLineItemsRemoteFieldClassesListRequest.java @@ -30,6 +30,8 @@ public final class PaymentsLineItemsRemoteFieldClassesListRequest { private final Optional isCommonModelField; + private final Optional isCustom; + private final Optional pageSize; private final Map additionalProperties; @@ -40,6 +42,7 @@ private PaymentsLineItemsRemoteFieldClassesListRequest( Optional includeRemoteData, Optional includeShellData, Optional isCommonModelField, + Optional isCustom, Optional pageSize, Map additionalProperties) { this.cursor = cursor; @@ -47,6 +50,7 @@ private PaymentsLineItemsRemoteFieldClassesListRequest( this.includeRemoteData = includeRemoteData; this.includeShellData = includeShellData; this.isCommonModelField = isCommonModelField; + this.isCustom = isCustom; this.pageSize = pageSize; this.additionalProperties = additionalProperties; } @@ -91,6 +95,14 @@ public Optional getIsCommonModelField() { return isCommonModelField; } + /** + * @return If provided, will only return remote fields classes with this is_custom value + */ + @JsonProperty("is_custom") + public Optional getIsCustom() { + return isCustom; + } + /** * @return Number of results to return per page. */ @@ -117,6 +129,7 @@ private boolean equalTo(PaymentsLineItemsRemoteFieldClassesListRequest other) { && includeRemoteData.equals(other.includeRemoteData) && includeShellData.equals(other.includeShellData) && isCommonModelField.equals(other.isCommonModelField) + && isCustom.equals(other.isCustom) && pageSize.equals(other.pageSize); } @@ -128,6 +141,7 @@ public int hashCode() { this.includeRemoteData, this.includeShellData, this.isCommonModelField, + this.isCustom, this.pageSize); } @@ -152,6 +166,8 @@ public static final class Builder { private Optional isCommonModelField = Optional.empty(); + private Optional isCustom = Optional.empty(); + private Optional pageSize = Optional.empty(); @JsonAnySetter @@ -165,10 +181,14 @@ public Builder from(PaymentsLineItemsRemoteFieldClassesListRequest other) { includeRemoteData(other.getIncludeRemoteData()); includeShellData(other.getIncludeShellData()); isCommonModelField(other.getIsCommonModelField()); + isCustom(other.getIsCustom()); pageSize(other.getPageSize()); return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -180,6 +200,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -191,6 +214,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -202,6 +228,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -213,6 +242,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, will only return remote field classes with this is_common_model_field value

    + */ @JsonSetter(value = "is_common_model_field", nulls = Nulls.SKIP) public Builder isCommonModelField(Optional isCommonModelField) { this.isCommonModelField = isCommonModelField; @@ -224,6 +256,23 @@ public Builder isCommonModelField(Boolean isCommonModelField) { return this; } + /** + *

    If provided, will only return remote fields classes with this is_custom value

    + */ + @JsonSetter(value = "is_custom", nulls = Nulls.SKIP) + public Builder isCustom(Optional isCustom) { + this.isCustom = isCustom; + return this; + } + + public Builder isCustom(Boolean isCustom) { + this.isCustom = Optional.ofNullable(isCustom); + return this; + } + + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -242,6 +291,7 @@ public PaymentsLineItemsRemoteFieldClassesListRequest build() { includeRemoteData, includeShellData, isCommonModelField, + isCustom, pageSize, additionalProperties); } diff --git a/src/main/java/com/merge/api/accounting/types/PaymentsListRequest.java b/src/main/java/com/merge/api/accounting/types/PaymentsListRequest.java index 7659e693f..fe03a01ca 100644 --- a/src/main/java/com/merge/api/accounting/types/PaymentsListRequest.java +++ b/src/main/java/com/merge/api/accounting/types/PaymentsListRequest.java @@ -358,6 +358,9 @@ public Builder from(PaymentsListRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -374,6 +377,9 @@ public Builder expand(PaymentsListRequestExpandItem expand) { return this; } + /** + *

    If provided, will only return payments for this account.

    + */ @JsonSetter(value = "account_id", nulls = Nulls.SKIP) public Builder accountId(Optional accountId) { this.accountId = accountId; @@ -385,6 +391,9 @@ public Builder accountId(String accountId) { return this; } + /** + *

    If provided, will only return payments for this company.

    + */ @JsonSetter(value = "company_id", nulls = Nulls.SKIP) public Builder companyId(Optional companyId) { this.companyId = companyId; @@ -396,6 +405,9 @@ public Builder companyId(String companyId) { return this; } + /** + *

    If provided, will only return payments for this contact.

    + */ @JsonSetter(value = "contact_id", nulls = Nulls.SKIP) public Builder contactId(Optional contactId) { this.contactId = contactId; @@ -407,6 +419,9 @@ public Builder contactId(String contactId) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -418,6 +433,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -429,6 +447,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -440,6 +461,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -451,6 +475,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -462,6 +489,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

    + */ @JsonSetter(value = "include_remote_fields", nulls = Nulls.SKIP) public Builder includeRemoteFields(Optional includeRemoteFields) { this.includeRemoteFields = includeRemoteFields; @@ -473,6 +503,9 @@ public Builder includeRemoteFields(Boolean includeRemoteFields) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -484,6 +517,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -495,6 +531,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -506,6 +545,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -517,6 +559,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -528,6 +573,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "transaction_date_after", nulls = Nulls.SKIP) public Builder transactionDateAfter(Optional transactionDateAfter) { this.transactionDateAfter = transactionDateAfter; @@ -539,6 +587,9 @@ public Builder transactionDateAfter(OffsetDateTime transactionDateAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "transaction_date_before", nulls = Nulls.SKIP) public Builder transactionDateBefore(Optional transactionDateBefore) { this.transactionDateBefore = transactionDateBefore; diff --git a/src/main/java/com/merge/api/accounting/types/PaymentsRemoteFieldClassesListRequest.java b/src/main/java/com/merge/api/accounting/types/PaymentsRemoteFieldClassesListRequest.java index d1663b7c1..2da781632 100644 --- a/src/main/java/com/merge/api/accounting/types/PaymentsRemoteFieldClassesListRequest.java +++ b/src/main/java/com/merge/api/accounting/types/PaymentsRemoteFieldClassesListRequest.java @@ -30,6 +30,8 @@ public final class PaymentsRemoteFieldClassesListRequest { private final Optional isCommonModelField; + private final Optional isCustom; + private final Optional pageSize; private final Map additionalProperties; @@ -40,6 +42,7 @@ private PaymentsRemoteFieldClassesListRequest( Optional includeRemoteData, Optional includeShellData, Optional isCommonModelField, + Optional isCustom, Optional pageSize, Map additionalProperties) { this.cursor = cursor; @@ -47,6 +50,7 @@ private PaymentsRemoteFieldClassesListRequest( this.includeRemoteData = includeRemoteData; this.includeShellData = includeShellData; this.isCommonModelField = isCommonModelField; + this.isCustom = isCustom; this.pageSize = pageSize; this.additionalProperties = additionalProperties; } @@ -91,6 +95,14 @@ public Optional getIsCommonModelField() { return isCommonModelField; } + /** + * @return If provided, will only return remote fields classes with this is_custom value + */ + @JsonProperty("is_custom") + public Optional getIsCustom() { + return isCustom; + } + /** * @return Number of results to return per page. */ @@ -117,6 +129,7 @@ private boolean equalTo(PaymentsRemoteFieldClassesListRequest other) { && includeRemoteData.equals(other.includeRemoteData) && includeShellData.equals(other.includeShellData) && isCommonModelField.equals(other.isCommonModelField) + && isCustom.equals(other.isCustom) && pageSize.equals(other.pageSize); } @@ -128,6 +141,7 @@ public int hashCode() { this.includeRemoteData, this.includeShellData, this.isCommonModelField, + this.isCustom, this.pageSize); } @@ -152,6 +166,8 @@ public static final class Builder { private Optional isCommonModelField = Optional.empty(); + private Optional isCustom = Optional.empty(); + private Optional pageSize = Optional.empty(); @JsonAnySetter @@ -165,10 +181,14 @@ public Builder from(PaymentsRemoteFieldClassesListRequest other) { includeRemoteData(other.getIncludeRemoteData()); includeShellData(other.getIncludeShellData()); isCommonModelField(other.getIsCommonModelField()); + isCustom(other.getIsCustom()); pageSize(other.getPageSize()); return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -180,6 +200,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -191,6 +214,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -202,6 +228,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -213,6 +242,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, will only return remote field classes with this is_common_model_field value

    + */ @JsonSetter(value = "is_common_model_field", nulls = Nulls.SKIP) public Builder isCommonModelField(Optional isCommonModelField) { this.isCommonModelField = isCommonModelField; @@ -224,6 +256,23 @@ public Builder isCommonModelField(Boolean isCommonModelField) { return this; } + /** + *

    If provided, will only return remote fields classes with this is_custom value

    + */ + @JsonSetter(value = "is_custom", nulls = Nulls.SKIP) + public Builder isCustom(Optional isCustom) { + this.isCustom = isCustom; + return this; + } + + public Builder isCustom(Boolean isCustom) { + this.isCustom = Optional.ofNullable(isCustom); + return this; + } + + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -242,6 +291,7 @@ public PaymentsRemoteFieldClassesListRequest build() { includeRemoteData, includeShellData, isCommonModelField, + isCustom, pageSize, additionalProperties); } diff --git a/src/main/java/com/merge/api/accounting/types/PaymentsRetrieveRequest.java b/src/main/java/com/merge/api/accounting/types/PaymentsRetrieveRequest.java index cfa550d90..b1304e52e 100644 --- a/src/main/java/com/merge/api/accounting/types/PaymentsRetrieveRequest.java +++ b/src/main/java/com/merge/api/accounting/types/PaymentsRetrieveRequest.java @@ -132,6 +132,9 @@ public Builder from(PaymentsRetrieveRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -148,6 +151,9 @@ public Builder expand(PaymentsRetrieveRequestExpandItem expand) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -159,6 +165,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

    + */ @JsonSetter(value = "include_remote_fields", nulls = Nulls.SKIP) public Builder includeRemoteFields(Optional includeRemoteFields) { this.includeRemoteFields = includeRemoteFields; @@ -170,6 +179,9 @@ public Builder includeRemoteFields(Boolean includeRemoteFields) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/accounting/types/PhoneNumbersRetrieveRequest.java b/src/main/java/com/merge/api/accounting/types/PhoneNumbersRetrieveRequest.java index 4750abbda..8f48be925 100644 --- a/src/main/java/com/merge/api/accounting/types/PhoneNumbersRetrieveRequest.java +++ b/src/main/java/com/merge/api/accounting/types/PhoneNumbersRetrieveRequest.java @@ -97,6 +97,9 @@ public Builder from(PhoneNumbersRetrieveRequest other) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -108,6 +111,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/accounting/types/Project.java b/src/main/java/com/merge/api/accounting/types/Project.java new file mode 100644 index 000000000..f2ffaa842 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/Project.java @@ -0,0 +1,488 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.merge.api.core.ObjectMappers; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.jetbrains.annotations.NotNull; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = Project.Builder.class) +public final class Project { + private final Optional id; + + private final Optional remoteId; + + private final Optional createdAt; + + private final Optional modifiedAt; + + private final String name; + + private final Optional isActive; + + private final Optional company; + + private final Optional contact; + + private final Optional> fieldMappings; + + private final Optional> remoteData; + + private final Map additionalProperties; + + private Project( + Optional id, + Optional remoteId, + Optional createdAt, + Optional modifiedAt, + String name, + Optional isActive, + Optional company, + Optional contact, + Optional> fieldMappings, + Optional> remoteData, + Map additionalProperties) { + this.id = id; + this.remoteId = remoteId; + this.createdAt = createdAt; + this.modifiedAt = modifiedAt; + this.name = name; + this.isActive = isActive; + this.company = company; + this.contact = contact; + this.fieldMappings = fieldMappings; + this.remoteData = remoteData; + this.additionalProperties = additionalProperties; + } + + @JsonProperty("id") + public Optional getId() { + return id; + } + + /** + * @return The third-party API ID of the matching object. + */ + @JsonProperty("remote_id") + public Optional getRemoteId() { + return remoteId; + } + + /** + * @return The datetime that this object was created by Merge. + */ + @JsonProperty("created_at") + public Optional getCreatedAt() { + return createdAt; + } + + /** + * @return The datetime that this object was modified by Merge. + */ + @JsonProperty("modified_at") + public Optional getModifiedAt() { + return modifiedAt; + } + + /** + * @return The project’s name + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * @return True if the project is active, False if the project is not active. + */ + @JsonProperty("is_active") + public Optional getIsActive() { + return isActive; + } + + /** + * @return The subsidiary that the project belongs to. + */ + @JsonProperty("company") + public Optional getCompany() { + return company; + } + + /** + * @return The supplier, or customer involved in the project. + */ + @JsonProperty("contact") + public Optional getContact() { + return contact; + } + + @JsonProperty("field_mappings") + public Optional> getFieldMappings() { + return fieldMappings; + } + + @JsonProperty("remote_data") + public Optional> getRemoteData() { + return remoteData; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof Project && equalTo((Project) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(Project other) { + return id.equals(other.id) + && remoteId.equals(other.remoteId) + && createdAt.equals(other.createdAt) + && modifiedAt.equals(other.modifiedAt) + && name.equals(other.name) + && isActive.equals(other.isActive) + && company.equals(other.company) + && contact.equals(other.contact) + && fieldMappings.equals(other.fieldMappings) + && remoteData.equals(other.remoteData); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.id, + this.remoteId, + this.createdAt, + this.modifiedAt, + this.name, + this.isActive, + this.company, + this.contact, + this.fieldMappings, + this.remoteData); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static NameStage builder() { + return new Builder(); + } + + public interface NameStage { + /** + * The project’s name + */ + _FinalStage name(@NotNull String name); + + Builder from(Project other); + } + + public interface _FinalStage { + Project build(); + + _FinalStage id(Optional id); + + _FinalStage id(String id); + + /** + *

    The third-party API ID of the matching object.

    + */ + _FinalStage remoteId(Optional remoteId); + + _FinalStage remoteId(String remoteId); + + /** + *

    The datetime that this object was created by Merge.

    + */ + _FinalStage createdAt(Optional createdAt); + + _FinalStage createdAt(OffsetDateTime createdAt); + + /** + *

    The datetime that this object was modified by Merge.

    + */ + _FinalStage modifiedAt(Optional modifiedAt); + + _FinalStage modifiedAt(OffsetDateTime modifiedAt); + + /** + *

    True if the project is active, False if the project is not active.

    + */ + _FinalStage isActive(Optional isActive); + + _FinalStage isActive(Boolean isActive); + + /** + *

    The subsidiary that the project belongs to.

    + */ + _FinalStage company(Optional company); + + _FinalStage company(ProjectCompany company); + + /** + *

    The supplier, or customer involved in the project.

    + */ + _FinalStage contact(Optional contact); + + _FinalStage contact(ProjectContact contact); + + _FinalStage fieldMappings(Optional> fieldMappings); + + _FinalStage fieldMappings(Map fieldMappings); + + _FinalStage remoteData(Optional> remoteData); + + _FinalStage remoteData(List remoteData); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder implements NameStage, _FinalStage { + private String name; + + private Optional> remoteData = Optional.empty(); + + private Optional> fieldMappings = Optional.empty(); + + private Optional contact = Optional.empty(); + + private Optional company = Optional.empty(); + + private Optional isActive = Optional.empty(); + + private Optional modifiedAt = Optional.empty(); + + private Optional createdAt = Optional.empty(); + + private Optional remoteId = Optional.empty(); + + private Optional id = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + @java.lang.Override + public Builder from(Project other) { + id(other.getId()); + remoteId(other.getRemoteId()); + createdAt(other.getCreatedAt()); + modifiedAt(other.getModifiedAt()); + name(other.getName()); + isActive(other.getIsActive()); + company(other.getCompany()); + contact(other.getContact()); + fieldMappings(other.getFieldMappings()); + remoteData(other.getRemoteData()); + return this; + } + + /** + * The project’s name

    The project’s name

    + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("name") + public _FinalStage name(@NotNull String name) { + this.name = name; + return this; + } + + @java.lang.Override + public _FinalStage remoteData(List remoteData) { + this.remoteData = Optional.ofNullable(remoteData); + return this; + } + + @java.lang.Override + @JsonSetter(value = "remote_data", nulls = Nulls.SKIP) + public _FinalStage remoteData(Optional> remoteData) { + this.remoteData = remoteData; + return this; + } + + @java.lang.Override + public _FinalStage fieldMappings(Map fieldMappings) { + this.fieldMappings = Optional.ofNullable(fieldMappings); + return this; + } + + @java.lang.Override + @JsonSetter(value = "field_mappings", nulls = Nulls.SKIP) + public _FinalStage fieldMappings(Optional> fieldMappings) { + this.fieldMappings = fieldMappings; + return this; + } + + /** + *

    The supplier, or customer involved in the project.

    + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage contact(ProjectContact contact) { + this.contact = Optional.ofNullable(contact); + return this; + } + + /** + *

    The supplier, or customer involved in the project.

    + */ + @java.lang.Override + @JsonSetter(value = "contact", nulls = Nulls.SKIP) + public _FinalStage contact(Optional contact) { + this.contact = contact; + return this; + } + + /** + *

    The subsidiary that the project belongs to.

    + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage company(ProjectCompany company) { + this.company = Optional.ofNullable(company); + return this; + } + + /** + *

    The subsidiary that the project belongs to.

    + */ + @java.lang.Override + @JsonSetter(value = "company", nulls = Nulls.SKIP) + public _FinalStage company(Optional company) { + this.company = company; + return this; + } + + /** + *

    True if the project is active, False if the project is not active.

    + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage isActive(Boolean isActive) { + this.isActive = Optional.ofNullable(isActive); + return this; + } + + /** + *

    True if the project is active, False if the project is not active.

    + */ + @java.lang.Override + @JsonSetter(value = "is_active", nulls = Nulls.SKIP) + public _FinalStage isActive(Optional isActive) { + this.isActive = isActive; + return this; + } + + /** + *

    The datetime that this object was modified by Merge.

    + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage modifiedAt(OffsetDateTime modifiedAt) { + this.modifiedAt = Optional.ofNullable(modifiedAt); + return this; + } + + /** + *

    The datetime that this object was modified by Merge.

    + */ + @java.lang.Override + @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) + public _FinalStage modifiedAt(Optional modifiedAt) { + this.modifiedAt = modifiedAt; + return this; + } + + /** + *

    The datetime that this object was created by Merge.

    + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage createdAt(OffsetDateTime createdAt) { + this.createdAt = Optional.ofNullable(createdAt); + return this; + } + + /** + *

    The datetime that this object was created by Merge.

    + */ + @java.lang.Override + @JsonSetter(value = "created_at", nulls = Nulls.SKIP) + public _FinalStage createdAt(Optional createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + *

    The third-party API ID of the matching object.

    + * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage remoteId(String remoteId) { + this.remoteId = Optional.ofNullable(remoteId); + return this; + } + + /** + *

    The third-party API ID of the matching object.

    + */ + @java.lang.Override + @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) + public _FinalStage remoteId(Optional remoteId) { + this.remoteId = remoteId; + return this; + } + + @java.lang.Override + public _FinalStage id(String id) { + this.id = Optional.ofNullable(id); + return this; + } + + @java.lang.Override + @JsonSetter(value = "id", nulls = Nulls.SKIP) + public _FinalStage id(Optional id) { + this.id = id; + return this; + } + + @java.lang.Override + public Project build() { + return new Project( + id, + remoteId, + createdAt, + modifiedAt, + name, + isActive, + company, + contact, + fieldMappings, + remoteData, + additionalProperties); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/ProjectCompany.java b/src/main/java/com/merge/api/accounting/types/ProjectCompany.java new file mode 100644 index 000000000..93e497570 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/ProjectCompany.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = ProjectCompany.Deserializer.class) +public final class ProjectCompany { + private final Object value; + + private final int type; + + private ProjectCompany(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((CompanyInfo) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ProjectCompany && equalTo((ProjectCompany) other); + } + + private boolean equalTo(ProjectCompany other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static ProjectCompany of(String value) { + return new ProjectCompany(value, 0); + } + + public static ProjectCompany of(CompanyInfo value) { + return new ProjectCompany(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(CompanyInfo value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(ProjectCompany.class); + } + + @java.lang.Override + public ProjectCompany deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, CompanyInfo.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/ProjectContact.java b/src/main/java/com/merge/api/accounting/types/ProjectContact.java new file mode 100644 index 000000000..6aa2b62cc --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/ProjectContact.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = ProjectContact.Deserializer.class) +public final class ProjectContact { + private final Object value; + + private final int type; + + private ProjectContact(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((Contact) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ProjectContact && equalTo((ProjectContact) other); + } + + private boolean equalTo(ProjectContact other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static ProjectContact of(String value) { + return new ProjectContact(value, 0); + } + + public static ProjectContact of(Contact value) { + return new ProjectContact(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(Contact value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(ProjectContact.class); + } + + @java.lang.Override + public ProjectContact deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, Contact.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/ProjectsListRequest.java b/src/main/java/com/merge/api/accounting/types/ProjectsListRequest.java new file mode 100644 index 000000000..dcac2268d --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/ProjectsListRequest.java @@ -0,0 +1,273 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.merge.api.core.ObjectMappers; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ProjectsListRequest.Builder.class) +public final class ProjectsListRequest { + private final Optional> expand; + + private final Optional cursor; + + private final Optional includeDeletedData; + + private final Optional includeRemoteData; + + private final Optional includeShellData; + + private final Optional pageSize; + + private final Map additionalProperties; + + private ProjectsListRequest( + Optional> expand, + Optional cursor, + Optional includeDeletedData, + Optional includeRemoteData, + Optional includeShellData, + Optional pageSize, + Map additionalProperties) { + this.expand = expand; + this.cursor = cursor; + this.includeDeletedData = includeDeletedData; + this.includeRemoteData = includeRemoteData; + this.includeShellData = includeShellData; + this.pageSize = pageSize; + this.additionalProperties = additionalProperties; + } + + /** + * @return Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + */ + @JsonProperty("expand") + public Optional> getExpand() { + return expand; + } + + /** + * @return The pagination cursor value. + */ + @JsonProperty("cursor") + public Optional getCursor() { + return cursor; + } + + /** + * @return 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. + */ + @JsonProperty("include_deleted_data") + public Optional getIncludeDeletedData() { + return includeDeletedData; + } + + /** + * @return Whether to include the original data Merge fetched from the third-party to produce these models. + */ + @JsonProperty("include_remote_data") + public Optional getIncludeRemoteData() { + return includeRemoteData; + } + + /** + * @return Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + */ + @JsonProperty("include_shell_data") + public Optional getIncludeShellData() { + return includeShellData; + } + + /** + * @return Number of results to return per page. + */ + @JsonProperty("page_size") + public Optional getPageSize() { + return pageSize; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ProjectsListRequest && equalTo((ProjectsListRequest) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ProjectsListRequest other) { + return expand.equals(other.expand) + && cursor.equals(other.cursor) + && includeDeletedData.equals(other.includeDeletedData) + && includeRemoteData.equals(other.includeRemoteData) + && includeShellData.equals(other.includeShellData) + && pageSize.equals(other.pageSize); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash( + this.expand, + this.cursor, + this.includeDeletedData, + this.includeRemoteData, + this.includeShellData, + this.pageSize); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional> expand = Optional.empty(); + + private Optional cursor = Optional.empty(); + + private Optional includeDeletedData = Optional.empty(); + + private Optional includeRemoteData = Optional.empty(); + + private Optional includeShellData = Optional.empty(); + + private Optional pageSize = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ProjectsListRequest other) { + expand(other.getExpand()); + cursor(other.getCursor()); + includeDeletedData(other.getIncludeDeletedData()); + includeRemoteData(other.getIncludeRemoteData()); + includeShellData(other.getIncludeShellData()); + pageSize(other.getPageSize()); + return this; + } + + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ + @JsonSetter(value = "expand", nulls = Nulls.SKIP) + public Builder expand(Optional> expand) { + this.expand = expand; + return this; + } + + public Builder expand(List expand) { + this.expand = Optional.ofNullable(expand); + return this; + } + + public Builder expand(ProjectsListRequestExpandItem expand) { + this.expand = Optional.of(Collections.singletonList(expand)); + return this; + } + + /** + *

    The pagination cursor value.

    + */ + @JsonSetter(value = "cursor", nulls = Nulls.SKIP) + public Builder cursor(Optional cursor) { + this.cursor = cursor; + return this; + } + + public Builder cursor(String cursor) { + this.cursor = Optional.ofNullable(cursor); + return this; + } + + /** + *

    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.

    + */ + @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) + public Builder includeDeletedData(Optional includeDeletedData) { + this.includeDeletedData = includeDeletedData; + return this; + } + + public Builder includeDeletedData(Boolean includeDeletedData) { + this.includeDeletedData = Optional.ofNullable(includeDeletedData); + return this; + } + + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ + @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) + public Builder includeRemoteData(Optional includeRemoteData) { + this.includeRemoteData = includeRemoteData; + return this; + } + + public Builder includeRemoteData(Boolean includeRemoteData) { + this.includeRemoteData = Optional.ofNullable(includeRemoteData); + return this; + } + + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ + @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) + public Builder includeShellData(Optional includeShellData) { + this.includeShellData = includeShellData; + return this; + } + + public Builder includeShellData(Boolean includeShellData) { + this.includeShellData = Optional.ofNullable(includeShellData); + return this; + } + + /** + *

    Number of results to return per page.

    + */ + @JsonSetter(value = "page_size", nulls = Nulls.SKIP) + public Builder pageSize(Optional pageSize) { + this.pageSize = pageSize; + return this; + } + + public Builder pageSize(Integer pageSize) { + this.pageSize = Optional.ofNullable(pageSize); + return this; + } + + public ProjectsListRequest build() { + return new ProjectsListRequest( + expand, + cursor, + includeDeletedData, + includeRemoteData, + includeShellData, + pageSize, + additionalProperties); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/ProjectsListRequestExpandItem.java b/src/main/java/com/merge/api/accounting/types/ProjectsListRequestExpandItem.java new file mode 100644 index 000000000..ee616baa3 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/ProjectsListRequestExpandItem.java @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; + +public enum ProjectsListRequestExpandItem { + COMPANY("company"), + + CONTACT("contact"); + + private final String value; + + ProjectsListRequestExpandItem(String value) { + this.value = value; + } + + @JsonValue + @java.lang.Override + public String toString() { + return this.value; + } +} diff --git a/src/main/java/com/merge/api/accounting/types/ProjectsRetrieveRequest.java b/src/main/java/com/merge/api/accounting/types/ProjectsRetrieveRequest.java new file mode 100644 index 000000000..57ffe9b64 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/ProjectsRetrieveRequest.java @@ -0,0 +1,170 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.merge.api.core.ObjectMappers; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = ProjectsRetrieveRequest.Builder.class) +public final class ProjectsRetrieveRequest { + private final Optional> expand; + + private final Optional includeRemoteData; + + private final Optional includeShellData; + + private final Map additionalProperties; + + private ProjectsRetrieveRequest( + Optional> expand, + Optional includeRemoteData, + Optional includeShellData, + Map additionalProperties) { + this.expand = expand; + this.includeRemoteData = includeRemoteData; + this.includeShellData = includeShellData; + this.additionalProperties = additionalProperties; + } + + /** + * @return Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + */ + @JsonProperty("expand") + public Optional> getExpand() { + return expand; + } + + /** + * @return Whether to include the original data Merge fetched from the third-party to produce these models. + */ + @JsonProperty("include_remote_data") + public Optional getIncludeRemoteData() { + return includeRemoteData; + } + + /** + * @return Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + */ + @JsonProperty("include_shell_data") + public Optional getIncludeShellData() { + return includeShellData; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ProjectsRetrieveRequest && equalTo((ProjectsRetrieveRequest) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(ProjectsRetrieveRequest other) { + return expand.equals(other.expand) + && includeRemoteData.equals(other.includeRemoteData) + && includeShellData.equals(other.includeShellData); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.expand, this.includeRemoteData, this.includeShellData); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional> expand = Optional.empty(); + + private Optional includeRemoteData = Optional.empty(); + + private Optional includeShellData = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(ProjectsRetrieveRequest other) { + expand(other.getExpand()); + includeRemoteData(other.getIncludeRemoteData()); + includeShellData(other.getIncludeShellData()); + return this; + } + + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ + @JsonSetter(value = "expand", nulls = Nulls.SKIP) + public Builder expand(Optional> expand) { + this.expand = expand; + return this; + } + + public Builder expand(List expand) { + this.expand = Optional.ofNullable(expand); + return this; + } + + public Builder expand(ProjectsRetrieveRequestExpandItem expand) { + this.expand = Optional.of(Collections.singletonList(expand)); + return this; + } + + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ + @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) + public Builder includeRemoteData(Optional includeRemoteData) { + this.includeRemoteData = includeRemoteData; + return this; + } + + public Builder includeRemoteData(Boolean includeRemoteData) { + this.includeRemoteData = Optional.ofNullable(includeRemoteData); + return this; + } + + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ + @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) + public Builder includeShellData(Optional includeShellData) { + this.includeShellData = includeShellData; + return this; + } + + public Builder includeShellData(Boolean includeShellData) { + this.includeShellData = Optional.ofNullable(includeShellData); + return this; + } + + public ProjectsRetrieveRequest build() { + return new ProjectsRetrieveRequest(expand, includeRemoteData, includeShellData, additionalProperties); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/ProjectsRetrieveRequestExpandItem.java b/src/main/java/com/merge/api/accounting/types/ProjectsRetrieveRequestExpandItem.java new file mode 100644 index 000000000..e30b133de --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/ProjectsRetrieveRequestExpandItem.java @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; + +public enum ProjectsRetrieveRequestExpandItem { + COMPANY("company"), + + CONTACT("contact"); + + private final String value; + + ProjectsRetrieveRequestExpandItem(String value) { + this.value = value; + } + + @JsonValue + @java.lang.Override + public String toString() { + return this.value; + } +} diff --git a/src/main/java/com/merge/api/accounting/types/PurchaseOrder.java b/src/main/java/com/merge/api/accounting/types/PurchaseOrder.java index c4b03ecf1..81bb65dd7 100644 --- a/src/main/java/com/merge/api/accounting/types/PurchaseOrder.java +++ b/src/main/java/com/merge/api/accounting/types/PurchaseOrder.java @@ -31,7 +31,7 @@ public final class PurchaseOrder { private final Optional modifiedAt; - private final Optional status; + private final Optional status; private final Optional issueDate; @@ -51,7 +51,7 @@ public final class PurchaseOrder { private final Optional totalAmount; - private final Optional currency; + private final Optional currency; private final Optional exchangeRate; @@ -84,7 +84,7 @@ private PurchaseOrder( Optional remoteId, Optional createdAt, Optional modifiedAt, - Optional status, + Optional status, Optional issueDate, Optional purchaseOrderNumber, Optional deliveryDate, @@ -94,7 +94,7 @@ private PurchaseOrder( Optional memo, Optional company, Optional totalAmount, - Optional currency, + Optional currency, Optional exchangeRate, Optional paymentTerm, Optional> lineItems, @@ -178,7 +178,7 @@ public Optional getModifiedAt() { * */ @JsonProperty("status") - public Optional getStatus() { + public Optional getStatus() { return status; } @@ -566,7 +566,7 @@ public Optional getTotalAmount() { * */ @JsonProperty("currency") - public Optional getCurrency() { + public Optional getCurrency() { return currency; } @@ -743,7 +743,7 @@ public static final class Builder { private Optional modifiedAt = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Optional issueDate = Optional.empty(); @@ -763,7 +763,7 @@ public static final class Builder { private Optional totalAmount = Optional.empty(); - private Optional currency = Optional.empty(); + private Optional currency = Optional.empty(); private Optional exchangeRate = Optional.empty(); @@ -836,6 +836,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -847,6 +850,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -858,6 +864,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -869,17 +878,30 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The purchase order's status.

    + *
      + *
    • DRAFT - DRAFT
    • + *
    • SUBMITTED - SUBMITTED
    • + *
    • AUTHORIZED - AUTHORIZED
    • + *
    • BILLED - BILLED
    • + *
    • DELETED - DELETED
    • + *
    + */ @JsonSetter(value = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { + public Builder status(Optional status) { this.status = status; return this; } - public Builder status(PurchaseOrderStatusEnum status) { + public Builder status(PurchaseOrderStatus status) { this.status = Optional.ofNullable(status); return this; } + /** + *

    The purchase order's issue date.

    + */ @JsonSetter(value = "issue_date", nulls = Nulls.SKIP) public Builder issueDate(Optional issueDate) { this.issueDate = issueDate; @@ -891,6 +913,9 @@ public Builder issueDate(OffsetDateTime issueDate) { return this; } + /** + *

    The human-readable number of the purchase order.

    + */ @JsonSetter(value = "purchase_order_number", nulls = Nulls.SKIP) public Builder purchaseOrderNumber(Optional purchaseOrderNumber) { this.purchaseOrderNumber = purchaseOrderNumber; @@ -902,6 +927,9 @@ public Builder purchaseOrderNumber(String purchaseOrderNumber) { return this; } + /** + *

    The purchase order's delivery date.

    + */ @JsonSetter(value = "delivery_date", nulls = Nulls.SKIP) public Builder deliveryDate(Optional deliveryDate) { this.deliveryDate = deliveryDate; @@ -913,6 +941,9 @@ public Builder deliveryDate(OffsetDateTime deliveryDate) { return this; } + /** + *

    The purchase order's delivery address.

    + */ @JsonSetter(value = "delivery_address", nulls = Nulls.SKIP) public Builder deliveryAddress(Optional deliveryAddress) { this.deliveryAddress = deliveryAddress; @@ -924,6 +955,9 @@ public Builder deliveryAddress(PurchaseOrderDeliveryAddress deliveryAddress) { return this; } + /** + *

    The contact making the purchase order.

    + */ @JsonSetter(value = "customer", nulls = Nulls.SKIP) public Builder customer(Optional customer) { this.customer = customer; @@ -935,6 +969,9 @@ public Builder customer(String customer) { return this; } + /** + *

    The party fulfilling the purchase order.

    + */ @JsonSetter(value = "vendor", nulls = Nulls.SKIP) public Builder vendor(Optional vendor) { this.vendor = vendor; @@ -946,6 +983,9 @@ public Builder vendor(PurchaseOrderVendor vendor) { return this; } + /** + *

    A memo attached to the purchase order.

    + */ @JsonSetter(value = "memo", nulls = Nulls.SKIP) public Builder memo(Optional memo) { this.memo = memo; @@ -957,6 +997,9 @@ public Builder memo(String memo) { return this; } + /** + *

    The company the purchase order belongs to.

    + */ @JsonSetter(value = "company", nulls = Nulls.SKIP) public Builder company(Optional company) { this.company = company; @@ -968,6 +1011,9 @@ public Builder company(PurchaseOrderCompany company) { return this; } + /** + *

    The purchase order's total amount.

    + */ @JsonSetter(value = "total_amount", nulls = Nulls.SKIP) public Builder totalAmount(Optional totalAmount) { this.totalAmount = totalAmount; @@ -979,17 +1025,331 @@ public Builder totalAmount(Double totalAmount) { return this; } + /** + *

    The purchase order's currency.

    + *
      + *
    • XUA - ADB Unit of Account
    • + *
    • AFN - Afghan Afghani
    • + *
    • AFA - Afghan Afghani (1927–2002)
    • + *
    • ALL - Albanian Lek
    • + *
    • ALK - Albanian Lek (1946–1965)
    • + *
    • DZD - Algerian Dinar
    • + *
    • ADP - Andorran Peseta
    • + *
    • AOA - Angolan Kwanza
    • + *
    • AOK - Angolan Kwanza (1977–1991)
    • + *
    • AON - Angolan New Kwanza (1990–2000)
    • + *
    • AOR - Angolan Readjusted Kwanza (1995–1999)
    • + *
    • ARA - Argentine Austral
    • + *
    • ARS - Argentine Peso
    • + *
    • ARM - Argentine Peso (1881–1970)
    • + *
    • ARP - Argentine Peso (1983–1985)
    • + *
    • ARL - Argentine Peso Ley (1970–1983)
    • + *
    • AMD - Armenian Dram
    • + *
    • AWG - Aruban Florin
    • + *
    • AUD - Australian Dollar
    • + *
    • ATS - Austrian Schilling
    • + *
    • AZN - Azerbaijani Manat
    • + *
    • AZM - Azerbaijani Manat (1993–2006)
    • + *
    • BSD - Bahamian Dollar
    • + *
    • BHD - Bahraini Dinar
    • + *
    • BDT - Bangladeshi Taka
    • + *
    • BBD - Barbadian Dollar
    • + *
    • BYN - Belarusian Ruble
    • + *
    • BYB - Belarusian Ruble (1994–1999)
    • + *
    • BYR - Belarusian Ruble (2000–2016)
    • + *
    • BEF - Belgian Franc
    • + *
    • BEC - Belgian Franc (convertible)
    • + *
    • BEL - Belgian Franc (financial)
    • + *
    • BZD - Belize Dollar
    • + *
    • BMD - Bermudan Dollar
    • + *
    • BTN - Bhutanese Ngultrum
    • + *
    • BOB - Bolivian Boliviano
    • + *
    • BOL - Bolivian Boliviano (1863–1963)
    • + *
    • BOV - Bolivian Mvdol
    • + *
    • BOP - Bolivian Peso
    • + *
    • BAM - Bosnia-Herzegovina Convertible Mark
    • + *
    • BAD - Bosnia-Herzegovina Dinar (1992–1994)
    • + *
    • BAN - Bosnia-Herzegovina New Dinar (1994–1997)
    • + *
    • BWP - Botswanan Pula
    • + *
    • BRC - Brazilian Cruzado (1986–1989)
    • + *
    • BRZ - Brazilian Cruzeiro (1942–1967)
    • + *
    • BRE - Brazilian Cruzeiro (1990–1993)
    • + *
    • BRR - Brazilian Cruzeiro (1993–1994)
    • + *
    • BRN - Brazilian New Cruzado (1989–1990)
    • + *
    • BRB - Brazilian New Cruzeiro (1967–1986)
    • + *
    • BRL - Brazilian Real
    • + *
    • GBP - British Pound
    • + *
    • BND - Brunei Dollar
    • + *
    • BGL - Bulgarian Hard Lev
    • + *
    • BGN - Bulgarian Lev
    • + *
    • BGO - Bulgarian Lev (1879–1952)
    • + *
    • BGM - Bulgarian Socialist Lev
    • + *
    • BUK - Burmese Kyat
    • + *
    • BIF - Burundian Franc
    • + *
    • XPF - CFP Franc
    • + *
    • KHR - Cambodian Riel
    • + *
    • CAD - Canadian Dollar
    • + *
    • CVE - Cape Verdean Escudo
    • + *
    • KYD - Cayman Islands Dollar
    • + *
    • XAF - Central African CFA Franc
    • + *
    • CLE - Chilean Escudo
    • + *
    • CLP - Chilean Peso
    • + *
    • CLF - Chilean Unit of Account (UF)
    • + *
    • CNX - Chinese People’s Bank Dollar
    • + *
    • CNY - Chinese Yuan
    • + *
    • CNH - Chinese Yuan (offshore)
    • + *
    • COP - Colombian Peso
    • + *
    • COU - Colombian Real Value Unit
    • + *
    • KMF - Comorian Franc
    • + *
    • CDF - Congolese Franc
    • + *
    • CRC - Costa Rican Colón
    • + *
    • HRD - Croatian Dinar
    • + *
    • HRK - Croatian Kuna
    • + *
    • CUC - Cuban Convertible Peso
    • + *
    • CUP - Cuban Peso
    • + *
    • CYP - Cypriot Pound
    • + *
    • CZK - Czech Koruna
    • + *
    • CSK - Czechoslovak Hard Koruna
    • + *
    • DKK - Danish Krone
    • + *
    • DJF - Djiboutian Franc
    • + *
    • DOP - Dominican Peso
    • + *
    • NLG - Dutch Guilder
    • + *
    • XCD - East Caribbean Dollar
    • + *
    • DDM - East German Mark
    • + *
    • ECS - Ecuadorian Sucre
    • + *
    • ECV - Ecuadorian Unit of Constant Value
    • + *
    • EGP - Egyptian Pound
    • + *
    • GQE - Equatorial Guinean Ekwele
    • + *
    • ERN - Eritrean Nakfa
    • + *
    • EEK - Estonian Kroon
    • + *
    • ETB - Ethiopian Birr
    • + *
    • EUR - Euro
    • + *
    • XBA - European Composite Unit
    • + *
    • XEU - European Currency Unit
    • + *
    • XBB - European Monetary Unit
    • + *
    • XBC - European Unit of Account (XBC)
    • + *
    • XBD - European Unit of Account (XBD)
    • + *
    • FKP - Falkland Islands Pound
    • + *
    • FJD - Fijian Dollar
    • + *
    • FIM - Finnish Markka
    • + *
    • FRF - French Franc
    • + *
    • XFO - French Gold Franc
    • + *
    • XFU - French UIC-Franc
    • + *
    • GMD - Gambian Dalasi
    • + *
    • GEK - Georgian Kupon Larit
    • + *
    • GEL - Georgian Lari
    • + *
    • DEM - German Mark
    • + *
    • GHS - Ghanaian Cedi
    • + *
    • GHC - Ghanaian Cedi (1979–2007)
    • + *
    • GIP - Gibraltar Pound
    • + *
    • XAU - Gold
    • + *
    • GRD - Greek Drachma
    • + *
    • GTQ - Guatemalan Quetzal
    • + *
    • GWP - Guinea-Bissau Peso
    • + *
    • GNF - Guinean Franc
    • + *
    • GNS - Guinean Syli
    • + *
    • GYD - Guyanaese Dollar
    • + *
    • HTG - Haitian Gourde
    • + *
    • HNL - Honduran Lempira
    • + *
    • HKD - Hong Kong Dollar
    • + *
    • HUF - Hungarian Forint
    • + *
    • IMP - IMP
    • + *
    • ISK - Icelandic Króna
    • + *
    • ISJ - Icelandic Króna (1918–1981)
    • + *
    • INR - Indian Rupee
    • + *
    • IDR - Indonesian Rupiah
    • + *
    • IRR - Iranian Rial
    • + *
    • IQD - Iraqi Dinar
    • + *
    • IEP - Irish Pound
    • + *
    • ILS - Israeli New Shekel
    • + *
    • ILP - Israeli Pound
    • + *
    • ILR - Israeli Shekel (1980–1985)
    • + *
    • ITL - Italian Lira
    • + *
    • JMD - Jamaican Dollar
    • + *
    • JPY - Japanese Yen
    • + *
    • JOD - Jordanian Dinar
    • + *
    • KZT - Kazakhstani Tenge
    • + *
    • KES - Kenyan Shilling
    • + *
    • KWD - Kuwaiti Dinar
    • + *
    • KGS - Kyrgystani Som
    • + *
    • LAK - Laotian Kip
    • + *
    • LVL - Latvian Lats
    • + *
    • LVR - Latvian Ruble
    • + *
    • LBP - Lebanese Pound
    • + *
    • LSL - Lesotho Loti
    • + *
    • LRD - Liberian Dollar
    • + *
    • LYD - Libyan Dinar
    • + *
    • LTL - Lithuanian Litas
    • + *
    • LTT - Lithuanian Talonas
    • + *
    • LUL - Luxembourg Financial Franc
    • + *
    • LUC - Luxembourgian Convertible Franc
    • + *
    • LUF - Luxembourgian Franc
    • + *
    • MOP - Macanese Pataca
    • + *
    • MKD - Macedonian Denar
    • + *
    • MKN - Macedonian Denar (1992–1993)
    • + *
    • MGA - Malagasy Ariary
    • + *
    • MGF - Malagasy Franc
    • + *
    • MWK - Malawian Kwacha
    • + *
    • MYR - Malaysian Ringgit
    • + *
    • MVR - Maldivian Rufiyaa
    • + *
    • MVP - Maldivian Rupee (1947–1981)
    • + *
    • MLF - Malian Franc
    • + *
    • MTL - Maltese Lira
    • + *
    • MTP - Maltese Pound
    • + *
    • MRU - Mauritanian Ouguiya
    • + *
    • MRO - Mauritanian Ouguiya (1973–2017)
    • + *
    • MUR - Mauritian Rupee
    • + *
    • MXV - Mexican Investment Unit
    • + *
    • MXN - Mexican Peso
    • + *
    • MXP - Mexican Silver Peso (1861–1992)
    • + *
    • MDC - Moldovan Cupon
    • + *
    • MDL - Moldovan Leu
    • + *
    • MCF - Monegasque Franc
    • + *
    • MNT - Mongolian Tugrik
    • + *
    • MAD - Moroccan Dirham
    • + *
    • MAF - Moroccan Franc
    • + *
    • MZE - Mozambican Escudo
    • + *
    • MZN - Mozambican Metical
    • + *
    • MZM - Mozambican Metical (1980–2006)
    • + *
    • MMK - Myanmar Kyat
    • + *
    • NAD - Namibian Dollar
    • + *
    • NPR - Nepalese Rupee
    • + *
    • ANG - Netherlands Antillean Guilder
    • + *
    • TWD - New Taiwan Dollar
    • + *
    • NZD - New Zealand Dollar
    • + *
    • NIO - Nicaraguan Córdoba
    • + *
    • NIC - Nicaraguan Córdoba (1988–1991)
    • + *
    • NGN - Nigerian Naira
    • + *
    • KPW - North Korean Won
    • + *
    • NOK - Norwegian Krone
    • + *
    • OMR - Omani Rial
    • + *
    • PKR - Pakistani Rupee
    • + *
    • XPD - Palladium
    • + *
    • PAB - Panamanian Balboa
    • + *
    • PGK - Papua New Guinean Kina
    • + *
    • PYG - Paraguayan Guarani
    • + *
    • PEI - Peruvian Inti
    • + *
    • PEN - Peruvian Sol
    • + *
    • PES - Peruvian Sol (1863–1965)
    • + *
    • PHP - Philippine Peso
    • + *
    • XPT - Platinum
    • + *
    • PLN - Polish Zloty
    • + *
    • PLZ - Polish Zloty (1950–1995)
    • + *
    • PTE - Portuguese Escudo
    • + *
    • GWE - Portuguese Guinea Escudo
    • + *
    • QAR - Qatari Rial
    • + *
    • XRE - RINET Funds
    • + *
    • RHD - Rhodesian Dollar
    • + *
    • RON - Romanian Leu
    • + *
    • ROL - Romanian Leu (1952–2006)
    • + *
    • RUB - Russian Ruble
    • + *
    • RUR - Russian Ruble (1991–1998)
    • + *
    • RWF - Rwandan Franc
    • + *
    • SVC - Salvadoran Colón
    • + *
    • WST - Samoan Tala
    • + *
    • SAR - Saudi Riyal
    • + *
    • RSD - Serbian Dinar
    • + *
    • CSD - Serbian Dinar (2002–2006)
    • + *
    • SCR - Seychellois Rupee
    • + *
    • SLL - Sierra Leonean Leone
    • + *
    • XAG - Silver
    • + *
    • SGD - Singapore Dollar
    • + *
    • SKK - Slovak Koruna
    • + *
    • SIT - Slovenian Tolar
    • + *
    • SBD - Solomon Islands Dollar
    • + *
    • SOS - Somali Shilling
    • + *
    • ZAR - South African Rand
    • + *
    • ZAL - South African Rand (financial)
    • + *
    • KRH - South Korean Hwan (1953–1962)
    • + *
    • KRW - South Korean Won
    • + *
    • KRO - South Korean Won (1945–1953)
    • + *
    • SSP - South Sudanese Pound
    • + *
    • SUR - Soviet Rouble
    • + *
    • ESP - Spanish Peseta
    • + *
    • ESA - Spanish Peseta (A account)
    • + *
    • ESB - Spanish Peseta (convertible account)
    • + *
    • XDR - Special Drawing Rights
    • + *
    • LKR - Sri Lankan Rupee
    • + *
    • SHP - St. Helena Pound
    • + *
    • XSU - Sucre
    • + *
    • SDD - Sudanese Dinar (1992–2007)
    • + *
    • SDG - Sudanese Pound
    • + *
    • SDP - Sudanese Pound (1957–1998)
    • + *
    • SRD - Surinamese Dollar
    • + *
    • SRG - Surinamese Guilder
    • + *
    • SZL - Swazi Lilangeni
    • + *
    • SEK - Swedish Krona
    • + *
    • CHF - Swiss Franc
    • + *
    • SYP - Syrian Pound
    • + *
    • STN - São Tomé & Príncipe Dobra
    • + *
    • STD - São Tomé & Príncipe Dobra (1977–2017)
    • + *
    • TVD - TVD
    • + *
    • TJR - Tajikistani Ruble
    • + *
    • TJS - Tajikistani Somoni
    • + *
    • TZS - Tanzanian Shilling
    • + *
    • XTS - Testing Currency Code
    • + *
    • THB - Thai Baht
    • + *
    • XXX - The codes assigned for transactions where no currency is involved
    • + *
    • TPE - Timorese Escudo
    • + *
    • TOP - Tongan Paʻanga
    • + *
    • TTD - Trinidad & Tobago Dollar
    • + *
    • TND - Tunisian Dinar
    • + *
    • TRY - Turkish Lira
    • + *
    • TRL - Turkish Lira (1922–2005)
    • + *
    • TMT - Turkmenistani Manat
    • + *
    • TMM - Turkmenistani Manat (1993–2009)
    • + *
    • USD - US Dollar
    • + *
    • USN - US Dollar (Next day)
    • + *
    • USS - US Dollar (Same day)
    • + *
    • UGX - Ugandan Shilling
    • + *
    • UGS - Ugandan Shilling (1966–1987)
    • + *
    • UAH - Ukrainian Hryvnia
    • + *
    • UAK - Ukrainian Karbovanets
    • + *
    • AED - United Arab Emirates Dirham
    • + *
    • UYW - Uruguayan Nominal Wage Index Unit
    • + *
    • UYU - Uruguayan Peso
    • + *
    • UYP - Uruguayan Peso (1975–1993)
    • + *
    • UYI - Uruguayan Peso (Indexed Units)
    • + *
    • UZS - Uzbekistani Som
    • + *
    • VUV - Vanuatu Vatu
    • + *
    • VES - Venezuelan Bolívar
    • + *
    • VEB - Venezuelan Bolívar (1871–2008)
    • + *
    • VEF - Venezuelan Bolívar (2008–2018)
    • + *
    • VND - Vietnamese Dong
    • + *
    • VNN - Vietnamese Dong (1978–1985)
    • + *
    • CHE - WIR Euro
    • + *
    • CHW - WIR Franc
    • + *
    • XOF - West African CFA Franc
    • + *
    • YDD - Yemeni Dinar
    • + *
    • YER - Yemeni Rial
    • + *
    • YUN - Yugoslavian Convertible Dinar (1990–1992)
    • + *
    • YUD - Yugoslavian Hard Dinar (1966–1990)
    • + *
    • YUM - Yugoslavian New Dinar (1994–2002)
    • + *
    • YUR - Yugoslavian Reformed Dinar (1992–1993)
    • + *
    • ZWN - ZWN
    • + *
    • ZRN - Zairean New Zaire (1993–1998)
    • + *
    • ZRZ - Zairean Zaire (1971–1993)
    • + *
    • ZMW - Zambian Kwacha
    • + *
    • ZMK - Zambian Kwacha (1968–2012)
    • + *
    • ZWD - Zimbabwean Dollar (1980–2008)
    • + *
    • ZWR - Zimbabwean Dollar (2008)
    • + *
    • ZWL - Zimbabwean Dollar (2009)
    • + *
    + */ @JsonSetter(value = "currency", nulls = Nulls.SKIP) - public Builder currency(Optional currency) { + public Builder currency(Optional currency) { this.currency = currency; return this; } - public Builder currency(TransactionCurrencyEnum currency) { + public Builder currency(PurchaseOrderCurrency currency) { this.currency = Optional.ofNullable(currency); return this; } + /** + *

    The purchase order's exchange rate.

    + */ @JsonSetter(value = "exchange_rate", nulls = Nulls.SKIP) public Builder exchangeRate(Optional exchangeRate) { this.exchangeRate = exchangeRate; @@ -1001,6 +1361,9 @@ public Builder exchangeRate(String exchangeRate) { return this; } + /** + *

    The payment term that applies to this transaction.

    + */ @JsonSetter(value = "payment_term", nulls = Nulls.SKIP) public Builder paymentTerm(Optional paymentTerm) { this.paymentTerm = paymentTerm; @@ -1023,6 +1386,9 @@ public Builder lineItems(List lineItems) { return this; } + /** + *

    If the transaction is inclusive or exclusive of tax. True if inclusive, False if exclusive.

    + */ @JsonSetter(value = "inclusive_of_tax", nulls = Nulls.SKIP) public Builder inclusiveOfTax(Optional inclusiveOfTax) { this.inclusiveOfTax = inclusiveOfTax; @@ -1046,6 +1412,9 @@ public Builder trackingCategories(ListThe accounting period that the PurchaseOrder was generated in.

    + */ @JsonSetter(value = "accounting_period", nulls = Nulls.SKIP) public Builder accountingPeriod(Optional accountingPeriod) { this.accountingPeriod = accountingPeriod; @@ -1057,6 +1426,9 @@ public Builder accountingPeriod(PurchaseOrderAccountingPeriod accountingPeriod) return this; } + /** + *

    When the third party's purchase order note was created.

    + */ @JsonSetter(value = "remote_created_at", nulls = Nulls.SKIP) public Builder remoteCreatedAt(Optional remoteCreatedAt) { this.remoteCreatedAt = remoteCreatedAt; @@ -1068,6 +1440,9 @@ public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { return this; } + /** + *

    When the third party's purchase order note was updated.

    + */ @JsonSetter(value = "remote_updated_at", nulls = Nulls.SKIP) public Builder remoteUpdatedAt(Optional remoteUpdatedAt) { this.remoteUpdatedAt = remoteUpdatedAt; @@ -1079,6 +1454,9 @@ public Builder remoteUpdatedAt(OffsetDateTime remoteUpdatedAt) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/accounting/types/PurchaseOrderCurrency.java b/src/main/java/com/merge/api/accounting/types/PurchaseOrderCurrency.java new file mode 100644 index 000000000..21914f031 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/PurchaseOrderCurrency.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = PurchaseOrderCurrency.Deserializer.class) +public final class PurchaseOrderCurrency { + private final Object value; + + private final int type; + + private PurchaseOrderCurrency(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((TransactionCurrencyEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PurchaseOrderCurrency && equalTo((PurchaseOrderCurrency) other); + } + + private boolean equalTo(PurchaseOrderCurrency other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static PurchaseOrderCurrency of(TransactionCurrencyEnum value) { + return new PurchaseOrderCurrency(value, 0); + } + + public static PurchaseOrderCurrency of(String value) { + return new PurchaseOrderCurrency(value, 1); + } + + public interface Visitor { + T visit(TransactionCurrencyEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(PurchaseOrderCurrency.class); + } + + @java.lang.Override + public PurchaseOrderCurrency deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TransactionCurrencyEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/PurchaseOrderEndpointRequest.java b/src/main/java/com/merge/api/accounting/types/PurchaseOrderEndpointRequest.java index 134a4082a..f6c870e2b 100644 --- a/src/main/java/com/merge/api/accounting/types/PurchaseOrderEndpointRequest.java +++ b/src/main/java/com/merge/api/accounting/types/PurchaseOrderEndpointRequest.java @@ -99,10 +99,16 @@ public interface ModelStage { public interface _FinalStage { PurchaseOrderEndpointRequest build(); + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ _FinalStage isDebugMode(Optional isDebugMode); _FinalStage isDebugMode(Boolean isDebugMode); + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ _FinalStage runAsync(Optional runAsync); _FinalStage runAsync(Boolean runAsync); @@ -146,6 +152,9 @@ public _FinalStage runAsync(Boolean runAsync) { return this; } + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ @java.lang.Override @JsonSetter(value = "run_async", nulls = Nulls.SKIP) public _FinalStage runAsync(Optional runAsync) { @@ -163,6 +172,9 @@ public _FinalStage isDebugMode(Boolean isDebugMode) { return this; } + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ @java.lang.Override @JsonSetter(value = "is_debug_mode", nulls = Nulls.SKIP) public _FinalStage isDebugMode(Optional isDebugMode) { diff --git a/src/main/java/com/merge/api/accounting/types/PurchaseOrderLineItem.java b/src/main/java/com/merge/api/accounting/types/PurchaseOrderLineItem.java index f84a1044c..8666d5d4c 100644 --- a/src/main/java/com/merge/api/accounting/types/PurchaseOrderLineItem.java +++ b/src/main/java/com/merge/api/accounting/types/PurchaseOrderLineItem.java @@ -48,7 +48,7 @@ public final class PurchaseOrderLineItem { private final Optional totalLineAmount; - private final Optional currency; + private final Optional currency; private final Optional taxRate; @@ -76,7 +76,7 @@ private PurchaseOrderLineItem( Optional>> trackingCategories, Optional taxAmount, Optional totalLineAmount, - Optional currency, + Optional currency, Optional taxRate, Optional exchangeRate, Optional company, @@ -515,7 +515,7 @@ public Optional getTotalLineAmount() { * */ @JsonProperty("currency") - public Optional getCurrency() { + public Optional getCurrency() { return currency; } @@ -650,7 +650,7 @@ public static final class Builder { private Optional totalLineAmount = Optional.empty(); - private Optional currency = Optional.empty(); + private Optional currency = Optional.empty(); private Optional taxRate = Optional.empty(); @@ -701,6 +701,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -712,6 +715,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -723,6 +729,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -734,6 +743,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    A description of the good being purchased.

    + */ @JsonSetter(value = "description", nulls = Nulls.SKIP) public Builder description(Optional description) { this.description = description; @@ -745,6 +757,9 @@ public Builder description(String description) { return this; } + /** + *

    The line item's unit price.

    + */ @JsonSetter(value = "unit_price", nulls = Nulls.SKIP) public Builder unitPrice(Optional unitPrice) { this.unitPrice = unitPrice; @@ -756,6 +771,9 @@ public Builder unitPrice(Double unitPrice) { return this; } + /** + *

    The line item's quantity.

    + */ @JsonSetter(value = "quantity", nulls = Nulls.SKIP) public Builder quantity(Optional quantity) { this.quantity = quantity; @@ -778,6 +796,9 @@ public Builder item(PurchaseOrderLineItemItem item) { return this; } + /** + *

    The purchase order line item's account.

    + */ @JsonSetter(value = "account", nulls = Nulls.SKIP) public Builder account(Optional account) { this.account = account; @@ -789,6 +810,9 @@ public Builder account(String account) { return this; } + /** + *

    The purchase order line item's associated tracking category.

    + */ @JsonSetter(value = "tracking_category", nulls = Nulls.SKIP) public Builder trackingCategory(Optional trackingCategory) { this.trackingCategory = trackingCategory; @@ -800,6 +824,9 @@ public Builder trackingCategory(String trackingCategory) { return this; } + /** + *

    The purchase order line item's associated tracking categories.

    + */ @JsonSetter(value = "tracking_categories", nulls = Nulls.SKIP) public Builder trackingCategories(Optional>> trackingCategories) { this.trackingCategories = trackingCategories; @@ -811,6 +838,9 @@ public Builder trackingCategories(List> trackingCategories) { return this; } + /** + *

    The purchase order line item's tax amount.

    + */ @JsonSetter(value = "tax_amount", nulls = Nulls.SKIP) public Builder taxAmount(Optional taxAmount) { this.taxAmount = taxAmount; @@ -822,6 +852,9 @@ public Builder taxAmount(String taxAmount) { return this; } + /** + *

    The purchase order line item's total amount.

    + */ @JsonSetter(value = "total_line_amount", nulls = Nulls.SKIP) public Builder totalLineAmount(Optional totalLineAmount) { this.totalLineAmount = totalLineAmount; @@ -833,17 +866,331 @@ public Builder totalLineAmount(String totalLineAmount) { return this; } + /** + *

    The purchase order line item's currency.

    + *
      + *
    • XUA - ADB Unit of Account
    • + *
    • AFN - Afghan Afghani
    • + *
    • AFA - Afghan Afghani (1927–2002)
    • + *
    • ALL - Albanian Lek
    • + *
    • ALK - Albanian Lek (1946–1965)
    • + *
    • DZD - Algerian Dinar
    • + *
    • ADP - Andorran Peseta
    • + *
    • AOA - Angolan Kwanza
    • + *
    • AOK - Angolan Kwanza (1977–1991)
    • + *
    • AON - Angolan New Kwanza (1990–2000)
    • + *
    • AOR - Angolan Readjusted Kwanza (1995–1999)
    • + *
    • ARA - Argentine Austral
    • + *
    • ARS - Argentine Peso
    • + *
    • ARM - Argentine Peso (1881–1970)
    • + *
    • ARP - Argentine Peso (1983–1985)
    • + *
    • ARL - Argentine Peso Ley (1970–1983)
    • + *
    • AMD - Armenian Dram
    • + *
    • AWG - Aruban Florin
    • + *
    • AUD - Australian Dollar
    • + *
    • ATS - Austrian Schilling
    • + *
    • AZN - Azerbaijani Manat
    • + *
    • AZM - Azerbaijani Manat (1993–2006)
    • + *
    • BSD - Bahamian Dollar
    • + *
    • BHD - Bahraini Dinar
    • + *
    • BDT - Bangladeshi Taka
    • + *
    • BBD - Barbadian Dollar
    • + *
    • BYN - Belarusian Ruble
    • + *
    • BYB - Belarusian Ruble (1994–1999)
    • + *
    • BYR - Belarusian Ruble (2000–2016)
    • + *
    • BEF - Belgian Franc
    • + *
    • BEC - Belgian Franc (convertible)
    • + *
    • BEL - Belgian Franc (financial)
    • + *
    • BZD - Belize Dollar
    • + *
    • BMD - Bermudan Dollar
    • + *
    • BTN - Bhutanese Ngultrum
    • + *
    • BOB - Bolivian Boliviano
    • + *
    • BOL - Bolivian Boliviano (1863–1963)
    • + *
    • BOV - Bolivian Mvdol
    • + *
    • BOP - Bolivian Peso
    • + *
    • BAM - Bosnia-Herzegovina Convertible Mark
    • + *
    • BAD - Bosnia-Herzegovina Dinar (1992–1994)
    • + *
    • BAN - Bosnia-Herzegovina New Dinar (1994–1997)
    • + *
    • BWP - Botswanan Pula
    • + *
    • BRC - Brazilian Cruzado (1986–1989)
    • + *
    • BRZ - Brazilian Cruzeiro (1942–1967)
    • + *
    • BRE - Brazilian Cruzeiro (1990–1993)
    • + *
    • BRR - Brazilian Cruzeiro (1993–1994)
    • + *
    • BRN - Brazilian New Cruzado (1989–1990)
    • + *
    • BRB - Brazilian New Cruzeiro (1967–1986)
    • + *
    • BRL - Brazilian Real
    • + *
    • GBP - British Pound
    • + *
    • BND - Brunei Dollar
    • + *
    • BGL - Bulgarian Hard Lev
    • + *
    • BGN - Bulgarian Lev
    • + *
    • BGO - Bulgarian Lev (1879–1952)
    • + *
    • BGM - Bulgarian Socialist Lev
    • + *
    • BUK - Burmese Kyat
    • + *
    • BIF - Burundian Franc
    • + *
    • XPF - CFP Franc
    • + *
    • KHR - Cambodian Riel
    • + *
    • CAD - Canadian Dollar
    • + *
    • CVE - Cape Verdean Escudo
    • + *
    • KYD - Cayman Islands Dollar
    • + *
    • XAF - Central African CFA Franc
    • + *
    • CLE - Chilean Escudo
    • + *
    • CLP - Chilean Peso
    • + *
    • CLF - Chilean Unit of Account (UF)
    • + *
    • CNX - Chinese People’s Bank Dollar
    • + *
    • CNY - Chinese Yuan
    • + *
    • CNH - Chinese Yuan (offshore)
    • + *
    • COP - Colombian Peso
    • + *
    • COU - Colombian Real Value Unit
    • + *
    • KMF - Comorian Franc
    • + *
    • CDF - Congolese Franc
    • + *
    • CRC - Costa Rican Colón
    • + *
    • HRD - Croatian Dinar
    • + *
    • HRK - Croatian Kuna
    • + *
    • CUC - Cuban Convertible Peso
    • + *
    • CUP - Cuban Peso
    • + *
    • CYP - Cypriot Pound
    • + *
    • CZK - Czech Koruna
    • + *
    • CSK - Czechoslovak Hard Koruna
    • + *
    • DKK - Danish Krone
    • + *
    • DJF - Djiboutian Franc
    • + *
    • DOP - Dominican Peso
    • + *
    • NLG - Dutch Guilder
    • + *
    • XCD - East Caribbean Dollar
    • + *
    • DDM - East German Mark
    • + *
    • ECS - Ecuadorian Sucre
    • + *
    • ECV - Ecuadorian Unit of Constant Value
    • + *
    • EGP - Egyptian Pound
    • + *
    • GQE - Equatorial Guinean Ekwele
    • + *
    • ERN - Eritrean Nakfa
    • + *
    • EEK - Estonian Kroon
    • + *
    • ETB - Ethiopian Birr
    • + *
    • EUR - Euro
    • + *
    • XBA - European Composite Unit
    • + *
    • XEU - European Currency Unit
    • + *
    • XBB - European Monetary Unit
    • + *
    • XBC - European Unit of Account (XBC)
    • + *
    • XBD - European Unit of Account (XBD)
    • + *
    • FKP - Falkland Islands Pound
    • + *
    • FJD - Fijian Dollar
    • + *
    • FIM - Finnish Markka
    • + *
    • FRF - French Franc
    • + *
    • XFO - French Gold Franc
    • + *
    • XFU - French UIC-Franc
    • + *
    • GMD - Gambian Dalasi
    • + *
    • GEK - Georgian Kupon Larit
    • + *
    • GEL - Georgian Lari
    • + *
    • DEM - German Mark
    • + *
    • GHS - Ghanaian Cedi
    • + *
    • GHC - Ghanaian Cedi (1979–2007)
    • + *
    • GIP - Gibraltar Pound
    • + *
    • XAU - Gold
    • + *
    • GRD - Greek Drachma
    • + *
    • GTQ - Guatemalan Quetzal
    • + *
    • GWP - Guinea-Bissau Peso
    • + *
    • GNF - Guinean Franc
    • + *
    • GNS - Guinean Syli
    • + *
    • GYD - Guyanaese Dollar
    • + *
    • HTG - Haitian Gourde
    • + *
    • HNL - Honduran Lempira
    • + *
    • HKD - Hong Kong Dollar
    • + *
    • HUF - Hungarian Forint
    • + *
    • IMP - IMP
    • + *
    • ISK - Icelandic Króna
    • + *
    • ISJ - Icelandic Króna (1918–1981)
    • + *
    • INR - Indian Rupee
    • + *
    • IDR - Indonesian Rupiah
    • + *
    • IRR - Iranian Rial
    • + *
    • IQD - Iraqi Dinar
    • + *
    • IEP - Irish Pound
    • + *
    • ILS - Israeli New Shekel
    • + *
    • ILP - Israeli Pound
    • + *
    • ILR - Israeli Shekel (1980–1985)
    • + *
    • ITL - Italian Lira
    • + *
    • JMD - Jamaican Dollar
    • + *
    • JPY - Japanese Yen
    • + *
    • JOD - Jordanian Dinar
    • + *
    • KZT - Kazakhstani Tenge
    • + *
    • KES - Kenyan Shilling
    • + *
    • KWD - Kuwaiti Dinar
    • + *
    • KGS - Kyrgystani Som
    • + *
    • LAK - Laotian Kip
    • + *
    • LVL - Latvian Lats
    • + *
    • LVR - Latvian Ruble
    • + *
    • LBP - Lebanese Pound
    • + *
    • LSL - Lesotho Loti
    • + *
    • LRD - Liberian Dollar
    • + *
    • LYD - Libyan Dinar
    • + *
    • LTL - Lithuanian Litas
    • + *
    • LTT - Lithuanian Talonas
    • + *
    • LUL - Luxembourg Financial Franc
    • + *
    • LUC - Luxembourgian Convertible Franc
    • + *
    • LUF - Luxembourgian Franc
    • + *
    • MOP - Macanese Pataca
    • + *
    • MKD - Macedonian Denar
    • + *
    • MKN - Macedonian Denar (1992–1993)
    • + *
    • MGA - Malagasy Ariary
    • + *
    • MGF - Malagasy Franc
    • + *
    • MWK - Malawian Kwacha
    • + *
    • MYR - Malaysian Ringgit
    • + *
    • MVR - Maldivian Rufiyaa
    • + *
    • MVP - Maldivian Rupee (1947–1981)
    • + *
    • MLF - Malian Franc
    • + *
    • MTL - Maltese Lira
    • + *
    • MTP - Maltese Pound
    • + *
    • MRU - Mauritanian Ouguiya
    • + *
    • MRO - Mauritanian Ouguiya (1973–2017)
    • + *
    • MUR - Mauritian Rupee
    • + *
    • MXV - Mexican Investment Unit
    • + *
    • MXN - Mexican Peso
    • + *
    • MXP - Mexican Silver Peso (1861–1992)
    • + *
    • MDC - Moldovan Cupon
    • + *
    • MDL - Moldovan Leu
    • + *
    • MCF - Monegasque Franc
    • + *
    • MNT - Mongolian Tugrik
    • + *
    • MAD - Moroccan Dirham
    • + *
    • MAF - Moroccan Franc
    • + *
    • MZE - Mozambican Escudo
    • + *
    • MZN - Mozambican Metical
    • + *
    • MZM - Mozambican Metical (1980–2006)
    • + *
    • MMK - Myanmar Kyat
    • + *
    • NAD - Namibian Dollar
    • + *
    • NPR - Nepalese Rupee
    • + *
    • ANG - Netherlands Antillean Guilder
    • + *
    • TWD - New Taiwan Dollar
    • + *
    • NZD - New Zealand Dollar
    • + *
    • NIO - Nicaraguan Córdoba
    • + *
    • NIC - Nicaraguan Córdoba (1988–1991)
    • + *
    • NGN - Nigerian Naira
    • + *
    • KPW - North Korean Won
    • + *
    • NOK - Norwegian Krone
    • + *
    • OMR - Omani Rial
    • + *
    • PKR - Pakistani Rupee
    • + *
    • XPD - Palladium
    • + *
    • PAB - Panamanian Balboa
    • + *
    • PGK - Papua New Guinean Kina
    • + *
    • PYG - Paraguayan Guarani
    • + *
    • PEI - Peruvian Inti
    • + *
    • PEN - Peruvian Sol
    • + *
    • PES - Peruvian Sol (1863–1965)
    • + *
    • PHP - Philippine Peso
    • + *
    • XPT - Platinum
    • + *
    • PLN - Polish Zloty
    • + *
    • PLZ - Polish Zloty (1950–1995)
    • + *
    • PTE - Portuguese Escudo
    • + *
    • GWE - Portuguese Guinea Escudo
    • + *
    • QAR - Qatari Rial
    • + *
    • XRE - RINET Funds
    • + *
    • RHD - Rhodesian Dollar
    • + *
    • RON - Romanian Leu
    • + *
    • ROL - Romanian Leu (1952–2006)
    • + *
    • RUB - Russian Ruble
    • + *
    • RUR - Russian Ruble (1991–1998)
    • + *
    • RWF - Rwandan Franc
    • + *
    • SVC - Salvadoran Colón
    • + *
    • WST - Samoan Tala
    • + *
    • SAR - Saudi Riyal
    • + *
    • RSD - Serbian Dinar
    • + *
    • CSD - Serbian Dinar (2002–2006)
    • + *
    • SCR - Seychellois Rupee
    • + *
    • SLL - Sierra Leonean Leone
    • + *
    • XAG - Silver
    • + *
    • SGD - Singapore Dollar
    • + *
    • SKK - Slovak Koruna
    • + *
    • SIT - Slovenian Tolar
    • + *
    • SBD - Solomon Islands Dollar
    • + *
    • SOS - Somali Shilling
    • + *
    • ZAR - South African Rand
    • + *
    • ZAL - South African Rand (financial)
    • + *
    • KRH - South Korean Hwan (1953–1962)
    • + *
    • KRW - South Korean Won
    • + *
    • KRO - South Korean Won (1945–1953)
    • + *
    • SSP - South Sudanese Pound
    • + *
    • SUR - Soviet Rouble
    • + *
    • ESP - Spanish Peseta
    • + *
    • ESA - Spanish Peseta (A account)
    • + *
    • ESB - Spanish Peseta (convertible account)
    • + *
    • XDR - Special Drawing Rights
    • + *
    • LKR - Sri Lankan Rupee
    • + *
    • SHP - St. Helena Pound
    • + *
    • XSU - Sucre
    • + *
    • SDD - Sudanese Dinar (1992–2007)
    • + *
    • SDG - Sudanese Pound
    • + *
    • SDP - Sudanese Pound (1957–1998)
    • + *
    • SRD - Surinamese Dollar
    • + *
    • SRG - Surinamese Guilder
    • + *
    • SZL - Swazi Lilangeni
    • + *
    • SEK - Swedish Krona
    • + *
    • CHF - Swiss Franc
    • + *
    • SYP - Syrian Pound
    • + *
    • STN - São Tomé & Príncipe Dobra
    • + *
    • STD - São Tomé & Príncipe Dobra (1977–2017)
    • + *
    • TVD - TVD
    • + *
    • TJR - Tajikistani Ruble
    • + *
    • TJS - Tajikistani Somoni
    • + *
    • TZS - Tanzanian Shilling
    • + *
    • XTS - Testing Currency Code
    • + *
    • THB - Thai Baht
    • + *
    • XXX - The codes assigned for transactions where no currency is involved
    • + *
    • TPE - Timorese Escudo
    • + *
    • TOP - Tongan Paʻanga
    • + *
    • TTD - Trinidad & Tobago Dollar
    • + *
    • TND - Tunisian Dinar
    • + *
    • TRY - Turkish Lira
    • + *
    • TRL - Turkish Lira (1922–2005)
    • + *
    • TMT - Turkmenistani Manat
    • + *
    • TMM - Turkmenistani Manat (1993–2009)
    • + *
    • USD - US Dollar
    • + *
    • USN - US Dollar (Next day)
    • + *
    • USS - US Dollar (Same day)
    • + *
    • UGX - Ugandan Shilling
    • + *
    • UGS - Ugandan Shilling (1966–1987)
    • + *
    • UAH - Ukrainian Hryvnia
    • + *
    • UAK - Ukrainian Karbovanets
    • + *
    • AED - United Arab Emirates Dirham
    • + *
    • UYW - Uruguayan Nominal Wage Index Unit
    • + *
    • UYU - Uruguayan Peso
    • + *
    • UYP - Uruguayan Peso (1975–1993)
    • + *
    • UYI - Uruguayan Peso (Indexed Units)
    • + *
    • UZS - Uzbekistani Som
    • + *
    • VUV - Vanuatu Vatu
    • + *
    • VES - Venezuelan Bolívar
    • + *
    • VEB - Venezuelan Bolívar (1871–2008)
    • + *
    • VEF - Venezuelan Bolívar (2008–2018)
    • + *
    • VND - Vietnamese Dong
    • + *
    • VNN - Vietnamese Dong (1978–1985)
    • + *
    • CHE - WIR Euro
    • + *
    • CHW - WIR Franc
    • + *
    • XOF - West African CFA Franc
    • + *
    • YDD - Yemeni Dinar
    • + *
    • YER - Yemeni Rial
    • + *
    • YUN - Yugoslavian Convertible Dinar (1990–1992)
    • + *
    • YUD - Yugoslavian Hard Dinar (1966–1990)
    • + *
    • YUM - Yugoslavian New Dinar (1994–2002)
    • + *
    • YUR - Yugoslavian Reformed Dinar (1992–1993)
    • + *
    • ZWN - ZWN
    • + *
    • ZRN - Zairean New Zaire (1993–1998)
    • + *
    • ZRZ - Zairean Zaire (1971–1993)
    • + *
    • ZMW - Zambian Kwacha
    • + *
    • ZMK - Zambian Kwacha (1968–2012)
    • + *
    • ZWD - Zimbabwean Dollar (1980–2008)
    • + *
    • ZWR - Zimbabwean Dollar (2008)
    • + *
    • ZWL - Zimbabwean Dollar (2009)
    • + *
    + */ @JsonSetter(value = "currency", nulls = Nulls.SKIP) - public Builder currency(Optional currency) { + public Builder currency(Optional currency) { this.currency = currency; return this; } - public Builder currency(TransactionCurrencyEnum currency) { + public Builder currency(PurchaseOrderLineItemCurrency currency) { this.currency = Optional.ofNullable(currency); return this; } + /** + *

    The tax rate that applies to this line item.

    + */ @JsonSetter(value = "tax_rate", nulls = Nulls.SKIP) public Builder taxRate(Optional taxRate) { this.taxRate = taxRate; @@ -855,6 +1202,9 @@ public Builder taxRate(String taxRate) { return this; } + /** + *

    The purchase order line item's exchange rate.

    + */ @JsonSetter(value = "exchange_rate", nulls = Nulls.SKIP) public Builder exchangeRate(Optional exchangeRate) { this.exchangeRate = exchangeRate; @@ -866,6 +1216,9 @@ public Builder exchangeRate(String exchangeRate) { return this; } + /** + *

    The company the purchase order line item belongs to.

    + */ @JsonSetter(value = "company", nulls = Nulls.SKIP) public Builder company(Optional company) { this.company = company; @@ -877,6 +1230,9 @@ public Builder company(String company) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/accounting/types/PurchaseOrderLineItemCurrency.java b/src/main/java/com/merge/api/accounting/types/PurchaseOrderLineItemCurrency.java new file mode 100644 index 000000000..7e8499cd7 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/PurchaseOrderLineItemCurrency.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = PurchaseOrderLineItemCurrency.Deserializer.class) +public final class PurchaseOrderLineItemCurrency { + private final Object value; + + private final int type; + + private PurchaseOrderLineItemCurrency(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((TransactionCurrencyEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PurchaseOrderLineItemCurrency && equalTo((PurchaseOrderLineItemCurrency) other); + } + + private boolean equalTo(PurchaseOrderLineItemCurrency other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static PurchaseOrderLineItemCurrency of(TransactionCurrencyEnum value) { + return new PurchaseOrderLineItemCurrency(value, 0); + } + + public static PurchaseOrderLineItemCurrency of(String value) { + return new PurchaseOrderLineItemCurrency(value, 1); + } + + public interface Visitor { + T visit(TransactionCurrencyEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(PurchaseOrderLineItemCurrency.class); + } + + @java.lang.Override + public PurchaseOrderLineItemCurrency deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TransactionCurrencyEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/PurchaseOrderLineItemRequest.java b/src/main/java/com/merge/api/accounting/types/PurchaseOrderLineItemRequest.java index 717a6e6ed..7e0d26746 100644 --- a/src/main/java/com/merge/api/accounting/types/PurchaseOrderLineItemRequest.java +++ b/src/main/java/com/merge/api/accounting/types/PurchaseOrderLineItemRequest.java @@ -42,7 +42,7 @@ public final class PurchaseOrderLineItemRequest { private final Optional totalLineAmount; - private final Optional currency; + private final Optional currency; private final Optional taxRate; @@ -69,7 +69,7 @@ private PurchaseOrderLineItemRequest( Optional>> trackingCategories, Optional taxAmount, Optional totalLineAmount, - Optional currency, + Optional currency, Optional taxRate, Optional exchangeRate, Optional company, @@ -486,7 +486,7 @@ public Optional getTotalLineAmount() { * */ @JsonProperty("currency") - public Optional getCurrency() { + public Optional getCurrency() { return currency; } @@ -613,7 +613,7 @@ public static final class Builder { private Optional totalLineAmount = Optional.empty(); - private Optional currency = Optional.empty(); + private Optional currency = Optional.empty(); private Optional taxRate = Optional.empty(); @@ -653,6 +653,9 @@ public Builder from(PurchaseOrderLineItemRequest other) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -664,6 +667,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    A description of the good being purchased.

    + */ @JsonSetter(value = "description", nulls = Nulls.SKIP) public Builder description(Optional description) { this.description = description; @@ -675,6 +681,9 @@ public Builder description(String description) { return this; } + /** + *

    The line item's unit price.

    + */ @JsonSetter(value = "unit_price", nulls = Nulls.SKIP) public Builder unitPrice(Optional unitPrice) { this.unitPrice = unitPrice; @@ -686,6 +695,9 @@ public Builder unitPrice(Double unitPrice) { return this; } + /** + *

    The line item's quantity.

    + */ @JsonSetter(value = "quantity", nulls = Nulls.SKIP) public Builder quantity(Optional quantity) { this.quantity = quantity; @@ -708,6 +720,9 @@ public Builder item(PurchaseOrderLineItemRequestItem item) { return this; } + /** + *

    The purchase order line item's account.

    + */ @JsonSetter(value = "account", nulls = Nulls.SKIP) public Builder account(Optional account) { this.account = account; @@ -719,6 +734,9 @@ public Builder account(String account) { return this; } + /** + *

    The purchase order line item's associated tracking category.

    + */ @JsonSetter(value = "tracking_category", nulls = Nulls.SKIP) public Builder trackingCategory(Optional trackingCategory) { this.trackingCategory = trackingCategory; @@ -730,6 +748,9 @@ public Builder trackingCategory(String trackingCategory) { return this; } + /** + *

    The purchase order line item's associated tracking categories.

    + */ @JsonSetter(value = "tracking_categories", nulls = Nulls.SKIP) public Builder trackingCategories(Optional>> trackingCategories) { this.trackingCategories = trackingCategories; @@ -741,6 +762,9 @@ public Builder trackingCategories(List> trackingCategories) { return this; } + /** + *

    The purchase order line item's tax amount.

    + */ @JsonSetter(value = "tax_amount", nulls = Nulls.SKIP) public Builder taxAmount(Optional taxAmount) { this.taxAmount = taxAmount; @@ -752,6 +776,9 @@ public Builder taxAmount(String taxAmount) { return this; } + /** + *

    The purchase order line item's total amount.

    + */ @JsonSetter(value = "total_line_amount", nulls = Nulls.SKIP) public Builder totalLineAmount(Optional totalLineAmount) { this.totalLineAmount = totalLineAmount; @@ -763,17 +790,331 @@ public Builder totalLineAmount(String totalLineAmount) { return this; } + /** + *

    The purchase order line item's currency.

    + *
      + *
    • XUA - ADB Unit of Account
    • + *
    • AFN - Afghan Afghani
    • + *
    • AFA - Afghan Afghani (1927–2002)
    • + *
    • ALL - Albanian Lek
    • + *
    • ALK - Albanian Lek (1946–1965)
    • + *
    • DZD - Algerian Dinar
    • + *
    • ADP - Andorran Peseta
    • + *
    • AOA - Angolan Kwanza
    • + *
    • AOK - Angolan Kwanza (1977–1991)
    • + *
    • AON - Angolan New Kwanza (1990–2000)
    • + *
    • AOR - Angolan Readjusted Kwanza (1995–1999)
    • + *
    • ARA - Argentine Austral
    • + *
    • ARS - Argentine Peso
    • + *
    • ARM - Argentine Peso (1881–1970)
    • + *
    • ARP - Argentine Peso (1983–1985)
    • + *
    • ARL - Argentine Peso Ley (1970–1983)
    • + *
    • AMD - Armenian Dram
    • + *
    • AWG - Aruban Florin
    • + *
    • AUD - Australian Dollar
    • + *
    • ATS - Austrian Schilling
    • + *
    • AZN - Azerbaijani Manat
    • + *
    • AZM - Azerbaijani Manat (1993–2006)
    • + *
    • BSD - Bahamian Dollar
    • + *
    • BHD - Bahraini Dinar
    • + *
    • BDT - Bangladeshi Taka
    • + *
    • BBD - Barbadian Dollar
    • + *
    • BYN - Belarusian Ruble
    • + *
    • BYB - Belarusian Ruble (1994–1999)
    • + *
    • BYR - Belarusian Ruble (2000–2016)
    • + *
    • BEF - Belgian Franc
    • + *
    • BEC - Belgian Franc (convertible)
    • + *
    • BEL - Belgian Franc (financial)
    • + *
    • BZD - Belize Dollar
    • + *
    • BMD - Bermudan Dollar
    • + *
    • BTN - Bhutanese Ngultrum
    • + *
    • BOB - Bolivian Boliviano
    • + *
    • BOL - Bolivian Boliviano (1863–1963)
    • + *
    • BOV - Bolivian Mvdol
    • + *
    • BOP - Bolivian Peso
    • + *
    • BAM - Bosnia-Herzegovina Convertible Mark
    • + *
    • BAD - Bosnia-Herzegovina Dinar (1992–1994)
    • + *
    • BAN - Bosnia-Herzegovina New Dinar (1994–1997)
    • + *
    • BWP - Botswanan Pula
    • + *
    • BRC - Brazilian Cruzado (1986–1989)
    • + *
    • BRZ - Brazilian Cruzeiro (1942–1967)
    • + *
    • BRE - Brazilian Cruzeiro (1990–1993)
    • + *
    • BRR - Brazilian Cruzeiro (1993–1994)
    • + *
    • BRN - Brazilian New Cruzado (1989–1990)
    • + *
    • BRB - Brazilian New Cruzeiro (1967–1986)
    • + *
    • BRL - Brazilian Real
    • + *
    • GBP - British Pound
    • + *
    • BND - Brunei Dollar
    • + *
    • BGL - Bulgarian Hard Lev
    • + *
    • BGN - Bulgarian Lev
    • + *
    • BGO - Bulgarian Lev (1879–1952)
    • + *
    • BGM - Bulgarian Socialist Lev
    • + *
    • BUK - Burmese Kyat
    • + *
    • BIF - Burundian Franc
    • + *
    • XPF - CFP Franc
    • + *
    • KHR - Cambodian Riel
    • + *
    • CAD - Canadian Dollar
    • + *
    • CVE - Cape Verdean Escudo
    • + *
    • KYD - Cayman Islands Dollar
    • + *
    • XAF - Central African CFA Franc
    • + *
    • CLE - Chilean Escudo
    • + *
    • CLP - Chilean Peso
    • + *
    • CLF - Chilean Unit of Account (UF)
    • + *
    • CNX - Chinese People’s Bank Dollar
    • + *
    • CNY - Chinese Yuan
    • + *
    • CNH - Chinese Yuan (offshore)
    • + *
    • COP - Colombian Peso
    • + *
    • COU - Colombian Real Value Unit
    • + *
    • KMF - Comorian Franc
    • + *
    • CDF - Congolese Franc
    • + *
    • CRC - Costa Rican Colón
    • + *
    • HRD - Croatian Dinar
    • + *
    • HRK - Croatian Kuna
    • + *
    • CUC - Cuban Convertible Peso
    • + *
    • CUP - Cuban Peso
    • + *
    • CYP - Cypriot Pound
    • + *
    • CZK - Czech Koruna
    • + *
    • CSK - Czechoslovak Hard Koruna
    • + *
    • DKK - Danish Krone
    • + *
    • DJF - Djiboutian Franc
    • + *
    • DOP - Dominican Peso
    • + *
    • NLG - Dutch Guilder
    • + *
    • XCD - East Caribbean Dollar
    • + *
    • DDM - East German Mark
    • + *
    • ECS - Ecuadorian Sucre
    • + *
    • ECV - Ecuadorian Unit of Constant Value
    • + *
    • EGP - Egyptian Pound
    • + *
    • GQE - Equatorial Guinean Ekwele
    • + *
    • ERN - Eritrean Nakfa
    • + *
    • EEK - Estonian Kroon
    • + *
    • ETB - Ethiopian Birr
    • + *
    • EUR - Euro
    • + *
    • XBA - European Composite Unit
    • + *
    • XEU - European Currency Unit
    • + *
    • XBB - European Monetary Unit
    • + *
    • XBC - European Unit of Account (XBC)
    • + *
    • XBD - European Unit of Account (XBD)
    • + *
    • FKP - Falkland Islands Pound
    • + *
    • FJD - Fijian Dollar
    • + *
    • FIM - Finnish Markka
    • + *
    • FRF - French Franc
    • + *
    • XFO - French Gold Franc
    • + *
    • XFU - French UIC-Franc
    • + *
    • GMD - Gambian Dalasi
    • + *
    • GEK - Georgian Kupon Larit
    • + *
    • GEL - Georgian Lari
    • + *
    • DEM - German Mark
    • + *
    • GHS - Ghanaian Cedi
    • + *
    • GHC - Ghanaian Cedi (1979–2007)
    • + *
    • GIP - Gibraltar Pound
    • + *
    • XAU - Gold
    • + *
    • GRD - Greek Drachma
    • + *
    • GTQ - Guatemalan Quetzal
    • + *
    • GWP - Guinea-Bissau Peso
    • + *
    • GNF - Guinean Franc
    • + *
    • GNS - Guinean Syli
    • + *
    • GYD - Guyanaese Dollar
    • + *
    • HTG - Haitian Gourde
    • + *
    • HNL - Honduran Lempira
    • + *
    • HKD - Hong Kong Dollar
    • + *
    • HUF - Hungarian Forint
    • + *
    • IMP - IMP
    • + *
    • ISK - Icelandic Króna
    • + *
    • ISJ - Icelandic Króna (1918–1981)
    • + *
    • INR - Indian Rupee
    • + *
    • IDR - Indonesian Rupiah
    • + *
    • IRR - Iranian Rial
    • + *
    • IQD - Iraqi Dinar
    • + *
    • IEP - Irish Pound
    • + *
    • ILS - Israeli New Shekel
    • + *
    • ILP - Israeli Pound
    • + *
    • ILR - Israeli Shekel (1980–1985)
    • + *
    • ITL - Italian Lira
    • + *
    • JMD - Jamaican Dollar
    • + *
    • JPY - Japanese Yen
    • + *
    • JOD - Jordanian Dinar
    • + *
    • KZT - Kazakhstani Tenge
    • + *
    • KES - Kenyan Shilling
    • + *
    • KWD - Kuwaiti Dinar
    • + *
    • KGS - Kyrgystani Som
    • + *
    • LAK - Laotian Kip
    • + *
    • LVL - Latvian Lats
    • + *
    • LVR - Latvian Ruble
    • + *
    • LBP - Lebanese Pound
    • + *
    • LSL - Lesotho Loti
    • + *
    • LRD - Liberian Dollar
    • + *
    • LYD - Libyan Dinar
    • + *
    • LTL - Lithuanian Litas
    • + *
    • LTT - Lithuanian Talonas
    • + *
    • LUL - Luxembourg Financial Franc
    • + *
    • LUC - Luxembourgian Convertible Franc
    • + *
    • LUF - Luxembourgian Franc
    • + *
    • MOP - Macanese Pataca
    • + *
    • MKD - Macedonian Denar
    • + *
    • MKN - Macedonian Denar (1992–1993)
    • + *
    • MGA - Malagasy Ariary
    • + *
    • MGF - Malagasy Franc
    • + *
    • MWK - Malawian Kwacha
    • + *
    • MYR - Malaysian Ringgit
    • + *
    • MVR - Maldivian Rufiyaa
    • + *
    • MVP - Maldivian Rupee (1947–1981)
    • + *
    • MLF - Malian Franc
    • + *
    • MTL - Maltese Lira
    • + *
    • MTP - Maltese Pound
    • + *
    • MRU - Mauritanian Ouguiya
    • + *
    • MRO - Mauritanian Ouguiya (1973–2017)
    • + *
    • MUR - Mauritian Rupee
    • + *
    • MXV - Mexican Investment Unit
    • + *
    • MXN - Mexican Peso
    • + *
    • MXP - Mexican Silver Peso (1861–1992)
    • + *
    • MDC - Moldovan Cupon
    • + *
    • MDL - Moldovan Leu
    • + *
    • MCF - Monegasque Franc
    • + *
    • MNT - Mongolian Tugrik
    • + *
    • MAD - Moroccan Dirham
    • + *
    • MAF - Moroccan Franc
    • + *
    • MZE - Mozambican Escudo
    • + *
    • MZN - Mozambican Metical
    • + *
    • MZM - Mozambican Metical (1980–2006)
    • + *
    • MMK - Myanmar Kyat
    • + *
    • NAD - Namibian Dollar
    • + *
    • NPR - Nepalese Rupee
    • + *
    • ANG - Netherlands Antillean Guilder
    • + *
    • TWD - New Taiwan Dollar
    • + *
    • NZD - New Zealand Dollar
    • + *
    • NIO - Nicaraguan Córdoba
    • + *
    • NIC - Nicaraguan Córdoba (1988–1991)
    • + *
    • NGN - Nigerian Naira
    • + *
    • KPW - North Korean Won
    • + *
    • NOK - Norwegian Krone
    • + *
    • OMR - Omani Rial
    • + *
    • PKR - Pakistani Rupee
    • + *
    • XPD - Palladium
    • + *
    • PAB - Panamanian Balboa
    • + *
    • PGK - Papua New Guinean Kina
    • + *
    • PYG - Paraguayan Guarani
    • + *
    • PEI - Peruvian Inti
    • + *
    • PEN - Peruvian Sol
    • + *
    • PES - Peruvian Sol (1863–1965)
    • + *
    • PHP - Philippine Peso
    • + *
    • XPT - Platinum
    • + *
    • PLN - Polish Zloty
    • + *
    • PLZ - Polish Zloty (1950–1995)
    • + *
    • PTE - Portuguese Escudo
    • + *
    • GWE - Portuguese Guinea Escudo
    • + *
    • QAR - Qatari Rial
    • + *
    • XRE - RINET Funds
    • + *
    • RHD - Rhodesian Dollar
    • + *
    • RON - Romanian Leu
    • + *
    • ROL - Romanian Leu (1952–2006)
    • + *
    • RUB - Russian Ruble
    • + *
    • RUR - Russian Ruble (1991–1998)
    • + *
    • RWF - Rwandan Franc
    • + *
    • SVC - Salvadoran Colón
    • + *
    • WST - Samoan Tala
    • + *
    • SAR - Saudi Riyal
    • + *
    • RSD - Serbian Dinar
    • + *
    • CSD - Serbian Dinar (2002–2006)
    • + *
    • SCR - Seychellois Rupee
    • + *
    • SLL - Sierra Leonean Leone
    • + *
    • XAG - Silver
    • + *
    • SGD - Singapore Dollar
    • + *
    • SKK - Slovak Koruna
    • + *
    • SIT - Slovenian Tolar
    • + *
    • SBD - Solomon Islands Dollar
    • + *
    • SOS - Somali Shilling
    • + *
    • ZAR - South African Rand
    • + *
    • ZAL - South African Rand (financial)
    • + *
    • KRH - South Korean Hwan (1953–1962)
    • + *
    • KRW - South Korean Won
    • + *
    • KRO - South Korean Won (1945–1953)
    • + *
    • SSP - South Sudanese Pound
    • + *
    • SUR - Soviet Rouble
    • + *
    • ESP - Spanish Peseta
    • + *
    • ESA - Spanish Peseta (A account)
    • + *
    • ESB - Spanish Peseta (convertible account)
    • + *
    • XDR - Special Drawing Rights
    • + *
    • LKR - Sri Lankan Rupee
    • + *
    • SHP - St. Helena Pound
    • + *
    • XSU - Sucre
    • + *
    • SDD - Sudanese Dinar (1992–2007)
    • + *
    • SDG - Sudanese Pound
    • + *
    • SDP - Sudanese Pound (1957–1998)
    • + *
    • SRD - Surinamese Dollar
    • + *
    • SRG - Surinamese Guilder
    • + *
    • SZL - Swazi Lilangeni
    • + *
    • SEK - Swedish Krona
    • + *
    • CHF - Swiss Franc
    • + *
    • SYP - Syrian Pound
    • + *
    • STN - São Tomé & Príncipe Dobra
    • + *
    • STD - São Tomé & Príncipe Dobra (1977–2017)
    • + *
    • TVD - TVD
    • + *
    • TJR - Tajikistani Ruble
    • + *
    • TJS - Tajikistani Somoni
    • + *
    • TZS - Tanzanian Shilling
    • + *
    • XTS - Testing Currency Code
    • + *
    • THB - Thai Baht
    • + *
    • XXX - The codes assigned for transactions where no currency is involved
    • + *
    • TPE - Timorese Escudo
    • + *
    • TOP - Tongan Paʻanga
    • + *
    • TTD - Trinidad & Tobago Dollar
    • + *
    • TND - Tunisian Dinar
    • + *
    • TRY - Turkish Lira
    • + *
    • TRL - Turkish Lira (1922–2005)
    • + *
    • TMT - Turkmenistani Manat
    • + *
    • TMM - Turkmenistani Manat (1993–2009)
    • + *
    • USD - US Dollar
    • + *
    • USN - US Dollar (Next day)
    • + *
    • USS - US Dollar (Same day)
    • + *
    • UGX - Ugandan Shilling
    • + *
    • UGS - Ugandan Shilling (1966–1987)
    • + *
    • UAH - Ukrainian Hryvnia
    • + *
    • UAK - Ukrainian Karbovanets
    • + *
    • AED - United Arab Emirates Dirham
    • + *
    • UYW - Uruguayan Nominal Wage Index Unit
    • + *
    • UYU - Uruguayan Peso
    • + *
    • UYP - Uruguayan Peso (1975–1993)
    • + *
    • UYI - Uruguayan Peso (Indexed Units)
    • + *
    • UZS - Uzbekistani Som
    • + *
    • VUV - Vanuatu Vatu
    • + *
    • VES - Venezuelan Bolívar
    • + *
    • VEB - Venezuelan Bolívar (1871–2008)
    • + *
    • VEF - Venezuelan Bolívar (2008–2018)
    • + *
    • VND - Vietnamese Dong
    • + *
    • VNN - Vietnamese Dong (1978–1985)
    • + *
    • CHE - WIR Euro
    • + *
    • CHW - WIR Franc
    • + *
    • XOF - West African CFA Franc
    • + *
    • YDD - Yemeni Dinar
    • + *
    • YER - Yemeni Rial
    • + *
    • YUN - Yugoslavian Convertible Dinar (1990–1992)
    • + *
    • YUD - Yugoslavian Hard Dinar (1966–1990)
    • + *
    • YUM - Yugoslavian New Dinar (1994–2002)
    • + *
    • YUR - Yugoslavian Reformed Dinar (1992–1993)
    • + *
    • ZWN - ZWN
    • + *
    • ZRN - Zairean New Zaire (1993–1998)
    • + *
    • ZRZ - Zairean Zaire (1971–1993)
    • + *
    • ZMW - Zambian Kwacha
    • + *
    • ZMK - Zambian Kwacha (1968–2012)
    • + *
    • ZWD - Zimbabwean Dollar (1980–2008)
    • + *
    • ZWR - Zimbabwean Dollar (2008)
    • + *
    • ZWL - Zimbabwean Dollar (2009)
    • + *
    + */ @JsonSetter(value = "currency", nulls = Nulls.SKIP) - public Builder currency(Optional currency) { + public Builder currency(Optional currency) { this.currency = currency; return this; } - public Builder currency(TransactionCurrencyEnum currency) { + public Builder currency(PurchaseOrderLineItemRequestCurrency currency) { this.currency = Optional.ofNullable(currency); return this; } + /** + *

    The tax rate that applies to this line item.

    + */ @JsonSetter(value = "tax_rate", nulls = Nulls.SKIP) public Builder taxRate(Optional taxRate) { this.taxRate = taxRate; @@ -785,6 +1126,9 @@ public Builder taxRate(String taxRate) { return this; } + /** + *

    The purchase order line item's exchange rate.

    + */ @JsonSetter(value = "exchange_rate", nulls = Nulls.SKIP) public Builder exchangeRate(Optional exchangeRate) { this.exchangeRate = exchangeRate; @@ -796,6 +1140,9 @@ public Builder exchangeRate(String exchangeRate) { return this; } + /** + *

    The company the purchase order line item belongs to.

    + */ @JsonSetter(value = "company", nulls = Nulls.SKIP) public Builder company(Optional company) { this.company = company; diff --git a/src/main/java/com/merge/api/accounting/types/PurchaseOrderLineItemRequestCurrency.java b/src/main/java/com/merge/api/accounting/types/PurchaseOrderLineItemRequestCurrency.java new file mode 100644 index 000000000..54d2be282 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/PurchaseOrderLineItemRequestCurrency.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = PurchaseOrderLineItemRequestCurrency.Deserializer.class) +public final class PurchaseOrderLineItemRequestCurrency { + private final Object value; + + private final int type; + + private PurchaseOrderLineItemRequestCurrency(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((TransactionCurrencyEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PurchaseOrderLineItemRequestCurrency + && equalTo((PurchaseOrderLineItemRequestCurrency) other); + } + + private boolean equalTo(PurchaseOrderLineItemRequestCurrency other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static PurchaseOrderLineItemRequestCurrency of(TransactionCurrencyEnum value) { + return new PurchaseOrderLineItemRequestCurrency(value, 0); + } + + public static PurchaseOrderLineItemRequestCurrency of(String value) { + return new PurchaseOrderLineItemRequestCurrency(value, 1); + } + + public interface Visitor { + T visit(TransactionCurrencyEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(PurchaseOrderLineItemRequestCurrency.class); + } + + @java.lang.Override + public PurchaseOrderLineItemRequestCurrency deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TransactionCurrencyEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/PurchaseOrderRequest.java b/src/main/java/com/merge/api/accounting/types/PurchaseOrderRequest.java index 81d8f992e..f0f9afb9b 100644 --- a/src/main/java/com/merge/api/accounting/types/PurchaseOrderRequest.java +++ b/src/main/java/com/merge/api/accounting/types/PurchaseOrderRequest.java @@ -23,7 +23,7 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PurchaseOrderRequest.Builder.class) public final class PurchaseOrderRequest { - private final Optional status; + private final Optional status; private final Optional issueDate; @@ -43,7 +43,7 @@ public final class PurchaseOrderRequest { private final Optional paymentTerm; - private final Optional currency; + private final Optional currency; private final Optional inclusiveOfTax; @@ -62,7 +62,7 @@ public final class PurchaseOrderRequest { private final Map additionalProperties; private PurchaseOrderRequest( - Optional status, + Optional status, Optional issueDate, Optional deliveryDate, Optional deliveryAddress, @@ -72,7 +72,7 @@ private PurchaseOrderRequest( Optional company, Optional totalAmount, Optional paymentTerm, - Optional currency, + Optional currency, Optional inclusiveOfTax, Optional exchangeRate, Optional>> trackingCategories, @@ -113,7 +113,7 @@ private PurchaseOrderRequest( * */ @JsonProperty("status") - public Optional getStatus() { + public Optional getStatus() { return status; } @@ -501,7 +501,7 @@ public Optional getPaymentTerm() { * */ @JsonProperty("currency") - public Optional getCurrency() { + public Optional getCurrency() { return currency; } @@ -612,7 +612,7 @@ public static Builder builder() { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder { - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Optional issueDate = Optional.empty(); @@ -632,7 +632,7 @@ public static final class Builder { private Optional paymentTerm = Optional.empty(); - private Optional currency = Optional.empty(); + private Optional currency = Optional.empty(); private Optional inclusiveOfTax = Optional.empty(); @@ -676,17 +676,30 @@ public Builder from(PurchaseOrderRequest other) { return this; } + /** + *

    The purchase order's status.

    + *
      + *
    • DRAFT - DRAFT
    • + *
    • SUBMITTED - SUBMITTED
    • + *
    • AUTHORIZED - AUTHORIZED
    • + *
    • BILLED - BILLED
    • + *
    • DELETED - DELETED
    • + *
    + */ @JsonSetter(value = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { + public Builder status(Optional status) { this.status = status; return this; } - public Builder status(PurchaseOrderStatusEnum status) { + public Builder status(PurchaseOrderRequestStatus status) { this.status = Optional.ofNullable(status); return this; } + /** + *

    The purchase order's issue date.

    + */ @JsonSetter(value = "issue_date", nulls = Nulls.SKIP) public Builder issueDate(Optional issueDate) { this.issueDate = issueDate; @@ -698,6 +711,9 @@ public Builder issueDate(OffsetDateTime issueDate) { return this; } + /** + *

    The purchase order's delivery date.

    + */ @JsonSetter(value = "delivery_date", nulls = Nulls.SKIP) public Builder deliveryDate(Optional deliveryDate) { this.deliveryDate = deliveryDate; @@ -709,6 +725,9 @@ public Builder deliveryDate(OffsetDateTime deliveryDate) { return this; } + /** + *

    The purchase order's delivery address.

    + */ @JsonSetter(value = "delivery_address", nulls = Nulls.SKIP) public Builder deliveryAddress(Optional deliveryAddress) { this.deliveryAddress = deliveryAddress; @@ -720,6 +739,9 @@ public Builder deliveryAddress(PurchaseOrderRequestDeliveryAddress deliveryAddre return this; } + /** + *

    The contact making the purchase order.

    + */ @JsonSetter(value = "customer", nulls = Nulls.SKIP) public Builder customer(Optional customer) { this.customer = customer; @@ -731,6 +753,9 @@ public Builder customer(String customer) { return this; } + /** + *

    The party fulfilling the purchase order.

    + */ @JsonSetter(value = "vendor", nulls = Nulls.SKIP) public Builder vendor(Optional vendor) { this.vendor = vendor; @@ -742,6 +767,9 @@ public Builder vendor(PurchaseOrderRequestVendor vendor) { return this; } + /** + *

    A memo attached to the purchase order.

    + */ @JsonSetter(value = "memo", nulls = Nulls.SKIP) public Builder memo(Optional memo) { this.memo = memo; @@ -753,6 +781,9 @@ public Builder memo(String memo) { return this; } + /** + *

    The company the purchase order belongs to.

    + */ @JsonSetter(value = "company", nulls = Nulls.SKIP) public Builder company(Optional company) { this.company = company; @@ -764,6 +795,9 @@ public Builder company(PurchaseOrderRequestCompany company) { return this; } + /** + *

    The purchase order's total amount.

    + */ @JsonSetter(value = "total_amount", nulls = Nulls.SKIP) public Builder totalAmount(Optional totalAmount) { this.totalAmount = totalAmount; @@ -775,6 +809,9 @@ public Builder totalAmount(Double totalAmount) { return this; } + /** + *

    The payment term that applies to this transaction.

    + */ @JsonSetter(value = "payment_term", nulls = Nulls.SKIP) public Builder paymentTerm(Optional paymentTerm) { this.paymentTerm = paymentTerm; @@ -786,17 +823,331 @@ public Builder paymentTerm(PurchaseOrderRequestPaymentTerm paymentTerm) { return this; } + /** + *

    The purchase order's currency.

    + *
      + *
    • XUA - ADB Unit of Account
    • + *
    • AFN - Afghan Afghani
    • + *
    • AFA - Afghan Afghani (1927–2002)
    • + *
    • ALL - Albanian Lek
    • + *
    • ALK - Albanian Lek (1946–1965)
    • + *
    • DZD - Algerian Dinar
    • + *
    • ADP - Andorran Peseta
    • + *
    • AOA - Angolan Kwanza
    • + *
    • AOK - Angolan Kwanza (1977–1991)
    • + *
    • AON - Angolan New Kwanza (1990–2000)
    • + *
    • AOR - Angolan Readjusted Kwanza (1995–1999)
    • + *
    • ARA - Argentine Austral
    • + *
    • ARS - Argentine Peso
    • + *
    • ARM - Argentine Peso (1881–1970)
    • + *
    • ARP - Argentine Peso (1983–1985)
    • + *
    • ARL - Argentine Peso Ley (1970–1983)
    • + *
    • AMD - Armenian Dram
    • + *
    • AWG - Aruban Florin
    • + *
    • AUD - Australian Dollar
    • + *
    • ATS - Austrian Schilling
    • + *
    • AZN - Azerbaijani Manat
    • + *
    • AZM - Azerbaijani Manat (1993–2006)
    • + *
    • BSD - Bahamian Dollar
    • + *
    • BHD - Bahraini Dinar
    • + *
    • BDT - Bangladeshi Taka
    • + *
    • BBD - Barbadian Dollar
    • + *
    • BYN - Belarusian Ruble
    • + *
    • BYB - Belarusian Ruble (1994–1999)
    • + *
    • BYR - Belarusian Ruble (2000–2016)
    • + *
    • BEF - Belgian Franc
    • + *
    • BEC - Belgian Franc (convertible)
    • + *
    • BEL - Belgian Franc (financial)
    • + *
    • BZD - Belize Dollar
    • + *
    • BMD - Bermudan Dollar
    • + *
    • BTN - Bhutanese Ngultrum
    • + *
    • BOB - Bolivian Boliviano
    • + *
    • BOL - Bolivian Boliviano (1863–1963)
    • + *
    • BOV - Bolivian Mvdol
    • + *
    • BOP - Bolivian Peso
    • + *
    • BAM - Bosnia-Herzegovina Convertible Mark
    • + *
    • BAD - Bosnia-Herzegovina Dinar (1992–1994)
    • + *
    • BAN - Bosnia-Herzegovina New Dinar (1994–1997)
    • + *
    • BWP - Botswanan Pula
    • + *
    • BRC - Brazilian Cruzado (1986–1989)
    • + *
    • BRZ - Brazilian Cruzeiro (1942–1967)
    • + *
    • BRE - Brazilian Cruzeiro (1990–1993)
    • + *
    • BRR - Brazilian Cruzeiro (1993–1994)
    • + *
    • BRN - Brazilian New Cruzado (1989–1990)
    • + *
    • BRB - Brazilian New Cruzeiro (1967–1986)
    • + *
    • BRL - Brazilian Real
    • + *
    • GBP - British Pound
    • + *
    • BND - Brunei Dollar
    • + *
    • BGL - Bulgarian Hard Lev
    • + *
    • BGN - Bulgarian Lev
    • + *
    • BGO - Bulgarian Lev (1879–1952)
    • + *
    • BGM - Bulgarian Socialist Lev
    • + *
    • BUK - Burmese Kyat
    • + *
    • BIF - Burundian Franc
    • + *
    • XPF - CFP Franc
    • + *
    • KHR - Cambodian Riel
    • + *
    • CAD - Canadian Dollar
    • + *
    • CVE - Cape Verdean Escudo
    • + *
    • KYD - Cayman Islands Dollar
    • + *
    • XAF - Central African CFA Franc
    • + *
    • CLE - Chilean Escudo
    • + *
    • CLP - Chilean Peso
    • + *
    • CLF - Chilean Unit of Account (UF)
    • + *
    • CNX - Chinese People’s Bank Dollar
    • + *
    • CNY - Chinese Yuan
    • + *
    • CNH - Chinese Yuan (offshore)
    • + *
    • COP - Colombian Peso
    • + *
    • COU - Colombian Real Value Unit
    • + *
    • KMF - Comorian Franc
    • + *
    • CDF - Congolese Franc
    • + *
    • CRC - Costa Rican Colón
    • + *
    • HRD - Croatian Dinar
    • + *
    • HRK - Croatian Kuna
    • + *
    • CUC - Cuban Convertible Peso
    • + *
    • CUP - Cuban Peso
    • + *
    • CYP - Cypriot Pound
    • + *
    • CZK - Czech Koruna
    • + *
    • CSK - Czechoslovak Hard Koruna
    • + *
    • DKK - Danish Krone
    • + *
    • DJF - Djiboutian Franc
    • + *
    • DOP - Dominican Peso
    • + *
    • NLG - Dutch Guilder
    • + *
    • XCD - East Caribbean Dollar
    • + *
    • DDM - East German Mark
    • + *
    • ECS - Ecuadorian Sucre
    • + *
    • ECV - Ecuadorian Unit of Constant Value
    • + *
    • EGP - Egyptian Pound
    • + *
    • GQE - Equatorial Guinean Ekwele
    • + *
    • ERN - Eritrean Nakfa
    • + *
    • EEK - Estonian Kroon
    • + *
    • ETB - Ethiopian Birr
    • + *
    • EUR - Euro
    • + *
    • XBA - European Composite Unit
    • + *
    • XEU - European Currency Unit
    • + *
    • XBB - European Monetary Unit
    • + *
    • XBC - European Unit of Account (XBC)
    • + *
    • XBD - European Unit of Account (XBD)
    • + *
    • FKP - Falkland Islands Pound
    • + *
    • FJD - Fijian Dollar
    • + *
    • FIM - Finnish Markka
    • + *
    • FRF - French Franc
    • + *
    • XFO - French Gold Franc
    • + *
    • XFU - French UIC-Franc
    • + *
    • GMD - Gambian Dalasi
    • + *
    • GEK - Georgian Kupon Larit
    • + *
    • GEL - Georgian Lari
    • + *
    • DEM - German Mark
    • + *
    • GHS - Ghanaian Cedi
    • + *
    • GHC - Ghanaian Cedi (1979–2007)
    • + *
    • GIP - Gibraltar Pound
    • + *
    • XAU - Gold
    • + *
    • GRD - Greek Drachma
    • + *
    • GTQ - Guatemalan Quetzal
    • + *
    • GWP - Guinea-Bissau Peso
    • + *
    • GNF - Guinean Franc
    • + *
    • GNS - Guinean Syli
    • + *
    • GYD - Guyanaese Dollar
    • + *
    • HTG - Haitian Gourde
    • + *
    • HNL - Honduran Lempira
    • + *
    • HKD - Hong Kong Dollar
    • + *
    • HUF - Hungarian Forint
    • + *
    • IMP - IMP
    • + *
    • ISK - Icelandic Króna
    • + *
    • ISJ - Icelandic Króna (1918–1981)
    • + *
    • INR - Indian Rupee
    • + *
    • IDR - Indonesian Rupiah
    • + *
    • IRR - Iranian Rial
    • + *
    • IQD - Iraqi Dinar
    • + *
    • IEP - Irish Pound
    • + *
    • ILS - Israeli New Shekel
    • + *
    • ILP - Israeli Pound
    • + *
    • ILR - Israeli Shekel (1980–1985)
    • + *
    • ITL - Italian Lira
    • + *
    • JMD - Jamaican Dollar
    • + *
    • JPY - Japanese Yen
    • + *
    • JOD - Jordanian Dinar
    • + *
    • KZT - Kazakhstani Tenge
    • + *
    • KES - Kenyan Shilling
    • + *
    • KWD - Kuwaiti Dinar
    • + *
    • KGS - Kyrgystani Som
    • + *
    • LAK - Laotian Kip
    • + *
    • LVL - Latvian Lats
    • + *
    • LVR - Latvian Ruble
    • + *
    • LBP - Lebanese Pound
    • + *
    • LSL - Lesotho Loti
    • + *
    • LRD - Liberian Dollar
    • + *
    • LYD - Libyan Dinar
    • + *
    • LTL - Lithuanian Litas
    • + *
    • LTT - Lithuanian Talonas
    • + *
    • LUL - Luxembourg Financial Franc
    • + *
    • LUC - Luxembourgian Convertible Franc
    • + *
    • LUF - Luxembourgian Franc
    • + *
    • MOP - Macanese Pataca
    • + *
    • MKD - Macedonian Denar
    • + *
    • MKN - Macedonian Denar (1992–1993)
    • + *
    • MGA - Malagasy Ariary
    • + *
    • MGF - Malagasy Franc
    • + *
    • MWK - Malawian Kwacha
    • + *
    • MYR - Malaysian Ringgit
    • + *
    • MVR - Maldivian Rufiyaa
    • + *
    • MVP - Maldivian Rupee (1947–1981)
    • + *
    • MLF - Malian Franc
    • + *
    • MTL - Maltese Lira
    • + *
    • MTP - Maltese Pound
    • + *
    • MRU - Mauritanian Ouguiya
    • + *
    • MRO - Mauritanian Ouguiya (1973–2017)
    • + *
    • MUR - Mauritian Rupee
    • + *
    • MXV - Mexican Investment Unit
    • + *
    • MXN - Mexican Peso
    • + *
    • MXP - Mexican Silver Peso (1861–1992)
    • + *
    • MDC - Moldovan Cupon
    • + *
    • MDL - Moldovan Leu
    • + *
    • MCF - Monegasque Franc
    • + *
    • MNT - Mongolian Tugrik
    • + *
    • MAD - Moroccan Dirham
    • + *
    • MAF - Moroccan Franc
    • + *
    • MZE - Mozambican Escudo
    • + *
    • MZN - Mozambican Metical
    • + *
    • MZM - Mozambican Metical (1980–2006)
    • + *
    • MMK - Myanmar Kyat
    • + *
    • NAD - Namibian Dollar
    • + *
    • NPR - Nepalese Rupee
    • + *
    • ANG - Netherlands Antillean Guilder
    • + *
    • TWD - New Taiwan Dollar
    • + *
    • NZD - New Zealand Dollar
    • + *
    • NIO - Nicaraguan Córdoba
    • + *
    • NIC - Nicaraguan Córdoba (1988–1991)
    • + *
    • NGN - Nigerian Naira
    • + *
    • KPW - North Korean Won
    • + *
    • NOK - Norwegian Krone
    • + *
    • OMR - Omani Rial
    • + *
    • PKR - Pakistani Rupee
    • + *
    • XPD - Palladium
    • + *
    • PAB - Panamanian Balboa
    • + *
    • PGK - Papua New Guinean Kina
    • + *
    • PYG - Paraguayan Guarani
    • + *
    • PEI - Peruvian Inti
    • + *
    • PEN - Peruvian Sol
    • + *
    • PES - Peruvian Sol (1863–1965)
    • + *
    • PHP - Philippine Peso
    • + *
    • XPT - Platinum
    • + *
    • PLN - Polish Zloty
    • + *
    • PLZ - Polish Zloty (1950–1995)
    • + *
    • PTE - Portuguese Escudo
    • + *
    • GWE - Portuguese Guinea Escudo
    • + *
    • QAR - Qatari Rial
    • + *
    • XRE - RINET Funds
    • + *
    • RHD - Rhodesian Dollar
    • + *
    • RON - Romanian Leu
    • + *
    • ROL - Romanian Leu (1952–2006)
    • + *
    • RUB - Russian Ruble
    • + *
    • RUR - Russian Ruble (1991–1998)
    • + *
    • RWF - Rwandan Franc
    • + *
    • SVC - Salvadoran Colón
    • + *
    • WST - Samoan Tala
    • + *
    • SAR - Saudi Riyal
    • + *
    • RSD - Serbian Dinar
    • + *
    • CSD - Serbian Dinar (2002–2006)
    • + *
    • SCR - Seychellois Rupee
    • + *
    • SLL - Sierra Leonean Leone
    • + *
    • XAG - Silver
    • + *
    • SGD - Singapore Dollar
    • + *
    • SKK - Slovak Koruna
    • + *
    • SIT - Slovenian Tolar
    • + *
    • SBD - Solomon Islands Dollar
    • + *
    • SOS - Somali Shilling
    • + *
    • ZAR - South African Rand
    • + *
    • ZAL - South African Rand (financial)
    • + *
    • KRH - South Korean Hwan (1953–1962)
    • + *
    • KRW - South Korean Won
    • + *
    • KRO - South Korean Won (1945–1953)
    • + *
    • SSP - South Sudanese Pound
    • + *
    • SUR - Soviet Rouble
    • + *
    • ESP - Spanish Peseta
    • + *
    • ESA - Spanish Peseta (A account)
    • + *
    • ESB - Spanish Peseta (convertible account)
    • + *
    • XDR - Special Drawing Rights
    • + *
    • LKR - Sri Lankan Rupee
    • + *
    • SHP - St. Helena Pound
    • + *
    • XSU - Sucre
    • + *
    • SDD - Sudanese Dinar (1992–2007)
    • + *
    • SDG - Sudanese Pound
    • + *
    • SDP - Sudanese Pound (1957–1998)
    • + *
    • SRD - Surinamese Dollar
    • + *
    • SRG - Surinamese Guilder
    • + *
    • SZL - Swazi Lilangeni
    • + *
    • SEK - Swedish Krona
    • + *
    • CHF - Swiss Franc
    • + *
    • SYP - Syrian Pound
    • + *
    • STN - São Tomé & Príncipe Dobra
    • + *
    • STD - São Tomé & Príncipe Dobra (1977–2017)
    • + *
    • TVD - TVD
    • + *
    • TJR - Tajikistani Ruble
    • + *
    • TJS - Tajikistani Somoni
    • + *
    • TZS - Tanzanian Shilling
    • + *
    • XTS - Testing Currency Code
    • + *
    • THB - Thai Baht
    • + *
    • XXX - The codes assigned for transactions where no currency is involved
    • + *
    • TPE - Timorese Escudo
    • + *
    • TOP - Tongan Paʻanga
    • + *
    • TTD - Trinidad & Tobago Dollar
    • + *
    • TND - Tunisian Dinar
    • + *
    • TRY - Turkish Lira
    • + *
    • TRL - Turkish Lira (1922–2005)
    • + *
    • TMT - Turkmenistani Manat
    • + *
    • TMM - Turkmenistani Manat (1993–2009)
    • + *
    • USD - US Dollar
    • + *
    • USN - US Dollar (Next day)
    • + *
    • USS - US Dollar (Same day)
    • + *
    • UGX - Ugandan Shilling
    • + *
    • UGS - Ugandan Shilling (1966–1987)
    • + *
    • UAH - Ukrainian Hryvnia
    • + *
    • UAK - Ukrainian Karbovanets
    • + *
    • AED - United Arab Emirates Dirham
    • + *
    • UYW - Uruguayan Nominal Wage Index Unit
    • + *
    • UYU - Uruguayan Peso
    • + *
    • UYP - Uruguayan Peso (1975–1993)
    • + *
    • UYI - Uruguayan Peso (Indexed Units)
    • + *
    • UZS - Uzbekistani Som
    • + *
    • VUV - Vanuatu Vatu
    • + *
    • VES - Venezuelan Bolívar
    • + *
    • VEB - Venezuelan Bolívar (1871–2008)
    • + *
    • VEF - Venezuelan Bolívar (2008–2018)
    • + *
    • VND - Vietnamese Dong
    • + *
    • VNN - Vietnamese Dong (1978–1985)
    • + *
    • CHE - WIR Euro
    • + *
    • CHW - WIR Franc
    • + *
    • XOF - West African CFA Franc
    • + *
    • YDD - Yemeni Dinar
    • + *
    • YER - Yemeni Rial
    • + *
    • YUN - Yugoslavian Convertible Dinar (1990–1992)
    • + *
    • YUD - Yugoslavian Hard Dinar (1966–1990)
    • + *
    • YUM - Yugoslavian New Dinar (1994–2002)
    • + *
    • YUR - Yugoslavian Reformed Dinar (1992–1993)
    • + *
    • ZWN - ZWN
    • + *
    • ZRN - Zairean New Zaire (1993–1998)
    • + *
    • ZRZ - Zairean Zaire (1971–1993)
    • + *
    • ZMW - Zambian Kwacha
    • + *
    • ZMK - Zambian Kwacha (1968–2012)
    • + *
    • ZWD - Zimbabwean Dollar (1980–2008)
    • + *
    • ZWR - Zimbabwean Dollar (2008)
    • + *
    • ZWL - Zimbabwean Dollar (2009)
    • + *
    + */ @JsonSetter(value = "currency", nulls = Nulls.SKIP) - public Builder currency(Optional currency) { + public Builder currency(Optional currency) { this.currency = currency; return this; } - public Builder currency(TransactionCurrencyEnum currency) { + public Builder currency(PurchaseOrderRequestCurrency currency) { this.currency = Optional.ofNullable(currency); return this; } + /** + *

    If the transaction is inclusive or exclusive of tax. True if inclusive, False if exclusive.

    + */ @JsonSetter(value = "inclusive_of_tax", nulls = Nulls.SKIP) public Builder inclusiveOfTax(Optional inclusiveOfTax) { this.inclusiveOfTax = inclusiveOfTax; @@ -808,6 +1159,9 @@ public Builder inclusiveOfTax(Boolean inclusiveOfTax) { return this; } + /** + *

    The purchase order's exchange rate.

    + */ @JsonSetter(value = "exchange_rate", nulls = Nulls.SKIP) public Builder exchangeRate(Optional exchangeRate) { this.exchangeRate = exchangeRate; diff --git a/src/main/java/com/merge/api/accounting/types/PurchaseOrderRequestCurrency.java b/src/main/java/com/merge/api/accounting/types/PurchaseOrderRequestCurrency.java new file mode 100644 index 000000000..eb12088d5 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/PurchaseOrderRequestCurrency.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = PurchaseOrderRequestCurrency.Deserializer.class) +public final class PurchaseOrderRequestCurrency { + private final Object value; + + private final int type; + + private PurchaseOrderRequestCurrency(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((TransactionCurrencyEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PurchaseOrderRequestCurrency && equalTo((PurchaseOrderRequestCurrency) other); + } + + private boolean equalTo(PurchaseOrderRequestCurrency other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static PurchaseOrderRequestCurrency of(TransactionCurrencyEnum value) { + return new PurchaseOrderRequestCurrency(value, 0); + } + + public static PurchaseOrderRequestCurrency of(String value) { + return new PurchaseOrderRequestCurrency(value, 1); + } + + public interface Visitor { + T visit(TransactionCurrencyEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(PurchaseOrderRequestCurrency.class); + } + + @java.lang.Override + public PurchaseOrderRequestCurrency deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TransactionCurrencyEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/PurchaseOrderRequestStatus.java b/src/main/java/com/merge/api/accounting/types/PurchaseOrderRequestStatus.java new file mode 100644 index 000000000..6dde6699a --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/PurchaseOrderRequestStatus.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = PurchaseOrderRequestStatus.Deserializer.class) +public final class PurchaseOrderRequestStatus { + private final Object value; + + private final int type; + + private PurchaseOrderRequestStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((PurchaseOrderStatusEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PurchaseOrderRequestStatus && equalTo((PurchaseOrderRequestStatus) other); + } + + private boolean equalTo(PurchaseOrderRequestStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static PurchaseOrderRequestStatus of(PurchaseOrderStatusEnum value) { + return new PurchaseOrderRequestStatus(value, 0); + } + + public static PurchaseOrderRequestStatus of(String value) { + return new PurchaseOrderRequestStatus(value, 1); + } + + public interface Visitor { + T visit(PurchaseOrderStatusEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(PurchaseOrderRequestStatus.class); + } + + @java.lang.Override + public PurchaseOrderRequestStatus deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, PurchaseOrderStatusEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/PurchaseOrderStatus.java b/src/main/java/com/merge/api/accounting/types/PurchaseOrderStatus.java new file mode 100644 index 000000000..b8b529ca0 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/PurchaseOrderStatus.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = PurchaseOrderStatus.Deserializer.class) +public final class PurchaseOrderStatus { + private final Object value; + + private final int type; + + private PurchaseOrderStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((PurchaseOrderStatusEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PurchaseOrderStatus && equalTo((PurchaseOrderStatus) other); + } + + private boolean equalTo(PurchaseOrderStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static PurchaseOrderStatus of(PurchaseOrderStatusEnum value) { + return new PurchaseOrderStatus(value, 0); + } + + public static PurchaseOrderStatus of(String value) { + return new PurchaseOrderStatus(value, 1); + } + + public interface Visitor { + T visit(PurchaseOrderStatusEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(PurchaseOrderStatus.class); + } + + @java.lang.Override + public PurchaseOrderStatus deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, PurchaseOrderStatusEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/PurchaseOrdersLineItemsRemoteFieldClassesListRequest.java b/src/main/java/com/merge/api/accounting/types/PurchaseOrdersLineItemsRemoteFieldClassesListRequest.java index 0af110314..0ab86e22b 100644 --- a/src/main/java/com/merge/api/accounting/types/PurchaseOrdersLineItemsRemoteFieldClassesListRequest.java +++ b/src/main/java/com/merge/api/accounting/types/PurchaseOrdersLineItemsRemoteFieldClassesListRequest.java @@ -30,6 +30,8 @@ public final class PurchaseOrdersLineItemsRemoteFieldClassesListRequest { private final Optional isCommonModelField; + private final Optional isCustom; + private final Optional pageSize; private final Map additionalProperties; @@ -40,6 +42,7 @@ private PurchaseOrdersLineItemsRemoteFieldClassesListRequest( Optional includeRemoteData, Optional includeShellData, Optional isCommonModelField, + Optional isCustom, Optional pageSize, Map additionalProperties) { this.cursor = cursor; @@ -47,6 +50,7 @@ private PurchaseOrdersLineItemsRemoteFieldClassesListRequest( this.includeRemoteData = includeRemoteData; this.includeShellData = includeShellData; this.isCommonModelField = isCommonModelField; + this.isCustom = isCustom; this.pageSize = pageSize; this.additionalProperties = additionalProperties; } @@ -91,6 +95,14 @@ public Optional getIsCommonModelField() { return isCommonModelField; } + /** + * @return If provided, will only return remote fields classes with this is_custom value + */ + @JsonProperty("is_custom") + public Optional getIsCustom() { + return isCustom; + } + /** * @return Number of results to return per page. */ @@ -117,6 +129,7 @@ private boolean equalTo(PurchaseOrdersLineItemsRemoteFieldClassesListRequest oth && includeRemoteData.equals(other.includeRemoteData) && includeShellData.equals(other.includeShellData) && isCommonModelField.equals(other.isCommonModelField) + && isCustom.equals(other.isCustom) && pageSize.equals(other.pageSize); } @@ -128,6 +141,7 @@ public int hashCode() { this.includeRemoteData, this.includeShellData, this.isCommonModelField, + this.isCustom, this.pageSize); } @@ -152,6 +166,8 @@ public static final class Builder { private Optional isCommonModelField = Optional.empty(); + private Optional isCustom = Optional.empty(); + private Optional pageSize = Optional.empty(); @JsonAnySetter @@ -165,10 +181,14 @@ public Builder from(PurchaseOrdersLineItemsRemoteFieldClassesListRequest other) includeRemoteData(other.getIncludeRemoteData()); includeShellData(other.getIncludeShellData()); isCommonModelField(other.getIsCommonModelField()); + isCustom(other.getIsCustom()); pageSize(other.getPageSize()); return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -180,6 +200,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -191,6 +214,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -202,6 +228,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -213,6 +242,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, will only return remote field classes with this is_common_model_field value

    + */ @JsonSetter(value = "is_common_model_field", nulls = Nulls.SKIP) public Builder isCommonModelField(Optional isCommonModelField) { this.isCommonModelField = isCommonModelField; @@ -224,6 +256,23 @@ public Builder isCommonModelField(Boolean isCommonModelField) { return this; } + /** + *

    If provided, will only return remote fields classes with this is_custom value

    + */ + @JsonSetter(value = "is_custom", nulls = Nulls.SKIP) + public Builder isCustom(Optional isCustom) { + this.isCustom = isCustom; + return this; + } + + public Builder isCustom(Boolean isCustom) { + this.isCustom = Optional.ofNullable(isCustom); + return this; + } + + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -242,6 +291,7 @@ public PurchaseOrdersLineItemsRemoteFieldClassesListRequest build() { includeRemoteData, includeShellData, isCommonModelField, + isCustom, pageSize, additionalProperties); } diff --git a/src/main/java/com/merge/api/accounting/types/PurchaseOrdersListRequest.java b/src/main/java/com/merge/api/accounting/types/PurchaseOrdersListRequest.java index cdfb1e703..85f19b254 100644 --- a/src/main/java/com/merge/api/accounting/types/PurchaseOrdersListRequest.java +++ b/src/main/java/com/merge/api/accounting/types/PurchaseOrdersListRequest.java @@ -358,6 +358,9 @@ public Builder from(PurchaseOrdersListRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -374,6 +377,9 @@ public Builder expand(PurchaseOrdersListRequestExpandItem expand) { return this; } + /** + *

    If provided, will only return purchase orders for this company.

    + */ @JsonSetter(value = "company_id", nulls = Nulls.SKIP) public Builder companyId(Optional companyId) { this.companyId = companyId; @@ -385,6 +391,9 @@ public Builder companyId(String companyId) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -396,6 +405,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -407,6 +419,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -418,6 +433,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -429,6 +447,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -440,6 +461,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

    + */ @JsonSetter(value = "include_remote_fields", nulls = Nulls.SKIP) public Builder includeRemoteFields(Optional includeRemoteFields) { this.includeRemoteFields = includeRemoteFields; @@ -451,6 +475,9 @@ public Builder includeRemoteFields(Boolean includeRemoteFields) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -462,6 +489,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "issue_date_after", nulls = Nulls.SKIP) public Builder issueDateAfter(Optional issueDateAfter) { this.issueDateAfter = issueDateAfter; @@ -473,6 +503,9 @@ public Builder issueDateAfter(OffsetDateTime issueDateAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "issue_date_before", nulls = Nulls.SKIP) public Builder issueDateBefore(Optional issueDateBefore) { this.issueDateBefore = issueDateBefore; @@ -484,6 +517,9 @@ public Builder issueDateBefore(OffsetDateTime issueDateBefore) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -495,6 +531,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -506,6 +545,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -517,6 +559,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    Deprecated. Use show_enum_origins.

    + */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -528,6 +573,9 @@ public Builder remoteFields(String remoteFields) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -539,6 +587,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    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

    + */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; diff --git a/src/main/java/com/merge/api/accounting/types/PurchaseOrdersRemoteFieldClassesListRequest.java b/src/main/java/com/merge/api/accounting/types/PurchaseOrdersRemoteFieldClassesListRequest.java index edd220dfb..b97aa8c73 100644 --- a/src/main/java/com/merge/api/accounting/types/PurchaseOrdersRemoteFieldClassesListRequest.java +++ b/src/main/java/com/merge/api/accounting/types/PurchaseOrdersRemoteFieldClassesListRequest.java @@ -30,6 +30,8 @@ public final class PurchaseOrdersRemoteFieldClassesListRequest { private final Optional isCommonModelField; + private final Optional isCustom; + private final Optional pageSize; private final Map additionalProperties; @@ -40,6 +42,7 @@ private PurchaseOrdersRemoteFieldClassesListRequest( Optional includeRemoteData, Optional includeShellData, Optional isCommonModelField, + Optional isCustom, Optional pageSize, Map additionalProperties) { this.cursor = cursor; @@ -47,6 +50,7 @@ private PurchaseOrdersRemoteFieldClassesListRequest( this.includeRemoteData = includeRemoteData; this.includeShellData = includeShellData; this.isCommonModelField = isCommonModelField; + this.isCustom = isCustom; this.pageSize = pageSize; this.additionalProperties = additionalProperties; } @@ -91,6 +95,14 @@ public Optional getIsCommonModelField() { return isCommonModelField; } + /** + * @return If provided, will only return remote fields classes with this is_custom value + */ + @JsonProperty("is_custom") + public Optional getIsCustom() { + return isCustom; + } + /** * @return Number of results to return per page. */ @@ -117,6 +129,7 @@ private boolean equalTo(PurchaseOrdersRemoteFieldClassesListRequest other) { && includeRemoteData.equals(other.includeRemoteData) && includeShellData.equals(other.includeShellData) && isCommonModelField.equals(other.isCommonModelField) + && isCustom.equals(other.isCustom) && pageSize.equals(other.pageSize); } @@ -128,6 +141,7 @@ public int hashCode() { this.includeRemoteData, this.includeShellData, this.isCommonModelField, + this.isCustom, this.pageSize); } @@ -152,6 +166,8 @@ public static final class Builder { private Optional isCommonModelField = Optional.empty(); + private Optional isCustom = Optional.empty(); + private Optional pageSize = Optional.empty(); @JsonAnySetter @@ -165,10 +181,14 @@ public Builder from(PurchaseOrdersRemoteFieldClassesListRequest other) { includeRemoteData(other.getIncludeRemoteData()); includeShellData(other.getIncludeShellData()); isCommonModelField(other.getIsCommonModelField()); + isCustom(other.getIsCustom()); pageSize(other.getPageSize()); return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -180,6 +200,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -191,6 +214,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -202,6 +228,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -213,6 +242,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, will only return remote field classes with this is_common_model_field value

    + */ @JsonSetter(value = "is_common_model_field", nulls = Nulls.SKIP) public Builder isCommonModelField(Optional isCommonModelField) { this.isCommonModelField = isCommonModelField; @@ -224,6 +256,23 @@ public Builder isCommonModelField(Boolean isCommonModelField) { return this; } + /** + *

    If provided, will only return remote fields classes with this is_custom value

    + */ + @JsonSetter(value = "is_custom", nulls = Nulls.SKIP) + public Builder isCustom(Optional isCustom) { + this.isCustom = isCustom; + return this; + } + + public Builder isCustom(Boolean isCustom) { + this.isCustom = Optional.ofNullable(isCustom); + return this; + } + + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -242,6 +291,7 @@ public PurchaseOrdersRemoteFieldClassesListRequest build() { includeRemoteData, includeShellData, isCommonModelField, + isCustom, pageSize, additionalProperties); } diff --git a/src/main/java/com/merge/api/accounting/types/PurchaseOrdersRetrieveRequest.java b/src/main/java/com/merge/api/accounting/types/PurchaseOrdersRetrieveRequest.java index 8735e1cfc..8ad2a16f6 100644 --- a/src/main/java/com/merge/api/accounting/types/PurchaseOrdersRetrieveRequest.java +++ b/src/main/java/com/merge/api/accounting/types/PurchaseOrdersRetrieveRequest.java @@ -170,6 +170,9 @@ public Builder from(PurchaseOrdersRetrieveRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -186,6 +189,9 @@ public Builder expand(PurchaseOrdersRetrieveRequestExpandItem expand) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -197,6 +203,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

    + */ @JsonSetter(value = "include_remote_fields", nulls = Nulls.SKIP) public Builder includeRemoteFields(Optional includeRemoteFields) { this.includeRemoteFields = includeRemoteFields; @@ -208,6 +217,9 @@ public Builder includeRemoteFields(Boolean includeRemoteFields) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -219,6 +231,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    Deprecated. Use show_enum_origins.

    + */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -230,6 +245,9 @@ public Builder remoteFields(String remoteFields) { return this; } + /** + *

    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

    + */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; diff --git a/src/main/java/com/merge/api/accounting/types/RemoteData.java b/src/main/java/com/merge/api/accounting/types/RemoteData.java index 80c8aaca1..676fcbf50 100644 --- a/src/main/java/com/merge/api/accounting/types/RemoteData.java +++ b/src/main/java/com/merge/api/accounting/types/RemoteData.java @@ -77,6 +77,9 @@ public static PathStage builder() { } public interface PathStage { + /** + * The third-party API path that is being called. + */ _FinalStage path(@NotNull String path); Builder from(RemoteData other); @@ -109,7 +112,7 @@ public Builder from(RemoteData other) { } /** - *

    The third-party API path that is being called.

    + * The third-party API path that is being called.

    The third-party API path that is being called.

    * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override diff --git a/src/main/java/com/merge/api/accounting/types/RemoteFieldApiResponse.java b/src/main/java/com/merge/api/accounting/types/RemoteFieldApiResponse.java index 9743e6ba2..24f9d365a 100644 --- a/src/main/java/com/merge/api/accounting/types/RemoteFieldApiResponse.java +++ b/src/main/java/com/merge/api/accounting/types/RemoteFieldApiResponse.java @@ -67,6 +67,8 @@ public final class RemoteFieldApiResponse { private final Optional> paymentMethod; + private final Optional> project; + private final Optional> paymentTerm; private final Map additionalProperties; @@ -95,6 +97,7 @@ private RemoteFieldApiResponse( Optional> bankFeedAccount, Optional> employee, Optional> paymentMethod, + Optional> project, Optional> paymentTerm, Map additionalProperties) { this.account = account; @@ -120,6 +123,7 @@ private RemoteFieldApiResponse( this.bankFeedAccount = bankFeedAccount; this.employee = employee; this.paymentMethod = paymentMethod; + this.project = project; this.paymentTerm = paymentTerm; this.additionalProperties = additionalProperties; } @@ -239,6 +243,11 @@ public Optional> getPaymentMethod() { return paymentMethod; } + @JsonProperty("Project") + public Optional> getProject() { + return project; + } + @JsonProperty("PaymentTerm") public Optional> getPaymentTerm() { return paymentTerm; @@ -279,6 +288,7 @@ private boolean equalTo(RemoteFieldApiResponse other) { && bankFeedAccount.equals(other.bankFeedAccount) && employee.equals(other.employee) && paymentMethod.equals(other.paymentMethod) + && project.equals(other.project) && paymentTerm.equals(other.paymentTerm); } @@ -308,6 +318,7 @@ public int hashCode() { this.bankFeedAccount, this.employee, this.paymentMethod, + this.project, this.paymentTerm); } @@ -368,6 +379,8 @@ public static final class Builder { private Optional> paymentMethod = Optional.empty(); + private Optional> project = Optional.empty(); + private Optional> paymentTerm = Optional.empty(); @JsonAnySetter @@ -399,6 +412,7 @@ public Builder from(RemoteFieldApiResponse other) { bankFeedAccount(other.getBankFeedAccount()); employee(other.getEmployee()); paymentMethod(other.getPaymentMethod()); + project(other.getProject()); paymentTerm(other.getPaymentTerm()); return this; } @@ -656,6 +670,17 @@ public Builder paymentMethod(List paymentMethod) { return this; } + @JsonSetter(value = "Project", nulls = Nulls.SKIP) + public Builder project(Optional> project) { + this.project = project; + return this; + } + + public Builder project(List project) { + this.project = Optional.ofNullable(project); + return this; + } + @JsonSetter(value = "PaymentTerm", nulls = Nulls.SKIP) public Builder paymentTerm(Optional> paymentTerm) { this.paymentTerm = paymentTerm; @@ -692,6 +717,7 @@ public RemoteFieldApiResponse build() { bankFeedAccount, employee, paymentMethod, + project, paymentTerm, additionalProperties); } diff --git a/src/main/java/com/merge/api/accounting/types/RemoteFieldsRetrieveRequest.java b/src/main/java/com/merge/api/accounting/types/RemoteFieldsRetrieveRequest.java index d5ccbfdee..3b0e7f9b5 100644 --- a/src/main/java/com/merge/api/accounting/types/RemoteFieldsRetrieveRequest.java +++ b/src/main/java/com/merge/api/accounting/types/RemoteFieldsRetrieveRequest.java @@ -97,6 +97,9 @@ public Builder from(RemoteFieldsRetrieveRequest other) { return this; } + /** + *

    A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models.

    + */ @JsonSetter(value = "common_models", nulls = Nulls.SKIP) public Builder commonModels(Optional commonModels) { this.commonModels = commonModels; @@ -108,6 +111,9 @@ public Builder commonModels(String commonModels) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_example_values", nulls = Nulls.SKIP) public Builder includeExampleValues(Optional includeExampleValues) { this.includeExampleValues = includeExampleValues; diff --git a/src/main/java/com/merge/api/accounting/types/RemoteKeyForRegenerationRequest.java b/src/main/java/com/merge/api/accounting/types/RemoteKeyForRegenerationRequest.java index 2e9c0d510..ab18303d4 100644 --- a/src/main/java/com/merge/api/accounting/types/RemoteKeyForRegenerationRequest.java +++ b/src/main/java/com/merge/api/accounting/types/RemoteKeyForRegenerationRequest.java @@ -66,6 +66,9 @@ public static NameStage builder() { } public interface NameStage { + /** + * The name of the remote key + */ _FinalStage name(@NotNull String name); Builder from(RemoteKeyForRegenerationRequest other); @@ -91,7 +94,7 @@ public Builder from(RemoteKeyForRegenerationRequest other) { } /** - *

    The name of the remote key

    + * The name of the remote key

    The name of the remote key

    * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override diff --git a/src/main/java/com/merge/api/accounting/types/ReportItem.java b/src/main/java/com/merge/api/accounting/types/ReportItem.java index 8d9373165..2bb3861b5 100644 --- a/src/main/java/com/merge/api/accounting/types/ReportItem.java +++ b/src/main/java/com/merge/api/accounting/types/ReportItem.java @@ -202,6 +202,9 @@ public Builder from(ReportItem other) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -213,6 +216,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -224,6 +230,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -235,6 +244,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The report item's name.

    + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -246,6 +258,9 @@ public Builder name(String name) { return this; } + /** + *

    The report item's value.

    + */ @JsonSetter(value = "value", nulls = Nulls.SKIP) public Builder value(Optional value) { this.value = value; @@ -268,6 +283,9 @@ public Builder subItems(List> subItems) { return this; } + /** + *

    The company the report item belongs to.

    + */ @JsonSetter(value = "company", nulls = Nulls.SKIP) public Builder company(Optional company) { this.company = company; @@ -279,6 +297,9 @@ public Builder company(String company) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/accounting/types/SyncStatus.java b/src/main/java/com/merge/api/accounting/types/SyncStatus.java index c5ab47c7d..e00be46f2 100644 --- a/src/main/java/com/merge/api/accounting/types/SyncStatus.java +++ b/src/main/java/com/merge/api/accounting/types/SyncStatus.java @@ -30,11 +30,11 @@ public final class SyncStatus { private final Optional nextSyncStart; - private final Optional lastSyncResult; + private final Optional lastSyncResult; private final Optional lastSyncFinished; - private final StatusFd5Enum status; + private final SyncStatusStatus status; private final boolean isInitialSync; @@ -47,9 +47,9 @@ private SyncStatus( String modelId, Optional lastSyncStart, Optional nextSyncStart, - Optional lastSyncResult, + Optional lastSyncResult, Optional lastSyncFinished, - StatusFd5Enum status, + SyncStatusStatus status, boolean isInitialSync, Optional selectiveSyncConfigurationsUsage, Map additionalProperties) { @@ -86,7 +86,7 @@ public Optional getNextSyncStart() { } @JsonProperty("last_sync_result") - public Optional getLastSyncResult() { + public Optional getLastSyncResult() { return lastSyncResult; } @@ -96,7 +96,7 @@ public Optional getLastSyncFinished() { } @JsonProperty("status") - public StatusFd5Enum getStatus() { + public SyncStatusStatus getStatus() { return status; } @@ -167,7 +167,7 @@ public interface ModelIdStage { } public interface StatusStage { - IsInitialSyncStage status(@NotNull StatusFd5Enum status); + IsInitialSyncStage status(@NotNull SyncStatusStatus status); } public interface IsInitialSyncStage { @@ -185,9 +185,9 @@ public interface _FinalStage { _FinalStage nextSyncStart(OffsetDateTime nextSyncStart); - _FinalStage lastSyncResult(Optional lastSyncResult); + _FinalStage lastSyncResult(Optional lastSyncResult); - _FinalStage lastSyncResult(LastSyncResultEnum lastSyncResult); + _FinalStage lastSyncResult(SyncStatusLastSyncResult lastSyncResult); _FinalStage lastSyncFinished(Optional lastSyncFinished); @@ -207,7 +207,7 @@ public static final class Builder private String modelId; - private StatusFd5Enum status; + private SyncStatusStatus status; private boolean isInitialSync; @@ -215,7 +215,7 @@ public static final class Builder private Optional lastSyncFinished = Optional.empty(); - private Optional lastSyncResult = Optional.empty(); + private Optional lastSyncResult = Optional.empty(); private Optional nextSyncStart = Optional.empty(); @@ -256,7 +256,7 @@ public StatusStage modelId(@NotNull String modelId) { @java.lang.Override @JsonSetter("status") - public IsInitialSyncStage status(@NotNull StatusFd5Enum status) { + public IsInitialSyncStage status(@NotNull SyncStatusStatus status) { this.status = status; return this; } @@ -297,14 +297,14 @@ public _FinalStage lastSyncFinished(Optional lastSyncFinished) { } @java.lang.Override - public _FinalStage lastSyncResult(LastSyncResultEnum lastSyncResult) { + public _FinalStage lastSyncResult(SyncStatusLastSyncResult lastSyncResult) { this.lastSyncResult = Optional.ofNullable(lastSyncResult); return this; } @java.lang.Override @JsonSetter(value = "last_sync_result", nulls = Nulls.SKIP) - public _FinalStage lastSyncResult(Optional lastSyncResult) { + public _FinalStage lastSyncResult(Optional lastSyncResult) { this.lastSyncResult = lastSyncResult; return this; } diff --git a/src/main/java/com/merge/api/accounting/types/SyncStatusLastSyncResult.java b/src/main/java/com/merge/api/accounting/types/SyncStatusLastSyncResult.java new file mode 100644 index 000000000..edef918c0 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/SyncStatusLastSyncResult.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = SyncStatusLastSyncResult.Deserializer.class) +public final class SyncStatusLastSyncResult { + private final Object value; + + private final int type; + + private SyncStatusLastSyncResult(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((LastSyncResultEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SyncStatusLastSyncResult && equalTo((SyncStatusLastSyncResult) other); + } + + private boolean equalTo(SyncStatusLastSyncResult other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static SyncStatusLastSyncResult of(LastSyncResultEnum value) { + return new SyncStatusLastSyncResult(value, 0); + } + + public static SyncStatusLastSyncResult of(String value) { + return new SyncStatusLastSyncResult(value, 1); + } + + public interface Visitor { + T visit(LastSyncResultEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(SyncStatusLastSyncResult.class); + } + + @java.lang.Override + public SyncStatusLastSyncResult deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, LastSyncResultEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/SyncStatusListRequest.java b/src/main/java/com/merge/api/accounting/types/SyncStatusListRequest.java index 1975f081a..e95623702 100644 --- a/src/main/java/com/merge/api/accounting/types/SyncStatusListRequest.java +++ b/src/main/java/com/merge/api/accounting/types/SyncStatusListRequest.java @@ -95,6 +95,9 @@ public Builder from(SyncStatusListRequest other) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -106,6 +109,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; diff --git a/src/main/java/com/merge/api/accounting/types/SyncStatusStatus.java b/src/main/java/com/merge/api/accounting/types/SyncStatusStatus.java new file mode 100644 index 000000000..ae309161f --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/SyncStatusStatus.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = SyncStatusStatus.Deserializer.class) +public final class SyncStatusStatus { + private final Object value; + + private final int type; + + private SyncStatusStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((StatusFd5Enum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SyncStatusStatus && equalTo((SyncStatusStatus) other); + } + + private boolean equalTo(SyncStatusStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static SyncStatusStatus of(StatusFd5Enum value) { + return new SyncStatusStatus(value, 0); + } + + public static SyncStatusStatus of(String value) { + return new SyncStatusStatus(value, 1); + } + + public interface Visitor { + T visit(StatusFd5Enum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(SyncStatusStatus.class); + } + + @java.lang.Override + public SyncStatusStatus deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, StatusFd5Enum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/TaxComponent.java b/src/main/java/com/merge/api/accounting/types/TaxComponent.java index 6ebec07fc..c5acb10a0 100644 --- a/src/main/java/com/merge/api/accounting/types/TaxComponent.java +++ b/src/main/java/com/merge/api/accounting/types/TaxComponent.java @@ -35,7 +35,7 @@ public final class TaxComponent { private final Optional isCompound; - private final Optional componentType; + private final Optional componentType; private final Optional remoteWasDeleted; @@ -49,7 +49,7 @@ private TaxComponent( Optional name, Optional rate, Optional isCompound, - Optional componentType, + Optional componentType, Optional remoteWasDeleted, Map additionalProperties) { this.id = id; @@ -125,7 +125,7 @@ public Optional getIsCompound() { * */ @JsonProperty("component_type") - public Optional getComponentType() { + public Optional getComponentType() { return componentType; } @@ -199,7 +199,7 @@ public static final class Builder { private Optional isCompound = Optional.empty(); - private Optional componentType = Optional.empty(); + private Optional componentType = Optional.empty(); private Optional remoteWasDeleted = Optional.empty(); @@ -232,6 +232,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -243,6 +246,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -254,6 +260,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -265,6 +274,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The tax rate’s name.

    + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -276,6 +288,9 @@ public Builder name(String name) { return this; } + /** + *

    The tax component’s rate.

    + */ @JsonSetter(value = "rate", nulls = Nulls.SKIP) public Builder rate(Optional rate) { this.rate = rate; @@ -287,6 +302,9 @@ public Builder rate(String rate) { return this; } + /** + *

    Returns True if the tax component is compound, False if not.

    + */ @JsonSetter(value = "is_compound", nulls = Nulls.SKIP) public Builder isCompound(Optional isCompound) { this.isCompound = isCompound; @@ -298,17 +316,27 @@ public Builder isCompound(Boolean isCompound) { return this; } + /** + *

    Returns PURCHASE if the tax component corresponds to a purchase tax or SALES if the tax component corresponds to a sales tax.

    + *
      + *
    • SALES - SALES
    • + *
    • PURCHASE - PURCHASE
    • + *
    + */ @JsonSetter(value = "component_type", nulls = Nulls.SKIP) - public Builder componentType(Optional componentType) { + public Builder componentType(Optional componentType) { this.componentType = componentType; return this; } - public Builder componentType(ComponentTypeEnum componentType) { + public Builder componentType(TaxComponentComponentType componentType) { this.componentType = Optional.ofNullable(componentType); return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/accounting/types/TaxComponentComponentType.java b/src/main/java/com/merge/api/accounting/types/TaxComponentComponentType.java new file mode 100644 index 000000000..f5e5859f3 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/TaxComponentComponentType.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = TaxComponentComponentType.Deserializer.class) +public final class TaxComponentComponentType { + private final Object value; + + private final int type; + + private TaxComponentComponentType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((ComponentTypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof TaxComponentComponentType && equalTo((TaxComponentComponentType) other); + } + + private boolean equalTo(TaxComponentComponentType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static TaxComponentComponentType of(ComponentTypeEnum value) { + return new TaxComponentComponentType(value, 0); + } + + public static TaxComponentComponentType of(String value) { + return new TaxComponentComponentType(value, 1); + } + + public interface Visitor { + T visit(ComponentTypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(TaxComponentComponentType.class); + } + + @java.lang.Override + public TaxComponentComponentType deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, ComponentTypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/TaxRate.java b/src/main/java/com/merge/api/accounting/types/TaxRate.java index e36a65bfc..f40bc1482 100644 --- a/src/main/java/com/merge/api/accounting/types/TaxRate.java +++ b/src/main/java/com/merge/api/accounting/types/TaxRate.java @@ -39,7 +39,7 @@ public final class TaxRate { private final Optional description; - private final Optional status; + private final Optional status; private final Optional country; @@ -66,7 +66,7 @@ private TaxRate( Optional code, Optional name, Optional description, - Optional status, + Optional status, Optional country, Optional totalTaxRate, Optional effectiveTaxRate, @@ -163,7 +163,7 @@ public Optional getDescription() { * */ @JsonProperty("status") - public Optional getStatus() { + public Optional getStatus() { return status; } @@ -295,7 +295,7 @@ public static final class Builder { private Optional description = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Optional country = Optional.empty(); @@ -347,6 +347,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -358,6 +361,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -369,6 +375,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -380,6 +389,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The subsidiary that the tax rate belongs to (in the case of multi-entity systems).

    + */ @JsonSetter(value = "company", nulls = Nulls.SKIP) public Builder company(Optional company) { this.company = company; @@ -391,6 +403,9 @@ public Builder company(TaxRateCompany company) { return this; } + /** + *

    The tax code associated with this tax rate or group of tax rates from the third-party platform.

    + */ @JsonSetter(value = "code", nulls = Nulls.SKIP) public Builder code(Optional code) { this.code = code; @@ -402,6 +417,9 @@ public Builder code(String code) { return this; } + /** + *

    The tax rate’s name.

    + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -413,6 +431,9 @@ public Builder name(String name) { return this; } + /** + *

    The tax rate's description.

    + */ @JsonSetter(value = "description", nulls = Nulls.SKIP) public Builder description(Optional description) { this.description = description; @@ -424,17 +445,27 @@ public Builder description(String description) { return this; } + /** + *

    The tax rate’s status - ACTIVE if an active tax rate, ARCHIVED if not active.

    + *
      + *
    • ACTIVE - ACTIVE
    • + *
    • ARCHIVED - ARCHIVED
    • + *
    + */ @JsonSetter(value = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { + public Builder status(Optional status) { this.status = status; return this; } - public Builder status(Status7D1Enum status) { + public Builder status(TaxRateStatus status) { this.status = Optional.ofNullable(status); return this; } + /** + *

    The country the tax rate is associated with.

    + */ @JsonSetter(value = "country", nulls = Nulls.SKIP) public Builder country(Optional country) { this.country = country; @@ -446,6 +477,9 @@ public Builder country(String country) { return this; } + /** + *

    The tax’s total tax rate - sum of the tax components (not compounded).

    + */ @JsonSetter(value = "total_tax_rate", nulls = Nulls.SKIP) public Builder totalTaxRate(Optional totalTaxRate) { this.totalTaxRate = totalTaxRate; @@ -457,6 +491,9 @@ public Builder totalTaxRate(Double totalTaxRate) { return this; } + /** + *

    The tax rate’s effective tax rate - total amount of tax with compounding.

    + */ @JsonSetter(value = "effective_tax_rate", nulls = Nulls.SKIP) public Builder effectiveTaxRate(Optional effectiveTaxRate) { this.effectiveTaxRate = effectiveTaxRate; @@ -468,6 +505,9 @@ public Builder effectiveTaxRate(Double effectiveTaxRate) { return this; } + /** + *

    The related tax components of the tax rate.

    + */ @JsonSetter(value = "tax_components", nulls = Nulls.SKIP) public Builder taxComponents(Optional> taxComponents) { this.taxComponents = taxComponents; @@ -479,6 +519,9 @@ public Builder taxComponents(List taxComponents) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/accounting/types/TaxRateStatus.java b/src/main/java/com/merge/api/accounting/types/TaxRateStatus.java new file mode 100644 index 000000000..353bc0869 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/TaxRateStatus.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = TaxRateStatus.Deserializer.class) +public final class TaxRateStatus { + private final Object value; + + private final int type; + + private TaxRateStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((Status7D1Enum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof TaxRateStatus && equalTo((TaxRateStatus) other); + } + + private boolean equalTo(TaxRateStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static TaxRateStatus of(Status7D1Enum value) { + return new TaxRateStatus(value, 0); + } + + public static TaxRateStatus of(String value) { + return new TaxRateStatus(value, 1); + } + + public interface Visitor { + T visit(Status7D1Enum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(TaxRateStatus.class); + } + + @java.lang.Override + public TaxRateStatus deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, Status7D1Enum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/TaxRatesListRequest.java b/src/main/java/com/merge/api/accounting/types/TaxRatesListRequest.java index 4cac573f2..8a2a3f07c 100644 --- a/src/main/java/com/merge/api/accounting/types/TaxRatesListRequest.java +++ b/src/main/java/com/merge/api/accounting/types/TaxRatesListRequest.java @@ -290,6 +290,9 @@ public Builder from(TaxRatesListRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -306,6 +309,9 @@ public Builder expand(String expand) { return this; } + /** + *

    If provided, will only return tax rates for this company.

    + */ @JsonSetter(value = "company_id", nulls = Nulls.SKIP) public Builder companyId(Optional companyId) { this.companyId = companyId; @@ -317,6 +323,9 @@ public Builder companyId(String companyId) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -328,6 +337,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -339,6 +351,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -350,6 +365,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -361,6 +379,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -372,6 +393,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -383,6 +407,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -394,6 +421,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -405,6 +435,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    If provided, will only return TaxRates with this name.

    + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -416,6 +449,9 @@ public Builder name(String name) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -427,6 +463,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; diff --git a/src/main/java/com/merge/api/accounting/types/TaxRatesRetrieveRequest.java b/src/main/java/com/merge/api/accounting/types/TaxRatesRetrieveRequest.java index bc83a4034..d3c34015e 100644 --- a/src/main/java/com/merge/api/accounting/types/TaxRatesRetrieveRequest.java +++ b/src/main/java/com/merge/api/accounting/types/TaxRatesRetrieveRequest.java @@ -116,6 +116,9 @@ public Builder from(TaxRatesRetrieveRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -132,6 +135,9 @@ public Builder expand(String expand) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -143,6 +149,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/accounting/types/TrackingCategoriesListRequest.java b/src/main/java/com/merge/api/accounting/types/TrackingCategoriesListRequest.java index c4dd18b32..6718e4246 100644 --- a/src/main/java/com/merge/api/accounting/types/TrackingCategoriesListRequest.java +++ b/src/main/java/com/merge/api/accounting/types/TrackingCategoriesListRequest.java @@ -187,7 +187,7 @@ public Optional getModifiedBefore() { } /** - * @return If provided, will only return TrackingCategories with this name. + * @return If provided, will only return tracking categories with this name. */ @JsonProperty("name") public Optional getName() { @@ -358,6 +358,9 @@ public Builder from(TrackingCategoriesListRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -374,6 +377,9 @@ public Builder expand(String expand) { return this; } + /** + *

    If provided, will only return tracking categories with this type.

    + */ @JsonSetter(value = "category_type", nulls = Nulls.SKIP) public Builder categoryType(Optional categoryType) { this.categoryType = categoryType; @@ -385,6 +391,9 @@ public Builder categoryType(String categoryType) { return this; } + /** + *

    If provided, will only return tracking categories for this company.

    + */ @JsonSetter(value = "company_id", nulls = Nulls.SKIP) public Builder companyId(Optional companyId) { this.companyId = companyId; @@ -396,6 +405,9 @@ public Builder companyId(String companyId) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -407,6 +419,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -418,6 +433,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -429,6 +447,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -440,6 +461,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -451,6 +475,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -462,6 +489,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -473,6 +503,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -484,6 +517,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    If provided, will only return tracking categories with this name.

    + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -495,6 +531,9 @@ public Builder name(String name) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -506,6 +545,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    Deprecated. Use show_enum_origins.

    + */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -517,6 +559,9 @@ public Builder remoteFields(String remoteFields) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -528,6 +573,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    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

    + */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; @@ -539,6 +587,9 @@ public Builder showEnumOrigins(String showEnumOrigins) { return this; } + /** + *

    If provided, will only return tracking categories with this status.

    + */ @JsonSetter(value = "status", nulls = Nulls.SKIP) public Builder status(Optional status) { this.status = status; diff --git a/src/main/java/com/merge/api/accounting/types/TrackingCategoriesRetrieveRequest.java b/src/main/java/com/merge/api/accounting/types/TrackingCategoriesRetrieveRequest.java index f720a03c3..5074a9189 100644 --- a/src/main/java/com/merge/api/accounting/types/TrackingCategoriesRetrieveRequest.java +++ b/src/main/java/com/merge/api/accounting/types/TrackingCategoriesRetrieveRequest.java @@ -149,6 +149,9 @@ public Builder from(TrackingCategoriesRetrieveRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -165,6 +168,9 @@ public Builder expand(String expand) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -176,6 +182,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -187,6 +196,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    Deprecated. Use show_enum_origins.

    + */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -198,6 +210,9 @@ public Builder remoteFields(String remoteFields) { return this; } + /** + *

    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

    + */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; diff --git a/src/main/java/com/merge/api/accounting/types/TrackingCategory.java b/src/main/java/com/merge/api/accounting/types/TrackingCategory.java index b54d7995e..595e44f3f 100644 --- a/src/main/java/com/merge/api/accounting/types/TrackingCategory.java +++ b/src/main/java/com/merge/api/accounting/types/TrackingCategory.java @@ -32,9 +32,9 @@ public final class TrackingCategory { private final Optional name; - private final Optional status; + private final Optional status; - private final Optional categoryType; + private final Optional categoryType; private final Optional parentCategory; @@ -52,8 +52,8 @@ private TrackingCategory( Optional createdAt, Optional modifiedAt, Optional name, - Optional status, - Optional categoryType, + Optional status, + Optional categoryType, Optional parentCategory, Optional company, Optional remoteWasDeleted, @@ -118,7 +118,7 @@ public Optional getName() { * */ @JsonProperty("status") - public Optional getStatus() { + public Optional getStatus() { return status; } @@ -130,7 +130,7 @@ public Optional getStatus() { * */ @JsonProperty("category_type") - public Optional getCategoryType() { + public Optional getCategoryType() { return categoryType; } @@ -222,9 +222,9 @@ public static final class Builder { private Optional name = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); - private Optional categoryType = Optional.empty(); + private Optional categoryType = Optional.empty(); private Optional parentCategory = Optional.empty(); @@ -265,6 +265,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -276,6 +279,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -287,6 +293,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -298,6 +307,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The tracking category's name.

    + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -309,24 +321,38 @@ public Builder name(String name) { return this; } + /** + *

    The tracking category's status.

    + *
      + *
    • ACTIVE - ACTIVE
    • + *
    • ARCHIVED - ARCHIVED
    • + *
    + */ @JsonSetter(value = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { + public Builder status(Optional status) { this.status = status; return this; } - public Builder status(Status7D1Enum status) { + public Builder status(TrackingCategoryStatus status) { this.status = Optional.ofNullable(status); return this; } + /** + *

    The tracking category’s type.

    + *
      + *
    • CLASS - CLASS
    • + *
    • DEPARTMENT - DEPARTMENT
    • + *
    + */ @JsonSetter(value = "category_type", nulls = Nulls.SKIP) - public Builder categoryType(Optional categoryType) { + public Builder categoryType(Optional categoryType) { this.categoryType = categoryType; return this; } - public Builder categoryType(CategoryTypeEnum categoryType) { + public Builder categoryType(TrackingCategoryCategoryType categoryType) { this.categoryType = Optional.ofNullable(categoryType); return this; } @@ -342,6 +368,9 @@ public Builder parentCategory(String parentCategory) { return this; } + /** + *

    The company the GeneralLedgerTransaction belongs to.

    + */ @JsonSetter(value = "company", nulls = Nulls.SKIP) public Builder company(Optional company) { this.company = company; @@ -353,6 +382,9 @@ public Builder company(TrackingCategoryCompany company) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/accounting/types/TrackingCategoryCategoryType.java b/src/main/java/com/merge/api/accounting/types/TrackingCategoryCategoryType.java new file mode 100644 index 000000000..a29eefb32 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/TrackingCategoryCategoryType.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = TrackingCategoryCategoryType.Deserializer.class) +public final class TrackingCategoryCategoryType { + private final Object value; + + private final int type; + + private TrackingCategoryCategoryType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((CategoryTypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof TrackingCategoryCategoryType && equalTo((TrackingCategoryCategoryType) other); + } + + private boolean equalTo(TrackingCategoryCategoryType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static TrackingCategoryCategoryType of(CategoryTypeEnum value) { + return new TrackingCategoryCategoryType(value, 0); + } + + public static TrackingCategoryCategoryType of(String value) { + return new TrackingCategoryCategoryType(value, 1); + } + + public interface Visitor { + T visit(CategoryTypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(TrackingCategoryCategoryType.class); + } + + @java.lang.Override + public TrackingCategoryCategoryType deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, CategoryTypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/TrackingCategoryStatus.java b/src/main/java/com/merge/api/accounting/types/TrackingCategoryStatus.java new file mode 100644 index 000000000..6943ae5ae --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/TrackingCategoryStatus.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = TrackingCategoryStatus.Deserializer.class) +public final class TrackingCategoryStatus { + private final Object value; + + private final int type; + + private TrackingCategoryStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((Status7D1Enum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof TrackingCategoryStatus && equalTo((TrackingCategoryStatus) other); + } + + private boolean equalTo(TrackingCategoryStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static TrackingCategoryStatus of(Status7D1Enum value) { + return new TrackingCategoryStatus(value, 0); + } + + public static TrackingCategoryStatus of(String value) { + return new TrackingCategoryStatus(value, 1); + } + + public interface Visitor { + T visit(Status7D1Enum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(TrackingCategoryStatus.class); + } + + @java.lang.Override + public TrackingCategoryStatus deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, Status7D1Enum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/Transaction.java b/src/main/java/com/merge/api/accounting/types/Transaction.java index b126a05a3..eecc843ef 100644 --- a/src/main/java/com/merge/api/accounting/types/Transaction.java +++ b/src/main/java/com/merge/api/accounting/types/Transaction.java @@ -45,7 +45,7 @@ public final class Transaction { private final Optional totalAmount; - private final Optional currency; + private final Optional currency; private final Optional exchangeRate; @@ -77,7 +77,7 @@ private Transaction( Optional contact, Optional inclusiveOfTax, Optional totalAmount, - Optional currency, + Optional currency, Optional exchangeRate, Optional company, Optional>> trackingCategories, @@ -507,7 +507,7 @@ public Optional getTotalAmount() { * */ @JsonProperty("currency") - public Optional getCurrency() { + public Optional getCurrency() { return currency; } @@ -655,7 +655,7 @@ public static final class Builder { private Optional totalAmount = Optional.empty(); - private Optional currency = Optional.empty(); + private Optional currency = Optional.empty(); private Optional exchangeRate = Optional.empty(); @@ -713,6 +713,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -724,6 +727,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -735,6 +741,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -746,6 +755,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The type of transaction, which can by any transaction object not already included in Merge’s common model.

    + */ @JsonSetter(value = "transaction_type", nulls = Nulls.SKIP) public Builder transactionType(Optional transactionType) { this.transactionType = transactionType; @@ -757,6 +769,9 @@ public Builder transactionType(String transactionType) { return this; } + /** + *

    The transaction's number used for identifying purposes.

    + */ @JsonSetter(value = "number", nulls = Nulls.SKIP) public Builder number(Optional number) { this.number = number; @@ -768,6 +783,9 @@ public Builder number(String number) { return this; } + /** + *

    The date upon which the transaction occurred.

    + */ @JsonSetter(value = "transaction_date", nulls = Nulls.SKIP) public Builder transactionDate(Optional transactionDate) { this.transactionDate = transactionDate; @@ -779,6 +797,9 @@ public Builder transactionDate(OffsetDateTime transactionDate) { return this; } + /** + *

    The transaction's account.

    + */ @JsonSetter(value = "account", nulls = Nulls.SKIP) public Builder account(Optional account) { this.account = account; @@ -790,6 +811,9 @@ public Builder account(TransactionAccount account) { return this; } + /** + *

    The contact to whom the transaction relates to.

    + */ @JsonSetter(value = "contact", nulls = Nulls.SKIP) public Builder contact(Optional contact) { this.contact = contact; @@ -801,6 +825,9 @@ public Builder contact(TransactionContact contact) { return this; } + /** + *

    If the transaction is inclusive or exclusive of tax. True if inclusive, False if exclusive.

    + */ @JsonSetter(value = "inclusive_of_tax", nulls = Nulls.SKIP) public Builder inclusiveOfTax(Optional inclusiveOfTax) { this.inclusiveOfTax = inclusiveOfTax; @@ -812,6 +839,9 @@ public Builder inclusiveOfTax(Boolean inclusiveOfTax) { return this; } + /** + *

    The total amount being paid after taxes.

    + */ @JsonSetter(value = "total_amount", nulls = Nulls.SKIP) public Builder totalAmount(Optional totalAmount) { this.totalAmount = totalAmount; @@ -823,17 +853,331 @@ public Builder totalAmount(String totalAmount) { return this; } + /** + *

    The transaction's currency.

    + *
      + *
    • XUA - ADB Unit of Account
    • + *
    • AFN - Afghan Afghani
    • + *
    • AFA - Afghan Afghani (1927–2002)
    • + *
    • ALL - Albanian Lek
    • + *
    • ALK - Albanian Lek (1946–1965)
    • + *
    • DZD - Algerian Dinar
    • + *
    • ADP - Andorran Peseta
    • + *
    • AOA - Angolan Kwanza
    • + *
    • AOK - Angolan Kwanza (1977–1991)
    • + *
    • AON - Angolan New Kwanza (1990–2000)
    • + *
    • AOR - Angolan Readjusted Kwanza (1995–1999)
    • + *
    • ARA - Argentine Austral
    • + *
    • ARS - Argentine Peso
    • + *
    • ARM - Argentine Peso (1881–1970)
    • + *
    • ARP - Argentine Peso (1983–1985)
    • + *
    • ARL - Argentine Peso Ley (1970–1983)
    • + *
    • AMD - Armenian Dram
    • + *
    • AWG - Aruban Florin
    • + *
    • AUD - Australian Dollar
    • + *
    • ATS - Austrian Schilling
    • + *
    • AZN - Azerbaijani Manat
    • + *
    • AZM - Azerbaijani Manat (1993–2006)
    • + *
    • BSD - Bahamian Dollar
    • + *
    • BHD - Bahraini Dinar
    • + *
    • BDT - Bangladeshi Taka
    • + *
    • BBD - Barbadian Dollar
    • + *
    • BYN - Belarusian Ruble
    • + *
    • BYB - Belarusian Ruble (1994–1999)
    • + *
    • BYR - Belarusian Ruble (2000–2016)
    • + *
    • BEF - Belgian Franc
    • + *
    • BEC - Belgian Franc (convertible)
    • + *
    • BEL - Belgian Franc (financial)
    • + *
    • BZD - Belize Dollar
    • + *
    • BMD - Bermudan Dollar
    • + *
    • BTN - Bhutanese Ngultrum
    • + *
    • BOB - Bolivian Boliviano
    • + *
    • BOL - Bolivian Boliviano (1863–1963)
    • + *
    • BOV - Bolivian Mvdol
    • + *
    • BOP - Bolivian Peso
    • + *
    • BAM - Bosnia-Herzegovina Convertible Mark
    • + *
    • BAD - Bosnia-Herzegovina Dinar (1992–1994)
    • + *
    • BAN - Bosnia-Herzegovina New Dinar (1994–1997)
    • + *
    • BWP - Botswanan Pula
    • + *
    • BRC - Brazilian Cruzado (1986–1989)
    • + *
    • BRZ - Brazilian Cruzeiro (1942–1967)
    • + *
    • BRE - Brazilian Cruzeiro (1990–1993)
    • + *
    • BRR - Brazilian Cruzeiro (1993–1994)
    • + *
    • BRN - Brazilian New Cruzado (1989–1990)
    • + *
    • BRB - Brazilian New Cruzeiro (1967–1986)
    • + *
    • BRL - Brazilian Real
    • + *
    • GBP - British Pound
    • + *
    • BND - Brunei Dollar
    • + *
    • BGL - Bulgarian Hard Lev
    • + *
    • BGN - Bulgarian Lev
    • + *
    • BGO - Bulgarian Lev (1879–1952)
    • + *
    • BGM - Bulgarian Socialist Lev
    • + *
    • BUK - Burmese Kyat
    • + *
    • BIF - Burundian Franc
    • + *
    • XPF - CFP Franc
    • + *
    • KHR - Cambodian Riel
    • + *
    • CAD - Canadian Dollar
    • + *
    • CVE - Cape Verdean Escudo
    • + *
    • KYD - Cayman Islands Dollar
    • + *
    • XAF - Central African CFA Franc
    • + *
    • CLE - Chilean Escudo
    • + *
    • CLP - Chilean Peso
    • + *
    • CLF - Chilean Unit of Account (UF)
    • + *
    • CNX - Chinese People’s Bank Dollar
    • + *
    • CNY - Chinese Yuan
    • + *
    • CNH - Chinese Yuan (offshore)
    • + *
    • COP - Colombian Peso
    • + *
    • COU - Colombian Real Value Unit
    • + *
    • KMF - Comorian Franc
    • + *
    • CDF - Congolese Franc
    • + *
    • CRC - Costa Rican Colón
    • + *
    • HRD - Croatian Dinar
    • + *
    • HRK - Croatian Kuna
    • + *
    • CUC - Cuban Convertible Peso
    • + *
    • CUP - Cuban Peso
    • + *
    • CYP - Cypriot Pound
    • + *
    • CZK - Czech Koruna
    • + *
    • CSK - Czechoslovak Hard Koruna
    • + *
    • DKK - Danish Krone
    • + *
    • DJF - Djiboutian Franc
    • + *
    • DOP - Dominican Peso
    • + *
    • NLG - Dutch Guilder
    • + *
    • XCD - East Caribbean Dollar
    • + *
    • DDM - East German Mark
    • + *
    • ECS - Ecuadorian Sucre
    • + *
    • ECV - Ecuadorian Unit of Constant Value
    • + *
    • EGP - Egyptian Pound
    • + *
    • GQE - Equatorial Guinean Ekwele
    • + *
    • ERN - Eritrean Nakfa
    • + *
    • EEK - Estonian Kroon
    • + *
    • ETB - Ethiopian Birr
    • + *
    • EUR - Euro
    • + *
    • XBA - European Composite Unit
    • + *
    • XEU - European Currency Unit
    • + *
    • XBB - European Monetary Unit
    • + *
    • XBC - European Unit of Account (XBC)
    • + *
    • XBD - European Unit of Account (XBD)
    • + *
    • FKP - Falkland Islands Pound
    • + *
    • FJD - Fijian Dollar
    • + *
    • FIM - Finnish Markka
    • + *
    • FRF - French Franc
    • + *
    • XFO - French Gold Franc
    • + *
    • XFU - French UIC-Franc
    • + *
    • GMD - Gambian Dalasi
    • + *
    • GEK - Georgian Kupon Larit
    • + *
    • GEL - Georgian Lari
    • + *
    • DEM - German Mark
    • + *
    • GHS - Ghanaian Cedi
    • + *
    • GHC - Ghanaian Cedi (1979–2007)
    • + *
    • GIP - Gibraltar Pound
    • + *
    • XAU - Gold
    • + *
    • GRD - Greek Drachma
    • + *
    • GTQ - Guatemalan Quetzal
    • + *
    • GWP - Guinea-Bissau Peso
    • + *
    • GNF - Guinean Franc
    • + *
    • GNS - Guinean Syli
    • + *
    • GYD - Guyanaese Dollar
    • + *
    • HTG - Haitian Gourde
    • + *
    • HNL - Honduran Lempira
    • + *
    • HKD - Hong Kong Dollar
    • + *
    • HUF - Hungarian Forint
    • + *
    • IMP - IMP
    • + *
    • ISK - Icelandic Króna
    • + *
    • ISJ - Icelandic Króna (1918–1981)
    • + *
    • INR - Indian Rupee
    • + *
    • IDR - Indonesian Rupiah
    • + *
    • IRR - Iranian Rial
    • + *
    • IQD - Iraqi Dinar
    • + *
    • IEP - Irish Pound
    • + *
    • ILS - Israeli New Shekel
    • + *
    • ILP - Israeli Pound
    • + *
    • ILR - Israeli Shekel (1980–1985)
    • + *
    • ITL - Italian Lira
    • + *
    • JMD - Jamaican Dollar
    • + *
    • JPY - Japanese Yen
    • + *
    • JOD - Jordanian Dinar
    • + *
    • KZT - Kazakhstani Tenge
    • + *
    • KES - Kenyan Shilling
    • + *
    • KWD - Kuwaiti Dinar
    • + *
    • KGS - Kyrgystani Som
    • + *
    • LAK - Laotian Kip
    • + *
    • LVL - Latvian Lats
    • + *
    • LVR - Latvian Ruble
    • + *
    • LBP - Lebanese Pound
    • + *
    • LSL - Lesotho Loti
    • + *
    • LRD - Liberian Dollar
    • + *
    • LYD - Libyan Dinar
    • + *
    • LTL - Lithuanian Litas
    • + *
    • LTT - Lithuanian Talonas
    • + *
    • LUL - Luxembourg Financial Franc
    • + *
    • LUC - Luxembourgian Convertible Franc
    • + *
    • LUF - Luxembourgian Franc
    • + *
    • MOP - Macanese Pataca
    • + *
    • MKD - Macedonian Denar
    • + *
    • MKN - Macedonian Denar (1992–1993)
    • + *
    • MGA - Malagasy Ariary
    • + *
    • MGF - Malagasy Franc
    • + *
    • MWK - Malawian Kwacha
    • + *
    • MYR - Malaysian Ringgit
    • + *
    • MVR - Maldivian Rufiyaa
    • + *
    • MVP - Maldivian Rupee (1947–1981)
    • + *
    • MLF - Malian Franc
    • + *
    • MTL - Maltese Lira
    • + *
    • MTP - Maltese Pound
    • + *
    • MRU - Mauritanian Ouguiya
    • + *
    • MRO - Mauritanian Ouguiya (1973–2017)
    • + *
    • MUR - Mauritian Rupee
    • + *
    • MXV - Mexican Investment Unit
    • + *
    • MXN - Mexican Peso
    • + *
    • MXP - Mexican Silver Peso (1861–1992)
    • + *
    • MDC - Moldovan Cupon
    • + *
    • MDL - Moldovan Leu
    • + *
    • MCF - Monegasque Franc
    • + *
    • MNT - Mongolian Tugrik
    • + *
    • MAD - Moroccan Dirham
    • + *
    • MAF - Moroccan Franc
    • + *
    • MZE - Mozambican Escudo
    • + *
    • MZN - Mozambican Metical
    • + *
    • MZM - Mozambican Metical (1980–2006)
    • + *
    • MMK - Myanmar Kyat
    • + *
    • NAD - Namibian Dollar
    • + *
    • NPR - Nepalese Rupee
    • + *
    • ANG - Netherlands Antillean Guilder
    • + *
    • TWD - New Taiwan Dollar
    • + *
    • NZD - New Zealand Dollar
    • + *
    • NIO - Nicaraguan Córdoba
    • + *
    • NIC - Nicaraguan Córdoba (1988–1991)
    • + *
    • NGN - Nigerian Naira
    • + *
    • KPW - North Korean Won
    • + *
    • NOK - Norwegian Krone
    • + *
    • OMR - Omani Rial
    • + *
    • PKR - Pakistani Rupee
    • + *
    • XPD - Palladium
    • + *
    • PAB - Panamanian Balboa
    • + *
    • PGK - Papua New Guinean Kina
    • + *
    • PYG - Paraguayan Guarani
    • + *
    • PEI - Peruvian Inti
    • + *
    • PEN - Peruvian Sol
    • + *
    • PES - Peruvian Sol (1863–1965)
    • + *
    • PHP - Philippine Peso
    • + *
    • XPT - Platinum
    • + *
    • PLN - Polish Zloty
    • + *
    • PLZ - Polish Zloty (1950–1995)
    • + *
    • PTE - Portuguese Escudo
    • + *
    • GWE - Portuguese Guinea Escudo
    • + *
    • QAR - Qatari Rial
    • + *
    • XRE - RINET Funds
    • + *
    • RHD - Rhodesian Dollar
    • + *
    • RON - Romanian Leu
    • + *
    • ROL - Romanian Leu (1952–2006)
    • + *
    • RUB - Russian Ruble
    • + *
    • RUR - Russian Ruble (1991–1998)
    • + *
    • RWF - Rwandan Franc
    • + *
    • SVC - Salvadoran Colón
    • + *
    • WST - Samoan Tala
    • + *
    • SAR - Saudi Riyal
    • + *
    • RSD - Serbian Dinar
    • + *
    • CSD - Serbian Dinar (2002–2006)
    • + *
    • SCR - Seychellois Rupee
    • + *
    • SLL - Sierra Leonean Leone
    • + *
    • XAG - Silver
    • + *
    • SGD - Singapore Dollar
    • + *
    • SKK - Slovak Koruna
    • + *
    • SIT - Slovenian Tolar
    • + *
    • SBD - Solomon Islands Dollar
    • + *
    • SOS - Somali Shilling
    • + *
    • ZAR - South African Rand
    • + *
    • ZAL - South African Rand (financial)
    • + *
    • KRH - South Korean Hwan (1953–1962)
    • + *
    • KRW - South Korean Won
    • + *
    • KRO - South Korean Won (1945–1953)
    • + *
    • SSP - South Sudanese Pound
    • + *
    • SUR - Soviet Rouble
    • + *
    • ESP - Spanish Peseta
    • + *
    • ESA - Spanish Peseta (A account)
    • + *
    • ESB - Spanish Peseta (convertible account)
    • + *
    • XDR - Special Drawing Rights
    • + *
    • LKR - Sri Lankan Rupee
    • + *
    • SHP - St. Helena Pound
    • + *
    • XSU - Sucre
    • + *
    • SDD - Sudanese Dinar (1992–2007)
    • + *
    • SDG - Sudanese Pound
    • + *
    • SDP - Sudanese Pound (1957–1998)
    • + *
    • SRD - Surinamese Dollar
    • + *
    • SRG - Surinamese Guilder
    • + *
    • SZL - Swazi Lilangeni
    • + *
    • SEK - Swedish Krona
    • + *
    • CHF - Swiss Franc
    • + *
    • SYP - Syrian Pound
    • + *
    • STN - São Tomé & Príncipe Dobra
    • + *
    • STD - São Tomé & Príncipe Dobra (1977–2017)
    • + *
    • TVD - TVD
    • + *
    • TJR - Tajikistani Ruble
    • + *
    • TJS - Tajikistani Somoni
    • + *
    • TZS - Tanzanian Shilling
    • + *
    • XTS - Testing Currency Code
    • + *
    • THB - Thai Baht
    • + *
    • XXX - The codes assigned for transactions where no currency is involved
    • + *
    • TPE - Timorese Escudo
    • + *
    • TOP - Tongan Paʻanga
    • + *
    • TTD - Trinidad & Tobago Dollar
    • + *
    • TND - Tunisian Dinar
    • + *
    • TRY - Turkish Lira
    • + *
    • TRL - Turkish Lira (1922–2005)
    • + *
    • TMT - Turkmenistani Manat
    • + *
    • TMM - Turkmenistani Manat (1993–2009)
    • + *
    • USD - US Dollar
    • + *
    • USN - US Dollar (Next day)
    • + *
    • USS - US Dollar (Same day)
    • + *
    • UGX - Ugandan Shilling
    • + *
    • UGS - Ugandan Shilling (1966–1987)
    • + *
    • UAH - Ukrainian Hryvnia
    • + *
    • UAK - Ukrainian Karbovanets
    • + *
    • AED - United Arab Emirates Dirham
    • + *
    • UYW - Uruguayan Nominal Wage Index Unit
    • + *
    • UYU - Uruguayan Peso
    • + *
    • UYP - Uruguayan Peso (1975–1993)
    • + *
    • UYI - Uruguayan Peso (Indexed Units)
    • + *
    • UZS - Uzbekistani Som
    • + *
    • VUV - Vanuatu Vatu
    • + *
    • VES - Venezuelan Bolívar
    • + *
    • VEB - Venezuelan Bolívar (1871–2008)
    • + *
    • VEF - Venezuelan Bolívar (2008–2018)
    • + *
    • VND - Vietnamese Dong
    • + *
    • VNN - Vietnamese Dong (1978–1985)
    • + *
    • CHE - WIR Euro
    • + *
    • CHW - WIR Franc
    • + *
    • XOF - West African CFA Franc
    • + *
    • YDD - Yemeni Dinar
    • + *
    • YER - Yemeni Rial
    • + *
    • YUN - Yugoslavian Convertible Dinar (1990–1992)
    • + *
    • YUD - Yugoslavian Hard Dinar (1966–1990)
    • + *
    • YUM - Yugoslavian New Dinar (1994–2002)
    • + *
    • YUR - Yugoslavian Reformed Dinar (1992–1993)
    • + *
    • ZWN - ZWN
    • + *
    • ZRN - Zairean New Zaire (1993–1998)
    • + *
    • ZRZ - Zairean Zaire (1971–1993)
    • + *
    • ZMW - Zambian Kwacha
    • + *
    • ZMK - Zambian Kwacha (1968–2012)
    • + *
    • ZWD - Zimbabwean Dollar (1980–2008)
    • + *
    • ZWR - Zimbabwean Dollar (2008)
    • + *
    • ZWL - Zimbabwean Dollar (2009)
    • + *
    + */ @JsonSetter(value = "currency", nulls = Nulls.SKIP) - public Builder currency(Optional currency) { + public Builder currency(Optional currency) { this.currency = currency; return this; } - public Builder currency(TransactionCurrencyEnum currency) { + public Builder currency(TransactionCurrency currency) { this.currency = Optional.ofNullable(currency); return this; } + /** + *

    The transaction's exchange rate.

    + */ @JsonSetter(value = "exchange_rate", nulls = Nulls.SKIP) public Builder exchangeRate(Optional exchangeRate) { this.exchangeRate = exchangeRate; @@ -845,6 +1189,9 @@ public Builder exchangeRate(String exchangeRate) { return this; } + /** + *

    The company the transaction belongs to.

    + */ @JsonSetter(value = "company", nulls = Nulls.SKIP) public Builder company(Optional company) { this.company = company; @@ -879,6 +1226,9 @@ public Builder lineItems(List lineItems) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; @@ -890,6 +1240,9 @@ public Builder remoteWasDeleted(Boolean remoteWasDeleted) { return this; } + /** + *

    The accounting period that the Transaction was generated in.

    + */ @JsonSetter(value = "accounting_period", nulls = Nulls.SKIP) public Builder accountingPeriod(Optional accountingPeriod) { this.accountingPeriod = accountingPeriod; diff --git a/src/main/java/com/merge/api/accounting/types/TransactionCurrency.java b/src/main/java/com/merge/api/accounting/types/TransactionCurrency.java new file mode 100644 index 000000000..19e0707ca --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/TransactionCurrency.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = TransactionCurrency.Deserializer.class) +public final class TransactionCurrency { + private final Object value; + + private final int type; + + private TransactionCurrency(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((TransactionCurrencyEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof TransactionCurrency && equalTo((TransactionCurrency) other); + } + + private boolean equalTo(TransactionCurrency other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static TransactionCurrency of(TransactionCurrencyEnum value) { + return new TransactionCurrency(value, 0); + } + + public static TransactionCurrency of(String value) { + return new TransactionCurrency(value, 1); + } + + public interface Visitor { + T visit(TransactionCurrencyEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(TransactionCurrency.class); + } + + @java.lang.Override + public TransactionCurrency deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TransactionCurrencyEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/TransactionLineItem.java b/src/main/java/com/merge/api/accounting/types/TransactionLineItem.java index 0120f2f54..e5a7e71ef 100644 --- a/src/main/java/com/merge/api/accounting/types/TransactionLineItem.java +++ b/src/main/java/com/merge/api/accounting/types/TransactionLineItem.java @@ -48,7 +48,7 @@ public final class TransactionLineItem { private final Optional taxRate; - private final Optional currency; + private final Optional currency; private final Optional exchangeRate; @@ -72,7 +72,7 @@ private TransactionLineItem( Optional>> trackingCategories, Optional totalLineAmount, Optional taxRate, - Optional currency, + Optional currency, Optional exchangeRate, Optional company, Optional remoteWasDeleted, @@ -507,7 +507,7 @@ public Optional getTaxRate() { * */ @JsonProperty("currency") - public Optional getCurrency() { + public Optional getCurrency() { return currency; } @@ -625,7 +625,7 @@ public static final class Builder { private Optional taxRate = Optional.empty(); - private Optional currency = Optional.empty(); + private Optional currency = Optional.empty(); private Optional exchangeRate = Optional.empty(); @@ -670,6 +670,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -681,6 +684,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -692,6 +698,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -703,6 +712,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    An internal note used by the business to clarify purpose of the transaction.

    + */ @JsonSetter(value = "memo", nulls = Nulls.SKIP) public Builder memo(Optional memo) { this.memo = memo; @@ -714,6 +726,9 @@ public Builder memo(String memo) { return this; } + /** + *

    The line item's unit price.

    + */ @JsonSetter(value = "unit_price", nulls = Nulls.SKIP) public Builder unitPrice(Optional unitPrice) { this.unitPrice = unitPrice; @@ -725,6 +740,9 @@ public Builder unitPrice(String unitPrice) { return this; } + /** + *

    The line item's quantity.

    + */ @JsonSetter(value = "quantity", nulls = Nulls.SKIP) public Builder quantity(Optional quantity) { this.quantity = quantity; @@ -747,6 +765,9 @@ public Builder item(TransactionLineItemItem item) { return this; } + /** + *

    The line item's account.

    + */ @JsonSetter(value = "account", nulls = Nulls.SKIP) public Builder account(Optional account) { this.account = account; @@ -758,6 +779,9 @@ public Builder account(String account) { return this; } + /** + *

    The line's associated tracking category.

    + */ @JsonSetter(value = "tracking_category", nulls = Nulls.SKIP) public Builder trackingCategory(Optional trackingCategory) { this.trackingCategory = trackingCategory; @@ -769,6 +793,9 @@ public Builder trackingCategory(String trackingCategory) { return this; } + /** + *

    The transaction line item's associated tracking categories.

    + */ @JsonSetter(value = "tracking_categories", nulls = Nulls.SKIP) public Builder trackingCategories(Optional>> trackingCategories) { this.trackingCategories = trackingCategories; @@ -780,6 +807,9 @@ public Builder trackingCategories(List> trackingCategories) { return this; } + /** + *

    The line item's total.

    + */ @JsonSetter(value = "total_line_amount", nulls = Nulls.SKIP) public Builder totalLineAmount(Optional totalLineAmount) { this.totalLineAmount = totalLineAmount; @@ -791,6 +821,9 @@ public Builder totalLineAmount(String totalLineAmount) { return this; } + /** + *

    The tax rate that applies to this line item.

    + */ @JsonSetter(value = "tax_rate", nulls = Nulls.SKIP) public Builder taxRate(Optional taxRate) { this.taxRate = taxRate; @@ -802,17 +835,331 @@ public Builder taxRate(String taxRate) { return this; } + /** + *

    The line item's currency.

    + *
      + *
    • XUA - ADB Unit of Account
    • + *
    • AFN - Afghan Afghani
    • + *
    • AFA - Afghan Afghani (1927–2002)
    • + *
    • ALL - Albanian Lek
    • + *
    • ALK - Albanian Lek (1946–1965)
    • + *
    • DZD - Algerian Dinar
    • + *
    • ADP - Andorran Peseta
    • + *
    • AOA - Angolan Kwanza
    • + *
    • AOK - Angolan Kwanza (1977–1991)
    • + *
    • AON - Angolan New Kwanza (1990–2000)
    • + *
    • AOR - Angolan Readjusted Kwanza (1995–1999)
    • + *
    • ARA - Argentine Austral
    • + *
    • ARS - Argentine Peso
    • + *
    • ARM - Argentine Peso (1881–1970)
    • + *
    • ARP - Argentine Peso (1983–1985)
    • + *
    • ARL - Argentine Peso Ley (1970–1983)
    • + *
    • AMD - Armenian Dram
    • + *
    • AWG - Aruban Florin
    • + *
    • AUD - Australian Dollar
    • + *
    • ATS - Austrian Schilling
    • + *
    • AZN - Azerbaijani Manat
    • + *
    • AZM - Azerbaijani Manat (1993–2006)
    • + *
    • BSD - Bahamian Dollar
    • + *
    • BHD - Bahraini Dinar
    • + *
    • BDT - Bangladeshi Taka
    • + *
    • BBD - Barbadian Dollar
    • + *
    • BYN - Belarusian Ruble
    • + *
    • BYB - Belarusian Ruble (1994–1999)
    • + *
    • BYR - Belarusian Ruble (2000–2016)
    • + *
    • BEF - Belgian Franc
    • + *
    • BEC - Belgian Franc (convertible)
    • + *
    • BEL - Belgian Franc (financial)
    • + *
    • BZD - Belize Dollar
    • + *
    • BMD - Bermudan Dollar
    • + *
    • BTN - Bhutanese Ngultrum
    • + *
    • BOB - Bolivian Boliviano
    • + *
    • BOL - Bolivian Boliviano (1863–1963)
    • + *
    • BOV - Bolivian Mvdol
    • + *
    • BOP - Bolivian Peso
    • + *
    • BAM - Bosnia-Herzegovina Convertible Mark
    • + *
    • BAD - Bosnia-Herzegovina Dinar (1992–1994)
    • + *
    • BAN - Bosnia-Herzegovina New Dinar (1994–1997)
    • + *
    • BWP - Botswanan Pula
    • + *
    • BRC - Brazilian Cruzado (1986–1989)
    • + *
    • BRZ - Brazilian Cruzeiro (1942–1967)
    • + *
    • BRE - Brazilian Cruzeiro (1990–1993)
    • + *
    • BRR - Brazilian Cruzeiro (1993–1994)
    • + *
    • BRN - Brazilian New Cruzado (1989–1990)
    • + *
    • BRB - Brazilian New Cruzeiro (1967–1986)
    • + *
    • BRL - Brazilian Real
    • + *
    • GBP - British Pound
    • + *
    • BND - Brunei Dollar
    • + *
    • BGL - Bulgarian Hard Lev
    • + *
    • BGN - Bulgarian Lev
    • + *
    • BGO - Bulgarian Lev (1879–1952)
    • + *
    • BGM - Bulgarian Socialist Lev
    • + *
    • BUK - Burmese Kyat
    • + *
    • BIF - Burundian Franc
    • + *
    • XPF - CFP Franc
    • + *
    • KHR - Cambodian Riel
    • + *
    • CAD - Canadian Dollar
    • + *
    • CVE - Cape Verdean Escudo
    • + *
    • KYD - Cayman Islands Dollar
    • + *
    • XAF - Central African CFA Franc
    • + *
    • CLE - Chilean Escudo
    • + *
    • CLP - Chilean Peso
    • + *
    • CLF - Chilean Unit of Account (UF)
    • + *
    • CNX - Chinese People’s Bank Dollar
    • + *
    • CNY - Chinese Yuan
    • + *
    • CNH - Chinese Yuan (offshore)
    • + *
    • COP - Colombian Peso
    • + *
    • COU - Colombian Real Value Unit
    • + *
    • KMF - Comorian Franc
    • + *
    • CDF - Congolese Franc
    • + *
    • CRC - Costa Rican Colón
    • + *
    • HRD - Croatian Dinar
    • + *
    • HRK - Croatian Kuna
    • + *
    • CUC - Cuban Convertible Peso
    • + *
    • CUP - Cuban Peso
    • + *
    • CYP - Cypriot Pound
    • + *
    • CZK - Czech Koruna
    • + *
    • CSK - Czechoslovak Hard Koruna
    • + *
    • DKK - Danish Krone
    • + *
    • DJF - Djiboutian Franc
    • + *
    • DOP - Dominican Peso
    • + *
    • NLG - Dutch Guilder
    • + *
    • XCD - East Caribbean Dollar
    • + *
    • DDM - East German Mark
    • + *
    • ECS - Ecuadorian Sucre
    • + *
    • ECV - Ecuadorian Unit of Constant Value
    • + *
    • EGP - Egyptian Pound
    • + *
    • GQE - Equatorial Guinean Ekwele
    • + *
    • ERN - Eritrean Nakfa
    • + *
    • EEK - Estonian Kroon
    • + *
    • ETB - Ethiopian Birr
    • + *
    • EUR - Euro
    • + *
    • XBA - European Composite Unit
    • + *
    • XEU - European Currency Unit
    • + *
    • XBB - European Monetary Unit
    • + *
    • XBC - European Unit of Account (XBC)
    • + *
    • XBD - European Unit of Account (XBD)
    • + *
    • FKP - Falkland Islands Pound
    • + *
    • FJD - Fijian Dollar
    • + *
    • FIM - Finnish Markka
    • + *
    • FRF - French Franc
    • + *
    • XFO - French Gold Franc
    • + *
    • XFU - French UIC-Franc
    • + *
    • GMD - Gambian Dalasi
    • + *
    • GEK - Georgian Kupon Larit
    • + *
    • GEL - Georgian Lari
    • + *
    • DEM - German Mark
    • + *
    • GHS - Ghanaian Cedi
    • + *
    • GHC - Ghanaian Cedi (1979–2007)
    • + *
    • GIP - Gibraltar Pound
    • + *
    • XAU - Gold
    • + *
    • GRD - Greek Drachma
    • + *
    • GTQ - Guatemalan Quetzal
    • + *
    • GWP - Guinea-Bissau Peso
    • + *
    • GNF - Guinean Franc
    • + *
    • GNS - Guinean Syli
    • + *
    • GYD - Guyanaese Dollar
    • + *
    • HTG - Haitian Gourde
    • + *
    • HNL - Honduran Lempira
    • + *
    • HKD - Hong Kong Dollar
    • + *
    • HUF - Hungarian Forint
    • + *
    • IMP - IMP
    • + *
    • ISK - Icelandic Króna
    • + *
    • ISJ - Icelandic Króna (1918–1981)
    • + *
    • INR - Indian Rupee
    • + *
    • IDR - Indonesian Rupiah
    • + *
    • IRR - Iranian Rial
    • + *
    • IQD - Iraqi Dinar
    • + *
    • IEP - Irish Pound
    • + *
    • ILS - Israeli New Shekel
    • + *
    • ILP - Israeli Pound
    • + *
    • ILR - Israeli Shekel (1980–1985)
    • + *
    • ITL - Italian Lira
    • + *
    • JMD - Jamaican Dollar
    • + *
    • JPY - Japanese Yen
    • + *
    • JOD - Jordanian Dinar
    • + *
    • KZT - Kazakhstani Tenge
    • + *
    • KES - Kenyan Shilling
    • + *
    • KWD - Kuwaiti Dinar
    • + *
    • KGS - Kyrgystani Som
    • + *
    • LAK - Laotian Kip
    • + *
    • LVL - Latvian Lats
    • + *
    • LVR - Latvian Ruble
    • + *
    • LBP - Lebanese Pound
    • + *
    • LSL - Lesotho Loti
    • + *
    • LRD - Liberian Dollar
    • + *
    • LYD - Libyan Dinar
    • + *
    • LTL - Lithuanian Litas
    • + *
    • LTT - Lithuanian Talonas
    • + *
    • LUL - Luxembourg Financial Franc
    • + *
    • LUC - Luxembourgian Convertible Franc
    • + *
    • LUF - Luxembourgian Franc
    • + *
    • MOP - Macanese Pataca
    • + *
    • MKD - Macedonian Denar
    • + *
    • MKN - Macedonian Denar (1992–1993)
    • + *
    • MGA - Malagasy Ariary
    • + *
    • MGF - Malagasy Franc
    • + *
    • MWK - Malawian Kwacha
    • + *
    • MYR - Malaysian Ringgit
    • + *
    • MVR - Maldivian Rufiyaa
    • + *
    • MVP - Maldivian Rupee (1947–1981)
    • + *
    • MLF - Malian Franc
    • + *
    • MTL - Maltese Lira
    • + *
    • MTP - Maltese Pound
    • + *
    • MRU - Mauritanian Ouguiya
    • + *
    • MRO - Mauritanian Ouguiya (1973–2017)
    • + *
    • MUR - Mauritian Rupee
    • + *
    • MXV - Mexican Investment Unit
    • + *
    • MXN - Mexican Peso
    • + *
    • MXP - Mexican Silver Peso (1861–1992)
    • + *
    • MDC - Moldovan Cupon
    • + *
    • MDL - Moldovan Leu
    • + *
    • MCF - Monegasque Franc
    • + *
    • MNT - Mongolian Tugrik
    • + *
    • MAD - Moroccan Dirham
    • + *
    • MAF - Moroccan Franc
    • + *
    • MZE - Mozambican Escudo
    • + *
    • MZN - Mozambican Metical
    • + *
    • MZM - Mozambican Metical (1980–2006)
    • + *
    • MMK - Myanmar Kyat
    • + *
    • NAD - Namibian Dollar
    • + *
    • NPR - Nepalese Rupee
    • + *
    • ANG - Netherlands Antillean Guilder
    • + *
    • TWD - New Taiwan Dollar
    • + *
    • NZD - New Zealand Dollar
    • + *
    • NIO - Nicaraguan Córdoba
    • + *
    • NIC - Nicaraguan Córdoba (1988–1991)
    • + *
    • NGN - Nigerian Naira
    • + *
    • KPW - North Korean Won
    • + *
    • NOK - Norwegian Krone
    • + *
    • OMR - Omani Rial
    • + *
    • PKR - Pakistani Rupee
    • + *
    • XPD - Palladium
    • + *
    • PAB - Panamanian Balboa
    • + *
    • PGK - Papua New Guinean Kina
    • + *
    • PYG - Paraguayan Guarani
    • + *
    • PEI - Peruvian Inti
    • + *
    • PEN - Peruvian Sol
    • + *
    • PES - Peruvian Sol (1863–1965)
    • + *
    • PHP - Philippine Peso
    • + *
    • XPT - Platinum
    • + *
    • PLN - Polish Zloty
    • + *
    • PLZ - Polish Zloty (1950–1995)
    • + *
    • PTE - Portuguese Escudo
    • + *
    • GWE - Portuguese Guinea Escudo
    • + *
    • QAR - Qatari Rial
    • + *
    • XRE - RINET Funds
    • + *
    • RHD - Rhodesian Dollar
    • + *
    • RON - Romanian Leu
    • + *
    • ROL - Romanian Leu (1952–2006)
    • + *
    • RUB - Russian Ruble
    • + *
    • RUR - Russian Ruble (1991–1998)
    • + *
    • RWF - Rwandan Franc
    • + *
    • SVC - Salvadoran Colón
    • + *
    • WST - Samoan Tala
    • + *
    • SAR - Saudi Riyal
    • + *
    • RSD - Serbian Dinar
    • + *
    • CSD - Serbian Dinar (2002–2006)
    • + *
    • SCR - Seychellois Rupee
    • + *
    • SLL - Sierra Leonean Leone
    • + *
    • XAG - Silver
    • + *
    • SGD - Singapore Dollar
    • + *
    • SKK - Slovak Koruna
    • + *
    • SIT - Slovenian Tolar
    • + *
    • SBD - Solomon Islands Dollar
    • + *
    • SOS - Somali Shilling
    • + *
    • ZAR - South African Rand
    • + *
    • ZAL - South African Rand (financial)
    • + *
    • KRH - South Korean Hwan (1953–1962)
    • + *
    • KRW - South Korean Won
    • + *
    • KRO - South Korean Won (1945–1953)
    • + *
    • SSP - South Sudanese Pound
    • + *
    • SUR - Soviet Rouble
    • + *
    • ESP - Spanish Peseta
    • + *
    • ESA - Spanish Peseta (A account)
    • + *
    • ESB - Spanish Peseta (convertible account)
    • + *
    • XDR - Special Drawing Rights
    • + *
    • LKR - Sri Lankan Rupee
    • + *
    • SHP - St. Helena Pound
    • + *
    • XSU - Sucre
    • + *
    • SDD - Sudanese Dinar (1992–2007)
    • + *
    • SDG - Sudanese Pound
    • + *
    • SDP - Sudanese Pound (1957–1998)
    • + *
    • SRD - Surinamese Dollar
    • + *
    • SRG - Surinamese Guilder
    • + *
    • SZL - Swazi Lilangeni
    • + *
    • SEK - Swedish Krona
    • + *
    • CHF - Swiss Franc
    • + *
    • SYP - Syrian Pound
    • + *
    • STN - São Tomé & Príncipe Dobra
    • + *
    • STD - São Tomé & Príncipe Dobra (1977–2017)
    • + *
    • TVD - TVD
    • + *
    • TJR - Tajikistani Ruble
    • + *
    • TJS - Tajikistani Somoni
    • + *
    • TZS - Tanzanian Shilling
    • + *
    • XTS - Testing Currency Code
    • + *
    • THB - Thai Baht
    • + *
    • XXX - The codes assigned for transactions where no currency is involved
    • + *
    • TPE - Timorese Escudo
    • + *
    • TOP - Tongan Paʻanga
    • + *
    • TTD - Trinidad & Tobago Dollar
    • + *
    • TND - Tunisian Dinar
    • + *
    • TRY - Turkish Lira
    • + *
    • TRL - Turkish Lira (1922–2005)
    • + *
    • TMT - Turkmenistani Manat
    • + *
    • TMM - Turkmenistani Manat (1993–2009)
    • + *
    • USD - US Dollar
    • + *
    • USN - US Dollar (Next day)
    • + *
    • USS - US Dollar (Same day)
    • + *
    • UGX - Ugandan Shilling
    • + *
    • UGS - Ugandan Shilling (1966–1987)
    • + *
    • UAH - Ukrainian Hryvnia
    • + *
    • UAK - Ukrainian Karbovanets
    • + *
    • AED - United Arab Emirates Dirham
    • + *
    • UYW - Uruguayan Nominal Wage Index Unit
    • + *
    • UYU - Uruguayan Peso
    • + *
    • UYP - Uruguayan Peso (1975–1993)
    • + *
    • UYI - Uruguayan Peso (Indexed Units)
    • + *
    • UZS - Uzbekistani Som
    • + *
    • VUV - Vanuatu Vatu
    • + *
    • VES - Venezuelan Bolívar
    • + *
    • VEB - Venezuelan Bolívar (1871–2008)
    • + *
    • VEF - Venezuelan Bolívar (2008–2018)
    • + *
    • VND - Vietnamese Dong
    • + *
    • VNN - Vietnamese Dong (1978–1985)
    • + *
    • CHE - WIR Euro
    • + *
    • CHW - WIR Franc
    • + *
    • XOF - West African CFA Franc
    • + *
    • YDD - Yemeni Dinar
    • + *
    • YER - Yemeni Rial
    • + *
    • YUN - Yugoslavian Convertible Dinar (1990–1992)
    • + *
    • YUD - Yugoslavian Hard Dinar (1966–1990)
    • + *
    • YUM - Yugoslavian New Dinar (1994–2002)
    • + *
    • YUR - Yugoslavian Reformed Dinar (1992–1993)
    • + *
    • ZWN - ZWN
    • + *
    • ZRN - Zairean New Zaire (1993–1998)
    • + *
    • ZRZ - Zairean Zaire (1971–1993)
    • + *
    • ZMW - Zambian Kwacha
    • + *
    • ZMK - Zambian Kwacha (1968–2012)
    • + *
    • ZWD - Zimbabwean Dollar (1980–2008)
    • + *
    • ZWR - Zimbabwean Dollar (2008)
    • + *
    • ZWL - Zimbabwean Dollar (2009)
    • + *
    + */ @JsonSetter(value = "currency", nulls = Nulls.SKIP) - public Builder currency(Optional currency) { + public Builder currency(Optional currency) { this.currency = currency; return this; } - public Builder currency(TransactionCurrencyEnum currency) { + public Builder currency(TransactionLineItemCurrency currency) { this.currency = Optional.ofNullable(currency); return this; } + /** + *

    The line item's exchange rate.

    + */ @JsonSetter(value = "exchange_rate", nulls = Nulls.SKIP) public Builder exchangeRate(Optional exchangeRate) { this.exchangeRate = exchangeRate; @@ -824,6 +1171,9 @@ public Builder exchangeRate(String exchangeRate) { return this; } + /** + *

    The company the line belongs to.

    + */ @JsonSetter(value = "company", nulls = Nulls.SKIP) public Builder company(Optional company) { this.company = company; @@ -835,6 +1185,9 @@ public Builder company(String company) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/accounting/types/TransactionLineItemCurrency.java b/src/main/java/com/merge/api/accounting/types/TransactionLineItemCurrency.java new file mode 100644 index 000000000..76f252329 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/TransactionLineItemCurrency.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = TransactionLineItemCurrency.Deserializer.class) +public final class TransactionLineItemCurrency { + private final Object value; + + private final int type; + + private TransactionLineItemCurrency(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((TransactionCurrencyEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof TransactionLineItemCurrency && equalTo((TransactionLineItemCurrency) other); + } + + private boolean equalTo(TransactionLineItemCurrency other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static TransactionLineItemCurrency of(TransactionCurrencyEnum value) { + return new TransactionLineItemCurrency(value, 0); + } + + public static TransactionLineItemCurrency of(String value) { + return new TransactionLineItemCurrency(value, 1); + } + + public interface Visitor { + T visit(TransactionCurrencyEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(TransactionLineItemCurrency.class); + } + + @java.lang.Override + public TransactionLineItemCurrency deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TransactionCurrencyEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/TransactionsListRequest.java b/src/main/java/com/merge/api/accounting/types/TransactionsListRequest.java index c7d9012b6..de7923c65 100644 --- a/src/main/java/com/merge/api/accounting/types/TransactionsListRequest.java +++ b/src/main/java/com/merge/api/accounting/types/TransactionsListRequest.java @@ -307,6 +307,9 @@ public Builder from(TransactionsListRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -323,6 +326,9 @@ public Builder expand(TransactionsListRequestExpandItem expand) { return this; } + /** + *

    If provided, will only return accounting transactions for this company.

    + */ @JsonSetter(value = "company_id", nulls = Nulls.SKIP) public Builder companyId(Optional companyId) { this.companyId = companyId; @@ -334,6 +340,9 @@ public Builder companyId(String companyId) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -345,6 +354,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -356,6 +368,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -367,6 +382,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -378,6 +396,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -389,6 +410,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -400,6 +424,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -411,6 +438,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -422,6 +452,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -433,6 +466,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -444,6 +480,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "transaction_date_after", nulls = Nulls.SKIP) public Builder transactionDateAfter(Optional transactionDateAfter) { this.transactionDateAfter = transactionDateAfter; @@ -455,6 +494,9 @@ public Builder transactionDateAfter(OffsetDateTime transactionDateAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "transaction_date_before", nulls = Nulls.SKIP) public Builder transactionDateBefore(Optional transactionDateBefore) { this.transactionDateBefore = transactionDateBefore; diff --git a/src/main/java/com/merge/api/accounting/types/TransactionsRetrieveRequest.java b/src/main/java/com/merge/api/accounting/types/TransactionsRetrieveRequest.java index 573656154..498d3a801 100644 --- a/src/main/java/com/merge/api/accounting/types/TransactionsRetrieveRequest.java +++ b/src/main/java/com/merge/api/accounting/types/TransactionsRetrieveRequest.java @@ -116,6 +116,9 @@ public Builder from(TransactionsRetrieveRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -132,6 +135,9 @@ public Builder expand(TransactionsRetrieveRequestExpandItem expand) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -143,6 +149,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/accounting/types/Type2BbEnum.java b/src/main/java/com/merge/api/accounting/types/Type2BbEnum.java new file mode 100644 index 000000000..22d8fd561 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/Type2BbEnum.java @@ -0,0 +1,28 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; + +public enum Type2BbEnum { + INVENTORY("INVENTORY"), + + NON_INVENTORY("NON_INVENTORY"), + + SERVICE("SERVICE"), + + UNKNOWN("UNKNOWN"); + + private final String value; + + Type2BbEnum(String value) { + this.value = value; + } + + @JsonValue + @java.lang.Override + public String toString() { + return this.value; + } +} diff --git a/src/main/java/com/merge/api/accounting/types/VendorCredit.java b/src/main/java/com/merge/api/accounting/types/VendorCredit.java index a7311fbad..e11139317 100644 --- a/src/main/java/com/merge/api/accounting/types/VendorCredit.java +++ b/src/main/java/com/merge/api/accounting/types/VendorCredit.java @@ -39,7 +39,7 @@ public final class VendorCredit { private final Optional totalAmount; - private final Optional currency; + private final Optional currency; private final Optional exchangeRate; @@ -72,7 +72,7 @@ private VendorCredit( Optional transactionDate, Optional vendor, Optional totalAmount, - Optional currency, + Optional currency, Optional exchangeRate, Optional inclusiveOfTax, Optional company, @@ -479,7 +479,7 @@ public Optional getTotalAmount() { * */ @JsonProperty("currency") - public Optional getCurrency() { + public Optional getCurrency() { return currency; } @@ -635,7 +635,7 @@ public static final class Builder { private Optional totalAmount = Optional.empty(); - private Optional currency = Optional.empty(); + private Optional currency = Optional.empty(); private Optional exchangeRate = Optional.empty(); @@ -696,6 +696,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -707,6 +710,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -718,6 +724,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -729,6 +738,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The vendor credit's number.

    + */ @JsonSetter(value = "number", nulls = Nulls.SKIP) public Builder number(Optional number) { this.number = number; @@ -740,6 +752,9 @@ public Builder number(String number) { return this; } + /** + *

    The vendor credit's transaction date.

    + */ @JsonSetter(value = "transaction_date", nulls = Nulls.SKIP) public Builder transactionDate(Optional transactionDate) { this.transactionDate = transactionDate; @@ -751,6 +766,9 @@ public Builder transactionDate(OffsetDateTime transactionDate) { return this; } + /** + *

    The vendor that owes the gift or refund.

    + */ @JsonSetter(value = "vendor", nulls = Nulls.SKIP) public Builder vendor(Optional vendor) { this.vendor = vendor; @@ -762,6 +780,9 @@ public Builder vendor(VendorCreditVendor vendor) { return this; } + /** + *

    The vendor credit's total amount.

    + */ @JsonSetter(value = "total_amount", nulls = Nulls.SKIP) public Builder totalAmount(Optional totalAmount) { this.totalAmount = totalAmount; @@ -773,17 +794,331 @@ public Builder totalAmount(Double totalAmount) { return this; } + /** + *

    The vendor credit's currency.

    + *
      + *
    • XUA - ADB Unit of Account
    • + *
    • AFN - Afghan Afghani
    • + *
    • AFA - Afghan Afghani (1927–2002)
    • + *
    • ALL - Albanian Lek
    • + *
    • ALK - Albanian Lek (1946–1965)
    • + *
    • DZD - Algerian Dinar
    • + *
    • ADP - Andorran Peseta
    • + *
    • AOA - Angolan Kwanza
    • + *
    • AOK - Angolan Kwanza (1977–1991)
    • + *
    • AON - Angolan New Kwanza (1990–2000)
    • + *
    • AOR - Angolan Readjusted Kwanza (1995–1999)
    • + *
    • ARA - Argentine Austral
    • + *
    • ARS - Argentine Peso
    • + *
    • ARM - Argentine Peso (1881–1970)
    • + *
    • ARP - Argentine Peso (1983–1985)
    • + *
    • ARL - Argentine Peso Ley (1970–1983)
    • + *
    • AMD - Armenian Dram
    • + *
    • AWG - Aruban Florin
    • + *
    • AUD - Australian Dollar
    • + *
    • ATS - Austrian Schilling
    • + *
    • AZN - Azerbaijani Manat
    • + *
    • AZM - Azerbaijani Manat (1993–2006)
    • + *
    • BSD - Bahamian Dollar
    • + *
    • BHD - Bahraini Dinar
    • + *
    • BDT - Bangladeshi Taka
    • + *
    • BBD - Barbadian Dollar
    • + *
    • BYN - Belarusian Ruble
    • + *
    • BYB - Belarusian Ruble (1994–1999)
    • + *
    • BYR - Belarusian Ruble (2000–2016)
    • + *
    • BEF - Belgian Franc
    • + *
    • BEC - Belgian Franc (convertible)
    • + *
    • BEL - Belgian Franc (financial)
    • + *
    • BZD - Belize Dollar
    • + *
    • BMD - Bermudan Dollar
    • + *
    • BTN - Bhutanese Ngultrum
    • + *
    • BOB - Bolivian Boliviano
    • + *
    • BOL - Bolivian Boliviano (1863–1963)
    • + *
    • BOV - Bolivian Mvdol
    • + *
    • BOP - Bolivian Peso
    • + *
    • BAM - Bosnia-Herzegovina Convertible Mark
    • + *
    • BAD - Bosnia-Herzegovina Dinar (1992–1994)
    • + *
    • BAN - Bosnia-Herzegovina New Dinar (1994–1997)
    • + *
    • BWP - Botswanan Pula
    • + *
    • BRC - Brazilian Cruzado (1986–1989)
    • + *
    • BRZ - Brazilian Cruzeiro (1942–1967)
    • + *
    • BRE - Brazilian Cruzeiro (1990–1993)
    • + *
    • BRR - Brazilian Cruzeiro (1993–1994)
    • + *
    • BRN - Brazilian New Cruzado (1989–1990)
    • + *
    • BRB - Brazilian New Cruzeiro (1967–1986)
    • + *
    • BRL - Brazilian Real
    • + *
    • GBP - British Pound
    • + *
    • BND - Brunei Dollar
    • + *
    • BGL - Bulgarian Hard Lev
    • + *
    • BGN - Bulgarian Lev
    • + *
    • BGO - Bulgarian Lev (1879–1952)
    • + *
    • BGM - Bulgarian Socialist Lev
    • + *
    • BUK - Burmese Kyat
    • + *
    • BIF - Burundian Franc
    • + *
    • XPF - CFP Franc
    • + *
    • KHR - Cambodian Riel
    • + *
    • CAD - Canadian Dollar
    • + *
    • CVE - Cape Verdean Escudo
    • + *
    • KYD - Cayman Islands Dollar
    • + *
    • XAF - Central African CFA Franc
    • + *
    • CLE - Chilean Escudo
    • + *
    • CLP - Chilean Peso
    • + *
    • CLF - Chilean Unit of Account (UF)
    • + *
    • CNX - Chinese People’s Bank Dollar
    • + *
    • CNY - Chinese Yuan
    • + *
    • CNH - Chinese Yuan (offshore)
    • + *
    • COP - Colombian Peso
    • + *
    • COU - Colombian Real Value Unit
    • + *
    • KMF - Comorian Franc
    • + *
    • CDF - Congolese Franc
    • + *
    • CRC - Costa Rican Colón
    • + *
    • HRD - Croatian Dinar
    • + *
    • HRK - Croatian Kuna
    • + *
    • CUC - Cuban Convertible Peso
    • + *
    • CUP - Cuban Peso
    • + *
    • CYP - Cypriot Pound
    • + *
    • CZK - Czech Koruna
    • + *
    • CSK - Czechoslovak Hard Koruna
    • + *
    • DKK - Danish Krone
    • + *
    • DJF - Djiboutian Franc
    • + *
    • DOP - Dominican Peso
    • + *
    • NLG - Dutch Guilder
    • + *
    • XCD - East Caribbean Dollar
    • + *
    • DDM - East German Mark
    • + *
    • ECS - Ecuadorian Sucre
    • + *
    • ECV - Ecuadorian Unit of Constant Value
    • + *
    • EGP - Egyptian Pound
    • + *
    • GQE - Equatorial Guinean Ekwele
    • + *
    • ERN - Eritrean Nakfa
    • + *
    • EEK - Estonian Kroon
    • + *
    • ETB - Ethiopian Birr
    • + *
    • EUR - Euro
    • + *
    • XBA - European Composite Unit
    • + *
    • XEU - European Currency Unit
    • + *
    • XBB - European Monetary Unit
    • + *
    • XBC - European Unit of Account (XBC)
    • + *
    • XBD - European Unit of Account (XBD)
    • + *
    • FKP - Falkland Islands Pound
    • + *
    • FJD - Fijian Dollar
    • + *
    • FIM - Finnish Markka
    • + *
    • FRF - French Franc
    • + *
    • XFO - French Gold Franc
    • + *
    • XFU - French UIC-Franc
    • + *
    • GMD - Gambian Dalasi
    • + *
    • GEK - Georgian Kupon Larit
    • + *
    • GEL - Georgian Lari
    • + *
    • DEM - German Mark
    • + *
    • GHS - Ghanaian Cedi
    • + *
    • GHC - Ghanaian Cedi (1979–2007)
    • + *
    • GIP - Gibraltar Pound
    • + *
    • XAU - Gold
    • + *
    • GRD - Greek Drachma
    • + *
    • GTQ - Guatemalan Quetzal
    • + *
    • GWP - Guinea-Bissau Peso
    • + *
    • GNF - Guinean Franc
    • + *
    • GNS - Guinean Syli
    • + *
    • GYD - Guyanaese Dollar
    • + *
    • HTG - Haitian Gourde
    • + *
    • HNL - Honduran Lempira
    • + *
    • HKD - Hong Kong Dollar
    • + *
    • HUF - Hungarian Forint
    • + *
    • IMP - IMP
    • + *
    • ISK - Icelandic Króna
    • + *
    • ISJ - Icelandic Króna (1918–1981)
    • + *
    • INR - Indian Rupee
    • + *
    • IDR - Indonesian Rupiah
    • + *
    • IRR - Iranian Rial
    • + *
    • IQD - Iraqi Dinar
    • + *
    • IEP - Irish Pound
    • + *
    • ILS - Israeli New Shekel
    • + *
    • ILP - Israeli Pound
    • + *
    • ILR - Israeli Shekel (1980–1985)
    • + *
    • ITL - Italian Lira
    • + *
    • JMD - Jamaican Dollar
    • + *
    • JPY - Japanese Yen
    • + *
    • JOD - Jordanian Dinar
    • + *
    • KZT - Kazakhstani Tenge
    • + *
    • KES - Kenyan Shilling
    • + *
    • KWD - Kuwaiti Dinar
    • + *
    • KGS - Kyrgystani Som
    • + *
    • LAK - Laotian Kip
    • + *
    • LVL - Latvian Lats
    • + *
    • LVR - Latvian Ruble
    • + *
    • LBP - Lebanese Pound
    • + *
    • LSL - Lesotho Loti
    • + *
    • LRD - Liberian Dollar
    • + *
    • LYD - Libyan Dinar
    • + *
    • LTL - Lithuanian Litas
    • + *
    • LTT - Lithuanian Talonas
    • + *
    • LUL - Luxembourg Financial Franc
    • + *
    • LUC - Luxembourgian Convertible Franc
    • + *
    • LUF - Luxembourgian Franc
    • + *
    • MOP - Macanese Pataca
    • + *
    • MKD - Macedonian Denar
    • + *
    • MKN - Macedonian Denar (1992–1993)
    • + *
    • MGA - Malagasy Ariary
    • + *
    • MGF - Malagasy Franc
    • + *
    • MWK - Malawian Kwacha
    • + *
    • MYR - Malaysian Ringgit
    • + *
    • MVR - Maldivian Rufiyaa
    • + *
    • MVP - Maldivian Rupee (1947–1981)
    • + *
    • MLF - Malian Franc
    • + *
    • MTL - Maltese Lira
    • + *
    • MTP - Maltese Pound
    • + *
    • MRU - Mauritanian Ouguiya
    • + *
    • MRO - Mauritanian Ouguiya (1973–2017)
    • + *
    • MUR - Mauritian Rupee
    • + *
    • MXV - Mexican Investment Unit
    • + *
    • MXN - Mexican Peso
    • + *
    • MXP - Mexican Silver Peso (1861–1992)
    • + *
    • MDC - Moldovan Cupon
    • + *
    • MDL - Moldovan Leu
    • + *
    • MCF - Monegasque Franc
    • + *
    • MNT - Mongolian Tugrik
    • + *
    • MAD - Moroccan Dirham
    • + *
    • MAF - Moroccan Franc
    • + *
    • MZE - Mozambican Escudo
    • + *
    • MZN - Mozambican Metical
    • + *
    • MZM - Mozambican Metical (1980–2006)
    • + *
    • MMK - Myanmar Kyat
    • + *
    • NAD - Namibian Dollar
    • + *
    • NPR - Nepalese Rupee
    • + *
    • ANG - Netherlands Antillean Guilder
    • + *
    • TWD - New Taiwan Dollar
    • + *
    • NZD - New Zealand Dollar
    • + *
    • NIO - Nicaraguan Córdoba
    • + *
    • NIC - Nicaraguan Córdoba (1988–1991)
    • + *
    • NGN - Nigerian Naira
    • + *
    • KPW - North Korean Won
    • + *
    • NOK - Norwegian Krone
    • + *
    • OMR - Omani Rial
    • + *
    • PKR - Pakistani Rupee
    • + *
    • XPD - Palladium
    • + *
    • PAB - Panamanian Balboa
    • + *
    • PGK - Papua New Guinean Kina
    • + *
    • PYG - Paraguayan Guarani
    • + *
    • PEI - Peruvian Inti
    • + *
    • PEN - Peruvian Sol
    • + *
    • PES - Peruvian Sol (1863–1965)
    • + *
    • PHP - Philippine Peso
    • + *
    • XPT - Platinum
    • + *
    • PLN - Polish Zloty
    • + *
    • PLZ - Polish Zloty (1950–1995)
    • + *
    • PTE - Portuguese Escudo
    • + *
    • GWE - Portuguese Guinea Escudo
    • + *
    • QAR - Qatari Rial
    • + *
    • XRE - RINET Funds
    • + *
    • RHD - Rhodesian Dollar
    • + *
    • RON - Romanian Leu
    • + *
    • ROL - Romanian Leu (1952–2006)
    • + *
    • RUB - Russian Ruble
    • + *
    • RUR - Russian Ruble (1991–1998)
    • + *
    • RWF - Rwandan Franc
    • + *
    • SVC - Salvadoran Colón
    • + *
    • WST - Samoan Tala
    • + *
    • SAR - Saudi Riyal
    • + *
    • RSD - Serbian Dinar
    • + *
    • CSD - Serbian Dinar (2002–2006)
    • + *
    • SCR - Seychellois Rupee
    • + *
    • SLL - Sierra Leonean Leone
    • + *
    • XAG - Silver
    • + *
    • SGD - Singapore Dollar
    • + *
    • SKK - Slovak Koruna
    • + *
    • SIT - Slovenian Tolar
    • + *
    • SBD - Solomon Islands Dollar
    • + *
    • SOS - Somali Shilling
    • + *
    • ZAR - South African Rand
    • + *
    • ZAL - South African Rand (financial)
    • + *
    • KRH - South Korean Hwan (1953–1962)
    • + *
    • KRW - South Korean Won
    • + *
    • KRO - South Korean Won (1945–1953)
    • + *
    • SSP - South Sudanese Pound
    • + *
    • SUR - Soviet Rouble
    • + *
    • ESP - Spanish Peseta
    • + *
    • ESA - Spanish Peseta (A account)
    • + *
    • ESB - Spanish Peseta (convertible account)
    • + *
    • XDR - Special Drawing Rights
    • + *
    • LKR - Sri Lankan Rupee
    • + *
    • SHP - St. Helena Pound
    • + *
    • XSU - Sucre
    • + *
    • SDD - Sudanese Dinar (1992–2007)
    • + *
    • SDG - Sudanese Pound
    • + *
    • SDP - Sudanese Pound (1957–1998)
    • + *
    • SRD - Surinamese Dollar
    • + *
    • SRG - Surinamese Guilder
    • + *
    • SZL - Swazi Lilangeni
    • + *
    • SEK - Swedish Krona
    • + *
    • CHF - Swiss Franc
    • + *
    • SYP - Syrian Pound
    • + *
    • STN - São Tomé & Príncipe Dobra
    • + *
    • STD - São Tomé & Príncipe Dobra (1977–2017)
    • + *
    • TVD - TVD
    • + *
    • TJR - Tajikistani Ruble
    • + *
    • TJS - Tajikistani Somoni
    • + *
    • TZS - Tanzanian Shilling
    • + *
    • XTS - Testing Currency Code
    • + *
    • THB - Thai Baht
    • + *
    • XXX - The codes assigned for transactions where no currency is involved
    • + *
    • TPE - Timorese Escudo
    • + *
    • TOP - Tongan Paʻanga
    • + *
    • TTD - Trinidad & Tobago Dollar
    • + *
    • TND - Tunisian Dinar
    • + *
    • TRY - Turkish Lira
    • + *
    • TRL - Turkish Lira (1922–2005)
    • + *
    • TMT - Turkmenistani Manat
    • + *
    • TMM - Turkmenistani Manat (1993–2009)
    • + *
    • USD - US Dollar
    • + *
    • USN - US Dollar (Next day)
    • + *
    • USS - US Dollar (Same day)
    • + *
    • UGX - Ugandan Shilling
    • + *
    • UGS - Ugandan Shilling (1966–1987)
    • + *
    • UAH - Ukrainian Hryvnia
    • + *
    • UAK - Ukrainian Karbovanets
    • + *
    • AED - United Arab Emirates Dirham
    • + *
    • UYW - Uruguayan Nominal Wage Index Unit
    • + *
    • UYU - Uruguayan Peso
    • + *
    • UYP - Uruguayan Peso (1975–1993)
    • + *
    • UYI - Uruguayan Peso (Indexed Units)
    • + *
    • UZS - Uzbekistani Som
    • + *
    • VUV - Vanuatu Vatu
    • + *
    • VES - Venezuelan Bolívar
    • + *
    • VEB - Venezuelan Bolívar (1871–2008)
    • + *
    • VEF - Venezuelan Bolívar (2008–2018)
    • + *
    • VND - Vietnamese Dong
    • + *
    • VNN - Vietnamese Dong (1978–1985)
    • + *
    • CHE - WIR Euro
    • + *
    • CHW - WIR Franc
    • + *
    • XOF - West African CFA Franc
    • + *
    • YDD - Yemeni Dinar
    • + *
    • YER - Yemeni Rial
    • + *
    • YUN - Yugoslavian Convertible Dinar (1990–1992)
    • + *
    • YUD - Yugoslavian Hard Dinar (1966–1990)
    • + *
    • YUM - Yugoslavian New Dinar (1994–2002)
    • + *
    • YUR - Yugoslavian Reformed Dinar (1992–1993)
    • + *
    • ZWN - ZWN
    • + *
    • ZRN - Zairean New Zaire (1993–1998)
    • + *
    • ZRZ - Zairean Zaire (1971–1993)
    • + *
    • ZMW - Zambian Kwacha
    • + *
    • ZMK - Zambian Kwacha (1968–2012)
    • + *
    • ZWD - Zimbabwean Dollar (1980–2008)
    • + *
    • ZWR - Zimbabwean Dollar (2008)
    • + *
    • ZWL - Zimbabwean Dollar (2009)
    • + *
    + */ @JsonSetter(value = "currency", nulls = Nulls.SKIP) - public Builder currency(Optional currency) { + public Builder currency(Optional currency) { this.currency = currency; return this; } - public Builder currency(TransactionCurrencyEnum currency) { + public Builder currency(VendorCreditCurrency currency) { this.currency = Optional.ofNullable(currency); return this; } + /** + *

    The vendor credit's exchange rate.

    + */ @JsonSetter(value = "exchange_rate", nulls = Nulls.SKIP) public Builder exchangeRate(Optional exchangeRate) { this.exchangeRate = exchangeRate; @@ -795,6 +1130,9 @@ public Builder exchangeRate(String exchangeRate) { return this; } + /** + *

    If the transaction is inclusive or exclusive of tax. True if inclusive, False if exclusive.

    + */ @JsonSetter(value = "inclusive_of_tax", nulls = Nulls.SKIP) public Builder inclusiveOfTax(Optional inclusiveOfTax) { this.inclusiveOfTax = inclusiveOfTax; @@ -806,6 +1144,9 @@ public Builder inclusiveOfTax(Boolean inclusiveOfTax) { return this; } + /** + *

    The company the vendor credit belongs to.

    + */ @JsonSetter(value = "company", nulls = Nulls.SKIP) public Builder company(Optional company) { this.company = company; @@ -840,6 +1181,9 @@ public Builder trackingCategories(ListA list of VendorCredit Applied to Lines objects.

    + */ @JsonSetter(value = "applied_to_lines", nulls = Nulls.SKIP) public Builder appliedToLines(Optional> appliedToLines) { this.appliedToLines = appliedToLines; @@ -851,6 +1195,9 @@ public Builder appliedToLines(List applied return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; @@ -862,6 +1209,9 @@ public Builder remoteWasDeleted(Boolean remoteWasDeleted) { return this; } + /** + *

    The accounting period that the VendorCredit was generated in.

    + */ @JsonSetter(value = "accounting_period", nulls = Nulls.SKIP) public Builder accountingPeriod(Optional accountingPeriod) { this.accountingPeriod = accountingPeriod; diff --git a/src/main/java/com/merge/api/accounting/types/VendorCreditApplyLineForInvoice.java b/src/main/java/com/merge/api/accounting/types/VendorCreditApplyLineForInvoice.java index 6384f1ec7..f498806e8 100644 --- a/src/main/java/com/merge/api/accounting/types/VendorCreditApplyLineForInvoice.java +++ b/src/main/java/com/merge/api/accounting/types/VendorCreditApplyLineForInvoice.java @@ -183,6 +183,9 @@ public Builder from(VendorCreditApplyLineForInvoice other) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -194,6 +197,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -205,6 +211,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -227,6 +236,9 @@ public Builder vendorCredit(VendorCreditApplyLineForInvoiceVendorCredit vendorCr return this; } + /** + *

    Date that the vendor credit is applied to the invoice.

    + */ @JsonSetter(value = "applied_date", nulls = Nulls.SKIP) public Builder appliedDate(Optional appliedDate) { this.appliedDate = appliedDate; @@ -238,6 +250,9 @@ public Builder appliedDate(OffsetDateTime appliedDate) { return this; } + /** + *

    The amount of the VendorCredit applied to the invoice.

    + */ @JsonSetter(value = "applied_amount", nulls = Nulls.SKIP) public Builder appliedAmount(Optional appliedAmount) { this.appliedAmount = appliedAmount; @@ -249,6 +264,9 @@ public Builder appliedAmount(String appliedAmount) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/accounting/types/VendorCreditApplyLineForVendorCredit.java b/src/main/java/com/merge/api/accounting/types/VendorCreditApplyLineForVendorCredit.java index cd2bc3d5f..972776945 100644 --- a/src/main/java/com/merge/api/accounting/types/VendorCreditApplyLineForVendorCredit.java +++ b/src/main/java/com/merge/api/accounting/types/VendorCreditApplyLineForVendorCredit.java @@ -184,6 +184,9 @@ public Builder from(VendorCreditApplyLineForVendorCredit other) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -195,6 +198,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -206,6 +212,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -228,6 +237,9 @@ public Builder invoice(VendorCreditApplyLineForVendorCreditInvoice invoice) { return this; } + /** + *

    Date that the vendor credit is applied to the invoice.

    + */ @JsonSetter(value = "applied_date", nulls = Nulls.SKIP) public Builder appliedDate(Optional appliedDate) { this.appliedDate = appliedDate; @@ -239,6 +251,9 @@ public Builder appliedDate(OffsetDateTime appliedDate) { return this; } + /** + *

    The amount of the VendorCredit applied to the invoice.

    + */ @JsonSetter(value = "applied_amount", nulls = Nulls.SKIP) public Builder appliedAmount(Optional appliedAmount) { this.appliedAmount = appliedAmount; @@ -250,6 +265,9 @@ public Builder appliedAmount(String appliedAmount) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/accounting/types/VendorCreditApplyLineForVendorCreditRequest.java b/src/main/java/com/merge/api/accounting/types/VendorCreditApplyLineForVendorCreditRequest.java index b4a6481aa..0e6b42900 100644 --- a/src/main/java/com/merge/api/accounting/types/VendorCreditApplyLineForVendorCreditRequest.java +++ b/src/main/java/com/merge/api/accounting/types/VendorCreditApplyLineForVendorCreditRequest.java @@ -162,6 +162,9 @@ public Builder from(VendorCreditApplyLineForVendorCreditRequest other) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -184,6 +187,9 @@ public Builder invoice(VendorCreditApplyLineForVendorCreditRequestInvoice invoic return this; } + /** + *

    Date that the vendor credit is applied to the invoice.

    + */ @JsonSetter(value = "applied_date", nulls = Nulls.SKIP) public Builder appliedDate(Optional appliedDate) { this.appliedDate = appliedDate; @@ -195,6 +201,9 @@ public Builder appliedDate(OffsetDateTime appliedDate) { return this; } + /** + *

    The amount of the VendorCredit applied to the invoice.

    + */ @JsonSetter(value = "applied_amount", nulls = Nulls.SKIP) public Builder appliedAmount(Optional appliedAmount) { this.appliedAmount = appliedAmount; diff --git a/src/main/java/com/merge/api/accounting/types/VendorCreditCurrency.java b/src/main/java/com/merge/api/accounting/types/VendorCreditCurrency.java new file mode 100644 index 000000000..f8b73786b --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/VendorCreditCurrency.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = VendorCreditCurrency.Deserializer.class) +public final class VendorCreditCurrency { + private final Object value; + + private final int type; + + private VendorCreditCurrency(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((TransactionCurrencyEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof VendorCreditCurrency && equalTo((VendorCreditCurrency) other); + } + + private boolean equalTo(VendorCreditCurrency other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static VendorCreditCurrency of(TransactionCurrencyEnum value) { + return new VendorCreditCurrency(value, 0); + } + + public static VendorCreditCurrency of(String value) { + return new VendorCreditCurrency(value, 1); + } + + public interface Visitor { + T visit(TransactionCurrencyEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(VendorCreditCurrency.class); + } + + @java.lang.Override + public VendorCreditCurrency deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TransactionCurrencyEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/VendorCreditEndpointRequest.java b/src/main/java/com/merge/api/accounting/types/VendorCreditEndpointRequest.java index 9241a1587..74955dff9 100644 --- a/src/main/java/com/merge/api/accounting/types/VendorCreditEndpointRequest.java +++ b/src/main/java/com/merge/api/accounting/types/VendorCreditEndpointRequest.java @@ -99,10 +99,16 @@ public interface ModelStage { public interface _FinalStage { VendorCreditEndpointRequest build(); + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ _FinalStage isDebugMode(Optional isDebugMode); _FinalStage isDebugMode(Boolean isDebugMode); + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ _FinalStage runAsync(Optional runAsync); _FinalStage runAsync(Boolean runAsync); @@ -146,6 +152,9 @@ public _FinalStage runAsync(Boolean runAsync) { return this; } + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ @java.lang.Override @JsonSetter(value = "run_async", nulls = Nulls.SKIP) public _FinalStage runAsync(Optional runAsync) { @@ -163,6 +172,9 @@ public _FinalStage isDebugMode(Boolean isDebugMode) { return this; } + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ @java.lang.Override @JsonSetter(value = "is_debug_mode", nulls = Nulls.SKIP) public _FinalStage isDebugMode(Optional isDebugMode) { diff --git a/src/main/java/com/merge/api/accounting/types/VendorCreditLine.java b/src/main/java/com/merge/api/accounting/types/VendorCreditLine.java index 6302f41d9..6e4fbad84 100644 --- a/src/main/java/com/merge/api/accounting/types/VendorCreditLine.java +++ b/src/main/java/com/merge/api/accounting/types/VendorCreditLine.java @@ -42,6 +42,10 @@ public final class VendorCreditLine { private final Optional company; + private final Optional project; + + private final Optional contact; + private final Optional taxRate; private final Optional exchangeRate; @@ -61,6 +65,8 @@ private VendorCreditLine( Optional description, Optional account, Optional company, + Optional project, + Optional contact, Optional taxRate, Optional exchangeRate, Optional remoteWasDeleted, @@ -75,6 +81,8 @@ private VendorCreditLine( this.description = description; this.account = account; this.company = company; + this.project = project; + this.contact = contact; this.taxRate = taxRate; this.exchangeRate = exchangeRate; this.remoteWasDeleted = remoteWasDeleted; @@ -158,6 +166,16 @@ public Optional getCompany() { return company; } + @JsonProperty("project") + public Optional getProject() { + return project; + } + + @JsonProperty("contact") + public Optional getContact() { + return contact; + } + /** * @return The tax rate that applies to this line item. */ @@ -204,6 +222,8 @@ private boolean equalTo(VendorCreditLine other) { && description.equals(other.description) && account.equals(other.account) && company.equals(other.company) + && project.equals(other.project) + && contact.equals(other.contact) && taxRate.equals(other.taxRate) && exchangeRate.equals(other.exchangeRate) && remoteWasDeleted.equals(other.remoteWasDeleted); @@ -222,6 +242,8 @@ public int hashCode() { this.description, this.account, this.company, + this.project, + this.contact, this.taxRate, this.exchangeRate, this.remoteWasDeleted); @@ -258,6 +280,10 @@ public static final class Builder { private Optional company = Optional.empty(); + private Optional project = Optional.empty(); + + private Optional contact = Optional.empty(); + private Optional taxRate = Optional.empty(); private Optional exchangeRate = Optional.empty(); @@ -280,6 +306,8 @@ public Builder from(VendorCreditLine other) { description(other.getDescription()); account(other.getAccount()); company(other.getCompany()); + project(other.getProject()); + contact(other.getContact()); taxRate(other.getTaxRate()); exchangeRate(other.getExchangeRate()); remoteWasDeleted(other.getRemoteWasDeleted()); @@ -297,6 +325,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -308,6 +339,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -319,6 +353,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -330,6 +367,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The full value of the credit.

    + */ @JsonSetter(value = "net_amount", nulls = Nulls.SKIP) public Builder netAmount(Optional netAmount) { this.netAmount = netAmount; @@ -341,6 +381,9 @@ public Builder netAmount(Double netAmount) { return this; } + /** + *

    The line's associated tracking category.

    + */ @JsonSetter(value = "tracking_category", nulls = Nulls.SKIP) public Builder trackingCategory(Optional trackingCategory) { this.trackingCategory = trackingCategory; @@ -352,6 +395,9 @@ public Builder trackingCategory(String trackingCategory) { return this; } + /** + *

    The vendor credit line item's associated tracking categories.

    + */ @JsonSetter(value = "tracking_categories", nulls = Nulls.SKIP) public Builder trackingCategories(Optional>> trackingCategories) { this.trackingCategories = trackingCategories; @@ -363,6 +409,9 @@ public Builder trackingCategories(List> trackingCategories) { return this; } + /** + *

    The line's description.

    + */ @JsonSetter(value = "description", nulls = Nulls.SKIP) public Builder description(Optional description) { this.description = description; @@ -374,6 +423,9 @@ public Builder description(String description) { return this; } + /** + *

    The line's account.

    + */ @JsonSetter(value = "account", nulls = Nulls.SKIP) public Builder account(Optional account) { this.account = account; @@ -385,6 +437,9 @@ public Builder account(VendorCreditLineAccount account) { return this; } + /** + *

    The company the line belongs to.

    + */ @JsonSetter(value = "company", nulls = Nulls.SKIP) public Builder company(Optional company) { this.company = company; @@ -396,6 +451,31 @@ public Builder company(String company) { return this; } + @JsonSetter(value = "project", nulls = Nulls.SKIP) + public Builder project(Optional project) { + this.project = project; + return this; + } + + public Builder project(VendorCreditLineProject project) { + this.project = Optional.ofNullable(project); + return this; + } + + @JsonSetter(value = "contact", nulls = Nulls.SKIP) + public Builder contact(Optional contact) { + this.contact = contact; + return this; + } + + public Builder contact(VendorCreditLineContact contact) { + this.contact = Optional.ofNullable(contact); + return this; + } + + /** + *

    The tax rate that applies to this line item.

    + */ @JsonSetter(value = "tax_rate", nulls = Nulls.SKIP) public Builder taxRate(Optional taxRate) { this.taxRate = taxRate; @@ -407,6 +487,9 @@ public Builder taxRate(String taxRate) { return this; } + /** + *

    The vendor credit line item's exchange rate.

    + */ @JsonSetter(value = "exchange_rate", nulls = Nulls.SKIP) public Builder exchangeRate(Optional exchangeRate) { this.exchangeRate = exchangeRate; @@ -418,6 +501,9 @@ public Builder exchangeRate(String exchangeRate) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; @@ -441,6 +527,8 @@ public VendorCreditLine build() { description, account, company, + project, + contact, taxRate, exchangeRate, remoteWasDeleted, diff --git a/src/main/java/com/merge/api/accounting/types/VendorCreditLineContact.java b/src/main/java/com/merge/api/accounting/types/VendorCreditLineContact.java new file mode 100644 index 000000000..28b27d5d2 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/VendorCreditLineContact.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = VendorCreditLineContact.Deserializer.class) +public final class VendorCreditLineContact { + private final Object value; + + private final int type; + + private VendorCreditLineContact(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((Contact) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof VendorCreditLineContact && equalTo((VendorCreditLineContact) other); + } + + private boolean equalTo(VendorCreditLineContact other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static VendorCreditLineContact of(String value) { + return new VendorCreditLineContact(value, 0); + } + + public static VendorCreditLineContact of(Contact value) { + return new VendorCreditLineContact(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(Contact value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(VendorCreditLineContact.class); + } + + @java.lang.Override + public VendorCreditLineContact deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, Contact.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/VendorCreditLineProject.java b/src/main/java/com/merge/api/accounting/types/VendorCreditLineProject.java new file mode 100644 index 000000000..006a165f7 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/VendorCreditLineProject.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = VendorCreditLineProject.Deserializer.class) +public final class VendorCreditLineProject { + private final Object value; + + private final int type; + + private VendorCreditLineProject(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((Project) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof VendorCreditLineProject && equalTo((VendorCreditLineProject) other); + } + + private boolean equalTo(VendorCreditLineProject other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static VendorCreditLineProject of(String value) { + return new VendorCreditLineProject(value, 0); + } + + public static VendorCreditLineProject of(Project value) { + return new VendorCreditLineProject(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(Project value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(VendorCreditLineProject.class); + } + + @java.lang.Override + public VendorCreditLineProject deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, Project.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/VendorCreditLineRequest.java b/src/main/java/com/merge/api/accounting/types/VendorCreditLineRequest.java index 99969da9a..d1beb04ec 100644 --- a/src/main/java/com/merge/api/accounting/types/VendorCreditLineRequest.java +++ b/src/main/java/com/merge/api/accounting/types/VendorCreditLineRequest.java @@ -36,6 +36,10 @@ public final class VendorCreditLineRequest { private final Optional company; + private final Optional project; + + private final Optional contact; + private final Optional taxRate; private final Optional exchangeRate; @@ -54,6 +58,8 @@ private VendorCreditLineRequest( Optional description, Optional account, Optional company, + Optional project, + Optional contact, Optional taxRate, Optional exchangeRate, Optional> integrationParams, @@ -66,6 +72,8 @@ private VendorCreditLineRequest( this.description = description; this.account = account; this.company = company; + this.project = project; + this.contact = contact; this.taxRate = taxRate; this.exchangeRate = exchangeRate; this.integrationParams = integrationParams; @@ -129,6 +137,16 @@ public Optional getCompany() { return company; } + @JsonProperty("project") + public Optional getProject() { + return project; + } + + @JsonProperty("contact") + public Optional getContact() { + return contact; + } + /** * @return The tax rate that applies to this line item. */ @@ -174,6 +192,8 @@ private boolean equalTo(VendorCreditLineRequest other) { && description.equals(other.description) && account.equals(other.account) && company.equals(other.company) + && project.equals(other.project) + && contact.equals(other.contact) && taxRate.equals(other.taxRate) && exchangeRate.equals(other.exchangeRate) && integrationParams.equals(other.integrationParams) @@ -190,6 +210,8 @@ public int hashCode() { this.description, this.account, this.company, + this.project, + this.contact, this.taxRate, this.exchangeRate, this.integrationParams, @@ -221,6 +243,10 @@ public static final class Builder { private Optional company = Optional.empty(); + private Optional project = Optional.empty(); + + private Optional contact = Optional.empty(); + private Optional taxRate = Optional.empty(); private Optional exchangeRate = Optional.empty(); @@ -242,6 +268,8 @@ public Builder from(VendorCreditLineRequest other) { description(other.getDescription()); account(other.getAccount()); company(other.getCompany()); + project(other.getProject()); + contact(other.getContact()); taxRate(other.getTaxRate()); exchangeRate(other.getExchangeRate()); integrationParams(other.getIntegrationParams()); @@ -249,6 +277,9 @@ public Builder from(VendorCreditLineRequest other) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -260,6 +291,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The full value of the credit.

    + */ @JsonSetter(value = "net_amount", nulls = Nulls.SKIP) public Builder netAmount(Optional netAmount) { this.netAmount = netAmount; @@ -271,6 +305,9 @@ public Builder netAmount(Double netAmount) { return this; } + /** + *

    The line's associated tracking category.

    + */ @JsonSetter(value = "tracking_category", nulls = Nulls.SKIP) public Builder trackingCategory(Optional trackingCategory) { this.trackingCategory = trackingCategory; @@ -282,6 +319,9 @@ public Builder trackingCategory(String trackingCategory) { return this; } + /** + *

    The vendor credit line item's associated tracking categories.

    + */ @JsonSetter(value = "tracking_categories", nulls = Nulls.SKIP) public Builder trackingCategories(Optional>> trackingCategories) { this.trackingCategories = trackingCategories; @@ -293,6 +333,9 @@ public Builder trackingCategories(List> trackingCategories) { return this; } + /** + *

    The line's description.

    + */ @JsonSetter(value = "description", nulls = Nulls.SKIP) public Builder description(Optional description) { this.description = description; @@ -304,6 +347,9 @@ public Builder description(String description) { return this; } + /** + *

    The line's account.

    + */ @JsonSetter(value = "account", nulls = Nulls.SKIP) public Builder account(Optional account) { this.account = account; @@ -315,6 +361,9 @@ public Builder account(VendorCreditLineRequestAccount account) { return this; } + /** + *

    The company the line belongs to.

    + */ @JsonSetter(value = "company", nulls = Nulls.SKIP) public Builder company(Optional company) { this.company = company; @@ -326,6 +375,31 @@ public Builder company(String company) { return this; } + @JsonSetter(value = "project", nulls = Nulls.SKIP) + public Builder project(Optional project) { + this.project = project; + return this; + } + + public Builder project(VendorCreditLineRequestProject project) { + this.project = Optional.ofNullable(project); + return this; + } + + @JsonSetter(value = "contact", nulls = Nulls.SKIP) + public Builder contact(Optional contact) { + this.contact = contact; + return this; + } + + public Builder contact(VendorCreditLineRequestContact contact) { + this.contact = Optional.ofNullable(contact); + return this; + } + + /** + *

    The tax rate that applies to this line item.

    + */ @JsonSetter(value = "tax_rate", nulls = Nulls.SKIP) public Builder taxRate(Optional taxRate) { this.taxRate = taxRate; @@ -337,6 +411,9 @@ public Builder taxRate(String taxRate) { return this; } + /** + *

    The vendor credit line item's exchange rate.

    + */ @JsonSetter(value = "exchange_rate", nulls = Nulls.SKIP) public Builder exchangeRate(Optional exchangeRate) { this.exchangeRate = exchangeRate; @@ -379,6 +456,8 @@ public VendorCreditLineRequest build() { description, account, company, + project, + contact, taxRate, exchangeRate, integrationParams, diff --git a/src/main/java/com/merge/api/accounting/types/VendorCreditLineRequestContact.java b/src/main/java/com/merge/api/accounting/types/VendorCreditLineRequestContact.java new file mode 100644 index 000000000..001d73c6e --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/VendorCreditLineRequestContact.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = VendorCreditLineRequestContact.Deserializer.class) +public final class VendorCreditLineRequestContact { + private final Object value; + + private final int type; + + private VendorCreditLineRequestContact(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((Contact) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof VendorCreditLineRequestContact && equalTo((VendorCreditLineRequestContact) other); + } + + private boolean equalTo(VendorCreditLineRequestContact other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static VendorCreditLineRequestContact of(String value) { + return new VendorCreditLineRequestContact(value, 0); + } + + public static VendorCreditLineRequestContact of(Contact value) { + return new VendorCreditLineRequestContact(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(Contact value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(VendorCreditLineRequestContact.class); + } + + @java.lang.Override + public VendorCreditLineRequestContact deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, Contact.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/VendorCreditLineRequestProject.java b/src/main/java/com/merge/api/accounting/types/VendorCreditLineRequestProject.java new file mode 100644 index 000000000..2561ab5b1 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/VendorCreditLineRequestProject.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = VendorCreditLineRequestProject.Deserializer.class) +public final class VendorCreditLineRequestProject { + private final Object value; + + private final int type; + + private VendorCreditLineRequestProject(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((String) this.value); + } else if (this.type == 1) { + return visitor.visit((Project) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof VendorCreditLineRequestProject && equalTo((VendorCreditLineRequestProject) other); + } + + private boolean equalTo(VendorCreditLineRequestProject other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static VendorCreditLineRequestProject of(String value) { + return new VendorCreditLineRequestProject(value, 0); + } + + public static VendorCreditLineRequestProject of(Project value) { + return new VendorCreditLineRequestProject(value, 1); + } + + public interface Visitor { + T visit(String value); + + T visit(Project value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(VendorCreditLineRequestProject.class); + } + + @java.lang.Override + public VendorCreditLineRequestProject deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, Project.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/VendorCreditRequest.java b/src/main/java/com/merge/api/accounting/types/VendorCreditRequest.java index 65c41b3de..33d3ccd9d 100644 --- a/src/main/java/com/merge/api/accounting/types/VendorCreditRequest.java +++ b/src/main/java/com/merge/api/accounting/types/VendorCreditRequest.java @@ -31,7 +31,7 @@ public final class VendorCreditRequest { private final Optional totalAmount; - private final Optional currency; + private final Optional currency; private final Optional exchangeRate; @@ -56,7 +56,7 @@ private VendorCreditRequest( Optional transactionDate, Optional vendor, Optional totalAmount, - Optional currency, + Optional currency, Optional exchangeRate, Optional inclusiveOfTax, Optional company, @@ -426,7 +426,7 @@ public Optional getTotalAmount() { * */ @JsonProperty("currency") - public Optional getCurrency() { + public Optional getCurrency() { return currency; } @@ -549,7 +549,7 @@ public static final class Builder { private Optional totalAmount = Optional.empty(); - private Optional currency = Optional.empty(); + private Optional currency = Optional.empty(); private Optional exchangeRate = Optional.empty(); @@ -590,6 +590,9 @@ public Builder from(VendorCreditRequest other) { return this; } + /** + *

    The vendor credit's number.

    + */ @JsonSetter(value = "number", nulls = Nulls.SKIP) public Builder number(Optional number) { this.number = number; @@ -601,6 +604,9 @@ public Builder number(String number) { return this; } + /** + *

    The vendor credit's transaction date.

    + */ @JsonSetter(value = "transaction_date", nulls = Nulls.SKIP) public Builder transactionDate(Optional transactionDate) { this.transactionDate = transactionDate; @@ -612,6 +618,9 @@ public Builder transactionDate(OffsetDateTime transactionDate) { return this; } + /** + *

    The vendor that owes the gift or refund.

    + */ @JsonSetter(value = "vendor", nulls = Nulls.SKIP) public Builder vendor(Optional vendor) { this.vendor = vendor; @@ -623,6 +632,9 @@ public Builder vendor(VendorCreditRequestVendor vendor) { return this; } + /** + *

    The vendor credit's total amount.

    + */ @JsonSetter(value = "total_amount", nulls = Nulls.SKIP) public Builder totalAmount(Optional totalAmount) { this.totalAmount = totalAmount; @@ -634,17 +646,331 @@ public Builder totalAmount(Double totalAmount) { return this; } + /** + *

    The vendor credit's currency.

    + *
      + *
    • XUA - ADB Unit of Account
    • + *
    • AFN - Afghan Afghani
    • + *
    • AFA - Afghan Afghani (1927–2002)
    • + *
    • ALL - Albanian Lek
    • + *
    • ALK - Albanian Lek (1946–1965)
    • + *
    • DZD - Algerian Dinar
    • + *
    • ADP - Andorran Peseta
    • + *
    • AOA - Angolan Kwanza
    • + *
    • AOK - Angolan Kwanza (1977–1991)
    • + *
    • AON - Angolan New Kwanza (1990–2000)
    • + *
    • AOR - Angolan Readjusted Kwanza (1995–1999)
    • + *
    • ARA - Argentine Austral
    • + *
    • ARS - Argentine Peso
    • + *
    • ARM - Argentine Peso (1881–1970)
    • + *
    • ARP - Argentine Peso (1983–1985)
    • + *
    • ARL - Argentine Peso Ley (1970–1983)
    • + *
    • AMD - Armenian Dram
    • + *
    • AWG - Aruban Florin
    • + *
    • AUD - Australian Dollar
    • + *
    • ATS - Austrian Schilling
    • + *
    • AZN - Azerbaijani Manat
    • + *
    • AZM - Azerbaijani Manat (1993–2006)
    • + *
    • BSD - Bahamian Dollar
    • + *
    • BHD - Bahraini Dinar
    • + *
    • BDT - Bangladeshi Taka
    • + *
    • BBD - Barbadian Dollar
    • + *
    • BYN - Belarusian Ruble
    • + *
    • BYB - Belarusian Ruble (1994–1999)
    • + *
    • BYR - Belarusian Ruble (2000–2016)
    • + *
    • BEF - Belgian Franc
    • + *
    • BEC - Belgian Franc (convertible)
    • + *
    • BEL - Belgian Franc (financial)
    • + *
    • BZD - Belize Dollar
    • + *
    • BMD - Bermudan Dollar
    • + *
    • BTN - Bhutanese Ngultrum
    • + *
    • BOB - Bolivian Boliviano
    • + *
    • BOL - Bolivian Boliviano (1863–1963)
    • + *
    • BOV - Bolivian Mvdol
    • + *
    • BOP - Bolivian Peso
    • + *
    • BAM - Bosnia-Herzegovina Convertible Mark
    • + *
    • BAD - Bosnia-Herzegovina Dinar (1992–1994)
    • + *
    • BAN - Bosnia-Herzegovina New Dinar (1994–1997)
    • + *
    • BWP - Botswanan Pula
    • + *
    • BRC - Brazilian Cruzado (1986–1989)
    • + *
    • BRZ - Brazilian Cruzeiro (1942–1967)
    • + *
    • BRE - Brazilian Cruzeiro (1990–1993)
    • + *
    • BRR - Brazilian Cruzeiro (1993–1994)
    • + *
    • BRN - Brazilian New Cruzado (1989–1990)
    • + *
    • BRB - Brazilian New Cruzeiro (1967–1986)
    • + *
    • BRL - Brazilian Real
    • + *
    • GBP - British Pound
    • + *
    • BND - Brunei Dollar
    • + *
    • BGL - Bulgarian Hard Lev
    • + *
    • BGN - Bulgarian Lev
    • + *
    • BGO - Bulgarian Lev (1879–1952)
    • + *
    • BGM - Bulgarian Socialist Lev
    • + *
    • BUK - Burmese Kyat
    • + *
    • BIF - Burundian Franc
    • + *
    • XPF - CFP Franc
    • + *
    • KHR - Cambodian Riel
    • + *
    • CAD - Canadian Dollar
    • + *
    • CVE - Cape Verdean Escudo
    • + *
    • KYD - Cayman Islands Dollar
    • + *
    • XAF - Central African CFA Franc
    • + *
    • CLE - Chilean Escudo
    • + *
    • CLP - Chilean Peso
    • + *
    • CLF - Chilean Unit of Account (UF)
    • + *
    • CNX - Chinese People’s Bank Dollar
    • + *
    • CNY - Chinese Yuan
    • + *
    • CNH - Chinese Yuan (offshore)
    • + *
    • COP - Colombian Peso
    • + *
    • COU - Colombian Real Value Unit
    • + *
    • KMF - Comorian Franc
    • + *
    • CDF - Congolese Franc
    • + *
    • CRC - Costa Rican Colón
    • + *
    • HRD - Croatian Dinar
    • + *
    • HRK - Croatian Kuna
    • + *
    • CUC - Cuban Convertible Peso
    • + *
    • CUP - Cuban Peso
    • + *
    • CYP - Cypriot Pound
    • + *
    • CZK - Czech Koruna
    • + *
    • CSK - Czechoslovak Hard Koruna
    • + *
    • DKK - Danish Krone
    • + *
    • DJF - Djiboutian Franc
    • + *
    • DOP - Dominican Peso
    • + *
    • NLG - Dutch Guilder
    • + *
    • XCD - East Caribbean Dollar
    • + *
    • DDM - East German Mark
    • + *
    • ECS - Ecuadorian Sucre
    • + *
    • ECV - Ecuadorian Unit of Constant Value
    • + *
    • EGP - Egyptian Pound
    • + *
    • GQE - Equatorial Guinean Ekwele
    • + *
    • ERN - Eritrean Nakfa
    • + *
    • EEK - Estonian Kroon
    • + *
    • ETB - Ethiopian Birr
    • + *
    • EUR - Euro
    • + *
    • XBA - European Composite Unit
    • + *
    • XEU - European Currency Unit
    • + *
    • XBB - European Monetary Unit
    • + *
    • XBC - European Unit of Account (XBC)
    • + *
    • XBD - European Unit of Account (XBD)
    • + *
    • FKP - Falkland Islands Pound
    • + *
    • FJD - Fijian Dollar
    • + *
    • FIM - Finnish Markka
    • + *
    • FRF - French Franc
    • + *
    • XFO - French Gold Franc
    • + *
    • XFU - French UIC-Franc
    • + *
    • GMD - Gambian Dalasi
    • + *
    • GEK - Georgian Kupon Larit
    • + *
    • GEL - Georgian Lari
    • + *
    • DEM - German Mark
    • + *
    • GHS - Ghanaian Cedi
    • + *
    • GHC - Ghanaian Cedi (1979–2007)
    • + *
    • GIP - Gibraltar Pound
    • + *
    • XAU - Gold
    • + *
    • GRD - Greek Drachma
    • + *
    • GTQ - Guatemalan Quetzal
    • + *
    • GWP - Guinea-Bissau Peso
    • + *
    • GNF - Guinean Franc
    • + *
    • GNS - Guinean Syli
    • + *
    • GYD - Guyanaese Dollar
    • + *
    • HTG - Haitian Gourde
    • + *
    • HNL - Honduran Lempira
    • + *
    • HKD - Hong Kong Dollar
    • + *
    • HUF - Hungarian Forint
    • + *
    • IMP - IMP
    • + *
    • ISK - Icelandic Króna
    • + *
    • ISJ - Icelandic Króna (1918–1981)
    • + *
    • INR - Indian Rupee
    • + *
    • IDR - Indonesian Rupiah
    • + *
    • IRR - Iranian Rial
    • + *
    • IQD - Iraqi Dinar
    • + *
    • IEP - Irish Pound
    • + *
    • ILS - Israeli New Shekel
    • + *
    • ILP - Israeli Pound
    • + *
    • ILR - Israeli Shekel (1980–1985)
    • + *
    • ITL - Italian Lira
    • + *
    • JMD - Jamaican Dollar
    • + *
    • JPY - Japanese Yen
    • + *
    • JOD - Jordanian Dinar
    • + *
    • KZT - Kazakhstani Tenge
    • + *
    • KES - Kenyan Shilling
    • + *
    • KWD - Kuwaiti Dinar
    • + *
    • KGS - Kyrgystani Som
    • + *
    • LAK - Laotian Kip
    • + *
    • LVL - Latvian Lats
    • + *
    • LVR - Latvian Ruble
    • + *
    • LBP - Lebanese Pound
    • + *
    • LSL - Lesotho Loti
    • + *
    • LRD - Liberian Dollar
    • + *
    • LYD - Libyan Dinar
    • + *
    • LTL - Lithuanian Litas
    • + *
    • LTT - Lithuanian Talonas
    • + *
    • LUL - Luxembourg Financial Franc
    • + *
    • LUC - Luxembourgian Convertible Franc
    • + *
    • LUF - Luxembourgian Franc
    • + *
    • MOP - Macanese Pataca
    • + *
    • MKD - Macedonian Denar
    • + *
    • MKN - Macedonian Denar (1992–1993)
    • + *
    • MGA - Malagasy Ariary
    • + *
    • MGF - Malagasy Franc
    • + *
    • MWK - Malawian Kwacha
    • + *
    • MYR - Malaysian Ringgit
    • + *
    • MVR - Maldivian Rufiyaa
    • + *
    • MVP - Maldivian Rupee (1947–1981)
    • + *
    • MLF - Malian Franc
    • + *
    • MTL - Maltese Lira
    • + *
    • MTP - Maltese Pound
    • + *
    • MRU - Mauritanian Ouguiya
    • + *
    • MRO - Mauritanian Ouguiya (1973–2017)
    • + *
    • MUR - Mauritian Rupee
    • + *
    • MXV - Mexican Investment Unit
    • + *
    • MXN - Mexican Peso
    • + *
    • MXP - Mexican Silver Peso (1861–1992)
    • + *
    • MDC - Moldovan Cupon
    • + *
    • MDL - Moldovan Leu
    • + *
    • MCF - Monegasque Franc
    • + *
    • MNT - Mongolian Tugrik
    • + *
    • MAD - Moroccan Dirham
    • + *
    • MAF - Moroccan Franc
    • + *
    • MZE - Mozambican Escudo
    • + *
    • MZN - Mozambican Metical
    • + *
    • MZM - Mozambican Metical (1980–2006)
    • + *
    • MMK - Myanmar Kyat
    • + *
    • NAD - Namibian Dollar
    • + *
    • NPR - Nepalese Rupee
    • + *
    • ANG - Netherlands Antillean Guilder
    • + *
    • TWD - New Taiwan Dollar
    • + *
    • NZD - New Zealand Dollar
    • + *
    • NIO - Nicaraguan Córdoba
    • + *
    • NIC - Nicaraguan Córdoba (1988–1991)
    • + *
    • NGN - Nigerian Naira
    • + *
    • KPW - North Korean Won
    • + *
    • NOK - Norwegian Krone
    • + *
    • OMR - Omani Rial
    • + *
    • PKR - Pakistani Rupee
    • + *
    • XPD - Palladium
    • + *
    • PAB - Panamanian Balboa
    • + *
    • PGK - Papua New Guinean Kina
    • + *
    • PYG - Paraguayan Guarani
    • + *
    • PEI - Peruvian Inti
    • + *
    • PEN - Peruvian Sol
    • + *
    • PES - Peruvian Sol (1863–1965)
    • + *
    • PHP - Philippine Peso
    • + *
    • XPT - Platinum
    • + *
    • PLN - Polish Zloty
    • + *
    • PLZ - Polish Zloty (1950–1995)
    • + *
    • PTE - Portuguese Escudo
    • + *
    • GWE - Portuguese Guinea Escudo
    • + *
    • QAR - Qatari Rial
    • + *
    • XRE - RINET Funds
    • + *
    • RHD - Rhodesian Dollar
    • + *
    • RON - Romanian Leu
    • + *
    • ROL - Romanian Leu (1952–2006)
    • + *
    • RUB - Russian Ruble
    • + *
    • RUR - Russian Ruble (1991–1998)
    • + *
    • RWF - Rwandan Franc
    • + *
    • SVC - Salvadoran Colón
    • + *
    • WST - Samoan Tala
    • + *
    • SAR - Saudi Riyal
    • + *
    • RSD - Serbian Dinar
    • + *
    • CSD - Serbian Dinar (2002–2006)
    • + *
    • SCR - Seychellois Rupee
    • + *
    • SLL - Sierra Leonean Leone
    • + *
    • XAG - Silver
    • + *
    • SGD - Singapore Dollar
    • + *
    • SKK - Slovak Koruna
    • + *
    • SIT - Slovenian Tolar
    • + *
    • SBD - Solomon Islands Dollar
    • + *
    • SOS - Somali Shilling
    • + *
    • ZAR - South African Rand
    • + *
    • ZAL - South African Rand (financial)
    • + *
    • KRH - South Korean Hwan (1953–1962)
    • + *
    • KRW - South Korean Won
    • + *
    • KRO - South Korean Won (1945–1953)
    • + *
    • SSP - South Sudanese Pound
    • + *
    • SUR - Soviet Rouble
    • + *
    • ESP - Spanish Peseta
    • + *
    • ESA - Spanish Peseta (A account)
    • + *
    • ESB - Spanish Peseta (convertible account)
    • + *
    • XDR - Special Drawing Rights
    • + *
    • LKR - Sri Lankan Rupee
    • + *
    • SHP - St. Helena Pound
    • + *
    • XSU - Sucre
    • + *
    • SDD - Sudanese Dinar (1992–2007)
    • + *
    • SDG - Sudanese Pound
    • + *
    • SDP - Sudanese Pound (1957–1998)
    • + *
    • SRD - Surinamese Dollar
    • + *
    • SRG - Surinamese Guilder
    • + *
    • SZL - Swazi Lilangeni
    • + *
    • SEK - Swedish Krona
    • + *
    • CHF - Swiss Franc
    • + *
    • SYP - Syrian Pound
    • + *
    • STN - São Tomé & Príncipe Dobra
    • + *
    • STD - São Tomé & Príncipe Dobra (1977–2017)
    • + *
    • TVD - TVD
    • + *
    • TJR - Tajikistani Ruble
    • + *
    • TJS - Tajikistani Somoni
    • + *
    • TZS - Tanzanian Shilling
    • + *
    • XTS - Testing Currency Code
    • + *
    • THB - Thai Baht
    • + *
    • XXX - The codes assigned for transactions where no currency is involved
    • + *
    • TPE - Timorese Escudo
    • + *
    • TOP - Tongan Paʻanga
    • + *
    • TTD - Trinidad & Tobago Dollar
    • + *
    • TND - Tunisian Dinar
    • + *
    • TRY - Turkish Lira
    • + *
    • TRL - Turkish Lira (1922–2005)
    • + *
    • TMT - Turkmenistani Manat
    • + *
    • TMM - Turkmenistani Manat (1993–2009)
    • + *
    • USD - US Dollar
    • + *
    • USN - US Dollar (Next day)
    • + *
    • USS - US Dollar (Same day)
    • + *
    • UGX - Ugandan Shilling
    • + *
    • UGS - Ugandan Shilling (1966–1987)
    • + *
    • UAH - Ukrainian Hryvnia
    • + *
    • UAK - Ukrainian Karbovanets
    • + *
    • AED - United Arab Emirates Dirham
    • + *
    • UYW - Uruguayan Nominal Wage Index Unit
    • + *
    • UYU - Uruguayan Peso
    • + *
    • UYP - Uruguayan Peso (1975–1993)
    • + *
    • UYI - Uruguayan Peso (Indexed Units)
    • + *
    • UZS - Uzbekistani Som
    • + *
    • VUV - Vanuatu Vatu
    • + *
    • VES - Venezuelan Bolívar
    • + *
    • VEB - Venezuelan Bolívar (1871–2008)
    • + *
    • VEF - Venezuelan Bolívar (2008–2018)
    • + *
    • VND - Vietnamese Dong
    • + *
    • VNN - Vietnamese Dong (1978–1985)
    • + *
    • CHE - WIR Euro
    • + *
    • CHW - WIR Franc
    • + *
    • XOF - West African CFA Franc
    • + *
    • YDD - Yemeni Dinar
    • + *
    • YER - Yemeni Rial
    • + *
    • YUN - Yugoslavian Convertible Dinar (1990–1992)
    • + *
    • YUD - Yugoslavian Hard Dinar (1966–1990)
    • + *
    • YUM - Yugoslavian New Dinar (1994–2002)
    • + *
    • YUR - Yugoslavian Reformed Dinar (1992–1993)
    • + *
    • ZWN - ZWN
    • + *
    • ZRN - Zairean New Zaire (1993–1998)
    • + *
    • ZRZ - Zairean Zaire (1971–1993)
    • + *
    • ZMW - Zambian Kwacha
    • + *
    • ZMK - Zambian Kwacha (1968–2012)
    • + *
    • ZWD - Zimbabwean Dollar (1980–2008)
    • + *
    • ZWR - Zimbabwean Dollar (2008)
    • + *
    • ZWL - Zimbabwean Dollar (2009)
    • + *
    + */ @JsonSetter(value = "currency", nulls = Nulls.SKIP) - public Builder currency(Optional currency) { + public Builder currency(Optional currency) { this.currency = currency; return this; } - public Builder currency(TransactionCurrencyEnum currency) { + public Builder currency(VendorCreditRequestCurrency currency) { this.currency = Optional.ofNullable(currency); return this; } + /** + *

    The vendor credit's exchange rate.

    + */ @JsonSetter(value = "exchange_rate", nulls = Nulls.SKIP) public Builder exchangeRate(Optional exchangeRate) { this.exchangeRate = exchangeRate; @@ -656,6 +982,9 @@ public Builder exchangeRate(String exchangeRate) { return this; } + /** + *

    If the transaction is inclusive or exclusive of tax. True if inclusive, False if exclusive.

    + */ @JsonSetter(value = "inclusive_of_tax", nulls = Nulls.SKIP) public Builder inclusiveOfTax(Optional inclusiveOfTax) { this.inclusiveOfTax = inclusiveOfTax; @@ -667,6 +996,9 @@ public Builder inclusiveOfTax(Boolean inclusiveOfTax) { return this; } + /** + *

    The company the vendor credit belongs to.

    + */ @JsonSetter(value = "company", nulls = Nulls.SKIP) public Builder company(Optional company) { this.company = company; @@ -691,6 +1023,9 @@ public Builder trackingCategories( return this; } + /** + *

    A list of VendorCredit Applied to Lines objects.

    + */ @JsonSetter(value = "applied_to_lines", nulls = Nulls.SKIP) public Builder appliedToLines(Optional> appliedToLines) { this.appliedToLines = appliedToLines; @@ -702,6 +1037,9 @@ public Builder appliedToLines(List return this; } + /** + *

    The accounting period that the VendorCredit was generated in.

    + */ @JsonSetter(value = "accounting_period", nulls = Nulls.SKIP) public Builder accountingPeriod(Optional accountingPeriod) { this.accountingPeriod = accountingPeriod; diff --git a/src/main/java/com/merge/api/accounting/types/VendorCreditRequestCurrency.java b/src/main/java/com/merge/api/accounting/types/VendorCreditRequestCurrency.java new file mode 100644 index 000000000..abd3970e7 --- /dev/null +++ b/src/main/java/com/merge/api/accounting/types/VendorCreditRequestCurrency.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.accounting.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = VendorCreditRequestCurrency.Deserializer.class) +public final class VendorCreditRequestCurrency { + private final Object value; + + private final int type; + + private VendorCreditRequestCurrency(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((TransactionCurrencyEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof VendorCreditRequestCurrency && equalTo((VendorCreditRequestCurrency) other); + } + + private boolean equalTo(VendorCreditRequestCurrency other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static VendorCreditRequestCurrency of(TransactionCurrencyEnum value) { + return new VendorCreditRequestCurrency(value, 0); + } + + public static VendorCreditRequestCurrency of(String value) { + return new VendorCreditRequestCurrency(value, 1); + } + + public interface Visitor { + T visit(TransactionCurrencyEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(VendorCreditRequestCurrency.class); + } + + @java.lang.Override + public VendorCreditRequestCurrency deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TransactionCurrencyEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/accounting/types/VendorCreditsListRequest.java b/src/main/java/com/merge/api/accounting/types/VendorCreditsListRequest.java index 911a3eeee..79d4716c5 100644 --- a/src/main/java/com/merge/api/accounting/types/VendorCreditsListRequest.java +++ b/src/main/java/com/merge/api/accounting/types/VendorCreditsListRequest.java @@ -307,6 +307,9 @@ public Builder from(VendorCreditsListRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -323,6 +326,9 @@ public Builder expand(VendorCreditsListRequestExpandItem expand) { return this; } + /** + *

    If provided, will only return vendor credits for this company.

    + */ @JsonSetter(value = "company_id", nulls = Nulls.SKIP) public Builder companyId(Optional companyId) { this.companyId = companyId; @@ -334,6 +340,9 @@ public Builder companyId(String companyId) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -345,6 +354,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -356,6 +368,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -367,6 +382,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -378,6 +396,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -389,6 +410,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -400,6 +424,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -411,6 +438,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -422,6 +452,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -433,6 +466,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -444,6 +480,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "transaction_date_after", nulls = Nulls.SKIP) public Builder transactionDateAfter(Optional transactionDateAfter) { this.transactionDateAfter = transactionDateAfter; @@ -455,6 +494,9 @@ public Builder transactionDateAfter(OffsetDateTime transactionDateAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "transaction_date_before", nulls = Nulls.SKIP) public Builder transactionDateBefore(Optional transactionDateBefore) { this.transactionDateBefore = transactionDateBefore; diff --git a/src/main/java/com/merge/api/accounting/types/VendorCreditsRetrieveRequest.java b/src/main/java/com/merge/api/accounting/types/VendorCreditsRetrieveRequest.java index ddbe30140..c9a331ad1 100644 --- a/src/main/java/com/merge/api/accounting/types/VendorCreditsRetrieveRequest.java +++ b/src/main/java/com/merge/api/accounting/types/VendorCreditsRetrieveRequest.java @@ -116,6 +116,9 @@ public Builder from(VendorCreditsRetrieveRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -132,6 +135,9 @@ public Builder expand(VendorCreditsRetrieveRequestExpandItem expand) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -143,6 +149,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/ats/AsyncRawAccountDetailsClient.java b/src/main/java/com/merge/api/ats/AsyncRawAccountDetailsClient.java index 0e705a95e..21a89d458 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawAccountDetailsClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawAccountDetailsClient.java @@ -40,7 +40,7 @@ public CompletableFuture> retrieve() { * Get details for a linked account. */ public CompletableFuture> retrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/account-details") .build(); diff --git a/src/main/java/com/merge/api/ats/AsyncRawAccountTokenClient.java b/src/main/java/com/merge/api/ats/AsyncRawAccountTokenClient.java index 510e32952..ff1974883 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawAccountTokenClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawAccountTokenClient.java @@ -41,7 +41,7 @@ public CompletableFuture> retrieve(String pub */ public CompletableFuture> retrieve( String publicToken, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/account-token") .addPathSegment(publicToken) diff --git a/src/main/java/com/merge/api/ats/AsyncRawActivitiesClient.java b/src/main/java/com/merge/api/ats/AsyncRawActivitiesClient.java index a6878f9d2..1bfb32b15 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawActivitiesClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawActivitiesClient.java @@ -64,7 +64,7 @@ public CompletableFuture>> lis */ public CompletableFuture>> list( ActivitiesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/activities"); if (request.getCreatedAfter().isPresent()) { @@ -208,7 +208,7 @@ public CompletableFuture> create(Activity */ public CompletableFuture> create( ActivityEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/activities"); if (request.getIsDebugMode().isPresent()) { @@ -290,7 +290,7 @@ public CompletableFuture> retrieve(String id, Act */ public CompletableFuture> retrieve( String id, ActivitiesRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/activities") .addPathSegment(id); @@ -375,7 +375,7 @@ public CompletableFuture> metaPostRetrieve() * Returns metadata for Activity POSTs. */ public CompletableFuture> metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/activities/meta/post") .build(); diff --git a/src/main/java/com/merge/api/ats/AsyncRawApplicationsClient.java b/src/main/java/com/merge/api/ats/AsyncRawApplicationsClient.java index 8826aaedb..17ae90c37 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawApplicationsClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawApplicationsClient.java @@ -67,7 +67,7 @@ public CompletableFuture>> */ public CompletableFuture>> list( ApplicationsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/applications"); if (request.getCandidateId().isPresent()) { @@ -224,7 +224,7 @@ public CompletableFuture> create(Appli */ public CompletableFuture> create( ApplicationEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/applications"); if (request.getIsDebugMode().isPresent()) { @@ -307,7 +307,7 @@ public CompletableFuture> retrieve( */ public CompletableFuture> retrieve( String id, ApplicationsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/applications") .addPathSegment(id); @@ -391,7 +391,7 @@ public CompletableFuture> changeStageC */ public CompletableFuture> changeStageCreate( String id, UpdateApplicationStageRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/applications") .addPathSegment(id) @@ -480,7 +480,7 @@ public CompletableFuture> metaPostRetrieve( */ public CompletableFuture> metaPostRetrieve( ApplicationsMetaPostRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/applications/meta/post"); if (request.getApplicationRemoteTemplateId().isPresent()) { diff --git a/src/main/java/com/merge/api/ats/AsyncRawAsyncPassthroughClient.java b/src/main/java/com/merge/api/ats/AsyncRawAsyncPassthroughClient.java index a5e67682b..aa5fed334 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawAsyncPassthroughClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawAsyncPassthroughClient.java @@ -46,7 +46,7 @@ public CompletableFuture> create(D */ public CompletableFuture> create( DataPassthroughRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/async-passthrough") .build(); @@ -113,7 +113,7 @@ public CompletableFuture> */ public CompletableFuture> retrieve( String asyncPassthroughReceiptId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/async-passthrough") .addPathSegment(asyncPassthroughReceiptId) diff --git a/src/main/java/com/merge/api/ats/AsyncRawAttachmentsClient.java b/src/main/java/com/merge/api/ats/AsyncRawAttachmentsClient.java index 9c73e0016..48f3680cf 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawAttachmentsClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawAttachmentsClient.java @@ -65,7 +65,7 @@ public CompletableFuture>> l */ public CompletableFuture>> list( AttachmentsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/attachments"); if (request.getCandidateId().isPresent()) { @@ -206,7 +206,7 @@ public CompletableFuture> create(Attach */ public CompletableFuture> create( AttachmentEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/attachments"); if (request.getIsDebugMode().isPresent()) { @@ -288,7 +288,7 @@ public CompletableFuture> retrieve(String id, A */ public CompletableFuture> retrieve( String id, AttachmentsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/attachments") .addPathSegment(id); @@ -371,7 +371,7 @@ public CompletableFuture> metaPostRetrieve() * Returns metadata for Attachment POSTs. */ public CompletableFuture> metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/attachments/meta/post") .build(); diff --git a/src/main/java/com/merge/api/ats/AsyncRawAuditTrailClient.java b/src/main/java/com/merge/api/ats/AsyncRawAuditTrailClient.java index 6201748f1..5fa896142 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawAuditTrailClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawAuditTrailClient.java @@ -57,7 +57,7 @@ public CompletableFuture> */ public CompletableFuture>> list( AuditTrailListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/audit-trail"); if (request.getCursor().isPresent()) { diff --git a/src/main/java/com/merge/api/ats/AsyncRawAvailableActionsClient.java b/src/main/java/com/merge/api/ats/AsyncRawAvailableActionsClient.java index ec863edc6..36a251e52 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawAvailableActionsClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawAvailableActionsClient.java @@ -40,7 +40,7 @@ public CompletableFuture> retrieve() { * Returns a list of models and actions available for an account. */ public CompletableFuture> retrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/available-actions") .build(); diff --git a/src/main/java/com/merge/api/ats/AsyncRawCandidatesClient.java b/src/main/java/com/merge/api/ats/AsyncRawCandidatesClient.java index e1cd441d8..b564454ec 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawCandidatesClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawCandidatesClient.java @@ -67,7 +67,7 @@ public CompletableFuture>> li */ public CompletableFuture>> list( CandidatesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/candidates"); if (request.getCreatedAfter().isPresent()) { @@ -212,7 +212,7 @@ public CompletableFuture> create(Candida */ public CompletableFuture> create( CandidateEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/candidates"); if (request.getIsDebugMode().isPresent()) { @@ -294,7 +294,7 @@ public CompletableFuture> retrieve(String id, Ca */ public CompletableFuture> retrieve( String id, CandidatesRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/candidates") .addPathSegment(id); @@ -370,7 +370,7 @@ public CompletableFuture> partialUpdate( */ public CompletableFuture> partialUpdate( String id, PatchedCandidateEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/candidates") .addPathSegment(id); @@ -447,7 +447,7 @@ public CompletableFuture> ignoreCreate( */ public CompletableFuture> ignoreCreate( String modelId, IgnoreCommonModelRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/candidates/ignore") .addPathSegment(modelId) @@ -510,7 +510,7 @@ public CompletableFuture> metaPatchRetrieve(S */ public CompletableFuture> metaPatchRetrieve( String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/candidates/meta/patch") .addPathSegment(id) @@ -568,7 +568,7 @@ public CompletableFuture> metaPostRetrieve() * Returns metadata for Candidate POSTs. */ public CompletableFuture> metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/candidates/meta/post") .build(); diff --git a/src/main/java/com/merge/api/ats/AsyncRawDeleteAccountClient.java b/src/main/java/com/merge/api/ats/AsyncRawDeleteAccountClient.java index 53c9959c5..9949058f1 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawDeleteAccountClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawDeleteAccountClient.java @@ -40,7 +40,7 @@ public CompletableFuture> delete() { * Delete a linked account. */ public CompletableFuture> delete(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/delete-account") .build(); diff --git a/src/main/java/com/merge/api/ats/AsyncRawDepartmentsClient.java b/src/main/java/com/merge/api/ats/AsyncRawDepartmentsClient.java index 6d3b2d853..13fa45a13 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawDepartmentsClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawDepartmentsClient.java @@ -58,7 +58,7 @@ public CompletableFuture>> l */ public CompletableFuture>> list( DepartmentsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/departments"); if (request.getCreatedAfter().isPresent()) { @@ -190,7 +190,7 @@ public CompletableFuture> retrieve(String id, D */ public CompletableFuture> retrieve( String id, DepartmentsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/departments") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/ats/AsyncRawEeocsClient.java b/src/main/java/com/merge/api/ats/AsyncRawEeocsClient.java index b0bdf3f73..bcc7f39dc 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawEeocsClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawEeocsClient.java @@ -57,7 +57,7 @@ public CompletableFuture>> list(Ee */ public CompletableFuture>> list( EeocsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/eeocs"); if (request.getCandidateId().isPresent()) { @@ -208,7 +208,7 @@ public CompletableFuture> retrieve(String id, EeocsRe */ public CompletableFuture> retrieve( String id, EeocsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/eeocs") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/ats/AsyncRawFieldMappingClient.java b/src/main/java/com/merge/api/ats/AsyncRawFieldMappingClient.java index 27a02f22c..b2bb7d6f2 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawFieldMappingClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawFieldMappingClient.java @@ -62,7 +62,7 @@ public CompletableFuture> */ public CompletableFuture> fieldMappingsRetrieve( FieldMappingsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/field-mappings"); if (request.getExcludeRemoteFieldMetadata().isPresent()) { @@ -128,7 +128,7 @@ public CompletableFuture> fie */ public CompletableFuture> fieldMappingsCreate( CreateFieldMappingRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/field-mappings"); if (request.getExcludeRemoteFieldMetadata().isPresent()) { @@ -208,7 +208,7 @@ public CompletableFuture> fie */ public CompletableFuture> fieldMappingsDestroy( String fieldMappingId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/field-mappings") .addPathSegment(fieldMappingId) @@ -278,7 +278,7 @@ public CompletableFuture> fie */ public CompletableFuture> fieldMappingsPartialUpdate( String fieldMappingId, PatchedEditFieldMappingRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/field-mappings") .addPathSegment(fieldMappingId) @@ -353,7 +353,7 @@ public CompletableFuture> remoteFie */ public CompletableFuture> remoteFieldsRetrieve( RemoteFieldsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/remote-fields"); if (request.getCommonModels().isPresent()) { @@ -422,7 +422,7 @@ public CompletableFuture> t */ public CompletableFuture> targetFieldsRetrieve( RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/target-fields") .build(); diff --git a/src/main/java/com/merge/api/ats/AsyncRawForceResyncClient.java b/src/main/java/com/merge/api/ats/AsyncRawForceResyncClient.java index 9af27710d..d45966b04 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawForceResyncClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawForceResyncClient.java @@ -44,7 +44,7 @@ public CompletableFuture>> syncStatusResyn */ public CompletableFuture>> syncStatusResyncCreate( RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/sync-status/resync") .build(); diff --git a/src/main/java/com/merge/api/ats/AsyncRawGenerateKeyClient.java b/src/main/java/com/merge/api/ats/AsyncRawGenerateKeyClient.java index c4693be6c..bb0c4c389 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawGenerateKeyClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawGenerateKeyClient.java @@ -45,7 +45,7 @@ public CompletableFuture> create(GenerateRemoteK */ public CompletableFuture> create( GenerateRemoteKeyRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/generate-key") .build(); diff --git a/src/main/java/com/merge/api/ats/AsyncRawInterviewsClient.java b/src/main/java/com/merge/api/ats/AsyncRawInterviewsClient.java index 159643196..2712ea00c 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawInterviewsClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawInterviewsClient.java @@ -65,7 +65,7 @@ public CompletableFuture>> list( InterviewsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/interviews"); if (request.getApplicationId().isPresent()) { @@ -224,7 +224,7 @@ public CompletableFuture> creat */ public CompletableFuture> create( ScheduledInterviewEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/interviews"); if (request.getIsDebugMode().isPresent()) { @@ -308,7 +308,7 @@ public CompletableFuture> retrieve( */ public CompletableFuture> retrieve( String id, InterviewsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/interviews") .addPathSegment(id); @@ -391,7 +391,7 @@ public CompletableFuture> metaPostRetrieve() * Returns metadata for ScheduledInterview POSTs. */ public CompletableFuture> metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/interviews/meta/post") .build(); diff --git a/src/main/java/com/merge/api/ats/AsyncRawIssuesClient.java b/src/main/java/com/merge/api/ats/AsyncRawIssuesClient.java index 1a804dfd6..b30514af2 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawIssuesClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawIssuesClient.java @@ -56,7 +56,7 @@ public CompletableFuture>> list(I */ public CompletableFuture>> list( IssuesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/issues"); if (request.getAccountToken().isPresent()) { @@ -199,7 +199,7 @@ public CompletableFuture> retrieve(String id) { * Get a specific issue. */ public CompletableFuture> retrieve(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/issues") .addPathSegment(id) diff --git a/src/main/java/com/merge/api/ats/AsyncRawJobInterviewStagesClient.java b/src/main/java/com/merge/api/ats/AsyncRawJobInterviewStagesClient.java index 3d90d40a8..38fae44c8 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawJobInterviewStagesClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawJobInterviewStagesClient.java @@ -58,7 +58,7 @@ public CompletableFuture>> list( JobInterviewStagesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/job-interview-stages"); if (request.getCreatedAfter().isPresent()) { @@ -201,7 +201,7 @@ public CompletableFuture> retrieve( */ public CompletableFuture> retrieve( String id, JobInterviewStagesRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/job-interview-stages") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/ats/AsyncRawJobPostingsClient.java b/src/main/java/com/merge/api/ats/AsyncRawJobPostingsClient.java index 5c51762a7..02c36c21f 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawJobPostingsClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawJobPostingsClient.java @@ -58,7 +58,7 @@ public CompletableFuture>> l */ public CompletableFuture>> list( JobPostingsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/job-postings"); if (request.getCreatedAfter().isPresent()) { @@ -198,7 +198,7 @@ public CompletableFuture> retrieve(String id, J */ public CompletableFuture> retrieve( String id, JobPostingsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/job-postings") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/ats/AsyncRawJobsClient.java b/src/main/java/com/merge/api/ats/AsyncRawJobsClient.java index ff7e026a1..c7b05c84d 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawJobsClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawJobsClient.java @@ -60,7 +60,7 @@ public CompletableFuture>> list(Job */ public CompletableFuture>> list( JobsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/jobs"); if (request.getCode().isPresent()) { @@ -216,7 +216,7 @@ public CompletableFuture> retrieve(String id, JobsRetr */ public CompletableFuture> retrieve( String id, JobsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/jobs") .addPathSegment(id); @@ -309,7 +309,7 @@ public CompletableFuture>> screeningQuestionsList( String jobId, JobsScreeningQuestionsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/jobs") .addPathSegment(jobId) diff --git a/src/main/java/com/merge/api/ats/AsyncRawLinkTokenClient.java b/src/main/java/com/merge/api/ats/AsyncRawLinkTokenClient.java index ace610cc7..dc05b56df 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawLinkTokenClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawLinkTokenClient.java @@ -45,7 +45,7 @@ public CompletableFuture> create(EndUserDetailsR */ public CompletableFuture> create( EndUserDetailsRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/link-token") .build(); diff --git a/src/main/java/com/merge/api/ats/AsyncRawLinkedAccountsClient.java b/src/main/java/com/merge/api/ats/AsyncRawLinkedAccountsClient.java index 3746141cf..c8bcca45d 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawLinkedAccountsClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawLinkedAccountsClient.java @@ -57,7 +57,7 @@ public CompletableFuture>> list( LinkedAccountsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/linked-accounts"); if (request.getCategory().isPresent()) { diff --git a/src/main/java/com/merge/api/ats/AsyncRawOffersClient.java b/src/main/java/com/merge/api/ats/AsyncRawOffersClient.java index 02eb8fe39..8e95abdf5 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawOffersClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawOffersClient.java @@ -57,7 +57,7 @@ public CompletableFuture>> list(O */ public CompletableFuture>> list( OffersListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/offers"); if (request.getApplicationId().isPresent()) { @@ -209,7 +209,7 @@ public CompletableFuture> retrieve(String id, Offers */ public CompletableFuture> retrieve( String id, OffersRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/offers") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/ats/AsyncRawOfficesClient.java b/src/main/java/com/merge/api/ats/AsyncRawOfficesClient.java index d180f1f97..d3baef8e8 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawOfficesClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawOfficesClient.java @@ -57,7 +57,7 @@ public CompletableFuture>> list( */ public CompletableFuture>> list( OfficesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/offices"); if (request.getCreatedAfter().isPresent()) { @@ -189,7 +189,7 @@ public CompletableFuture> retrieve(String id, Offic */ public CompletableFuture> retrieve( String id, OfficesRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/offices") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/ats/AsyncRawPassthroughClient.java b/src/main/java/com/merge/api/ats/AsyncRawPassthroughClient.java index 94de4aeb9..d26f4af70 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawPassthroughClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawPassthroughClient.java @@ -45,7 +45,7 @@ public CompletableFuture> create(DataPassth */ public CompletableFuture> create( DataPassthroughRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/passthrough") .build(); diff --git a/src/main/java/com/merge/api/ats/AsyncRawRegenerateKeyClient.java b/src/main/java/com/merge/api/ats/AsyncRawRegenerateKeyClient.java index 3b44d2484..408bb26a0 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawRegenerateKeyClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawRegenerateKeyClient.java @@ -45,7 +45,7 @@ public CompletableFuture> create(RemoteKeyForReg */ public CompletableFuture> create( RemoteKeyForRegenerationRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/regenerate-key") .build(); diff --git a/src/main/java/com/merge/api/ats/AsyncRawRejectReasonsClient.java b/src/main/java/com/merge/api/ats/AsyncRawRejectReasonsClient.java index 1392a4f53..d2aa4a756 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawRejectReasonsClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawRejectReasonsClient.java @@ -58,7 +58,7 @@ public CompletableFuture>> */ public CompletableFuture>> list( RejectReasonsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/reject-reasons"); if (request.getCreatedAfter().isPresent()) { @@ -191,7 +191,7 @@ public CompletableFuture> retrieve( */ public CompletableFuture> retrieve( String id, RejectReasonsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/reject-reasons") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/ats/AsyncRawScopesClient.java b/src/main/java/com/merge/api/ats/AsyncRawScopesClient.java index 57ae88bcd..fd8680d71 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawScopesClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawScopesClient.java @@ -45,7 +45,7 @@ public CompletableFuture> defaultScope */ public CompletableFuture> defaultScopesRetrieve( RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/default-scopes") .build(); @@ -103,7 +103,7 @@ public CompletableFuture> linkedAccoun */ public CompletableFuture> linkedAccountScopesRetrieve( RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/linked-account-scopes") .build(); @@ -162,7 +162,7 @@ public CompletableFuture> linkedAccoun */ public CompletableFuture> linkedAccountScopesCreate( LinkedAccountCommonModelScopeDeserializerRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/linked-account-scopes") .build(); diff --git a/src/main/java/com/merge/api/ats/AsyncRawScorecardsClient.java b/src/main/java/com/merge/api/ats/AsyncRawScorecardsClient.java index 31c27061d..baf62dee8 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawScorecardsClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawScorecardsClient.java @@ -57,7 +57,7 @@ public CompletableFuture>> li */ public CompletableFuture>> list( ScorecardsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/scorecards"); if (request.getApplicationId().isPresent()) { @@ -213,7 +213,7 @@ public CompletableFuture> retrieve(String id, Sc */ public CompletableFuture> retrieve( String id, ScorecardsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/scorecards") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/ats/AsyncRawSyncStatusClient.java b/src/main/java/com/merge/api/ats/AsyncRawSyncStatusClient.java index b3f3fa3a6..4e18f3a4b 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawSyncStatusClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawSyncStatusClient.java @@ -56,7 +56,7 @@ public CompletableFuture>> l */ public CompletableFuture>> list( SyncStatusListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/sync-status"); if (request.getCursor().isPresent()) { diff --git a/src/main/java/com/merge/api/ats/AsyncRawTagsClient.java b/src/main/java/com/merge/api/ats/AsyncRawTagsClient.java index 93940e903..5eff020bd 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawTagsClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawTagsClient.java @@ -56,7 +56,7 @@ public CompletableFuture>> list(Tag */ public CompletableFuture>> list( TagsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/tags"); if (request.getCreatedAfter().isPresent()) { diff --git a/src/main/java/com/merge/api/ats/AsyncRawUsersClient.java b/src/main/java/com/merge/api/ats/AsyncRawUsersClient.java index e30aa57ef..fb358be9e 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawUsersClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawUsersClient.java @@ -57,7 +57,7 @@ public CompletableFuture>> l */ public CompletableFuture>> list( UsersListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/users"); if (request.getCreatedAfter().isPresent()) { @@ -201,7 +201,7 @@ public CompletableFuture> retrieve(String id, U */ public CompletableFuture> retrieve( String id, UsersRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/users") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/ats/AsyncRawWebhookReceiversClient.java b/src/main/java/com/merge/api/ats/AsyncRawWebhookReceiversClient.java index 37aab5080..106da8e34 100644 --- a/src/main/java/com/merge/api/ats/AsyncRawWebhookReceiversClient.java +++ b/src/main/java/com/merge/api/ats/AsyncRawWebhookReceiversClient.java @@ -46,7 +46,7 @@ public CompletableFuture>> list() { * Returns a list of WebhookReceiver objects. */ public CompletableFuture>> list(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/webhook-receivers") .build(); @@ -105,7 +105,7 @@ public CompletableFuture> create(WebhookRe */ public CompletableFuture> create( WebhookReceiverRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/webhook-receivers") .build(); diff --git a/src/main/java/com/merge/api/ats/RawAccountDetailsClient.java b/src/main/java/com/merge/api/ats/RawAccountDetailsClient.java index 1c38fbf27..31be682de 100644 --- a/src/main/java/com/merge/api/ats/RawAccountDetailsClient.java +++ b/src/main/java/com/merge/api/ats/RawAccountDetailsClient.java @@ -36,7 +36,7 @@ public MergeApiHttpResponse retrieve() { * Get details for a linked account. */ public MergeApiHttpResponse retrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/account-details") .build(); diff --git a/src/main/java/com/merge/api/ats/RawAccountTokenClient.java b/src/main/java/com/merge/api/ats/RawAccountTokenClient.java index ee4d2e261..3a5ddd972 100644 --- a/src/main/java/com/merge/api/ats/RawAccountTokenClient.java +++ b/src/main/java/com/merge/api/ats/RawAccountTokenClient.java @@ -36,7 +36,7 @@ public MergeApiHttpResponse retrieve(String publicToken) { * Returns the account token for the end user with the provided public token. */ public MergeApiHttpResponse retrieve(String publicToken, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/account-token") .addPathSegment(publicToken) diff --git a/src/main/java/com/merge/api/ats/RawActivitiesClient.java b/src/main/java/com/merge/api/ats/RawActivitiesClient.java index 8c2b695de..349f76a5b 100644 --- a/src/main/java/com/merge/api/ats/RawActivitiesClient.java +++ b/src/main/java/com/merge/api/ats/RawActivitiesClient.java @@ -59,7 +59,7 @@ public MergeApiHttpResponse> list(ActivitiesListReq */ public MergeApiHttpResponse> list( ActivitiesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/activities"); if (request.getCreatedAfter().isPresent()) { @@ -184,7 +184,7 @@ public MergeApiHttpResponse create(ActivityEndpointRequest req */ public MergeApiHttpResponse create( ActivityEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/activities"); if (request.getIsDebugMode().isPresent()) { @@ -252,7 +252,7 @@ public MergeApiHttpResponse retrieve(String id, ActivitiesRetrieveRequ */ public MergeApiHttpResponse retrieve( String id, ActivitiesRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/activities") .addPathSegment(id); @@ -324,7 +324,7 @@ public MergeApiHttpResponse metaPostRetrieve() { * Returns metadata for Activity POSTs. */ public MergeApiHttpResponse metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/activities/meta/post") .build(); diff --git a/src/main/java/com/merge/api/ats/RawApplicationsClient.java b/src/main/java/com/merge/api/ats/RawApplicationsClient.java index 87db24a73..55bb50d0a 100644 --- a/src/main/java/com/merge/api/ats/RawApplicationsClient.java +++ b/src/main/java/com/merge/api/ats/RawApplicationsClient.java @@ -61,7 +61,7 @@ public MergeApiHttpResponse> list(ApplicationsLi */ public MergeApiHttpResponse> list( ApplicationsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/applications"); if (request.getCandidateId().isPresent()) { @@ -199,7 +199,7 @@ public MergeApiHttpResponse create(ApplicationEndpointReque */ public MergeApiHttpResponse create( ApplicationEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/applications"); if (request.getIsDebugMode().isPresent()) { @@ -268,7 +268,7 @@ public MergeApiHttpResponse retrieve(String id, ApplicationsRetriev */ public MergeApiHttpResponse retrieve( String id, ApplicationsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/applications") .addPathSegment(id); @@ -338,7 +338,7 @@ public MergeApiHttpResponse changeStageCreate( */ public MergeApiHttpResponse changeStageCreate( String id, UpdateApplicationStageRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/applications") .addPathSegment(id) @@ -413,7 +413,7 @@ public MergeApiHttpResponse metaPostRetrieve(ApplicationsMetaPostR */ public MergeApiHttpResponse metaPostRetrieve( ApplicationsMetaPostRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/applications/meta/post"); if (request.getApplicationRemoteTemplateId().isPresent()) { diff --git a/src/main/java/com/merge/api/ats/RawAsyncPassthroughClient.java b/src/main/java/com/merge/api/ats/RawAsyncPassthroughClient.java index 33c300674..7dfb427a9 100644 --- a/src/main/java/com/merge/api/ats/RawAsyncPassthroughClient.java +++ b/src/main/java/com/merge/api/ats/RawAsyncPassthroughClient.java @@ -42,7 +42,7 @@ public MergeApiHttpResponse create(DataPassthroughReque */ public MergeApiHttpResponse create( DataPassthroughRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/async-passthrough") .build(); @@ -94,7 +94,7 @@ public MergeApiHttpResponse retrieve(String as */ public MergeApiHttpResponse retrieve( String asyncPassthroughReceiptId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/async-passthrough") .addPathSegment(asyncPassthroughReceiptId) diff --git a/src/main/java/com/merge/api/ats/RawAttachmentsClient.java b/src/main/java/com/merge/api/ats/RawAttachmentsClient.java index e910fcb3a..dbbb5ca06 100644 --- a/src/main/java/com/merge/api/ats/RawAttachmentsClient.java +++ b/src/main/java/com/merge/api/ats/RawAttachmentsClient.java @@ -59,7 +59,7 @@ public MergeApiHttpResponse> list(AttachmentsList */ public MergeApiHttpResponse> list( AttachmentsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/attachments"); if (request.getCandidateId().isPresent()) { @@ -181,7 +181,7 @@ public MergeApiHttpResponse create(AttachmentEndpointRequest */ public MergeApiHttpResponse create( AttachmentEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/attachments"); if (request.getIsDebugMode().isPresent()) { @@ -249,7 +249,7 @@ public MergeApiHttpResponse retrieve(String id, AttachmentsRetrieveR */ public MergeApiHttpResponse retrieve( String id, AttachmentsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/attachments") .addPathSegment(id); @@ -318,7 +318,7 @@ public MergeApiHttpResponse metaPostRetrieve() { * Returns metadata for Attachment POSTs. */ public MergeApiHttpResponse metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/attachments/meta/post") .build(); diff --git a/src/main/java/com/merge/api/ats/RawAuditTrailClient.java b/src/main/java/com/merge/api/ats/RawAuditTrailClient.java index 5455c7db5..f2876ef3d 100644 --- a/src/main/java/com/merge/api/ats/RawAuditTrailClient.java +++ b/src/main/java/com/merge/api/ats/RawAuditTrailClient.java @@ -51,7 +51,7 @@ public MergeApiHttpResponse> list(AuditTrailLi */ public MergeApiHttpResponse> list( AuditTrailListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/audit-trail"); if (request.getCursor().isPresent()) { diff --git a/src/main/java/com/merge/api/ats/RawAvailableActionsClient.java b/src/main/java/com/merge/api/ats/RawAvailableActionsClient.java index 73a0bdc8b..84e83c9e7 100644 --- a/src/main/java/com/merge/api/ats/RawAvailableActionsClient.java +++ b/src/main/java/com/merge/api/ats/RawAvailableActionsClient.java @@ -36,7 +36,7 @@ public MergeApiHttpResponse retrieve() { * Returns a list of models and actions available for an account. */ public MergeApiHttpResponse retrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/available-actions") .build(); diff --git a/src/main/java/com/merge/api/ats/RawCandidatesClient.java b/src/main/java/com/merge/api/ats/RawCandidatesClient.java index 49ecdc3ba..53d96ea23 100644 --- a/src/main/java/com/merge/api/ats/RawCandidatesClient.java +++ b/src/main/java/com/merge/api/ats/RawCandidatesClient.java @@ -62,7 +62,7 @@ public MergeApiHttpResponse> list(CandidatesListRe */ public MergeApiHttpResponse> list( CandidatesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/candidates"); if (request.getCreatedAfter().isPresent()) { @@ -188,7 +188,7 @@ public MergeApiHttpResponse create(CandidateEndpointRequest r */ public MergeApiHttpResponse create( CandidateEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/candidates"); if (request.getIsDebugMode().isPresent()) { @@ -256,7 +256,7 @@ public MergeApiHttpResponse retrieve(String id, CandidatesRetrieveReq */ public MergeApiHttpResponse retrieve( String id, CandidatesRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/candidates") .addPathSegment(id); @@ -318,7 +318,7 @@ public MergeApiHttpResponse partialUpdate(String id, PatchedC */ public MergeApiHttpResponse partialUpdate( String id, PatchedCandidateEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/candidates") .addPathSegment(id); @@ -380,7 +380,7 @@ public MergeApiHttpResponse ignoreCreate(String modelId, IgnoreCommonModel */ public MergeApiHttpResponse ignoreCreate( String modelId, IgnoreCommonModelRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/candidates/ignore") .addPathSegment(modelId) @@ -429,7 +429,7 @@ public MergeApiHttpResponse metaPatchRetrieve(String id) { * Returns metadata for Candidate PATCHs. */ public MergeApiHttpResponse metaPatchRetrieve(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/candidates/meta/patch") .addPathSegment(id) @@ -473,7 +473,7 @@ public MergeApiHttpResponse metaPostRetrieve() { * Returns metadata for Candidate POSTs. */ public MergeApiHttpResponse metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/candidates/meta/post") .build(); diff --git a/src/main/java/com/merge/api/ats/RawDeleteAccountClient.java b/src/main/java/com/merge/api/ats/RawDeleteAccountClient.java index 707eaa04c..1afcccdfd 100644 --- a/src/main/java/com/merge/api/ats/RawDeleteAccountClient.java +++ b/src/main/java/com/merge/api/ats/RawDeleteAccountClient.java @@ -36,7 +36,7 @@ public MergeApiHttpResponse delete() { * Delete a linked account. */ public MergeApiHttpResponse delete(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/delete-account") .build(); diff --git a/src/main/java/com/merge/api/ats/RawDepartmentsClient.java b/src/main/java/com/merge/api/ats/RawDepartmentsClient.java index 4d1e21118..368adb383 100644 --- a/src/main/java/com/merge/api/ats/RawDepartmentsClient.java +++ b/src/main/java/com/merge/api/ats/RawDepartmentsClient.java @@ -52,7 +52,7 @@ public MergeApiHttpResponse> list(DepartmentsList */ public MergeApiHttpResponse> list( DepartmentsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/departments"); if (request.getCreatedAfter().isPresent()) { @@ -165,7 +165,7 @@ public MergeApiHttpResponse retrieve(String id, DepartmentsRetrieveR */ public MergeApiHttpResponse retrieve( String id, DepartmentsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/departments") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/ats/RawEeocsClient.java b/src/main/java/com/merge/api/ats/RawEeocsClient.java index 658c27ee1..1d44611ba 100644 --- a/src/main/java/com/merge/api/ats/RawEeocsClient.java +++ b/src/main/java/com/merge/api/ats/RawEeocsClient.java @@ -52,7 +52,7 @@ public MergeApiHttpResponse> list(EeocsListRequest requ */ public MergeApiHttpResponse> list( EeocsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/eeocs"); if (request.getCandidateId().isPresent()) { @@ -183,7 +183,7 @@ public MergeApiHttpResponse retrieve(String id, EeocsRetrieveRequest reque * Returns an EEOC object with the given id. */ public MergeApiHttpResponse retrieve(String id, EeocsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/eeocs") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/ats/RawFieldMappingClient.java b/src/main/java/com/merge/api/ats/RawFieldMappingClient.java index 5bb4ed390..3758d7501 100644 --- a/src/main/java/com/merge/api/ats/RawFieldMappingClient.java +++ b/src/main/java/com/merge/api/ats/RawFieldMappingClient.java @@ -58,7 +58,7 @@ public MergeApiHttpResponse fieldMappingsRetrie */ public MergeApiHttpResponse fieldMappingsRetrieve( FieldMappingsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/field-mappings"); if (request.getExcludeRemoteFieldMetadata().isPresent()) { @@ -110,7 +110,7 @@ public MergeApiHttpResponse fieldMappingsCreate(Cr */ public MergeApiHttpResponse fieldMappingsCreate( CreateFieldMappingRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/field-mappings"); if (request.getExcludeRemoteFieldMetadata().isPresent()) { @@ -175,7 +175,7 @@ public MergeApiHttpResponse fieldMappingsDestroy(S */ public MergeApiHttpResponse fieldMappingsDestroy( String fieldMappingId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/field-mappings") .addPathSegment(fieldMappingId) @@ -230,7 +230,7 @@ public MergeApiHttpResponse fieldMappingsPartialUp */ public MergeApiHttpResponse fieldMappingsPartialUpdate( String fieldMappingId, PatchedEditFieldMappingRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/field-mappings") .addPathSegment(fieldMappingId) @@ -290,7 +290,7 @@ public MergeApiHttpResponse remoteFieldsRetrieve(RemoteF */ public MergeApiHttpResponse remoteFieldsRetrieve( RemoteFieldsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/remote-fields"); if (request.getCommonModels().isPresent()) { @@ -344,7 +344,7 @@ public MergeApiHttpResponse targetFieldsRetrieve * 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. */ public MergeApiHttpResponse targetFieldsRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/target-fields") .build(); diff --git a/src/main/java/com/merge/api/ats/RawForceResyncClient.java b/src/main/java/com/merge/api/ats/RawForceResyncClient.java index 48a4e0f56..cbb10d214 100644 --- a/src/main/java/com/merge/api/ats/RawForceResyncClient.java +++ b/src/main/java/com/merge/api/ats/RawForceResyncClient.java @@ -39,7 +39,7 @@ public MergeApiHttpResponse> syncStatusResyncCreate() { * 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. */ public MergeApiHttpResponse> syncStatusResyncCreate(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/sync-status/resync") .build(); diff --git a/src/main/java/com/merge/api/ats/RawGenerateKeyClient.java b/src/main/java/com/merge/api/ats/RawGenerateKeyClient.java index 2e814572b..5160c6b18 100644 --- a/src/main/java/com/merge/api/ats/RawGenerateKeyClient.java +++ b/src/main/java/com/merge/api/ats/RawGenerateKeyClient.java @@ -40,7 +40,7 @@ public MergeApiHttpResponse create(GenerateRemoteKeyRequest request) * Create a remote key. */ public MergeApiHttpResponse create(GenerateRemoteKeyRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/generate-key") .build(); diff --git a/src/main/java/com/merge/api/ats/RawInterviewsClient.java b/src/main/java/com/merge/api/ats/RawInterviewsClient.java index 1b31b9133..26c56de9c 100644 --- a/src/main/java/com/merge/api/ats/RawInterviewsClient.java +++ b/src/main/java/com/merge/api/ats/RawInterviewsClient.java @@ -59,7 +59,7 @@ public MergeApiHttpResponse> list(Intervi */ public MergeApiHttpResponse> list( InterviewsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/interviews"); if (request.getApplicationId().isPresent()) { @@ -196,7 +196,7 @@ public MergeApiHttpResponse create(ScheduledIntervie */ public MergeApiHttpResponse create( ScheduledInterviewEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/interviews"); if (request.getIsDebugMode().isPresent()) { @@ -265,7 +265,7 @@ public MergeApiHttpResponse retrieve(String id, InterviewsRe */ public MergeApiHttpResponse retrieve( String id, InterviewsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/interviews") .addPathSegment(id); @@ -334,7 +334,7 @@ public MergeApiHttpResponse metaPostRetrieve() { * Returns metadata for ScheduledInterview POSTs. */ public MergeApiHttpResponse metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/interviews/meta/post") .build(); diff --git a/src/main/java/com/merge/api/ats/RawIssuesClient.java b/src/main/java/com/merge/api/ats/RawIssuesClient.java index 599a9811a..1b6b451a8 100644 --- a/src/main/java/com/merge/api/ats/RawIssuesClient.java +++ b/src/main/java/com/merge/api/ats/RawIssuesClient.java @@ -51,7 +51,7 @@ public MergeApiHttpResponse> list(IssuesListRequest re */ public MergeApiHttpResponse> list( IssuesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/issues"); if (request.getAccountToken().isPresent()) { @@ -175,7 +175,7 @@ public MergeApiHttpResponse retrieve(String id) { * Get a specific issue. */ public MergeApiHttpResponse retrieve(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/issues") .addPathSegment(id) diff --git a/src/main/java/com/merge/api/ats/RawJobInterviewStagesClient.java b/src/main/java/com/merge/api/ats/RawJobInterviewStagesClient.java index 4da8cc8a9..ef546bacc 100644 --- a/src/main/java/com/merge/api/ats/RawJobInterviewStagesClient.java +++ b/src/main/java/com/merge/api/ats/RawJobInterviewStagesClient.java @@ -52,7 +52,7 @@ public MergeApiHttpResponse> list(JobInter */ public MergeApiHttpResponse> list( JobInterviewStagesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/job-interview-stages"); if (request.getCreatedAfter().isPresent()) { @@ -173,7 +173,7 @@ public MergeApiHttpResponse retrieve(String id, JobInterviewS */ public MergeApiHttpResponse retrieve( String id, JobInterviewStagesRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/job-interview-stages") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/ats/RawJobPostingsClient.java b/src/main/java/com/merge/api/ats/RawJobPostingsClient.java index 6af214cd4..8f78b68dd 100644 --- a/src/main/java/com/merge/api/ats/RawJobPostingsClient.java +++ b/src/main/java/com/merge/api/ats/RawJobPostingsClient.java @@ -52,7 +52,7 @@ public MergeApiHttpResponse> list(JobPostingsList */ public MergeApiHttpResponse> list( JobPostingsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/job-postings"); if (request.getCreatedAfter().isPresent()) { @@ -173,7 +173,7 @@ public MergeApiHttpResponse retrieve(String id, JobPostingsRetrieveR */ public MergeApiHttpResponse retrieve( String id, JobPostingsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/job-postings") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/ats/RawJobsClient.java b/src/main/java/com/merge/api/ats/RawJobsClient.java index 13f4632b2..978e68f84 100644 --- a/src/main/java/com/merge/api/ats/RawJobsClient.java +++ b/src/main/java/com/merge/api/ats/RawJobsClient.java @@ -54,7 +54,7 @@ public MergeApiHttpResponse> list(JobsListRequest reques * Returns a list of Job objects. */ public MergeApiHttpResponse> list(JobsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/jobs"); if (request.getCode().isPresent()) { @@ -190,7 +190,7 @@ public MergeApiHttpResponse retrieve(String id, JobsRetrieveRequest request * Returns a Job object with the given id. */ public MergeApiHttpResponse retrieve(String id, JobsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/jobs") .addPathSegment(id); @@ -269,7 +269,7 @@ public MergeApiHttpResponse> screeningQues */ public MergeApiHttpResponse> screeningQuestionsList( String jobId, JobsScreeningQuestionsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/jobs") .addPathSegment(jobId) diff --git a/src/main/java/com/merge/api/ats/RawLinkTokenClient.java b/src/main/java/com/merge/api/ats/RawLinkTokenClient.java index 3566c0e8c..fee541b98 100644 --- a/src/main/java/com/merge/api/ats/RawLinkTokenClient.java +++ b/src/main/java/com/merge/api/ats/RawLinkTokenClient.java @@ -40,7 +40,7 @@ public MergeApiHttpResponse create(EndUserDetailsRequest request) { * Creates a link token to be used when linking a new end user. */ public MergeApiHttpResponse create(EndUserDetailsRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/link-token") .build(); diff --git a/src/main/java/com/merge/api/ats/RawLinkedAccountsClient.java b/src/main/java/com/merge/api/ats/RawLinkedAccountsClient.java index 0d4a40dc5..262bfae63 100644 --- a/src/main/java/com/merge/api/ats/RawLinkedAccountsClient.java +++ b/src/main/java/com/merge/api/ats/RawLinkedAccountsClient.java @@ -51,7 +51,7 @@ public MergeApiHttpResponse> list(L */ public MergeApiHttpResponse> list( LinkedAccountsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/linked-accounts"); if (request.getCategory().isPresent()) { diff --git a/src/main/java/com/merge/api/ats/RawOffersClient.java b/src/main/java/com/merge/api/ats/RawOffersClient.java index 18f425a0f..4d15fb13c 100644 --- a/src/main/java/com/merge/api/ats/RawOffersClient.java +++ b/src/main/java/com/merge/api/ats/RawOffersClient.java @@ -52,7 +52,7 @@ public MergeApiHttpResponse> list(OffersListRequest re */ public MergeApiHttpResponse> list( OffersListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/offers"); if (request.getApplicationId().isPresent()) { @@ -185,7 +185,7 @@ public MergeApiHttpResponse retrieve(String id, OffersRetrieveRequest req */ public MergeApiHttpResponse retrieve( String id, OffersRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/offers") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/ats/RawOfficesClient.java b/src/main/java/com/merge/api/ats/RawOfficesClient.java index 6c9f7bc56..234519233 100644 --- a/src/main/java/com/merge/api/ats/RawOfficesClient.java +++ b/src/main/java/com/merge/api/ats/RawOfficesClient.java @@ -52,7 +52,7 @@ public MergeApiHttpResponse> list(OfficesListRequest */ public MergeApiHttpResponse> list( OfficesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/offices"); if (request.getCreatedAfter().isPresent()) { @@ -165,7 +165,7 @@ public MergeApiHttpResponse retrieve(String id, OfficesRetrieveRequest r */ public MergeApiHttpResponse retrieve( String id, OfficesRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/offices") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/ats/RawPassthroughClient.java b/src/main/java/com/merge/api/ats/RawPassthroughClient.java index 177b115d2..23ea82355 100644 --- a/src/main/java/com/merge/api/ats/RawPassthroughClient.java +++ b/src/main/java/com/merge/api/ats/RawPassthroughClient.java @@ -40,7 +40,7 @@ public MergeApiHttpResponse create(DataPassthroughRequest reques * Pull data from an endpoint not currently supported by Merge. */ public MergeApiHttpResponse create(DataPassthroughRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/passthrough") .build(); diff --git a/src/main/java/com/merge/api/ats/RawRegenerateKeyClient.java b/src/main/java/com/merge/api/ats/RawRegenerateKeyClient.java index 996678ea6..a8763a267 100644 --- a/src/main/java/com/merge/api/ats/RawRegenerateKeyClient.java +++ b/src/main/java/com/merge/api/ats/RawRegenerateKeyClient.java @@ -41,7 +41,7 @@ public MergeApiHttpResponse create(RemoteKeyForRegenerationRequest re */ public MergeApiHttpResponse create( RemoteKeyForRegenerationRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/regenerate-key") .build(); diff --git a/src/main/java/com/merge/api/ats/RawRejectReasonsClient.java b/src/main/java/com/merge/api/ats/RawRejectReasonsClient.java index bcb412d5d..c374c9a95 100644 --- a/src/main/java/com/merge/api/ats/RawRejectReasonsClient.java +++ b/src/main/java/com/merge/api/ats/RawRejectReasonsClient.java @@ -52,7 +52,7 @@ public MergeApiHttpResponse> list(RejectReasons */ public MergeApiHttpResponse> list( RejectReasonsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/reject-reasons"); if (request.getCreatedAfter().isPresent()) { @@ -165,7 +165,7 @@ public MergeApiHttpResponse retrieve(String id, RejectReasonsRetri */ public MergeApiHttpResponse retrieve( String id, RejectReasonsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/reject-reasons") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/ats/RawScopesClient.java b/src/main/java/com/merge/api/ats/RawScopesClient.java index 80a4840e2..5a816ef77 100644 --- a/src/main/java/com/merge/api/ats/RawScopesClient.java +++ b/src/main/java/com/merge/api/ats/RawScopesClient.java @@ -40,7 +40,7 @@ public MergeApiHttpResponse defaultScopesRetrieve() { * Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. Learn more. */ public MergeApiHttpResponse defaultScopesRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/default-scopes") .build(); @@ -84,7 +84,7 @@ public MergeApiHttpResponse linkedAccountScopesRetrieve() { * Get all available permissions for Merge Common Models and fields for a single Linked Account. Learn more. */ public MergeApiHttpResponse linkedAccountScopesRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/linked-account-scopes") .build(); @@ -130,7 +130,7 @@ public MergeApiHttpResponse linkedAccountScopesCreate( */ public MergeApiHttpResponse linkedAccountScopesCreate( LinkedAccountCommonModelScopeDeserializerRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/linked-account-scopes") .build(); diff --git a/src/main/java/com/merge/api/ats/RawScorecardsClient.java b/src/main/java/com/merge/api/ats/RawScorecardsClient.java index 7f6ab47f0..63f2b6e22 100644 --- a/src/main/java/com/merge/api/ats/RawScorecardsClient.java +++ b/src/main/java/com/merge/api/ats/RawScorecardsClient.java @@ -52,7 +52,7 @@ public MergeApiHttpResponse> list(ScorecardsListRe */ public MergeApiHttpResponse> list( ScorecardsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/scorecards"); if (request.getApplicationId().isPresent()) { @@ -189,7 +189,7 @@ public MergeApiHttpResponse retrieve(String id, ScorecardsRetrieveReq */ public MergeApiHttpResponse retrieve( String id, ScorecardsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/scorecards") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/ats/RawSyncStatusClient.java b/src/main/java/com/merge/api/ats/RawSyncStatusClient.java index bd38df800..f287b4296 100644 --- a/src/main/java/com/merge/api/ats/RawSyncStatusClient.java +++ b/src/main/java/com/merge/api/ats/RawSyncStatusClient.java @@ -51,7 +51,7 @@ public MergeApiHttpResponse> list(SyncStatusListR */ public MergeApiHttpResponse> list( SyncStatusListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/sync-status"); if (request.getCursor().isPresent()) { diff --git a/src/main/java/com/merge/api/ats/RawTagsClient.java b/src/main/java/com/merge/api/ats/RawTagsClient.java index 72939dca3..b0ba7c6d5 100644 --- a/src/main/java/com/merge/api/ats/RawTagsClient.java +++ b/src/main/java/com/merge/api/ats/RawTagsClient.java @@ -50,7 +50,7 @@ public MergeApiHttpResponse> list(TagsListRequest reques * Returns a list of Tag objects. */ public MergeApiHttpResponse> list(TagsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/tags"); if (request.getCreatedAfter().isPresent()) { diff --git a/src/main/java/com/merge/api/ats/RawUsersClient.java b/src/main/java/com/merge/api/ats/RawUsersClient.java index 8a46761f8..d436bfeab 100644 --- a/src/main/java/com/merge/api/ats/RawUsersClient.java +++ b/src/main/java/com/merge/api/ats/RawUsersClient.java @@ -52,7 +52,7 @@ public MergeApiHttpResponse> list(UsersListReques */ public MergeApiHttpResponse> list( UsersListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/users"); if (request.getCreatedAfter().isPresent()) { @@ -177,7 +177,7 @@ public MergeApiHttpResponse retrieve(String id, UsersRetrieveRequest */ public MergeApiHttpResponse retrieve( String id, UsersRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/users") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/ats/RawWebhookReceiversClient.java b/src/main/java/com/merge/api/ats/RawWebhookReceiversClient.java index 32d230149..4ce482a74 100644 --- a/src/main/java/com/merge/api/ats/RawWebhookReceiversClient.java +++ b/src/main/java/com/merge/api/ats/RawWebhookReceiversClient.java @@ -42,7 +42,7 @@ public MergeApiHttpResponse> list() { * Returns a list of WebhookReceiver objects. */ public MergeApiHttpResponse> list(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/webhook-receivers") .build(); @@ -87,7 +87,7 @@ public MergeApiHttpResponse create(WebhookReceiverRequest reque * Creates a WebhookReceiver object with the given values. */ public MergeApiHttpResponse create(WebhookReceiverRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ats/v1/webhook-receivers") .build(); diff --git a/src/main/java/com/merge/api/ats/types/AccountDetails.java b/src/main/java/com/merge/api/ats/types/AccountDetails.java index 990971ea6..f699537d6 100644 --- a/src/main/java/com/merge/api/ats/types/AccountDetails.java +++ b/src/main/java/com/merge/api/ats/types/AccountDetails.java @@ -27,7 +27,7 @@ public final class AccountDetails { private final Optional integrationSlug; - private final Optional category; + private final Optional category; private final Optional endUserOriginId; @@ -51,7 +51,7 @@ private AccountDetails( Optional id, Optional integration, Optional integrationSlug, - Optional category, + Optional category, Optional endUserOriginId, Optional endUserOrganizationName, Optional endUserEmailAddress, @@ -92,7 +92,7 @@ public Optional getIntegrationSlug() { } @JsonProperty("category") - public Optional getCategory() { + public Optional getCategory() { return category; } @@ -202,7 +202,7 @@ public static final class Builder { private Optional integrationSlug = Optional.empty(); - private Optional category = Optional.empty(); + private Optional category = Optional.empty(); private Optional endUserOriginId = Optional.empty(); @@ -275,12 +275,12 @@ public Builder integrationSlug(String integrationSlug) { } @JsonSetter(value = "category", nulls = Nulls.SKIP) - public Builder category(Optional category) { + public Builder category(Optional category) { this.category = category; return this; } - public Builder category(CategoryEnum category) { + public Builder category(AccountDetailsCategory category) { this.category = Optional.ofNullable(category); return this; } @@ -340,6 +340,9 @@ public Builder webhookListenerUrl(String webhookListenerUrl) { return this; } + /** + *

    Whether a Production Linked Account's credentials match another existing Production Linked Account. This field is null for Test Linked Accounts, incomplete Production Linked Accounts, and ignored duplicate Production Linked Account sets.

    + */ @JsonSetter(value = "is_duplicate", nulls = Nulls.SKIP) public Builder isDuplicate(Optional isDuplicate) { this.isDuplicate = isDuplicate; @@ -362,6 +365,9 @@ public Builder accountType(String accountType) { return this; } + /** + *

    The time at which account completes the linking flow.

    + */ @JsonSetter(value = "completed_at", nulls = Nulls.SKIP) public Builder completedAt(Optional completedAt) { this.completedAt = completedAt; diff --git a/src/main/java/com/merge/api/ats/types/AccountDetailsAndActions.java b/src/main/java/com/merge/api/ats/types/AccountDetailsAndActions.java index 4d2f7dba1..cfcdd90f9 100644 --- a/src/main/java/com/merge/api/ats/types/AccountDetailsAndActions.java +++ b/src/main/java/com/merge/api/ats/types/AccountDetailsAndActions.java @@ -24,9 +24,9 @@ public final class AccountDetailsAndActions { private final String id; - private final Optional category; + private final Optional category; - private final AccountDetailsAndActionsStatusEnum status; + private final AccountDetailsAndActionsStatus status; private final Optional statusDetail; @@ -52,8 +52,8 @@ public final class AccountDetailsAndActions { private AccountDetailsAndActions( String id, - Optional category, - AccountDetailsAndActionsStatusEnum status, + Optional category, + AccountDetailsAndActionsStatus status, Optional statusDetail, Optional endUserOriginId, String endUserOrganizationName, @@ -87,12 +87,12 @@ public String getId() { } @JsonProperty("category") - public Optional getCategory() { + public Optional getCategory() { return category; } @JsonProperty("status") - public AccountDetailsAndActionsStatusEnum getStatus() { + public AccountDetailsAndActionsStatus getStatus() { return status; } @@ -213,7 +213,7 @@ public interface IdStage { } public interface StatusStage { - EndUserOrganizationNameStage status(@NotNull AccountDetailsAndActionsStatusEnum status); + EndUserOrganizationNameStage status(@NotNull AccountDetailsAndActionsStatus status); } public interface EndUserOrganizationNameStage { @@ -239,9 +239,9 @@ public interface CompletedAtStage { public interface _FinalStage { AccountDetailsAndActions build(); - _FinalStage category(Optional category); + _FinalStage category(Optional category); - _FinalStage category(CategoryEnum category); + _FinalStage category(AccountDetailsAndActionsCategory category); _FinalStage statusDetail(Optional statusDetail); @@ -251,10 +251,16 @@ public interface _FinalStage { _FinalStage endUserOriginId(String endUserOriginId); + /** + *

    The tenant or domain the customer has provided access to.

    + */ _FinalStage subdomain(Optional subdomain); _FinalStage subdomain(String subdomain); + /** + *

    Whether a Production Linked Account's credentials match another existing Production Linked Account. This field is null for Test Linked Accounts, incomplete Production Linked Accounts, and ignored duplicate Production Linked Account sets.

    + */ _FinalStage isDuplicate(Optional isDuplicate); _FinalStage isDuplicate(Boolean isDuplicate); @@ -276,7 +282,7 @@ public static final class Builder _FinalStage { private String id; - private AccountDetailsAndActionsStatusEnum status; + private AccountDetailsAndActionsStatus status; private String endUserOrganizationName; @@ -298,7 +304,7 @@ public static final class Builder private Optional statusDetail = Optional.empty(); - private Optional category = Optional.empty(); + private Optional category = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -332,7 +338,7 @@ public StatusStage id(@NotNull String id) { @java.lang.Override @JsonSetter("status") - public EndUserOrganizationNameStage status(@NotNull AccountDetailsAndActionsStatusEnum status) { + public EndUserOrganizationNameStage status(@NotNull AccountDetailsAndActionsStatus status) { this.status = status; return this; } @@ -395,6 +401,9 @@ public _FinalStage isDuplicate(Boolean isDuplicate) { return this; } + /** + *

    Whether a Production Linked Account's credentials match another existing Production Linked Account. This field is null for Test Linked Accounts, incomplete Production Linked Accounts, and ignored duplicate Production Linked Account sets.

    + */ @java.lang.Override @JsonSetter(value = "is_duplicate", nulls = Nulls.SKIP) public _FinalStage isDuplicate(Optional isDuplicate) { @@ -412,6 +421,9 @@ public _FinalStage subdomain(String subdomain) { return this; } + /** + *

    The tenant or domain the customer has provided access to.

    + */ @java.lang.Override @JsonSetter(value = "subdomain", nulls = Nulls.SKIP) public _FinalStage subdomain(Optional subdomain) { @@ -446,14 +458,14 @@ public _FinalStage statusDetail(Optional statusDetail) { } @java.lang.Override - public _FinalStage category(CategoryEnum category) { + public _FinalStage category(AccountDetailsAndActionsCategory category) { this.category = Optional.ofNullable(category); return this; } @java.lang.Override @JsonSetter(value = "category", nulls = Nulls.SKIP) - public _FinalStage category(Optional category) { + public _FinalStage category(Optional category) { this.category = category; return this; } diff --git a/src/main/java/com/merge/api/ats/types/AccountDetailsAndActionsCategory.java b/src/main/java/com/merge/api/ats/types/AccountDetailsAndActionsCategory.java new file mode 100644 index 000000000..be5be74c1 --- /dev/null +++ b/src/main/java/com/merge/api/ats/types/AccountDetailsAndActionsCategory.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ats.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = AccountDetailsAndActionsCategory.Deserializer.class) +public final class AccountDetailsAndActionsCategory { + private final Object value; + + private final int type; + + private AccountDetailsAndActionsCategory(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((CategoryEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AccountDetailsAndActionsCategory && equalTo((AccountDetailsAndActionsCategory) other); + } + + private boolean equalTo(AccountDetailsAndActionsCategory other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static AccountDetailsAndActionsCategory of(CategoryEnum value) { + return new AccountDetailsAndActionsCategory(value, 0); + } + + public static AccountDetailsAndActionsCategory of(String value) { + return new AccountDetailsAndActionsCategory(value, 1); + } + + public interface Visitor { + T visit(CategoryEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(AccountDetailsAndActionsCategory.class); + } + + @java.lang.Override + public AccountDetailsAndActionsCategory deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, CategoryEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ats/types/AccountDetailsAndActionsStatus.java b/src/main/java/com/merge/api/ats/types/AccountDetailsAndActionsStatus.java new file mode 100644 index 000000000..c1c2e7abc --- /dev/null +++ b/src/main/java/com/merge/api/ats/types/AccountDetailsAndActionsStatus.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ats.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = AccountDetailsAndActionsStatus.Deserializer.class) +public final class AccountDetailsAndActionsStatus { + private final Object value; + + private final int type; + + private AccountDetailsAndActionsStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((AccountDetailsAndActionsStatusEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AccountDetailsAndActionsStatus && equalTo((AccountDetailsAndActionsStatus) other); + } + + private boolean equalTo(AccountDetailsAndActionsStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static AccountDetailsAndActionsStatus of(AccountDetailsAndActionsStatusEnum value) { + return new AccountDetailsAndActionsStatus(value, 0); + } + + public static AccountDetailsAndActionsStatus of(String value) { + return new AccountDetailsAndActionsStatus(value, 1); + } + + public interface Visitor { + T visit(AccountDetailsAndActionsStatusEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(AccountDetailsAndActionsStatus.class); + } + + @java.lang.Override + public AccountDetailsAndActionsStatus deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, AccountDetailsAndActionsStatusEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ats/types/AccountDetailsCategory.java b/src/main/java/com/merge/api/ats/types/AccountDetailsCategory.java new file mode 100644 index 000000000..7fab74fcd --- /dev/null +++ b/src/main/java/com/merge/api/ats/types/AccountDetailsCategory.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ats.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = AccountDetailsCategory.Deserializer.class) +public final class AccountDetailsCategory { + private final Object value; + + private final int type; + + private AccountDetailsCategory(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((CategoryEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AccountDetailsCategory && equalTo((AccountDetailsCategory) other); + } + + private boolean equalTo(AccountDetailsCategory other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static AccountDetailsCategory of(CategoryEnum value) { + return new AccountDetailsCategory(value, 0); + } + + public static AccountDetailsCategory of(String value) { + return new AccountDetailsCategory(value, 1); + } + + public interface Visitor { + T visit(CategoryEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(AccountDetailsCategory.class); + } + + @java.lang.Override + public AccountDetailsCategory deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, CategoryEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ats/types/AccountIntegration.java b/src/main/java/com/merge/api/ats/types/AccountIntegration.java index 7a91982bf..0422f155f 100644 --- a/src/main/java/com/merge/api/ats/types/AccountIntegration.java +++ b/src/main/java/com/merge/api/ats/types/AccountIntegration.java @@ -196,6 +196,9 @@ public static NameStage builder() { } public interface NameStage { + /** + * Company name. + */ _FinalStage name(@NotNull String name); Builder from(AccountIntegration other); @@ -204,22 +207,37 @@ public interface NameStage { public interface _FinalStage { AccountIntegration build(); + /** + *

    Optional. This shortened name appears in places with limited space, usually in conjunction with the platform's logo (e.g., Merge Link menu).<br><br>Example: <i>Workforce Now (in lieu of ADP Workforce Now), SuccessFactors (in lieu of SAP SuccessFactors)</i>

    + */ _FinalStage abbreviatedName(Optional abbreviatedName); _FinalStage abbreviatedName(String abbreviatedName); + /** + *

    Category or categories this integration belongs to. Multiple categories should be comma separated, i.e. [ats, hris].

    + */ _FinalStage categories(Optional> categories); _FinalStage categories(List categories); + /** + *

    Company logo in rectangular shape.

    + */ _FinalStage image(Optional image); _FinalStage image(String image); + /** + *

    Company logo in square shape.

    + */ _FinalStage squareImage(Optional squareImage); _FinalStage squareImage(String squareImage); + /** + *

    The color of this integration used for buttons and text throughout the app and landing pages. <b>Choose a darker, saturated color.</b>

    + */ _FinalStage color(Optional color); _FinalStage color(String color); @@ -228,14 +246,23 @@ public interface _FinalStage { _FinalStage slug(String slug); + /** + *

    Mapping of API endpoints to documentation urls for support. Example: {'GET': [['/common-model-scopes', 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], 'POST': []}

    + */ _FinalStage apiEndpointsToDocumentationUrls(Optional> apiEndpointsToDocumentationUrls); _FinalStage apiEndpointsToDocumentationUrls(Map apiEndpointsToDocumentationUrls); + /** + *

    Setup guide URL for third party webhook creation. Exposed in Merge Docs.

    + */ _FinalStage webhookSetupGuideUrl(Optional webhookSetupGuideUrl); _FinalStage webhookSetupGuideUrl(String webhookSetupGuideUrl); + /** + *

    Category or categories this integration is in beta status for.

    + */ _FinalStage categoryBetaStatus(Optional> categoryBetaStatus); _FinalStage categoryBetaStatus(Map categoryBetaStatus); @@ -284,7 +311,7 @@ public Builder from(AccountIntegration other) { } /** - *

    Company name.

    + * Company name.

    Company name.

    * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -304,6 +331,9 @@ public _FinalStage categoryBetaStatus(Map categoryBetaStatus) return this; } + /** + *

    Category or categories this integration is in beta status for.

    + */ @java.lang.Override @JsonSetter(value = "category_beta_status", nulls = Nulls.SKIP) public _FinalStage categoryBetaStatus(Optional> categoryBetaStatus) { @@ -321,6 +351,9 @@ public _FinalStage webhookSetupGuideUrl(String webhookSetupGuideUrl) { return this; } + /** + *

    Setup guide URL for third party webhook creation. Exposed in Merge Docs.

    + */ @java.lang.Override @JsonSetter(value = "webhook_setup_guide_url", nulls = Nulls.SKIP) public _FinalStage webhookSetupGuideUrl(Optional webhookSetupGuideUrl) { @@ -338,6 +371,9 @@ public _FinalStage apiEndpointsToDocumentationUrls(Map apiEndp return this; } + /** + *

    Mapping of API endpoints to documentation urls for support. Example: {'GET': [['/common-model-scopes', 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], 'POST': []}

    + */ @java.lang.Override @JsonSetter(value = "api_endpoints_to_documentation_urls", nulls = Nulls.SKIP) public _FinalStage apiEndpointsToDocumentationUrls( @@ -369,6 +405,9 @@ public _FinalStage color(String color) { return this; } + /** + *

    The color of this integration used for buttons and text throughout the app and landing pages. <b>Choose a darker, saturated color.</b>

    + */ @java.lang.Override @JsonSetter(value = "color", nulls = Nulls.SKIP) public _FinalStage color(Optional color) { @@ -386,6 +425,9 @@ public _FinalStage squareImage(String squareImage) { return this; } + /** + *

    Company logo in square shape.

    + */ @java.lang.Override @JsonSetter(value = "square_image", nulls = Nulls.SKIP) public _FinalStage squareImage(Optional squareImage) { @@ -403,6 +445,9 @@ public _FinalStage image(String image) { return this; } + /** + *

    Company logo in rectangular shape.

    + */ @java.lang.Override @JsonSetter(value = "image", nulls = Nulls.SKIP) public _FinalStage image(Optional image) { @@ -420,6 +465,9 @@ public _FinalStage categories(List categories) { return this; } + /** + *

    Category or categories this integration belongs to. Multiple categories should be comma separated, i.e. [ats, hris].

    + */ @java.lang.Override @JsonSetter(value = "categories", nulls = Nulls.SKIP) public _FinalStage categories(Optional> categories) { @@ -437,6 +485,9 @@ public _FinalStage abbreviatedName(String abbreviatedName) { return this; } + /** + *

    Optional. This shortened name appears in places with limited space, usually in conjunction with the platform's logo (e.g., Merge Link menu).<br><br>Example: <i>Workforce Now (in lieu of ADP Workforce Now), SuccessFactors (in lieu of SAP SuccessFactors)</i>

    + */ @java.lang.Override @JsonSetter(value = "abbreviated_name", nulls = Nulls.SKIP) public _FinalStage abbreviatedName(Optional abbreviatedName) { diff --git a/src/main/java/com/merge/api/ats/types/ActivitiesListRequest.java b/src/main/java/com/merge/api/ats/types/ActivitiesListRequest.java index ab14ee463..982c573c6 100644 --- a/src/main/java/com/merge/api/ats/types/ActivitiesListRequest.java +++ b/src/main/java/com/merge/api/ats/types/ActivitiesListRequest.java @@ -307,6 +307,9 @@ public Builder from(ActivitiesListRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -323,6 +326,9 @@ public Builder expand(String expand) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -334,6 +340,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -345,6 +354,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -356,6 +368,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -367,6 +382,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -378,6 +396,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -389,6 +410,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -400,6 +424,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -411,6 +438,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -422,6 +452,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    Deprecated. Use show_enum_origins.

    + */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -433,6 +466,9 @@ public Builder remoteFields(ActivitiesListRequestRemoteFields remoteFields) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -444,6 +480,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    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

    + */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; @@ -455,6 +494,9 @@ public Builder showEnumOrigins(ActivitiesListRequestShowEnumOrigins showEnumOrig return this; } + /** + *

    If provided, will only return activities done by this user.

    + */ @JsonSetter(value = "user_id", nulls = Nulls.SKIP) public Builder userId(Optional userId) { this.userId = userId; diff --git a/src/main/java/com/merge/api/ats/types/ActivitiesRetrieveRequest.java b/src/main/java/com/merge/api/ats/types/ActivitiesRetrieveRequest.java index 7110e2ee7..9ef3ab2d4 100644 --- a/src/main/java/com/merge/api/ats/types/ActivitiesRetrieveRequest.java +++ b/src/main/java/com/merge/api/ats/types/ActivitiesRetrieveRequest.java @@ -149,6 +149,9 @@ public Builder from(ActivitiesRetrieveRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -165,6 +168,9 @@ public Builder expand(String expand) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -176,6 +182,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -187,6 +196,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    Deprecated. Use show_enum_origins.

    + */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -198,6 +210,9 @@ public Builder remoteFields(ActivitiesRetrieveRequestRemoteFields remoteFields) return this; } + /** + *

    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

    + */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; diff --git a/src/main/java/com/merge/api/ats/types/Activity.java b/src/main/java/com/merge/api/ats/types/Activity.java index 6a2ac5ba7..0d86266ce 100644 --- a/src/main/java/com/merge/api/ats/types/Activity.java +++ b/src/main/java/com/merge/api/ats/types/Activity.java @@ -35,13 +35,13 @@ public final class Activity { private final Optional remoteCreatedAt; - private final Optional activityType; + private final Optional activityType; private final Optional subject; private final Optional body; - private final Optional visibility; + private final Optional visibility; private final Optional candidate; @@ -60,10 +60,10 @@ private Activity( Optional modifiedAt, Optional user, Optional remoteCreatedAt, - Optional activityType, + Optional activityType, Optional subject, Optional body, - Optional visibility, + Optional visibility, Optional candidate, Optional remoteWasDeleted, Optional> fieldMappings, @@ -140,7 +140,7 @@ public Optional getRemoteCreatedAt() { * */ @JsonProperty("activity_type") - public Optional getActivityType() { + public Optional getActivityType() { return activityType; } @@ -169,7 +169,7 @@ public Optional getBody() { * */ @JsonProperty("visibility") - public Optional getVisibility() { + public Optional getVisibility() { return visibility; } @@ -266,13 +266,13 @@ public static final class Builder { private Optional remoteCreatedAt = Optional.empty(); - private Optional activityType = Optional.empty(); + private Optional activityType = Optional.empty(); private Optional subject = Optional.empty(); private Optional body = Optional.empty(); - private Optional visibility = Optional.empty(); + private Optional visibility = Optional.empty(); private Optional candidate = Optional.empty(); @@ -316,6 +316,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -327,6 +330,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -338,6 +344,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -349,6 +358,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The user that performed the action.

    + */ @JsonSetter(value = "user", nulls = Nulls.SKIP) public Builder user(Optional user) { this.user = user; @@ -360,6 +372,9 @@ public Builder user(ActivityUser user) { return this; } + /** + *

    When the third party's activity was created.

    + */ @JsonSetter(value = "remote_created_at", nulls = Nulls.SKIP) public Builder remoteCreatedAt(Optional remoteCreatedAt) { this.remoteCreatedAt = remoteCreatedAt; @@ -371,17 +386,28 @@ public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { return this; } + /** + *

    The activity's type.

    + *
      + *
    • NOTE - NOTE
    • + *
    • EMAIL - EMAIL
    • + *
    • OTHER - OTHER
    • + *
    + */ @JsonSetter(value = "activity_type", nulls = Nulls.SKIP) - public Builder activityType(Optional activityType) { + public Builder activityType(Optional activityType) { this.activityType = activityType; return this; } - public Builder activityType(ActivityTypeEnum activityType) { + public Builder activityType(ActivityActivityType activityType) { this.activityType = Optional.ofNullable(activityType); return this; } + /** + *

    The activity's subject.

    + */ @JsonSetter(value = "subject", nulls = Nulls.SKIP) public Builder subject(Optional subject) { this.subject = subject; @@ -393,6 +419,9 @@ public Builder subject(String subject) { return this; } + /** + *

    The activity's body.

    + */ @JsonSetter(value = "body", nulls = Nulls.SKIP) public Builder body(Optional body) { this.body = body; @@ -404,13 +433,21 @@ public Builder body(String body) { return this; } + /** + *

    The activity's visibility.

    + *
      + *
    • ADMIN_ONLY - ADMIN_ONLY
    • + *
    • PUBLIC - PUBLIC
    • + *
    • PRIVATE - PRIVATE
    • + *
    + */ @JsonSetter(value = "visibility", nulls = Nulls.SKIP) - public Builder visibility(Optional visibility) { + public Builder visibility(Optional visibility) { this.visibility = visibility; return this; } - public Builder visibility(VisibilityEnum visibility) { + public Builder visibility(ActivityVisibility visibility) { this.visibility = Optional.ofNullable(visibility); return this; } @@ -426,6 +463,9 @@ public Builder candidate(String candidate) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/ats/types/ActivityActivityType.java b/src/main/java/com/merge/api/ats/types/ActivityActivityType.java new file mode 100644 index 000000000..d7bc73402 --- /dev/null +++ b/src/main/java/com/merge/api/ats/types/ActivityActivityType.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ats.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = ActivityActivityType.Deserializer.class) +public final class ActivityActivityType { + private final Object value; + + private final int type; + + private ActivityActivityType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((ActivityTypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ActivityActivityType && equalTo((ActivityActivityType) other); + } + + private boolean equalTo(ActivityActivityType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static ActivityActivityType of(ActivityTypeEnum value) { + return new ActivityActivityType(value, 0); + } + + public static ActivityActivityType of(String value) { + return new ActivityActivityType(value, 1); + } + + public interface Visitor { + T visit(ActivityTypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(ActivityActivityType.class); + } + + @java.lang.Override + public ActivityActivityType deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, ActivityTypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ats/types/ActivityEndpointRequest.java b/src/main/java/com/merge/api/ats/types/ActivityEndpointRequest.java index 42aa07e1a..5c0fa172e 100644 --- a/src/main/java/com/merge/api/ats/types/ActivityEndpointRequest.java +++ b/src/main/java/com/merge/api/ats/types/ActivityEndpointRequest.java @@ -115,10 +115,16 @@ public interface RemoteUserIdStage { public interface _FinalStage { ActivityEndpointRequest build(); + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ _FinalStage isDebugMode(Optional isDebugMode); _FinalStage isDebugMode(Boolean isDebugMode); + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ _FinalStage runAsync(Optional runAsync); _FinalStage runAsync(Boolean runAsync); @@ -172,6 +178,9 @@ public _FinalStage runAsync(Boolean runAsync) { return this; } + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ @java.lang.Override @JsonSetter(value = "run_async", nulls = Nulls.SKIP) public _FinalStage runAsync(Optional runAsync) { @@ -189,6 +198,9 @@ public _FinalStage isDebugMode(Boolean isDebugMode) { return this; } + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ @java.lang.Override @JsonSetter(value = "is_debug_mode", nulls = Nulls.SKIP) public _FinalStage isDebugMode(Optional isDebugMode) { diff --git a/src/main/java/com/merge/api/ats/types/ActivityRequest.java b/src/main/java/com/merge/api/ats/types/ActivityRequest.java index a3630642c..e4728a411 100644 --- a/src/main/java/com/merge/api/ats/types/ActivityRequest.java +++ b/src/main/java/com/merge/api/ats/types/ActivityRequest.java @@ -29,7 +29,7 @@ public final class ActivityRequest { private final Optional body; - private final Optional visibility; + private final Optional visibility; private final Optional candidate; @@ -44,7 +44,7 @@ private ActivityRequest( Optional activityType, Optional subject, Optional body, - Optional visibility, + Optional visibility, Optional candidate, Optional> integrationParams, Optional> linkedAccountParams, @@ -106,7 +106,7 @@ public Optional getBody() { * */ @JsonProperty("visibility") - public Optional getVisibility() { + public Optional getVisibility() { return visibility; } @@ -179,7 +179,7 @@ public static final class Builder { private Optional body = Optional.empty(); - private Optional visibility = Optional.empty(); + private Optional visibility = Optional.empty(); private Optional candidate = Optional.empty(); @@ -204,6 +204,9 @@ public Builder from(ActivityRequest other) { return this; } + /** + *

    The user that performed the action.

    + */ @JsonSetter(value = "user", nulls = Nulls.SKIP) public Builder user(Optional user) { this.user = user; @@ -215,6 +218,14 @@ public Builder user(ActivityRequestUser user) { return this; } + /** + *

    The activity's type.

    + *
      + *
    • NOTE - NOTE
    • + *
    • EMAIL - EMAIL
    • + *
    • OTHER - OTHER
    • + *
    + */ @JsonSetter(value = "activity_type", nulls = Nulls.SKIP) public Builder activityType(Optional activityType) { this.activityType = activityType; @@ -226,6 +237,9 @@ public Builder activityType(ActivityTypeEnum activityType) { return this; } + /** + *

    The activity's subject.

    + */ @JsonSetter(value = "subject", nulls = Nulls.SKIP) public Builder subject(Optional subject) { this.subject = subject; @@ -237,6 +251,9 @@ public Builder subject(String subject) { return this; } + /** + *

    The activity's body.

    + */ @JsonSetter(value = "body", nulls = Nulls.SKIP) public Builder body(Optional body) { this.body = body; @@ -248,13 +265,21 @@ public Builder body(String body) { return this; } + /** + *

    The activity's visibility.

    + *
      + *
    • ADMIN_ONLY - ADMIN_ONLY
    • + *
    • PUBLIC - PUBLIC
    • + *
    • PRIVATE - PRIVATE
    • + *
    + */ @JsonSetter(value = "visibility", nulls = Nulls.SKIP) - public Builder visibility(Optional visibility) { + public Builder visibility(Optional visibility) { this.visibility = visibility; return this; } - public Builder visibility(VisibilityEnum visibility) { + public Builder visibility(ActivityRequestVisibility visibility) { this.visibility = Optional.ofNullable(visibility); return this; } diff --git a/src/main/java/com/merge/api/ats/types/ActivityRequestVisibility.java b/src/main/java/com/merge/api/ats/types/ActivityRequestVisibility.java new file mode 100644 index 000000000..0d8fe41b4 --- /dev/null +++ b/src/main/java/com/merge/api/ats/types/ActivityRequestVisibility.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ats.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = ActivityRequestVisibility.Deserializer.class) +public final class ActivityRequestVisibility { + private final Object value; + + private final int type; + + private ActivityRequestVisibility(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((VisibilityEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ActivityRequestVisibility && equalTo((ActivityRequestVisibility) other); + } + + private boolean equalTo(ActivityRequestVisibility other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static ActivityRequestVisibility of(VisibilityEnum value) { + return new ActivityRequestVisibility(value, 0); + } + + public static ActivityRequestVisibility of(String value) { + return new ActivityRequestVisibility(value, 1); + } + + public interface Visitor { + T visit(VisibilityEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(ActivityRequestVisibility.class); + } + + @java.lang.Override + public ActivityRequestVisibility deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, VisibilityEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ats/types/ActivityVisibility.java b/src/main/java/com/merge/api/ats/types/ActivityVisibility.java new file mode 100644 index 000000000..02f7705a4 --- /dev/null +++ b/src/main/java/com/merge/api/ats/types/ActivityVisibility.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ats.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = ActivityVisibility.Deserializer.class) +public final class ActivityVisibility { + private final Object value; + + private final int type; + + private ActivityVisibility(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((VisibilityEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ActivityVisibility && equalTo((ActivityVisibility) other); + } + + private boolean equalTo(ActivityVisibility other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static ActivityVisibility of(VisibilityEnum value) { + return new ActivityVisibility(value, 0); + } + + public static ActivityVisibility of(String value) { + return new ActivityVisibility(value, 1); + } + + public interface Visitor { + T visit(VisibilityEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(ActivityVisibility.class); + } + + @java.lang.Override + public ActivityVisibility deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, VisibilityEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ats/types/Application.java b/src/main/java/com/merge/api/ats/types/Application.java index 2f359e576..c7fea6991 100644 --- a/src/main/java/com/merge/api/ats/types/Application.java +++ b/src/main/java/com/merge/api/ats/types/Application.java @@ -354,6 +354,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -365,6 +368,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -376,6 +382,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -387,6 +396,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The candidate applying.

    + */ @JsonSetter(value = "candidate", nulls = Nulls.SKIP) public Builder candidate(Optional candidate) { this.candidate = candidate; @@ -398,6 +410,9 @@ public Builder candidate(ApplicationCandidate candidate) { return this; } + /** + *

    The job being applied for.

    + */ @JsonSetter(value = "job", nulls = Nulls.SKIP) public Builder job(Optional job) { this.job = job; @@ -409,6 +424,9 @@ public Builder job(ApplicationJob job) { return this; } + /** + *

    When the application was submitted.

    + */ @JsonSetter(value = "applied_at", nulls = Nulls.SKIP) public Builder appliedAt(Optional appliedAt) { this.appliedAt = appliedAt; @@ -420,6 +438,9 @@ public Builder appliedAt(OffsetDateTime appliedAt) { return this; } + /** + *

    When the application was rejected.

    + */ @JsonSetter(value = "rejected_at", nulls = Nulls.SKIP) public Builder rejectedAt(Optional rejectedAt) { this.rejectedAt = rejectedAt; @@ -442,6 +463,9 @@ public Builder offers(List> offers) { return this; } + /** + *

    The application's source.

    + */ @JsonSetter(value = "source", nulls = Nulls.SKIP) public Builder source(Optional source) { this.source = source; @@ -453,6 +477,9 @@ public Builder source(String source) { return this; } + /** + *

    The user credited for this application.

    + */ @JsonSetter(value = "credited_to", nulls = Nulls.SKIP) public Builder creditedTo(Optional creditedTo) { this.creditedTo = creditedTo; @@ -477,6 +504,9 @@ public Builder screeningQuestionAnswers( return this; } + /** + *

    The application's current stage.

    + */ @JsonSetter(value = "current_stage", nulls = Nulls.SKIP) public Builder currentStage(Optional currentStage) { this.currentStage = currentStage; @@ -488,6 +518,9 @@ public Builder currentStage(ApplicationCurrentStage currentStage) { return this; } + /** + *

    The application's reason for rejection.

    + */ @JsonSetter(value = "reject_reason", nulls = Nulls.SKIP) public Builder rejectReason(Optional rejectReason) { this.rejectReason = rejectReason; @@ -499,6 +532,9 @@ public Builder rejectReason(ApplicationRejectReason rejectReason) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/ats/types/ApplicationEndpointRequest.java b/src/main/java/com/merge/api/ats/types/ApplicationEndpointRequest.java index 00af91b1a..cda224403 100644 --- a/src/main/java/com/merge/api/ats/types/ApplicationEndpointRequest.java +++ b/src/main/java/com/merge/api/ats/types/ApplicationEndpointRequest.java @@ -115,10 +115,16 @@ public interface RemoteUserIdStage { public interface _FinalStage { ApplicationEndpointRequest build(); + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ _FinalStage isDebugMode(Optional isDebugMode); _FinalStage isDebugMode(Boolean isDebugMode); + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ _FinalStage runAsync(Optional runAsync); _FinalStage runAsync(Boolean runAsync); @@ -172,6 +178,9 @@ public _FinalStage runAsync(Boolean runAsync) { return this; } + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ @java.lang.Override @JsonSetter(value = "run_async", nulls = Nulls.SKIP) public _FinalStage runAsync(Optional runAsync) { @@ -189,6 +198,9 @@ public _FinalStage isDebugMode(Boolean isDebugMode) { return this; } + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ @java.lang.Override @JsonSetter(value = "is_debug_mode", nulls = Nulls.SKIP) public _FinalStage isDebugMode(Optional isDebugMode) { diff --git a/src/main/java/com/merge/api/ats/types/ApplicationRequest.java b/src/main/java/com/merge/api/ats/types/ApplicationRequest.java index 86b323dae..c7e113dec 100644 --- a/src/main/java/com/merge/api/ats/types/ApplicationRequest.java +++ b/src/main/java/com/merge/api/ats/types/ApplicationRequest.java @@ -276,6 +276,9 @@ public Builder from(ApplicationRequest other) { return this; } + /** + *

    The candidate applying.

    + */ @JsonSetter(value = "candidate", nulls = Nulls.SKIP) public Builder candidate(Optional candidate) { this.candidate = candidate; @@ -287,6 +290,9 @@ public Builder candidate(ApplicationRequestCandidate candidate) { return this; } + /** + *

    The job being applied for.

    + */ @JsonSetter(value = "job", nulls = Nulls.SKIP) public Builder job(Optional job) { this.job = job; @@ -298,6 +304,9 @@ public Builder job(ApplicationRequestJob job) { return this; } + /** + *

    When the application was submitted.

    + */ @JsonSetter(value = "applied_at", nulls = Nulls.SKIP) public Builder appliedAt(Optional appliedAt) { this.appliedAt = appliedAt; @@ -309,6 +318,9 @@ public Builder appliedAt(OffsetDateTime appliedAt) { return this; } + /** + *

    When the application was rejected.

    + */ @JsonSetter(value = "rejected_at", nulls = Nulls.SKIP) public Builder rejectedAt(Optional rejectedAt) { this.rejectedAt = rejectedAt; @@ -331,6 +343,9 @@ public Builder offers(List> offers) { return this; } + /** + *

    The application's source.

    + */ @JsonSetter(value = "source", nulls = Nulls.SKIP) public Builder source(Optional source) { this.source = source; @@ -342,6 +357,9 @@ public Builder source(String source) { return this; } + /** + *

    The user credited for this application.

    + */ @JsonSetter(value = "credited_to", nulls = Nulls.SKIP) public Builder creditedTo(Optional creditedTo) { this.creditedTo = creditedTo; @@ -366,6 +384,9 @@ public Builder screeningQuestionAnswers( return this; } + /** + *

    The application's current stage.

    + */ @JsonSetter(value = "current_stage", nulls = Nulls.SKIP) public Builder currentStage(Optional currentStage) { this.currentStage = currentStage; @@ -377,6 +398,9 @@ public Builder currentStage(ApplicationRequestCurrentStage currentStage) { return this; } + /** + *

    The application's reason for rejection.

    + */ @JsonSetter(value = "reject_reason", nulls = Nulls.SKIP) public Builder rejectReason(Optional rejectReason) { this.rejectReason = rejectReason; diff --git a/src/main/java/com/merge/api/ats/types/ApplicationsListRequest.java b/src/main/java/com/merge/api/ats/types/ApplicationsListRequest.java index 9501e1ae0..884496705 100644 --- a/src/main/java/com/merge/api/ats/types/ApplicationsListRequest.java +++ b/src/main/java/com/merge/api/ats/types/ApplicationsListRequest.java @@ -358,6 +358,9 @@ public Builder from(ApplicationsListRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -374,6 +377,9 @@ public Builder expand(ApplicationsListRequestExpandItem expand) { return this; } + /** + *

    If provided, will only return applications for this candidate.

    + */ @JsonSetter(value = "candidate_id", nulls = Nulls.SKIP) public Builder candidateId(Optional candidateId) { this.candidateId = candidateId; @@ -385,6 +391,9 @@ public Builder candidateId(String candidateId) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -396,6 +405,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -407,6 +419,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    If provided, will only return applications credited to this user.

    + */ @JsonSetter(value = "credited_to_id", nulls = Nulls.SKIP) public Builder creditedToId(Optional creditedToId) { this.creditedToId = creditedToId; @@ -418,6 +433,9 @@ public Builder creditedToId(String creditedToId) { return this; } + /** + *

    If provided, will only return applications at this interview stage.

    + */ @JsonSetter(value = "current_stage_id", nulls = Nulls.SKIP) public Builder currentStageId(Optional currentStageId) { this.currentStageId = currentStageId; @@ -429,6 +447,9 @@ public Builder currentStageId(String currentStageId) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -440,6 +461,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -451,6 +475,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -462,6 +489,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -473,6 +503,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, will only return applications for this job.

    + */ @JsonSetter(value = "job_id", nulls = Nulls.SKIP) public Builder jobId(Optional jobId) { this.jobId = jobId; @@ -484,6 +517,9 @@ public Builder jobId(String jobId) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -495,6 +531,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -506,6 +545,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -517,6 +559,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    If provided, will only return applications with this reject reason.

    + */ @JsonSetter(value = "reject_reason_id", nulls = Nulls.SKIP) public Builder rejectReasonId(Optional rejectReasonId) { this.rejectReasonId = rejectReasonId; @@ -528,6 +573,9 @@ public Builder rejectReasonId(String rejectReasonId) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -539,6 +587,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    If provided, will only return applications with this source.

    + */ @JsonSetter(value = "source", nulls = Nulls.SKIP) public Builder source(Optional source) { this.source = source; diff --git a/src/main/java/com/merge/api/ats/types/ApplicationsMetaPostRetrieveRequest.java b/src/main/java/com/merge/api/ats/types/ApplicationsMetaPostRetrieveRequest.java index c26caa43f..1c0fe14ff 100644 --- a/src/main/java/com/merge/api/ats/types/ApplicationsMetaPostRetrieveRequest.java +++ b/src/main/java/com/merge/api/ats/types/ApplicationsMetaPostRetrieveRequest.java @@ -82,6 +82,9 @@ public Builder from(ApplicationsMetaPostRetrieveRequest other) { return this; } + /** + *

    The template ID associated with the nested application in the request.

    + */ @JsonSetter(value = "application_remote_template_id", nulls = Nulls.SKIP) public Builder applicationRemoteTemplateId(Optional applicationRemoteTemplateId) { this.applicationRemoteTemplateId = applicationRemoteTemplateId; diff --git a/src/main/java/com/merge/api/ats/types/ApplicationsRetrieveRequest.java b/src/main/java/com/merge/api/ats/types/ApplicationsRetrieveRequest.java index 25dfc0945..f649ce4b5 100644 --- a/src/main/java/com/merge/api/ats/types/ApplicationsRetrieveRequest.java +++ b/src/main/java/com/merge/api/ats/types/ApplicationsRetrieveRequest.java @@ -116,6 +116,9 @@ public Builder from(ApplicationsRetrieveRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -132,6 +135,9 @@ public Builder expand(ApplicationsRetrieveRequestExpandItem expand) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -143,6 +149,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/ats/types/Attachment.java b/src/main/java/com/merge/api/ats/types/Attachment.java index 6578926ce..7c88304bb 100644 --- a/src/main/java/com/merge/api/ats/types/Attachment.java +++ b/src/main/java/com/merge/api/ats/types/Attachment.java @@ -37,7 +37,7 @@ public final class Attachment { private final Optional candidate; - private final Optional attachmentType; + private final Optional attachmentType; private final Optional remoteWasDeleted; @@ -55,7 +55,7 @@ private Attachment( Optional fileName, Optional fileUrl, Optional candidate, - Optional attachmentType, + Optional attachmentType, Optional remoteWasDeleted, Optional> fieldMappings, Optional> remoteData, @@ -137,7 +137,7 @@ public Optional getCandidate() { * */ @JsonProperty("attachment_type") - public Optional getAttachmentType() { + public Optional getAttachmentType() { return attachmentType; } @@ -225,7 +225,7 @@ public static final class Builder { private Optional candidate = Optional.empty(); - private Optional attachmentType = Optional.empty(); + private Optional attachmentType = Optional.empty(); private Optional remoteWasDeleted = Optional.empty(); @@ -264,6 +264,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -275,6 +278,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -286,6 +292,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -297,6 +306,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The attachment's name.

    + */ @JsonSetter(value = "file_name", nulls = Nulls.SKIP) public Builder fileName(Optional fileName) { this.fileName = fileName; @@ -308,6 +320,9 @@ public Builder fileName(String fileName) { return this; } + /** + *

    The attachment's url.

    + */ @JsonSetter(value = "file_url", nulls = Nulls.SKIP) public Builder fileUrl(Optional fileUrl) { this.fileUrl = fileUrl; @@ -330,17 +345,29 @@ public Builder candidate(String candidate) { return this; } + /** + *

    The attachment's type.

    + *
      + *
    • RESUME - RESUME
    • + *
    • COVER_LETTER - COVER_LETTER
    • + *
    • OFFER_LETTER - OFFER_LETTER
    • + *
    • OTHER - OTHER
    • + *
    + */ @JsonSetter(value = "attachment_type", nulls = Nulls.SKIP) - public Builder attachmentType(Optional attachmentType) { + public Builder attachmentType(Optional attachmentType) { this.attachmentType = attachmentType; return this; } - public Builder attachmentType(AttachmentTypeEnum attachmentType) { + public Builder attachmentType(AttachmentAttachmentType attachmentType) { this.attachmentType = Optional.ofNullable(attachmentType); return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/ats/types/AttachmentAttachmentType.java b/src/main/java/com/merge/api/ats/types/AttachmentAttachmentType.java new file mode 100644 index 000000000..064435e2b --- /dev/null +++ b/src/main/java/com/merge/api/ats/types/AttachmentAttachmentType.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ats.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = AttachmentAttachmentType.Deserializer.class) +public final class AttachmentAttachmentType { + private final Object value; + + private final int type; + + private AttachmentAttachmentType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((AttachmentTypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AttachmentAttachmentType && equalTo((AttachmentAttachmentType) other); + } + + private boolean equalTo(AttachmentAttachmentType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static AttachmentAttachmentType of(AttachmentTypeEnum value) { + return new AttachmentAttachmentType(value, 0); + } + + public static AttachmentAttachmentType of(String value) { + return new AttachmentAttachmentType(value, 1); + } + + public interface Visitor { + T visit(AttachmentTypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(AttachmentAttachmentType.class); + } + + @java.lang.Override + public AttachmentAttachmentType deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, AttachmentTypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ats/types/AttachmentEndpointRequest.java b/src/main/java/com/merge/api/ats/types/AttachmentEndpointRequest.java index 6747c25b7..f3c64e4ca 100644 --- a/src/main/java/com/merge/api/ats/types/AttachmentEndpointRequest.java +++ b/src/main/java/com/merge/api/ats/types/AttachmentEndpointRequest.java @@ -115,10 +115,16 @@ public interface RemoteUserIdStage { public interface _FinalStage { AttachmentEndpointRequest build(); + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ _FinalStage isDebugMode(Optional isDebugMode); _FinalStage isDebugMode(Boolean isDebugMode); + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ _FinalStage runAsync(Optional runAsync); _FinalStage runAsync(Boolean runAsync); @@ -172,6 +178,9 @@ public _FinalStage runAsync(Boolean runAsync) { return this; } + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ @java.lang.Override @JsonSetter(value = "run_async", nulls = Nulls.SKIP) public _FinalStage runAsync(Optional runAsync) { @@ -189,6 +198,9 @@ public _FinalStage isDebugMode(Boolean isDebugMode) { return this; } + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ @java.lang.Override @JsonSetter(value = "is_debug_mode", nulls = Nulls.SKIP) public _FinalStage isDebugMode(Optional isDebugMode) { diff --git a/src/main/java/com/merge/api/ats/types/AttachmentRequest.java b/src/main/java/com/merge/api/ats/types/AttachmentRequest.java index ca14d669e..b4e4db3f8 100644 --- a/src/main/java/com/merge/api/ats/types/AttachmentRequest.java +++ b/src/main/java/com/merge/api/ats/types/AttachmentRequest.java @@ -27,7 +27,7 @@ public final class AttachmentRequest { private final Optional candidate; - private final Optional attachmentType; + private final Optional attachmentType; private final Optional> integrationParams; @@ -39,7 +39,7 @@ private AttachmentRequest( Optional fileName, Optional fileUrl, Optional candidate, - Optional attachmentType, + Optional attachmentType, Optional> integrationParams, Optional> linkedAccountParams, Map additionalProperties) { @@ -86,7 +86,7 @@ public Optional getCandidate() { * */ @JsonProperty("attachment_type") - public Optional getAttachmentType() { + public Optional getAttachmentType() { return attachmentType; } @@ -148,7 +148,7 @@ public static final class Builder { private Optional candidate = Optional.empty(); - private Optional attachmentType = Optional.empty(); + private Optional attachmentType = Optional.empty(); private Optional> integrationParams = Optional.empty(); @@ -169,6 +169,9 @@ public Builder from(AttachmentRequest other) { return this; } + /** + *

    The attachment's name.

    + */ @JsonSetter(value = "file_name", nulls = Nulls.SKIP) public Builder fileName(Optional fileName) { this.fileName = fileName; @@ -180,6 +183,9 @@ public Builder fileName(String fileName) { return this; } + /** + *

    The attachment's url.

    + */ @JsonSetter(value = "file_url", nulls = Nulls.SKIP) public Builder fileUrl(Optional fileUrl) { this.fileUrl = fileUrl; @@ -202,13 +208,22 @@ public Builder candidate(String candidate) { return this; } + /** + *

    The attachment's type.

    + *
      + *
    • RESUME - RESUME
    • + *
    • COVER_LETTER - COVER_LETTER
    • + *
    • OFFER_LETTER - OFFER_LETTER
    • + *
    • OTHER - OTHER
    • + *
    + */ @JsonSetter(value = "attachment_type", nulls = Nulls.SKIP) - public Builder attachmentType(Optional attachmentType) { + public Builder attachmentType(Optional attachmentType) { this.attachmentType = attachmentType; return this; } - public Builder attachmentType(AttachmentTypeEnum attachmentType) { + public Builder attachmentType(AttachmentRequestAttachmentType attachmentType) { this.attachmentType = Optional.ofNullable(attachmentType); return this; } diff --git a/src/main/java/com/merge/api/ats/types/AttachmentRequestAttachmentType.java b/src/main/java/com/merge/api/ats/types/AttachmentRequestAttachmentType.java new file mode 100644 index 000000000..f19d05007 --- /dev/null +++ b/src/main/java/com/merge/api/ats/types/AttachmentRequestAttachmentType.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ats.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = AttachmentRequestAttachmentType.Deserializer.class) +public final class AttachmentRequestAttachmentType { + private final Object value; + + private final int type; + + private AttachmentRequestAttachmentType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((AttachmentTypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AttachmentRequestAttachmentType && equalTo((AttachmentRequestAttachmentType) other); + } + + private boolean equalTo(AttachmentRequestAttachmentType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static AttachmentRequestAttachmentType of(AttachmentTypeEnum value) { + return new AttachmentRequestAttachmentType(value, 0); + } + + public static AttachmentRequestAttachmentType of(String value) { + return new AttachmentRequestAttachmentType(value, 1); + } + + public interface Visitor { + T visit(AttachmentTypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(AttachmentRequestAttachmentType.class); + } + + @java.lang.Override + public AttachmentRequestAttachmentType deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, AttachmentTypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ats/types/AttachmentsListRequest.java b/src/main/java/com/merge/api/ats/types/AttachmentsListRequest.java index 295b24dbb..08fee160b 100644 --- a/src/main/java/com/merge/api/ats/types/AttachmentsListRequest.java +++ b/src/main/java/com/merge/api/ats/types/AttachmentsListRequest.java @@ -307,6 +307,9 @@ public Builder from(AttachmentsListRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -323,6 +326,9 @@ public Builder expand(String expand) { return this; } + /** + *

    If provided, will only return attachments for this candidate.

    + */ @JsonSetter(value = "candidate_id", nulls = Nulls.SKIP) public Builder candidateId(Optional candidateId) { this.candidateId = candidateId; @@ -334,6 +340,9 @@ public Builder candidateId(String candidateId) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -345,6 +354,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -356,6 +368,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -367,6 +382,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -378,6 +396,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -389,6 +410,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -400,6 +424,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -411,6 +438,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -422,6 +452,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -433,6 +466,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    Deprecated. Use show_enum_origins.

    + */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -444,6 +480,9 @@ public Builder remoteFields(String remoteFields) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -455,6 +494,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    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

    + */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; diff --git a/src/main/java/com/merge/api/ats/types/AttachmentsRetrieveRequest.java b/src/main/java/com/merge/api/ats/types/AttachmentsRetrieveRequest.java index dbcc26c31..fff610e32 100644 --- a/src/main/java/com/merge/api/ats/types/AttachmentsRetrieveRequest.java +++ b/src/main/java/com/merge/api/ats/types/AttachmentsRetrieveRequest.java @@ -149,6 +149,9 @@ public Builder from(AttachmentsRetrieveRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -165,6 +168,9 @@ public Builder expand(String expand) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -176,6 +182,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -187,6 +196,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    Deprecated. Use show_enum_origins.

    + */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -198,6 +210,9 @@ public Builder remoteFields(String remoteFields) { return this; } + /** + *

    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

    + */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; diff --git a/src/main/java/com/merge/api/ats/types/AuditLogEvent.java b/src/main/java/com/merge/api/ats/types/AuditLogEvent.java index 771884f81..189b96781 100644 --- a/src/main/java/com/merge/api/ats/types/AuditLogEvent.java +++ b/src/main/java/com/merge/api/ats/types/AuditLogEvent.java @@ -28,11 +28,11 @@ public final class AuditLogEvent { private final Optional userEmail; - private final RoleEnum role; + private final AuditLogEventRole role; private final String ipAddress; - private final EventTypeEnum eventType; + private final AuditLogEventEventType eventType; private final String eventDescription; @@ -44,9 +44,9 @@ private AuditLogEvent( Optional id, Optional userName, Optional userEmail, - RoleEnum role, + AuditLogEventRole role, String ipAddress, - EventTypeEnum eventType, + AuditLogEventEventType eventType, String eventDescription, Optional createdAt, Map additionalProperties) { @@ -94,7 +94,7 @@ public Optional getUserEmail() { * */ @JsonProperty("role") - public RoleEnum getRole() { + public AuditLogEventRole getRole() { return role; } @@ -111,6 +111,7 @@ public String getIpAddress() { *
  • CREATED_TEST_API_KEY - CREATED_TEST_API_KEY
  • *
  • DELETED_TEST_API_KEY - DELETED_TEST_API_KEY
  • *
  • REGENERATED_PRODUCTION_API_KEY - REGENERATED_PRODUCTION_API_KEY
  • + *
  • REGENERATED_WEBHOOK_SIGNATURE - REGENERATED_WEBHOOK_SIGNATURE
  • *
  • INVITED_USER - INVITED_USER
  • *
  • TWO_FACTOR_AUTH_ENABLED - TWO_FACTOR_AUTH_ENABLED
  • *
  • TWO_FACTOR_AUTH_DISABLED - TWO_FACTOR_AUTH_DISABLED
  • @@ -151,7 +152,7 @@ public String getIpAddress() { * */ @JsonProperty("event_type") - public EventTypeEnum getEventType() { + public AuditLogEventEventType getEventType() { return eventType; } @@ -210,7 +211,17 @@ public static RoleStage builder() { } public interface RoleStage { - IpAddressStage role(@NotNull RoleEnum role); + /** + * Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. + * + * * `ADMIN` - ADMIN + * * `DEVELOPER` - DEVELOPER + * * `MEMBER` - MEMBER + * * `API` - API + * * `SYSTEM` - SYSTEM + * * `MERGE_TEAM` - MERGE_TEAM + */ + IpAddressStage role(@NotNull AuditLogEventRole role); Builder from(AuditLogEvent other); } @@ -220,7 +231,54 @@ public interface IpAddressStage { } public interface EventTypeStage { - EventDescriptionStage eventType(@NotNull EventTypeEnum eventType); + /** + * Designates the type of event that occurred. + * + * * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + * * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + * * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + * * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + * * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + * * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + * * `INVITED_USER` - INVITED_USER + * * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + * * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + * * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + * * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + * * `CREATED_DESTINATION` - CREATED_DESTINATION + * * `DELETED_DESTINATION` - DELETED_DESTINATION + * * `CHANGED_DESTINATION` - CHANGED_DESTINATION + * * `CHANGED_SCOPES` - CHANGED_SCOPES + * * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + * * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + * * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + * * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + * * `ENABLED_CATEGORY` - ENABLED_CATEGORY + * * `DISABLED_CATEGORY` - DISABLED_CATEGORY + * * `CHANGED_PASSWORD` - CHANGED_PASSWORD + * * `RESET_PASSWORD` - RESET_PASSWORD + * * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING + * * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING + * * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + * * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + * * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING + * * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING + * * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + * * `MUTED_ISSUE` - MUTED_ISSUE + * * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + * * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + * * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + * * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + * * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + */ + EventDescriptionStage eventType(@NotNull AuditLogEventEventType eventType); } public interface EventDescriptionStage { @@ -234,10 +292,16 @@ public interface _FinalStage { _FinalStage id(String id); + /** + *

    The User's full name at the time of this Event occurring.

    + */ _FinalStage userName(Optional userName); _FinalStage userName(String userName); + /** + *

    The User's email at the time of this Event occurring.

    + */ _FinalStage userEmail(Optional userEmail); _FinalStage userEmail(String userEmail); @@ -250,11 +314,11 @@ public interface _FinalStage { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements RoleStage, IpAddressStage, EventTypeStage, EventDescriptionStage, _FinalStage { - private RoleEnum role; + private AuditLogEventRole role; private String ipAddress; - private EventTypeEnum eventType; + private AuditLogEventEventType eventType; private String eventDescription; @@ -285,7 +349,14 @@ public Builder from(AuditLogEvent other) { } /** - *

    Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring.

    + * Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. + * + * * `ADMIN` - ADMIN + * * `DEVELOPER` - DEVELOPER + * * `MEMBER` - MEMBER + * * `API` - API + * * `SYSTEM` - SYSTEM + * * `MERGE_TEAM` - MERGE_TEAM

    Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring.

    *
      *
    • ADMIN - ADMIN
    • *
    • DEVELOPER - DEVELOPER
    • @@ -298,7 +369,7 @@ public Builder from(AuditLogEvent other) { */ @java.lang.Override @JsonSetter("role") - public IpAddressStage role(@NotNull RoleEnum role) { + public IpAddressStage role(@NotNull AuditLogEventRole role) { this.role = role; return this; } @@ -311,13 +382,58 @@ public EventTypeStage ipAddress(@NotNull String ipAddress) { } /** - *

      Designates the type of event that occurred.

      + * Designates the type of event that occurred. + * + * * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + * * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + * * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + * * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + * * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + * * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + * * `INVITED_USER` - INVITED_USER + * * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + * * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + * * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + * * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + * * `CREATED_DESTINATION` - CREATED_DESTINATION + * * `DELETED_DESTINATION` - DELETED_DESTINATION + * * `CHANGED_DESTINATION` - CHANGED_DESTINATION + * * `CHANGED_SCOPES` - CHANGED_SCOPES + * * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + * * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + * * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + * * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + * * `ENABLED_CATEGORY` - ENABLED_CATEGORY + * * `DISABLED_CATEGORY` - DISABLED_CATEGORY + * * `CHANGED_PASSWORD` - CHANGED_PASSWORD + * * `RESET_PASSWORD` - RESET_PASSWORD + * * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING + * * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING + * * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + * * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + * * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING + * * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING + * * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + * * `MUTED_ISSUE` - MUTED_ISSUE + * * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + * * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + * * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + * * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + * * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED

      Designates the type of event that occurred.

      *
        *
      • CREATED_REMOTE_PRODUCTION_API_KEY - CREATED_REMOTE_PRODUCTION_API_KEY
      • *
      • DELETED_REMOTE_PRODUCTION_API_KEY - DELETED_REMOTE_PRODUCTION_API_KEY
      • *
      • CREATED_TEST_API_KEY - CREATED_TEST_API_KEY
      • *
      • DELETED_TEST_API_KEY - DELETED_TEST_API_KEY
      • *
      • REGENERATED_PRODUCTION_API_KEY - REGENERATED_PRODUCTION_API_KEY
      • + *
      • REGENERATED_WEBHOOK_SIGNATURE - REGENERATED_WEBHOOK_SIGNATURE
      • *
      • INVITED_USER - INVITED_USER
      • *
      • TWO_FACTOR_AUTH_ENABLED - TWO_FACTOR_AUTH_ENABLED
      • *
      • TWO_FACTOR_AUTH_DISABLED - TWO_FACTOR_AUTH_DISABLED
      • @@ -360,7 +476,7 @@ public EventTypeStage ipAddress(@NotNull String ipAddress) { */ @java.lang.Override @JsonSetter("event_type") - public EventDescriptionStage eventType(@NotNull EventTypeEnum eventType) { + public EventDescriptionStage eventType(@NotNull AuditLogEventEventType eventType) { this.eventType = eventType; return this; } @@ -395,6 +511,9 @@ public _FinalStage userEmail(String userEmail) { return this; } + /** + *

        The User's email at the time of this Event occurring.

        + */ @java.lang.Override @JsonSetter(value = "user_email", nulls = Nulls.SKIP) public _FinalStage userEmail(Optional userEmail) { @@ -412,6 +531,9 @@ public _FinalStage userName(String userName) { return this; } + /** + *

        The User's full name at the time of this Event occurring.

        + */ @java.lang.Override @JsonSetter(value = "user_name", nulls = Nulls.SKIP) public _FinalStage userName(Optional userName) { diff --git a/src/main/java/com/merge/api/ats/types/AuditLogEventEventType.java b/src/main/java/com/merge/api/ats/types/AuditLogEventEventType.java new file mode 100644 index 000000000..137d21663 --- /dev/null +++ b/src/main/java/com/merge/api/ats/types/AuditLogEventEventType.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ats.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = AuditLogEventEventType.Deserializer.class) +public final class AuditLogEventEventType { + private final Object value; + + private final int type; + + private AuditLogEventEventType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EventTypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AuditLogEventEventType && equalTo((AuditLogEventEventType) other); + } + + private boolean equalTo(AuditLogEventEventType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static AuditLogEventEventType of(EventTypeEnum value) { + return new AuditLogEventEventType(value, 0); + } + + public static AuditLogEventEventType of(String value) { + return new AuditLogEventEventType(value, 1); + } + + public interface Visitor { + T visit(EventTypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(AuditLogEventEventType.class); + } + + @java.lang.Override + public AuditLogEventEventType deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, EventTypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ats/types/AuditLogEventRole.java b/src/main/java/com/merge/api/ats/types/AuditLogEventRole.java new file mode 100644 index 000000000..a4d57604f --- /dev/null +++ b/src/main/java/com/merge/api/ats/types/AuditLogEventRole.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ats.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = AuditLogEventRole.Deserializer.class) +public final class AuditLogEventRole { + private final Object value; + + private final int type; + + private AuditLogEventRole(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((RoleEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AuditLogEventRole && equalTo((AuditLogEventRole) other); + } + + private boolean equalTo(AuditLogEventRole other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static AuditLogEventRole of(RoleEnum value) { + return new AuditLogEventRole(value, 0); + } + + public static AuditLogEventRole of(String value) { + return new AuditLogEventRole(value, 1); + } + + public interface Visitor { + T visit(RoleEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(AuditLogEventRole.class); + } + + @java.lang.Override + public AuditLogEventRole deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, RoleEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ats/types/AuditTrailListRequest.java b/src/main/java/com/merge/api/ats/types/AuditTrailListRequest.java index 2a4e2c481..e4d9e0adf 100644 --- a/src/main/java/com/merge/api/ats/types/AuditTrailListRequest.java +++ b/src/main/java/com/merge/api/ats/types/AuditTrailListRequest.java @@ -68,7 +68,7 @@ public Optional getEndDate() { } /** - * @return If included, will only include events with the given event type. Possible values include: CREATED_REMOTE_PRODUCTION_API_KEY, DELETED_REMOTE_PRODUCTION_API_KEY, CREATED_TEST_API_KEY, DELETED_TEST_API_KEY, REGENERATED_PRODUCTION_API_KEY, INVITED_USER, TWO_FACTOR_AUTH_ENABLED, TWO_FACTOR_AUTH_DISABLED, DELETED_LINKED_ACCOUNT, 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 + * @return 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 */ @JsonProperty("event_type") public Optional getEventType() { @@ -162,6 +162,9 @@ public Builder from(AuditTrailListRequest other) { return this; } + /** + *

        The pagination cursor value.

        + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -173,6 +176,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

        If included, will only include audit trail events that occurred before this time

        + */ @JsonSetter(value = "end_date", nulls = Nulls.SKIP) public Builder endDate(Optional endDate) { this.endDate = endDate; @@ -184,6 +190,9 @@ public Builder endDate(String endDate) { return this; } + /** + *

        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

        + */ @JsonSetter(value = "event_type", nulls = Nulls.SKIP) public Builder eventType(Optional eventType) { this.eventType = eventType; @@ -195,6 +204,9 @@ public Builder eventType(String eventType) { return this; } + /** + *

        Number of results to return per page.

        + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -206,6 +218,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

        If included, will only include audit trail events that occurred after this time

        + */ @JsonSetter(value = "start_date", nulls = Nulls.SKIP) public Builder startDate(Optional startDate) { this.startDate = startDate; @@ -217,6 +232,9 @@ public Builder startDate(String startDate) { return this; } + /** + *

        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.

        + */ @JsonSetter(value = "user_email", nulls = Nulls.SKIP) public Builder userEmail(Optional userEmail) { this.userEmail = userEmail; diff --git a/src/main/java/com/merge/api/ats/types/Candidate.java b/src/main/java/com/merge/api/ats/types/Candidate.java index 05e01b2e3..274b1c3d5 100644 --- a/src/main/java/com/merge/api/ats/types/Candidate.java +++ b/src/main/java/com/merge/api/ats/types/Candidate.java @@ -453,6 +453,9 @@ public Builder id(String id) { return this; } + /** + *

        The third-party API ID of the matching object.

        + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -464,6 +467,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

        The datetime that this object was created by Merge.

        + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -475,6 +481,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

        The datetime that this object was modified by Merge.

        + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -486,6 +495,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

        The candidate's first name.

        + */ @JsonSetter(value = "first_name", nulls = Nulls.SKIP) public Builder firstName(Optional firstName) { this.firstName = firstName; @@ -497,6 +509,9 @@ public Builder firstName(String firstName) { return this; } + /** + *

        The candidate's last name.

        + */ @JsonSetter(value = "last_name", nulls = Nulls.SKIP) public Builder lastName(Optional lastName) { this.lastName = lastName; @@ -508,6 +523,9 @@ public Builder lastName(String lastName) { return this; } + /** + *

        The candidate's current company.

        + */ @JsonSetter(value = "company", nulls = Nulls.SKIP) public Builder company(Optional company) { this.company = company; @@ -519,6 +537,9 @@ public Builder company(String company) { return this; } + /** + *

        The candidate's current title.

        + */ @JsonSetter(value = "title", nulls = Nulls.SKIP) public Builder title(Optional title) { this.title = title; @@ -530,6 +551,9 @@ public Builder title(String title) { return this; } + /** + *

        When the third party's candidate was created.

        + */ @JsonSetter(value = "remote_created_at", nulls = Nulls.SKIP) public Builder remoteCreatedAt(Optional remoteCreatedAt) { this.remoteCreatedAt = remoteCreatedAt; @@ -541,6 +565,9 @@ public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { return this; } + /** + *

        When the third party's candidate was updated.

        + */ @JsonSetter(value = "remote_updated_at", nulls = Nulls.SKIP) public Builder remoteUpdatedAt(Optional remoteUpdatedAt) { this.remoteUpdatedAt = remoteUpdatedAt; @@ -552,6 +579,9 @@ public Builder remoteUpdatedAt(OffsetDateTime remoteUpdatedAt) { return this; } + /** + *

        When the most recent interaction with the candidate occurred.

        + */ @JsonSetter(value = "last_interaction_at", nulls = Nulls.SKIP) public Builder lastInteractionAt(Optional lastInteractionAt) { this.lastInteractionAt = lastInteractionAt; @@ -563,6 +593,9 @@ public Builder lastInteractionAt(OffsetDateTime lastInteractionAt) { return this; } + /** + *

        Whether or not the candidate is private.

        + */ @JsonSetter(value = "is_private", nulls = Nulls.SKIP) public Builder isPrivate(Optional isPrivate) { this.isPrivate = isPrivate; @@ -574,6 +607,9 @@ public Builder isPrivate(Boolean isPrivate) { return this; } + /** + *

        Whether or not the candidate can be emailed.

        + */ @JsonSetter(value = "can_email", nulls = Nulls.SKIP) public Builder canEmail(Optional canEmail) { this.canEmail = canEmail; @@ -585,6 +621,9 @@ public Builder canEmail(Boolean canEmail) { return this; } + /** + *

        The candidate's locations.

        + */ @JsonSetter(value = "locations", nulls = Nulls.SKIP) public Builder locations(Optional>> locations) { this.locations = locations; @@ -629,6 +668,9 @@ public Builder urls(List urls) { return this; } + /** + *

        Array of Tag names as strings.

        + */ @JsonSetter(value = "tags", nulls = Nulls.SKIP) public Builder tags(Optional>> tags) { this.tags = tags; @@ -640,6 +682,9 @@ public Builder tags(List> tags) { return this; } + /** + *

        Array of Application object IDs.

        + */ @JsonSetter(value = "applications", nulls = Nulls.SKIP) public Builder applications(Optional>> applications) { this.applications = applications; @@ -651,6 +696,9 @@ public Builder applications(List> applicatio return this; } + /** + *

        Array of Attachment object IDs.

        + */ @JsonSetter(value = "attachments", nulls = Nulls.SKIP) public Builder attachments(Optional>> attachments) { this.attachments = attachments; @@ -662,6 +710,9 @@ public Builder attachments(List> attachments) return this; } + /** + *

        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.

        + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/ats/types/CandidateEndpointRequest.java b/src/main/java/com/merge/api/ats/types/CandidateEndpointRequest.java index 221fe5da9..704e91453 100644 --- a/src/main/java/com/merge/api/ats/types/CandidateEndpointRequest.java +++ b/src/main/java/com/merge/api/ats/types/CandidateEndpointRequest.java @@ -115,10 +115,16 @@ public interface RemoteUserIdStage { public interface _FinalStage { CandidateEndpointRequest build(); + /** + *

        Whether to include debug fields (such as log file links) in the response.

        + */ _FinalStage isDebugMode(Optional isDebugMode); _FinalStage isDebugMode(Boolean isDebugMode); + /** + *

        Whether or not third-party updates should be run asynchronously.

        + */ _FinalStage runAsync(Optional runAsync); _FinalStage runAsync(Boolean runAsync); @@ -172,6 +178,9 @@ public _FinalStage runAsync(Boolean runAsync) { return this; } + /** + *

        Whether or not third-party updates should be run asynchronously.

        + */ @java.lang.Override @JsonSetter(value = "run_async", nulls = Nulls.SKIP) public _FinalStage runAsync(Optional runAsync) { @@ -189,6 +198,9 @@ public _FinalStage isDebugMode(Boolean isDebugMode) { return this; } + /** + *

        Whether to include debug fields (such as log file links) in the response.

        + */ @java.lang.Override @JsonSetter(value = "is_debug_mode", nulls = Nulls.SKIP) public _FinalStage isDebugMode(Optional isDebugMode) { diff --git a/src/main/java/com/merge/api/ats/types/CandidateRequest.java b/src/main/java/com/merge/api/ats/types/CandidateRequest.java index 5d4e82cdd..34fbbf7a7 100644 --- a/src/main/java/com/merge/api/ats/types/CandidateRequest.java +++ b/src/main/java/com/merge/api/ats/types/CandidateRequest.java @@ -340,6 +340,9 @@ public Builder from(CandidateRequest other) { return this; } + /** + *

        The candidate's first name.

        + */ @JsonSetter(value = "first_name", nulls = Nulls.SKIP) public Builder firstName(Optional firstName) { this.firstName = firstName; @@ -351,6 +354,9 @@ public Builder firstName(String firstName) { return this; } + /** + *

        The candidate's last name.

        + */ @JsonSetter(value = "last_name", nulls = Nulls.SKIP) public Builder lastName(Optional lastName) { this.lastName = lastName; @@ -362,6 +368,9 @@ public Builder lastName(String lastName) { return this; } + /** + *

        The candidate's current company.

        + */ @JsonSetter(value = "company", nulls = Nulls.SKIP) public Builder company(Optional company) { this.company = company; @@ -373,6 +382,9 @@ public Builder company(String company) { return this; } + /** + *

        The candidate's current title.

        + */ @JsonSetter(value = "title", nulls = Nulls.SKIP) public Builder title(Optional title) { this.title = title; @@ -384,6 +396,9 @@ public Builder title(String title) { return this; } + /** + *

        When the most recent interaction with the candidate occurred.

        + */ @JsonSetter(value = "last_interaction_at", nulls = Nulls.SKIP) public Builder lastInteractionAt(Optional lastInteractionAt) { this.lastInteractionAt = lastInteractionAt; @@ -395,6 +410,9 @@ public Builder lastInteractionAt(OffsetDateTime lastInteractionAt) { return this; } + /** + *

        Whether or not the candidate is private.

        + */ @JsonSetter(value = "is_private", nulls = Nulls.SKIP) public Builder isPrivate(Optional isPrivate) { this.isPrivate = isPrivate; @@ -406,6 +424,9 @@ public Builder isPrivate(Boolean isPrivate) { return this; } + /** + *

        Whether or not the candidate can be emailed.

        + */ @JsonSetter(value = "can_email", nulls = Nulls.SKIP) public Builder canEmail(Optional canEmail) { this.canEmail = canEmail; @@ -417,6 +438,9 @@ public Builder canEmail(Boolean canEmail) { return this; } + /** + *

        The candidate's locations.

        + */ @JsonSetter(value = "locations", nulls = Nulls.SKIP) public Builder locations(Optional>> locations) { this.locations = locations; @@ -461,6 +485,9 @@ public Builder urls(List urls) { return this; } + /** + *

        Array of Tag names as strings.

        + */ @JsonSetter(value = "tags", nulls = Nulls.SKIP) public Builder tags(Optional>> tags) { this.tags = tags; @@ -472,6 +499,9 @@ public Builder tags(List> tags) { return this; } + /** + *

        Array of Application object IDs.

        + */ @JsonSetter(value = "applications", nulls = Nulls.SKIP) public Builder applications(Optional>> applications) { this.applications = applications; @@ -483,6 +513,9 @@ public Builder applications(List> app return this; } + /** + *

        Array of Attachment object IDs.

        + */ @JsonSetter(value = "attachments", nulls = Nulls.SKIP) public Builder attachments(Optional>> attachments) { this.attachments = attachments; diff --git a/src/main/java/com/merge/api/ats/types/CandidatesListRequest.java b/src/main/java/com/merge/api/ats/types/CandidatesListRequest.java index 59e0bb429..b2721928a 100644 --- a/src/main/java/com/merge/api/ats/types/CandidatesListRequest.java +++ b/src/main/java/com/merge/api/ats/types/CandidatesListRequest.java @@ -324,6 +324,9 @@ public Builder from(CandidatesListRequest other) { return this; } + /** + *

        Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

        + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -340,6 +343,9 @@ public Builder expand(CandidatesListRequestExpandItem expand) { return this; } + /** + *

        If provided, will only return objects created after this datetime.

        + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -351,6 +357,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

        If provided, will only return objects created before this datetime.

        + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -362,6 +371,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

        The pagination cursor value.

        + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -373,6 +385,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

        If provided, will only return candidates with these email addresses; multiple addresses can be separated by commas.

        + */ @JsonSetter(value = "email_addresses", nulls = Nulls.SKIP) public Builder emailAddresses(Optional emailAddresses) { this.emailAddresses = emailAddresses; @@ -384,6 +399,9 @@ public Builder emailAddresses(String emailAddresses) { return this; } + /** + *

        If provided, will only return candidates with this first name.

        + */ @JsonSetter(value = "first_name", nulls = Nulls.SKIP) public Builder firstName(Optional firstName) { this.firstName = firstName; @@ -395,6 +413,9 @@ public Builder firstName(String firstName) { return this; } + /** + *

        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.

        + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -406,6 +427,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

        Whether to include the original data Merge fetched from the third-party to produce these models.

        + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -417,6 +441,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

        Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

        + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -428,6 +455,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

        If provided, will only return candidates with this last name.

        + */ @JsonSetter(value = "last_name", nulls = Nulls.SKIP) public Builder lastName(Optional lastName) { this.lastName = lastName; @@ -439,6 +469,9 @@ public Builder lastName(String lastName) { return this; } + /** + *

        If provided, only objects synced by Merge after this date time will be returned.

        + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -450,6 +483,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

        If provided, only objects synced by Merge before this date time will be returned.

        + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -461,6 +497,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

        Number of results to return per page.

        + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -472,6 +511,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

        The API provider's ID for the given object.

        + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -483,6 +525,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

        If provided, will only return candidates with these tags; multiple tags can be separated by commas.

        + */ @JsonSetter(value = "tags", nulls = Nulls.SKIP) public Builder tags(Optional tags) { this.tags = tags; diff --git a/src/main/java/com/merge/api/ats/types/CandidatesRetrieveRequest.java b/src/main/java/com/merge/api/ats/types/CandidatesRetrieveRequest.java index acc3cec56..9d6bf798a 100644 --- a/src/main/java/com/merge/api/ats/types/CandidatesRetrieveRequest.java +++ b/src/main/java/com/merge/api/ats/types/CandidatesRetrieveRequest.java @@ -116,6 +116,9 @@ public Builder from(CandidatesRetrieveRequest other) { return this; } + /** + *

        Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

        + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -132,6 +135,9 @@ public Builder expand(CandidatesRetrieveRequestExpandItem expand) { return this; } + /** + *

        Whether to include the original data Merge fetched from the third-party to produce these models.

        + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -143,6 +149,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

        Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

        + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/ats/types/CommonModelScopeApi.java b/src/main/java/com/merge/api/ats/types/CommonModelScopeApi.java index 8b7726971..f6574f2de 100644 --- a/src/main/java/com/merge/api/ats/types/CommonModelScopeApi.java +++ b/src/main/java/com/merge/api/ats/types/CommonModelScopeApi.java @@ -82,6 +82,9 @@ public Builder from(CommonModelScopeApi other) { return this; } + /** + *

        The common models you want to update the scopes for

        + */ @JsonSetter(value = "common_models", nulls = Nulls.SKIP) public Builder commonModels(List commonModels) { this.commonModels.clear(); diff --git a/src/main/java/com/merge/api/ats/types/CreateFieldMappingRequest.java b/src/main/java/com/merge/api/ats/types/CreateFieldMappingRequest.java index 94c5035fa..84fb22ffa 100644 --- a/src/main/java/com/merge/api/ats/types/CreateFieldMappingRequest.java +++ b/src/main/java/com/merge/api/ats/types/CreateFieldMappingRequest.java @@ -158,34 +158,55 @@ public static TargetFieldNameStage builder() { } public interface TargetFieldNameStage { + /** + * The name of the target field you want this remote field to map to. + */ TargetFieldDescriptionStage targetFieldName(@NotNull String targetFieldName); Builder from(CreateFieldMappingRequest other); } public interface TargetFieldDescriptionStage { + /** + * The description of the target field you want this remote field to map to. + */ RemoteMethodStage targetFieldDescription(@NotNull String targetFieldDescription); } public interface RemoteMethodStage { + /** + * The method of the remote endpoint where the remote field is coming from. + */ RemoteUrlPathStage remoteMethod(@NotNull String remoteMethod); } public interface RemoteUrlPathStage { + /** + * The path of the remote endpoint where the remote field is coming from. + */ CommonModelNameStage remoteUrlPath(@NotNull String remoteUrlPath); } public interface CommonModelNameStage { + /** + * The name of the Common Model that the remote field corresponds to in a given category. + */ _FinalStage commonModelName(@NotNull String commonModelName); } public interface _FinalStage { CreateFieldMappingRequest build(); + /** + *

        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.

        + */ _FinalStage excludeRemoteFieldMetadata(Optional excludeRemoteFieldMetadata); _FinalStage excludeRemoteFieldMetadata(Boolean excludeRemoteFieldMetadata); + /** + *

        The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.

        + */ _FinalStage remoteFieldTraversalPath(List remoteFieldTraversalPath); _FinalStage addRemoteFieldTraversalPath(JsonNode remoteFieldTraversalPath); @@ -233,7 +254,7 @@ public Builder from(CreateFieldMappingRequest other) { } /** - *

        The name of the target field you want this remote field to map to.

        + * The name of the target field you want this remote field to map to.

        The name of the target field you want this remote field to map to.

        * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -244,7 +265,7 @@ public TargetFieldDescriptionStage targetFieldName(@NotNull String targetFieldNa } /** - *

        The description of the target field you want this remote field to map to.

        + * The description of the target field you want this remote field to map to.

        The description of the target field you want this remote field to map to.

        * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -255,7 +276,7 @@ public RemoteMethodStage targetFieldDescription(@NotNull String targetFieldDescr } /** - *

        The method of the remote endpoint where the remote field is coming from.

        + * The method of the remote endpoint where the remote field is coming from.

        The method of the remote endpoint where the remote field is coming from.

        * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -266,7 +287,7 @@ public RemoteUrlPathStage remoteMethod(@NotNull String remoteMethod) { } /** - *

        The path of the remote endpoint where the remote field is coming from.

        + * The path of the remote endpoint where the remote field is coming from.

        The path of the remote endpoint where the remote field is coming from.

        * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -277,7 +298,7 @@ public CommonModelNameStage remoteUrlPath(@NotNull String remoteUrlPath) { } /** - *

        The name of the Common Model that the remote field corresponds to in a given category.

        + * The name of the Common Model that the remote field corresponds to in a given category.

        The name of the Common Model that the remote field corresponds to in a given category.

        * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -307,6 +328,9 @@ public _FinalStage addRemoteFieldTraversalPath(JsonNode remoteFieldTraversalPath return this; } + /** + *

        The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.

        + */ @java.lang.Override @JsonSetter(value = "remote_field_traversal_path", nulls = Nulls.SKIP) public _FinalStage remoteFieldTraversalPath(List remoteFieldTraversalPath) { @@ -325,6 +349,9 @@ public _FinalStage excludeRemoteFieldMetadata(Boolean excludeRemoteFieldMetadata return this; } + /** + *

        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.

        + */ @java.lang.Override @JsonSetter(value = "exclude_remote_field_metadata", nulls = Nulls.SKIP) public _FinalStage excludeRemoteFieldMetadata(Optional excludeRemoteFieldMetadata) { diff --git a/src/main/java/com/merge/api/ats/types/DataPassthroughRequest.java b/src/main/java/com/merge/api/ats/types/DataPassthroughRequest.java index 6abf232fe..ed1d5c573 100644 --- a/src/main/java/com/merge/api/ats/types/DataPassthroughRequest.java +++ b/src/main/java/com/merge/api/ats/types/DataPassthroughRequest.java @@ -171,24 +171,39 @@ public interface MethodStage { } public interface PathStage { + /** + * The path of the request in the third party's platform. + */ _FinalStage path(@NotNull String path); } public interface _FinalStage { DataPassthroughRequest build(); + /** + *

        An optional override of the third party's base url for the request.

        + */ _FinalStage baseUrlOverride(Optional baseUrlOverride); _FinalStage baseUrlOverride(String baseUrlOverride); + /** + *

        The data with the request. You must include a request_format parameter matching the data's format

        + */ _FinalStage data(Optional data); _FinalStage data(String data); + /** + *

        Pass an array of MultipartFormField objects in here instead of using the data param if request_format is set to MULTIPART.

        + */ _FinalStage multipartFormData(Optional> multipartFormData); _FinalStage multipartFormData(List multipartFormData); + /** + *

        The headers to use for the request (Merge will handle the account's authorization headers). Content-Type header is required for passthrough. Choose content type corresponding to expected format of receiving server.

        + */ _FinalStage headers(Optional> headers); _FinalStage headers(Map headers); @@ -197,6 +212,9 @@ public interface _FinalStage { _FinalStage requestFormat(RequestFormatEnum requestFormat); + /** + *

        Optional. If true, the response will always be an object of the form {"type": T, "value": ...} where T will be one of string, boolean, number, null, array, object.

        + */ _FinalStage normalizeResponse(Optional normalizeResponse); _FinalStage normalizeResponse(Boolean normalizeResponse); @@ -246,7 +264,7 @@ public PathStage method(@NotNull MethodEnum method) { } /** - *

        The path of the request in the third party's platform.

        + * The path of the request in the third party's platform.

        The path of the request in the third party's platform.

        * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -266,6 +284,9 @@ public _FinalStage normalizeResponse(Boolean normalizeResponse) { return this; } + /** + *

        Optional. If true, the response will always be an object of the form {"type": T, "value": ...} where T will be one of string, boolean, number, null, array, object.

        + */ @java.lang.Override @JsonSetter(value = "normalize_response", nulls = Nulls.SKIP) public _FinalStage normalizeResponse(Optional normalizeResponse) { @@ -296,6 +317,9 @@ public _FinalStage headers(Map headers) { return this; } + /** + *

        The headers to use for the request (Merge will handle the account's authorization headers). Content-Type header is required for passthrough. Choose content type corresponding to expected format of receiving server.

        + */ @java.lang.Override @JsonSetter(value = "headers", nulls = Nulls.SKIP) public _FinalStage headers(Optional> headers) { @@ -313,6 +337,9 @@ public _FinalStage multipartFormData(List multipartFo return this; } + /** + *

        Pass an array of MultipartFormField objects in here instead of using the data param if request_format is set to MULTIPART.

        + */ @java.lang.Override @JsonSetter(value = "multipart_form_data", nulls = Nulls.SKIP) public _FinalStage multipartFormData(Optional> multipartFormData) { @@ -330,6 +357,9 @@ public _FinalStage data(String data) { return this; } + /** + *

        The data with the request. You must include a request_format parameter matching the data's format

        + */ @java.lang.Override @JsonSetter(value = "data", nulls = Nulls.SKIP) public _FinalStage data(Optional data) { @@ -347,6 +377,9 @@ public _FinalStage baseUrlOverride(String baseUrlOverride) { return this; } + /** + *

        An optional override of the third party's base url for the request.

        + */ @java.lang.Override @JsonSetter(value = "base_url_override", nulls = Nulls.SKIP) public _FinalStage baseUrlOverride(Optional baseUrlOverride) { diff --git a/src/main/java/com/merge/api/ats/types/Department.java b/src/main/java/com/merge/api/ats/types/Department.java index e89016c33..de86970fb 100644 --- a/src/main/java/com/merge/api/ats/types/Department.java +++ b/src/main/java/com/merge/api/ats/types/Department.java @@ -207,6 +207,9 @@ public Builder id(String id) { return this; } + /** + *

        The third-party API ID of the matching object.

        + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -218,6 +221,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

        The datetime that this object was created by Merge.

        + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -229,6 +235,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

        The datetime that this object was modified by Merge.

        + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -240,6 +249,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

        The department's name.

        + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -251,6 +263,9 @@ public Builder name(String name) { return this; } + /** + *

        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.

        + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/ats/types/DepartmentsListRequest.java b/src/main/java/com/merge/api/ats/types/DepartmentsListRequest.java index 01a217fd3..23e3ed9ed 100644 --- a/src/main/java/com/merge/api/ats/types/DepartmentsListRequest.java +++ b/src/main/java/com/merge/api/ats/types/DepartmentsListRequest.java @@ -237,6 +237,9 @@ public Builder from(DepartmentsListRequest other) { return this; } + /** + *

        If provided, will only return objects created after this datetime.

        + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -248,6 +251,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

        If provided, will only return objects created before this datetime.

        + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -259,6 +265,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

        The pagination cursor value.

        + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -270,6 +279,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

        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.

        + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -281,6 +293,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

        Whether to include the original data Merge fetched from the third-party to produce these models.

        + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -292,6 +307,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

        Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

        + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -303,6 +321,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

        If provided, only objects synced by Merge after this date time will be returned.

        + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -314,6 +335,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

        If provided, only objects synced by Merge before this date time will be returned.

        + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -325,6 +349,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

        Number of results to return per page.

        + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -336,6 +363,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

        The API provider's ID for the given object.

        + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; diff --git a/src/main/java/com/merge/api/ats/types/DepartmentsRetrieveRequest.java b/src/main/java/com/merge/api/ats/types/DepartmentsRetrieveRequest.java index 29510dcca..bcb5af54d 100644 --- a/src/main/java/com/merge/api/ats/types/DepartmentsRetrieveRequest.java +++ b/src/main/java/com/merge/api/ats/types/DepartmentsRetrieveRequest.java @@ -97,6 +97,9 @@ public Builder from(DepartmentsRetrieveRequest other) { return this; } + /** + *

        Whether to include the original data Merge fetched from the third-party to produce these models.

        + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -108,6 +111,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

        Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

        + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/ats/types/Eeoc.java b/src/main/java/com/merge/api/ats/types/Eeoc.java index 2c9df6097..d71a7ba89 100644 --- a/src/main/java/com/merge/api/ats/types/Eeoc.java +++ b/src/main/java/com/merge/api/ats/types/Eeoc.java @@ -35,13 +35,13 @@ public final class Eeoc { private final Optional submittedAt; - private final Optional race; + private final Optional race; - private final Optional gender; + private final Optional gender; - private final Optional veteranStatus; + private final Optional veteranStatus; - private final Optional disabilityStatus; + private final Optional disabilityStatus; private final Optional remoteWasDeleted; @@ -58,10 +58,10 @@ private Eeoc( Optional modifiedAt, Optional candidate, Optional submittedAt, - Optional race, - Optional gender, - Optional veteranStatus, - Optional disabilityStatus, + Optional race, + Optional gender, + Optional veteranStatus, + Optional disabilityStatus, Optional remoteWasDeleted, Optional> fieldMappings, Optional> remoteData, @@ -141,7 +141,7 @@ public Optional getSubmittedAt() { *
      */ @JsonProperty("race") - public Optional getRace() { + public Optional getRace() { return race; } @@ -156,7 +156,7 @@ public Optional getRace() { *
    */ @JsonProperty("gender") - public Optional getGender() { + public Optional getGender() { return gender; } @@ -169,7 +169,7 @@ public Optional getGender() { * */ @JsonProperty("veteran_status") - public Optional getVeteranStatus() { + public Optional getVeteranStatus() { return veteranStatus; } @@ -182,7 +182,7 @@ public Optional getVeteranStatus() { * */ @JsonProperty("disability_status") - public Optional getDisabilityStatus() { + public Optional getDisabilityStatus() { return disabilityStatus; } @@ -272,13 +272,13 @@ public static final class Builder { private Optional submittedAt = Optional.empty(); - private Optional race = Optional.empty(); + private Optional race = Optional.empty(); - private Optional gender = Optional.empty(); + private Optional gender = Optional.empty(); - private Optional veteranStatus = Optional.empty(); + private Optional veteranStatus = Optional.empty(); - private Optional disabilityStatus = Optional.empty(); + private Optional disabilityStatus = Optional.empty(); private Optional remoteWasDeleted = Optional.empty(); @@ -319,6 +319,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -330,6 +333,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -341,6 +347,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -352,6 +361,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The candidate being represented.

    + */ @JsonSetter(value = "candidate", nulls = Nulls.SKIP) public Builder candidate(Optional candidate) { this.candidate = candidate; @@ -363,6 +375,9 @@ public Builder candidate(EeocCandidate candidate) { return this; } + /** + *

    When the information was submitted.

    + */ @JsonSetter(value = "submitted_at", nulls = Nulls.SKIP) public Builder submittedAt(Optional submittedAt) { this.submittedAt = submittedAt; @@ -374,50 +389,92 @@ public Builder submittedAt(OffsetDateTime submittedAt) { return this; } + /** + *

    The candidate's race.

    + *
      + *
    • AMERICAN_INDIAN_OR_ALASKAN_NATIVE - AMERICAN_INDIAN_OR_ALASKAN_NATIVE
    • + *
    • ASIAN - ASIAN
    • + *
    • BLACK_OR_AFRICAN_AMERICAN - BLACK_OR_AFRICAN_AMERICAN
    • + *
    • HISPANIC_OR_LATINO - HISPANIC_OR_LATINO
    • + *
    • WHITE - WHITE
    • + *
    • NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER - NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER
    • + *
    • TWO_OR_MORE_RACES - TWO_OR_MORE_RACES
    • + *
    • DECLINE_TO_SELF_IDENTIFY - DECLINE_TO_SELF_IDENTIFY
    • + *
    + */ @JsonSetter(value = "race", nulls = Nulls.SKIP) - public Builder race(Optional race) { + public Builder race(Optional race) { this.race = race; return this; } - public Builder race(RaceEnum race) { + public Builder race(EeocRace race) { this.race = Optional.ofNullable(race); return this; } + /** + *

    The candidate's gender.

    + *
      + *
    • MALE - MALE
    • + *
    • FEMALE - FEMALE
    • + *
    • NON-BINARY - NON-BINARY
    • + *
    • OTHER - OTHER
    • + *
    • DECLINE_TO_SELF_IDENTIFY - DECLINE_TO_SELF_IDENTIFY
    • + *
    + */ @JsonSetter(value = "gender", nulls = Nulls.SKIP) - public Builder gender(Optional gender) { + public Builder gender(Optional gender) { this.gender = gender; return this; } - public Builder gender(GenderEnum gender) { + public Builder gender(EeocGender gender) { this.gender = Optional.ofNullable(gender); return this; } + /** + *

    The candidate's veteran status.

    + *
      + *
    • I_AM_NOT_A_PROTECTED_VETERAN - I_AM_NOT_A_PROTECTED_VETERAN
    • + *
    • I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN - I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN
    • + *
    • I_DONT_WISH_TO_ANSWER - I_DONT_WISH_TO_ANSWER
    • + *
    + */ @JsonSetter(value = "veteran_status", nulls = Nulls.SKIP) - public Builder veteranStatus(Optional veteranStatus) { + public Builder veteranStatus(Optional veteranStatus) { this.veteranStatus = veteranStatus; return this; } - public Builder veteranStatus(VeteranStatusEnum veteranStatus) { + public Builder veteranStatus(EeocVeteranStatus veteranStatus) { this.veteranStatus = Optional.ofNullable(veteranStatus); return this; } + /** + *

    The candidate's disability status.

    + *
      + *
    • YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY - YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY
    • + *
    • NO_I_DONT_HAVE_A_DISABILITY - NO_I_DONT_HAVE_A_DISABILITY
    • + *
    • I_DONT_WISH_TO_ANSWER - I_DONT_WISH_TO_ANSWER
    • + *
    + */ @JsonSetter(value = "disability_status", nulls = Nulls.SKIP) - public Builder disabilityStatus(Optional disabilityStatus) { + public Builder disabilityStatus(Optional disabilityStatus) { this.disabilityStatus = disabilityStatus; return this; } - public Builder disabilityStatus(DisabilityStatusEnum disabilityStatus) { + public Builder disabilityStatus(EeocDisabilityStatus disabilityStatus) { this.disabilityStatus = Optional.ofNullable(disabilityStatus); return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/ats/types/EeocDisabilityStatus.java b/src/main/java/com/merge/api/ats/types/EeocDisabilityStatus.java new file mode 100644 index 000000000..d958c5ae4 --- /dev/null +++ b/src/main/java/com/merge/api/ats/types/EeocDisabilityStatus.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ats.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EeocDisabilityStatus.Deserializer.class) +public final class EeocDisabilityStatus { + private final Object value; + + private final int type; + + private EeocDisabilityStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((DisabilityStatusEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EeocDisabilityStatus && equalTo((EeocDisabilityStatus) other); + } + + private boolean equalTo(EeocDisabilityStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EeocDisabilityStatus of(DisabilityStatusEnum value) { + return new EeocDisabilityStatus(value, 0); + } + + public static EeocDisabilityStatus of(String value) { + return new EeocDisabilityStatus(value, 1); + } + + public interface Visitor { + T visit(DisabilityStatusEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EeocDisabilityStatus.class); + } + + @java.lang.Override + public EeocDisabilityStatus deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, DisabilityStatusEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ats/types/EeocGender.java b/src/main/java/com/merge/api/ats/types/EeocGender.java new file mode 100644 index 000000000..8f675cfe4 --- /dev/null +++ b/src/main/java/com/merge/api/ats/types/EeocGender.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ats.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EeocGender.Deserializer.class) +public final class EeocGender { + private final Object value; + + private final int type; + + private EeocGender(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((GenderEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EeocGender && equalTo((EeocGender) other); + } + + private boolean equalTo(EeocGender other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EeocGender of(GenderEnum value) { + return new EeocGender(value, 0); + } + + public static EeocGender of(String value) { + return new EeocGender(value, 1); + } + + public interface Visitor { + T visit(GenderEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EeocGender.class); + } + + @java.lang.Override + public EeocGender deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, GenderEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ats/types/EeocRace.java b/src/main/java/com/merge/api/ats/types/EeocRace.java new file mode 100644 index 000000000..8280c5876 --- /dev/null +++ b/src/main/java/com/merge/api/ats/types/EeocRace.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ats.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EeocRace.Deserializer.class) +public final class EeocRace { + private final Object value; + + private final int type; + + private EeocRace(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((RaceEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EeocRace && equalTo((EeocRace) other); + } + + private boolean equalTo(EeocRace other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EeocRace of(RaceEnum value) { + return new EeocRace(value, 0); + } + + public static EeocRace of(String value) { + return new EeocRace(value, 1); + } + + public interface Visitor { + T visit(RaceEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EeocRace.class); + } + + @java.lang.Override + public EeocRace deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, RaceEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ats/types/EeocVeteranStatus.java b/src/main/java/com/merge/api/ats/types/EeocVeteranStatus.java new file mode 100644 index 000000000..02f0d6fa6 --- /dev/null +++ b/src/main/java/com/merge/api/ats/types/EeocVeteranStatus.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ats.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EeocVeteranStatus.Deserializer.class) +public final class EeocVeteranStatus { + private final Object value; + + private final int type; + + private EeocVeteranStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((VeteranStatusEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EeocVeteranStatus && equalTo((EeocVeteranStatus) other); + } + + private boolean equalTo(EeocVeteranStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EeocVeteranStatus of(VeteranStatusEnum value) { + return new EeocVeteranStatus(value, 0); + } + + public static EeocVeteranStatus of(String value) { + return new EeocVeteranStatus(value, 1); + } + + public interface Visitor { + T visit(VeteranStatusEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EeocVeteranStatus.class); + } + + @java.lang.Override + public EeocVeteranStatus deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, VeteranStatusEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ats/types/EeocsListRequest.java b/src/main/java/com/merge/api/ats/types/EeocsListRequest.java index 9dbf5e26d..60862372b 100644 --- a/src/main/java/com/merge/api/ats/types/EeocsListRequest.java +++ b/src/main/java/com/merge/api/ats/types/EeocsListRequest.java @@ -307,6 +307,9 @@ public Builder from(EeocsListRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -323,6 +326,9 @@ public Builder expand(String expand) { return this; } + /** + *

    If provided, will only return EEOC info for this candidate.

    + */ @JsonSetter(value = "candidate_id", nulls = Nulls.SKIP) public Builder candidateId(Optional candidateId) { this.candidateId = candidateId; @@ -334,6 +340,9 @@ public Builder candidateId(String candidateId) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -345,6 +354,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -356,6 +368,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -367,6 +382,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -378,6 +396,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -389,6 +410,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -400,6 +424,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -411,6 +438,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -422,6 +452,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -433,6 +466,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    Deprecated. Use show_enum_origins.

    + */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -444,6 +480,9 @@ public Builder remoteFields(EeocsListRequestRemoteFields remoteFields) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -455,6 +494,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    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

    + */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; diff --git a/src/main/java/com/merge/api/ats/types/EeocsRetrieveRequest.java b/src/main/java/com/merge/api/ats/types/EeocsRetrieveRequest.java index 4acd5a3c8..dbf508aea 100644 --- a/src/main/java/com/merge/api/ats/types/EeocsRetrieveRequest.java +++ b/src/main/java/com/merge/api/ats/types/EeocsRetrieveRequest.java @@ -149,6 +149,9 @@ public Builder from(EeocsRetrieveRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -165,6 +168,9 @@ public Builder expand(String expand) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -176,6 +182,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -187,6 +196,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    Deprecated. Use show_enum_origins.

    + */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -198,6 +210,9 @@ public Builder remoteFields(EeocsRetrieveRequestRemoteFields remoteFields) { return this; } + /** + *

    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

    + */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; diff --git a/src/main/java/com/merge/api/ats/types/EmailAddress.java b/src/main/java/com/merge/api/ats/types/EmailAddress.java index 5717a016c..e60bfd5b8 100644 --- a/src/main/java/com/merge/api/ats/types/EmailAddress.java +++ b/src/main/java/com/merge/api/ats/types/EmailAddress.java @@ -27,7 +27,7 @@ public final class EmailAddress { private final Optional value; - private final Optional emailAddressType; + private final Optional emailAddressType; private final Optional remoteWasDeleted; @@ -37,7 +37,7 @@ private EmailAddress( Optional createdAt, Optional modifiedAt, Optional value, - Optional emailAddressType, + Optional emailAddressType, Optional remoteWasDeleted, Map additionalProperties) { this.createdAt = createdAt; @@ -81,7 +81,7 @@ public Optional getValue() { * */ @JsonProperty("email_address_type") - public Optional getEmailAddressType() { + public Optional getEmailAddressType() { return emailAddressType; } @@ -134,7 +134,7 @@ public static final class Builder { private Optional value = Optional.empty(); - private Optional emailAddressType = Optional.empty(); + private Optional emailAddressType = Optional.empty(); private Optional remoteWasDeleted = Optional.empty(); @@ -152,6 +152,9 @@ public Builder from(EmailAddress other) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -163,6 +166,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -174,6 +180,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The email address.

    + */ @JsonSetter(value = "value", nulls = Nulls.SKIP) public Builder value(Optional value) { this.value = value; @@ -185,17 +194,28 @@ public Builder value(String value) { return this; } + /** + *

    The type of email address.

    + *
      + *
    • PERSONAL - PERSONAL
    • + *
    • WORK - WORK
    • + *
    • OTHER - OTHER
    • + *
    + */ @JsonSetter(value = "email_address_type", nulls = Nulls.SKIP) - public Builder emailAddressType(Optional emailAddressType) { + public Builder emailAddressType(Optional emailAddressType) { this.emailAddressType = emailAddressType; return this; } - public Builder emailAddressType(EmailAddressTypeEnum emailAddressType) { + public Builder emailAddressType(EmailAddressEmailAddressType emailAddressType) { this.emailAddressType = Optional.ofNullable(emailAddressType); return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/ats/types/EmailAddressEmailAddressType.java b/src/main/java/com/merge/api/ats/types/EmailAddressEmailAddressType.java new file mode 100644 index 000000000..9e415af38 --- /dev/null +++ b/src/main/java/com/merge/api/ats/types/EmailAddressEmailAddressType.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ats.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EmailAddressEmailAddressType.Deserializer.class) +public final class EmailAddressEmailAddressType { + private final Object value; + + private final int type; + + private EmailAddressEmailAddressType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EmailAddressTypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EmailAddressEmailAddressType && equalTo((EmailAddressEmailAddressType) other); + } + + private boolean equalTo(EmailAddressEmailAddressType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EmailAddressEmailAddressType of(EmailAddressTypeEnum value) { + return new EmailAddressEmailAddressType(value, 0); + } + + public static EmailAddressEmailAddressType of(String value) { + return new EmailAddressEmailAddressType(value, 1); + } + + public interface Visitor { + T visit(EmailAddressTypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EmailAddressEmailAddressType.class); + } + + @java.lang.Override + public EmailAddressEmailAddressType deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, EmailAddressTypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ats/types/EmailAddressRequest.java b/src/main/java/com/merge/api/ats/types/EmailAddressRequest.java index 2601b9c03..6c3af7c82 100644 --- a/src/main/java/com/merge/api/ats/types/EmailAddressRequest.java +++ b/src/main/java/com/merge/api/ats/types/EmailAddressRequest.java @@ -23,7 +23,7 @@ public final class EmailAddressRequest { private final Optional value; - private final Optional emailAddressType; + private final Optional emailAddressType; private final Optional> integrationParams; @@ -33,7 +33,7 @@ public final class EmailAddressRequest { private EmailAddressRequest( Optional value, - Optional emailAddressType, + Optional emailAddressType, Optional> integrationParams, Optional> linkedAccountParams, Map additionalProperties) { @@ -61,7 +61,7 @@ public Optional getValue() { * */ @JsonProperty("email_address_type") - public Optional getEmailAddressType() { + public Optional getEmailAddressType() { return emailAddressType; } @@ -111,7 +111,7 @@ public static Builder builder() { public static final class Builder { private Optional value = Optional.empty(); - private Optional emailAddressType = Optional.empty(); + private Optional emailAddressType = Optional.empty(); private Optional> integrationParams = Optional.empty(); @@ -130,6 +130,9 @@ public Builder from(EmailAddressRequest other) { return this; } + /** + *

    The email address.

    + */ @JsonSetter(value = "value", nulls = Nulls.SKIP) public Builder value(Optional value) { this.value = value; @@ -141,13 +144,21 @@ public Builder value(String value) { return this; } + /** + *

    The type of email address.

    + *
      + *
    • PERSONAL - PERSONAL
    • + *
    • WORK - WORK
    • + *
    • OTHER - OTHER
    • + *
    + */ @JsonSetter(value = "email_address_type", nulls = Nulls.SKIP) - public Builder emailAddressType(Optional emailAddressType) { + public Builder emailAddressType(Optional emailAddressType) { this.emailAddressType = emailAddressType; return this; } - public Builder emailAddressType(EmailAddressTypeEnum emailAddressType) { + public Builder emailAddressType(EmailAddressRequestEmailAddressType emailAddressType) { this.emailAddressType = Optional.ofNullable(emailAddressType); return this; } diff --git a/src/main/java/com/merge/api/ats/types/EmailAddressRequestEmailAddressType.java b/src/main/java/com/merge/api/ats/types/EmailAddressRequestEmailAddressType.java new file mode 100644 index 000000000..c670b036e --- /dev/null +++ b/src/main/java/com/merge/api/ats/types/EmailAddressRequestEmailAddressType.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ats.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EmailAddressRequestEmailAddressType.Deserializer.class) +public final class EmailAddressRequestEmailAddressType { + private final Object value; + + private final int type; + + private EmailAddressRequestEmailAddressType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EmailAddressTypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EmailAddressRequestEmailAddressType + && equalTo((EmailAddressRequestEmailAddressType) other); + } + + private boolean equalTo(EmailAddressRequestEmailAddressType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EmailAddressRequestEmailAddressType of(EmailAddressTypeEnum value) { + return new EmailAddressRequestEmailAddressType(value, 0); + } + + public static EmailAddressRequestEmailAddressType of(String value) { + return new EmailAddressRequestEmailAddressType(value, 1); + } + + public interface Visitor { + T visit(EmailAddressTypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EmailAddressRequestEmailAddressType.class); + } + + @java.lang.Override + public EmailAddressRequestEmailAddressType deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, EmailAddressTypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ats/types/EndUserDetailsRequest.java b/src/main/java/com/merge/api/ats/types/EndUserDetailsRequest.java index a2264c7ba..93f461d3e 100644 --- a/src/main/java/com/merge/api/ats/types/EndUserDetailsRequest.java +++ b/src/main/java/com/merge/api/ats/types/EndUserDetailsRequest.java @@ -45,7 +45,7 @@ public final class EndUserDetailsRequest { private final Optional>>> categoryCommonModelScopes; - private final Optional language; + private final Optional language; private final Optional areSyncsDisabled; @@ -65,7 +65,7 @@ private EndUserDetailsRequest( Optional> commonModels, Optional>>> categoryCommonModelScopes, - Optional language, + Optional language, Optional areSyncsDisabled, Optional> integrationSpecificConfig, Map additionalProperties) { @@ -174,7 +174,7 @@ public Optional> getCommonModels() { * */ @JsonProperty("language") - public Optional getLanguage() { + public Optional getLanguage() { return language; } @@ -249,48 +249,78 @@ public static EndUserEmailAddressStage builder() { } public interface EndUserEmailAddressStage { + /** + * Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent. + */ EndUserOrganizationNameStage endUserEmailAddress(@NotNull String endUserEmailAddress); Builder from(EndUserDetailsRequest other); } public interface EndUserOrganizationNameStage { + /** + * Your end user's organization. + */ EndUserOriginIdStage endUserOrganizationName(@NotNull String endUserOrganizationName); } public interface EndUserOriginIdStage { + /** + * 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. + */ _FinalStage endUserOriginId(@NotNull String endUserOriginId); } public interface _FinalStage { EndUserDetailsRequest build(); + /** + *

    The integration categories to show in Merge Link.

    + */ _FinalStage categories(List categories); _FinalStage addCategories(CategoriesEnum categories); _FinalStage addAllCategories(List categories); + /** + *

    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/.

    + */ _FinalStage integration(Optional integration); _FinalStage integration(String integration); + /** + *

    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.

    + */ _FinalStage linkExpiryMins(Optional linkExpiryMins); _FinalStage linkExpiryMins(Integer linkExpiryMins); + /** + *

    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.

    + */ _FinalStage shouldCreateMagicLinkUrl(Optional shouldCreateMagicLinkUrl); _FinalStage shouldCreateMagicLinkUrl(Boolean shouldCreateMagicLinkUrl); + /** + *

    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.

    + */ _FinalStage hideAdminMagicLink(Optional hideAdminMagicLink); _FinalStage hideAdminMagicLink(Boolean hideAdminMagicLink); + /** + *

    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.

    + */ _FinalStage commonModels(Optional> commonModels); _FinalStage commonModels(List commonModels); + /** + *

    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.

    + */ _FinalStage categoryCommonModelScopes( Optional>>> categoryCommonModelScopes); @@ -298,14 +328,27 @@ _FinalStage categoryCommonModelScopes( _FinalStage categoryCommonModelScopes( Map>> categoryCommonModelScopes); - _FinalStage language(Optional language); + /** + *

    The following subset of IETF language tags can be used to configure localization.

    + *
      + *
    • en - en
    • + *
    • de - de
    • + *
    + */ + _FinalStage language(Optional language); - _FinalStage language(LanguageEnum language); + _FinalStage language(EndUserDetailsRequestLanguage language); + /** + *

    The boolean that indicates whether initial, periodic, and force syncs will be disabled.

    + */ _FinalStage areSyncsDisabled(Optional areSyncsDisabled); _FinalStage areSyncsDisabled(Boolean areSyncsDisabled); + /** + *

    A JSON object containing integration-specific configuration options.

    + */ _FinalStage integrationSpecificConfig(Optional> integrationSpecificConfig); _FinalStage integrationSpecificConfig(Map integrationSpecificConfig); @@ -324,7 +367,7 @@ public static final class Builder private Optional areSyncsDisabled = Optional.empty(); - private Optional language = Optional.empty(); + private Optional language = Optional.empty(); private Optional>>> categoryCommonModelScopes = Optional.empty(); @@ -365,7 +408,7 @@ public Builder from(EndUserDetailsRequest other) { } /** - *

    Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent.

    + * Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent.

    Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent.

    * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -376,7 +419,7 @@ public EndUserOrganizationNameStage endUserEmailAddress(@NotNull String endUserE } /** - *

    Your end user's organization.

    + * Your end user's organization.

    Your end user's organization.

    * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -387,7 +430,7 @@ public EndUserOriginIdStage endUserOrganizationName(@NotNull String endUserOrgan } /** - *

    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.

    + * 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.

    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.

    * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -407,6 +450,9 @@ public _FinalStage integrationSpecificConfig(Map integrationSp return this; } + /** + *

    A JSON object containing integration-specific configuration options.

    + */ @java.lang.Override @JsonSetter(value = "integration_specific_config", nulls = Nulls.SKIP) public _FinalStage integrationSpecificConfig(Optional> integrationSpecificConfig) { @@ -424,6 +470,9 @@ public _FinalStage areSyncsDisabled(Boolean areSyncsDisabled) { return this; } + /** + *

    The boolean that indicates whether initial, periodic, and force syncs will be disabled.

    + */ @java.lang.Override @JsonSetter(value = "are_syncs_disabled", nulls = Nulls.SKIP) public _FinalStage areSyncsDisabled(Optional areSyncsDisabled) { @@ -440,14 +489,21 @@ public _FinalStage areSyncsDisabled(Optional areSyncsDisabled) { * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override - public _FinalStage language(LanguageEnum language) { + public _FinalStage language(EndUserDetailsRequestLanguage language) { this.language = Optional.ofNullable(language); return this; } + /** + *

    The following subset of IETF language tags can be used to configure localization.

    + *
      + *
    • en - en
    • + *
    • de - de
    • + *
    + */ @java.lang.Override @JsonSetter(value = "language", nulls = Nulls.SKIP) - public _FinalStage language(Optional language) { + public _FinalStage language(Optional language) { this.language = language; return this; } @@ -463,6 +519,9 @@ public _FinalStage categoryCommonModelScopes( return this; } + /** + *

    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.

    + */ @java.lang.Override @JsonSetter(value = "category_common_model_scopes", nulls = Nulls.SKIP) public _FinalStage categoryCommonModelScopes( @@ -482,6 +541,9 @@ public _FinalStage commonModels(List commonModels) return this; } + /** + *

    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.

    + */ @java.lang.Override @JsonSetter(value = "common_models", nulls = Nulls.SKIP) public _FinalStage commonModels(Optional> commonModels) { @@ -499,6 +561,9 @@ public _FinalStage hideAdminMagicLink(Boolean hideAdminMagicLink) { return this; } + /** + *

    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.

    + */ @java.lang.Override @JsonSetter(value = "hide_admin_magic_link", nulls = Nulls.SKIP) public _FinalStage hideAdminMagicLink(Optional hideAdminMagicLink) { @@ -516,6 +581,9 @@ public _FinalStage shouldCreateMagicLinkUrl(Boolean shouldCreateMagicLinkUrl) { return this; } + /** + *

    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.

    + */ @java.lang.Override @JsonSetter(value = "should_create_magic_link_url", nulls = Nulls.SKIP) public _FinalStage shouldCreateMagicLinkUrl(Optional shouldCreateMagicLinkUrl) { @@ -533,6 +601,9 @@ public _FinalStage linkExpiryMins(Integer linkExpiryMins) { return this; } + /** + *

    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.

    + */ @java.lang.Override @JsonSetter(value = "link_expiry_mins", nulls = Nulls.SKIP) public _FinalStage linkExpiryMins(Optional linkExpiryMins) { @@ -550,6 +621,9 @@ public _FinalStage integration(String integration) { return this; } + /** + *

    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/.

    + */ @java.lang.Override @JsonSetter(value = "integration", nulls = Nulls.SKIP) public _FinalStage integration(Optional integration) { @@ -577,6 +651,9 @@ public _FinalStage addCategories(CategoriesEnum categories) { return this; } + /** + *

    The integration categories to show in Merge Link.

    + */ @java.lang.Override @JsonSetter(value = "categories", nulls = Nulls.SKIP) public _FinalStage categories(List categories) { diff --git a/src/main/java/com/merge/api/ats/types/EndUserDetailsRequestLanguage.java b/src/main/java/com/merge/api/ats/types/EndUserDetailsRequestLanguage.java new file mode 100644 index 000000000..57c9c65dd --- /dev/null +++ b/src/main/java/com/merge/api/ats/types/EndUserDetailsRequestLanguage.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ats.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EndUserDetailsRequestLanguage.Deserializer.class) +public final class EndUserDetailsRequestLanguage { + private final Object value; + + private final int type; + + private EndUserDetailsRequestLanguage(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((LanguageEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EndUserDetailsRequestLanguage && equalTo((EndUserDetailsRequestLanguage) other); + } + + private boolean equalTo(EndUserDetailsRequestLanguage other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EndUserDetailsRequestLanguage of(LanguageEnum value) { + return new EndUserDetailsRequestLanguage(value, 0); + } + + public static EndUserDetailsRequestLanguage of(String value) { + return new EndUserDetailsRequestLanguage(value, 1); + } + + public interface Visitor { + T visit(LanguageEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EndUserDetailsRequestLanguage.class); + } + + @java.lang.Override + public EndUserDetailsRequestLanguage deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, LanguageEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ats/types/EventTypeEnum.java b/src/main/java/com/merge/api/ats/types/EventTypeEnum.java index 5a5e7b56c..afc7bbe00 100644 --- a/src/main/java/com/merge/api/ats/types/EventTypeEnum.java +++ b/src/main/java/com/merge/api/ats/types/EventTypeEnum.java @@ -16,6 +16,8 @@ public enum EventTypeEnum { REGENERATED_PRODUCTION_API_KEY("REGENERATED_PRODUCTION_API_KEY"), + REGENERATED_WEBHOOK_SIGNATURE("REGENERATED_WEBHOOK_SIGNATURE"), + INVITED_USER("INVITED_USER"), TWO_FACTOR_AUTH_ENABLED("TWO_FACTOR_AUTH_ENABLED"), diff --git a/src/main/java/com/merge/api/ats/types/FieldMappingsRetrieveRequest.java b/src/main/java/com/merge/api/ats/types/FieldMappingsRetrieveRequest.java index bb1fb769d..5c6f6c442 100644 --- a/src/main/java/com/merge/api/ats/types/FieldMappingsRetrieveRequest.java +++ b/src/main/java/com/merge/api/ats/types/FieldMappingsRetrieveRequest.java @@ -81,6 +81,9 @@ public Builder from(FieldMappingsRetrieveRequest other) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "exclude_remote_field_metadata", nulls = Nulls.SKIP) public Builder excludeRemoteFieldMetadata(Optional excludeRemoteFieldMetadata) { this.excludeRemoteFieldMetadata = excludeRemoteFieldMetadata; diff --git a/src/main/java/com/merge/api/ats/types/GenerateRemoteKeyRequest.java b/src/main/java/com/merge/api/ats/types/GenerateRemoteKeyRequest.java index ea22e52d6..c69c4919c 100644 --- a/src/main/java/com/merge/api/ats/types/GenerateRemoteKeyRequest.java +++ b/src/main/java/com/merge/api/ats/types/GenerateRemoteKeyRequest.java @@ -66,6 +66,9 @@ public static NameStage builder() { } public interface NameStage { + /** + * The name of the remote key + */ _FinalStage name(@NotNull String name); Builder from(GenerateRemoteKeyRequest other); @@ -91,7 +94,7 @@ public Builder from(GenerateRemoteKeyRequest other) { } /** - *

    The name of the remote key

    + * The name of the remote key

    The name of the remote key

    * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override diff --git a/src/main/java/com/merge/api/ats/types/IgnoreCommonModelRequest.java b/src/main/java/com/merge/api/ats/types/IgnoreCommonModelRequest.java index e56a06342..d37983446 100644 --- a/src/main/java/com/merge/api/ats/types/IgnoreCommonModelRequest.java +++ b/src/main/java/com/merge/api/ats/types/IgnoreCommonModelRequest.java @@ -21,21 +21,21 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = IgnoreCommonModelRequest.Builder.class) public final class IgnoreCommonModelRequest { - private final ReasonEnum reason; + private final IgnoreCommonModelRequestReason reason; private final Optional message; private final Map additionalProperties; private IgnoreCommonModelRequest( - ReasonEnum reason, Optional message, Map additionalProperties) { + IgnoreCommonModelRequestReason reason, Optional message, Map additionalProperties) { this.reason = reason; this.message = message; this.additionalProperties = additionalProperties; } @JsonProperty("reason") - public ReasonEnum getReason() { + public IgnoreCommonModelRequestReason getReason() { return reason; } @@ -74,7 +74,7 @@ public static ReasonStage builder() { } public interface ReasonStage { - _FinalStage reason(@NotNull ReasonEnum reason); + _FinalStage reason(@NotNull IgnoreCommonModelRequestReason reason); Builder from(IgnoreCommonModelRequest other); } @@ -89,7 +89,7 @@ public interface _FinalStage { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements ReasonStage, _FinalStage { - private ReasonEnum reason; + private IgnoreCommonModelRequestReason reason; private Optional message = Optional.empty(); @@ -107,7 +107,7 @@ public Builder from(IgnoreCommonModelRequest other) { @java.lang.Override @JsonSetter("reason") - public _FinalStage reason(@NotNull ReasonEnum reason) { + public _FinalStage reason(@NotNull IgnoreCommonModelRequestReason reason) { this.reason = reason; return this; } diff --git a/src/main/java/com/merge/api/ats/types/IgnoreCommonModelRequestReason.java b/src/main/java/com/merge/api/ats/types/IgnoreCommonModelRequestReason.java new file mode 100644 index 000000000..9a4b9c2d8 --- /dev/null +++ b/src/main/java/com/merge/api/ats/types/IgnoreCommonModelRequestReason.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ats.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = IgnoreCommonModelRequestReason.Deserializer.class) +public final class IgnoreCommonModelRequestReason { + private final Object value; + + private final int type; + + private IgnoreCommonModelRequestReason(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((ReasonEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof IgnoreCommonModelRequestReason && equalTo((IgnoreCommonModelRequestReason) other); + } + + private boolean equalTo(IgnoreCommonModelRequestReason other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static IgnoreCommonModelRequestReason of(ReasonEnum value) { + return new IgnoreCommonModelRequestReason(value, 0); + } + + public static IgnoreCommonModelRequestReason of(String value) { + return new IgnoreCommonModelRequestReason(value, 1); + } + + public interface Visitor { + T visit(ReasonEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(IgnoreCommonModelRequestReason.class); + } + + @java.lang.Override + public IgnoreCommonModelRequestReason deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, ReasonEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ats/types/InterviewsListRequest.java b/src/main/java/com/merge/api/ats/types/InterviewsListRequest.java index 80dfdd324..049c44c7a 100644 --- a/src/main/java/com/merge/api/ats/types/InterviewsListRequest.java +++ b/src/main/java/com/merge/api/ats/types/InterviewsListRequest.java @@ -358,6 +358,9 @@ public Builder from(InterviewsListRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -374,6 +377,9 @@ public Builder expand(InterviewsListRequestExpandItem expand) { return this; } + /** + *

    If provided, will only return interviews for this application.

    + */ @JsonSetter(value = "application_id", nulls = Nulls.SKIP) public Builder applicationId(Optional applicationId) { this.applicationId = applicationId; @@ -385,6 +391,9 @@ public Builder applicationId(String applicationId) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -396,6 +405,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -407,6 +419,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -418,6 +433,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -429,6 +447,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -440,6 +461,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -451,6 +475,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, wll only return interviews organized for this job.

    + */ @JsonSetter(value = "job_id", nulls = Nulls.SKIP) public Builder jobId(Optional jobId) { this.jobId = jobId; @@ -462,6 +489,9 @@ public Builder jobId(String jobId) { return this; } + /** + *

    If provided, will only return interviews at this stage.

    + */ @JsonSetter(value = "job_interview_stage_id", nulls = Nulls.SKIP) public Builder jobInterviewStageId(Optional jobInterviewStageId) { this.jobInterviewStageId = jobInterviewStageId; @@ -473,6 +503,9 @@ public Builder jobInterviewStageId(String jobInterviewStageId) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -484,6 +517,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -495,6 +531,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    If provided, will only return interviews organized by this user.

    + */ @JsonSetter(value = "organizer_id", nulls = Nulls.SKIP) public Builder organizerId(Optional organizerId) { this.organizerId = organizerId; @@ -506,6 +545,9 @@ public Builder organizerId(String organizerId) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -517,6 +559,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    Deprecated. Use show_enum_origins.

    + */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -528,6 +573,9 @@ public Builder remoteFields(String remoteFields) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -539,6 +587,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    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

    + */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; diff --git a/src/main/java/com/merge/api/ats/types/InterviewsRetrieveRequest.java b/src/main/java/com/merge/api/ats/types/InterviewsRetrieveRequest.java index a760fed70..678419832 100644 --- a/src/main/java/com/merge/api/ats/types/InterviewsRetrieveRequest.java +++ b/src/main/java/com/merge/api/ats/types/InterviewsRetrieveRequest.java @@ -149,6 +149,9 @@ public Builder from(InterviewsRetrieveRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -165,6 +168,9 @@ public Builder expand(InterviewsRetrieveRequestExpandItem expand) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -176,6 +182,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -187,6 +196,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    Deprecated. Use show_enum_origins.

    + */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -198,6 +210,9 @@ public Builder remoteFields(String remoteFields) { return this; } + /** + *

    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

    + */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; diff --git a/src/main/java/com/merge/api/ats/types/Issue.java b/src/main/java/com/merge/api/ats/types/Issue.java index a6d784c17..184d0987b 100644 --- a/src/main/java/com/merge/api/ats/types/Issue.java +++ b/src/main/java/com/merge/api/ats/types/Issue.java @@ -26,7 +26,7 @@ public final class Issue { private final Optional id; - private final Optional status; + private final Optional status; private final String errorDescription; @@ -44,7 +44,7 @@ public final class Issue { private Issue( Optional id, - Optional status, + Optional status, String errorDescription, Optional> endUser, Optional firstIncidentTime, @@ -76,7 +76,7 @@ public Optional getId() { * */ @JsonProperty("status") - public Optional getStatus() { + public Optional getStatus() { return status; } @@ -167,9 +167,16 @@ public interface _FinalStage { _FinalStage id(String id); - _FinalStage status(Optional status); + /** + *

    Status of the issue. Options: ('ONGOING', 'RESOLVED')

    + *
      + *
    • ONGOING - ONGOING
    • + *
    • RESOLVED - RESOLVED
    • + *
    + */ + _FinalStage status(Optional status); - _FinalStage status(IssueStatusEnum status); + _FinalStage status(IssueStatus status); _FinalStage endUser(Optional> endUser); @@ -206,7 +213,7 @@ public static final class Builder implements ErrorDescriptionStage, _FinalStage private Optional> endUser = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Optional id = Optional.empty(); @@ -309,14 +316,21 @@ public _FinalStage endUser(Optional> endUser) { * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override - public _FinalStage status(IssueStatusEnum status) { + public _FinalStage status(IssueStatus status) { this.status = Optional.ofNullable(status); return this; } + /** + *

    Status of the issue. Options: ('ONGOING', 'RESOLVED')

    + *
      + *
    • ONGOING - ONGOING
    • + *
    • RESOLVED - RESOLVED
    • + *
    + */ @java.lang.Override @JsonSetter(value = "status", nulls = Nulls.SKIP) - public _FinalStage status(Optional status) { + public _FinalStage status(Optional status) { this.status = status; return this; } diff --git a/src/main/java/com/merge/api/ats/types/IssueStatus.java b/src/main/java/com/merge/api/ats/types/IssueStatus.java new file mode 100644 index 000000000..4807e6c87 --- /dev/null +++ b/src/main/java/com/merge/api/ats/types/IssueStatus.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ats.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = IssueStatus.Deserializer.class) +public final class IssueStatus { + private final Object value; + + private final int type; + + private IssueStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((IssueStatusEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof IssueStatus && equalTo((IssueStatus) other); + } + + private boolean equalTo(IssueStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static IssueStatus of(IssueStatusEnum value) { + return new IssueStatus(value, 0); + } + + public static IssueStatus of(String value) { + return new IssueStatus(value, 1); + } + + public interface Visitor { + T visit(IssueStatusEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(IssueStatus.class); + } + + @java.lang.Override + public IssueStatus deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, IssueStatusEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ats/types/IssuesListRequest.java b/src/main/java/com/merge/api/ats/types/IssuesListRequest.java index 4054cf5ce..91e1fb998 100644 --- a/src/main/java/com/merge/api/ats/types/IssuesListRequest.java +++ b/src/main/java/com/merge/api/ats/types/IssuesListRequest.java @@ -311,6 +311,9 @@ public Builder accountToken(String accountToken) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -322,6 +325,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    If included, will only include issues whose most recent action occurred before this time

    + */ @JsonSetter(value = "end_date", nulls = Nulls.SKIP) public Builder endDate(Optional endDate) { this.endDate = endDate; @@ -344,6 +350,9 @@ public Builder endUserOrganizationName(String endUserOrganizationName) { return this; } + /** + *

    If provided, will only return issues whose first incident time was after this datetime.

    + */ @JsonSetter(value = "first_incident_time_after", nulls = Nulls.SKIP) public Builder firstIncidentTimeAfter(Optional firstIncidentTimeAfter) { this.firstIncidentTimeAfter = firstIncidentTimeAfter; @@ -355,6 +364,9 @@ public Builder firstIncidentTimeAfter(OffsetDateTime firstIncidentTimeAfter) { return this; } + /** + *

    If provided, will only return issues whose first incident time was before this datetime.

    + */ @JsonSetter(value = "first_incident_time_before", nulls = Nulls.SKIP) public Builder firstIncidentTimeBefore(Optional firstIncidentTimeBefore) { this.firstIncidentTimeBefore = firstIncidentTimeBefore; @@ -366,6 +378,9 @@ public Builder firstIncidentTimeBefore(OffsetDateTime firstIncidentTimeBefore) { return this; } + /** + *

    If true, will include muted issues

    + */ @JsonSetter(value = "include_muted", nulls = Nulls.SKIP) public Builder includeMuted(Optional includeMuted) { this.includeMuted = includeMuted; @@ -388,6 +403,9 @@ public Builder integrationName(String integrationName) { return this; } + /** + *

    If provided, will only return issues whose last incident time was after this datetime.

    + */ @JsonSetter(value = "last_incident_time_after", nulls = Nulls.SKIP) public Builder lastIncidentTimeAfter(Optional lastIncidentTimeAfter) { this.lastIncidentTimeAfter = lastIncidentTimeAfter; @@ -399,6 +417,9 @@ public Builder lastIncidentTimeAfter(OffsetDateTime lastIncidentTimeAfter) { return this; } + /** + *

    If provided, will only return issues whose last incident time was before this datetime.

    + */ @JsonSetter(value = "last_incident_time_before", nulls = Nulls.SKIP) public Builder lastIncidentTimeBefore(Optional lastIncidentTimeBefore) { this.lastIncidentTimeBefore = lastIncidentTimeBefore; @@ -410,6 +431,9 @@ public Builder lastIncidentTimeBefore(OffsetDateTime lastIncidentTimeBefore) { return this; } + /** + *

    If provided, will only include issues pertaining to the linked account passed in.

    + */ @JsonSetter(value = "linked_account_id", nulls = Nulls.SKIP) public Builder linkedAccountId(Optional linkedAccountId) { this.linkedAccountId = linkedAccountId; @@ -421,6 +445,9 @@ public Builder linkedAccountId(String linkedAccountId) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -432,6 +459,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    If included, will only include issues whose most recent action occurred after this time

    + */ @JsonSetter(value = "start_date", nulls = Nulls.SKIP) public Builder startDate(Optional startDate) { this.startDate = startDate; @@ -443,6 +473,13 @@ public Builder startDate(String startDate) { return this; } + /** + *

    Status of the issue. Options: ('ONGOING', 'RESOLVED')

    + *
      + *
    • ONGOING - ONGOING
    • + *
    • RESOLVED - RESOLVED
    • + *
    + */ @JsonSetter(value = "status", nulls = Nulls.SKIP) public Builder status(Optional status) { this.status = status; diff --git a/src/main/java/com/merge/api/ats/types/Job.java b/src/main/java/com/merge/api/ats/types/Job.java index e6fe49d31..c4927701c 100644 --- a/src/main/java/com/merge/api/ats/types/Job.java +++ b/src/main/java/com/merge/api/ats/types/Job.java @@ -37,9 +37,9 @@ public final class Job { private final Optional code; - private final Optional status; + private final Optional status; - private final Optional type; + private final Optional type; private final Optional>> jobPostings; @@ -75,8 +75,8 @@ private Job( Optional name, Optional description, Optional code, - Optional status, - Optional type, + Optional status, + Optional type, Optional>> jobPostings, Optional> jobPostingUrls, Optional remoteCreatedAt, @@ -178,7 +178,7 @@ public Optional getCode() { * */ @JsonProperty("status") - public Optional getStatus() { + public Optional getStatus() { return status; } @@ -191,7 +191,7 @@ public Optional getStatus() { * */ @JsonProperty("type") - public Optional getType() { + public Optional getType() { return type; } @@ -368,9 +368,9 @@ public static final class Builder { private Optional code = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); - private Optional type = Optional.empty(); + private Optional type = Optional.empty(); private Optional>> jobPostings = Optional.empty(); @@ -437,6 +437,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -448,6 +451,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -459,6 +465,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -470,6 +479,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The job's name.

    + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -481,6 +493,9 @@ public Builder name(String name) { return this; } + /** + *

    The job's description.

    + */ @JsonSetter(value = "description", nulls = Nulls.SKIP) public Builder description(Optional description) { this.description = description; @@ -492,6 +507,9 @@ public Builder description(String description) { return this; } + /** + *

    The job's code. Typically an additional identifier used to reference the particular job that is displayed on the ATS.

    + */ @JsonSetter(value = "code", nulls = Nulls.SKIP) public Builder code(Optional code) { this.code = code; @@ -503,28 +521,49 @@ public Builder code(String code) { return this; } + /** + *

    The job's status.

    + *
      + *
    • OPEN - OPEN
    • + *
    • CLOSED - CLOSED
    • + *
    • DRAFT - DRAFT
    • + *
    • ARCHIVED - ARCHIVED
    • + *
    • PENDING - PENDING
    • + *
    + */ @JsonSetter(value = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { + public Builder status(Optional status) { this.status = status; return this; } - public Builder status(JobStatusEnum status) { + public Builder status(JobStatus status) { this.status = Optional.ofNullable(status); return this; } + /** + *

    The job's type.

    + *
      + *
    • POSTING - POSTING
    • + *
    • REQUISITION - REQUISITION
    • + *
    • PROFILE - PROFILE
    • + *
    + */ @JsonSetter(value = "type", nulls = Nulls.SKIP) - public Builder type(Optional type) { + public Builder type(Optional type) { this.type = type; return this; } - public Builder type(JobTypeEnum type) { + public Builder type(JobType type) { this.type = Optional.ofNullable(type); return this; } + /** + *

    IDs of JobPosting objects that serve as job postings for this Job.

    + */ @JsonSetter(value = "job_postings", nulls = Nulls.SKIP) public Builder jobPostings(Optional>> jobPostings) { this.jobPostings = jobPostings; @@ -547,6 +586,9 @@ public Builder jobPostingUrls(List jobPostingUrls) { return this; } + /** + *

    When the third party's job was created.

    + */ @JsonSetter(value = "remote_created_at", nulls = Nulls.SKIP) public Builder remoteCreatedAt(Optional remoteCreatedAt) { this.remoteCreatedAt = remoteCreatedAt; @@ -558,6 +600,9 @@ public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { return this; } + /** + *

    When the third party's job was updated.

    + */ @JsonSetter(value = "remote_updated_at", nulls = Nulls.SKIP) public Builder remoteUpdatedAt(Optional remoteUpdatedAt) { this.remoteUpdatedAt = remoteUpdatedAt; @@ -569,6 +614,9 @@ public Builder remoteUpdatedAt(OffsetDateTime remoteUpdatedAt) { return this; } + /** + *

    Whether the job is confidential.

    + */ @JsonSetter(value = "confidential", nulls = Nulls.SKIP) public Builder confidential(Optional confidential) { this.confidential = confidential; @@ -580,6 +628,9 @@ public Builder confidential(Boolean confidential) { return this; } + /** + *

    IDs of Department objects for this Job.

    + */ @JsonSetter(value = "departments", nulls = Nulls.SKIP) public Builder departments(Optional>> departments) { this.departments = departments; @@ -591,6 +642,9 @@ public Builder departments(List> departments) { return this; } + /** + *

    IDs of Office objects for this Job.

    + */ @JsonSetter(value = "offices", nulls = Nulls.SKIP) public Builder offices(Optional>> offices) { this.offices = offices; @@ -602,6 +656,9 @@ public Builder offices(List> offices) { return this; } + /** + *

    IDs of RemoteUser objects that serve as hiring managers for this Job.

    + */ @JsonSetter(value = "hiring_managers", nulls = Nulls.SKIP) public Builder hiringManagers(Optional>> hiringManagers) { this.hiringManagers = hiringManagers; @@ -613,6 +670,9 @@ public Builder hiringManagers(List> hiringManage return this; } + /** + *

    IDs of RemoteUser objects that serve as recruiters for this Job.

    + */ @JsonSetter(value = "recruiters", nulls = Nulls.SKIP) public Builder recruiters(Optional>> recruiters) { this.recruiters = recruiters; @@ -624,6 +684,9 @@ public Builder recruiters(List> recruiters) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/ats/types/JobInterviewStage.java b/src/main/java/com/merge/api/ats/types/JobInterviewStage.java index 3ad6e3043..cf1f24bd7 100644 --- a/src/main/java/com/merge/api/ats/types/JobInterviewStage.java +++ b/src/main/java/com/merge/api/ats/types/JobInterviewStage.java @@ -241,6 +241,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -252,6 +255,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -263,6 +269,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -274,6 +283,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    Standard stage names are offered by ATS systems but can be modified by users.

    + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -285,6 +297,9 @@ public Builder name(String name) { return this; } + /** + *

    This field is populated only if the stage is specific to a particular job. If the stage is generic, this field will not be populated.

    + */ @JsonSetter(value = "job", nulls = Nulls.SKIP) public Builder job(Optional job) { this.job = job; @@ -296,6 +311,9 @@ public Builder job(JobInterviewStageJob job) { return this; } + /** + *

    The stage’s order, with the lowest values ordered first. If the third-party does not return details on the order of stages, this field will not be populated.

    + */ @JsonSetter(value = "stage_order", nulls = Nulls.SKIP) public Builder stageOrder(Optional stageOrder) { this.stageOrder = stageOrder; @@ -307,6 +325,9 @@ public Builder stageOrder(Integer stageOrder) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/ats/types/JobInterviewStagesListRequest.java b/src/main/java/com/merge/api/ats/types/JobInterviewStagesListRequest.java index 83cea40fb..9cce5eac0 100644 --- a/src/main/java/com/merge/api/ats/types/JobInterviewStagesListRequest.java +++ b/src/main/java/com/merge/api/ats/types/JobInterviewStagesListRequest.java @@ -273,6 +273,9 @@ public Builder from(JobInterviewStagesListRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -289,6 +292,9 @@ public Builder expand(String expand) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -300,6 +306,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -311,6 +320,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -322,6 +334,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -333,6 +348,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -344,6 +362,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -355,6 +376,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, will only return interview stages for this job.

    + */ @JsonSetter(value = "job_id", nulls = Nulls.SKIP) public Builder jobId(Optional jobId) { this.jobId = jobId; @@ -366,6 +390,9 @@ public Builder jobId(String jobId) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -377,6 +404,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -388,6 +418,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -399,6 +432,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; diff --git a/src/main/java/com/merge/api/ats/types/JobInterviewStagesRetrieveRequest.java b/src/main/java/com/merge/api/ats/types/JobInterviewStagesRetrieveRequest.java index 2df6e04fb..a83c23de7 100644 --- a/src/main/java/com/merge/api/ats/types/JobInterviewStagesRetrieveRequest.java +++ b/src/main/java/com/merge/api/ats/types/JobInterviewStagesRetrieveRequest.java @@ -116,6 +116,9 @@ public Builder from(JobInterviewStagesRetrieveRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -132,6 +135,9 @@ public Builder expand(String expand) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -143,6 +149,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/ats/types/JobPosting.java b/src/main/java/com/merge/api/ats/types/JobPosting.java index 5789fdd64..63b9477cc 100644 --- a/src/main/java/com/merge/api/ats/types/JobPosting.java +++ b/src/main/java/com/merge/api/ats/types/JobPosting.java @@ -37,7 +37,7 @@ public final class JobPosting { private final Optional job; - private final Optional status; + private final Optional status; private final Optional content; @@ -63,7 +63,7 @@ private JobPosting( Optional title, Optional> jobPostingUrls, Optional job, - Optional status, + Optional status, Optional content, Optional remoteCreatedAt, Optional remoteUpdatedAt, @@ -154,7 +154,7 @@ public Optional getJob() { * */ @JsonProperty("status") - public Optional getStatus() { + public Optional getStatus() { return status; } @@ -282,7 +282,7 @@ public static final class Builder { private Optional job = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Optional content = Optional.empty(); @@ -333,6 +333,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -344,6 +347,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -355,6 +361,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -366,6 +375,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The job posting’s title.

    + */ @JsonSetter(value = "title", nulls = Nulls.SKIP) public Builder title(Optional title) { this.title = title; @@ -377,6 +389,9 @@ public Builder title(String title) { return this; } + /** + *

    The Url object is used to represent hyperlinks for a candidate to apply to a given job.

    + */ @JsonSetter(value = "job_posting_urls", nulls = Nulls.SKIP) public Builder jobPostingUrls(Optional> jobPostingUrls) { this.jobPostingUrls = jobPostingUrls; @@ -388,6 +403,9 @@ public Builder jobPostingUrls(List jobPostingUrls) return this; } + /** + *

    ID of Job object for this JobPosting.

    + */ @JsonSetter(value = "job", nulls = Nulls.SKIP) public Builder job(Optional job) { this.job = job; @@ -399,17 +417,30 @@ public Builder job(JobPostingJob job) { return this; } + /** + *

    The job posting's status.

    + *
      + *
    • PUBLISHED - PUBLISHED
    • + *
    • CLOSED - CLOSED
    • + *
    • DRAFT - DRAFT
    • + *
    • INTERNAL - INTERNAL
    • + *
    • PENDING - PENDING
    • + *
    + */ @JsonSetter(value = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { + public Builder status(Optional status) { this.status = status; return this; } - public Builder status(JobPostingStatusEnum status) { + public Builder status(JobPostingStatus status) { this.status = Optional.ofNullable(status); return this; } + /** + *

    The job posting’s content.

    + */ @JsonSetter(value = "content", nulls = Nulls.SKIP) public Builder content(Optional content) { this.content = content; @@ -421,6 +452,9 @@ public Builder content(String content) { return this; } + /** + *

    When the third party's job posting was created.

    + */ @JsonSetter(value = "remote_created_at", nulls = Nulls.SKIP) public Builder remoteCreatedAt(Optional remoteCreatedAt) { this.remoteCreatedAt = remoteCreatedAt; @@ -432,6 +466,9 @@ public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { return this; } + /** + *

    When the third party's job posting was updated.

    + */ @JsonSetter(value = "remote_updated_at", nulls = Nulls.SKIP) public Builder remoteUpdatedAt(Optional remoteUpdatedAt) { this.remoteUpdatedAt = remoteUpdatedAt; @@ -443,6 +480,9 @@ public Builder remoteUpdatedAt(OffsetDateTime remoteUpdatedAt) { return this; } + /** + *

    Indicates whether the job posting is internal or external.

    + */ @JsonSetter(value = "is_internal", nulls = Nulls.SKIP) public Builder isInternal(Optional isInternal) { this.isInternal = isInternal; @@ -454,6 +494,9 @@ public Builder isInternal(Boolean isInternal) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/ats/types/JobPostingStatus.java b/src/main/java/com/merge/api/ats/types/JobPostingStatus.java new file mode 100644 index 000000000..4bed70011 --- /dev/null +++ b/src/main/java/com/merge/api/ats/types/JobPostingStatus.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ats.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = JobPostingStatus.Deserializer.class) +public final class JobPostingStatus { + private final Object value; + + private final int type; + + private JobPostingStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((JobPostingStatusEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof JobPostingStatus && equalTo((JobPostingStatus) other); + } + + private boolean equalTo(JobPostingStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static JobPostingStatus of(JobPostingStatusEnum value) { + return new JobPostingStatus(value, 0); + } + + public static JobPostingStatus of(String value) { + return new JobPostingStatus(value, 1); + } + + public interface Visitor { + T visit(JobPostingStatusEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(JobPostingStatus.class); + } + + @java.lang.Override + public JobPostingStatus deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, JobPostingStatusEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ats/types/JobPostingsListRequest.java b/src/main/java/com/merge/api/ats/types/JobPostingsListRequest.java index 15f0b8665..4a9307524 100644 --- a/src/main/java/com/merge/api/ats/types/JobPostingsListRequest.java +++ b/src/main/java/com/merge/api/ats/types/JobPostingsListRequest.java @@ -280,6 +280,9 @@ public Builder from(JobPostingsListRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -296,6 +299,9 @@ public Builder expand(String expand) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -307,6 +313,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -318,6 +327,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -329,6 +341,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -340,6 +355,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -351,6 +369,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -362,6 +383,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -373,6 +397,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -384,6 +411,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -395,6 +425,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -406,6 +439,16 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    If provided, will only return Job Postings with this status. Options: ('PUBLISHED', 'CLOSED', 'DRAFT', 'INTERNAL', 'PENDING')

    + *
      + *
    • PUBLISHED - PUBLISHED
    • + *
    • CLOSED - CLOSED
    • + *
    • DRAFT - DRAFT
    • + *
    • INTERNAL - INTERNAL
    • + *
    • PENDING - PENDING
    • + *
    + */ @JsonSetter(value = "status", nulls = Nulls.SKIP) public Builder status(Optional status) { this.status = status; diff --git a/src/main/java/com/merge/api/ats/types/JobPostingsRetrieveRequest.java b/src/main/java/com/merge/api/ats/types/JobPostingsRetrieveRequest.java index a669b4b2f..8fd3a8730 100644 --- a/src/main/java/com/merge/api/ats/types/JobPostingsRetrieveRequest.java +++ b/src/main/java/com/merge/api/ats/types/JobPostingsRetrieveRequest.java @@ -116,6 +116,9 @@ public Builder from(JobPostingsRetrieveRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -132,6 +135,9 @@ public Builder expand(String expand) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -143,6 +149,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/ats/types/JobStatus.java b/src/main/java/com/merge/api/ats/types/JobStatus.java new file mode 100644 index 000000000..4d5eaaca3 --- /dev/null +++ b/src/main/java/com/merge/api/ats/types/JobStatus.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ats.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = JobStatus.Deserializer.class) +public final class JobStatus { + private final Object value; + + private final int type; + + private JobStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((JobStatusEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof JobStatus && equalTo((JobStatus) other); + } + + private boolean equalTo(JobStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static JobStatus of(JobStatusEnum value) { + return new JobStatus(value, 0); + } + + public static JobStatus of(String value) { + return new JobStatus(value, 1); + } + + public interface Visitor { + T visit(JobStatusEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(JobStatus.class); + } + + @java.lang.Override + public JobStatus deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, JobStatusEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ats/types/JobType.java b/src/main/java/com/merge/api/ats/types/JobType.java new file mode 100644 index 000000000..e4dd23de6 --- /dev/null +++ b/src/main/java/com/merge/api/ats/types/JobType.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ats.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = JobType.Deserializer.class) +public final class JobType { + private final Object value; + + private final int type; + + private JobType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((JobTypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof JobType && equalTo((JobType) other); + } + + private boolean equalTo(JobType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static JobType of(JobTypeEnum value) { + return new JobType(value, 0); + } + + public static JobType of(String value) { + return new JobType(value, 1); + } + + public interface Visitor { + T visit(JobTypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(JobType.class); + } + + @java.lang.Override + public JobType deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, JobTypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ats/types/JobsListRequest.java b/src/main/java/com/merge/api/ats/types/JobsListRequest.java index 66717c76d..5014df543 100644 --- a/src/main/java/com/merge/api/ats/types/JobsListRequest.java +++ b/src/main/java/com/merge/api/ats/types/JobsListRequest.java @@ -348,6 +348,9 @@ public Builder from(JobsListRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -364,6 +367,9 @@ public Builder expand(JobsListRequestExpandItem expand) { return this; } + /** + *

    If provided, will only return jobs with this code.

    + */ @JsonSetter(value = "code", nulls = Nulls.SKIP) public Builder code(Optional code) { this.code = code; @@ -375,6 +381,9 @@ public Builder code(String code) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -386,6 +395,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -397,6 +409,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -408,6 +423,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -419,6 +437,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -430,6 +451,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -441,6 +465,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -452,6 +479,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -463,6 +493,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    If provided, will only return jobs for this office; multiple offices can be separated by commas.

    + */ @JsonSetter(value = "offices", nulls = Nulls.SKIP) public Builder offices(Optional offices) { this.offices = offices; @@ -474,6 +507,9 @@ public Builder offices(String offices) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -485,6 +521,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    Deprecated. Use show_enum_origins.

    + */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -496,6 +535,9 @@ public Builder remoteFields(String remoteFields) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -507,6 +549,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    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

    + */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; @@ -518,6 +563,16 @@ public Builder showEnumOrigins(String showEnumOrigins) { return this; } + /** + *

    If provided, will only return jobs with this status. Options: ('OPEN', 'CLOSED', 'DRAFT', 'ARCHIVED', 'PENDING')

    + *
      + *
    • OPEN - OPEN
    • + *
    • CLOSED - CLOSED
    • + *
    • DRAFT - DRAFT
    • + *
    • ARCHIVED - ARCHIVED
    • + *
    • PENDING - PENDING
    • + *
    + */ @JsonSetter(value = "status", nulls = Nulls.SKIP) public Builder status(Optional status) { this.status = status; diff --git a/src/main/java/com/merge/api/ats/types/JobsRetrieveRequest.java b/src/main/java/com/merge/api/ats/types/JobsRetrieveRequest.java index 9dd4d9e8f..732f006f6 100644 --- a/src/main/java/com/merge/api/ats/types/JobsRetrieveRequest.java +++ b/src/main/java/com/merge/api/ats/types/JobsRetrieveRequest.java @@ -149,6 +149,9 @@ public Builder from(JobsRetrieveRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -165,6 +168,9 @@ public Builder expand(JobsRetrieveRequestExpandItem expand) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -176,6 +182,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -187,6 +196,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    Deprecated. Use show_enum_origins.

    + */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -198,6 +210,9 @@ public Builder remoteFields(String remoteFields) { return this; } + /** + *

    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

    + */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; diff --git a/src/main/java/com/merge/api/ats/types/JobsScreeningQuestionsListRequest.java b/src/main/java/com/merge/api/ats/types/JobsScreeningQuestionsListRequest.java index 4a49cf340..52a738579 100644 --- a/src/main/java/com/merge/api/ats/types/JobsScreeningQuestionsListRequest.java +++ b/src/main/java/com/merge/api/ats/types/JobsScreeningQuestionsListRequest.java @@ -170,6 +170,9 @@ public Builder from(JobsScreeningQuestionsListRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -186,6 +189,9 @@ public Builder expand(JobsScreeningQuestionsListRequestExpandItem expand) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -197,6 +203,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -208,6 +217,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -219,6 +231,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -230,6 +245,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; diff --git a/src/main/java/com/merge/api/ats/types/LinkedAccountCommonModelScopeDeserializerRequest.java b/src/main/java/com/merge/api/ats/types/LinkedAccountCommonModelScopeDeserializerRequest.java index aaecfa73c..f7a795bfb 100644 --- a/src/main/java/com/merge/api/ats/types/LinkedAccountCommonModelScopeDeserializerRequest.java +++ b/src/main/java/com/merge/api/ats/types/LinkedAccountCommonModelScopeDeserializerRequest.java @@ -84,6 +84,9 @@ public Builder from(LinkedAccountCommonModelScopeDeserializerRequest other) { return this; } + /** + *

    The common models you want to update the scopes for

    + */ @JsonSetter(value = "common_models", nulls = Nulls.SKIP) public Builder commonModels(List commonModels) { this.commonModels.clear(); diff --git a/src/main/java/com/merge/api/ats/types/LinkedAccountsListRequest.java b/src/main/java/com/merge/api/ats/types/LinkedAccountsListRequest.java index 594bdedcb..099dbe8b9 100644 --- a/src/main/java/com/merge/api/ats/types/LinkedAccountsListRequest.java +++ b/src/main/java/com/merge/api/ats/types/LinkedAccountsListRequest.java @@ -293,6 +293,18 @@ public Builder from(LinkedAccountsListRequest other) { return this; } + /** + *

    Options: accounting, ats, crm, filestorage, hris, mktg, ticketing

    + *
      + *
    • hris - hris
    • + *
    • ats - ats
    • + *
    • accounting - accounting
    • + *
    • ticketing - ticketing
    • + *
    • crm - crm
    • + *
    • mktg - mktg
    • + *
    • filestorage - filestorage
    • + *
    + */ @JsonSetter(value = "category", nulls = Nulls.SKIP) public Builder category(Optional category) { this.category = category; @@ -304,6 +316,9 @@ public Builder category(LinkedAccountsListRequestCategory category) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -315,6 +330,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    If provided, will only return linked accounts associated with the given email address.

    + */ @JsonSetter(value = "end_user_email_address", nulls = Nulls.SKIP) public Builder endUserEmailAddress(Optional endUserEmailAddress) { this.endUserEmailAddress = endUserEmailAddress; @@ -326,6 +344,9 @@ public Builder endUserEmailAddress(String endUserEmailAddress) { return this; } + /** + *

    If provided, will only return linked accounts associated with the given organization name.

    + */ @JsonSetter(value = "end_user_organization_name", nulls = Nulls.SKIP) public Builder endUserOrganizationName(Optional endUserOrganizationName) { this.endUserOrganizationName = endUserOrganizationName; @@ -337,6 +358,9 @@ public Builder endUserOrganizationName(String endUserOrganizationName) { return this; } + /** + *

    If provided, will only return linked accounts associated with the given origin ID.

    + */ @JsonSetter(value = "end_user_origin_id", nulls = Nulls.SKIP) public Builder endUserOriginId(Optional endUserOriginId) { this.endUserOriginId = endUserOriginId; @@ -348,6 +372,9 @@ public Builder endUserOriginId(String endUserOriginId) { return this; } + /** + *

    Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once.

    + */ @JsonSetter(value = "end_user_origin_ids", nulls = Nulls.SKIP) public Builder endUserOriginIds(Optional endUserOriginIds) { this.endUserOriginIds = endUserOriginIds; @@ -370,6 +397,9 @@ public Builder id(String id) { return this; } + /** + *

    Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once.

    + */ @JsonSetter(value = "ids", nulls = Nulls.SKIP) public Builder ids(Optional ids) { this.ids = ids; @@ -381,6 +411,9 @@ public Builder ids(String ids) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_duplicates", nulls = Nulls.SKIP) public Builder includeDuplicates(Optional includeDuplicates) { this.includeDuplicates = includeDuplicates; @@ -392,6 +425,9 @@ public Builder includeDuplicates(Boolean includeDuplicates) { return this; } + /** + *

    If provided, will only return linked accounts associated with the given integration name.

    + */ @JsonSetter(value = "integration_name", nulls = Nulls.SKIP) public Builder integrationName(Optional integrationName) { this.integrationName = integrationName; @@ -403,6 +439,9 @@ public Builder integrationName(String integrationName) { return this; } + /** + *

    If included, will only include test linked accounts. If not included, will only include non-test linked accounts.

    + */ @JsonSetter(value = "is_test_account", nulls = Nulls.SKIP) public Builder isTestAccount(Optional isTestAccount) { this.isTestAccount = isTestAccount; @@ -414,6 +453,9 @@ public Builder isTestAccount(String isTestAccount) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -425,6 +467,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    Filter by status. Options: COMPLETE, IDLE, INCOMPLETE, RELINK_NEEDED

    + */ @JsonSetter(value = "status", nulls = Nulls.SKIP) public Builder status(Optional status) { this.status = status; diff --git a/src/main/java/com/merge/api/ats/types/MultipartFormFieldRequest.java b/src/main/java/com/merge/api/ats/types/MultipartFormFieldRequest.java index 33e8a5c6b..5d5ebdd77 100644 --- a/src/main/java/com/merge/api/ats/types/MultipartFormFieldRequest.java +++ b/src/main/java/com/merge/api/ats/types/MultipartFormFieldRequest.java @@ -25,7 +25,7 @@ public final class MultipartFormFieldRequest { private final String data; - private final Optional encoding; + private final Optional encoding; private final Optional fileName; @@ -36,7 +36,7 @@ public final class MultipartFormFieldRequest { private MultipartFormFieldRequest( String name, String data, - Optional encoding, + Optional encoding, Optional fileName, Optional contentType, Map additionalProperties) { @@ -73,7 +73,7 @@ public String getData() { * */ @JsonProperty("encoding") - public Optional getEncoding() { + public Optional getEncoding() { return encoding; } @@ -127,26 +127,46 @@ public static NameStage builder() { } public interface NameStage { + /** + * The name of the form field + */ DataStage name(@NotNull String name); Builder from(MultipartFormFieldRequest other); } public interface DataStage { + /** + * The data for the form field. + */ _FinalStage data(@NotNull String data); } public interface _FinalStage { MultipartFormFieldRequest build(); - _FinalStage encoding(Optional encoding); + /** + *

    The encoding of the value of data. Defaults to RAW if not defined.

    + *
      + *
    • RAW - RAW
    • + *
    • BASE64 - BASE64
    • + *
    • GZIP_BASE64 - GZIP_BASE64
    • + *
    + */ + _FinalStage encoding(Optional encoding); - _FinalStage encoding(EncodingEnum encoding); + _FinalStage encoding(MultipartFormFieldRequestEncoding encoding); + /** + *

    The file name of the form field, if the field is for a file.

    + */ _FinalStage fileName(Optional fileName); _FinalStage fileName(String fileName); + /** + *

    The MIME type of the file, if the field is for a file.

    + */ _FinalStage contentType(Optional contentType); _FinalStage contentType(String contentType); @@ -162,7 +182,7 @@ public static final class Builder implements NameStage, DataStage, _FinalStage { private Optional fileName = Optional.empty(); - private Optional encoding = Optional.empty(); + private Optional encoding = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -180,7 +200,7 @@ public Builder from(MultipartFormFieldRequest other) { } /** - *

    The name of the form field

    + * The name of the form field

    The name of the form field

    * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -191,7 +211,7 @@ public DataStage name(@NotNull String name) { } /** - *

    The data for the form field.

    + * The data for the form field.

    The data for the form field.

    * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -211,6 +231,9 @@ public _FinalStage contentType(String contentType) { return this; } + /** + *

    The MIME type of the file, if the field is for a file.

    + */ @java.lang.Override @JsonSetter(value = "content_type", nulls = Nulls.SKIP) public _FinalStage contentType(Optional contentType) { @@ -228,6 +251,9 @@ public _FinalStage fileName(String fileName) { return this; } + /** + *

    The file name of the form field, if the field is for a file.

    + */ @java.lang.Override @JsonSetter(value = "file_name", nulls = Nulls.SKIP) public _FinalStage fileName(Optional fileName) { @@ -245,14 +271,22 @@ public _FinalStage fileName(Optional fileName) { * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override - public _FinalStage encoding(EncodingEnum encoding) { + public _FinalStage encoding(MultipartFormFieldRequestEncoding encoding) { this.encoding = Optional.ofNullable(encoding); return this; } + /** + *

    The encoding of the value of data. Defaults to RAW if not defined.

    + *
      + *
    • RAW - RAW
    • + *
    • BASE64 - BASE64
    • + *
    • GZIP_BASE64 - GZIP_BASE64
    • + *
    + */ @java.lang.Override @JsonSetter(value = "encoding", nulls = Nulls.SKIP) - public _FinalStage encoding(Optional encoding) { + public _FinalStage encoding(Optional encoding) { this.encoding = encoding; return this; } diff --git a/src/main/java/com/merge/api/ats/types/MultipartFormFieldRequestEncoding.java b/src/main/java/com/merge/api/ats/types/MultipartFormFieldRequestEncoding.java new file mode 100644 index 000000000..042655ff5 --- /dev/null +++ b/src/main/java/com/merge/api/ats/types/MultipartFormFieldRequestEncoding.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ats.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = MultipartFormFieldRequestEncoding.Deserializer.class) +public final class MultipartFormFieldRequestEncoding { + private final Object value; + + private final int type; + + private MultipartFormFieldRequestEncoding(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EncodingEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof MultipartFormFieldRequestEncoding && equalTo((MultipartFormFieldRequestEncoding) other); + } + + private boolean equalTo(MultipartFormFieldRequestEncoding other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static MultipartFormFieldRequestEncoding of(EncodingEnum value) { + return new MultipartFormFieldRequestEncoding(value, 0); + } + + public static MultipartFormFieldRequestEncoding of(String value) { + return new MultipartFormFieldRequestEncoding(value, 1); + } + + public interface Visitor { + T visit(EncodingEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(MultipartFormFieldRequestEncoding.class); + } + + @java.lang.Override + public MultipartFormFieldRequestEncoding deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, EncodingEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ats/types/Offer.java b/src/main/java/com/merge/api/ats/types/Offer.java index e056b7e46..71d856280 100644 --- a/src/main/java/com/merge/api/ats/types/Offer.java +++ b/src/main/java/com/merge/api/ats/types/Offer.java @@ -43,7 +43,7 @@ public final class Offer { private final Optional startDate; - private final Optional status; + private final Optional status; private final Optional remoteWasDeleted; @@ -64,7 +64,7 @@ private Offer( Optional closedAt, Optional sentAt, Optional startDate, - Optional status, + Optional status, Optional remoteWasDeleted, Optional> fieldMappings, Optional> remoteData, @@ -178,7 +178,7 @@ public Optional getStartDate() { * */ @JsonProperty("status") - public Optional getStatus() { + public Optional getStatus() { return status; } @@ -278,7 +278,7 @@ public static final class Builder { private Optional startDate = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Optional remoteWasDeleted = Optional.empty(); @@ -320,6 +320,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -331,6 +334,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -342,6 +348,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -353,6 +362,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The application who is receiving the offer.

    + */ @JsonSetter(value = "application", nulls = Nulls.SKIP) public Builder application(Optional application) { this.application = application; @@ -364,6 +376,9 @@ public Builder application(OfferApplication application) { return this; } + /** + *

    The user who created the offer.

    + */ @JsonSetter(value = "creator", nulls = Nulls.SKIP) public Builder creator(Optional creator) { this.creator = creator; @@ -375,6 +390,9 @@ public Builder creator(OfferCreator creator) { return this; } + /** + *

    When the third party's offer was created.

    + */ @JsonSetter(value = "remote_created_at", nulls = Nulls.SKIP) public Builder remoteCreatedAt(Optional remoteCreatedAt) { this.remoteCreatedAt = remoteCreatedAt; @@ -386,6 +404,9 @@ public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { return this; } + /** + *

    When the offer was closed.

    + */ @JsonSetter(value = "closed_at", nulls = Nulls.SKIP) public Builder closedAt(Optional closedAt) { this.closedAt = closedAt; @@ -397,6 +418,9 @@ public Builder closedAt(OffsetDateTime closedAt) { return this; } + /** + *

    When the offer was sent.

    + */ @JsonSetter(value = "sent_at", nulls = Nulls.SKIP) public Builder sentAt(Optional sentAt) { this.sentAt = sentAt; @@ -408,6 +432,9 @@ public Builder sentAt(OffsetDateTime sentAt) { return this; } + /** + *

    The employment start date on the offer.

    + */ @JsonSetter(value = "start_date", nulls = Nulls.SKIP) public Builder startDate(Optional startDate) { this.startDate = startDate; @@ -419,17 +446,34 @@ public Builder startDate(OffsetDateTime startDate) { return this; } + /** + *

    The offer's status.

    + *
      + *
    • DRAFT - DRAFT
    • + *
    • APPROVAL-SENT - APPROVAL-SENT
    • + *
    • APPROVED - APPROVED
    • + *
    • SENT - SENT
    • + *
    • SENT-MANUALLY - SENT-MANUALLY
    • + *
    • OPENED - OPENED
    • + *
    • DENIED - DENIED
    • + *
    • SIGNED - SIGNED
    • + *
    • DEPRECATED - DEPRECATED
    • + *
    + */ @JsonSetter(value = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { + public Builder status(Optional status) { this.status = status; return this; } - public Builder status(OfferStatusEnum status) { + public Builder status(OfferStatus status) { this.status = Optional.ofNullable(status); return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/ats/types/OfferStatus.java b/src/main/java/com/merge/api/ats/types/OfferStatus.java new file mode 100644 index 000000000..64aa61de2 --- /dev/null +++ b/src/main/java/com/merge/api/ats/types/OfferStatus.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ats.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = OfferStatus.Deserializer.class) +public final class OfferStatus { + private final Object value; + + private final int type; + + private OfferStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((OfferStatusEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof OfferStatus && equalTo((OfferStatus) other); + } + + private boolean equalTo(OfferStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static OfferStatus of(OfferStatusEnum value) { + return new OfferStatus(value, 0); + } + + public static OfferStatus of(String value) { + return new OfferStatus(value, 1); + } + + public interface Visitor { + T visit(OfferStatusEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(OfferStatus.class); + } + + @java.lang.Override + public OfferStatus deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, OfferStatusEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ats/types/OffersListRequest.java b/src/main/java/com/merge/api/ats/types/OffersListRequest.java index 2309d8e6a..a72ad7e72 100644 --- a/src/main/java/com/merge/api/ats/types/OffersListRequest.java +++ b/src/main/java/com/merge/api/ats/types/OffersListRequest.java @@ -324,6 +324,9 @@ public Builder from(OffersListRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -340,6 +343,9 @@ public Builder expand(OffersListRequestExpandItem expand) { return this; } + /** + *

    If provided, will only return offers for this application.

    + */ @JsonSetter(value = "application_id", nulls = Nulls.SKIP) public Builder applicationId(Optional applicationId) { this.applicationId = applicationId; @@ -351,6 +357,9 @@ public Builder applicationId(String applicationId) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -362,6 +371,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -373,6 +385,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    If provided, will only return offers created by this user.

    + */ @JsonSetter(value = "creator_id", nulls = Nulls.SKIP) public Builder creatorId(Optional creatorId) { this.creatorId = creatorId; @@ -384,6 +399,9 @@ public Builder creatorId(String creatorId) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -395,6 +413,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -406,6 +427,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -417,6 +441,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -428,6 +455,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -439,6 +469,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -450,6 +483,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -461,6 +497,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    Deprecated. Use show_enum_origins.

    + */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -472,6 +511,9 @@ public Builder remoteFields(String remoteFields) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -483,6 +525,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    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

    + */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; diff --git a/src/main/java/com/merge/api/ats/types/OffersRetrieveRequest.java b/src/main/java/com/merge/api/ats/types/OffersRetrieveRequest.java index 5c4f785f5..89a7bb0f1 100644 --- a/src/main/java/com/merge/api/ats/types/OffersRetrieveRequest.java +++ b/src/main/java/com/merge/api/ats/types/OffersRetrieveRequest.java @@ -149,6 +149,9 @@ public Builder from(OffersRetrieveRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -165,6 +168,9 @@ public Builder expand(OffersRetrieveRequestExpandItem expand) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -176,6 +182,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -187,6 +196,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    Deprecated. Use show_enum_origins.

    + */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -198,6 +210,9 @@ public Builder remoteFields(String remoteFields) { return this; } + /** + *

    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

    + */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; diff --git a/src/main/java/com/merge/api/ats/types/Office.java b/src/main/java/com/merge/api/ats/types/Office.java index d3e9ff05c..92ef9013f 100644 --- a/src/main/java/com/merge/api/ats/types/Office.java +++ b/src/main/java/com/merge/api/ats/types/Office.java @@ -224,6 +224,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -235,6 +238,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -246,6 +252,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -257,6 +266,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The office's name.

    + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -268,6 +280,9 @@ public Builder name(String name) { return this; } + /** + *

    The office's location.

    + */ @JsonSetter(value = "location", nulls = Nulls.SKIP) public Builder location(Optional location) { this.location = location; @@ -279,6 +294,9 @@ public Builder location(String location) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/ats/types/OfficesListRequest.java b/src/main/java/com/merge/api/ats/types/OfficesListRequest.java index 73d6b5ded..21317ceae 100644 --- a/src/main/java/com/merge/api/ats/types/OfficesListRequest.java +++ b/src/main/java/com/merge/api/ats/types/OfficesListRequest.java @@ -237,6 +237,9 @@ public Builder from(OfficesListRequest other) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -248,6 +251,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -259,6 +265,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -270,6 +279,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -281,6 +293,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -292,6 +307,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -303,6 +321,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -314,6 +335,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -325,6 +349,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -336,6 +363,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; diff --git a/src/main/java/com/merge/api/ats/types/OfficesRetrieveRequest.java b/src/main/java/com/merge/api/ats/types/OfficesRetrieveRequest.java index 832bff785..fccd68dd6 100644 --- a/src/main/java/com/merge/api/ats/types/OfficesRetrieveRequest.java +++ b/src/main/java/com/merge/api/ats/types/OfficesRetrieveRequest.java @@ -97,6 +97,9 @@ public Builder from(OfficesRetrieveRequest other) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -108,6 +111,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/ats/types/PatchedCandidateEndpointRequest.java b/src/main/java/com/merge/api/ats/types/PatchedCandidateEndpointRequest.java index 03fe18e50..620466e77 100644 --- a/src/main/java/com/merge/api/ats/types/PatchedCandidateEndpointRequest.java +++ b/src/main/java/com/merge/api/ats/types/PatchedCandidateEndpointRequest.java @@ -115,10 +115,16 @@ public interface RemoteUserIdStage { public interface _FinalStage { PatchedCandidateEndpointRequest build(); + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ _FinalStage isDebugMode(Optional isDebugMode); _FinalStage isDebugMode(Boolean isDebugMode); + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ _FinalStage runAsync(Optional runAsync); _FinalStage runAsync(Boolean runAsync); @@ -172,6 +178,9 @@ public _FinalStage runAsync(Boolean runAsync) { return this; } + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ @java.lang.Override @JsonSetter(value = "run_async", nulls = Nulls.SKIP) public _FinalStage runAsync(Optional runAsync) { @@ -189,6 +198,9 @@ public _FinalStage isDebugMode(Boolean isDebugMode) { return this; } + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ @java.lang.Override @JsonSetter(value = "is_debug_mode", nulls = Nulls.SKIP) public _FinalStage isDebugMode(Optional isDebugMode) { diff --git a/src/main/java/com/merge/api/ats/types/PatchedCandidateRequest.java b/src/main/java/com/merge/api/ats/types/PatchedCandidateRequest.java index 0236bd821..706ee2fd4 100644 --- a/src/main/java/com/merge/api/ats/types/PatchedCandidateRequest.java +++ b/src/main/java/com/merge/api/ats/types/PatchedCandidateRequest.java @@ -340,6 +340,9 @@ public Builder from(PatchedCandidateRequest other) { return this; } + /** + *

    The candidate's first name.

    + */ @JsonSetter(value = "first_name", nulls = Nulls.SKIP) public Builder firstName(Optional firstName) { this.firstName = firstName; @@ -351,6 +354,9 @@ public Builder firstName(String firstName) { return this; } + /** + *

    The candidate's last name.

    + */ @JsonSetter(value = "last_name", nulls = Nulls.SKIP) public Builder lastName(Optional lastName) { this.lastName = lastName; @@ -362,6 +368,9 @@ public Builder lastName(String lastName) { return this; } + /** + *

    The candidate's current company.

    + */ @JsonSetter(value = "company", nulls = Nulls.SKIP) public Builder company(Optional company) { this.company = company; @@ -373,6 +382,9 @@ public Builder company(String company) { return this; } + /** + *

    The candidate's current title.

    + */ @JsonSetter(value = "title", nulls = Nulls.SKIP) public Builder title(Optional title) { this.title = title; @@ -384,6 +396,9 @@ public Builder title(String title) { return this; } + /** + *

    When the most recent interaction with the candidate occurred.

    + */ @JsonSetter(value = "last_interaction_at", nulls = Nulls.SKIP) public Builder lastInteractionAt(Optional lastInteractionAt) { this.lastInteractionAt = lastInteractionAt; @@ -395,6 +410,9 @@ public Builder lastInteractionAt(OffsetDateTime lastInteractionAt) { return this; } + /** + *

    Whether or not the candidate is private.

    + */ @JsonSetter(value = "is_private", nulls = Nulls.SKIP) public Builder isPrivate(Optional isPrivate) { this.isPrivate = isPrivate; @@ -406,6 +424,9 @@ public Builder isPrivate(Boolean isPrivate) { return this; } + /** + *

    Whether or not the candidate can be emailed.

    + */ @JsonSetter(value = "can_email", nulls = Nulls.SKIP) public Builder canEmail(Optional canEmail) { this.canEmail = canEmail; @@ -417,6 +438,9 @@ public Builder canEmail(Boolean canEmail) { return this; } + /** + *

    The candidate's locations.

    + */ @JsonSetter(value = "locations", nulls = Nulls.SKIP) public Builder locations(Optional>> locations) { this.locations = locations; @@ -461,6 +485,9 @@ public Builder urls(List urls) { return this; } + /** + *

    Array of Tag names as strings.

    + */ @JsonSetter(value = "tags", nulls = Nulls.SKIP) public Builder tags(Optional>> tags) { this.tags = tags; @@ -472,6 +499,9 @@ public Builder tags(List> tags) { return this; } + /** + *

    Array of Application object IDs.

    + */ @JsonSetter(value = "applications", nulls = Nulls.SKIP) public Builder applications(Optional>> applications) { this.applications = applications; @@ -483,6 +513,9 @@ public Builder applications(List> applications) { return this; } + /** + *

    Array of Attachment object IDs.

    + */ @JsonSetter(value = "attachments", nulls = Nulls.SKIP) public Builder attachments(Optional>> attachments) { this.attachments = attachments; diff --git a/src/main/java/com/merge/api/ats/types/PatchedEditFieldMappingRequest.java b/src/main/java/com/merge/api/ats/types/PatchedEditFieldMappingRequest.java index 2c6400d03..8152e9e50 100644 --- a/src/main/java/com/merge/api/ats/types/PatchedEditFieldMappingRequest.java +++ b/src/main/java/com/merge/api/ats/types/PatchedEditFieldMappingRequest.java @@ -116,6 +116,9 @@ public Builder from(PatchedEditFieldMappingRequest other) { return this; } + /** + *

    The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.

    + */ @JsonSetter(value = "remote_field_traversal_path", nulls = Nulls.SKIP) public Builder remoteFieldTraversalPath(Optional> remoteFieldTraversalPath) { this.remoteFieldTraversalPath = remoteFieldTraversalPath; @@ -127,6 +130,9 @@ public Builder remoteFieldTraversalPath(List remoteFieldTraversalPath) return this; } + /** + *

    The method of the remote endpoint where the remote field is coming from.

    + */ @JsonSetter(value = "remote_method", nulls = Nulls.SKIP) public Builder remoteMethod(Optional remoteMethod) { this.remoteMethod = remoteMethod; @@ -138,6 +144,9 @@ public Builder remoteMethod(String remoteMethod) { return this; } + /** + *

    The path of the remote endpoint where the remote field is coming from.

    + */ @JsonSetter(value = "remote_url_path", nulls = Nulls.SKIP) public Builder remoteUrlPath(Optional remoteUrlPath) { this.remoteUrlPath = remoteUrlPath; diff --git a/src/main/java/com/merge/api/ats/types/PhoneNumber.java b/src/main/java/com/merge/api/ats/types/PhoneNumber.java index 27dece06a..500cd1ff6 100644 --- a/src/main/java/com/merge/api/ats/types/PhoneNumber.java +++ b/src/main/java/com/merge/api/ats/types/PhoneNumber.java @@ -27,7 +27,7 @@ public final class PhoneNumber { private final Optional value; - private final Optional phoneNumberType; + private final Optional phoneNumberType; private final Optional remoteWasDeleted; @@ -37,7 +37,7 @@ private PhoneNumber( Optional createdAt, Optional modifiedAt, Optional value, - Optional phoneNumberType, + Optional phoneNumberType, Optional remoteWasDeleted, Map additionalProperties) { this.createdAt = createdAt; @@ -83,7 +83,7 @@ public Optional getValue() { * */ @JsonProperty("phone_number_type") - public Optional getPhoneNumberType() { + public Optional getPhoneNumberType() { return phoneNumberType; } @@ -136,7 +136,7 @@ public static final class Builder { private Optional value = Optional.empty(); - private Optional phoneNumberType = Optional.empty(); + private Optional phoneNumberType = Optional.empty(); private Optional remoteWasDeleted = Optional.empty(); @@ -154,6 +154,9 @@ public Builder from(PhoneNumber other) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -165,6 +168,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -176,6 +182,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The phone number.

    + */ @JsonSetter(value = "value", nulls = Nulls.SKIP) public Builder value(Optional value) { this.value = value; @@ -187,17 +196,30 @@ public Builder value(String value) { return this; } + /** + *

    The type of phone number.

    + *
      + *
    • HOME - HOME
    • + *
    • WORK - WORK
    • + *
    • MOBILE - MOBILE
    • + *
    • SKYPE - SKYPE
    • + *
    • OTHER - OTHER
    • + *
    + */ @JsonSetter(value = "phone_number_type", nulls = Nulls.SKIP) - public Builder phoneNumberType(Optional phoneNumberType) { + public Builder phoneNumberType(Optional phoneNumberType) { this.phoneNumberType = phoneNumberType; return this; } - public Builder phoneNumberType(PhoneNumberTypeEnum phoneNumberType) { + public Builder phoneNumberType(PhoneNumberPhoneNumberType phoneNumberType) { this.phoneNumberType = Optional.ofNullable(phoneNumberType); return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/ats/types/PhoneNumberPhoneNumberType.java b/src/main/java/com/merge/api/ats/types/PhoneNumberPhoneNumberType.java new file mode 100644 index 000000000..1ce9188ba --- /dev/null +++ b/src/main/java/com/merge/api/ats/types/PhoneNumberPhoneNumberType.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ats.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = PhoneNumberPhoneNumberType.Deserializer.class) +public final class PhoneNumberPhoneNumberType { + private final Object value; + + private final int type; + + private PhoneNumberPhoneNumberType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((PhoneNumberTypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PhoneNumberPhoneNumberType && equalTo((PhoneNumberPhoneNumberType) other); + } + + private boolean equalTo(PhoneNumberPhoneNumberType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static PhoneNumberPhoneNumberType of(PhoneNumberTypeEnum value) { + return new PhoneNumberPhoneNumberType(value, 0); + } + + public static PhoneNumberPhoneNumberType of(String value) { + return new PhoneNumberPhoneNumberType(value, 1); + } + + public interface Visitor { + T visit(PhoneNumberTypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(PhoneNumberPhoneNumberType.class); + } + + @java.lang.Override + public PhoneNumberPhoneNumberType deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, PhoneNumberTypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ats/types/PhoneNumberRequest.java b/src/main/java/com/merge/api/ats/types/PhoneNumberRequest.java index 04f02636a..4da4ebb9a 100644 --- a/src/main/java/com/merge/api/ats/types/PhoneNumberRequest.java +++ b/src/main/java/com/merge/api/ats/types/PhoneNumberRequest.java @@ -23,7 +23,7 @@ public final class PhoneNumberRequest { private final Optional value; - private final Optional phoneNumberType; + private final Optional phoneNumberType; private final Optional> integrationParams; @@ -33,7 +33,7 @@ public final class PhoneNumberRequest { private PhoneNumberRequest( Optional value, - Optional phoneNumberType, + Optional phoneNumberType, Optional> integrationParams, Optional> linkedAccountParams, Map additionalProperties) { @@ -63,7 +63,7 @@ public Optional getValue() { * */ @JsonProperty("phone_number_type") - public Optional getPhoneNumberType() { + public Optional getPhoneNumberType() { return phoneNumberType; } @@ -113,7 +113,7 @@ public static Builder builder() { public static final class Builder { private Optional value = Optional.empty(); - private Optional phoneNumberType = Optional.empty(); + private Optional phoneNumberType = Optional.empty(); private Optional> integrationParams = Optional.empty(); @@ -132,6 +132,9 @@ public Builder from(PhoneNumberRequest other) { return this; } + /** + *

    The phone number.

    + */ @JsonSetter(value = "value", nulls = Nulls.SKIP) public Builder value(Optional value) { this.value = value; @@ -143,13 +146,23 @@ public Builder value(String value) { return this; } + /** + *

    The type of phone number.

    + *
      + *
    • HOME - HOME
    • + *
    • WORK - WORK
    • + *
    • MOBILE - MOBILE
    • + *
    • SKYPE - SKYPE
    • + *
    • OTHER - OTHER
    • + *
    + */ @JsonSetter(value = "phone_number_type", nulls = Nulls.SKIP) - public Builder phoneNumberType(Optional phoneNumberType) { + public Builder phoneNumberType(Optional phoneNumberType) { this.phoneNumberType = phoneNumberType; return this; } - public Builder phoneNumberType(PhoneNumberTypeEnum phoneNumberType) { + public Builder phoneNumberType(PhoneNumberRequestPhoneNumberType phoneNumberType) { this.phoneNumberType = Optional.ofNullable(phoneNumberType); return this; } diff --git a/src/main/java/com/merge/api/ats/types/PhoneNumberRequestPhoneNumberType.java b/src/main/java/com/merge/api/ats/types/PhoneNumberRequestPhoneNumberType.java new file mode 100644 index 000000000..72545958c --- /dev/null +++ b/src/main/java/com/merge/api/ats/types/PhoneNumberRequestPhoneNumberType.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ats.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = PhoneNumberRequestPhoneNumberType.Deserializer.class) +public final class PhoneNumberRequestPhoneNumberType { + private final Object value; + + private final int type; + + private PhoneNumberRequestPhoneNumberType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((PhoneNumberTypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PhoneNumberRequestPhoneNumberType && equalTo((PhoneNumberRequestPhoneNumberType) other); + } + + private boolean equalTo(PhoneNumberRequestPhoneNumberType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static PhoneNumberRequestPhoneNumberType of(PhoneNumberTypeEnum value) { + return new PhoneNumberRequestPhoneNumberType(value, 0); + } + + public static PhoneNumberRequestPhoneNumberType of(String value) { + return new PhoneNumberRequestPhoneNumberType(value, 1); + } + + public interface Visitor { + T visit(PhoneNumberTypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(PhoneNumberRequestPhoneNumberType.class); + } + + @java.lang.Override + public PhoneNumberRequestPhoneNumberType deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, PhoneNumberTypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ats/types/RejectReason.java b/src/main/java/com/merge/api/ats/types/RejectReason.java index 1dd86e0b5..1a69dcbc1 100644 --- a/src/main/java/com/merge/api/ats/types/RejectReason.java +++ b/src/main/java/com/merge/api/ats/types/RejectReason.java @@ -207,6 +207,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -218,6 +221,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -229,6 +235,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -240,6 +249,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The rejection reason’s name.

    + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -251,6 +263,9 @@ public Builder name(String name) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/ats/types/RejectReasonsListRequest.java b/src/main/java/com/merge/api/ats/types/RejectReasonsListRequest.java index 4c6077728..fbcd79bf5 100644 --- a/src/main/java/com/merge/api/ats/types/RejectReasonsListRequest.java +++ b/src/main/java/com/merge/api/ats/types/RejectReasonsListRequest.java @@ -237,6 +237,9 @@ public Builder from(RejectReasonsListRequest other) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -248,6 +251,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -259,6 +265,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -270,6 +279,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -281,6 +293,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -292,6 +307,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -303,6 +321,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -314,6 +335,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -325,6 +349,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -336,6 +363,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; diff --git a/src/main/java/com/merge/api/ats/types/RejectReasonsRetrieveRequest.java b/src/main/java/com/merge/api/ats/types/RejectReasonsRetrieveRequest.java index 22abe3083..4d2a2b985 100644 --- a/src/main/java/com/merge/api/ats/types/RejectReasonsRetrieveRequest.java +++ b/src/main/java/com/merge/api/ats/types/RejectReasonsRetrieveRequest.java @@ -97,6 +97,9 @@ public Builder from(RejectReasonsRetrieveRequest other) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -108,6 +111,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/ats/types/RemoteData.java b/src/main/java/com/merge/api/ats/types/RemoteData.java index 29a9929b3..b00ac0737 100644 --- a/src/main/java/com/merge/api/ats/types/RemoteData.java +++ b/src/main/java/com/merge/api/ats/types/RemoteData.java @@ -77,6 +77,9 @@ public static PathStage builder() { } public interface PathStage { + /** + * The third-party API path that is being called. + */ _FinalStage path(@NotNull String path); Builder from(RemoteData other); @@ -109,7 +112,7 @@ public Builder from(RemoteData other) { } /** - *

    The third-party API path that is being called.

    + * The third-party API path that is being called.

    The third-party API path that is being called.

    * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override diff --git a/src/main/java/com/merge/api/ats/types/RemoteFieldsRetrieveRequest.java b/src/main/java/com/merge/api/ats/types/RemoteFieldsRetrieveRequest.java index 85f5f72ec..47b11607a 100644 --- a/src/main/java/com/merge/api/ats/types/RemoteFieldsRetrieveRequest.java +++ b/src/main/java/com/merge/api/ats/types/RemoteFieldsRetrieveRequest.java @@ -97,6 +97,9 @@ public Builder from(RemoteFieldsRetrieveRequest other) { return this; } + /** + *

    A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models.

    + */ @JsonSetter(value = "common_models", nulls = Nulls.SKIP) public Builder commonModels(Optional commonModels) { this.commonModels = commonModels; @@ -108,6 +111,9 @@ public Builder commonModels(String commonModels) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_example_values", nulls = Nulls.SKIP) public Builder includeExampleValues(Optional includeExampleValues) { this.includeExampleValues = includeExampleValues; diff --git a/src/main/java/com/merge/api/ats/types/RemoteKeyForRegenerationRequest.java b/src/main/java/com/merge/api/ats/types/RemoteKeyForRegenerationRequest.java index 194d5b050..b79e95324 100644 --- a/src/main/java/com/merge/api/ats/types/RemoteKeyForRegenerationRequest.java +++ b/src/main/java/com/merge/api/ats/types/RemoteKeyForRegenerationRequest.java @@ -66,6 +66,9 @@ public static NameStage builder() { } public interface NameStage { + /** + * The name of the remote key + */ _FinalStage name(@NotNull String name); Builder from(RemoteKeyForRegenerationRequest other); @@ -91,7 +94,7 @@ public Builder from(RemoteKeyForRegenerationRequest other) { } /** - *

    The name of the remote key

    + * The name of the remote key

    The name of the remote key

    * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override diff --git a/src/main/java/com/merge/api/ats/types/RemoteResponse.java b/src/main/java/com/merge/api/ats/types/RemoteResponse.java index 3071e1a0d..247d79ebc 100644 --- a/src/main/java/com/merge/api/ats/types/RemoteResponse.java +++ b/src/main/java/com/merge/api/ats/types/RemoteResponse.java @@ -32,7 +32,7 @@ public final class RemoteResponse { private final Optional> responseHeaders; - private final Optional responseType; + private final Optional responseType; private final Optional> headers; @@ -44,7 +44,7 @@ private RemoteResponse( int status, JsonNode response, Optional> responseHeaders, - Optional responseType, + Optional responseType, Optional> headers, Map additionalProperties) { this.method = method; @@ -83,7 +83,7 @@ public Optional> getResponseHeaders() { } @JsonProperty("response_type") - public Optional getResponseType() { + public Optional getResponseType() { return responseType; } @@ -159,9 +159,9 @@ public interface _FinalStage { _FinalStage responseHeaders(Map responseHeaders); - _FinalStage responseType(Optional responseType); + _FinalStage responseType(Optional responseType); - _FinalStage responseType(ResponseTypeEnum responseType); + _FinalStage responseType(RemoteResponseResponseType responseType); _FinalStage headers(Optional> headers); @@ -180,7 +180,7 @@ public static final class Builder implements MethodStage, PathStage, StatusStage private Optional> headers = Optional.empty(); - private Optional responseType = Optional.empty(); + private Optional responseType = Optional.empty(); private Optional> responseHeaders = Optional.empty(); @@ -243,14 +243,14 @@ public _FinalStage headers(Optional> headers) { } @java.lang.Override - public _FinalStage responseType(ResponseTypeEnum responseType) { + public _FinalStage responseType(RemoteResponseResponseType responseType) { this.responseType = Optional.ofNullable(responseType); return this; } @java.lang.Override @JsonSetter(value = "response_type", nulls = Nulls.SKIP) - public _FinalStage responseType(Optional responseType) { + public _FinalStage responseType(Optional responseType) { this.responseType = responseType; return this; } diff --git a/src/main/java/com/merge/api/ats/types/RemoteResponseResponseType.java b/src/main/java/com/merge/api/ats/types/RemoteResponseResponseType.java new file mode 100644 index 000000000..4efba7173 --- /dev/null +++ b/src/main/java/com/merge/api/ats/types/RemoteResponseResponseType.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ats.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = RemoteResponseResponseType.Deserializer.class) +public final class RemoteResponseResponseType { + private final Object value; + + private final int type; + + private RemoteResponseResponseType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((ResponseTypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof RemoteResponseResponseType && equalTo((RemoteResponseResponseType) other); + } + + private boolean equalTo(RemoteResponseResponseType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static RemoteResponseResponseType of(ResponseTypeEnum value) { + return new RemoteResponseResponseType(value, 0); + } + + public static RemoteResponseResponseType of(String value) { + return new RemoteResponseResponseType(value, 1); + } + + public interface Visitor { + T visit(ResponseTypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(RemoteResponseResponseType.class); + } + + @java.lang.Override + public RemoteResponseResponseType deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, ResponseTypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ats/types/RemoteUser.java b/src/main/java/com/merge/api/ats/types/RemoteUser.java index 9c1268649..58797d881 100644 --- a/src/main/java/com/merge/api/ats/types/RemoteUser.java +++ b/src/main/java/com/merge/api/ats/types/RemoteUser.java @@ -41,7 +41,7 @@ public final class RemoteUser { private final Optional remoteCreatedAt; - private final Optional accessRole; + private final Optional accessRole; private final Optional remoteWasDeleted; @@ -61,7 +61,7 @@ private RemoteUser( Optional email, Optional disabled, Optional remoteCreatedAt, - Optional accessRole, + Optional accessRole, Optional remoteWasDeleted, Optional> fieldMappings, Optional> remoteData, @@ -162,7 +162,7 @@ public Optional getRemoteCreatedAt() { * */ @JsonProperty("access_role") - public Optional getAccessRole() { + public Optional getAccessRole() { return accessRole; } @@ -258,7 +258,7 @@ public static final class Builder { private Optional remoteCreatedAt = Optional.empty(); - private Optional accessRole = Optional.empty(); + private Optional accessRole = Optional.empty(); private Optional remoteWasDeleted = Optional.empty(); @@ -299,6 +299,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -310,6 +313,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -321,6 +327,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -332,6 +341,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The user's first name.

    + */ @JsonSetter(value = "first_name", nulls = Nulls.SKIP) public Builder firstName(Optional firstName) { this.firstName = firstName; @@ -343,6 +355,9 @@ public Builder firstName(String firstName) { return this; } + /** + *

    The user's last name.

    + */ @JsonSetter(value = "last_name", nulls = Nulls.SKIP) public Builder lastName(Optional lastName) { this.lastName = lastName; @@ -354,6 +369,9 @@ public Builder lastName(String lastName) { return this; } + /** + *

    The user's email.

    + */ @JsonSetter(value = "email", nulls = Nulls.SKIP) public Builder email(Optional email) { this.email = email; @@ -365,6 +383,9 @@ public Builder email(String email) { return this; } + /** + *

    Whether the user's account had been disabled.

    + */ @JsonSetter(value = "disabled", nulls = Nulls.SKIP) public Builder disabled(Optional disabled) { this.disabled = disabled; @@ -376,6 +397,9 @@ public Builder disabled(Boolean disabled) { return this; } + /** + *

    When the third party's user was created.

    + */ @JsonSetter(value = "remote_created_at", nulls = Nulls.SKIP) public Builder remoteCreatedAt(Optional remoteCreatedAt) { this.remoteCreatedAt = remoteCreatedAt; @@ -387,17 +411,30 @@ public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { return this; } + /** + *

    The user's role.

    + *
      + *
    • SUPER_ADMIN - SUPER_ADMIN
    • + *
    • ADMIN - ADMIN
    • + *
    • TEAM_MEMBER - TEAM_MEMBER
    • + *
    • LIMITED_TEAM_MEMBER - LIMITED_TEAM_MEMBER
    • + *
    • INTERVIEWER - INTERVIEWER
    • + *
    + */ @JsonSetter(value = "access_role", nulls = Nulls.SKIP) - public Builder accessRole(Optional accessRole) { + public Builder accessRole(Optional accessRole) { this.accessRole = accessRole; return this; } - public Builder accessRole(AccessRoleEnum accessRole) { + public Builder accessRole(RemoteUserAccessRole accessRole) { this.accessRole = Optional.ofNullable(accessRole); return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/ats/types/RemoteUserAccessRole.java b/src/main/java/com/merge/api/ats/types/RemoteUserAccessRole.java new file mode 100644 index 000000000..625cb299d --- /dev/null +++ b/src/main/java/com/merge/api/ats/types/RemoteUserAccessRole.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ats.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = RemoteUserAccessRole.Deserializer.class) +public final class RemoteUserAccessRole { + private final Object value; + + private final int type; + + private RemoteUserAccessRole(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((AccessRoleEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof RemoteUserAccessRole && equalTo((RemoteUserAccessRole) other); + } + + private boolean equalTo(RemoteUserAccessRole other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static RemoteUserAccessRole of(AccessRoleEnum value) { + return new RemoteUserAccessRole(value, 0); + } + + public static RemoteUserAccessRole of(String value) { + return new RemoteUserAccessRole(value, 1); + } + + public interface Visitor { + T visit(AccessRoleEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(RemoteUserAccessRole.class); + } + + @java.lang.Override + public RemoteUserAccessRole deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, AccessRoleEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ats/types/ScheduledInterview.java b/src/main/java/com/merge/api/ats/types/ScheduledInterview.java index 1c2c1d0e3..36151ddc8 100644 --- a/src/main/java/com/merge/api/ats/types/ScheduledInterview.java +++ b/src/main/java/com/merge/api/ats/types/ScheduledInterview.java @@ -49,7 +49,7 @@ public final class ScheduledInterview { private final Optional remoteUpdatedAt; - private final Optional status; + private final Optional status; private final Optional remoteWasDeleted; @@ -73,7 +73,7 @@ private ScheduledInterview( Optional endAt, Optional remoteCreatedAt, Optional remoteUpdatedAt, - Optional status, + Optional status, Optional remoteWasDeleted, Optional> fieldMappings, Optional> remoteData, @@ -208,7 +208,7 @@ public Optional getRemoteUpdatedAt() { * */ @JsonProperty("status") - public Optional getStatus() { + public Optional getStatus() { return status; } @@ -320,7 +320,7 @@ public static final class Builder { private Optional remoteUpdatedAt = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Optional remoteWasDeleted = Optional.empty(); @@ -365,6 +365,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -376,6 +379,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -387,6 +393,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -398,6 +407,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The application being interviewed.

    + */ @JsonSetter(value = "application", nulls = Nulls.SKIP) public Builder application(Optional application) { this.application = application; @@ -409,6 +421,9 @@ public Builder application(ScheduledInterviewApplication application) { return this; } + /** + *

    The stage of the interview.

    + */ @JsonSetter(value = "job_interview_stage", nulls = Nulls.SKIP) public Builder jobInterviewStage(Optional jobInterviewStage) { this.jobInterviewStage = jobInterviewStage; @@ -420,6 +435,9 @@ public Builder jobInterviewStage(ScheduledInterviewJobInterviewStage jobIntervie return this; } + /** + *

    The user organizing the interview.

    + */ @JsonSetter(value = "organizer", nulls = Nulls.SKIP) public Builder organizer(Optional organizer) { this.organizer = organizer; @@ -431,6 +449,9 @@ public Builder organizer(ScheduledInterviewOrganizer organizer) { return this; } + /** + *

    Array of RemoteUser IDs.

    + */ @JsonSetter(value = "interviewers", nulls = Nulls.SKIP) public Builder interviewers(Optional>> interviewers) { this.interviewers = interviewers; @@ -442,6 +463,9 @@ public Builder interviewers(List> i return this; } + /** + *

    The interview's location.

    + */ @JsonSetter(value = "location", nulls = Nulls.SKIP) public Builder location(Optional location) { this.location = location; @@ -453,6 +477,9 @@ public Builder location(String location) { return this; } + /** + *

    When the interview was started.

    + */ @JsonSetter(value = "start_at", nulls = Nulls.SKIP) public Builder startAt(Optional startAt) { this.startAt = startAt; @@ -464,6 +491,9 @@ public Builder startAt(OffsetDateTime startAt) { return this; } + /** + *

    When the interview was ended.

    + */ @JsonSetter(value = "end_at", nulls = Nulls.SKIP) public Builder endAt(Optional endAt) { this.endAt = endAt; @@ -475,6 +505,9 @@ public Builder endAt(OffsetDateTime endAt) { return this; } + /** + *

    When the third party's interview was created.

    + */ @JsonSetter(value = "remote_created_at", nulls = Nulls.SKIP) public Builder remoteCreatedAt(Optional remoteCreatedAt) { this.remoteCreatedAt = remoteCreatedAt; @@ -486,6 +519,9 @@ public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { return this; } + /** + *

    When the third party's interview was updated.

    + */ @JsonSetter(value = "remote_updated_at", nulls = Nulls.SKIP) public Builder remoteUpdatedAt(Optional remoteUpdatedAt) { this.remoteUpdatedAt = remoteUpdatedAt; @@ -497,17 +533,28 @@ public Builder remoteUpdatedAt(OffsetDateTime remoteUpdatedAt) { return this; } + /** + *

    The interview's status.

    + *
      + *
    • SCHEDULED - SCHEDULED
    • + *
    • AWAITING_FEEDBACK - AWAITING_FEEDBACK
    • + *
    • COMPLETE - COMPLETE
    • + *
    + */ @JsonSetter(value = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { + public Builder status(Optional status) { this.status = status; return this; } - public Builder status(ScheduledInterviewStatusEnum status) { + public Builder status(ScheduledInterviewStatus status) { this.status = Optional.ofNullable(status); return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/ats/types/ScheduledInterviewEndpointRequest.java b/src/main/java/com/merge/api/ats/types/ScheduledInterviewEndpointRequest.java index 072d1deca..761c8e7d9 100644 --- a/src/main/java/com/merge/api/ats/types/ScheduledInterviewEndpointRequest.java +++ b/src/main/java/com/merge/api/ats/types/ScheduledInterviewEndpointRequest.java @@ -115,10 +115,16 @@ public interface RemoteUserIdStage { public interface _FinalStage { ScheduledInterviewEndpointRequest build(); + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ _FinalStage isDebugMode(Optional isDebugMode); _FinalStage isDebugMode(Boolean isDebugMode); + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ _FinalStage runAsync(Optional runAsync); _FinalStage runAsync(Boolean runAsync); @@ -172,6 +178,9 @@ public _FinalStage runAsync(Boolean runAsync) { return this; } + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ @java.lang.Override @JsonSetter(value = "run_async", nulls = Nulls.SKIP) public _FinalStage runAsync(Optional runAsync) { @@ -189,6 +198,9 @@ public _FinalStage isDebugMode(Boolean isDebugMode) { return this; } + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ @java.lang.Override @JsonSetter(value = "is_debug_mode", nulls = Nulls.SKIP) public _FinalStage isDebugMode(Optional isDebugMode) { diff --git a/src/main/java/com/merge/api/ats/types/ScheduledInterviewRequest.java b/src/main/java/com/merge/api/ats/types/ScheduledInterviewRequest.java index 696642167..cfcfbde96 100644 --- a/src/main/java/com/merge/api/ats/types/ScheduledInterviewRequest.java +++ b/src/main/java/com/merge/api/ats/types/ScheduledInterviewRequest.java @@ -37,7 +37,7 @@ public final class ScheduledInterviewRequest { private final Optional endAt; - private final Optional status; + private final Optional status; private final Optional> integrationParams; @@ -53,7 +53,7 @@ private ScheduledInterviewRequest( Optional location, Optional startAt, Optional endAt, - Optional status, + Optional status, Optional> integrationParams, Optional> linkedAccountParams, Map additionalProperties) { @@ -135,7 +135,7 @@ public Optional getEndAt() { * */ @JsonProperty("status") - public Optional getStatus() { + public Optional getStatus() { return status; } @@ -213,7 +213,7 @@ public static final class Builder { private Optional endAt = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Optional> integrationParams = Optional.empty(); @@ -238,6 +238,9 @@ public Builder from(ScheduledInterviewRequest other) { return this; } + /** + *

    The application being interviewed.

    + */ @JsonSetter(value = "application", nulls = Nulls.SKIP) public Builder application(Optional application) { this.application = application; @@ -249,6 +252,9 @@ public Builder application(ScheduledInterviewRequestApplication application) { return this; } + /** + *

    The stage of the interview.

    + */ @JsonSetter(value = "job_interview_stage", nulls = Nulls.SKIP) public Builder jobInterviewStage(Optional jobInterviewStage) { this.jobInterviewStage = jobInterviewStage; @@ -260,6 +266,9 @@ public Builder jobInterviewStage(ScheduledInterviewRequestJobInterviewStage jobI return this; } + /** + *

    The user organizing the interview.

    + */ @JsonSetter(value = "organizer", nulls = Nulls.SKIP) public Builder organizer(Optional organizer) { this.organizer = organizer; @@ -271,6 +280,9 @@ public Builder organizer(ScheduledInterviewRequestOrganizer organizer) { return this; } + /** + *

    Array of RemoteUser IDs.

    + */ @JsonSetter(value = "interviewers", nulls = Nulls.SKIP) public Builder interviewers(Optional>> interviewers) { this.interviewers = interviewers; @@ -282,6 +294,9 @@ public Builder interviewers(ListThe interview's location.

    + */ @JsonSetter(value = "location", nulls = Nulls.SKIP) public Builder location(Optional location) { this.location = location; @@ -293,6 +308,9 @@ public Builder location(String location) { return this; } + /** + *

    When the interview was started.

    + */ @JsonSetter(value = "start_at", nulls = Nulls.SKIP) public Builder startAt(Optional startAt) { this.startAt = startAt; @@ -304,6 +322,9 @@ public Builder startAt(OffsetDateTime startAt) { return this; } + /** + *

    When the interview was ended.

    + */ @JsonSetter(value = "end_at", nulls = Nulls.SKIP) public Builder endAt(Optional endAt) { this.endAt = endAt; @@ -315,13 +336,21 @@ public Builder endAt(OffsetDateTime endAt) { return this; } + /** + *

    The interview's status.

    + *
      + *
    • SCHEDULED - SCHEDULED
    • + *
    • AWAITING_FEEDBACK - AWAITING_FEEDBACK
    • + *
    • COMPLETE - COMPLETE
    • + *
    + */ @JsonSetter(value = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { + public Builder status(Optional status) { this.status = status; return this; } - public Builder status(ScheduledInterviewStatusEnum status) { + public Builder status(ScheduledInterviewRequestStatus status) { this.status = Optional.ofNullable(status); return this; } diff --git a/src/main/java/com/merge/api/ats/types/ScheduledInterviewRequestStatus.java b/src/main/java/com/merge/api/ats/types/ScheduledInterviewRequestStatus.java new file mode 100644 index 000000000..d410a8d84 --- /dev/null +++ b/src/main/java/com/merge/api/ats/types/ScheduledInterviewRequestStatus.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ats.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = ScheduledInterviewRequestStatus.Deserializer.class) +public final class ScheduledInterviewRequestStatus { + private final Object value; + + private final int type; + + private ScheduledInterviewRequestStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((ScheduledInterviewStatusEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ScheduledInterviewRequestStatus && equalTo((ScheduledInterviewRequestStatus) other); + } + + private boolean equalTo(ScheduledInterviewRequestStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static ScheduledInterviewRequestStatus of(ScheduledInterviewStatusEnum value) { + return new ScheduledInterviewRequestStatus(value, 0); + } + + public static ScheduledInterviewRequestStatus of(String value) { + return new ScheduledInterviewRequestStatus(value, 1); + } + + public interface Visitor { + T visit(ScheduledInterviewStatusEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(ScheduledInterviewRequestStatus.class); + } + + @java.lang.Override + public ScheduledInterviewRequestStatus deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, ScheduledInterviewStatusEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ats/types/ScheduledInterviewStatus.java b/src/main/java/com/merge/api/ats/types/ScheduledInterviewStatus.java new file mode 100644 index 000000000..446bc5974 --- /dev/null +++ b/src/main/java/com/merge/api/ats/types/ScheduledInterviewStatus.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ats.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = ScheduledInterviewStatus.Deserializer.class) +public final class ScheduledInterviewStatus { + private final Object value; + + private final int type; + + private ScheduledInterviewStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((ScheduledInterviewStatusEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ScheduledInterviewStatus && equalTo((ScheduledInterviewStatus) other); + } + + private boolean equalTo(ScheduledInterviewStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static ScheduledInterviewStatus of(ScheduledInterviewStatusEnum value) { + return new ScheduledInterviewStatus(value, 0); + } + + public static ScheduledInterviewStatus of(String value) { + return new ScheduledInterviewStatus(value, 1); + } + + public interface Visitor { + T visit(ScheduledInterviewStatusEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(ScheduledInterviewStatus.class); + } + + @java.lang.Override + public ScheduledInterviewStatus deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, ScheduledInterviewStatusEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ats/types/Scorecard.java b/src/main/java/com/merge/api/ats/types/Scorecard.java index 42c3a4c63..ebfae7a33 100644 --- a/src/main/java/com/merge/api/ats/types/Scorecard.java +++ b/src/main/java/com/merge/api/ats/types/Scorecard.java @@ -41,7 +41,7 @@ public final class Scorecard { private final Optional submittedAt; - private final Optional overallRecommendation; + private final Optional overallRecommendation; private final Optional remoteWasDeleted; @@ -61,7 +61,7 @@ private Scorecard( Optional interviewer, Optional remoteCreatedAt, Optional submittedAt, - Optional overallRecommendation, + Optional overallRecommendation, Optional remoteWasDeleted, Optional> fieldMappings, Optional> remoteData, @@ -162,7 +162,7 @@ public Optional getSubmittedAt() { * */ @JsonProperty("overall_recommendation") - public Optional getOverallRecommendation() { + public Optional getOverallRecommendation() { return overallRecommendation; } @@ -258,7 +258,7 @@ public static final class Builder { private Optional submittedAt = Optional.empty(); - private Optional overallRecommendation = Optional.empty(); + private Optional overallRecommendation = Optional.empty(); private Optional remoteWasDeleted = Optional.empty(); @@ -299,6 +299,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -310,6 +313,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -321,6 +327,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -332,6 +341,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The application being scored.

    + */ @JsonSetter(value = "application", nulls = Nulls.SKIP) public Builder application(Optional application) { this.application = application; @@ -343,6 +355,9 @@ public Builder application(ScorecardApplication application) { return this; } + /** + *

    The interview being scored.

    + */ @JsonSetter(value = "interview", nulls = Nulls.SKIP) public Builder interview(Optional interview) { this.interview = interview; @@ -354,6 +369,9 @@ public Builder interview(ScorecardInterview interview) { return this; } + /** + *

    The interviewer doing the scoring.

    + */ @JsonSetter(value = "interviewer", nulls = Nulls.SKIP) public Builder interviewer(Optional interviewer) { this.interviewer = interviewer; @@ -365,6 +383,9 @@ public Builder interviewer(ScorecardInterviewer interviewer) { return this; } + /** + *

    When the third party's scorecard was created.

    + */ @JsonSetter(value = "remote_created_at", nulls = Nulls.SKIP) public Builder remoteCreatedAt(Optional remoteCreatedAt) { this.remoteCreatedAt = remoteCreatedAt; @@ -376,6 +397,9 @@ public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { return this; } + /** + *

    When the scorecard was submitted.

    + */ @JsonSetter(value = "submitted_at", nulls = Nulls.SKIP) public Builder submittedAt(Optional submittedAt) { this.submittedAt = submittedAt; @@ -387,17 +411,30 @@ public Builder submittedAt(OffsetDateTime submittedAt) { return this; } + /** + *

    The inteviewer's recommendation.

    + *
      + *
    • DEFINITELY_NO - DEFINITELY_NO
    • + *
    • NO - NO
    • + *
    • YES - YES
    • + *
    • STRONG_YES - STRONG_YES
    • + *
    • NO_DECISION - NO_DECISION
    • + *
    + */ @JsonSetter(value = "overall_recommendation", nulls = Nulls.SKIP) - public Builder overallRecommendation(Optional overallRecommendation) { + public Builder overallRecommendation(Optional overallRecommendation) { this.overallRecommendation = overallRecommendation; return this; } - public Builder overallRecommendation(OverallRecommendationEnum overallRecommendation) { + public Builder overallRecommendation(ScorecardOverallRecommendation overallRecommendation) { this.overallRecommendation = Optional.ofNullable(overallRecommendation); return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/ats/types/ScorecardOverallRecommendation.java b/src/main/java/com/merge/api/ats/types/ScorecardOverallRecommendation.java new file mode 100644 index 000000000..5630df7dc --- /dev/null +++ b/src/main/java/com/merge/api/ats/types/ScorecardOverallRecommendation.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ats.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = ScorecardOverallRecommendation.Deserializer.class) +public final class ScorecardOverallRecommendation { + private final Object value; + + private final int type; + + private ScorecardOverallRecommendation(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((OverallRecommendationEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ScorecardOverallRecommendation && equalTo((ScorecardOverallRecommendation) other); + } + + private boolean equalTo(ScorecardOverallRecommendation other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static ScorecardOverallRecommendation of(OverallRecommendationEnum value) { + return new ScorecardOverallRecommendation(value, 0); + } + + public static ScorecardOverallRecommendation of(String value) { + return new ScorecardOverallRecommendation(value, 1); + } + + public interface Visitor { + T visit(OverallRecommendationEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(ScorecardOverallRecommendation.class); + } + + @java.lang.Override + public ScorecardOverallRecommendation deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, OverallRecommendationEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ats/types/ScorecardsListRequest.java b/src/main/java/com/merge/api/ats/types/ScorecardsListRequest.java index 4eb0e3bb4..f517e5cee 100644 --- a/src/main/java/com/merge/api/ats/types/ScorecardsListRequest.java +++ b/src/main/java/com/merge/api/ats/types/ScorecardsListRequest.java @@ -341,6 +341,9 @@ public Builder from(ScorecardsListRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -357,6 +360,9 @@ public Builder expand(ScorecardsListRequestExpandItem expand) { return this; } + /** + *

    If provided, will only return scorecards for this application.

    + */ @JsonSetter(value = "application_id", nulls = Nulls.SKIP) public Builder applicationId(Optional applicationId) { this.applicationId = applicationId; @@ -368,6 +374,9 @@ public Builder applicationId(String applicationId) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -379,6 +388,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -390,6 +402,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -401,6 +416,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -412,6 +430,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -423,6 +444,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -434,6 +458,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, will only return scorecards for this interview.

    + */ @JsonSetter(value = "interview_id", nulls = Nulls.SKIP) public Builder interviewId(Optional interviewId) { this.interviewId = interviewId; @@ -445,6 +472,9 @@ public Builder interviewId(String interviewId) { return this; } + /** + *

    If provided, will only return scorecards for this interviewer.

    + */ @JsonSetter(value = "interviewer_id", nulls = Nulls.SKIP) public Builder interviewerId(Optional interviewerId) { this.interviewerId = interviewerId; @@ -456,6 +486,9 @@ public Builder interviewerId(String interviewerId) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -467,6 +500,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -478,6 +514,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -489,6 +528,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    Deprecated. Use show_enum_origins.

    + */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -500,6 +542,9 @@ public Builder remoteFields(String remoteFields) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -511,6 +556,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    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

    + */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; diff --git a/src/main/java/com/merge/api/ats/types/ScorecardsRetrieveRequest.java b/src/main/java/com/merge/api/ats/types/ScorecardsRetrieveRequest.java index b011805ce..9bd2c1fac 100644 --- a/src/main/java/com/merge/api/ats/types/ScorecardsRetrieveRequest.java +++ b/src/main/java/com/merge/api/ats/types/ScorecardsRetrieveRequest.java @@ -149,6 +149,9 @@ public Builder from(ScorecardsRetrieveRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -165,6 +168,9 @@ public Builder expand(ScorecardsRetrieveRequestExpandItem expand) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -176,6 +182,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -187,6 +196,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    Deprecated. Use show_enum_origins.

    + */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -198,6 +210,9 @@ public Builder remoteFields(String remoteFields) { return this; } + /** + *

    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

    + */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; diff --git a/src/main/java/com/merge/api/ats/types/ScreeningQuestion.java b/src/main/java/com/merge/api/ats/types/ScreeningQuestion.java index 1a16baf8f..7b6b7c60b 100644 --- a/src/main/java/com/merge/api/ats/types/ScreeningQuestion.java +++ b/src/main/java/com/merge/api/ats/types/ScreeningQuestion.java @@ -37,7 +37,7 @@ public final class ScreeningQuestion { private final Optional title; - private final Optional type; + private final Optional type; private final Optional required; @@ -55,7 +55,7 @@ private ScreeningQuestion( Optional job, Optional description, Optional title, - Optional type, + Optional type, Optional required, Optional> options, Optional remoteWasDeleted, @@ -141,7 +141,7 @@ public Optional getTitle() { * */ @JsonProperty("type") - public Optional getType() { + public Optional getType() { return type; } @@ -232,7 +232,7 @@ public static final class Builder { private Optional title = Optional.empty(); - private Optional type = Optional.empty(); + private Optional type = Optional.empty(); private Optional required = Optional.empty(); @@ -271,6 +271,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -282,6 +285,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -293,6 +299,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -304,6 +313,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The job associated with the screening question.

    + */ @JsonSetter(value = "job", nulls = Nulls.SKIP) public Builder job(Optional job) { this.job = job; @@ -315,6 +327,9 @@ public Builder job(ScreeningQuestionJob job) { return this; } + /** + *

    The description of the screening question

    + */ @JsonSetter(value = "description", nulls = Nulls.SKIP) public Builder description(Optional description) { this.description = description; @@ -326,6 +341,9 @@ public Builder description(String description) { return this; } + /** + *

    The title of the screening question

    + */ @JsonSetter(value = "title", nulls = Nulls.SKIP) public Builder title(Optional title) { this.title = title; @@ -337,17 +355,33 @@ public Builder title(String title) { return this; } + /** + *

    The data type for the screening question.

    + *
      + *
    • DATE - DATE
    • + *
    • FILE - FILE
    • + *
    • SINGLE_SELECT - SINGLE_SELECT
    • + *
    • MULTI_SELECT - MULTI_SELECT
    • + *
    • SINGLE_LINE_TEXT - SINGLE_LINE_TEXT
    • + *
    • MULTI_LINE_TEXT - MULTI_LINE_TEXT
    • + *
    • NUMERIC - NUMERIC
    • + *
    • BOOLEAN - BOOLEAN
    • + *
    + */ @JsonSetter(value = "type", nulls = Nulls.SKIP) - public Builder type(Optional type) { + public Builder type(Optional type) { this.type = type; return this; } - public Builder type(ScreeningQuestionTypeEnum type) { + public Builder type(ScreeningQuestionType type) { this.type = Optional.ofNullable(type); return this; } + /** + *

    Whether or not the screening question is required.

    + */ @JsonSetter(value = "required", nulls = Nulls.SKIP) public Builder required(Optional required) { this.required = required; @@ -370,6 +404,9 @@ public Builder options(List options) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/ats/types/ScreeningQuestionAnswer.java b/src/main/java/com/merge/api/ats/types/ScreeningQuestionAnswer.java index 570692942..084e4f839 100644 --- a/src/main/java/com/merge/api/ats/types/ScreeningQuestionAnswer.java +++ b/src/main/java/com/merge/api/ats/types/ScreeningQuestionAnswer.java @@ -194,6 +194,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -205,6 +208,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -216,6 +222,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -227,6 +236,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The screening question associated with the candidate’s answer. To determine the data type of the answer, you can expand on the screening question by adding screening_question_answers.question to the expand query parameter.

    + */ @JsonSetter(value = "question", nulls = Nulls.SKIP) public Builder question(Optional question) { this.question = question; @@ -238,6 +250,9 @@ public Builder question(ScreeningQuestionAnswerQuestion question) { return this; } + /** + *

    The candidate’s response to the screening question.

    + */ @JsonSetter(value = "answer", nulls = Nulls.SKIP) public Builder answer(Optional answer) { this.answer = answer; @@ -249,6 +264,9 @@ public Builder answer(String answer) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/ats/types/ScreeningQuestionAnswerRequest.java b/src/main/java/com/merge/api/ats/types/ScreeningQuestionAnswerRequest.java index b5fb6d210..0cccf180d 100644 --- a/src/main/java/com/merge/api/ats/types/ScreeningQuestionAnswerRequest.java +++ b/src/main/java/com/merge/api/ats/types/ScreeningQuestionAnswerRequest.java @@ -142,6 +142,9 @@ public Builder from(ScreeningQuestionAnswerRequest other) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -153,6 +156,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The screening question associated with the candidate’s answer. To determine the data type of the answer, you can expand on the screening question by adding screening_question_answers.question to the expand query parameter.

    + */ @JsonSetter(value = "question", nulls = Nulls.SKIP) public Builder question(Optional question) { this.question = question; @@ -164,6 +170,9 @@ public Builder question(ScreeningQuestionAnswerRequestQuestion question) { return this; } + /** + *

    The candidate’s response to the screening question.

    + */ @JsonSetter(value = "answer", nulls = Nulls.SKIP) public Builder answer(Optional answer) { this.answer = answer; diff --git a/src/main/java/com/merge/api/ats/types/ScreeningQuestionOption.java b/src/main/java/com/merge/api/ats/types/ScreeningQuestionOption.java index d6288f79c..bbea353ae 100644 --- a/src/main/java/com/merge/api/ats/types/ScreeningQuestionOption.java +++ b/src/main/java/com/merge/api/ats/types/ScreeningQuestionOption.java @@ -171,6 +171,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -182,6 +185,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -193,6 +199,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -204,6 +213,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    Available response options

    + */ @JsonSetter(value = "label", nulls = Nulls.SKIP) public Builder label(Optional label) { this.label = label; @@ -215,6 +227,9 @@ public Builder label(String label) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/ats/types/ScreeningQuestionType.java b/src/main/java/com/merge/api/ats/types/ScreeningQuestionType.java new file mode 100644 index 000000000..8c710d304 --- /dev/null +++ b/src/main/java/com/merge/api/ats/types/ScreeningQuestionType.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ats.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = ScreeningQuestionType.Deserializer.class) +public final class ScreeningQuestionType { + private final Object value; + + private final int type; + + private ScreeningQuestionType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((ScreeningQuestionTypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ScreeningQuestionType && equalTo((ScreeningQuestionType) other); + } + + private boolean equalTo(ScreeningQuestionType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static ScreeningQuestionType of(ScreeningQuestionTypeEnum value) { + return new ScreeningQuestionType(value, 0); + } + + public static ScreeningQuestionType of(String value) { + return new ScreeningQuestionType(value, 1); + } + + public interface Visitor { + T visit(ScreeningQuestionTypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(ScreeningQuestionType.class); + } + + @java.lang.Override + public ScreeningQuestionType deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, ScreeningQuestionTypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ats/types/SyncStatus.java b/src/main/java/com/merge/api/ats/types/SyncStatus.java index 386878307..e08a41eec 100644 --- a/src/main/java/com/merge/api/ats/types/SyncStatus.java +++ b/src/main/java/com/merge/api/ats/types/SyncStatus.java @@ -30,11 +30,11 @@ public final class SyncStatus { private final Optional nextSyncStart; - private final Optional lastSyncResult; + private final Optional lastSyncResult; private final Optional lastSyncFinished; - private final StatusFd5Enum status; + private final SyncStatusStatus status; private final boolean isInitialSync; @@ -47,9 +47,9 @@ private SyncStatus( String modelId, Optional lastSyncStart, Optional nextSyncStart, - Optional lastSyncResult, + Optional lastSyncResult, Optional lastSyncFinished, - StatusFd5Enum status, + SyncStatusStatus status, boolean isInitialSync, Optional selectiveSyncConfigurationsUsage, Map additionalProperties) { @@ -86,7 +86,7 @@ public Optional getNextSyncStart() { } @JsonProperty("last_sync_result") - public Optional getLastSyncResult() { + public Optional getLastSyncResult() { return lastSyncResult; } @@ -96,7 +96,7 @@ public Optional getLastSyncFinished() { } @JsonProperty("status") - public StatusFd5Enum getStatus() { + public SyncStatusStatus getStatus() { return status; } @@ -167,7 +167,7 @@ public interface ModelIdStage { } public interface StatusStage { - IsInitialSyncStage status(@NotNull StatusFd5Enum status); + IsInitialSyncStage status(@NotNull SyncStatusStatus status); } public interface IsInitialSyncStage { @@ -185,9 +185,9 @@ public interface _FinalStage { _FinalStage nextSyncStart(OffsetDateTime nextSyncStart); - _FinalStage lastSyncResult(Optional lastSyncResult); + _FinalStage lastSyncResult(Optional lastSyncResult); - _FinalStage lastSyncResult(LastSyncResultEnum lastSyncResult); + _FinalStage lastSyncResult(SyncStatusLastSyncResult lastSyncResult); _FinalStage lastSyncFinished(Optional lastSyncFinished); @@ -207,7 +207,7 @@ public static final class Builder private String modelId; - private StatusFd5Enum status; + private SyncStatusStatus status; private boolean isInitialSync; @@ -215,7 +215,7 @@ public static final class Builder private Optional lastSyncFinished = Optional.empty(); - private Optional lastSyncResult = Optional.empty(); + private Optional lastSyncResult = Optional.empty(); private Optional nextSyncStart = Optional.empty(); @@ -256,7 +256,7 @@ public StatusStage modelId(@NotNull String modelId) { @java.lang.Override @JsonSetter("status") - public IsInitialSyncStage status(@NotNull StatusFd5Enum status) { + public IsInitialSyncStage status(@NotNull SyncStatusStatus status) { this.status = status; return this; } @@ -297,14 +297,14 @@ public _FinalStage lastSyncFinished(Optional lastSyncFinished) { } @java.lang.Override - public _FinalStage lastSyncResult(LastSyncResultEnum lastSyncResult) { + public _FinalStage lastSyncResult(SyncStatusLastSyncResult lastSyncResult) { this.lastSyncResult = Optional.ofNullable(lastSyncResult); return this; } @java.lang.Override @JsonSetter(value = "last_sync_result", nulls = Nulls.SKIP) - public _FinalStage lastSyncResult(Optional lastSyncResult) { + public _FinalStage lastSyncResult(Optional lastSyncResult) { this.lastSyncResult = lastSyncResult; return this; } diff --git a/src/main/java/com/merge/api/ats/types/SyncStatusLastSyncResult.java b/src/main/java/com/merge/api/ats/types/SyncStatusLastSyncResult.java new file mode 100644 index 000000000..15d84418c --- /dev/null +++ b/src/main/java/com/merge/api/ats/types/SyncStatusLastSyncResult.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ats.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = SyncStatusLastSyncResult.Deserializer.class) +public final class SyncStatusLastSyncResult { + private final Object value; + + private final int type; + + private SyncStatusLastSyncResult(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((LastSyncResultEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SyncStatusLastSyncResult && equalTo((SyncStatusLastSyncResult) other); + } + + private boolean equalTo(SyncStatusLastSyncResult other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static SyncStatusLastSyncResult of(LastSyncResultEnum value) { + return new SyncStatusLastSyncResult(value, 0); + } + + public static SyncStatusLastSyncResult of(String value) { + return new SyncStatusLastSyncResult(value, 1); + } + + public interface Visitor { + T visit(LastSyncResultEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(SyncStatusLastSyncResult.class); + } + + @java.lang.Override + public SyncStatusLastSyncResult deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, LastSyncResultEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ats/types/SyncStatusListRequest.java b/src/main/java/com/merge/api/ats/types/SyncStatusListRequest.java index ec23b632b..118fb03f0 100644 --- a/src/main/java/com/merge/api/ats/types/SyncStatusListRequest.java +++ b/src/main/java/com/merge/api/ats/types/SyncStatusListRequest.java @@ -95,6 +95,9 @@ public Builder from(SyncStatusListRequest other) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -106,6 +109,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; diff --git a/src/main/java/com/merge/api/ats/types/SyncStatusStatus.java b/src/main/java/com/merge/api/ats/types/SyncStatusStatus.java new file mode 100644 index 000000000..5409e32b1 --- /dev/null +++ b/src/main/java/com/merge/api/ats/types/SyncStatusStatus.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ats.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = SyncStatusStatus.Deserializer.class) +public final class SyncStatusStatus { + private final Object value; + + private final int type; + + private SyncStatusStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((StatusFd5Enum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SyncStatusStatus && equalTo((SyncStatusStatus) other); + } + + private boolean equalTo(SyncStatusStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static SyncStatusStatus of(StatusFd5Enum value) { + return new SyncStatusStatus(value, 0); + } + + public static SyncStatusStatus of(String value) { + return new SyncStatusStatus(value, 1); + } + + public interface Visitor { + T visit(StatusFd5Enum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(SyncStatusStatus.class); + } + + @java.lang.Override + public SyncStatusStatus deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, StatusFd5Enum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ats/types/Tag.java b/src/main/java/com/merge/api/ats/types/Tag.java index 75a7bca5e..84ec83f79 100644 --- a/src/main/java/com/merge/api/ats/types/Tag.java +++ b/src/main/java/com/merge/api/ats/types/Tag.java @@ -182,6 +182,9 @@ public Builder from(Tag other) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -193,6 +196,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -204,6 +210,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -215,6 +224,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The tag's name.

    + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -226,6 +238,9 @@ public Builder name(String name) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/ats/types/TagsListRequest.java b/src/main/java/com/merge/api/ats/types/TagsListRequest.java index db5f04315..4c5e68590 100644 --- a/src/main/java/com/merge/api/ats/types/TagsListRequest.java +++ b/src/main/java/com/merge/api/ats/types/TagsListRequest.java @@ -237,6 +237,9 @@ public Builder from(TagsListRequest other) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -248,6 +251,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -259,6 +265,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -270,6 +279,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -281,6 +293,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -292,6 +307,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -303,6 +321,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -314,6 +335,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -325,6 +349,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -336,6 +363,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; diff --git a/src/main/java/com/merge/api/ats/types/UpdateApplicationStageRequest.java b/src/main/java/com/merge/api/ats/types/UpdateApplicationStageRequest.java index 7430fc157..2a3a116ee 100644 --- a/src/main/java/com/merge/api/ats/types/UpdateApplicationStageRequest.java +++ b/src/main/java/com/merge/api/ats/types/UpdateApplicationStageRequest.java @@ -127,6 +127,9 @@ public Builder from(UpdateApplicationStageRequest other) { return this; } + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ @JsonSetter(value = "is_debug_mode", nulls = Nulls.SKIP) public Builder isDebugMode(Optional isDebugMode) { this.isDebugMode = isDebugMode; @@ -138,6 +141,9 @@ public Builder isDebugMode(Boolean isDebugMode) { return this; } + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ @JsonSetter(value = "run_async", nulls = Nulls.SKIP) public Builder runAsync(Optional runAsync) { this.runAsync = runAsync; @@ -149,6 +155,9 @@ public Builder runAsync(Boolean runAsync) { return this; } + /** + *

    The interview stage to move the application to.

    + */ @JsonSetter(value = "job_interview_stage", nulls = Nulls.SKIP) public Builder jobInterviewStage(Optional jobInterviewStage) { this.jobInterviewStage = jobInterviewStage; diff --git a/src/main/java/com/merge/api/ats/types/Url.java b/src/main/java/com/merge/api/ats/types/Url.java index 90eac4536..be4aff1d8 100644 --- a/src/main/java/com/merge/api/ats/types/Url.java +++ b/src/main/java/com/merge/api/ats/types/Url.java @@ -27,7 +27,7 @@ public final class Url { private final Optional value; - private final Optional urlType; + private final Optional urlType; private final Optional remoteWasDeleted; @@ -37,7 +37,7 @@ private Url( Optional createdAt, Optional modifiedAt, Optional value, - Optional urlType, + Optional urlType, Optional remoteWasDeleted, Map additionalProperties) { this.createdAt = createdAt; @@ -85,7 +85,7 @@ public Optional getValue() { * */ @JsonProperty("url_type") - public Optional getUrlType() { + public Optional getUrlType() { return urlType; } @@ -138,7 +138,7 @@ public static final class Builder { private Optional value = Optional.empty(); - private Optional urlType = Optional.empty(); + private Optional urlType = Optional.empty(); private Optional remoteWasDeleted = Optional.empty(); @@ -156,6 +156,9 @@ public Builder from(Url other) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -167,6 +170,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -178,6 +184,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The site's url.

    + */ @JsonSetter(value = "value", nulls = Nulls.SKIP) public Builder value(Optional value) { this.value = value; @@ -189,17 +198,32 @@ public Builder value(String value) { return this; } + /** + *

    The type of site.

    + *
      + *
    • PERSONAL - PERSONAL
    • + *
    • COMPANY - COMPANY
    • + *
    • PORTFOLIO - PORTFOLIO
    • + *
    • BLOG - BLOG
    • + *
    • SOCIAL_MEDIA - SOCIAL_MEDIA
    • + *
    • OTHER - OTHER
    • + *
    • JOB_POSTING - JOB_POSTING
    • + *
    + */ @JsonSetter(value = "url_type", nulls = Nulls.SKIP) - public Builder urlType(Optional urlType) { + public Builder urlType(Optional urlType) { this.urlType = urlType; return this; } - public Builder urlType(UrlTypeEnum urlType) { + public Builder urlType(UrlUrlType urlType) { this.urlType = Optional.ofNullable(urlType); return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/ats/types/UrlRequest.java b/src/main/java/com/merge/api/ats/types/UrlRequest.java index 443403e68..213721eba 100644 --- a/src/main/java/com/merge/api/ats/types/UrlRequest.java +++ b/src/main/java/com/merge/api/ats/types/UrlRequest.java @@ -23,7 +23,7 @@ public final class UrlRequest { private final Optional value; - private final Optional urlType; + private final Optional urlType; private final Optional> integrationParams; @@ -33,7 +33,7 @@ public final class UrlRequest { private UrlRequest( Optional value, - Optional urlType, + Optional urlType, Optional> integrationParams, Optional> linkedAccountParams, Map additionalProperties) { @@ -65,7 +65,7 @@ public Optional getValue() { * */ @JsonProperty("url_type") - public Optional getUrlType() { + public Optional getUrlType() { return urlType; } @@ -115,7 +115,7 @@ public static Builder builder() { public static final class Builder { private Optional value = Optional.empty(); - private Optional urlType = Optional.empty(); + private Optional urlType = Optional.empty(); private Optional> integrationParams = Optional.empty(); @@ -134,6 +134,9 @@ public Builder from(UrlRequest other) { return this; } + /** + *

    The site's url.

    + */ @JsonSetter(value = "value", nulls = Nulls.SKIP) public Builder value(Optional value) { this.value = value; @@ -145,13 +148,25 @@ public Builder value(String value) { return this; } + /** + *

    The type of site.

    + *
      + *
    • PERSONAL - PERSONAL
    • + *
    • COMPANY - COMPANY
    • + *
    • PORTFOLIO - PORTFOLIO
    • + *
    • BLOG - BLOG
    • + *
    • SOCIAL_MEDIA - SOCIAL_MEDIA
    • + *
    • OTHER - OTHER
    • + *
    • JOB_POSTING - JOB_POSTING
    • + *
    + */ @JsonSetter(value = "url_type", nulls = Nulls.SKIP) - public Builder urlType(Optional urlType) { + public Builder urlType(Optional urlType) { this.urlType = urlType; return this; } - public Builder urlType(UrlTypeEnum urlType) { + public Builder urlType(UrlRequestUrlType urlType) { this.urlType = Optional.ofNullable(urlType); return this; } diff --git a/src/main/java/com/merge/api/ats/types/UrlRequestUrlType.java b/src/main/java/com/merge/api/ats/types/UrlRequestUrlType.java new file mode 100644 index 000000000..a963cec78 --- /dev/null +++ b/src/main/java/com/merge/api/ats/types/UrlRequestUrlType.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ats.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = UrlRequestUrlType.Deserializer.class) +public final class UrlRequestUrlType { + private final Object value; + + private final int type; + + private UrlRequestUrlType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((UrlTypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof UrlRequestUrlType && equalTo((UrlRequestUrlType) other); + } + + private boolean equalTo(UrlRequestUrlType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static UrlRequestUrlType of(UrlTypeEnum value) { + return new UrlRequestUrlType(value, 0); + } + + public static UrlRequestUrlType of(String value) { + return new UrlRequestUrlType(value, 1); + } + + public interface Visitor { + T visit(UrlTypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(UrlRequestUrlType.class); + } + + @java.lang.Override + public UrlRequestUrlType deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, UrlTypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ats/types/UrlUrlType.java b/src/main/java/com/merge/api/ats/types/UrlUrlType.java new file mode 100644 index 000000000..6a7681b1d --- /dev/null +++ b/src/main/java/com/merge/api/ats/types/UrlUrlType.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ats.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = UrlUrlType.Deserializer.class) +public final class UrlUrlType { + private final Object value; + + private final int type; + + private UrlUrlType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((UrlTypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof UrlUrlType && equalTo((UrlUrlType) other); + } + + private boolean equalTo(UrlUrlType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static UrlUrlType of(UrlTypeEnum value) { + return new UrlUrlType(value, 0); + } + + public static UrlUrlType of(String value) { + return new UrlUrlType(value, 1); + } + + public interface Visitor { + T visit(UrlTypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(UrlUrlType.class); + } + + @java.lang.Override + public UrlUrlType deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, UrlTypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ats/types/UsersListRequest.java b/src/main/java/com/merge/api/ats/types/UsersListRequest.java index 1e3bf2a1c..e26e628e1 100644 --- a/src/main/java/com/merge/api/ats/types/UsersListRequest.java +++ b/src/main/java/com/merge/api/ats/types/UsersListRequest.java @@ -288,6 +288,9 @@ public Builder from(UsersListRequest other) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -299,6 +302,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -310,6 +316,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -321,6 +330,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    If provided, will only return remote users with the given email address

    + */ @JsonSetter(value = "email", nulls = Nulls.SKIP) public Builder email(Optional email) { this.email = email; @@ -332,6 +344,9 @@ public Builder email(String email) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -343,6 +358,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -354,6 +372,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -365,6 +386,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -376,6 +400,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -387,6 +414,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -398,6 +428,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    Deprecated. Use show_enum_origins.

    + */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -409,6 +442,9 @@ public Builder remoteFields(String remoteFields) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -420,6 +456,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    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

    + */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; diff --git a/src/main/java/com/merge/api/ats/types/UsersRetrieveRequest.java b/src/main/java/com/merge/api/ats/types/UsersRetrieveRequest.java index 13f850c3c..e0d0d02e0 100644 --- a/src/main/java/com/merge/api/ats/types/UsersRetrieveRequest.java +++ b/src/main/java/com/merge/api/ats/types/UsersRetrieveRequest.java @@ -130,6 +130,9 @@ public Builder from(UsersRetrieveRequest other) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -141,6 +144,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -152,6 +158,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    Deprecated. Use show_enum_origins.

    + */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -163,6 +172,9 @@ public Builder remoteFields(String remoteFields) { return this; } + /** + *

    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

    + */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; diff --git a/src/main/java/com/merge/api/core/ClientOptions.java b/src/main/java/com/merge/api/core/ClientOptions.java index 448cbf418..d33024d17 100644 --- a/src/main/java/com/merge/api/core/ClientOptions.java +++ b/src/main/java/com/merge/api/core/ClientOptions.java @@ -32,10 +32,10 @@ private ClientOptions( this.headers.putAll(headers); this.headers.putAll(new HashMap() { { - put("User-Agent", "dev.merge:merge-java-client/2.0.0"); + put("User-Agent", "dev.merge:merge-java-client/3.0.0"); put("X-Fern-Language", "JAVA"); put("X-Fern-SDK-Name", "com.merge.fern:api-sdk"); - put("X-Fern-SDK-Version", "2.0.0"); + put("X-Fern-SDK-Version", "3.0.0"); } }); this.headerSuppliers = headerSuppliers; diff --git a/src/main/java/com/merge/api/core/Environment.java b/src/main/java/com/merge/api/core/Environment.java index f5fd7e618..2703cf28e 100644 --- a/src/main/java/com/merge/api/core/Environment.java +++ b/src/main/java/com/merge/api/core/Environment.java @@ -6,13 +6,21 @@ public final class Environment { public static final Environment PRODUCTION = new Environment("https://api.merge.dev/api"); - private final String api; + public static final Environment PRODUCTION_EU = new Environment("https://api-eu.merge.dev/api"); - Environment(String api) { - this.api = api; + public static final Environment SANDBOX = new Environment("https://api-sandbox.merge.dev/api"); + + private final String url; + + private Environment(String url) { + this.url = url; + } + + public String getUrl() { + return this.url; } - public String getApiURL() { - return this.api; + public static Environment custom(String url) { + return new Environment(url); } } diff --git a/src/main/java/com/merge/api/crm/AsyncRawAccountDetailsClient.java b/src/main/java/com/merge/api/crm/AsyncRawAccountDetailsClient.java index 5ef83e046..37b009c2d 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawAccountDetailsClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawAccountDetailsClient.java @@ -40,7 +40,7 @@ public CompletableFuture> retrieve() { * Get details for a linked account. */ public CompletableFuture> retrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/account-details") .build(); diff --git a/src/main/java/com/merge/api/crm/AsyncRawAccountTokenClient.java b/src/main/java/com/merge/api/crm/AsyncRawAccountTokenClient.java index eaa5df9b0..e40b22f9a 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawAccountTokenClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawAccountTokenClient.java @@ -41,7 +41,7 @@ public CompletableFuture> retrieve(String pub */ public CompletableFuture> retrieve( String publicToken, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/account-token") .addPathSegment(publicToken) diff --git a/src/main/java/com/merge/api/crm/AsyncRawAccountsClient.java b/src/main/java/com/merge/api/crm/AsyncRawAccountsClient.java index 845868147..ff2a48e68 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawAccountsClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawAccountsClient.java @@ -68,7 +68,7 @@ public CompletableFuture>> list */ public CompletableFuture>> list( AccountsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/accounts"); if (request.getCreatedAfter().isPresent()) { @@ -212,7 +212,7 @@ public CompletableFuture> create(CrmAcc */ public CompletableFuture> create( CrmAccountEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/accounts"); if (request.getIsDebugMode().isPresent()) { @@ -293,7 +293,7 @@ public CompletableFuture> retrieve(String id, Acco */ public CompletableFuture> retrieve( String id, AccountsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/accounts") .addPathSegment(id); @@ -376,7 +376,7 @@ public CompletableFuture> partialUpdate */ public CompletableFuture> partialUpdate( String id, PatchedCrmAccountEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/accounts") .addPathSegment(id); @@ -451,7 +451,7 @@ public CompletableFuture> metaPatchRetrieve(S */ public CompletableFuture> metaPatchRetrieve( String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/accounts/meta/patch") .addPathSegment(id) @@ -509,7 +509,7 @@ public CompletableFuture> metaPostRetrieve() * Returns metadata for CRMAccount POSTs. */ public CompletableFuture> metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/accounts/meta/post") .build(); @@ -576,7 +576,7 @@ public CompletableFuture>> remoteFieldClassesList( AccountsRemoteFieldClassesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/accounts/remote-field-classes"); if (request.getCursor().isPresent()) { @@ -618,6 +618,10 @@ public CompletableFuture> customObjectClas String id, CustomObjectClassesAssociationTypesRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/custom-object-classes") .addPathSegment(customObjectClassId) @@ -382,7 +382,7 @@ public CompletableFuture> customObjectClasses */ public CompletableFuture> customObjectClassesAssociationTypesMetaPostRetrieve( String customObjectClassId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/custom-object-classes") .addPathSegment(customObjectClassId) diff --git a/src/main/java/com/merge/api/crm/AsyncRawAssociationsClient.java b/src/main/java/com/merge/api/crm/AsyncRawAssociationsClient.java index 5054c1b72..c461c5739 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawAssociationsClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawAssociationsClient.java @@ -71,7 +71,7 @@ public AsyncRawAssociationsClient(ClientOptions clientOptions) { String objectId, CustomObjectClassesCustomObjectsAssociationsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/custom-object-classes") .addPathSegment(customObjectClassId) @@ -245,7 +245,7 @@ public CompletableFuture> customObjectClassesC String targetObjectId, CustomObjectClassesCustomObjectsAssociationsUpdateRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/custom-object-classes") .addPathSegment(sourceClassId) diff --git a/src/main/java/com/merge/api/crm/AsyncRawAsyncPassthroughClient.java b/src/main/java/com/merge/api/crm/AsyncRawAsyncPassthroughClient.java index e2913bd32..2f177532d 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawAsyncPassthroughClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawAsyncPassthroughClient.java @@ -46,7 +46,7 @@ public CompletableFuture> create(D */ public CompletableFuture> create( DataPassthroughRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/async-passthrough") .build(); @@ -113,7 +113,7 @@ public CompletableFuture> */ public CompletableFuture> retrieve( String asyncPassthroughReceiptId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/async-passthrough") .addPathSegment(asyncPassthroughReceiptId) diff --git a/src/main/java/com/merge/api/crm/AsyncRawAuditTrailClient.java b/src/main/java/com/merge/api/crm/AsyncRawAuditTrailClient.java index 0282d2352..a06892e6c 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawAuditTrailClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawAuditTrailClient.java @@ -57,7 +57,7 @@ public CompletableFuture> */ public CompletableFuture>> list( AuditTrailListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/audit-trail"); if (request.getCursor().isPresent()) { diff --git a/src/main/java/com/merge/api/crm/AsyncRawAvailableActionsClient.java b/src/main/java/com/merge/api/crm/AsyncRawAvailableActionsClient.java index 9cb339768..28c02e1df 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawAvailableActionsClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawAvailableActionsClient.java @@ -40,7 +40,7 @@ public CompletableFuture> retrieve() { * Returns a list of models and actions available for an account. */ public CompletableFuture> retrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/available-actions") .build(); diff --git a/src/main/java/com/merge/api/crm/AsyncRawContactsClient.java b/src/main/java/com/merge/api/crm/AsyncRawContactsClient.java index 80725ee02..96e0e2bb2 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawContactsClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawContactsClient.java @@ -70,7 +70,7 @@ public CompletableFuture>> list */ public CompletableFuture>> list( ContactsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/contacts"); if (request.getAccountId().isPresent()) { @@ -218,7 +218,7 @@ public CompletableFuture> create(CrmCon */ public CompletableFuture> create( CrmContactEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/contacts"); if (request.getIsDebugMode().isPresent()) { @@ -299,7 +299,7 @@ public CompletableFuture> retrieve(String id, Cont */ public CompletableFuture> retrieve( String id, ContactsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/contacts") .addPathSegment(id); @@ -382,7 +382,7 @@ public CompletableFuture> partialUpdate */ public CompletableFuture> partialUpdate( String id, PatchedCrmContactEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/contacts") .addPathSegment(id); @@ -458,7 +458,7 @@ public CompletableFuture> ignoreCreate( */ public CompletableFuture> ignoreCreate( String modelId, IgnoreCommonModelRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/contacts/ignore") .addPathSegment(modelId) @@ -521,7 +521,7 @@ public CompletableFuture> metaPatchRetrieve(S */ public CompletableFuture> metaPatchRetrieve( String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/contacts/meta/patch") .addPathSegment(id) @@ -579,7 +579,7 @@ public CompletableFuture> metaPostRetrieve() * Returns metadata for CRMContact POSTs. */ public CompletableFuture> metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/contacts/meta/post") .build(); @@ -646,7 +646,7 @@ public CompletableFuture>> remoteFieldClassesList( ContactsRemoteFieldClassesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/contacts/remote-field-classes"); if (request.getCursor().isPresent()) { @@ -688,6 +688,10 @@ public CompletableFuture>> list( CustomObjectClassesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/custom-object-classes"); if (request.getCreatedAfter().isPresent()) { @@ -197,7 +197,7 @@ public CompletableFuture> retrieve( */ public CompletableFuture> retrieve( String id, CustomObjectClassesRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/custom-object-classes") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/crm/AsyncRawCustomObjectsClient.java b/src/main/java/com/merge/api/crm/AsyncRawCustomObjectsClient.java index aab5b23e5..0059f5d2a 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawCustomObjectsClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawCustomObjectsClient.java @@ -75,7 +75,7 @@ public AsyncRawCustomObjectsClient(ClientOptions clientOptions) { String customObjectClassId, CustomObjectClassesCustomObjectsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/custom-object-classes") .addPathSegment(customObjectClassId) @@ -212,7 +212,7 @@ public CompletableFuture> customOb */ public CompletableFuture> customObjectClassesCustomObjectsCreate( String customObjectClassId, CrmCustomObjectEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/custom-object-classes") .addPathSegment(customObjectClassId) @@ -304,7 +304,7 @@ public CompletableFuture> customObjectClasses String id, CustomObjectClassesCustomObjectsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/custom-object-classes") .addPathSegment(customObjectClassId) @@ -386,7 +386,7 @@ public CompletableFuture> customObjectClasses */ public CompletableFuture> customObjectClassesCustomObjectsMetaPostRetrieve( String customObjectClassId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/custom-object-classes") .addPathSegment(customObjectClassId) @@ -460,7 +460,7 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { customObjectClassesCustomObjectsRemoteFieldClassesList( CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/custom-object-classes/custom-objects/remote-field-classes"); if (request.getCursor().isPresent()) { @@ -502,6 +502,10 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { request.getIsCommonModelField().get().toString(), false); } + if (request.getIsCustom().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "is_custom", request.getIsCustom().get().toString(), false); + } if (request.getPageSize().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "page_size", request.getPageSize().get().toString(), false); diff --git a/src/main/java/com/merge/api/crm/AsyncRawDeleteAccountClient.java b/src/main/java/com/merge/api/crm/AsyncRawDeleteAccountClient.java index beb18761e..5bb70c635 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawDeleteAccountClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawDeleteAccountClient.java @@ -40,7 +40,7 @@ public CompletableFuture> delete() { * Delete a linked account. */ public CompletableFuture> delete(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/delete-account") .build(); diff --git a/src/main/java/com/merge/api/crm/AsyncRawEngagementTypesClient.java b/src/main/java/com/merge/api/crm/AsyncRawEngagementTypesClient.java index 9b86e01ef..10cf89c53 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawEngagementTypesClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawEngagementTypesClient.java @@ -61,7 +61,7 @@ public CompletableFuture */ public CompletableFuture>> list( EngagementTypesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/engagement-types"); if (request.getCreatedAfter().isPresent()) { @@ -202,7 +202,7 @@ public CompletableFuture> retrieve( */ public CompletableFuture> retrieve( String id, EngagementTypesRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/engagement-types") .addPathSegment(id); @@ -290,7 +290,7 @@ public CompletableFuture>> remoteFieldClassesList( EngagementTypesRemoteFieldClassesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/engagement-types/remote-field-classes"); if (request.getCursor().isPresent()) { @@ -332,6 +332,10 @@ public CompletableFuture>> l */ public CompletableFuture>> list( EngagementsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/engagements"); if (request.getCreatedAfter().isPresent()) { @@ -213,7 +213,7 @@ public CompletableFuture> create(Engage */ public CompletableFuture> create( EngagementEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/engagements"); if (request.getIsDebugMode().isPresent()) { @@ -294,7 +294,7 @@ public CompletableFuture> retrieve(String id, E */ public CompletableFuture> retrieve( String id, EngagementsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/engagements") .addPathSegment(id); @@ -378,7 +378,7 @@ public CompletableFuture> partialUpdate */ public CompletableFuture> partialUpdate( String id, PatchedEngagementEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/engagements") .addPathSegment(id); @@ -453,7 +453,7 @@ public CompletableFuture> metaPatchRetrieve(S */ public CompletableFuture> metaPatchRetrieve( String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/engagements/meta/patch") .addPathSegment(id) @@ -511,7 +511,7 @@ public CompletableFuture> metaPostRetrieve() * Returns metadata for Engagement POSTs. */ public CompletableFuture> metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/engagements/meta/post") .build(); @@ -578,7 +578,7 @@ public CompletableFuture>> remoteFieldClassesList( EngagementsRemoteFieldClassesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/engagements/remote-field-classes"); if (request.getCursor().isPresent()) { @@ -620,6 +620,10 @@ public CompletableFuture> */ public CompletableFuture> fieldMappingsRetrieve( FieldMappingsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/field-mappings"); if (request.getExcludeRemoteFieldMetadata().isPresent()) { @@ -128,7 +128,7 @@ public CompletableFuture> fie */ public CompletableFuture> fieldMappingsCreate( CreateFieldMappingRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/field-mappings"); if (request.getExcludeRemoteFieldMetadata().isPresent()) { @@ -208,7 +208,7 @@ public CompletableFuture> fie */ public CompletableFuture> fieldMappingsDestroy( String fieldMappingId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/field-mappings") .addPathSegment(fieldMappingId) @@ -278,7 +278,7 @@ public CompletableFuture> fie */ public CompletableFuture> fieldMappingsPartialUpdate( String fieldMappingId, PatchedEditFieldMappingRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/field-mappings") .addPathSegment(fieldMappingId) @@ -353,7 +353,7 @@ public CompletableFuture> remoteFie */ public CompletableFuture> remoteFieldsRetrieve( RemoteFieldsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/remote-fields"); if (request.getCommonModels().isPresent()) { @@ -422,7 +422,7 @@ public CompletableFuture> t */ public CompletableFuture> targetFieldsRetrieve( RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/target-fields") .build(); diff --git a/src/main/java/com/merge/api/crm/AsyncRawForceResyncClient.java b/src/main/java/com/merge/api/crm/AsyncRawForceResyncClient.java index 51b4e6b26..f4265fd2d 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawForceResyncClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawForceResyncClient.java @@ -44,7 +44,7 @@ public CompletableFuture>> syncStatusResyn */ public CompletableFuture>> syncStatusResyncCreate( RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/sync-status/resync") .build(); diff --git a/src/main/java/com/merge/api/crm/AsyncRawGenerateKeyClient.java b/src/main/java/com/merge/api/crm/AsyncRawGenerateKeyClient.java index 4075504d5..5bde260a2 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawGenerateKeyClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawGenerateKeyClient.java @@ -45,7 +45,7 @@ public CompletableFuture> create(GenerateRemoteK */ public CompletableFuture> create( GenerateRemoteKeyRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/generate-key") .build(); diff --git a/src/main/java/com/merge/api/crm/AsyncRawIssuesClient.java b/src/main/java/com/merge/api/crm/AsyncRawIssuesClient.java index 8a36959e2..97664a350 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawIssuesClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawIssuesClient.java @@ -56,7 +56,7 @@ public CompletableFuture>> list(I */ public CompletableFuture>> list( IssuesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/issues"); if (request.getAccountToken().isPresent()) { @@ -199,7 +199,7 @@ public CompletableFuture> retrieve(String id) { * Get a specific issue. */ public CompletableFuture> retrieve(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/issues") .addPathSegment(id) diff --git a/src/main/java/com/merge/api/crm/AsyncRawLeadsClient.java b/src/main/java/com/merge/api/crm/AsyncRawLeadsClient.java index c650749ef..a658201d0 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawLeadsClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawLeadsClient.java @@ -67,7 +67,7 @@ public CompletableFuture>> list(Le */ public CompletableFuture>> list( LeadsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/leads"); if (request.getConvertedAccountId().isPresent()) { @@ -229,7 +229,7 @@ public CompletableFuture> create(LeadEndpoint */ public CompletableFuture> create( LeadEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/leads"); if (request.getIsDebugMode().isPresent()) { @@ -310,7 +310,7 @@ public CompletableFuture> retrieve(String id, LeadsRe */ public CompletableFuture> retrieve( String id, LeadsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/leads") .addPathSegment(id); @@ -391,7 +391,7 @@ public CompletableFuture> metaPostRetrieve() * Returns metadata for Lead POSTs. */ public CompletableFuture> metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/leads/meta/post") .build(); @@ -458,7 +458,7 @@ public CompletableFuture>> remoteFieldClassesList( LeadsRemoteFieldClassesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/leads/remote-field-classes"); if (request.getCursor().isPresent()) { @@ -500,6 +500,10 @@ public CompletableFuture> create(EndUserDetailsR */ public CompletableFuture> create( EndUserDetailsRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/link-token") .build(); diff --git a/src/main/java/com/merge/api/crm/AsyncRawLinkedAccountsClient.java b/src/main/java/com/merge/api/crm/AsyncRawLinkedAccountsClient.java index 915e38261..b4a8e3a9e 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawLinkedAccountsClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawLinkedAccountsClient.java @@ -57,7 +57,7 @@ public CompletableFuture>> list( LinkedAccountsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/linked-accounts"); if (request.getCategory().isPresent()) { diff --git a/src/main/java/com/merge/api/crm/AsyncRawNotesClient.java b/src/main/java/com/merge/api/crm/AsyncRawNotesClient.java index bca8aceda..9df0b0b55 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawNotesClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawNotesClient.java @@ -67,7 +67,7 @@ public CompletableFuture>> list(No */ public CompletableFuture>> list( NotesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/notes"); if (request.getAccountId().isPresent()) { @@ -219,7 +219,7 @@ public CompletableFuture> create(NoteEndpoint */ public CompletableFuture> create( NoteEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/notes"); if (request.getIsDebugMode().isPresent()) { @@ -300,7 +300,7 @@ public CompletableFuture> retrieve(String id, NotesRe */ public CompletableFuture> retrieve( String id, NotesRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/notes") .addPathSegment(id); @@ -381,7 +381,7 @@ public CompletableFuture> metaPostRetrieve() * Returns metadata for Note POSTs. */ public CompletableFuture> metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/notes/meta/post") .build(); @@ -448,7 +448,7 @@ public CompletableFuture>> remoteFieldClassesList( NotesRemoteFieldClassesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/notes/remote-field-classes"); if (request.getCursor().isPresent()) { @@ -490,6 +490,10 @@ public CompletableFuture>> */ public CompletableFuture>> list( OpportunitiesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/opportunities"); if (request.getAccountId().isPresent()) { @@ -236,7 +236,7 @@ public CompletableFuture> create(Oppor */ public CompletableFuture> create( OpportunityEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/opportunities"); if (request.getIsDebugMode().isPresent()) { @@ -318,7 +318,7 @@ public CompletableFuture> retrieve( */ public CompletableFuture> retrieve( String id, OpportunitiesRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/opportunities") .addPathSegment(id); @@ -410,7 +410,7 @@ public CompletableFuture> partialUpdat */ public CompletableFuture> partialUpdate( String id, PatchedOpportunityEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/opportunities") .addPathSegment(id); @@ -485,7 +485,7 @@ public CompletableFuture> metaPatchRetrieve(S */ public CompletableFuture> metaPatchRetrieve( String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/opportunities/meta/patch") .addPathSegment(id) @@ -543,7 +543,7 @@ public CompletableFuture> metaPostRetrieve() * Returns metadata for Opportunity POSTs. */ public CompletableFuture> metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/opportunities/meta/post") .build(); @@ -610,7 +610,7 @@ public CompletableFuture>> remoteFieldClassesList( OpportunitiesRemoteFieldClassesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/opportunities/remote-field-classes"); if (request.getCursor().isPresent()) { @@ -652,6 +652,10 @@ public CompletableFuture> create(DataPassth */ public CompletableFuture> create( DataPassthroughRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/passthrough") .build(); diff --git a/src/main/java/com/merge/api/crm/AsyncRawRegenerateKeyClient.java b/src/main/java/com/merge/api/crm/AsyncRawRegenerateKeyClient.java index 2ab6bcb86..f35780ff8 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawRegenerateKeyClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawRegenerateKeyClient.java @@ -45,7 +45,7 @@ public CompletableFuture> create(RemoteKeyForReg */ public CompletableFuture> create( RemoteKeyForRegenerationRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/regenerate-key") .build(); diff --git a/src/main/java/com/merge/api/crm/AsyncRawScopesClient.java b/src/main/java/com/merge/api/crm/AsyncRawScopesClient.java index e84b6b1ed..2c070fded 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawScopesClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawScopesClient.java @@ -45,7 +45,7 @@ public CompletableFuture> defaultScope */ public CompletableFuture> defaultScopesRetrieve( RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/default-scopes") .build(); @@ -103,7 +103,7 @@ public CompletableFuture> linkedAccoun */ public CompletableFuture> linkedAccountScopesRetrieve( RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/linked-account-scopes") .build(); @@ -162,7 +162,7 @@ public CompletableFuture> linkedAccoun */ public CompletableFuture> linkedAccountScopesCreate( LinkedAccountCommonModelScopeDeserializerRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/linked-account-scopes") .build(); diff --git a/src/main/java/com/merge/api/crm/AsyncRawStagesClient.java b/src/main/java/com/merge/api/crm/AsyncRawStagesClient.java index 2c67e19b8..8a3f74949 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawStagesClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawStagesClient.java @@ -60,7 +60,7 @@ public CompletableFuture>> list(S */ public CompletableFuture>> list( StagesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/stages"); if (request.getCreatedAfter().isPresent()) { @@ -199,7 +199,7 @@ public CompletableFuture> retrieve(String id, Stages */ public CompletableFuture> retrieve( String id, StagesRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/stages") .addPathSegment(id); @@ -286,7 +286,7 @@ public CompletableFuture>> remoteFieldClassesList( StagesRemoteFieldClassesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/stages/remote-field-classes"); if (request.getCursor().isPresent()) { @@ -328,6 +328,10 @@ public CompletableFutureDISABLED, DONE, FAILED, PARTIALLY_SYNCED, PAUSED, SYNCING. Learn more about sync status in our Help Center. + * 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. */ - public CompletableFuture>> list() { + public CompletableFuture> list() { return list(SyncStatusListRequest.builder().build()); } /** - * Get syncing status. Possible values: DISABLED, DONE, FAILED, PARTIALLY_SYNCED, PAUSED, SYNCING. Learn more about sync status in our Help Center. + * 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. */ - public CompletableFuture>> list(SyncStatusListRequest request) { + public CompletableFuture> list(SyncStatusListRequest request) { return list(request, null); } /** - * Get syncing status. Possible values: DISABLED, DONE, FAILED, PARTIALLY_SYNCED, PAUSED, SYNCING. Learn more about sync status in our Help Center. + * 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. */ - public CompletableFuture>> list( + public CompletableFuture> list( SyncStatusListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/sync-status"); if (request.getCursor().isPresent()) { @@ -78,30 +72,15 @@ public CompletableFuture>> l if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - CompletableFuture>> future = new CompletableFuture<>(); + CompletableFuture> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { if (response.isSuccessful()) { - PaginatedSyncStatusList parsedResponse = ObjectMappers.JSON_MAPPER.readValue( - responseBody.string(), PaginatedSyncStatusList.class); - Optional startingAfter = parsedResponse.getNext(); - SyncStatusListRequest nextRequest = SyncStatusListRequest.builder() - .from(request) - .cursor(startingAfter) - .build(); - List result = parsedResponse.getResults().orElse(Collections.emptyList()); future.complete(new MergeApiHttpResponse<>( - new SyncPagingIterable(startingAfter.isPresent(), result, () -> { - try { - return list(nextRequest, requestOptions) - .get() - .body(); - } catch (InterruptedException | ExecutionException e) { - throw new RuntimeException(e); - } - }), + ObjectMappers.JSON_MAPPER.readValue( + responseBody.string(), PaginatedSyncStatusList.class), response)); return; } diff --git a/src/main/java/com/merge/api/crm/AsyncRawTasksClient.java b/src/main/java/com/merge/api/crm/AsyncRawTasksClient.java index 84de0cf94..7c26d019b 100644 --- a/src/main/java/com/merge/api/crm/AsyncRawTasksClient.java +++ b/src/main/java/com/merge/api/crm/AsyncRawTasksClient.java @@ -68,7 +68,7 @@ public CompletableFuture>> list(Ta */ public CompletableFuture>> list( TasksListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/tasks"); if (request.getCreatedAfter().isPresent()) { @@ -204,7 +204,7 @@ public CompletableFuture> create(TaskEndpoint */ public CompletableFuture> create( TaskEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/tasks"); if (request.getIsDebugMode().isPresent()) { @@ -285,7 +285,7 @@ public CompletableFuture> retrieve(String id, TasksRe */ public CompletableFuture> retrieve( String id, TasksRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/tasks") .addPathSegment(id); @@ -368,7 +368,7 @@ public CompletableFuture> partialUpdate( */ public CompletableFuture> partialUpdate( String id, PatchedTaskEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/tasks") .addPathSegment(id); @@ -443,7 +443,7 @@ public CompletableFuture> metaPatchRetrieve(S */ public CompletableFuture> metaPatchRetrieve( String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/tasks/meta/patch") .addPathSegment(id) @@ -501,7 +501,7 @@ public CompletableFuture> metaPostRetrieve() * Returns metadata for Task POSTs. */ public CompletableFuture> metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/tasks/meta/post") .build(); @@ -568,7 +568,7 @@ public CompletableFuture>> remoteFieldClassesList( TasksRemoteFieldClassesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/tasks/remote-field-classes"); if (request.getCursor().isPresent()) { @@ -610,6 +610,10 @@ public CompletableFuture>> list(Us */ public CompletableFuture>> list( UsersListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/users"); if (request.getCreatedAfter().isPresent()) { @@ -207,7 +207,7 @@ public CompletableFuture> retrieve(String id, UsersRe */ public CompletableFuture> retrieve( String id, UsersRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/users") .addPathSegment(id); @@ -286,7 +286,7 @@ public CompletableFuture> ignoreCreate( */ public CompletableFuture> ignoreCreate( String modelId, IgnoreCommonModelRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/users/ignore") .addPathSegment(modelId) @@ -358,7 +358,7 @@ public CompletableFuture>> remoteFieldClassesList( UsersRemoteFieldClassesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/users/remote-field-classes"); if (request.getCursor().isPresent()) { @@ -400,6 +400,10 @@ public CompletableFuture>> list() { * Returns a list of WebhookReceiver objects. */ public CompletableFuture>> list(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/webhook-receivers") .build(); @@ -105,7 +105,7 @@ public CompletableFuture> create(WebhookRe */ public CompletableFuture> create( WebhookReceiverRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/webhook-receivers") .build(); diff --git a/src/main/java/com/merge/api/crm/AsyncSyncStatusClient.java b/src/main/java/com/merge/api/crm/AsyncSyncStatusClient.java index 14b5ff7e8..869856a5f 100644 --- a/src/main/java/com/merge/api/crm/AsyncSyncStatusClient.java +++ b/src/main/java/com/merge/api/crm/AsyncSyncStatusClient.java @@ -5,8 +5,7 @@ import com.merge.api.core.ClientOptions; import com.merge.api.core.RequestOptions; -import com.merge.api.core.SyncPagingIterable; -import com.merge.api.crm.types.SyncStatus; +import com.merge.api.crm.types.PaginatedSyncStatusList; import com.merge.api.crm.types.SyncStatusListRequest; import java.util.concurrent.CompletableFuture; @@ -28,23 +27,23 @@ public AsyncRawSyncStatusClient withRawResponse() { } /** - * Get syncing status. Possible values: DISABLED, DONE, FAILED, PARTIALLY_SYNCED, PAUSED, SYNCING. Learn more about sync status in our Help Center. + * 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. */ - public CompletableFuture> list() { + public CompletableFuture list() { return this.rawClient.list().thenApply(response -> response.body()); } /** - * Get syncing status. Possible values: DISABLED, DONE, FAILED, PARTIALLY_SYNCED, PAUSED, SYNCING. Learn more about sync status in our Help Center. + * 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. */ - public CompletableFuture> list(SyncStatusListRequest request) { + public CompletableFuture list(SyncStatusListRequest request) { return this.rawClient.list(request).thenApply(response -> response.body()); } /** - * Get syncing status. Possible values: DISABLED, DONE, FAILED, PARTIALLY_SYNCED, PAUSED, SYNCING. Learn more about sync status in our Help Center. + * 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. */ - public CompletableFuture> list( + public CompletableFuture list( SyncStatusListRequest request, RequestOptions requestOptions) { return this.rawClient.list(request, requestOptions).thenApply(response -> response.body()); } diff --git a/src/main/java/com/merge/api/crm/RawAccountDetailsClient.java b/src/main/java/com/merge/api/crm/RawAccountDetailsClient.java index 9e90dc88b..bd7c596ed 100644 --- a/src/main/java/com/merge/api/crm/RawAccountDetailsClient.java +++ b/src/main/java/com/merge/api/crm/RawAccountDetailsClient.java @@ -36,7 +36,7 @@ public MergeApiHttpResponse retrieve() { * Get details for a linked account. */ public MergeApiHttpResponse retrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/account-details") .build(); diff --git a/src/main/java/com/merge/api/crm/RawAccountTokenClient.java b/src/main/java/com/merge/api/crm/RawAccountTokenClient.java index c88cb62da..f0790874a 100644 --- a/src/main/java/com/merge/api/crm/RawAccountTokenClient.java +++ b/src/main/java/com/merge/api/crm/RawAccountTokenClient.java @@ -36,7 +36,7 @@ public MergeApiHttpResponse retrieve(String publicToken) { * Returns the account token for the end user with the provided public token. */ public MergeApiHttpResponse retrieve(String publicToken, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/account-token") .addPathSegment(publicToken) diff --git a/src/main/java/com/merge/api/crm/RawAccountsClient.java b/src/main/java/com/merge/api/crm/RawAccountsClient.java index fdca534d2..19c77bb62 100644 --- a/src/main/java/com/merge/api/crm/RawAccountsClient.java +++ b/src/main/java/com/merge/api/crm/RawAccountsClient.java @@ -63,7 +63,7 @@ public MergeApiHttpResponse> list(AccountsListReques */ public MergeApiHttpResponse> list( AccountsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/accounts"); if (request.getCreatedAfter().isPresent()) { @@ -188,7 +188,7 @@ public MergeApiHttpResponse create(CrmAccountEndpointRequest */ public MergeApiHttpResponse create( CrmAccountEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/accounts"); if (request.getIsDebugMode().isPresent()) { @@ -255,7 +255,7 @@ public MergeApiHttpResponse retrieve(String id, AccountsRetrieveRequest */ public MergeApiHttpResponse retrieve( String id, AccountsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/accounts") .addPathSegment(id); @@ -324,7 +324,7 @@ public MergeApiHttpResponse partialUpdate(String id, Patched */ public MergeApiHttpResponse partialUpdate( String id, PatchedCrmAccountEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/accounts") .addPathSegment(id); @@ -384,7 +384,7 @@ public MergeApiHttpResponse metaPatchRetrieve(String id) { * Returns metadata for CRMAccount PATCHs. */ public MergeApiHttpResponse metaPatchRetrieve(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/accounts/meta/patch") .addPathSegment(id) @@ -428,7 +428,7 @@ public MergeApiHttpResponse metaPostRetrieve() { * Returns metadata for CRMAccount POSTs. */ public MergeApiHttpResponse metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/accounts/meta/post") .build(); @@ -481,7 +481,7 @@ public MergeApiHttpResponse> remoteFieldCla */ public MergeApiHttpResponse> remoteFieldClassesList( AccountsRemoteFieldClassesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/accounts/remote-field-classes"); if (request.getCursor().isPresent()) { @@ -523,6 +523,10 @@ public MergeApiHttpResponse> remoteFieldCla request.getIsCommonModelField().get().toString(), false); } + if (request.getIsCustom().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "is_custom", request.getIsCustom().get().toString(), false); + } if (request.getPageSize().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "page_size", request.getPageSize().get().toString(), false); diff --git a/src/main/java/com/merge/api/crm/RawAssociationTypesClient.java b/src/main/java/com/merge/api/crm/RawAssociationTypesClient.java index 74c220809..170f52f2d 100644 --- a/src/main/java/com/merge/api/crm/RawAssociationTypesClient.java +++ b/src/main/java/com/merge/api/crm/RawAssociationTypesClient.java @@ -65,7 +65,7 @@ public MergeApiHttpResponse> customObjectCla String customObjectClassId, CustomObjectClassesAssociationTypesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/custom-object-classes") .addPathSegment(customObjectClassId) @@ -180,7 +180,7 @@ public MergeApiHttpResponse customObjectClassesAssoc */ public MergeApiHttpResponse customObjectClassesAssociationTypesCreate( String customObjectClassId, CrmAssociationTypeEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/custom-object-classes") .addPathSegment(customObjectClassId) @@ -258,7 +258,7 @@ public MergeApiHttpResponse customObjectClassesAssociationTypes String id, CustomObjectClassesAssociationTypesRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/custom-object-classes") .addPathSegment(customObjectClassId) @@ -323,7 +323,7 @@ public MergeApiHttpResponse customObjectClassesAssociationTypesMet */ public MergeApiHttpResponse customObjectClassesAssociationTypesMetaPostRetrieve( String customObjectClassId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/custom-object-classes") .addPathSegment(customObjectClassId) diff --git a/src/main/java/com/merge/api/crm/RawAssociationsClient.java b/src/main/java/com/merge/api/crm/RawAssociationsClient.java index 2996319bc..db2c95d5b 100644 --- a/src/main/java/com/merge/api/crm/RawAssociationsClient.java +++ b/src/main/java/com/merge/api/crm/RawAssociationsClient.java @@ -64,7 +64,7 @@ public MergeApiHttpResponse> customObjectClasses String objectId, CustomObjectClassesCustomObjectsAssociationsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/custom-object-classes") .addPathSegment(customObjectClassId) @@ -221,7 +221,7 @@ public MergeApiHttpResponse customObjectClassesCustomObjectsAssocia String targetObjectId, CustomObjectClassesCustomObjectsAssociationsUpdateRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/custom-object-classes") .addPathSegment(sourceClassId) diff --git a/src/main/java/com/merge/api/crm/RawAsyncPassthroughClient.java b/src/main/java/com/merge/api/crm/RawAsyncPassthroughClient.java index 6d1288595..f7ed8020d 100644 --- a/src/main/java/com/merge/api/crm/RawAsyncPassthroughClient.java +++ b/src/main/java/com/merge/api/crm/RawAsyncPassthroughClient.java @@ -42,7 +42,7 @@ public MergeApiHttpResponse create(DataPassthroughReque */ public MergeApiHttpResponse create( DataPassthroughRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/async-passthrough") .build(); @@ -94,7 +94,7 @@ public MergeApiHttpResponse retrieve(String as */ public MergeApiHttpResponse retrieve( String asyncPassthroughReceiptId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/async-passthrough") .addPathSegment(asyncPassthroughReceiptId) diff --git a/src/main/java/com/merge/api/crm/RawAuditTrailClient.java b/src/main/java/com/merge/api/crm/RawAuditTrailClient.java index 3cf4a02b7..98836d209 100644 --- a/src/main/java/com/merge/api/crm/RawAuditTrailClient.java +++ b/src/main/java/com/merge/api/crm/RawAuditTrailClient.java @@ -51,7 +51,7 @@ public MergeApiHttpResponse> list(AuditTrailLi */ public MergeApiHttpResponse> list( AuditTrailListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/audit-trail"); if (request.getCursor().isPresent()) { diff --git a/src/main/java/com/merge/api/crm/RawAvailableActionsClient.java b/src/main/java/com/merge/api/crm/RawAvailableActionsClient.java index afbde58e3..b8631901b 100644 --- a/src/main/java/com/merge/api/crm/RawAvailableActionsClient.java +++ b/src/main/java/com/merge/api/crm/RawAvailableActionsClient.java @@ -36,7 +36,7 @@ public MergeApiHttpResponse retrieve() { * Returns a list of models and actions available for an account. */ public MergeApiHttpResponse retrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/available-actions") .build(); diff --git a/src/main/java/com/merge/api/crm/RawContactsClient.java b/src/main/java/com/merge/api/crm/RawContactsClient.java index 8ff1907ee..170b1bb63 100644 --- a/src/main/java/com/merge/api/crm/RawContactsClient.java +++ b/src/main/java/com/merge/api/crm/RawContactsClient.java @@ -65,7 +65,7 @@ public MergeApiHttpResponse> list(ContactsListReques */ public MergeApiHttpResponse> list( ContactsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/contacts"); if (request.getAccountId().isPresent()) { @@ -194,7 +194,7 @@ public MergeApiHttpResponse create(CrmContactEndpointRequest */ public MergeApiHttpResponse create( CrmContactEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/contacts"); if (request.getIsDebugMode().isPresent()) { @@ -261,7 +261,7 @@ public MergeApiHttpResponse retrieve(String id, ContactsRetrieveRequest */ public MergeApiHttpResponse retrieve( String id, ContactsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/contacts") .addPathSegment(id); @@ -330,7 +330,7 @@ public MergeApiHttpResponse partialUpdate(String id, Patched */ public MergeApiHttpResponse partialUpdate( String id, PatchedCrmContactEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/contacts") .addPathSegment(id); @@ -391,7 +391,7 @@ public MergeApiHttpResponse ignoreCreate(String modelId, IgnoreCommonModel */ public MergeApiHttpResponse ignoreCreate( String modelId, IgnoreCommonModelRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/contacts/ignore") .addPathSegment(modelId) @@ -440,7 +440,7 @@ public MergeApiHttpResponse metaPatchRetrieve(String id) { * Returns metadata for CRMContact PATCHs. */ public MergeApiHttpResponse metaPatchRetrieve(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/contacts/meta/patch") .addPathSegment(id) @@ -484,7 +484,7 @@ public MergeApiHttpResponse metaPostRetrieve() { * Returns metadata for CRMContact POSTs. */ public MergeApiHttpResponse metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/contacts/meta/post") .build(); @@ -537,7 +537,7 @@ public MergeApiHttpResponse> remoteFieldCla */ public MergeApiHttpResponse> remoteFieldClassesList( ContactsRemoteFieldClassesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/contacts/remote-field-classes"); if (request.getCursor().isPresent()) { @@ -579,6 +579,10 @@ public MergeApiHttpResponse> remoteFieldCla request.getIsCommonModelField().get().toString(), false); } + if (request.getIsCustom().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "is_custom", request.getIsCustom().get().toString(), false); + } if (request.getPageSize().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "page_size", request.getPageSize().get().toString(), false); diff --git a/src/main/java/com/merge/api/crm/RawCustomObjectClassesClient.java b/src/main/java/com/merge/api/crm/RawCustomObjectClassesClient.java index f78efe5f6..a46ede095 100644 --- a/src/main/java/com/merge/api/crm/RawCustomObjectClassesClient.java +++ b/src/main/java/com/merge/api/crm/RawCustomObjectClassesClient.java @@ -52,7 +52,7 @@ public MergeApiHttpResponse> list(CustomOb */ public MergeApiHttpResponse> list( CustomObjectClassesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/custom-object-classes"); if (request.getCreatedAfter().isPresent()) { @@ -169,7 +169,7 @@ public MergeApiHttpResponse retrieve(String id, CustomObjectC */ public MergeApiHttpResponse retrieve( String id, CustomObjectClassesRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/custom-object-classes") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/crm/RawCustomObjectsClient.java b/src/main/java/com/merge/api/crm/RawCustomObjectsClient.java index 23ed9fc93..a0e172732 100644 --- a/src/main/java/com/merge/api/crm/RawCustomObjectsClient.java +++ b/src/main/java/com/merge/api/crm/RawCustomObjectsClient.java @@ -68,7 +68,7 @@ public MergeApiHttpResponse> customObjectClasse String customObjectClassId, CustomObjectClassesCustomObjectsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/custom-object-classes") .addPathSegment(customObjectClassId) @@ -186,7 +186,7 @@ public MergeApiHttpResponse customObjectClassesCustomOb */ public MergeApiHttpResponse customObjectClassesCustomObjectsCreate( String customObjectClassId, CrmCustomObjectEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/custom-object-classes") .addPathSegment(customObjectClassId) @@ -264,7 +264,7 @@ public MergeApiHttpResponse customObjectClassesCustomObjectsRetrie String id, CustomObjectClassesCustomObjectsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/custom-object-classes") .addPathSegment(customObjectClassId) @@ -332,7 +332,7 @@ public MergeApiHttpResponse customObjectClassesCustomObjectsMetaPo */ public MergeApiHttpResponse customObjectClassesCustomObjectsMetaPostRetrieve( String customObjectClassId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/custom-object-classes") .addPathSegment(customObjectClassId) @@ -392,7 +392,7 @@ public MergeApiHttpResponse customObjectClassesCustomObjectsMetaPo customObjectClassesCustomObjectsRemoteFieldClassesList( CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/custom-object-classes/custom-objects/remote-field-classes"); if (request.getCursor().isPresent()) { @@ -434,6 +434,10 @@ public MergeApiHttpResponse customObjectClassesCustomObjectsMetaPo request.getIsCommonModelField().get().toString(), false); } + if (request.getIsCustom().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "is_custom", request.getIsCustom().get().toString(), false); + } if (request.getPageSize().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "page_size", request.getPageSize().get().toString(), false); diff --git a/src/main/java/com/merge/api/crm/RawDeleteAccountClient.java b/src/main/java/com/merge/api/crm/RawDeleteAccountClient.java index 8fd7019a9..9ae521a37 100644 --- a/src/main/java/com/merge/api/crm/RawDeleteAccountClient.java +++ b/src/main/java/com/merge/api/crm/RawDeleteAccountClient.java @@ -36,7 +36,7 @@ public MergeApiHttpResponse delete() { * Delete a linked account. */ public MergeApiHttpResponse delete(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/delete-account") .build(); diff --git a/src/main/java/com/merge/api/crm/RawEngagementTypesClient.java b/src/main/java/com/merge/api/crm/RawEngagementTypesClient.java index 9e8b541ac..8851995cc 100644 --- a/src/main/java/com/merge/api/crm/RawEngagementTypesClient.java +++ b/src/main/java/com/merge/api/crm/RawEngagementTypesClient.java @@ -55,7 +55,7 @@ public MergeApiHttpResponse> list(EngagementT */ public MergeApiHttpResponse> list( EngagementTypesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/engagement-types"); if (request.getCreatedAfter().isPresent()) { @@ -175,7 +175,7 @@ public MergeApiHttpResponse retrieve(String id, EngagementTypesR */ public MergeApiHttpResponse retrieve( String id, EngagementTypesRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/engagement-types") .addPathSegment(id); @@ -249,7 +249,7 @@ public MergeApiHttpResponse> remoteFieldCla */ public MergeApiHttpResponse> remoteFieldClassesList( EngagementTypesRemoteFieldClassesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/engagement-types/remote-field-classes"); if (request.getCursor().isPresent()) { @@ -291,6 +291,10 @@ public MergeApiHttpResponse> remoteFieldCla request.getIsCommonModelField().get().toString(), false); } + if (request.getIsCustom().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "is_custom", request.getIsCustom().get().toString(), false); + } if (request.getPageSize().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "page_size", request.getPageSize().get().toString(), false); diff --git a/src/main/java/com/merge/api/crm/RawEngagementsClient.java b/src/main/java/com/merge/api/crm/RawEngagementsClient.java index dd895ac1a..99e940875 100644 --- a/src/main/java/com/merge/api/crm/RawEngagementsClient.java +++ b/src/main/java/com/merge/api/crm/RawEngagementsClient.java @@ -63,7 +63,7 @@ public MergeApiHttpResponse> list(EngagementsList */ public MergeApiHttpResponse> list( EngagementsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/engagements"); if (request.getCreatedAfter().isPresent()) { @@ -188,7 +188,7 @@ public MergeApiHttpResponse create(EngagementEndpointRequest */ public MergeApiHttpResponse create( EngagementEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/engagements"); if (request.getIsDebugMode().isPresent()) { @@ -255,7 +255,7 @@ public MergeApiHttpResponse retrieve(String id, EngagementsRetrieveR */ public MergeApiHttpResponse retrieve( String id, EngagementsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/engagements") .addPathSegment(id); @@ -324,7 +324,7 @@ public MergeApiHttpResponse partialUpdate(String id, Patched */ public MergeApiHttpResponse partialUpdate( String id, PatchedEngagementEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/engagements") .addPathSegment(id); @@ -384,7 +384,7 @@ public MergeApiHttpResponse metaPatchRetrieve(String id) { * Returns metadata for Engagement PATCHs. */ public MergeApiHttpResponse metaPatchRetrieve(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/engagements/meta/patch") .addPathSegment(id) @@ -428,7 +428,7 @@ public MergeApiHttpResponse metaPostRetrieve() { * Returns metadata for Engagement POSTs. */ public MergeApiHttpResponse metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/engagements/meta/post") .build(); @@ -481,7 +481,7 @@ public MergeApiHttpResponse> remoteFieldCla */ public MergeApiHttpResponse> remoteFieldClassesList( EngagementsRemoteFieldClassesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/engagements/remote-field-classes"); if (request.getCursor().isPresent()) { @@ -523,6 +523,10 @@ public MergeApiHttpResponse> remoteFieldCla request.getIsCommonModelField().get().toString(), false); } + if (request.getIsCustom().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "is_custom", request.getIsCustom().get().toString(), false); + } if (request.getPageSize().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "page_size", request.getPageSize().get().toString(), false); diff --git a/src/main/java/com/merge/api/crm/RawFieldMappingClient.java b/src/main/java/com/merge/api/crm/RawFieldMappingClient.java index 04c68a631..5b456e362 100644 --- a/src/main/java/com/merge/api/crm/RawFieldMappingClient.java +++ b/src/main/java/com/merge/api/crm/RawFieldMappingClient.java @@ -58,7 +58,7 @@ public MergeApiHttpResponse fieldMappingsRetrie */ public MergeApiHttpResponse fieldMappingsRetrieve( FieldMappingsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/field-mappings"); if (request.getExcludeRemoteFieldMetadata().isPresent()) { @@ -110,7 +110,7 @@ public MergeApiHttpResponse fieldMappingsCreate(Cr */ public MergeApiHttpResponse fieldMappingsCreate( CreateFieldMappingRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/field-mappings"); if (request.getExcludeRemoteFieldMetadata().isPresent()) { @@ -175,7 +175,7 @@ public MergeApiHttpResponse fieldMappingsDestroy(S */ public MergeApiHttpResponse fieldMappingsDestroy( String fieldMappingId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/field-mappings") .addPathSegment(fieldMappingId) @@ -230,7 +230,7 @@ public MergeApiHttpResponse fieldMappingsPartialUp */ public MergeApiHttpResponse fieldMappingsPartialUpdate( String fieldMappingId, PatchedEditFieldMappingRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/field-mappings") .addPathSegment(fieldMappingId) @@ -290,7 +290,7 @@ public MergeApiHttpResponse remoteFieldsRetrieve(RemoteF */ public MergeApiHttpResponse remoteFieldsRetrieve( RemoteFieldsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/remote-fields"); if (request.getCommonModels().isPresent()) { @@ -344,7 +344,7 @@ public MergeApiHttpResponse targetFieldsRetrieve * 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. */ public MergeApiHttpResponse targetFieldsRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/target-fields") .build(); diff --git a/src/main/java/com/merge/api/crm/RawForceResyncClient.java b/src/main/java/com/merge/api/crm/RawForceResyncClient.java index 3b49ff2d7..5d2e118e3 100644 --- a/src/main/java/com/merge/api/crm/RawForceResyncClient.java +++ b/src/main/java/com/merge/api/crm/RawForceResyncClient.java @@ -39,7 +39,7 @@ public MergeApiHttpResponse> syncStatusResyncCreate() { * 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. */ public MergeApiHttpResponse> syncStatusResyncCreate(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/sync-status/resync") .build(); diff --git a/src/main/java/com/merge/api/crm/RawGenerateKeyClient.java b/src/main/java/com/merge/api/crm/RawGenerateKeyClient.java index 5745b4486..1855807ce 100644 --- a/src/main/java/com/merge/api/crm/RawGenerateKeyClient.java +++ b/src/main/java/com/merge/api/crm/RawGenerateKeyClient.java @@ -40,7 +40,7 @@ public MergeApiHttpResponse create(GenerateRemoteKeyRequest request) * Create a remote key. */ public MergeApiHttpResponse create(GenerateRemoteKeyRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/generate-key") .build(); diff --git a/src/main/java/com/merge/api/crm/RawIssuesClient.java b/src/main/java/com/merge/api/crm/RawIssuesClient.java index d6b846c59..dbe524238 100644 --- a/src/main/java/com/merge/api/crm/RawIssuesClient.java +++ b/src/main/java/com/merge/api/crm/RawIssuesClient.java @@ -51,7 +51,7 @@ public MergeApiHttpResponse> list(IssuesListRequest re */ public MergeApiHttpResponse> list( IssuesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/issues"); if (request.getAccountToken().isPresent()) { @@ -175,7 +175,7 @@ public MergeApiHttpResponse retrieve(String id) { * Get a specific issue. */ public MergeApiHttpResponse retrieve(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/issues") .addPathSegment(id) diff --git a/src/main/java/com/merge/api/crm/RawLeadsClient.java b/src/main/java/com/merge/api/crm/RawLeadsClient.java index 65380154a..cbe3f1cbf 100644 --- a/src/main/java/com/merge/api/crm/RawLeadsClient.java +++ b/src/main/java/com/merge/api/crm/RawLeadsClient.java @@ -62,7 +62,7 @@ public MergeApiHttpResponse> list(LeadsListRequest requ */ public MergeApiHttpResponse> list( LeadsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/leads"); if (request.getConvertedAccountId().isPresent()) { @@ -204,7 +204,7 @@ public MergeApiHttpResponse create(LeadEndpointRequest request) { * Creates a Lead object with the given values. */ public MergeApiHttpResponse create(LeadEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/leads"); if (request.getIsDebugMode().isPresent()) { @@ -270,7 +270,7 @@ public MergeApiHttpResponse retrieve(String id, LeadsRetrieveRequest reque * Returns a Lead object with the given id. */ public MergeApiHttpResponse retrieve(String id, LeadsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/leads") .addPathSegment(id); @@ -338,7 +338,7 @@ public MergeApiHttpResponse metaPostRetrieve() { * Returns metadata for Lead POSTs. */ public MergeApiHttpResponse metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/leads/meta/post") .build(); @@ -391,7 +391,7 @@ public MergeApiHttpResponse> remoteFieldCla */ public MergeApiHttpResponse> remoteFieldClassesList( LeadsRemoteFieldClassesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/leads/remote-field-classes"); if (request.getCursor().isPresent()) { @@ -433,6 +433,10 @@ public MergeApiHttpResponse> remoteFieldCla request.getIsCommonModelField().get().toString(), false); } + if (request.getIsCustom().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "is_custom", request.getIsCustom().get().toString(), false); + } if (request.getPageSize().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "page_size", request.getPageSize().get().toString(), false); diff --git a/src/main/java/com/merge/api/crm/RawLinkTokenClient.java b/src/main/java/com/merge/api/crm/RawLinkTokenClient.java index 96d1ba0e1..4bf0eeedd 100644 --- a/src/main/java/com/merge/api/crm/RawLinkTokenClient.java +++ b/src/main/java/com/merge/api/crm/RawLinkTokenClient.java @@ -40,7 +40,7 @@ public MergeApiHttpResponse create(EndUserDetailsRequest request) { * Creates a link token to be used when linking a new end user. */ public MergeApiHttpResponse create(EndUserDetailsRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/link-token") .build(); diff --git a/src/main/java/com/merge/api/crm/RawLinkedAccountsClient.java b/src/main/java/com/merge/api/crm/RawLinkedAccountsClient.java index 2c4686ca3..298248b9d 100644 --- a/src/main/java/com/merge/api/crm/RawLinkedAccountsClient.java +++ b/src/main/java/com/merge/api/crm/RawLinkedAccountsClient.java @@ -51,7 +51,7 @@ public MergeApiHttpResponse> list(L */ public MergeApiHttpResponse> list( LinkedAccountsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/linked-accounts"); if (request.getCategory().isPresent()) { diff --git a/src/main/java/com/merge/api/crm/RawNotesClient.java b/src/main/java/com/merge/api/crm/RawNotesClient.java index 30a560670..bfcbe89f1 100644 --- a/src/main/java/com/merge/api/crm/RawNotesClient.java +++ b/src/main/java/com/merge/api/crm/RawNotesClient.java @@ -62,7 +62,7 @@ public MergeApiHttpResponse> list(NotesListRequest requ */ public MergeApiHttpResponse> list( NotesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/notes"); if (request.getAccountId().isPresent()) { @@ -194,7 +194,7 @@ public MergeApiHttpResponse create(NoteEndpointRequest request) { * Creates a Note object with the given values. */ public MergeApiHttpResponse create(NoteEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/notes"); if (request.getIsDebugMode().isPresent()) { @@ -260,7 +260,7 @@ public MergeApiHttpResponse retrieve(String id, NotesRetrieveRequest reque * Returns a Note object with the given id. */ public MergeApiHttpResponse retrieve(String id, NotesRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/notes") .addPathSegment(id); @@ -328,7 +328,7 @@ public MergeApiHttpResponse metaPostRetrieve() { * Returns metadata for Note POSTs. */ public MergeApiHttpResponse metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/notes/meta/post") .build(); @@ -381,7 +381,7 @@ public MergeApiHttpResponse> remoteFieldCla */ public MergeApiHttpResponse> remoteFieldClassesList( NotesRemoteFieldClassesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/notes/remote-field-classes"); if (request.getCursor().isPresent()) { @@ -423,6 +423,10 @@ public MergeApiHttpResponse> remoteFieldCla request.getIsCommonModelField().get().toString(), false); } + if (request.getIsCustom().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "is_custom", request.getIsCustom().get().toString(), false); + } if (request.getPageSize().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "page_size", request.getPageSize().get().toString(), false); diff --git a/src/main/java/com/merge/api/crm/RawOpportunitiesClient.java b/src/main/java/com/merge/api/crm/RawOpportunitiesClient.java index c481bff19..c497b217c 100644 --- a/src/main/java/com/merge/api/crm/RawOpportunitiesClient.java +++ b/src/main/java/com/merge/api/crm/RawOpportunitiesClient.java @@ -63,7 +63,7 @@ public MergeApiHttpResponse> list(OpportunitiesL */ public MergeApiHttpResponse> list( OpportunitiesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/opportunities"); if (request.getAccountId().isPresent()) { @@ -211,7 +211,7 @@ public MergeApiHttpResponse create(OpportunityEndpointReque */ public MergeApiHttpResponse create( OpportunityEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/opportunities"); if (request.getIsDebugMode().isPresent()) { @@ -279,7 +279,7 @@ public MergeApiHttpResponse retrieve(String id, OpportunitiesRetrie */ public MergeApiHttpResponse retrieve( String id, OpportunitiesRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/opportunities") .addPathSegment(id); @@ -357,7 +357,7 @@ public MergeApiHttpResponse partialUpdate( */ public MergeApiHttpResponse partialUpdate( String id, PatchedOpportunityEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/opportunities") .addPathSegment(id); @@ -418,7 +418,7 @@ public MergeApiHttpResponse metaPatchRetrieve(String id) { * Returns metadata for Opportunity PATCHs. */ public MergeApiHttpResponse metaPatchRetrieve(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/opportunities/meta/patch") .addPathSegment(id) @@ -462,7 +462,7 @@ public MergeApiHttpResponse metaPostRetrieve() { * Returns metadata for Opportunity POSTs. */ public MergeApiHttpResponse metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/opportunities/meta/post") .build(); @@ -515,7 +515,7 @@ public MergeApiHttpResponse> remoteFieldCla */ public MergeApiHttpResponse> remoteFieldClassesList( OpportunitiesRemoteFieldClassesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/opportunities/remote-field-classes"); if (request.getCursor().isPresent()) { @@ -557,6 +557,10 @@ public MergeApiHttpResponse> remoteFieldCla request.getIsCommonModelField().get().toString(), false); } + if (request.getIsCustom().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "is_custom", request.getIsCustom().get().toString(), false); + } if (request.getPageSize().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "page_size", request.getPageSize().get().toString(), false); diff --git a/src/main/java/com/merge/api/crm/RawPassthroughClient.java b/src/main/java/com/merge/api/crm/RawPassthroughClient.java index 9a16a2536..7400a4b84 100644 --- a/src/main/java/com/merge/api/crm/RawPassthroughClient.java +++ b/src/main/java/com/merge/api/crm/RawPassthroughClient.java @@ -40,7 +40,7 @@ public MergeApiHttpResponse create(DataPassthroughRequest reques * Pull data from an endpoint not currently supported by Merge. */ public MergeApiHttpResponse create(DataPassthroughRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/passthrough") .build(); diff --git a/src/main/java/com/merge/api/crm/RawRegenerateKeyClient.java b/src/main/java/com/merge/api/crm/RawRegenerateKeyClient.java index f9233b2b9..415e291c4 100644 --- a/src/main/java/com/merge/api/crm/RawRegenerateKeyClient.java +++ b/src/main/java/com/merge/api/crm/RawRegenerateKeyClient.java @@ -41,7 +41,7 @@ public MergeApiHttpResponse create(RemoteKeyForRegenerationRequest re */ public MergeApiHttpResponse create( RemoteKeyForRegenerationRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/regenerate-key") .build(); diff --git a/src/main/java/com/merge/api/crm/RawScopesClient.java b/src/main/java/com/merge/api/crm/RawScopesClient.java index 1d44f8ae2..64bdcfb42 100644 --- a/src/main/java/com/merge/api/crm/RawScopesClient.java +++ b/src/main/java/com/merge/api/crm/RawScopesClient.java @@ -40,7 +40,7 @@ public MergeApiHttpResponse defaultScopesRetrieve() { * Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. Learn more. */ public MergeApiHttpResponse defaultScopesRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/default-scopes") .build(); @@ -84,7 +84,7 @@ public MergeApiHttpResponse linkedAccountScopesRetrieve() { * Get all available permissions for Merge Common Models and fields for a single Linked Account. Learn more. */ public MergeApiHttpResponse linkedAccountScopesRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/linked-account-scopes") .build(); @@ -130,7 +130,7 @@ public MergeApiHttpResponse linkedAccountScopesCreate( */ public MergeApiHttpResponse linkedAccountScopesCreate( LinkedAccountCommonModelScopeDeserializerRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/linked-account-scopes") .build(); diff --git a/src/main/java/com/merge/api/crm/RawStagesClient.java b/src/main/java/com/merge/api/crm/RawStagesClient.java index f345b2bda..5c463035d 100644 --- a/src/main/java/com/merge/api/crm/RawStagesClient.java +++ b/src/main/java/com/merge/api/crm/RawStagesClient.java @@ -55,7 +55,7 @@ public MergeApiHttpResponse> list(StagesListRequest re */ public MergeApiHttpResponse> list( StagesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/stages"); if (request.getCreatedAfter().isPresent()) { @@ -175,7 +175,7 @@ public MergeApiHttpResponse retrieve(String id, StagesRetrieveRequest req */ public MergeApiHttpResponse retrieve( String id, StagesRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/stages") .addPathSegment(id); @@ -249,7 +249,7 @@ public MergeApiHttpResponse> remoteFieldCla */ public MergeApiHttpResponse> remoteFieldClassesList( StagesRemoteFieldClassesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/stages/remote-field-classes"); if (request.getCursor().isPresent()) { @@ -291,6 +291,10 @@ public MergeApiHttpResponse> remoteFieldCla request.getIsCommonModelField().get().toString(), false); } + if (request.getIsCustom().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "is_custom", request.getIsCustom().get().toString(), false); + } if (request.getPageSize().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "page_size", request.getPageSize().get().toString(), false); diff --git a/src/main/java/com/merge/api/crm/RawSyncStatusClient.java b/src/main/java/com/merge/api/crm/RawSyncStatusClient.java index 389c6fc71..d3c0f3b69 100644 --- a/src/main/java/com/merge/api/crm/RawSyncStatusClient.java +++ b/src/main/java/com/merge/api/crm/RawSyncStatusClient.java @@ -10,14 +10,9 @@ import com.merge.api.core.ObjectMappers; import com.merge.api.core.QueryStringMapper; import com.merge.api.core.RequestOptions; -import com.merge.api.core.SyncPagingIterable; import com.merge.api.crm.types.PaginatedSyncStatusList; -import com.merge.api.crm.types.SyncStatus; import com.merge.api.crm.types.SyncStatusListRequest; import java.io.IOException; -import java.util.Collections; -import java.util.List; -import java.util.Optional; import okhttp3.Headers; import okhttp3.HttpUrl; import okhttp3.OkHttpClient; @@ -33,25 +28,25 @@ public RawSyncStatusClient(ClientOptions clientOptions) { } /** - * Get syncing status. Possible values: DISABLED, DONE, FAILED, PARTIALLY_SYNCED, PAUSED, SYNCING. Learn more about sync status in our Help Center. + * 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. */ - public MergeApiHttpResponse> list() { + public MergeApiHttpResponse list() { return list(SyncStatusListRequest.builder().build()); } /** - * Get syncing status. Possible values: DISABLED, DONE, FAILED, PARTIALLY_SYNCED, PAUSED, SYNCING. Learn more about sync status in our Help Center. + * 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. */ - public MergeApiHttpResponse> list(SyncStatusListRequest request) { + public MergeApiHttpResponse list(SyncStatusListRequest request) { return list(request, null); } /** - * Get syncing status. Possible values: DISABLED, DONE, FAILED, PARTIALLY_SYNCED, PAUSED, SYNCING. Learn more about sync status in our Help Center. + * 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. */ - public MergeApiHttpResponse> list( + public MergeApiHttpResponse list( SyncStatusListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/sync-status"); if (request.getCursor().isPresent()) { @@ -76,18 +71,8 @@ public MergeApiHttpResponse> list( try (Response response = client.newCall(okhttpRequest).execute()) { ResponseBody responseBody = response.body(); if (response.isSuccessful()) { - PaginatedSyncStatusList parsedResponse = - ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedSyncStatusList.class); - Optional startingAfter = parsedResponse.getNext(); - SyncStatusListRequest nextRequest = SyncStatusListRequest.builder() - .from(request) - .cursor(startingAfter) - .build(); - List result = parsedResponse.getResults().orElse(Collections.emptyList()); return new MergeApiHttpResponse<>( - new SyncPagingIterable( - startingAfter.isPresent(), result, () -> list(nextRequest, requestOptions) - .body()), + ObjectMappers.JSON_MAPPER.readValue(responseBody.string(), PaginatedSyncStatusList.class), response); } String responseBodyString = responseBody != null ? responseBody.string() : "{}"; diff --git a/src/main/java/com/merge/api/crm/RawTasksClient.java b/src/main/java/com/merge/api/crm/RawTasksClient.java index a4470dbe6..92304df54 100644 --- a/src/main/java/com/merge/api/crm/RawTasksClient.java +++ b/src/main/java/com/merge/api/crm/RawTasksClient.java @@ -63,7 +63,7 @@ public MergeApiHttpResponse> list(TasksListRequest requ */ public MergeApiHttpResponse> list( TasksListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/tasks"); if (request.getCreatedAfter().isPresent()) { @@ -179,7 +179,7 @@ public MergeApiHttpResponse create(TaskEndpointRequest request) { * Creates a Task object with the given values. */ public MergeApiHttpResponse create(TaskEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/tasks"); if (request.getIsDebugMode().isPresent()) { @@ -245,7 +245,7 @@ public MergeApiHttpResponse retrieve(String id, TasksRetrieveRequest reque * Returns a Task object with the given id. */ public MergeApiHttpResponse retrieve(String id, TasksRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/tasks") .addPathSegment(id); @@ -314,7 +314,7 @@ public MergeApiHttpResponse partialUpdate(String id, PatchedTaskEn */ public MergeApiHttpResponse partialUpdate( String id, PatchedTaskEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/tasks") .addPathSegment(id); @@ -374,7 +374,7 @@ public MergeApiHttpResponse metaPatchRetrieve(String id) { * Returns metadata for Task PATCHs. */ public MergeApiHttpResponse metaPatchRetrieve(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/tasks/meta/patch") .addPathSegment(id) @@ -418,7 +418,7 @@ public MergeApiHttpResponse metaPostRetrieve() { * Returns metadata for Task POSTs. */ public MergeApiHttpResponse metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/tasks/meta/post") .build(); @@ -471,7 +471,7 @@ public MergeApiHttpResponse> remoteFieldCla */ public MergeApiHttpResponse> remoteFieldClassesList( TasksRemoteFieldClassesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/tasks/remote-field-classes"); if (request.getCursor().isPresent()) { @@ -513,6 +513,10 @@ public MergeApiHttpResponse> remoteFieldCla request.getIsCommonModelField().get().toString(), false); } + if (request.getIsCustom().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "is_custom", request.getIsCustom().get().toString(), false); + } if (request.getPageSize().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "page_size", request.getPageSize().get().toString(), false); diff --git a/src/main/java/com/merge/api/crm/RawUsersClient.java b/src/main/java/com/merge/api/crm/RawUsersClient.java index 9582d7f4a..1715a3eca 100644 --- a/src/main/java/com/merge/api/crm/RawUsersClient.java +++ b/src/main/java/com/merge/api/crm/RawUsersClient.java @@ -59,7 +59,7 @@ public MergeApiHttpResponse> list(UsersListRequest requ */ public MergeApiHttpResponse> list( UsersListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/users"); if (request.getCreatedAfter().isPresent()) { @@ -182,7 +182,7 @@ public MergeApiHttpResponse retrieve(String id, UsersRetrieveRequest reque * Returns a User object with the given id. */ public MergeApiHttpResponse retrieve(String id, UsersRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/users") .addPathSegment(id); @@ -247,7 +247,7 @@ public MergeApiHttpResponse ignoreCreate(String modelId, IgnoreCommonModel */ public MergeApiHttpResponse ignoreCreate( String modelId, IgnoreCommonModelRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/users/ignore") .addPathSegment(modelId) @@ -306,7 +306,7 @@ public MergeApiHttpResponse> remoteFieldCla */ public MergeApiHttpResponse> remoteFieldClassesList( UsersRemoteFieldClassesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/users/remote-field-classes"); if (request.getCursor().isPresent()) { @@ -348,6 +348,10 @@ public MergeApiHttpResponse> remoteFieldCla request.getIsCommonModelField().get().toString(), false); } + if (request.getIsCustom().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "is_custom", request.getIsCustom().get().toString(), false); + } if (request.getPageSize().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "page_size", request.getPageSize().get().toString(), false); diff --git a/src/main/java/com/merge/api/crm/RawWebhookReceiversClient.java b/src/main/java/com/merge/api/crm/RawWebhookReceiversClient.java index 4a6b8ef73..47805df49 100644 --- a/src/main/java/com/merge/api/crm/RawWebhookReceiversClient.java +++ b/src/main/java/com/merge/api/crm/RawWebhookReceiversClient.java @@ -42,7 +42,7 @@ public MergeApiHttpResponse> list() { * Returns a list of WebhookReceiver objects. */ public MergeApiHttpResponse> list(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/webhook-receivers") .build(); @@ -87,7 +87,7 @@ public MergeApiHttpResponse create(WebhookReceiverRequest reque * Creates a WebhookReceiver object with the given values. */ public MergeApiHttpResponse create(WebhookReceiverRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("crm/v1/webhook-receivers") .build(); diff --git a/src/main/java/com/merge/api/crm/SyncStatusClient.java b/src/main/java/com/merge/api/crm/SyncStatusClient.java index ea2e83216..583ea581a 100644 --- a/src/main/java/com/merge/api/crm/SyncStatusClient.java +++ b/src/main/java/com/merge/api/crm/SyncStatusClient.java @@ -5,8 +5,7 @@ import com.merge.api.core.ClientOptions; import com.merge.api.core.RequestOptions; -import com.merge.api.core.SyncPagingIterable; -import com.merge.api.crm.types.SyncStatus; +import com.merge.api.crm.types.PaginatedSyncStatusList; import com.merge.api.crm.types.SyncStatusListRequest; public class SyncStatusClient { @@ -27,23 +26,23 @@ public RawSyncStatusClient withRawResponse() { } /** - * Get syncing status. Possible values: DISABLED, DONE, FAILED, PARTIALLY_SYNCED, PAUSED, SYNCING. Learn more about sync status in our Help Center. + * 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. */ - public SyncPagingIterable list() { + public PaginatedSyncStatusList list() { return this.rawClient.list().body(); } /** - * Get syncing status. Possible values: DISABLED, DONE, FAILED, PARTIALLY_SYNCED, PAUSED, SYNCING. Learn more about sync status in our Help Center. + * 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. */ - public SyncPagingIterable list(SyncStatusListRequest request) { + public PaginatedSyncStatusList list(SyncStatusListRequest request) { return this.rawClient.list(request).body(); } /** - * Get syncing status. Possible values: DISABLED, DONE, FAILED, PARTIALLY_SYNCED, PAUSED, SYNCING. Learn more about sync status in our Help Center. + * 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. */ - public SyncPagingIterable list(SyncStatusListRequest request, RequestOptions requestOptions) { + public PaginatedSyncStatusList list(SyncStatusListRequest request, RequestOptions requestOptions) { return this.rawClient.list(request, requestOptions).body(); } } diff --git a/src/main/java/com/merge/api/crm/types/Account.java b/src/main/java/com/merge/api/crm/types/Account.java index 0ddb03849..4e9c6f97d 100644 --- a/src/main/java/com/merge/api/crm/types/Account.java +++ b/src/main/java/com/merge/api/crm/types/Account.java @@ -385,6 +385,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -396,6 +399,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -407,6 +413,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -418,6 +427,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The account's owner.

    + */ @JsonSetter(value = "owner", nulls = Nulls.SKIP) public Builder owner(Optional owner) { this.owner = owner; @@ -429,6 +441,9 @@ public Builder owner(AccountOwner owner) { return this; } + /** + *

    The account's name.

    + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -440,6 +455,9 @@ public Builder name(String name) { return this; } + /** + *

    The account's description.

    + */ @JsonSetter(value = "description", nulls = Nulls.SKIP) public Builder description(Optional description) { this.description = description; @@ -451,6 +469,9 @@ public Builder description(String description) { return this; } + /** + *

    The account's industry.

    + */ @JsonSetter(value = "industry", nulls = Nulls.SKIP) public Builder industry(Optional industry) { this.industry = industry; @@ -462,6 +483,9 @@ public Builder industry(String industry) { return this; } + /** + *

    The account's website.

    + */ @JsonSetter(value = "website", nulls = Nulls.SKIP) public Builder website(Optional website) { this.website = website; @@ -473,6 +497,9 @@ public Builder website(String website) { return this; } + /** + *

    The account's number of employees.

    + */ @JsonSetter(value = "number_of_employees", nulls = Nulls.SKIP) public Builder numberOfEmployees(Optional numberOfEmployees) { this.numberOfEmployees = numberOfEmployees; @@ -506,6 +533,9 @@ public Builder phoneNumbers(List phoneNumbers) { return this; } + /** + *

    The last date (either most recent or furthest in the future) of when an activity occurs in an account.

    + */ @JsonSetter(value = "last_activity_at", nulls = Nulls.SKIP) public Builder lastActivityAt(Optional lastActivityAt) { this.lastActivityAt = lastActivityAt; @@ -517,6 +547,9 @@ public Builder lastActivityAt(OffsetDateTime lastActivityAt) { return this; } + /** + *

    When the CRM system account data was last modified by a user with a login.

    + */ @JsonSetter(value = "remote_updated_at", nulls = Nulls.SKIP) public Builder remoteUpdatedAt(Optional remoteUpdatedAt) { this.remoteUpdatedAt = remoteUpdatedAt; @@ -528,6 +561,9 @@ public Builder remoteUpdatedAt(OffsetDateTime remoteUpdatedAt) { return this; } + /** + *

    When the third party's account was created.

    + */ @JsonSetter(value = "remote_created_at", nulls = Nulls.SKIP) public Builder remoteCreatedAt(Optional remoteCreatedAt) { this.remoteCreatedAt = remoteCreatedAt; @@ -539,6 +575,9 @@ public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/crm/types/AccountDetails.java b/src/main/java/com/merge/api/crm/types/AccountDetails.java index 56ce0b8a9..8c880b323 100644 --- a/src/main/java/com/merge/api/crm/types/AccountDetails.java +++ b/src/main/java/com/merge/api/crm/types/AccountDetails.java @@ -27,7 +27,7 @@ public final class AccountDetails { private final Optional integrationSlug; - private final Optional category; + private final Optional category; private final Optional endUserOriginId; @@ -51,7 +51,7 @@ private AccountDetails( Optional id, Optional integration, Optional integrationSlug, - Optional category, + Optional category, Optional endUserOriginId, Optional endUserOrganizationName, Optional endUserEmailAddress, @@ -92,7 +92,7 @@ public Optional getIntegrationSlug() { } @JsonProperty("category") - public Optional getCategory() { + public Optional getCategory() { return category; } @@ -202,7 +202,7 @@ public static final class Builder { private Optional integrationSlug = Optional.empty(); - private Optional category = Optional.empty(); + private Optional category = Optional.empty(); private Optional endUserOriginId = Optional.empty(); @@ -275,12 +275,12 @@ public Builder integrationSlug(String integrationSlug) { } @JsonSetter(value = "category", nulls = Nulls.SKIP) - public Builder category(Optional category) { + public Builder category(Optional category) { this.category = category; return this; } - public Builder category(CategoryEnum category) { + public Builder category(AccountDetailsCategory category) { this.category = Optional.ofNullable(category); return this; } @@ -340,6 +340,9 @@ public Builder webhookListenerUrl(String webhookListenerUrl) { return this; } + /** + *

    Whether a Production Linked Account's credentials match another existing Production Linked Account. This field is null for Test Linked Accounts, incomplete Production Linked Accounts, and ignored duplicate Production Linked Account sets.

    + */ @JsonSetter(value = "is_duplicate", nulls = Nulls.SKIP) public Builder isDuplicate(Optional isDuplicate) { this.isDuplicate = isDuplicate; @@ -362,6 +365,9 @@ public Builder accountType(String accountType) { return this; } + /** + *

    The time at which account completes the linking flow.

    + */ @JsonSetter(value = "completed_at", nulls = Nulls.SKIP) public Builder completedAt(Optional completedAt) { this.completedAt = completedAt; diff --git a/src/main/java/com/merge/api/crm/types/AccountDetailsAndActions.java b/src/main/java/com/merge/api/crm/types/AccountDetailsAndActions.java index cb797e4a6..96a91310d 100644 --- a/src/main/java/com/merge/api/crm/types/AccountDetailsAndActions.java +++ b/src/main/java/com/merge/api/crm/types/AccountDetailsAndActions.java @@ -24,9 +24,9 @@ public final class AccountDetailsAndActions { private final String id; - private final Optional category; + private final Optional category; - private final AccountDetailsAndActionsStatusEnum status; + private final AccountDetailsAndActionsStatus status; private final Optional statusDetail; @@ -52,8 +52,8 @@ public final class AccountDetailsAndActions { private AccountDetailsAndActions( String id, - Optional category, - AccountDetailsAndActionsStatusEnum status, + Optional category, + AccountDetailsAndActionsStatus status, Optional statusDetail, Optional endUserOriginId, String endUserOrganizationName, @@ -87,12 +87,12 @@ public String getId() { } @JsonProperty("category") - public Optional getCategory() { + public Optional getCategory() { return category; } @JsonProperty("status") - public AccountDetailsAndActionsStatusEnum getStatus() { + public AccountDetailsAndActionsStatus getStatus() { return status; } @@ -213,7 +213,7 @@ public interface IdStage { } public interface StatusStage { - EndUserOrganizationNameStage status(@NotNull AccountDetailsAndActionsStatusEnum status); + EndUserOrganizationNameStage status(@NotNull AccountDetailsAndActionsStatus status); } public interface EndUserOrganizationNameStage { @@ -239,9 +239,9 @@ public interface CompletedAtStage { public interface _FinalStage { AccountDetailsAndActions build(); - _FinalStage category(Optional category); + _FinalStage category(Optional category); - _FinalStage category(CategoryEnum category); + _FinalStage category(AccountDetailsAndActionsCategory category); _FinalStage statusDetail(Optional statusDetail); @@ -251,10 +251,16 @@ public interface _FinalStage { _FinalStage endUserOriginId(String endUserOriginId); + /** + *

    The tenant or domain the customer has provided access to.

    + */ _FinalStage subdomain(Optional subdomain); _FinalStage subdomain(String subdomain); + /** + *

    Whether a Production Linked Account's credentials match another existing Production Linked Account. This field is null for Test Linked Accounts, incomplete Production Linked Accounts, and ignored duplicate Production Linked Account sets.

    + */ _FinalStage isDuplicate(Optional isDuplicate); _FinalStage isDuplicate(Boolean isDuplicate); @@ -276,7 +282,7 @@ public static final class Builder _FinalStage { private String id; - private AccountDetailsAndActionsStatusEnum status; + private AccountDetailsAndActionsStatus status; private String endUserOrganizationName; @@ -298,7 +304,7 @@ public static final class Builder private Optional statusDetail = Optional.empty(); - private Optional category = Optional.empty(); + private Optional category = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -332,7 +338,7 @@ public StatusStage id(@NotNull String id) { @java.lang.Override @JsonSetter("status") - public EndUserOrganizationNameStage status(@NotNull AccountDetailsAndActionsStatusEnum status) { + public EndUserOrganizationNameStage status(@NotNull AccountDetailsAndActionsStatus status) { this.status = status; return this; } @@ -395,6 +401,9 @@ public _FinalStage isDuplicate(Boolean isDuplicate) { return this; } + /** + *

    Whether a Production Linked Account's credentials match another existing Production Linked Account. This field is null for Test Linked Accounts, incomplete Production Linked Accounts, and ignored duplicate Production Linked Account sets.

    + */ @java.lang.Override @JsonSetter(value = "is_duplicate", nulls = Nulls.SKIP) public _FinalStage isDuplicate(Optional isDuplicate) { @@ -412,6 +421,9 @@ public _FinalStage subdomain(String subdomain) { return this; } + /** + *

    The tenant or domain the customer has provided access to.

    + */ @java.lang.Override @JsonSetter(value = "subdomain", nulls = Nulls.SKIP) public _FinalStage subdomain(Optional subdomain) { @@ -446,14 +458,14 @@ public _FinalStage statusDetail(Optional statusDetail) { } @java.lang.Override - public _FinalStage category(CategoryEnum category) { + public _FinalStage category(AccountDetailsAndActionsCategory category) { this.category = Optional.ofNullable(category); return this; } @java.lang.Override @JsonSetter(value = "category", nulls = Nulls.SKIP) - public _FinalStage category(Optional category) { + public _FinalStage category(Optional category) { this.category = category; return this; } diff --git a/src/main/java/com/merge/api/crm/types/AccountDetailsAndActionsCategory.java b/src/main/java/com/merge/api/crm/types/AccountDetailsAndActionsCategory.java new file mode 100644 index 000000000..39b14c6b8 --- /dev/null +++ b/src/main/java/com/merge/api/crm/types/AccountDetailsAndActionsCategory.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.crm.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = AccountDetailsAndActionsCategory.Deserializer.class) +public final class AccountDetailsAndActionsCategory { + private final Object value; + + private final int type; + + private AccountDetailsAndActionsCategory(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((CategoryEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AccountDetailsAndActionsCategory && equalTo((AccountDetailsAndActionsCategory) other); + } + + private boolean equalTo(AccountDetailsAndActionsCategory other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static AccountDetailsAndActionsCategory of(CategoryEnum value) { + return new AccountDetailsAndActionsCategory(value, 0); + } + + public static AccountDetailsAndActionsCategory of(String value) { + return new AccountDetailsAndActionsCategory(value, 1); + } + + public interface Visitor { + T visit(CategoryEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(AccountDetailsAndActionsCategory.class); + } + + @java.lang.Override + public AccountDetailsAndActionsCategory deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, CategoryEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/crm/types/AccountDetailsAndActionsStatus.java b/src/main/java/com/merge/api/crm/types/AccountDetailsAndActionsStatus.java new file mode 100644 index 000000000..4657096ad --- /dev/null +++ b/src/main/java/com/merge/api/crm/types/AccountDetailsAndActionsStatus.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.crm.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = AccountDetailsAndActionsStatus.Deserializer.class) +public final class AccountDetailsAndActionsStatus { + private final Object value; + + private final int type; + + private AccountDetailsAndActionsStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((AccountDetailsAndActionsStatusEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AccountDetailsAndActionsStatus && equalTo((AccountDetailsAndActionsStatus) other); + } + + private boolean equalTo(AccountDetailsAndActionsStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static AccountDetailsAndActionsStatus of(AccountDetailsAndActionsStatusEnum value) { + return new AccountDetailsAndActionsStatus(value, 0); + } + + public static AccountDetailsAndActionsStatus of(String value) { + return new AccountDetailsAndActionsStatus(value, 1); + } + + public interface Visitor { + T visit(AccountDetailsAndActionsStatusEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(AccountDetailsAndActionsStatus.class); + } + + @java.lang.Override + public AccountDetailsAndActionsStatus deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, AccountDetailsAndActionsStatusEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/crm/types/AccountDetailsCategory.java b/src/main/java/com/merge/api/crm/types/AccountDetailsCategory.java new file mode 100644 index 000000000..a4b1d2f62 --- /dev/null +++ b/src/main/java/com/merge/api/crm/types/AccountDetailsCategory.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.crm.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = AccountDetailsCategory.Deserializer.class) +public final class AccountDetailsCategory { + private final Object value; + + private final int type; + + private AccountDetailsCategory(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((CategoryEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AccountDetailsCategory && equalTo((AccountDetailsCategory) other); + } + + private boolean equalTo(AccountDetailsCategory other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static AccountDetailsCategory of(CategoryEnum value) { + return new AccountDetailsCategory(value, 0); + } + + public static AccountDetailsCategory of(String value) { + return new AccountDetailsCategory(value, 1); + } + + public interface Visitor { + T visit(CategoryEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(AccountDetailsCategory.class); + } + + @java.lang.Override + public AccountDetailsCategory deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, CategoryEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/crm/types/AccountIntegration.java b/src/main/java/com/merge/api/crm/types/AccountIntegration.java index 18dbeaac2..a12c9158c 100644 --- a/src/main/java/com/merge/api/crm/types/AccountIntegration.java +++ b/src/main/java/com/merge/api/crm/types/AccountIntegration.java @@ -196,6 +196,9 @@ public static NameStage builder() { } public interface NameStage { + /** + * Company name. + */ _FinalStage name(@NotNull String name); Builder from(AccountIntegration other); @@ -204,22 +207,37 @@ public interface NameStage { public interface _FinalStage { AccountIntegration build(); + /** + *

    Optional. This shortened name appears in places with limited space, usually in conjunction with the platform's logo (e.g., Merge Link menu).<br><br>Example: <i>Workforce Now (in lieu of ADP Workforce Now), SuccessFactors (in lieu of SAP SuccessFactors)</i>

    + */ _FinalStage abbreviatedName(Optional abbreviatedName); _FinalStage abbreviatedName(String abbreviatedName); + /** + *

    Category or categories this integration belongs to. Multiple categories should be comma separated, i.e. [ats, hris].

    + */ _FinalStage categories(Optional> categories); _FinalStage categories(List categories); + /** + *

    Company logo in rectangular shape.

    + */ _FinalStage image(Optional image); _FinalStage image(String image); + /** + *

    Company logo in square shape.

    + */ _FinalStage squareImage(Optional squareImage); _FinalStage squareImage(String squareImage); + /** + *

    The color of this integration used for buttons and text throughout the app and landing pages. <b>Choose a darker, saturated color.</b>

    + */ _FinalStage color(Optional color); _FinalStage color(String color); @@ -228,14 +246,23 @@ public interface _FinalStage { _FinalStage slug(String slug); + /** + *

    Mapping of API endpoints to documentation urls for support. Example: {'GET': [['/common-model-scopes', 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], 'POST': []}

    + */ _FinalStage apiEndpointsToDocumentationUrls(Optional> apiEndpointsToDocumentationUrls); _FinalStage apiEndpointsToDocumentationUrls(Map apiEndpointsToDocumentationUrls); + /** + *

    Setup guide URL for third party webhook creation. Exposed in Merge Docs.

    + */ _FinalStage webhookSetupGuideUrl(Optional webhookSetupGuideUrl); _FinalStage webhookSetupGuideUrl(String webhookSetupGuideUrl); + /** + *

    Category or categories this integration is in beta status for.

    + */ _FinalStage categoryBetaStatus(Optional> categoryBetaStatus); _FinalStage categoryBetaStatus(Map categoryBetaStatus); @@ -284,7 +311,7 @@ public Builder from(AccountIntegration other) { } /** - *

    Company name.

    + * Company name.

    Company name.

    * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -304,6 +331,9 @@ public _FinalStage categoryBetaStatus(Map categoryBetaStatus) return this; } + /** + *

    Category or categories this integration is in beta status for.

    + */ @java.lang.Override @JsonSetter(value = "category_beta_status", nulls = Nulls.SKIP) public _FinalStage categoryBetaStatus(Optional> categoryBetaStatus) { @@ -321,6 +351,9 @@ public _FinalStage webhookSetupGuideUrl(String webhookSetupGuideUrl) { return this; } + /** + *

    Setup guide URL for third party webhook creation. Exposed in Merge Docs.

    + */ @java.lang.Override @JsonSetter(value = "webhook_setup_guide_url", nulls = Nulls.SKIP) public _FinalStage webhookSetupGuideUrl(Optional webhookSetupGuideUrl) { @@ -338,6 +371,9 @@ public _FinalStage apiEndpointsToDocumentationUrls(Map apiEndp return this; } + /** + *

    Mapping of API endpoints to documentation urls for support. Example: {'GET': [['/common-model-scopes', 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], 'POST': []}

    + */ @java.lang.Override @JsonSetter(value = "api_endpoints_to_documentation_urls", nulls = Nulls.SKIP) public _FinalStage apiEndpointsToDocumentationUrls( @@ -369,6 +405,9 @@ public _FinalStage color(String color) { return this; } + /** + *

    The color of this integration used for buttons and text throughout the app and landing pages. <b>Choose a darker, saturated color.</b>

    + */ @java.lang.Override @JsonSetter(value = "color", nulls = Nulls.SKIP) public _FinalStage color(Optional color) { @@ -386,6 +425,9 @@ public _FinalStage squareImage(String squareImage) { return this; } + /** + *

    Company logo in square shape.

    + */ @java.lang.Override @JsonSetter(value = "square_image", nulls = Nulls.SKIP) public _FinalStage squareImage(Optional squareImage) { @@ -403,6 +445,9 @@ public _FinalStage image(String image) { return this; } + /** + *

    Company logo in rectangular shape.

    + */ @java.lang.Override @JsonSetter(value = "image", nulls = Nulls.SKIP) public _FinalStage image(Optional image) { @@ -420,6 +465,9 @@ public _FinalStage categories(List categories) { return this; } + /** + *

    Category or categories this integration belongs to. Multiple categories should be comma separated, i.e. [ats, hris].

    + */ @java.lang.Override @JsonSetter(value = "categories", nulls = Nulls.SKIP) public _FinalStage categories(Optional> categories) { @@ -437,6 +485,9 @@ public _FinalStage abbreviatedName(String abbreviatedName) { return this; } + /** + *

    Optional. This shortened name appears in places with limited space, usually in conjunction with the platform's logo (e.g., Merge Link menu).<br><br>Example: <i>Workforce Now (in lieu of ADP Workforce Now), SuccessFactors (in lieu of SAP SuccessFactors)</i>

    + */ @java.lang.Override @JsonSetter(value = "abbreviated_name", nulls = Nulls.SKIP) public _FinalStage abbreviatedName(Optional abbreviatedName) { diff --git a/src/main/java/com/merge/api/crm/types/AccountRequest.java b/src/main/java/com/merge/api/crm/types/AccountRequest.java index a9b2293b5..4779d0e87 100644 --- a/src/main/java/com/merge/api/crm/types/AccountRequest.java +++ b/src/main/java/com/merge/api/crm/types/AccountRequest.java @@ -244,6 +244,9 @@ public Builder from(AccountRequest other) { return this; } + /** + *

    The account's owner.

    + */ @JsonSetter(value = "owner", nulls = Nulls.SKIP) public Builder owner(Optional owner) { this.owner = owner; @@ -255,6 +258,9 @@ public Builder owner(AccountRequestOwner owner) { return this; } + /** + *

    The account's name.

    + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -266,6 +272,9 @@ public Builder name(String name) { return this; } + /** + *

    The account's description.

    + */ @JsonSetter(value = "description", nulls = Nulls.SKIP) public Builder description(Optional description) { this.description = description; @@ -277,6 +286,9 @@ public Builder description(String description) { return this; } + /** + *

    The account's industry.

    + */ @JsonSetter(value = "industry", nulls = Nulls.SKIP) public Builder industry(Optional industry) { this.industry = industry; @@ -288,6 +300,9 @@ public Builder industry(String industry) { return this; } + /** + *

    The account's website.

    + */ @JsonSetter(value = "website", nulls = Nulls.SKIP) public Builder website(Optional website) { this.website = website; @@ -299,6 +314,9 @@ public Builder website(String website) { return this; } + /** + *

    The account's number of employees.

    + */ @JsonSetter(value = "number_of_employees", nulls = Nulls.SKIP) public Builder numberOfEmployees(Optional numberOfEmployees) { this.numberOfEmployees = numberOfEmployees; @@ -321,6 +339,9 @@ public Builder addresses(List addresses) { return this; } + /** + *

    The last date (either most recent or furthest in the future) of when an activity occurs in an account.

    + */ @JsonSetter(value = "last_activity_at", nulls = Nulls.SKIP) public Builder lastActivityAt(Optional lastActivityAt) { this.lastActivityAt = lastActivityAt; diff --git a/src/main/java/com/merge/api/crm/types/AccountsListRequest.java b/src/main/java/com/merge/api/crm/types/AccountsListRequest.java index 25aeeaf71..b302164a4 100644 --- a/src/main/java/com/merge/api/crm/types/AccountsListRequest.java +++ b/src/main/java/com/merge/api/crm/types/AccountsListRequest.java @@ -307,6 +307,9 @@ public Builder from(AccountsListRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -323,6 +326,9 @@ public Builder expand(String expand) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -334,6 +340,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -345,6 +354,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -356,6 +368,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -367,6 +382,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -378,6 +396,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

    + */ @JsonSetter(value = "include_remote_fields", nulls = Nulls.SKIP) public Builder includeRemoteFields(Optional includeRemoteFields) { this.includeRemoteFields = includeRemoteFields; @@ -389,6 +410,9 @@ public Builder includeRemoteFields(Boolean includeRemoteFields) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -400,6 +424,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -411,6 +438,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -422,6 +452,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    If provided, will only return accounts with this name.

    + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -433,6 +466,9 @@ public Builder name(String name) { return this; } + /** + *

    If provided, will only return accounts with this owner.

    + */ @JsonSetter(value = "owner_id", nulls = Nulls.SKIP) public Builder ownerId(Optional ownerId) { this.ownerId = ownerId; @@ -444,6 +480,9 @@ public Builder ownerId(String ownerId) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -455,6 +494,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; diff --git a/src/main/java/com/merge/api/crm/types/AccountsRemoteFieldClassesListRequest.java b/src/main/java/com/merge/api/crm/types/AccountsRemoteFieldClassesListRequest.java index f6c88086b..daade4518 100644 --- a/src/main/java/com/merge/api/crm/types/AccountsRemoteFieldClassesListRequest.java +++ b/src/main/java/com/merge/api/crm/types/AccountsRemoteFieldClassesListRequest.java @@ -32,6 +32,8 @@ public final class AccountsRemoteFieldClassesListRequest { private final Optional isCommonModelField; + private final Optional isCustom; + private final Optional pageSize; private final Map additionalProperties; @@ -43,6 +45,7 @@ private AccountsRemoteFieldClassesListRequest( Optional includeRemoteFields, Optional includeShellData, Optional isCommonModelField, + Optional isCustom, Optional pageSize, Map additionalProperties) { this.cursor = cursor; @@ -51,6 +54,7 @@ private AccountsRemoteFieldClassesListRequest( this.includeRemoteFields = includeRemoteFields; this.includeShellData = includeShellData; this.isCommonModelField = isCommonModelField; + this.isCustom = isCustom; this.pageSize = pageSize; this.additionalProperties = additionalProperties; } @@ -103,6 +107,14 @@ public Optional getIsCommonModelField() { return isCommonModelField; } + /** + * @return If provided, will only return remote fields classes with this is_custom value + */ + @JsonProperty("is_custom") + public Optional getIsCustom() { + return isCustom; + } + /** * @return Number of results to return per page. */ @@ -130,6 +142,7 @@ private boolean equalTo(AccountsRemoteFieldClassesListRequest other) { && includeRemoteFields.equals(other.includeRemoteFields) && includeShellData.equals(other.includeShellData) && isCommonModelField.equals(other.isCommonModelField) + && isCustom.equals(other.isCustom) && pageSize.equals(other.pageSize); } @@ -142,6 +155,7 @@ public int hashCode() { this.includeRemoteFields, this.includeShellData, this.isCommonModelField, + this.isCustom, this.pageSize); } @@ -168,6 +182,8 @@ public static final class Builder { private Optional isCommonModelField = Optional.empty(); + private Optional isCustom = Optional.empty(); + private Optional pageSize = Optional.empty(); @JsonAnySetter @@ -182,10 +198,14 @@ public Builder from(AccountsRemoteFieldClassesListRequest other) { includeRemoteFields(other.getIncludeRemoteFields()); includeShellData(other.getIncludeShellData()); isCommonModelField(other.getIsCommonModelField()); + isCustom(other.getIsCustom()); pageSize(other.getPageSize()); return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -197,6 +217,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -208,6 +231,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -219,6 +245,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

    + */ @JsonSetter(value = "include_remote_fields", nulls = Nulls.SKIP) public Builder includeRemoteFields(Optional includeRemoteFields) { this.includeRemoteFields = includeRemoteFields; @@ -230,6 +259,9 @@ public Builder includeRemoteFields(Boolean includeRemoteFields) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -241,6 +273,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, will only return remote field classes with this is_common_model_field value

    + */ @JsonSetter(value = "is_common_model_field", nulls = Nulls.SKIP) public Builder isCommonModelField(Optional isCommonModelField) { this.isCommonModelField = isCommonModelField; @@ -252,6 +287,23 @@ public Builder isCommonModelField(Boolean isCommonModelField) { return this; } + /** + *

    If provided, will only return remote fields classes with this is_custom value

    + */ + @JsonSetter(value = "is_custom", nulls = Nulls.SKIP) + public Builder isCustom(Optional isCustom) { + this.isCustom = isCustom; + return this; + } + + public Builder isCustom(Boolean isCustom) { + this.isCustom = Optional.ofNullable(isCustom); + return this; + } + + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -271,6 +323,7 @@ public AccountsRemoteFieldClassesListRequest build() { includeRemoteFields, includeShellData, isCommonModelField, + isCustom, pageSize, additionalProperties); } diff --git a/src/main/java/com/merge/api/crm/types/AccountsRetrieveRequest.java b/src/main/java/com/merge/api/crm/types/AccountsRetrieveRequest.java index 44011cda2..34492d31b 100644 --- a/src/main/java/com/merge/api/crm/types/AccountsRetrieveRequest.java +++ b/src/main/java/com/merge/api/crm/types/AccountsRetrieveRequest.java @@ -132,6 +132,9 @@ public Builder from(AccountsRetrieveRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -148,6 +151,9 @@ public Builder expand(String expand) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -159,6 +165,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

    + */ @JsonSetter(value = "include_remote_fields", nulls = Nulls.SKIP) public Builder includeRemoteFields(Optional includeRemoteFields) { this.includeRemoteFields = includeRemoteFields; @@ -170,6 +179,9 @@ public Builder includeRemoteFields(Boolean includeRemoteFields) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/crm/types/Address.java b/src/main/java/com/merge/api/crm/types/Address.java index 28a5c73b1..d2412c603 100644 --- a/src/main/java/com/merge/api/crm/types/Address.java +++ b/src/main/java/com/merge/api/crm/types/Address.java @@ -35,9 +35,9 @@ public final class Address { private final Optional postalCode; - private final Optional country; + private final Optional country; - private final Optional addressType; + private final Optional addressType; private final Map additionalProperties; @@ -49,8 +49,8 @@ private Address( Optional city, Optional state, Optional postalCode, - Optional country, - Optional addressType, + Optional country, + Optional addressType, Map additionalProperties) { this.createdAt = createdAt; this.modifiedAt = modifiedAt; @@ -375,7 +375,7 @@ public Optional getPostalCode() { * */ @JsonProperty("country") - public Optional getCountry() { + public Optional getCountry() { return country; } @@ -387,7 +387,7 @@ public Optional getCountry() { * */ @JsonProperty("address_type") - public Optional getAddressType() { + public Optional getAddressType() { return addressType; } @@ -453,9 +453,9 @@ public static final class Builder { private Optional postalCode = Optional.empty(); - private Optional country = Optional.empty(); + private Optional country = Optional.empty(); - private Optional addressType = Optional.empty(); + private Optional addressType = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -475,6 +475,9 @@ public Builder from(Address other) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -486,6 +489,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -497,6 +503,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    Line 1 of the address's street.

    + */ @JsonSetter(value = "street_1", nulls = Nulls.SKIP) public Builder street1(Optional street1) { this.street1 = street1; @@ -508,6 +517,9 @@ public Builder street1(String street1) { return this; } + /** + *

    Line 2 of the address's street.

    + */ @JsonSetter(value = "street_2", nulls = Nulls.SKIP) public Builder street2(Optional street2) { this.street2 = street2; @@ -519,6 +531,9 @@ public Builder street2(String street2) { return this; } + /** + *

    The address's city.

    + */ @JsonSetter(value = "city", nulls = Nulls.SKIP) public Builder city(Optional city) { this.city = city; @@ -530,6 +545,9 @@ public Builder city(String city) { return this; } + /** + *

    The address's state.

    + */ @JsonSetter(value = "state", nulls = Nulls.SKIP) public Builder state(Optional state) { this.state = state; @@ -541,6 +559,9 @@ public Builder state(String state) { return this; } + /** + *

    The address's postal code.

    + */ @JsonSetter(value = "postal_code", nulls = Nulls.SKIP) public Builder postalCode(Optional postalCode) { this.postalCode = postalCode; @@ -552,24 +573,285 @@ public Builder postalCode(String postalCode) { return this; } + /** + *

    The address's country.

    + *
      + *
    • AF - Afghanistan
    • + *
    • AX - Åland Islands
    • + *
    • AL - Albania
    • + *
    • DZ - Algeria
    • + *
    • AS - American Samoa
    • + *
    • AD - Andorra
    • + *
    • AO - Angola
    • + *
    • AI - Anguilla
    • + *
    • AQ - Antarctica
    • + *
    • AG - Antigua and Barbuda
    • + *
    • AR - Argentina
    • + *
    • AM - Armenia
    • + *
    • AW - Aruba
    • + *
    • AU - Australia
    • + *
    • AT - Austria
    • + *
    • AZ - Azerbaijan
    • + *
    • BS - Bahamas
    • + *
    • BH - Bahrain
    • + *
    • BD - Bangladesh
    • + *
    • BB - Barbados
    • + *
    • BY - Belarus
    • + *
    • BE - Belgium
    • + *
    • BZ - Belize
    • + *
    • BJ - Benin
    • + *
    • BM - Bermuda
    • + *
    • BT - Bhutan
    • + *
    • BO - Bolivia
    • + *
    • BQ - Bonaire, Sint Eustatius and Saba
    • + *
    • BA - Bosnia and Herzegovina
    • + *
    • BW - Botswana
    • + *
    • BV - Bouvet Island
    • + *
    • BR - Brazil
    • + *
    • IO - British Indian Ocean Territory
    • + *
    • BN - Brunei
    • + *
    • BG - Bulgaria
    • + *
    • BF - Burkina Faso
    • + *
    • BI - Burundi
    • + *
    • CV - Cabo Verde
    • + *
    • KH - Cambodia
    • + *
    • CM - Cameroon
    • + *
    • CA - Canada
    • + *
    • KY - Cayman Islands
    • + *
    • CF - Central African Republic
    • + *
    • TD - Chad
    • + *
    • CL - Chile
    • + *
    • CN - China
    • + *
    • CX - Christmas Island
    • + *
    • CC - Cocos (Keeling) Islands
    • + *
    • CO - Colombia
    • + *
    • KM - Comoros
    • + *
    • CG - Congo
    • + *
    • CD - Congo (the Democratic Republic of the)
    • + *
    • CK - Cook Islands
    • + *
    • CR - Costa Rica
    • + *
    • CI - Côte d'Ivoire
    • + *
    • HR - Croatia
    • + *
    • CU - Cuba
    • + *
    • CW - Curaçao
    • + *
    • CY - Cyprus
    • + *
    • CZ - Czechia
    • + *
    • DK - Denmark
    • + *
    • DJ - Djibouti
    • + *
    • DM - Dominica
    • + *
    • DO - Dominican Republic
    • + *
    • EC - Ecuador
    • + *
    • EG - Egypt
    • + *
    • SV - El Salvador
    • + *
    • GQ - Equatorial Guinea
    • + *
    • ER - Eritrea
    • + *
    • EE - Estonia
    • + *
    • SZ - Eswatini
    • + *
    • ET - Ethiopia
    • + *
    • FK - Falkland Islands (Malvinas)
    • + *
    • FO - Faroe Islands
    • + *
    • FJ - Fiji
    • + *
    • FI - Finland
    • + *
    • FR - France
    • + *
    • GF - French Guiana
    • + *
    • PF - French Polynesia
    • + *
    • TF - French Southern Territories
    • + *
    • GA - Gabon
    • + *
    • GM - Gambia
    • + *
    • GE - Georgia
    • + *
    • DE - Germany
    • + *
    • GH - Ghana
    • + *
    • GI - Gibraltar
    • + *
    • GR - Greece
    • + *
    • GL - Greenland
    • + *
    • GD - Grenada
    • + *
    • GP - Guadeloupe
    • + *
    • GU - Guam
    • + *
    • GT - Guatemala
    • + *
    • GG - Guernsey
    • + *
    • GN - Guinea
    • + *
    • GW - Guinea-Bissau
    • + *
    • GY - Guyana
    • + *
    • HT - Haiti
    • + *
    • HM - Heard Island and McDonald Islands
    • + *
    • VA - Holy See
    • + *
    • HN - Honduras
    • + *
    • HK - Hong Kong
    • + *
    • HU - Hungary
    • + *
    • IS - Iceland
    • + *
    • IN - India
    • + *
    • ID - Indonesia
    • + *
    • IR - Iran
    • + *
    • IQ - Iraq
    • + *
    • IE - Ireland
    • + *
    • IM - Isle of Man
    • + *
    • IL - Israel
    • + *
    • IT - Italy
    • + *
    • JM - Jamaica
    • + *
    • JP - Japan
    • + *
    • JE - Jersey
    • + *
    • JO - Jordan
    • + *
    • KZ - Kazakhstan
    • + *
    • KE - Kenya
    • + *
    • KI - Kiribati
    • + *
    • KW - Kuwait
    • + *
    • KG - Kyrgyzstan
    • + *
    • LA - Laos
    • + *
    • LV - Latvia
    • + *
    • LB - Lebanon
    • + *
    • LS - Lesotho
    • + *
    • LR - Liberia
    • + *
    • LY - Libya
    • + *
    • LI - Liechtenstein
    • + *
    • LT - Lithuania
    • + *
    • LU - Luxembourg
    • + *
    • MO - Macao
    • + *
    • MG - Madagascar
    • + *
    • MW - Malawi
    • + *
    • MY - Malaysia
    • + *
    • MV - Maldives
    • + *
    • ML - Mali
    • + *
    • MT - Malta
    • + *
    • MH - Marshall Islands
    • + *
    • MQ - Martinique
    • + *
    • MR - Mauritania
    • + *
    • MU - Mauritius
    • + *
    • YT - Mayotte
    • + *
    • MX - Mexico
    • + *
    • FM - Micronesia (Federated States of)
    • + *
    • MD - Moldova
    • + *
    • MC - Monaco
    • + *
    • MN - Mongolia
    • + *
    • ME - Montenegro
    • + *
    • MS - Montserrat
    • + *
    • MA - Morocco
    • + *
    • MZ - Mozambique
    • + *
    • MM - Myanmar
    • + *
    • NA - Namibia
    • + *
    • NR - Nauru
    • + *
    • NP - Nepal
    • + *
    • NL - Netherlands
    • + *
    • NC - New Caledonia
    • + *
    • NZ - New Zealand
    • + *
    • NI - Nicaragua
    • + *
    • NE - Niger
    • + *
    • NG - Nigeria
    • + *
    • NU - Niue
    • + *
    • NF - Norfolk Island
    • + *
    • KP - North Korea
    • + *
    • MK - North Macedonia
    • + *
    • MP - Northern Mariana Islands
    • + *
    • NO - Norway
    • + *
    • OM - Oman
    • + *
    • PK - Pakistan
    • + *
    • PW - Palau
    • + *
    • PS - Palestine, State of
    • + *
    • PA - Panama
    • + *
    • PG - Papua New Guinea
    • + *
    • PY - Paraguay
    • + *
    • PE - Peru
    • + *
    • PH - Philippines
    • + *
    • PN - Pitcairn
    • + *
    • PL - Poland
    • + *
    • PT - Portugal
    • + *
    • PR - Puerto Rico
    • + *
    • QA - Qatar
    • + *
    • RE - Réunion
    • + *
    • RO - Romania
    • + *
    • RU - Russia
    • + *
    • RW - Rwanda
    • + *
    • BL - Saint Barthélemy
    • + *
    • SH - Saint Helena, Ascension and Tristan da Cunha
    • + *
    • KN - Saint Kitts and Nevis
    • + *
    • LC - Saint Lucia
    • + *
    • MF - Saint Martin (French part)
    • + *
    • PM - Saint Pierre and Miquelon
    • + *
    • VC - Saint Vincent and the Grenadines
    • + *
    • WS - Samoa
    • + *
    • SM - San Marino
    • + *
    • ST - Sao Tome and Principe
    • + *
    • SA - Saudi Arabia
    • + *
    • SN - Senegal
    • + *
    • RS - Serbia
    • + *
    • SC - Seychelles
    • + *
    • SL - Sierra Leone
    • + *
    • SG - Singapore
    • + *
    • SX - Sint Maarten (Dutch part)
    • + *
    • SK - Slovakia
    • + *
    • SI - Slovenia
    • + *
    • SB - Solomon Islands
    • + *
    • SO - Somalia
    • + *
    • ZA - South Africa
    • + *
    • GS - South Georgia and the South Sandwich Islands
    • + *
    • KR - South Korea
    • + *
    • SS - South Sudan
    • + *
    • ES - Spain
    • + *
    • LK - Sri Lanka
    • + *
    • SD - Sudan
    • + *
    • SR - Suriname
    • + *
    • SJ - Svalbard and Jan Mayen
    • + *
    • SE - Sweden
    • + *
    • CH - Switzerland
    • + *
    • SY - Syria
    • + *
    • TW - Taiwan
    • + *
    • TJ - Tajikistan
    • + *
    • TZ - Tanzania
    • + *
    • TH - Thailand
    • + *
    • TL - Timor-Leste
    • + *
    • TG - Togo
    • + *
    • TK - Tokelau
    • + *
    • TO - Tonga
    • + *
    • TT - Trinidad and Tobago
    • + *
    • TN - Tunisia
    • + *
    • TR - Turkey
    • + *
    • TM - Turkmenistan
    • + *
    • TC - Turks and Caicos Islands
    • + *
    • TV - Tuvalu
    • + *
    • UG - Uganda
    • + *
    • UA - Ukraine
    • + *
    • AE - United Arab Emirates
    • + *
    • GB - United Kingdom
    • + *
    • UM - United States Minor Outlying Islands
    • + *
    • US - United States of America
    • + *
    • UY - Uruguay
    • + *
    • UZ - Uzbekistan
    • + *
    • VU - Vanuatu
    • + *
    • VE - Venezuela
    • + *
    • VN - Vietnam
    • + *
    • VG - Virgin Islands (British)
    • + *
    • VI - Virgin Islands (U.S.)
    • + *
    • WF - Wallis and Futuna
    • + *
    • EH - Western Sahara
    • + *
    • YE - Yemen
    • + *
    • ZM - Zambia
    • + *
    • ZW - Zimbabwe
    • + *
    + */ @JsonSetter(value = "country", nulls = Nulls.SKIP) - public Builder country(Optional country) { + public Builder country(Optional country) { this.country = country; return this; } - public Builder country(CountryEnum country) { + public Builder country(AddressCountry country) { this.country = Optional.ofNullable(country); return this; } + /** + *

    The address type.

    + *
      + *
    • BILLING - BILLING
    • + *
    • SHIPPING - SHIPPING
    • + *
    + */ @JsonSetter(value = "address_type", nulls = Nulls.SKIP) - public Builder addressType(Optional addressType) { + public Builder addressType(Optional addressType) { this.addressType = addressType; return this; } - public Builder addressType(AddressTypeEnum addressType) { + public Builder addressType(AddressAddressType addressType) { this.addressType = Optional.ofNullable(addressType); return this; } diff --git a/src/main/java/com/merge/api/crm/types/AddressAddressType.java b/src/main/java/com/merge/api/crm/types/AddressAddressType.java new file mode 100644 index 000000000..9e09661f8 --- /dev/null +++ b/src/main/java/com/merge/api/crm/types/AddressAddressType.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.crm.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = AddressAddressType.Deserializer.class) +public final class AddressAddressType { + private final Object value; + + private final int type; + + private AddressAddressType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((AddressTypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AddressAddressType && equalTo((AddressAddressType) other); + } + + private boolean equalTo(AddressAddressType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static AddressAddressType of(AddressTypeEnum value) { + return new AddressAddressType(value, 0); + } + + public static AddressAddressType of(String value) { + return new AddressAddressType(value, 1); + } + + public interface Visitor { + T visit(AddressTypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(AddressAddressType.class); + } + + @java.lang.Override + public AddressAddressType deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, AddressTypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/crm/types/AddressCountry.java b/src/main/java/com/merge/api/crm/types/AddressCountry.java new file mode 100644 index 000000000..e314d027a --- /dev/null +++ b/src/main/java/com/merge/api/crm/types/AddressCountry.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.crm.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = AddressCountry.Deserializer.class) +public final class AddressCountry { + private final Object value; + + private final int type; + + private AddressCountry(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((CountryEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AddressCountry && equalTo((AddressCountry) other); + } + + private boolean equalTo(AddressCountry other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static AddressCountry of(CountryEnum value) { + return new AddressCountry(value, 0); + } + + public static AddressCountry of(String value) { + return new AddressCountry(value, 1); + } + + public interface Visitor { + T visit(CountryEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(AddressCountry.class); + } + + @java.lang.Override + public AddressCountry deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, CountryEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/crm/types/AddressRequest.java b/src/main/java/com/merge/api/crm/types/AddressRequest.java index 622673cea..e01cab9d3 100644 --- a/src/main/java/com/merge/api/crm/types/AddressRequest.java +++ b/src/main/java/com/merge/api/crm/types/AddressRequest.java @@ -31,9 +31,9 @@ public final class AddressRequest { private final Optional postalCode; - private final Optional country; + private final Optional country; - private final Optional addressType; + private final Optional addressType; private final Optional> integrationParams; @@ -47,8 +47,8 @@ private AddressRequest( Optional city, Optional state, Optional postalCode, - Optional country, - Optional addressType, + Optional country, + Optional addressType, Optional> integrationParams, Optional> linkedAccountParams, Map additionalProperties) { @@ -359,7 +359,7 @@ public Optional getPostalCode() { * */ @JsonProperty("country") - public Optional getCountry() { + public Optional getCountry() { return country; } @@ -371,7 +371,7 @@ public Optional getCountry() { * */ @JsonProperty("address_type") - public Optional getAddressType() { + public Optional getAddressType() { return addressType; } @@ -443,9 +443,9 @@ public static final class Builder { private Optional postalCode = Optional.empty(); - private Optional country = Optional.empty(); + private Optional country = Optional.empty(); - private Optional addressType = Optional.empty(); + private Optional addressType = Optional.empty(); private Optional> integrationParams = Optional.empty(); @@ -469,6 +469,9 @@ public Builder from(AddressRequest other) { return this; } + /** + *

    Line 1 of the address's street.

    + */ @JsonSetter(value = "street_1", nulls = Nulls.SKIP) public Builder street1(Optional street1) { this.street1 = street1; @@ -480,6 +483,9 @@ public Builder street1(String street1) { return this; } + /** + *

    Line 2 of the address's street.

    + */ @JsonSetter(value = "street_2", nulls = Nulls.SKIP) public Builder street2(Optional street2) { this.street2 = street2; @@ -491,6 +497,9 @@ public Builder street2(String street2) { return this; } + /** + *

    The address's city.

    + */ @JsonSetter(value = "city", nulls = Nulls.SKIP) public Builder city(Optional city) { this.city = city; @@ -502,6 +511,9 @@ public Builder city(String city) { return this; } + /** + *

    The address's state.

    + */ @JsonSetter(value = "state", nulls = Nulls.SKIP) public Builder state(Optional state) { this.state = state; @@ -513,6 +525,9 @@ public Builder state(String state) { return this; } + /** + *

    The address's postal code.

    + */ @JsonSetter(value = "postal_code", nulls = Nulls.SKIP) public Builder postalCode(Optional postalCode) { this.postalCode = postalCode; @@ -524,24 +539,285 @@ public Builder postalCode(String postalCode) { return this; } + /** + *

    The address's country.

    + *
      + *
    • AF - Afghanistan
    • + *
    • AX - Åland Islands
    • + *
    • AL - Albania
    • + *
    • DZ - Algeria
    • + *
    • AS - American Samoa
    • + *
    • AD - Andorra
    • + *
    • AO - Angola
    • + *
    • AI - Anguilla
    • + *
    • AQ - Antarctica
    • + *
    • AG - Antigua and Barbuda
    • + *
    • AR - Argentina
    • + *
    • AM - Armenia
    • + *
    • AW - Aruba
    • + *
    • AU - Australia
    • + *
    • AT - Austria
    • + *
    • AZ - Azerbaijan
    • + *
    • BS - Bahamas
    • + *
    • BH - Bahrain
    • + *
    • BD - Bangladesh
    • + *
    • BB - Barbados
    • + *
    • BY - Belarus
    • + *
    • BE - Belgium
    • + *
    • BZ - Belize
    • + *
    • BJ - Benin
    • + *
    • BM - Bermuda
    • + *
    • BT - Bhutan
    • + *
    • BO - Bolivia
    • + *
    • BQ - Bonaire, Sint Eustatius and Saba
    • + *
    • BA - Bosnia and Herzegovina
    • + *
    • BW - Botswana
    • + *
    • BV - Bouvet Island
    • + *
    • BR - Brazil
    • + *
    • IO - British Indian Ocean Territory
    • + *
    • BN - Brunei
    • + *
    • BG - Bulgaria
    • + *
    • BF - Burkina Faso
    • + *
    • BI - Burundi
    • + *
    • CV - Cabo Verde
    • + *
    • KH - Cambodia
    • + *
    • CM - Cameroon
    • + *
    • CA - Canada
    • + *
    • KY - Cayman Islands
    • + *
    • CF - Central African Republic
    • + *
    • TD - Chad
    • + *
    • CL - Chile
    • + *
    • CN - China
    • + *
    • CX - Christmas Island
    • + *
    • CC - Cocos (Keeling) Islands
    • + *
    • CO - Colombia
    • + *
    • KM - Comoros
    • + *
    • CG - Congo
    • + *
    • CD - Congo (the Democratic Republic of the)
    • + *
    • CK - Cook Islands
    • + *
    • CR - Costa Rica
    • + *
    • CI - Côte d'Ivoire
    • + *
    • HR - Croatia
    • + *
    • CU - Cuba
    • + *
    • CW - Curaçao
    • + *
    • CY - Cyprus
    • + *
    • CZ - Czechia
    • + *
    • DK - Denmark
    • + *
    • DJ - Djibouti
    • + *
    • DM - Dominica
    • + *
    • DO - Dominican Republic
    • + *
    • EC - Ecuador
    • + *
    • EG - Egypt
    • + *
    • SV - El Salvador
    • + *
    • GQ - Equatorial Guinea
    • + *
    • ER - Eritrea
    • + *
    • EE - Estonia
    • + *
    • SZ - Eswatini
    • + *
    • ET - Ethiopia
    • + *
    • FK - Falkland Islands (Malvinas)
    • + *
    • FO - Faroe Islands
    • + *
    • FJ - Fiji
    • + *
    • FI - Finland
    • + *
    • FR - France
    • + *
    • GF - French Guiana
    • + *
    • PF - French Polynesia
    • + *
    • TF - French Southern Territories
    • + *
    • GA - Gabon
    • + *
    • GM - Gambia
    • + *
    • GE - Georgia
    • + *
    • DE - Germany
    • + *
    • GH - Ghana
    • + *
    • GI - Gibraltar
    • + *
    • GR - Greece
    • + *
    • GL - Greenland
    • + *
    • GD - Grenada
    • + *
    • GP - Guadeloupe
    • + *
    • GU - Guam
    • + *
    • GT - Guatemala
    • + *
    • GG - Guernsey
    • + *
    • GN - Guinea
    • + *
    • GW - Guinea-Bissau
    • + *
    • GY - Guyana
    • + *
    • HT - Haiti
    • + *
    • HM - Heard Island and McDonald Islands
    • + *
    • VA - Holy See
    • + *
    • HN - Honduras
    • + *
    • HK - Hong Kong
    • + *
    • HU - Hungary
    • + *
    • IS - Iceland
    • + *
    • IN - India
    • + *
    • ID - Indonesia
    • + *
    • IR - Iran
    • + *
    • IQ - Iraq
    • + *
    • IE - Ireland
    • + *
    • IM - Isle of Man
    • + *
    • IL - Israel
    • + *
    • IT - Italy
    • + *
    • JM - Jamaica
    • + *
    • JP - Japan
    • + *
    • JE - Jersey
    • + *
    • JO - Jordan
    • + *
    • KZ - Kazakhstan
    • + *
    • KE - Kenya
    • + *
    • KI - Kiribati
    • + *
    • KW - Kuwait
    • + *
    • KG - Kyrgyzstan
    • + *
    • LA - Laos
    • + *
    • LV - Latvia
    • + *
    • LB - Lebanon
    • + *
    • LS - Lesotho
    • + *
    • LR - Liberia
    • + *
    • LY - Libya
    • + *
    • LI - Liechtenstein
    • + *
    • LT - Lithuania
    • + *
    • LU - Luxembourg
    • + *
    • MO - Macao
    • + *
    • MG - Madagascar
    • + *
    • MW - Malawi
    • + *
    • MY - Malaysia
    • + *
    • MV - Maldives
    • + *
    • ML - Mali
    • + *
    • MT - Malta
    • + *
    • MH - Marshall Islands
    • + *
    • MQ - Martinique
    • + *
    • MR - Mauritania
    • + *
    • MU - Mauritius
    • + *
    • YT - Mayotte
    • + *
    • MX - Mexico
    • + *
    • FM - Micronesia (Federated States of)
    • + *
    • MD - Moldova
    • + *
    • MC - Monaco
    • + *
    • MN - Mongolia
    • + *
    • ME - Montenegro
    • + *
    • MS - Montserrat
    • + *
    • MA - Morocco
    • + *
    • MZ - Mozambique
    • + *
    • MM - Myanmar
    • + *
    • NA - Namibia
    • + *
    • NR - Nauru
    • + *
    • NP - Nepal
    • + *
    • NL - Netherlands
    • + *
    • NC - New Caledonia
    • + *
    • NZ - New Zealand
    • + *
    • NI - Nicaragua
    • + *
    • NE - Niger
    • + *
    • NG - Nigeria
    • + *
    • NU - Niue
    • + *
    • NF - Norfolk Island
    • + *
    • KP - North Korea
    • + *
    • MK - North Macedonia
    • + *
    • MP - Northern Mariana Islands
    • + *
    • NO - Norway
    • + *
    • OM - Oman
    • + *
    • PK - Pakistan
    • + *
    • PW - Palau
    • + *
    • PS - Palestine, State of
    • + *
    • PA - Panama
    • + *
    • PG - Papua New Guinea
    • + *
    • PY - Paraguay
    • + *
    • PE - Peru
    • + *
    • PH - Philippines
    • + *
    • PN - Pitcairn
    • + *
    • PL - Poland
    • + *
    • PT - Portugal
    • + *
    • PR - Puerto Rico
    • + *
    • QA - Qatar
    • + *
    • RE - Réunion
    • + *
    • RO - Romania
    • + *
    • RU - Russia
    • + *
    • RW - Rwanda
    • + *
    • BL - Saint Barthélemy
    • + *
    • SH - Saint Helena, Ascension and Tristan da Cunha
    • + *
    • KN - Saint Kitts and Nevis
    • + *
    • LC - Saint Lucia
    • + *
    • MF - Saint Martin (French part)
    • + *
    • PM - Saint Pierre and Miquelon
    • + *
    • VC - Saint Vincent and the Grenadines
    • + *
    • WS - Samoa
    • + *
    • SM - San Marino
    • + *
    • ST - Sao Tome and Principe
    • + *
    • SA - Saudi Arabia
    • + *
    • SN - Senegal
    • + *
    • RS - Serbia
    • + *
    • SC - Seychelles
    • + *
    • SL - Sierra Leone
    • + *
    • SG - Singapore
    • + *
    • SX - Sint Maarten (Dutch part)
    • + *
    • SK - Slovakia
    • + *
    • SI - Slovenia
    • + *
    • SB - Solomon Islands
    • + *
    • SO - Somalia
    • + *
    • ZA - South Africa
    • + *
    • GS - South Georgia and the South Sandwich Islands
    • + *
    • KR - South Korea
    • + *
    • SS - South Sudan
    • + *
    • ES - Spain
    • + *
    • LK - Sri Lanka
    • + *
    • SD - Sudan
    • + *
    • SR - Suriname
    • + *
    • SJ - Svalbard and Jan Mayen
    • + *
    • SE - Sweden
    • + *
    • CH - Switzerland
    • + *
    • SY - Syria
    • + *
    • TW - Taiwan
    • + *
    • TJ - Tajikistan
    • + *
    • TZ - Tanzania
    • + *
    • TH - Thailand
    • + *
    • TL - Timor-Leste
    • + *
    • TG - Togo
    • + *
    • TK - Tokelau
    • + *
    • TO - Tonga
    • + *
    • TT - Trinidad and Tobago
    • + *
    • TN - Tunisia
    • + *
    • TR - Turkey
    • + *
    • TM - Turkmenistan
    • + *
    • TC - Turks and Caicos Islands
    • + *
    • TV - Tuvalu
    • + *
    • UG - Uganda
    • + *
    • UA - Ukraine
    • + *
    • AE - United Arab Emirates
    • + *
    • GB - United Kingdom
    • + *
    • UM - United States Minor Outlying Islands
    • + *
    • US - United States of America
    • + *
    • UY - Uruguay
    • + *
    • UZ - Uzbekistan
    • + *
    • VU - Vanuatu
    • + *
    • VE - Venezuela
    • + *
    • VN - Vietnam
    • + *
    • VG - Virgin Islands (British)
    • + *
    • VI - Virgin Islands (U.S.)
    • + *
    • WF - Wallis and Futuna
    • + *
    • EH - Western Sahara
    • + *
    • YE - Yemen
    • + *
    • ZM - Zambia
    • + *
    • ZW - Zimbabwe
    • + *
    + */ @JsonSetter(value = "country", nulls = Nulls.SKIP) - public Builder country(Optional country) { + public Builder country(Optional country) { this.country = country; return this; } - public Builder country(CountryEnum country) { + public Builder country(AddressRequestCountry country) { this.country = Optional.ofNullable(country); return this; } + /** + *

    The address type.

    + *
      + *
    • BILLING - BILLING
    • + *
    • SHIPPING - SHIPPING
    • + *
    + */ @JsonSetter(value = "address_type", nulls = Nulls.SKIP) - public Builder addressType(Optional addressType) { + public Builder addressType(Optional addressType) { this.addressType = addressType; return this; } - public Builder addressType(AddressTypeEnum addressType) { + public Builder addressType(AddressRequestAddressType addressType) { this.addressType = Optional.ofNullable(addressType); return this; } diff --git a/src/main/java/com/merge/api/crm/types/AddressRequestAddressType.java b/src/main/java/com/merge/api/crm/types/AddressRequestAddressType.java new file mode 100644 index 000000000..95717d5e7 --- /dev/null +++ b/src/main/java/com/merge/api/crm/types/AddressRequestAddressType.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.crm.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = AddressRequestAddressType.Deserializer.class) +public final class AddressRequestAddressType { + private final Object value; + + private final int type; + + private AddressRequestAddressType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((AddressTypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AddressRequestAddressType && equalTo((AddressRequestAddressType) other); + } + + private boolean equalTo(AddressRequestAddressType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static AddressRequestAddressType of(AddressTypeEnum value) { + return new AddressRequestAddressType(value, 0); + } + + public static AddressRequestAddressType of(String value) { + return new AddressRequestAddressType(value, 1); + } + + public interface Visitor { + T visit(AddressTypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(AddressRequestAddressType.class); + } + + @java.lang.Override + public AddressRequestAddressType deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, AddressTypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/crm/types/AddressRequestCountry.java b/src/main/java/com/merge/api/crm/types/AddressRequestCountry.java new file mode 100644 index 000000000..d75dd33d3 --- /dev/null +++ b/src/main/java/com/merge/api/crm/types/AddressRequestCountry.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.crm.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = AddressRequestCountry.Deserializer.class) +public final class AddressRequestCountry { + private final Object value; + + private final int type; + + private AddressRequestCountry(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((CountryEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AddressRequestCountry && equalTo((AddressRequestCountry) other); + } + + private boolean equalTo(AddressRequestCountry other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static AddressRequestCountry of(CountryEnum value) { + return new AddressRequestCountry(value, 0); + } + + public static AddressRequestCountry of(String value) { + return new AddressRequestCountry(value, 1); + } + + public interface Visitor { + T visit(CountryEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(AddressRequestCountry.class); + } + + @java.lang.Override + public AddressRequestCountry deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, CountryEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/crm/types/Association.java b/src/main/java/com/merge/api/crm/types/Association.java index 9c42abfbb..d0b9729dc 100644 --- a/src/main/java/com/merge/api/crm/types/Association.java +++ b/src/main/java/com/merge/api/crm/types/Association.java @@ -142,6 +142,9 @@ public Builder from(Association other) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -153,6 +156,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -186,6 +192,9 @@ public Builder targetObject(String targetObject) { return this; } + /** + *

    The association type the association belongs to.

    + */ @JsonSetter(value = "association_type", nulls = Nulls.SKIP) public Builder associationType(Optional associationType) { this.associationType = associationType; diff --git a/src/main/java/com/merge/api/crm/types/AssociationSubType.java b/src/main/java/com/merge/api/crm/types/AssociationSubType.java index d370d615f..ce586153e 100644 --- a/src/main/java/com/merge/api/crm/types/AssociationSubType.java +++ b/src/main/java/com/merge/api/crm/types/AssociationSubType.java @@ -136,6 +136,9 @@ public Builder id(String id) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -147,6 +150,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; diff --git a/src/main/java/com/merge/api/crm/types/AssociationType.java b/src/main/java/com/merge/api/crm/types/AssociationType.java index b28b7b351..3d74bd4e4 100644 --- a/src/main/java/com/merge/api/crm/types/AssociationType.java +++ b/src/main/java/com/merge/api/crm/types/AssociationType.java @@ -39,7 +39,7 @@ public final class AssociationType { private final Optional displayName; - private final Optional cardinality; + private final Optional cardinality; private final Optional isRequired; @@ -54,7 +54,7 @@ private AssociationType( Optional> targetObjectClasses, Optional remoteKeyName, Optional displayName, - Optional cardinality, + Optional cardinality, Optional isRequired, Map additionalProperties) { this.id = id; @@ -123,7 +123,7 @@ public Optional getDisplayName() { } @JsonProperty("cardinality") - public Optional getCardinality() { + public Optional getCardinality() { return cardinality; } @@ -198,7 +198,7 @@ public static final class Builder { private Optional displayName = Optional.empty(); - private Optional cardinality = Optional.empty(); + private Optional cardinality = Optional.empty(); private Optional isRequired = Optional.empty(); @@ -232,6 +232,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -243,6 +246,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -254,6 +260,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -265,6 +274,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The class of the source object (Custom Object or Common Model) for the association type.

    + */ @JsonSetter(value = "source_object_class", nulls = Nulls.SKIP) public Builder sourceObjectClass(Optional> sourceObjectClass) { this.sourceObjectClass = sourceObjectClass; @@ -310,12 +322,12 @@ public Builder displayName(String displayName) { } @JsonSetter(value = "cardinality", nulls = Nulls.SKIP) - public Builder cardinality(Optional cardinality) { + public Builder cardinality(Optional cardinality) { this.cardinality = cardinality; return this; } - public Builder cardinality(CardinalityEnum cardinality) { + public Builder cardinality(AssociationTypeCardinality cardinality) { this.cardinality = Optional.ofNullable(cardinality); return this; } diff --git a/src/main/java/com/merge/api/crm/types/AssociationTypeCardinality.java b/src/main/java/com/merge/api/crm/types/AssociationTypeCardinality.java new file mode 100644 index 000000000..fa2204795 --- /dev/null +++ b/src/main/java/com/merge/api/crm/types/AssociationTypeCardinality.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.crm.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = AssociationTypeCardinality.Deserializer.class) +public final class AssociationTypeCardinality { + private final Object value; + + private final int type; + + private AssociationTypeCardinality(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((CardinalityEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AssociationTypeCardinality && equalTo((AssociationTypeCardinality) other); + } + + private boolean equalTo(AssociationTypeCardinality other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static AssociationTypeCardinality of(CardinalityEnum value) { + return new AssociationTypeCardinality(value, 0); + } + + public static AssociationTypeCardinality of(String value) { + return new AssociationTypeCardinality(value, 1); + } + + public interface Visitor { + T visit(CardinalityEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(AssociationTypeCardinality.class); + } + + @java.lang.Override + public AssociationTypeCardinality deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, CardinalityEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/crm/types/AuditLogEvent.java b/src/main/java/com/merge/api/crm/types/AuditLogEvent.java index 1cd04d82e..8aa974ff7 100644 --- a/src/main/java/com/merge/api/crm/types/AuditLogEvent.java +++ b/src/main/java/com/merge/api/crm/types/AuditLogEvent.java @@ -28,11 +28,11 @@ public final class AuditLogEvent { private final Optional userEmail; - private final RoleEnum role; + private final AuditLogEventRole role; private final String ipAddress; - private final EventTypeEnum eventType; + private final AuditLogEventEventType eventType; private final String eventDescription; @@ -44,9 +44,9 @@ private AuditLogEvent( Optional id, Optional userName, Optional userEmail, - RoleEnum role, + AuditLogEventRole role, String ipAddress, - EventTypeEnum eventType, + AuditLogEventEventType eventType, String eventDescription, Optional createdAt, Map additionalProperties) { @@ -94,7 +94,7 @@ public Optional getUserEmail() { * */ @JsonProperty("role") - public RoleEnum getRole() { + public AuditLogEventRole getRole() { return role; } @@ -111,6 +111,7 @@ public String getIpAddress() { *
  • CREATED_TEST_API_KEY - CREATED_TEST_API_KEY
  • *
  • DELETED_TEST_API_KEY - DELETED_TEST_API_KEY
  • *
  • REGENERATED_PRODUCTION_API_KEY - REGENERATED_PRODUCTION_API_KEY
  • + *
  • REGENERATED_WEBHOOK_SIGNATURE - REGENERATED_WEBHOOK_SIGNATURE
  • *
  • INVITED_USER - INVITED_USER
  • *
  • TWO_FACTOR_AUTH_ENABLED - TWO_FACTOR_AUTH_ENABLED
  • *
  • TWO_FACTOR_AUTH_DISABLED - TWO_FACTOR_AUTH_DISABLED
  • @@ -151,7 +152,7 @@ public String getIpAddress() { * */ @JsonProperty("event_type") - public EventTypeEnum getEventType() { + public AuditLogEventEventType getEventType() { return eventType; } @@ -210,7 +211,17 @@ public static RoleStage builder() { } public interface RoleStage { - IpAddressStage role(@NotNull RoleEnum role); + /** + * Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. + * + * * `ADMIN` - ADMIN + * * `DEVELOPER` - DEVELOPER + * * `MEMBER` - MEMBER + * * `API` - API + * * `SYSTEM` - SYSTEM + * * `MERGE_TEAM` - MERGE_TEAM + */ + IpAddressStage role(@NotNull AuditLogEventRole role); Builder from(AuditLogEvent other); } @@ -220,7 +231,54 @@ public interface IpAddressStage { } public interface EventTypeStage { - EventDescriptionStage eventType(@NotNull EventTypeEnum eventType); + /** + * Designates the type of event that occurred. + * + * * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + * * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + * * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + * * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + * * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + * * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + * * `INVITED_USER` - INVITED_USER + * * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + * * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + * * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + * * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + * * `CREATED_DESTINATION` - CREATED_DESTINATION + * * `DELETED_DESTINATION` - DELETED_DESTINATION + * * `CHANGED_DESTINATION` - CHANGED_DESTINATION + * * `CHANGED_SCOPES` - CHANGED_SCOPES + * * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + * * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + * * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + * * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + * * `ENABLED_CATEGORY` - ENABLED_CATEGORY + * * `DISABLED_CATEGORY` - DISABLED_CATEGORY + * * `CHANGED_PASSWORD` - CHANGED_PASSWORD + * * `RESET_PASSWORD` - RESET_PASSWORD + * * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING + * * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING + * * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + * * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + * * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING + * * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING + * * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + * * `MUTED_ISSUE` - MUTED_ISSUE + * * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + * * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + * * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + * * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + * * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + */ + EventDescriptionStage eventType(@NotNull AuditLogEventEventType eventType); } public interface EventDescriptionStage { @@ -234,10 +292,16 @@ public interface _FinalStage { _FinalStage id(String id); + /** + *

    The User's full name at the time of this Event occurring.

    + */ _FinalStage userName(Optional userName); _FinalStage userName(String userName); + /** + *

    The User's email at the time of this Event occurring.

    + */ _FinalStage userEmail(Optional userEmail); _FinalStage userEmail(String userEmail); @@ -250,11 +314,11 @@ public interface _FinalStage { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements RoleStage, IpAddressStage, EventTypeStage, EventDescriptionStage, _FinalStage { - private RoleEnum role; + private AuditLogEventRole role; private String ipAddress; - private EventTypeEnum eventType; + private AuditLogEventEventType eventType; private String eventDescription; @@ -285,7 +349,14 @@ public Builder from(AuditLogEvent other) { } /** - *

    Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring.

    + * Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. + * + * * `ADMIN` - ADMIN + * * `DEVELOPER` - DEVELOPER + * * `MEMBER` - MEMBER + * * `API` - API + * * `SYSTEM` - SYSTEM + * * `MERGE_TEAM` - MERGE_TEAM

    Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring.

    *
      *
    • ADMIN - ADMIN
    • *
    • DEVELOPER - DEVELOPER
    • @@ -298,7 +369,7 @@ public Builder from(AuditLogEvent other) { */ @java.lang.Override @JsonSetter("role") - public IpAddressStage role(@NotNull RoleEnum role) { + public IpAddressStage role(@NotNull AuditLogEventRole role) { this.role = role; return this; } @@ -311,13 +382,58 @@ public EventTypeStage ipAddress(@NotNull String ipAddress) { } /** - *

      Designates the type of event that occurred.

      + * Designates the type of event that occurred. + * + * * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + * * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + * * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + * * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + * * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + * * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + * * `INVITED_USER` - INVITED_USER + * * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + * * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + * * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + * * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + * * `CREATED_DESTINATION` - CREATED_DESTINATION + * * `DELETED_DESTINATION` - DELETED_DESTINATION + * * `CHANGED_DESTINATION` - CHANGED_DESTINATION + * * `CHANGED_SCOPES` - CHANGED_SCOPES + * * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + * * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + * * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + * * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + * * `ENABLED_CATEGORY` - ENABLED_CATEGORY + * * `DISABLED_CATEGORY` - DISABLED_CATEGORY + * * `CHANGED_PASSWORD` - CHANGED_PASSWORD + * * `RESET_PASSWORD` - RESET_PASSWORD + * * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING + * * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING + * * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + * * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + * * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING + * * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING + * * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + * * `MUTED_ISSUE` - MUTED_ISSUE + * * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + * * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + * * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + * * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + * * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED

      Designates the type of event that occurred.

      *
        *
      • CREATED_REMOTE_PRODUCTION_API_KEY - CREATED_REMOTE_PRODUCTION_API_KEY
      • *
      • DELETED_REMOTE_PRODUCTION_API_KEY - DELETED_REMOTE_PRODUCTION_API_KEY
      • *
      • CREATED_TEST_API_KEY - CREATED_TEST_API_KEY
      • *
      • DELETED_TEST_API_KEY - DELETED_TEST_API_KEY
      • *
      • REGENERATED_PRODUCTION_API_KEY - REGENERATED_PRODUCTION_API_KEY
      • + *
      • REGENERATED_WEBHOOK_SIGNATURE - REGENERATED_WEBHOOK_SIGNATURE
      • *
      • INVITED_USER - INVITED_USER
      • *
      • TWO_FACTOR_AUTH_ENABLED - TWO_FACTOR_AUTH_ENABLED
      • *
      • TWO_FACTOR_AUTH_DISABLED - TWO_FACTOR_AUTH_DISABLED
      • @@ -360,7 +476,7 @@ public EventTypeStage ipAddress(@NotNull String ipAddress) { */ @java.lang.Override @JsonSetter("event_type") - public EventDescriptionStage eventType(@NotNull EventTypeEnum eventType) { + public EventDescriptionStage eventType(@NotNull AuditLogEventEventType eventType) { this.eventType = eventType; return this; } @@ -395,6 +511,9 @@ public _FinalStage userEmail(String userEmail) { return this; } + /** + *

        The User's email at the time of this Event occurring.

        + */ @java.lang.Override @JsonSetter(value = "user_email", nulls = Nulls.SKIP) public _FinalStage userEmail(Optional userEmail) { @@ -412,6 +531,9 @@ public _FinalStage userName(String userName) { return this; } + /** + *

        The User's full name at the time of this Event occurring.

        + */ @java.lang.Override @JsonSetter(value = "user_name", nulls = Nulls.SKIP) public _FinalStage userName(Optional userName) { diff --git a/src/main/java/com/merge/api/crm/types/AuditLogEventEventType.java b/src/main/java/com/merge/api/crm/types/AuditLogEventEventType.java new file mode 100644 index 000000000..38f2a1363 --- /dev/null +++ b/src/main/java/com/merge/api/crm/types/AuditLogEventEventType.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.crm.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = AuditLogEventEventType.Deserializer.class) +public final class AuditLogEventEventType { + private final Object value; + + private final int type; + + private AuditLogEventEventType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EventTypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AuditLogEventEventType && equalTo((AuditLogEventEventType) other); + } + + private boolean equalTo(AuditLogEventEventType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static AuditLogEventEventType of(EventTypeEnum value) { + return new AuditLogEventEventType(value, 0); + } + + public static AuditLogEventEventType of(String value) { + return new AuditLogEventEventType(value, 1); + } + + public interface Visitor { + T visit(EventTypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(AuditLogEventEventType.class); + } + + @java.lang.Override + public AuditLogEventEventType deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, EventTypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/crm/types/AuditLogEventRole.java b/src/main/java/com/merge/api/crm/types/AuditLogEventRole.java new file mode 100644 index 000000000..a7ff6b828 --- /dev/null +++ b/src/main/java/com/merge/api/crm/types/AuditLogEventRole.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.crm.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = AuditLogEventRole.Deserializer.class) +public final class AuditLogEventRole { + private final Object value; + + private final int type; + + private AuditLogEventRole(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((RoleEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AuditLogEventRole && equalTo((AuditLogEventRole) other); + } + + private boolean equalTo(AuditLogEventRole other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static AuditLogEventRole of(RoleEnum value) { + return new AuditLogEventRole(value, 0); + } + + public static AuditLogEventRole of(String value) { + return new AuditLogEventRole(value, 1); + } + + public interface Visitor { + T visit(RoleEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(AuditLogEventRole.class); + } + + @java.lang.Override + public AuditLogEventRole deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, RoleEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/crm/types/AuditTrailListRequest.java b/src/main/java/com/merge/api/crm/types/AuditTrailListRequest.java index 6a6003aa8..b7f5b1700 100644 --- a/src/main/java/com/merge/api/crm/types/AuditTrailListRequest.java +++ b/src/main/java/com/merge/api/crm/types/AuditTrailListRequest.java @@ -68,7 +68,7 @@ public Optional getEndDate() { } /** - * @return If included, will only include events with the given event type. Possible values include: CREATED_REMOTE_PRODUCTION_API_KEY, DELETED_REMOTE_PRODUCTION_API_KEY, CREATED_TEST_API_KEY, DELETED_TEST_API_KEY, REGENERATED_PRODUCTION_API_KEY, INVITED_USER, TWO_FACTOR_AUTH_ENABLED, TWO_FACTOR_AUTH_DISABLED, DELETED_LINKED_ACCOUNT, 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 + * @return 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 */ @JsonProperty("event_type") public Optional getEventType() { @@ -162,6 +162,9 @@ public Builder from(AuditTrailListRequest other) { return this; } + /** + *

        The pagination cursor value.

        + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -173,6 +176,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

        If included, will only include audit trail events that occurred before this time

        + */ @JsonSetter(value = "end_date", nulls = Nulls.SKIP) public Builder endDate(Optional endDate) { this.endDate = endDate; @@ -184,6 +190,9 @@ public Builder endDate(String endDate) { return this; } + /** + *

        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

        + */ @JsonSetter(value = "event_type", nulls = Nulls.SKIP) public Builder eventType(Optional eventType) { this.eventType = eventType; @@ -195,6 +204,9 @@ public Builder eventType(String eventType) { return this; } + /** + *

        Number of results to return per page.

        + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -206,6 +218,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

        If included, will only include audit trail events that occurred after this time

        + */ @JsonSetter(value = "start_date", nulls = Nulls.SKIP) public Builder startDate(Optional startDate) { this.startDate = startDate; @@ -217,6 +232,9 @@ public Builder startDate(String startDate) { return this; } + /** + *

        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.

        + */ @JsonSetter(value = "user_email", nulls = Nulls.SKIP) public Builder userEmail(Optional userEmail) { this.userEmail = userEmail; diff --git a/src/main/java/com/merge/api/crm/types/CommonModelScopeApi.java b/src/main/java/com/merge/api/crm/types/CommonModelScopeApi.java index 202c3b928..d691b2ae5 100644 --- a/src/main/java/com/merge/api/crm/types/CommonModelScopeApi.java +++ b/src/main/java/com/merge/api/crm/types/CommonModelScopeApi.java @@ -82,6 +82,9 @@ public Builder from(CommonModelScopeApi other) { return this; } + /** + *

        The common models you want to update the scopes for

        + */ @JsonSetter(value = "common_models", nulls = Nulls.SKIP) public Builder commonModels(List commonModels) { this.commonModels.clear(); diff --git a/src/main/java/com/merge/api/crm/types/Contact.java b/src/main/java/com/merge/api/crm/types/Contact.java index f8b171481..9a1cdac4e 100644 --- a/src/main/java/com/merge/api/crm/types/Contact.java +++ b/src/main/java/com/merge/api/crm/types/Contact.java @@ -348,6 +348,9 @@ public Builder id(String id) { return this; } + /** + *

        The third-party API ID of the matching object.

        + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -359,6 +362,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

        The datetime that this object was created by Merge.

        + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -370,6 +376,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

        The datetime that this object was modified by Merge.

        + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -381,6 +390,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

        The contact's first name.

        + */ @JsonSetter(value = "first_name", nulls = Nulls.SKIP) public Builder firstName(Optional firstName) { this.firstName = firstName; @@ -392,6 +404,9 @@ public Builder firstName(String firstName) { return this; } + /** + *

        The contact's last name.

        + */ @JsonSetter(value = "last_name", nulls = Nulls.SKIP) public Builder lastName(Optional lastName) { this.lastName = lastName; @@ -403,6 +418,9 @@ public Builder lastName(String lastName) { return this; } + /** + *

        The contact's account.

        + */ @JsonSetter(value = "account", nulls = Nulls.SKIP) public Builder account(Optional account) { this.account = account; @@ -414,6 +432,9 @@ public Builder account(ContactAccount account) { return this; } + /** + *

        The contact's owner.

        + */ @JsonSetter(value = "owner", nulls = Nulls.SKIP) public Builder owner(Optional owner) { this.owner = owner; @@ -458,6 +479,9 @@ public Builder phoneNumbers(List phoneNumbers) { return this; } + /** + *

        When the contact's last activity occurred.

        + */ @JsonSetter(value = "last_activity_at", nulls = Nulls.SKIP) public Builder lastActivityAt(Optional lastActivityAt) { this.lastActivityAt = lastActivityAt; @@ -469,6 +493,9 @@ public Builder lastActivityAt(OffsetDateTime lastActivityAt) { return this; } + /** + *

        When the third party's contact was created.

        + */ @JsonSetter(value = "remote_created_at", nulls = Nulls.SKIP) public Builder remoteCreatedAt(Optional remoteCreatedAt) { this.remoteCreatedAt = remoteCreatedAt; @@ -480,6 +507,9 @@ public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { return this; } + /** + *

        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.

        + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/crm/types/ContactRequest.java b/src/main/java/com/merge/api/crm/types/ContactRequest.java index 5c8aa608a..a86d5b785 100644 --- a/src/main/java/com/merge/api/crm/types/ContactRequest.java +++ b/src/main/java/com/merge/api/crm/types/ContactRequest.java @@ -238,6 +238,9 @@ public Builder from(ContactRequest other) { return this; } + /** + *

        The contact's first name.

        + */ @JsonSetter(value = "first_name", nulls = Nulls.SKIP) public Builder firstName(Optional firstName) { this.firstName = firstName; @@ -249,6 +252,9 @@ public Builder firstName(String firstName) { return this; } + /** + *

        The contact's last name.

        + */ @JsonSetter(value = "last_name", nulls = Nulls.SKIP) public Builder lastName(Optional lastName) { this.lastName = lastName; @@ -260,6 +266,9 @@ public Builder lastName(String lastName) { return this; } + /** + *

        The contact's account.

        + */ @JsonSetter(value = "account", nulls = Nulls.SKIP) public Builder account(Optional account) { this.account = account; @@ -271,6 +280,9 @@ public Builder account(ContactRequestAccount account) { return this; } + /** + *

        The contact's owner.

        + */ @JsonSetter(value = "owner", nulls = Nulls.SKIP) public Builder owner(Optional owner) { this.owner = owner; @@ -315,6 +327,9 @@ public Builder phoneNumbers(List phoneNumbers) { return this; } + /** + *

        When the contact's last activity occurred.

        + */ @JsonSetter(value = "last_activity_at", nulls = Nulls.SKIP) public Builder lastActivityAt(Optional lastActivityAt) { this.lastActivityAt = lastActivityAt; diff --git a/src/main/java/com/merge/api/crm/types/ContactsListRequest.java b/src/main/java/com/merge/api/crm/types/ContactsListRequest.java index a784ed4ca..9e4d37005 100644 --- a/src/main/java/com/merge/api/crm/types/ContactsListRequest.java +++ b/src/main/java/com/merge/api/crm/types/ContactsListRequest.java @@ -324,6 +324,9 @@ public Builder from(ContactsListRequest other) { return this; } + /** + *

        Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

        + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -340,6 +343,9 @@ public Builder expand(ContactsListRequestExpandItem expand) { return this; } + /** + *

        If provided, will only return contacts with this account.

        + */ @JsonSetter(value = "account_id", nulls = Nulls.SKIP) public Builder accountId(Optional accountId) { this.accountId = accountId; @@ -351,6 +357,9 @@ public Builder accountId(String accountId) { return this; } + /** + *

        If provided, will only return objects created after this datetime.

        + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -362,6 +371,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

        If provided, will only return objects created before this datetime.

        + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -373,6 +385,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

        The pagination cursor value.

        + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -384,6 +399,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

        If provided, will only return contacts matching the email addresses; multiple email_addresses can be separated by commas.

        + */ @JsonSetter(value = "email_addresses", nulls = Nulls.SKIP) public Builder emailAddresses(Optional emailAddresses) { this.emailAddresses = emailAddresses; @@ -395,6 +413,9 @@ public Builder emailAddresses(String emailAddresses) { return this; } + /** + *

        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.

        + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -406,6 +427,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

        Whether to include the original data Merge fetched from the third-party to produce these models.

        + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -417,6 +441,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

        Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

        + */ @JsonSetter(value = "include_remote_fields", nulls = Nulls.SKIP) public Builder includeRemoteFields(Optional includeRemoteFields) { this.includeRemoteFields = includeRemoteFields; @@ -428,6 +455,9 @@ public Builder includeRemoteFields(Boolean includeRemoteFields) { return this; } + /** + *

        Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

        + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -439,6 +469,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

        If provided, only objects synced by Merge after this date time will be returned.

        + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -450,6 +483,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

        If provided, only objects synced by Merge before this date time will be returned.

        + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -461,6 +497,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

        Number of results to return per page.

        + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -472,6 +511,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

        If provided, will only return contacts matching the phone numbers; multiple phone numbers can be separated by commas.

        + */ @JsonSetter(value = "phone_numbers", nulls = Nulls.SKIP) public Builder phoneNumbers(Optional phoneNumbers) { this.phoneNumbers = phoneNumbers; @@ -483,6 +525,9 @@ public Builder phoneNumbers(String phoneNumbers) { return this; } + /** + *

        The API provider's ID for the given object.

        + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; diff --git a/src/main/java/com/merge/api/crm/types/ContactsRemoteFieldClassesListRequest.java b/src/main/java/com/merge/api/crm/types/ContactsRemoteFieldClassesListRequest.java index b582cd54a..e454db10c 100644 --- a/src/main/java/com/merge/api/crm/types/ContactsRemoteFieldClassesListRequest.java +++ b/src/main/java/com/merge/api/crm/types/ContactsRemoteFieldClassesListRequest.java @@ -32,6 +32,8 @@ public final class ContactsRemoteFieldClassesListRequest { private final Optional isCommonModelField; + private final Optional isCustom; + private final Optional pageSize; private final Map additionalProperties; @@ -43,6 +45,7 @@ private ContactsRemoteFieldClassesListRequest( Optional includeRemoteFields, Optional includeShellData, Optional isCommonModelField, + Optional isCustom, Optional pageSize, Map additionalProperties) { this.cursor = cursor; @@ -51,6 +54,7 @@ private ContactsRemoteFieldClassesListRequest( this.includeRemoteFields = includeRemoteFields; this.includeShellData = includeShellData; this.isCommonModelField = isCommonModelField; + this.isCustom = isCustom; this.pageSize = pageSize; this.additionalProperties = additionalProperties; } @@ -103,6 +107,14 @@ public Optional getIsCommonModelField() { return isCommonModelField; } + /** + * @return If provided, will only return remote fields classes with this is_custom value + */ + @JsonProperty("is_custom") + public Optional getIsCustom() { + return isCustom; + } + /** * @return Number of results to return per page. */ @@ -130,6 +142,7 @@ private boolean equalTo(ContactsRemoteFieldClassesListRequest other) { && includeRemoteFields.equals(other.includeRemoteFields) && includeShellData.equals(other.includeShellData) && isCommonModelField.equals(other.isCommonModelField) + && isCustom.equals(other.isCustom) && pageSize.equals(other.pageSize); } @@ -142,6 +155,7 @@ public int hashCode() { this.includeRemoteFields, this.includeShellData, this.isCommonModelField, + this.isCustom, this.pageSize); } @@ -168,6 +182,8 @@ public static final class Builder { private Optional isCommonModelField = Optional.empty(); + private Optional isCustom = Optional.empty(); + private Optional pageSize = Optional.empty(); @JsonAnySetter @@ -182,10 +198,14 @@ public Builder from(ContactsRemoteFieldClassesListRequest other) { includeRemoteFields(other.getIncludeRemoteFields()); includeShellData(other.getIncludeShellData()); isCommonModelField(other.getIsCommonModelField()); + isCustom(other.getIsCustom()); pageSize(other.getPageSize()); return this; } + /** + *

        The pagination cursor value.

        + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -197,6 +217,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

        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.

        + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -208,6 +231,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

        Whether to include the original data Merge fetched from the third-party to produce these models.

        + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -219,6 +245,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

        Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

        + */ @JsonSetter(value = "include_remote_fields", nulls = Nulls.SKIP) public Builder includeRemoteFields(Optional includeRemoteFields) { this.includeRemoteFields = includeRemoteFields; @@ -230,6 +259,9 @@ public Builder includeRemoteFields(Boolean includeRemoteFields) { return this; } + /** + *

        Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

        + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -241,6 +273,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

        If provided, will only return remote field classes with this is_common_model_field value

        + */ @JsonSetter(value = "is_common_model_field", nulls = Nulls.SKIP) public Builder isCommonModelField(Optional isCommonModelField) { this.isCommonModelField = isCommonModelField; @@ -252,6 +287,23 @@ public Builder isCommonModelField(Boolean isCommonModelField) { return this; } + /** + *

        If provided, will only return remote fields classes with this is_custom value

        + */ + @JsonSetter(value = "is_custom", nulls = Nulls.SKIP) + public Builder isCustom(Optional isCustom) { + this.isCustom = isCustom; + return this; + } + + public Builder isCustom(Boolean isCustom) { + this.isCustom = Optional.ofNullable(isCustom); + return this; + } + + /** + *

        Number of results to return per page.

        + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -271,6 +323,7 @@ public ContactsRemoteFieldClassesListRequest build() { includeRemoteFields, includeShellData, isCommonModelField, + isCustom, pageSize, additionalProperties); } diff --git a/src/main/java/com/merge/api/crm/types/ContactsRetrieveRequest.java b/src/main/java/com/merge/api/crm/types/ContactsRetrieveRequest.java index 4555f4558..bff5e7e65 100644 --- a/src/main/java/com/merge/api/crm/types/ContactsRetrieveRequest.java +++ b/src/main/java/com/merge/api/crm/types/ContactsRetrieveRequest.java @@ -132,6 +132,9 @@ public Builder from(ContactsRetrieveRequest other) { return this; } + /** + *

        Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

        + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -148,6 +151,9 @@ public Builder expand(ContactsRetrieveRequestExpandItem expand) { return this; } + /** + *

        Whether to include the original data Merge fetched from the third-party to produce these models.

        + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -159,6 +165,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

        Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

        + */ @JsonSetter(value = "include_remote_fields", nulls = Nulls.SKIP) public Builder includeRemoteFields(Optional includeRemoteFields) { this.includeRemoteFields = includeRemoteFields; @@ -170,6 +179,9 @@ public Builder includeRemoteFields(Boolean includeRemoteFields) { return this; } + /** + *

        Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

        + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/crm/types/CreateFieldMappingRequest.java b/src/main/java/com/merge/api/crm/types/CreateFieldMappingRequest.java index 671fe6356..5261ac496 100644 --- a/src/main/java/com/merge/api/crm/types/CreateFieldMappingRequest.java +++ b/src/main/java/com/merge/api/crm/types/CreateFieldMappingRequest.java @@ -158,34 +158,55 @@ public static TargetFieldNameStage builder() { } public interface TargetFieldNameStage { + /** + * The name of the target field you want this remote field to map to. + */ TargetFieldDescriptionStage targetFieldName(@NotNull String targetFieldName); Builder from(CreateFieldMappingRequest other); } public interface TargetFieldDescriptionStage { + /** + * The description of the target field you want this remote field to map to. + */ RemoteMethodStage targetFieldDescription(@NotNull String targetFieldDescription); } public interface RemoteMethodStage { + /** + * The method of the remote endpoint where the remote field is coming from. + */ RemoteUrlPathStage remoteMethod(@NotNull String remoteMethod); } public interface RemoteUrlPathStage { + /** + * The path of the remote endpoint where the remote field is coming from. + */ CommonModelNameStage remoteUrlPath(@NotNull String remoteUrlPath); } public interface CommonModelNameStage { + /** + * The name of the Common Model that the remote field corresponds to in a given category. + */ _FinalStage commonModelName(@NotNull String commonModelName); } public interface _FinalStage { CreateFieldMappingRequest build(); + /** + *

        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.

        + */ _FinalStage excludeRemoteFieldMetadata(Optional excludeRemoteFieldMetadata); _FinalStage excludeRemoteFieldMetadata(Boolean excludeRemoteFieldMetadata); + /** + *

        The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.

        + */ _FinalStage remoteFieldTraversalPath(List remoteFieldTraversalPath); _FinalStage addRemoteFieldTraversalPath(JsonNode remoteFieldTraversalPath); @@ -233,7 +254,7 @@ public Builder from(CreateFieldMappingRequest other) { } /** - *

        The name of the target field you want this remote field to map to.

        + * The name of the target field you want this remote field to map to.

        The name of the target field you want this remote field to map to.

        * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -244,7 +265,7 @@ public TargetFieldDescriptionStage targetFieldName(@NotNull String targetFieldNa } /** - *

        The description of the target field you want this remote field to map to.

        + * The description of the target field you want this remote field to map to.

        The description of the target field you want this remote field to map to.

        * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -255,7 +276,7 @@ public RemoteMethodStage targetFieldDescription(@NotNull String targetFieldDescr } /** - *

        The method of the remote endpoint where the remote field is coming from.

        + * The method of the remote endpoint where the remote field is coming from.

        The method of the remote endpoint where the remote field is coming from.

        * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -266,7 +287,7 @@ public RemoteUrlPathStage remoteMethod(@NotNull String remoteMethod) { } /** - *

        The path of the remote endpoint where the remote field is coming from.

        + * The path of the remote endpoint where the remote field is coming from.

        The path of the remote endpoint where the remote field is coming from.

        * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -277,7 +298,7 @@ public CommonModelNameStage remoteUrlPath(@NotNull String remoteUrlPath) { } /** - *

        The name of the Common Model that the remote field corresponds to in a given category.

        + * The name of the Common Model that the remote field corresponds to in a given category.

        The name of the Common Model that the remote field corresponds to in a given category.

        * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -307,6 +328,9 @@ public _FinalStage addRemoteFieldTraversalPath(JsonNode remoteFieldTraversalPath return this; } + /** + *

        The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.

        + */ @java.lang.Override @JsonSetter(value = "remote_field_traversal_path", nulls = Nulls.SKIP) public _FinalStage remoteFieldTraversalPath(List remoteFieldTraversalPath) { @@ -325,6 +349,9 @@ public _FinalStage excludeRemoteFieldMetadata(Boolean excludeRemoteFieldMetadata return this; } + /** + *

        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.

        + */ @java.lang.Override @JsonSetter(value = "exclude_remote_field_metadata", nulls = Nulls.SKIP) public _FinalStage excludeRemoteFieldMetadata(Optional excludeRemoteFieldMetadata) { diff --git a/src/main/java/com/merge/api/crm/types/CrmAccountEndpointRequest.java b/src/main/java/com/merge/api/crm/types/CrmAccountEndpointRequest.java index bd4ba281d..e0fa16c6b 100644 --- a/src/main/java/com/merge/api/crm/types/CrmAccountEndpointRequest.java +++ b/src/main/java/com/merge/api/crm/types/CrmAccountEndpointRequest.java @@ -99,10 +99,16 @@ public interface ModelStage { public interface _FinalStage { CrmAccountEndpointRequest build(); + /** + *

        Whether to include debug fields (such as log file links) in the response.

        + */ _FinalStage isDebugMode(Optional isDebugMode); _FinalStage isDebugMode(Boolean isDebugMode); + /** + *

        Whether or not third-party updates should be run asynchronously.

        + */ _FinalStage runAsync(Optional runAsync); _FinalStage runAsync(Boolean runAsync); @@ -146,6 +152,9 @@ public _FinalStage runAsync(Boolean runAsync) { return this; } + /** + *

        Whether or not third-party updates should be run asynchronously.

        + */ @java.lang.Override @JsonSetter(value = "run_async", nulls = Nulls.SKIP) public _FinalStage runAsync(Optional runAsync) { @@ -163,6 +172,9 @@ public _FinalStage isDebugMode(Boolean isDebugMode) { return this; } + /** + *

        Whether to include debug fields (such as log file links) in the response.

        + */ @java.lang.Override @JsonSetter(value = "is_debug_mode", nulls = Nulls.SKIP) public _FinalStage isDebugMode(Optional isDebugMode) { diff --git a/src/main/java/com/merge/api/crm/types/CrmAssociationTypeEndpointRequest.java b/src/main/java/com/merge/api/crm/types/CrmAssociationTypeEndpointRequest.java index 075633985..bcf02c0d6 100644 --- a/src/main/java/com/merge/api/crm/types/CrmAssociationTypeEndpointRequest.java +++ b/src/main/java/com/merge/api/crm/types/CrmAssociationTypeEndpointRequest.java @@ -99,10 +99,16 @@ public interface ModelStage { public interface _FinalStage { CrmAssociationTypeEndpointRequest build(); + /** + *

        Whether to include debug fields (such as log file links) in the response.

        + */ _FinalStage isDebugMode(Optional isDebugMode); _FinalStage isDebugMode(Boolean isDebugMode); + /** + *

        Whether or not third-party updates should be run asynchronously.

        + */ _FinalStage runAsync(Optional runAsync); _FinalStage runAsync(Boolean runAsync); @@ -146,6 +152,9 @@ public _FinalStage runAsync(Boolean runAsync) { return this; } + /** + *

        Whether or not third-party updates should be run asynchronously.

        + */ @java.lang.Override @JsonSetter(value = "run_async", nulls = Nulls.SKIP) public _FinalStage runAsync(Optional runAsync) { @@ -163,6 +172,9 @@ public _FinalStage isDebugMode(Boolean isDebugMode) { return this; } + /** + *

        Whether to include debug fields (such as log file links) in the response.

        + */ @java.lang.Override @JsonSetter(value = "is_debug_mode", nulls = Nulls.SKIP) public _FinalStage isDebugMode(Optional isDebugMode) { diff --git a/src/main/java/com/merge/api/crm/types/CrmContactEndpointRequest.java b/src/main/java/com/merge/api/crm/types/CrmContactEndpointRequest.java index aac4bb74e..49efa9e16 100644 --- a/src/main/java/com/merge/api/crm/types/CrmContactEndpointRequest.java +++ b/src/main/java/com/merge/api/crm/types/CrmContactEndpointRequest.java @@ -99,10 +99,16 @@ public interface ModelStage { public interface _FinalStage { CrmContactEndpointRequest build(); + /** + *

        Whether to include debug fields (such as log file links) in the response.

        + */ _FinalStage isDebugMode(Optional isDebugMode); _FinalStage isDebugMode(Boolean isDebugMode); + /** + *

        Whether or not third-party updates should be run asynchronously.

        + */ _FinalStage runAsync(Optional runAsync); _FinalStage runAsync(Boolean runAsync); @@ -146,6 +152,9 @@ public _FinalStage runAsync(Boolean runAsync) { return this; } + /** + *

        Whether or not third-party updates should be run asynchronously.

        + */ @java.lang.Override @JsonSetter(value = "run_async", nulls = Nulls.SKIP) public _FinalStage runAsync(Optional runAsync) { @@ -163,6 +172,9 @@ public _FinalStage isDebugMode(Boolean isDebugMode) { return this; } + /** + *

        Whether to include debug fields (such as log file links) in the response.

        + */ @java.lang.Override @JsonSetter(value = "is_debug_mode", nulls = Nulls.SKIP) public _FinalStage isDebugMode(Optional isDebugMode) { diff --git a/src/main/java/com/merge/api/crm/types/CrmCustomObjectEndpointRequest.java b/src/main/java/com/merge/api/crm/types/CrmCustomObjectEndpointRequest.java index c7584f5f5..82e24ea45 100644 --- a/src/main/java/com/merge/api/crm/types/CrmCustomObjectEndpointRequest.java +++ b/src/main/java/com/merge/api/crm/types/CrmCustomObjectEndpointRequest.java @@ -99,10 +99,16 @@ public interface ModelStage { public interface _FinalStage { CrmCustomObjectEndpointRequest build(); + /** + *

        Whether to include debug fields (such as log file links) in the response.

        + */ _FinalStage isDebugMode(Optional isDebugMode); _FinalStage isDebugMode(Boolean isDebugMode); + /** + *

        Whether or not third-party updates should be run asynchronously.

        + */ _FinalStage runAsync(Optional runAsync); _FinalStage runAsync(Boolean runAsync); @@ -146,6 +152,9 @@ public _FinalStage runAsync(Boolean runAsync) { return this; } + /** + *

        Whether or not third-party updates should be run asynchronously.

        + */ @java.lang.Override @JsonSetter(value = "run_async", nulls = Nulls.SKIP) public _FinalStage runAsync(Optional runAsync) { @@ -163,6 +172,9 @@ public _FinalStage isDebugMode(Boolean isDebugMode) { return this; } + /** + *

        Whether to include debug fields (such as log file links) in the response.

        + */ @java.lang.Override @JsonSetter(value = "is_debug_mode", nulls = Nulls.SKIP) public _FinalStage isDebugMode(Optional isDebugMode) { diff --git a/src/main/java/com/merge/api/crm/types/CustomObject.java b/src/main/java/com/merge/api/crm/types/CustomObject.java index 0b4f604fb..fdd413877 100644 --- a/src/main/java/com/merge/api/crm/types/CustomObject.java +++ b/src/main/java/com/merge/api/crm/types/CustomObject.java @@ -193,6 +193,9 @@ public Builder id(String id) { return this; } + /** + *

        The third-party API ID of the matching object.

        + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -204,6 +207,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

        The datetime that this object was created by Merge.

        + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -215,6 +221,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

        The datetime that this object was modified by Merge.

        + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -226,6 +235,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

        The custom object class the custom object record belongs to.

        + */ @JsonSetter(value = "object_class", nulls = Nulls.SKIP) public Builder objectClass(Optional objectClass) { this.objectClass = objectClass; @@ -237,6 +249,9 @@ public Builder objectClass(String objectClass) { return this; } + /** + *

        The fields and values contained within the custom object record.

        + */ @JsonSetter(value = "fields", nulls = Nulls.SKIP) public Builder fields(Optional> fields) { this.fields = fields; diff --git a/src/main/java/com/merge/api/crm/types/CustomObjectClass.java b/src/main/java/com/merge/api/crm/types/CustomObjectClass.java index a1b27ae7e..9e33155aa 100644 --- a/src/main/java/com/merge/api/crm/types/CustomObjectClass.java +++ b/src/main/java/com/merge/api/crm/types/CustomObjectClass.java @@ -221,6 +221,9 @@ public Builder id(String id) { return this; } + /** + *

        The third-party API ID of the matching object.

        + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -254,6 +257,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

        The custom object class's name.

        + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -265,6 +271,9 @@ public Builder name(String name) { return this; } + /** + *

        The custom object class's description.

        + */ @JsonSetter(value = "description", nulls = Nulls.SKIP) public Builder description(Optional description) { this.description = description; @@ -276,6 +285,9 @@ public Builder description(String description) { return this; } + /** + *

        The custom object class's singular and plural labels.

        + */ @JsonSetter(value = "labels", nulls = Nulls.SKIP) public Builder labels(Optional>> labels) { this.labels = labels; @@ -298,6 +310,9 @@ public Builder fields(List fields) { return this; } + /** + *

        The types of associations with other models that the custom object class can have.

        + */ @JsonSetter(value = "association_types", nulls = Nulls.SKIP) public Builder associationTypes(Optional>> associationTypes) { this.associationTypes = associationTypes; diff --git a/src/main/java/com/merge/api/crm/types/CustomObjectClassesAssociationTypesListRequest.java b/src/main/java/com/merge/api/crm/types/CustomObjectClassesAssociationTypesListRequest.java index 330c509be..64c0c06d5 100644 --- a/src/main/java/com/merge/api/crm/types/CustomObjectClassesAssociationTypesListRequest.java +++ b/src/main/java/com/merge/api/crm/types/CustomObjectClassesAssociationTypesListRequest.java @@ -257,6 +257,9 @@ public Builder from(CustomObjectClassesAssociationTypesListRequest other) { return this; } + /** + *

        Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

        + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -273,6 +276,9 @@ public Builder expand(String expand) { return this; } + /** + *

        If provided, will only return objects created after this datetime.

        + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -284,6 +290,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

        If provided, will only return objects created before this datetime.

        + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -295,6 +304,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

        The pagination cursor value.

        + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -306,6 +318,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

        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.

        + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -317,6 +332,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

        Whether to include the original data Merge fetched from the third-party to produce these models.

        + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -328,6 +346,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

        Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

        + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -339,6 +360,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

        If provided, only objects synced by Merge after this date time will be returned.

        + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -350,6 +374,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

        If provided, only objects synced by Merge before this date time will be returned.

        + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -361,6 +388,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

        Number of results to return per page.

        + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -372,6 +402,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

        The API provider's ID for the given object.

        + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; diff --git a/src/main/java/com/merge/api/crm/types/CustomObjectClassesAssociationTypesRetrieveRequest.java b/src/main/java/com/merge/api/crm/types/CustomObjectClassesAssociationTypesRetrieveRequest.java index 94d5c9b2e..21e186f99 100644 --- a/src/main/java/com/merge/api/crm/types/CustomObjectClassesAssociationTypesRetrieveRequest.java +++ b/src/main/java/com/merge/api/crm/types/CustomObjectClassesAssociationTypesRetrieveRequest.java @@ -117,6 +117,9 @@ public Builder from(CustomObjectClassesAssociationTypesRetrieveRequest other) { return this; } + /** + *

        Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

        + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -133,6 +136,9 @@ public Builder expand(String expand) { return this; } + /** + *

        Whether to include the original data Merge fetched from the third-party to produce these models.

        + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -144,6 +150,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

        Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

        + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/crm/types/CustomObjectClassesCustomObjectsAssociationsListRequest.java b/src/main/java/com/merge/api/crm/types/CustomObjectClassesCustomObjectsAssociationsListRequest.java index ce96d6534..612155551 100644 --- a/src/main/java/com/merge/api/crm/types/CustomObjectClassesCustomObjectsAssociationsListRequest.java +++ b/src/main/java/com/merge/api/crm/types/CustomObjectClassesCustomObjectsAssociationsListRequest.java @@ -274,6 +274,9 @@ public Builder from(CustomObjectClassesCustomObjectsAssociationsListRequest othe return this; } + /** + *

        Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

        + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -290,6 +293,9 @@ public Builder expand(String expand) { return this; } + /** + *

        If provided, will only return opportunities with this association_type.

        + */ @JsonSetter(value = "association_type_id", nulls = Nulls.SKIP) public Builder associationTypeId(Optional associationTypeId) { this.associationTypeId = associationTypeId; @@ -301,6 +307,9 @@ public Builder associationTypeId(String associationTypeId) { return this; } + /** + *

        If provided, will only return objects created after this datetime.

        + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -312,6 +321,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

        If provided, will only return objects created before this datetime.

        + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -323,6 +335,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

        The pagination cursor value.

        + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -334,6 +349,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

        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.

        + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -345,6 +363,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

        Whether to include the original data Merge fetched from the third-party to produce these models.

        + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -356,6 +377,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

        Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

        + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -367,6 +391,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

        If provided, only objects synced by Merge after this date time will be returned.

        + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -378,6 +405,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

        If provided, only objects synced by Merge before this date time will be returned.

        + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -389,6 +419,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

        Number of results to return per page.

        + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -400,6 +433,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

        The API provider's ID for the given object.

        + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; diff --git a/src/main/java/com/merge/api/crm/types/CustomObjectClassesCustomObjectsAssociationsUpdateRequest.java b/src/main/java/com/merge/api/crm/types/CustomObjectClassesCustomObjectsAssociationsUpdateRequest.java index ffeb773a4..f1c4bdd39 100644 --- a/src/main/java/com/merge/api/crm/types/CustomObjectClassesCustomObjectsAssociationsUpdateRequest.java +++ b/src/main/java/com/merge/api/crm/types/CustomObjectClassesCustomObjectsAssociationsUpdateRequest.java @@ -96,6 +96,9 @@ public Builder from(CustomObjectClassesCustomObjectsAssociationsUpdateRequest ot return this; } + /** + *

        Whether to include debug fields (such as log file links) in the response.

        + */ @JsonSetter(value = "is_debug_mode", nulls = Nulls.SKIP) public Builder isDebugMode(Optional isDebugMode) { this.isDebugMode = isDebugMode; @@ -107,6 +110,9 @@ public Builder isDebugMode(Boolean isDebugMode) { return this; } + /** + *

        Whether or not third-party updates should be run asynchronously.

        + */ @JsonSetter(value = "run_async", nulls = Nulls.SKIP) public Builder runAsync(Optional runAsync) { this.runAsync = runAsync; diff --git a/src/main/java/com/merge/api/crm/types/CustomObjectClassesCustomObjectsListRequest.java b/src/main/java/com/merge/api/crm/types/CustomObjectClassesCustomObjectsListRequest.java index 205e272e9..e2d594db4 100644 --- a/src/main/java/com/merge/api/crm/types/CustomObjectClassesCustomObjectsListRequest.java +++ b/src/main/java/com/merge/api/crm/types/CustomObjectClassesCustomObjectsListRequest.java @@ -255,6 +255,9 @@ public Builder from(CustomObjectClassesCustomObjectsListRequest other) { return this; } + /** + *

        If provided, will only return objects created after this datetime.

        + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -266,6 +269,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

        If provided, will only return objects created before this datetime.

        + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -277,6 +283,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

        The pagination cursor value.

        + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -288,6 +297,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

        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.

        + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -299,6 +311,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

        Whether to include the original data Merge fetched from the third-party to produce these models.

        + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -310,6 +325,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

        Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

        + */ @JsonSetter(value = "include_remote_fields", nulls = Nulls.SKIP) public Builder includeRemoteFields(Optional includeRemoteFields) { this.includeRemoteFields = includeRemoteFields; @@ -321,6 +339,9 @@ public Builder includeRemoteFields(Boolean includeRemoteFields) { return this; } + /** + *

        Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

        + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -332,6 +353,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

        If provided, only objects synced by Merge after this date time will be returned.

        + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -343,6 +367,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

        If provided, only objects synced by Merge before this date time will be returned.

        + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -354,6 +381,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

        Number of results to return per page.

        + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -365,6 +395,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

        The API provider's ID for the given object.

        + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; diff --git a/src/main/java/com/merge/api/crm/types/CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest.java b/src/main/java/com/merge/api/crm/types/CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest.java index b284a3814..4833a5eea 100644 --- a/src/main/java/com/merge/api/crm/types/CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest.java +++ b/src/main/java/com/merge/api/crm/types/CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest.java @@ -32,6 +32,8 @@ public final class CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest private final Optional isCommonModelField; + private final Optional isCustom; + private final Optional pageSize; private final Map additionalProperties; @@ -43,6 +45,7 @@ private CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest( Optional includeRemoteFields, Optional includeShellData, Optional isCommonModelField, + Optional isCustom, Optional pageSize, Map additionalProperties) { this.cursor = cursor; @@ -51,6 +54,7 @@ private CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest( this.includeRemoteFields = includeRemoteFields; this.includeShellData = includeShellData; this.isCommonModelField = isCommonModelField; + this.isCustom = isCustom; this.pageSize = pageSize; this.additionalProperties = additionalProperties; } @@ -103,6 +107,14 @@ public Optional getIsCommonModelField() { return isCommonModelField; } + /** + * @return If provided, will only return remote fields classes with this is_custom value + */ + @JsonProperty("is_custom") + public Optional getIsCustom() { + return isCustom; + } + /** * @return Number of results to return per page. */ @@ -130,6 +142,7 @@ private boolean equalTo(CustomObjectClassesCustomObjectsRemoteFieldClassesListRe && includeRemoteFields.equals(other.includeRemoteFields) && includeShellData.equals(other.includeShellData) && isCommonModelField.equals(other.isCommonModelField) + && isCustom.equals(other.isCustom) && pageSize.equals(other.pageSize); } @@ -142,6 +155,7 @@ public int hashCode() { this.includeRemoteFields, this.includeShellData, this.isCommonModelField, + this.isCustom, this.pageSize); } @@ -168,6 +182,8 @@ public static final class Builder { private Optional isCommonModelField = Optional.empty(); + private Optional isCustom = Optional.empty(); + private Optional pageSize = Optional.empty(); @JsonAnySetter @@ -182,10 +198,14 @@ public Builder from(CustomObjectClassesCustomObjectsRemoteFieldClassesListReques includeRemoteFields(other.getIncludeRemoteFields()); includeShellData(other.getIncludeShellData()); isCommonModelField(other.getIsCommonModelField()); + isCustom(other.getIsCustom()); pageSize(other.getPageSize()); return this; } + /** + *

        The pagination cursor value.

        + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -197,6 +217,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

        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.

        + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -208,6 +231,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

        Whether to include the original data Merge fetched from the third-party to produce these models.

        + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -219,6 +245,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

        Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

        + */ @JsonSetter(value = "include_remote_fields", nulls = Nulls.SKIP) public Builder includeRemoteFields(Optional includeRemoteFields) { this.includeRemoteFields = includeRemoteFields; @@ -230,6 +259,9 @@ public Builder includeRemoteFields(Boolean includeRemoteFields) { return this; } + /** + *

        Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

        + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -241,6 +273,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

        If provided, will only return remote field classes with this is_common_model_field value

        + */ @JsonSetter(value = "is_common_model_field", nulls = Nulls.SKIP) public Builder isCommonModelField(Optional isCommonModelField) { this.isCommonModelField = isCommonModelField; @@ -252,6 +287,23 @@ public Builder isCommonModelField(Boolean isCommonModelField) { return this; } + /** + *

        If provided, will only return remote fields classes with this is_custom value

        + */ + @JsonSetter(value = "is_custom", nulls = Nulls.SKIP) + public Builder isCustom(Optional isCustom) { + this.isCustom = isCustom; + return this; + } + + public Builder isCustom(Boolean isCustom) { + this.isCustom = Optional.ofNullable(isCustom); + return this; + } + + /** + *

        Number of results to return per page.

        + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -271,6 +323,7 @@ public CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest build() { includeRemoteFields, includeShellData, isCommonModelField, + isCustom, pageSize, additionalProperties); } diff --git a/src/main/java/com/merge/api/crm/types/CustomObjectClassesCustomObjectsRetrieveRequest.java b/src/main/java/com/merge/api/crm/types/CustomObjectClassesCustomObjectsRetrieveRequest.java index ba2af3615..0ce690df1 100644 --- a/src/main/java/com/merge/api/crm/types/CustomObjectClassesCustomObjectsRetrieveRequest.java +++ b/src/main/java/com/merge/api/crm/types/CustomObjectClassesCustomObjectsRetrieveRequest.java @@ -115,6 +115,9 @@ public Builder from(CustomObjectClassesCustomObjectsRetrieveRequest other) { return this; } + /** + *

        Whether to include the original data Merge fetched from the third-party to produce these models.

        + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -126,6 +129,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

        Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

        + */ @JsonSetter(value = "include_remote_fields", nulls = Nulls.SKIP) public Builder includeRemoteFields(Optional includeRemoteFields) { this.includeRemoteFields = includeRemoteFields; @@ -137,6 +143,9 @@ public Builder includeRemoteFields(Boolean includeRemoteFields) { return this; } + /** + *

        Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

        + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/crm/types/CustomObjectClassesListRequest.java b/src/main/java/com/merge/api/crm/types/CustomObjectClassesListRequest.java index 57bb9d210..9b965796e 100644 --- a/src/main/java/com/merge/api/crm/types/CustomObjectClassesListRequest.java +++ b/src/main/java/com/merge/api/crm/types/CustomObjectClassesListRequest.java @@ -256,6 +256,9 @@ public Builder from(CustomObjectClassesListRequest other) { return this; } + /** + *

        Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

        + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -272,6 +275,9 @@ public Builder expand(String expand) { return this; } + /** + *

        If provided, will only return objects created after this datetime.

        + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -283,6 +289,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

        If provided, will only return objects created before this datetime.

        + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -294,6 +303,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

        The pagination cursor value.

        + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -305,6 +317,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

        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.

        + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -316,6 +331,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

        Whether to include the original data Merge fetched from the third-party to produce these models.

        + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -327,6 +345,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

        Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

        + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -338,6 +359,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

        If provided, only objects synced by Merge after this date time will be returned.

        + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -349,6 +373,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

        If provided, only objects synced by Merge before this date time will be returned.

        + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -360,6 +387,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

        Number of results to return per page.

        + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -371,6 +401,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

        The API provider's ID for the given object.

        + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; diff --git a/src/main/java/com/merge/api/crm/types/CustomObjectClassesRetrieveRequest.java b/src/main/java/com/merge/api/crm/types/CustomObjectClassesRetrieveRequest.java index 0eb44b9d2..b93f9105c 100644 --- a/src/main/java/com/merge/api/crm/types/CustomObjectClassesRetrieveRequest.java +++ b/src/main/java/com/merge/api/crm/types/CustomObjectClassesRetrieveRequest.java @@ -117,6 +117,9 @@ public Builder from(CustomObjectClassesRetrieveRequest other) { return this; } + /** + *

        Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

        + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -133,6 +136,9 @@ public Builder expand(String expand) { return this; } + /** + *

        Whether to include the original data Merge fetched from the third-party to produce these models.

        + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -144,6 +150,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

        Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

        + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/crm/types/CustomObjectRequest.java b/src/main/java/com/merge/api/crm/types/CustomObjectRequest.java index f58f32c73..48bb3849b 100644 --- a/src/main/java/com/merge/api/crm/types/CustomObjectRequest.java +++ b/src/main/java/com/merge/api/crm/types/CustomObjectRequest.java @@ -17,16 +17,27 @@ import java.util.LinkedHashMap; import java.util.Map; import java.util.Objects; +import java.util.Optional; @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CustomObjectRequest.Builder.class) public final class CustomObjectRequest { private final Map fields; + private final Optional> integrationParams; + + private final Optional> linkedAccountParams; + private final Map additionalProperties; - private CustomObjectRequest(Map fields, Map additionalProperties) { + private CustomObjectRequest( + Map fields, + Optional> integrationParams, + Optional> linkedAccountParams, + Map additionalProperties) { this.fields = fields; + this.integrationParams = integrationParams; + this.linkedAccountParams = linkedAccountParams; this.additionalProperties = additionalProperties; } @@ -35,6 +46,16 @@ public Map getFields() { return fields; } + @JsonProperty("integration_params") + public Optional> getIntegrationParams() { + return integrationParams; + } + + @JsonProperty("linked_account_params") + public Optional> getLinkedAccountParams() { + return linkedAccountParams; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -47,12 +68,14 @@ public Map getAdditionalProperties() { } private boolean equalTo(CustomObjectRequest other) { - return fields.equals(other.fields); + return fields.equals(other.fields) + && integrationParams.equals(other.integrationParams) + && linkedAccountParams.equals(other.linkedAccountParams); } @java.lang.Override public int hashCode() { - return Objects.hash(this.fields); + return Objects.hash(this.fields, this.integrationParams, this.linkedAccountParams); } @java.lang.Override @@ -68,6 +91,10 @@ public static Builder builder() { public static final class Builder { private Map fields = new LinkedHashMap<>(); + private Optional> integrationParams = Optional.empty(); + + private Optional> linkedAccountParams = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -75,6 +102,8 @@ private Builder() {} public Builder from(CustomObjectRequest other) { fields(other.getFields()); + integrationParams(other.getIntegrationParams()); + linkedAccountParams(other.getLinkedAccountParams()); return this; } @@ -95,8 +124,30 @@ public Builder fields(String key, JsonNode value) { return this; } + @JsonSetter(value = "integration_params", nulls = Nulls.SKIP) + public Builder integrationParams(Optional> integrationParams) { + this.integrationParams = integrationParams; + return this; + } + + public Builder integrationParams(Map integrationParams) { + this.integrationParams = Optional.ofNullable(integrationParams); + return this; + } + + @JsonSetter(value = "linked_account_params", nulls = Nulls.SKIP) + public Builder linkedAccountParams(Optional> linkedAccountParams) { + this.linkedAccountParams = linkedAccountParams; + return this; + } + + public Builder linkedAccountParams(Map linkedAccountParams) { + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); + return this; + } + public CustomObjectRequest build() { - return new CustomObjectRequest(fields, additionalProperties); + return new CustomObjectRequest(fields, integrationParams, linkedAccountParams, additionalProperties); } } } diff --git a/src/main/java/com/merge/api/crm/types/DataPassthroughRequest.java b/src/main/java/com/merge/api/crm/types/DataPassthroughRequest.java index 4dfac8ab7..2b753e764 100644 --- a/src/main/java/com/merge/api/crm/types/DataPassthroughRequest.java +++ b/src/main/java/com/merge/api/crm/types/DataPassthroughRequest.java @@ -171,24 +171,39 @@ public interface MethodStage { } public interface PathStage { + /** + * The path of the request in the third party's platform. + */ _FinalStage path(@NotNull String path); } public interface _FinalStage { DataPassthroughRequest build(); + /** + *

        An optional override of the third party's base url for the request.

        + */ _FinalStage baseUrlOverride(Optional baseUrlOverride); _FinalStage baseUrlOverride(String baseUrlOverride); + /** + *

        The data with the request. You must include a request_format parameter matching the data's format

        + */ _FinalStage data(Optional data); _FinalStage data(String data); + /** + *

        Pass an array of MultipartFormField objects in here instead of using the data param if request_format is set to MULTIPART.

        + */ _FinalStage multipartFormData(Optional> multipartFormData); _FinalStage multipartFormData(List multipartFormData); + /** + *

        The headers to use for the request (Merge will handle the account's authorization headers). Content-Type header is required for passthrough. Choose content type corresponding to expected format of receiving server.

        + */ _FinalStage headers(Optional> headers); _FinalStage headers(Map headers); @@ -197,6 +212,9 @@ public interface _FinalStage { _FinalStage requestFormat(RequestFormatEnum requestFormat); + /** + *

        Optional. If true, the response will always be an object of the form {"type": T, "value": ...} where T will be one of string, boolean, number, null, array, object.

        + */ _FinalStage normalizeResponse(Optional normalizeResponse); _FinalStage normalizeResponse(Boolean normalizeResponse); @@ -246,7 +264,7 @@ public PathStage method(@NotNull MethodEnum method) { } /** - *

        The path of the request in the third party's platform.

        + * The path of the request in the third party's platform.

        The path of the request in the third party's platform.

        * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -266,6 +284,9 @@ public _FinalStage normalizeResponse(Boolean normalizeResponse) { return this; } + /** + *

        Optional. If true, the response will always be an object of the form {"type": T, "value": ...} where T will be one of string, boolean, number, null, array, object.

        + */ @java.lang.Override @JsonSetter(value = "normalize_response", nulls = Nulls.SKIP) public _FinalStage normalizeResponse(Optional normalizeResponse) { @@ -296,6 +317,9 @@ public _FinalStage headers(Map headers) { return this; } + /** + *

        The headers to use for the request (Merge will handle the account's authorization headers). Content-Type header is required for passthrough. Choose content type corresponding to expected format of receiving server.

        + */ @java.lang.Override @JsonSetter(value = "headers", nulls = Nulls.SKIP) public _FinalStage headers(Optional> headers) { @@ -313,6 +337,9 @@ public _FinalStage multipartFormData(List multipartFo return this; } + /** + *

        Pass an array of MultipartFormField objects in here instead of using the data param if request_format is set to MULTIPART.

        + */ @java.lang.Override @JsonSetter(value = "multipart_form_data", nulls = Nulls.SKIP) public _FinalStage multipartFormData(Optional> multipartFormData) { @@ -330,6 +357,9 @@ public _FinalStage data(String data) { return this; } + /** + *

        The data with the request. You must include a request_format parameter matching the data's format

        + */ @java.lang.Override @JsonSetter(value = "data", nulls = Nulls.SKIP) public _FinalStage data(Optional data) { @@ -347,6 +377,9 @@ public _FinalStage baseUrlOverride(String baseUrlOverride) { return this; } + /** + *

        An optional override of the third party's base url for the request.

        + */ @java.lang.Override @JsonSetter(value = "base_url_override", nulls = Nulls.SKIP) public _FinalStage baseUrlOverride(Optional baseUrlOverride) { diff --git a/src/main/java/com/merge/api/crm/types/EmailAddress.java b/src/main/java/com/merge/api/crm/types/EmailAddress.java index e8c4f5241..6533562dd 100644 --- a/src/main/java/com/merge/api/crm/types/EmailAddress.java +++ b/src/main/java/com/merge/api/crm/types/EmailAddress.java @@ -131,6 +131,9 @@ public Builder from(EmailAddress other) { return this; } + /** + *

        The datetime that this object was created by Merge.

        + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -142,6 +145,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

        The datetime that this object was modified by Merge.

        + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -153,6 +159,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

        The email address.

        + */ @JsonSetter(value = "email_address", nulls = Nulls.SKIP) public Builder emailAddress(Optional emailAddress) { this.emailAddress = emailAddress; @@ -164,6 +173,9 @@ public Builder emailAddress(String emailAddress) { return this; } + /** + *

        The email address's type.

        + */ @JsonSetter(value = "email_address_type", nulls = Nulls.SKIP) public Builder emailAddressType(Optional emailAddressType) { this.emailAddressType = emailAddressType; diff --git a/src/main/java/com/merge/api/crm/types/EmailAddressRequest.java b/src/main/java/com/merge/api/crm/types/EmailAddressRequest.java index b04441886..0d74047c9 100644 --- a/src/main/java/com/merge/api/crm/types/EmailAddressRequest.java +++ b/src/main/java/com/merge/api/crm/types/EmailAddressRequest.java @@ -125,6 +125,9 @@ public Builder from(EmailAddressRequest other) { return this; } + /** + *

        The email address.

        + */ @JsonSetter(value = "email_address", nulls = Nulls.SKIP) public Builder emailAddress(Optional emailAddress) { this.emailAddress = emailAddress; @@ -136,6 +139,9 @@ public Builder emailAddress(String emailAddress) { return this; } + /** + *

        The email address's type.

        + */ @JsonSetter(value = "email_address_type", nulls = Nulls.SKIP) public Builder emailAddressType(Optional emailAddressType) { this.emailAddressType = emailAddressType; diff --git a/src/main/java/com/merge/api/crm/types/EndUserDetailsRequest.java b/src/main/java/com/merge/api/crm/types/EndUserDetailsRequest.java index 433d505f7..4bf1c6e7c 100644 --- a/src/main/java/com/merge/api/crm/types/EndUserDetailsRequest.java +++ b/src/main/java/com/merge/api/crm/types/EndUserDetailsRequest.java @@ -45,7 +45,7 @@ public final class EndUserDetailsRequest { private final Optional>>> categoryCommonModelScopes; - private final Optional language; + private final Optional language; private final Optional areSyncsDisabled; @@ -65,7 +65,7 @@ private EndUserDetailsRequest( Optional> commonModels, Optional>>> categoryCommonModelScopes, - Optional language, + Optional language, Optional areSyncsDisabled, Optional> integrationSpecificConfig, Map additionalProperties) { @@ -174,7 +174,7 @@ public Optional> getCommonModels() { *
      */ @JsonProperty("language") - public Optional getLanguage() { + public Optional getLanguage() { return language; } @@ -249,48 +249,78 @@ public static EndUserEmailAddressStage builder() { } public interface EndUserEmailAddressStage { + /** + * Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent. + */ EndUserOrganizationNameStage endUserEmailAddress(@NotNull String endUserEmailAddress); Builder from(EndUserDetailsRequest other); } public interface EndUserOrganizationNameStage { + /** + * Your end user's organization. + */ EndUserOriginIdStage endUserOrganizationName(@NotNull String endUserOrganizationName); } public interface EndUserOriginIdStage { + /** + * 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. + */ _FinalStage endUserOriginId(@NotNull String endUserOriginId); } public interface _FinalStage { EndUserDetailsRequest build(); + /** + *

      The integration categories to show in Merge Link.

      + */ _FinalStage categories(List categories); _FinalStage addCategories(CategoriesEnum categories); _FinalStage addAllCategories(List categories); + /** + *

      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/.

      + */ _FinalStage integration(Optional integration); _FinalStage integration(String integration); + /** + *

      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.

      + */ _FinalStage linkExpiryMins(Optional linkExpiryMins); _FinalStage linkExpiryMins(Integer linkExpiryMins); + /** + *

      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.

      + */ _FinalStage shouldCreateMagicLinkUrl(Optional shouldCreateMagicLinkUrl); _FinalStage shouldCreateMagicLinkUrl(Boolean shouldCreateMagicLinkUrl); + /** + *

      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.

      + */ _FinalStage hideAdminMagicLink(Optional hideAdminMagicLink); _FinalStage hideAdminMagicLink(Boolean hideAdminMagicLink); + /** + *

      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.

      + */ _FinalStage commonModels(Optional> commonModels); _FinalStage commonModels(List commonModels); + /** + *

      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.

      + */ _FinalStage categoryCommonModelScopes( Optional>>> categoryCommonModelScopes); @@ -298,14 +328,27 @@ _FinalStage categoryCommonModelScopes( _FinalStage categoryCommonModelScopes( Map>> categoryCommonModelScopes); - _FinalStage language(Optional language); + /** + *

      The following subset of IETF language tags can be used to configure localization.

      + *
        + *
      • en - en
      • + *
      • de - de
      • + *
      + */ + _FinalStage language(Optional language); - _FinalStage language(LanguageEnum language); + _FinalStage language(EndUserDetailsRequestLanguage language); + /** + *

      The boolean that indicates whether initial, periodic, and force syncs will be disabled.

      + */ _FinalStage areSyncsDisabled(Optional areSyncsDisabled); _FinalStage areSyncsDisabled(Boolean areSyncsDisabled); + /** + *

      A JSON object containing integration-specific configuration options.

      + */ _FinalStage integrationSpecificConfig(Optional> integrationSpecificConfig); _FinalStage integrationSpecificConfig(Map integrationSpecificConfig); @@ -324,7 +367,7 @@ public static final class Builder private Optional areSyncsDisabled = Optional.empty(); - private Optional language = Optional.empty(); + private Optional language = Optional.empty(); private Optional>>> categoryCommonModelScopes = Optional.empty(); @@ -365,7 +408,7 @@ public Builder from(EndUserDetailsRequest other) { } /** - *

      Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent.

      + * Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent.

      Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent.

      * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -376,7 +419,7 @@ public EndUserOrganizationNameStage endUserEmailAddress(@NotNull String endUserE } /** - *

      Your end user's organization.

      + * Your end user's organization.

      Your end user's organization.

      * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -387,7 +430,7 @@ public EndUserOriginIdStage endUserOrganizationName(@NotNull String endUserOrgan } /** - *

      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.

      + * 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.

      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.

      * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -407,6 +450,9 @@ public _FinalStage integrationSpecificConfig(Map integrationSp return this; } + /** + *

      A JSON object containing integration-specific configuration options.

      + */ @java.lang.Override @JsonSetter(value = "integration_specific_config", nulls = Nulls.SKIP) public _FinalStage integrationSpecificConfig(Optional> integrationSpecificConfig) { @@ -424,6 +470,9 @@ public _FinalStage areSyncsDisabled(Boolean areSyncsDisabled) { return this; } + /** + *

      The boolean that indicates whether initial, periodic, and force syncs will be disabled.

      + */ @java.lang.Override @JsonSetter(value = "are_syncs_disabled", nulls = Nulls.SKIP) public _FinalStage areSyncsDisabled(Optional areSyncsDisabled) { @@ -440,14 +489,21 @@ public _FinalStage areSyncsDisabled(Optional areSyncsDisabled) { * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override - public _FinalStage language(LanguageEnum language) { + public _FinalStage language(EndUserDetailsRequestLanguage language) { this.language = Optional.ofNullable(language); return this; } + /** + *

      The following subset of IETF language tags can be used to configure localization.

      + *
        + *
      • en - en
      • + *
      • de - de
      • + *
      + */ @java.lang.Override @JsonSetter(value = "language", nulls = Nulls.SKIP) - public _FinalStage language(Optional language) { + public _FinalStage language(Optional language) { this.language = language; return this; } @@ -463,6 +519,9 @@ public _FinalStage categoryCommonModelScopes( return this; } + /** + *

      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.

      + */ @java.lang.Override @JsonSetter(value = "category_common_model_scopes", nulls = Nulls.SKIP) public _FinalStage categoryCommonModelScopes( @@ -482,6 +541,9 @@ public _FinalStage commonModels(List commonModels) return this; } + /** + *

      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.

      + */ @java.lang.Override @JsonSetter(value = "common_models", nulls = Nulls.SKIP) public _FinalStage commonModels(Optional> commonModels) { @@ -499,6 +561,9 @@ public _FinalStage hideAdminMagicLink(Boolean hideAdminMagicLink) { return this; } + /** + *

      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.

      + */ @java.lang.Override @JsonSetter(value = "hide_admin_magic_link", nulls = Nulls.SKIP) public _FinalStage hideAdminMagicLink(Optional hideAdminMagicLink) { @@ -516,6 +581,9 @@ public _FinalStage shouldCreateMagicLinkUrl(Boolean shouldCreateMagicLinkUrl) { return this; } + /** + *

      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.

      + */ @java.lang.Override @JsonSetter(value = "should_create_magic_link_url", nulls = Nulls.SKIP) public _FinalStage shouldCreateMagicLinkUrl(Optional shouldCreateMagicLinkUrl) { @@ -533,6 +601,9 @@ public _FinalStage linkExpiryMins(Integer linkExpiryMins) { return this; } + /** + *

      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.

      + */ @java.lang.Override @JsonSetter(value = "link_expiry_mins", nulls = Nulls.SKIP) public _FinalStage linkExpiryMins(Optional linkExpiryMins) { @@ -550,6 +621,9 @@ public _FinalStage integration(String integration) { return this; } + /** + *

      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/.

      + */ @java.lang.Override @JsonSetter(value = "integration", nulls = Nulls.SKIP) public _FinalStage integration(Optional integration) { @@ -577,6 +651,9 @@ public _FinalStage addCategories(CategoriesEnum categories) { return this; } + /** + *

      The integration categories to show in Merge Link.

      + */ @java.lang.Override @JsonSetter(value = "categories", nulls = Nulls.SKIP) public _FinalStage categories(List categories) { diff --git a/src/main/java/com/merge/api/crm/types/EndUserDetailsRequestLanguage.java b/src/main/java/com/merge/api/crm/types/EndUserDetailsRequestLanguage.java new file mode 100644 index 000000000..4a9b70e69 --- /dev/null +++ b/src/main/java/com/merge/api/crm/types/EndUserDetailsRequestLanguage.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.crm.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EndUserDetailsRequestLanguage.Deserializer.class) +public final class EndUserDetailsRequestLanguage { + private final Object value; + + private final int type; + + private EndUserDetailsRequestLanguage(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((LanguageEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EndUserDetailsRequestLanguage && equalTo((EndUserDetailsRequestLanguage) other); + } + + private boolean equalTo(EndUserDetailsRequestLanguage other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EndUserDetailsRequestLanguage of(LanguageEnum value) { + return new EndUserDetailsRequestLanguage(value, 0); + } + + public static EndUserDetailsRequestLanguage of(String value) { + return new EndUserDetailsRequestLanguage(value, 1); + } + + public interface Visitor { + T visit(LanguageEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EndUserDetailsRequestLanguage.class); + } + + @java.lang.Override + public EndUserDetailsRequestLanguage deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, LanguageEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/crm/types/Engagement.java b/src/main/java/com/merge/api/crm/types/Engagement.java index c9392c271..e12f5b6ed 100644 --- a/src/main/java/com/merge/api/crm/types/Engagement.java +++ b/src/main/java/com/merge/api/crm/types/Engagement.java @@ -37,7 +37,7 @@ public final class Engagement { private final Optional subject; - private final Optional direction; + private final Optional direction; private final Optional engagementType; @@ -67,7 +67,7 @@ private Engagement( Optional owner, Optional content, Optional subject, - Optional direction, + Optional direction, Optional engagementType, Optional startTime, Optional endTime, @@ -159,7 +159,7 @@ public Optional getSubject() { *
    */ @JsonProperty("direction") - public Optional getDirection() { + public Optional getDirection() { return direction; } @@ -301,7 +301,7 @@ public static final class Builder { private Optional subject = Optional.empty(); - private Optional direction = Optional.empty(); + private Optional direction = Optional.empty(); private Optional engagementType = Optional.empty(); @@ -358,6 +358,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -369,6 +372,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -380,6 +386,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -391,6 +400,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The engagement's owner.

    + */ @JsonSetter(value = "owner", nulls = Nulls.SKIP) public Builder owner(Optional owner) { this.owner = owner; @@ -402,6 +414,9 @@ public Builder owner(EngagementOwner owner) { return this; } + /** + *

    The engagement's content.

    + */ @JsonSetter(value = "content", nulls = Nulls.SKIP) public Builder content(Optional content) { this.content = content; @@ -413,6 +428,9 @@ public Builder content(String content) { return this; } + /** + *

    The engagement's subject.

    + */ @JsonSetter(value = "subject", nulls = Nulls.SKIP) public Builder subject(Optional subject) { this.subject = subject; @@ -424,17 +442,27 @@ public Builder subject(String subject) { return this; } + /** + *

    The engagement's direction.

    + *
      + *
    • INBOUND - INBOUND
    • + *
    • OUTBOUND - OUTBOUND
    • + *
    + */ @JsonSetter(value = "direction", nulls = Nulls.SKIP) - public Builder direction(Optional direction) { + public Builder direction(Optional direction) { this.direction = direction; return this; } - public Builder direction(DirectionEnum direction) { + public Builder direction(EngagementDirection direction) { this.direction = Optional.ofNullable(direction); return this; } + /** + *

    The engagement type of the engagement.

    + */ @JsonSetter(value = "engagement_type", nulls = Nulls.SKIP) public Builder engagementType(Optional engagementType) { this.engagementType = engagementType; @@ -446,6 +474,9 @@ public Builder engagementType(EngagementEngagementType engagementType) { return this; } + /** + *

    The time at which the engagement started.

    + */ @JsonSetter(value = "start_time", nulls = Nulls.SKIP) public Builder startTime(Optional startTime) { this.startTime = startTime; @@ -457,6 +488,9 @@ public Builder startTime(OffsetDateTime startTime) { return this; } + /** + *

    The time at which the engagement ended.

    + */ @JsonSetter(value = "end_time", nulls = Nulls.SKIP) public Builder endTime(Optional endTime) { this.endTime = endTime; @@ -468,6 +502,9 @@ public Builder endTime(OffsetDateTime endTime) { return this; } + /** + *

    The account of the engagement.

    + */ @JsonSetter(value = "account", nulls = Nulls.SKIP) public Builder account(Optional account) { this.account = account; @@ -490,6 +527,9 @@ public Builder contacts(List> contacts) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/crm/types/EngagementDirection.java b/src/main/java/com/merge/api/crm/types/EngagementDirection.java new file mode 100644 index 000000000..abe4d56d2 --- /dev/null +++ b/src/main/java/com/merge/api/crm/types/EngagementDirection.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.crm.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EngagementDirection.Deserializer.class) +public final class EngagementDirection { + private final Object value; + + private final int type; + + private EngagementDirection(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((DirectionEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EngagementDirection && equalTo((EngagementDirection) other); + } + + private boolean equalTo(EngagementDirection other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EngagementDirection of(DirectionEnum value) { + return new EngagementDirection(value, 0); + } + + public static EngagementDirection of(String value) { + return new EngagementDirection(value, 1); + } + + public interface Visitor { + T visit(DirectionEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EngagementDirection.class); + } + + @java.lang.Override + public EngagementDirection deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, DirectionEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/crm/types/EngagementEndpointRequest.java b/src/main/java/com/merge/api/crm/types/EngagementEndpointRequest.java index 1f8e10c38..32ad5659f 100644 --- a/src/main/java/com/merge/api/crm/types/EngagementEndpointRequest.java +++ b/src/main/java/com/merge/api/crm/types/EngagementEndpointRequest.java @@ -99,10 +99,16 @@ public interface ModelStage { public interface _FinalStage { EngagementEndpointRequest build(); + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ _FinalStage isDebugMode(Optional isDebugMode); _FinalStage isDebugMode(Boolean isDebugMode); + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ _FinalStage runAsync(Optional runAsync); _FinalStage runAsync(Boolean runAsync); @@ -146,6 +152,9 @@ public _FinalStage runAsync(Boolean runAsync) { return this; } + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ @java.lang.Override @JsonSetter(value = "run_async", nulls = Nulls.SKIP) public _FinalStage runAsync(Optional runAsync) { @@ -163,6 +172,9 @@ public _FinalStage isDebugMode(Boolean isDebugMode) { return this; } + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ @java.lang.Override @JsonSetter(value = "is_debug_mode", nulls = Nulls.SKIP) public _FinalStage isDebugMode(Optional isDebugMode) { diff --git a/src/main/java/com/merge/api/crm/types/EngagementRequest.java b/src/main/java/com/merge/api/crm/types/EngagementRequest.java index b29e261a0..31bcd1dea 100644 --- a/src/main/java/com/merge/api/crm/types/EngagementRequest.java +++ b/src/main/java/com/merge/api/crm/types/EngagementRequest.java @@ -29,7 +29,7 @@ public final class EngagementRequest { private final Optional subject; - private final Optional direction; + private final Optional direction; private final Optional engagementType; @@ -53,7 +53,7 @@ private EngagementRequest( Optional owner, Optional content, Optional subject, - Optional direction, + Optional direction, Optional engagementType, Optional startTime, Optional endTime, @@ -110,7 +110,7 @@ public Optional getSubject() { * */ @JsonProperty("direction") - public Optional getDirection() { + public Optional getDirection() { return direction; } @@ -226,7 +226,7 @@ public static final class Builder { private Optional subject = Optional.empty(); - private Optional direction = Optional.empty(); + private Optional direction = Optional.empty(); private Optional engagementType = Optional.empty(); @@ -265,6 +265,9 @@ public Builder from(EngagementRequest other) { return this; } + /** + *

    The engagement's owner.

    + */ @JsonSetter(value = "owner", nulls = Nulls.SKIP) public Builder owner(Optional owner) { this.owner = owner; @@ -276,6 +279,9 @@ public Builder owner(EngagementRequestOwner owner) { return this; } + /** + *

    The engagement's content.

    + */ @JsonSetter(value = "content", nulls = Nulls.SKIP) public Builder content(Optional content) { this.content = content; @@ -287,6 +293,9 @@ public Builder content(String content) { return this; } + /** + *

    The engagement's subject.

    + */ @JsonSetter(value = "subject", nulls = Nulls.SKIP) public Builder subject(Optional subject) { this.subject = subject; @@ -298,17 +307,27 @@ public Builder subject(String subject) { return this; } + /** + *

    The engagement's direction.

    + *
      + *
    • INBOUND - INBOUND
    • + *
    • OUTBOUND - OUTBOUND
    • + *
    + */ @JsonSetter(value = "direction", nulls = Nulls.SKIP) - public Builder direction(Optional direction) { + public Builder direction(Optional direction) { this.direction = direction; return this; } - public Builder direction(DirectionEnum direction) { + public Builder direction(EngagementRequestDirection direction) { this.direction = Optional.ofNullable(direction); return this; } + /** + *

    The engagement type of the engagement.

    + */ @JsonSetter(value = "engagement_type", nulls = Nulls.SKIP) public Builder engagementType(Optional engagementType) { this.engagementType = engagementType; @@ -320,6 +339,9 @@ public Builder engagementType(EngagementRequestEngagementType engagementType) { return this; } + /** + *

    The time at which the engagement started.

    + */ @JsonSetter(value = "start_time", nulls = Nulls.SKIP) public Builder startTime(Optional startTime) { this.startTime = startTime; @@ -331,6 +353,9 @@ public Builder startTime(OffsetDateTime startTime) { return this; } + /** + *

    The time at which the engagement ended.

    + */ @JsonSetter(value = "end_time", nulls = Nulls.SKIP) public Builder endTime(Optional endTime) { this.endTime = endTime; @@ -342,6 +367,9 @@ public Builder endTime(OffsetDateTime endTime) { return this; } + /** + *

    The account of the engagement.

    + */ @JsonSetter(value = "account", nulls = Nulls.SKIP) public Builder account(Optional account) { this.account = account; diff --git a/src/main/java/com/merge/api/crm/types/EngagementRequestDirection.java b/src/main/java/com/merge/api/crm/types/EngagementRequestDirection.java new file mode 100644 index 000000000..c5b6d6f93 --- /dev/null +++ b/src/main/java/com/merge/api/crm/types/EngagementRequestDirection.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.crm.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EngagementRequestDirection.Deserializer.class) +public final class EngagementRequestDirection { + private final Object value; + + private final int type; + + private EngagementRequestDirection(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((DirectionEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EngagementRequestDirection && equalTo((EngagementRequestDirection) other); + } + + private boolean equalTo(EngagementRequestDirection other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EngagementRequestDirection of(DirectionEnum value) { + return new EngagementRequestDirection(value, 0); + } + + public static EngagementRequestDirection of(String value) { + return new EngagementRequestDirection(value, 1); + } + + public interface Visitor { + T visit(DirectionEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EngagementRequestDirection.class); + } + + @java.lang.Override + public EngagementRequestDirection deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, DirectionEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/crm/types/EngagementType.java b/src/main/java/com/merge/api/crm/types/EngagementType.java index efb597bd6..7034741d1 100644 --- a/src/main/java/com/merge/api/crm/types/EngagementType.java +++ b/src/main/java/com/merge/api/crm/types/EngagementType.java @@ -30,7 +30,7 @@ public final class EngagementType { private final Optional modifiedAt; - private final Optional activityType; + private final Optional activityType; private final Optional name; @@ -43,7 +43,7 @@ private EngagementType( Optional remoteId, Optional createdAt, Optional modifiedAt, - Optional activityType, + Optional activityType, Optional name, Optional> remoteFields, Map additionalProperties) { @@ -95,7 +95,7 @@ public Optional getModifiedAt() { * */ @JsonProperty("activity_type") - public Optional getActivityType() { + public Optional getActivityType() { return activityType; } @@ -164,7 +164,7 @@ public static final class Builder { private Optional modifiedAt = Optional.empty(); - private Optional activityType = Optional.empty(); + private Optional activityType = Optional.empty(); private Optional name = Optional.empty(); @@ -197,6 +197,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -208,6 +211,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -219,6 +225,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -230,17 +239,28 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The engagement type's activity type.

    + *
      + *
    • CALL - CALL
    • + *
    • MEETING - MEETING
    • + *
    • EMAIL - EMAIL
    • + *
    + */ @JsonSetter(value = "activity_type", nulls = Nulls.SKIP) - public Builder activityType(Optional activityType) { + public Builder activityType(Optional activityType) { this.activityType = activityType; return this; } - public Builder activityType(ActivityTypeEnum activityType) { + public Builder activityType(EngagementTypeActivityType activityType) { this.activityType = Optional.ofNullable(activityType); return this; } + /** + *

    The engagement type's name.

    + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; diff --git a/src/main/java/com/merge/api/crm/types/EngagementTypeActivityType.java b/src/main/java/com/merge/api/crm/types/EngagementTypeActivityType.java new file mode 100644 index 000000000..85aac2fc4 --- /dev/null +++ b/src/main/java/com/merge/api/crm/types/EngagementTypeActivityType.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.crm.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EngagementTypeActivityType.Deserializer.class) +public final class EngagementTypeActivityType { + private final Object value; + + private final int type; + + private EngagementTypeActivityType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((ActivityTypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EngagementTypeActivityType && equalTo((EngagementTypeActivityType) other); + } + + private boolean equalTo(EngagementTypeActivityType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EngagementTypeActivityType of(ActivityTypeEnum value) { + return new EngagementTypeActivityType(value, 0); + } + + public static EngagementTypeActivityType of(String value) { + return new EngagementTypeActivityType(value, 1); + } + + public interface Visitor { + T visit(ActivityTypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EngagementTypeActivityType.class); + } + + @java.lang.Override + public EngagementTypeActivityType deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, ActivityTypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/crm/types/EngagementTypesListRequest.java b/src/main/java/com/merge/api/crm/types/EngagementTypesListRequest.java index 6345a67e8..d5b09e2ce 100644 --- a/src/main/java/com/merge/api/crm/types/EngagementTypesListRequest.java +++ b/src/main/java/com/merge/api/crm/types/EngagementTypesListRequest.java @@ -254,6 +254,9 @@ public Builder from(EngagementTypesListRequest other) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -265,6 +268,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -276,6 +282,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -287,6 +296,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -298,6 +310,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -309,6 +324,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

    + */ @JsonSetter(value = "include_remote_fields", nulls = Nulls.SKIP) public Builder includeRemoteFields(Optional includeRemoteFields) { this.includeRemoteFields = includeRemoteFields; @@ -320,6 +338,9 @@ public Builder includeRemoteFields(Boolean includeRemoteFields) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -331,6 +352,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -342,6 +366,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -353,6 +380,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -364,6 +394,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; diff --git a/src/main/java/com/merge/api/crm/types/EngagementTypesRemoteFieldClassesListRequest.java b/src/main/java/com/merge/api/crm/types/EngagementTypesRemoteFieldClassesListRequest.java index dc0c383cd..a0c26d8b2 100644 --- a/src/main/java/com/merge/api/crm/types/EngagementTypesRemoteFieldClassesListRequest.java +++ b/src/main/java/com/merge/api/crm/types/EngagementTypesRemoteFieldClassesListRequest.java @@ -32,6 +32,8 @@ public final class EngagementTypesRemoteFieldClassesListRequest { private final Optional isCommonModelField; + private final Optional isCustom; + private final Optional pageSize; private final Map additionalProperties; @@ -43,6 +45,7 @@ private EngagementTypesRemoteFieldClassesListRequest( Optional includeRemoteFields, Optional includeShellData, Optional isCommonModelField, + Optional isCustom, Optional pageSize, Map additionalProperties) { this.cursor = cursor; @@ -51,6 +54,7 @@ private EngagementTypesRemoteFieldClassesListRequest( this.includeRemoteFields = includeRemoteFields; this.includeShellData = includeShellData; this.isCommonModelField = isCommonModelField; + this.isCustom = isCustom; this.pageSize = pageSize; this.additionalProperties = additionalProperties; } @@ -103,6 +107,14 @@ public Optional getIsCommonModelField() { return isCommonModelField; } + /** + * @return If provided, will only return remote fields classes with this is_custom value + */ + @JsonProperty("is_custom") + public Optional getIsCustom() { + return isCustom; + } + /** * @return Number of results to return per page. */ @@ -130,6 +142,7 @@ private boolean equalTo(EngagementTypesRemoteFieldClassesListRequest other) { && includeRemoteFields.equals(other.includeRemoteFields) && includeShellData.equals(other.includeShellData) && isCommonModelField.equals(other.isCommonModelField) + && isCustom.equals(other.isCustom) && pageSize.equals(other.pageSize); } @@ -142,6 +155,7 @@ public int hashCode() { this.includeRemoteFields, this.includeShellData, this.isCommonModelField, + this.isCustom, this.pageSize); } @@ -168,6 +182,8 @@ public static final class Builder { private Optional isCommonModelField = Optional.empty(); + private Optional isCustom = Optional.empty(); + private Optional pageSize = Optional.empty(); @JsonAnySetter @@ -182,10 +198,14 @@ public Builder from(EngagementTypesRemoteFieldClassesListRequest other) { includeRemoteFields(other.getIncludeRemoteFields()); includeShellData(other.getIncludeShellData()); isCommonModelField(other.getIsCommonModelField()); + isCustom(other.getIsCustom()); pageSize(other.getPageSize()); return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -197,6 +217,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -208,6 +231,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -219,6 +245,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

    + */ @JsonSetter(value = "include_remote_fields", nulls = Nulls.SKIP) public Builder includeRemoteFields(Optional includeRemoteFields) { this.includeRemoteFields = includeRemoteFields; @@ -230,6 +259,9 @@ public Builder includeRemoteFields(Boolean includeRemoteFields) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -241,6 +273,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, will only return remote field classes with this is_common_model_field value

    + */ @JsonSetter(value = "is_common_model_field", nulls = Nulls.SKIP) public Builder isCommonModelField(Optional isCommonModelField) { this.isCommonModelField = isCommonModelField; @@ -252,6 +287,23 @@ public Builder isCommonModelField(Boolean isCommonModelField) { return this; } + /** + *

    If provided, will only return remote fields classes with this is_custom value

    + */ + @JsonSetter(value = "is_custom", nulls = Nulls.SKIP) + public Builder isCustom(Optional isCustom) { + this.isCustom = isCustom; + return this; + } + + public Builder isCustom(Boolean isCustom) { + this.isCustom = Optional.ofNullable(isCustom); + return this; + } + + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -271,6 +323,7 @@ public EngagementTypesRemoteFieldClassesListRequest build() { includeRemoteFields, includeShellData, isCommonModelField, + isCustom, pageSize, additionalProperties); } diff --git a/src/main/java/com/merge/api/crm/types/EngagementTypesRetrieveRequest.java b/src/main/java/com/merge/api/crm/types/EngagementTypesRetrieveRequest.java index 236c93321..206a1fe9f 100644 --- a/src/main/java/com/merge/api/crm/types/EngagementTypesRetrieveRequest.java +++ b/src/main/java/com/merge/api/crm/types/EngagementTypesRetrieveRequest.java @@ -114,6 +114,9 @@ public Builder from(EngagementTypesRetrieveRequest other) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -125,6 +128,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

    + */ @JsonSetter(value = "include_remote_fields", nulls = Nulls.SKIP) public Builder includeRemoteFields(Optional includeRemoteFields) { this.includeRemoteFields = includeRemoteFields; @@ -136,6 +142,9 @@ public Builder includeRemoteFields(Boolean includeRemoteFields) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/crm/types/EngagementsListRequest.java b/src/main/java/com/merge/api/crm/types/EngagementsListRequest.java index 27adfbf7f..8bc870e87 100644 --- a/src/main/java/com/merge/api/crm/types/EngagementsListRequest.java +++ b/src/main/java/com/merge/api/crm/types/EngagementsListRequest.java @@ -307,6 +307,9 @@ public Builder from(EngagementsListRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -323,6 +326,9 @@ public Builder expand(EngagementsListRequestExpandItem expand) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -334,6 +340,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -345,6 +354,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -356,6 +368,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -367,6 +382,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -378,6 +396,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

    + */ @JsonSetter(value = "include_remote_fields", nulls = Nulls.SKIP) public Builder includeRemoteFields(Optional includeRemoteFields) { this.includeRemoteFields = includeRemoteFields; @@ -389,6 +410,9 @@ public Builder includeRemoteFields(Boolean includeRemoteFields) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -400,6 +424,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -411,6 +438,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -422,6 +452,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -433,6 +466,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -444,6 +480,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    If provided, will only return engagements started after this datetime.

    + */ @JsonSetter(value = "started_after", nulls = Nulls.SKIP) public Builder startedAfter(Optional startedAfter) { this.startedAfter = startedAfter; @@ -455,6 +494,9 @@ public Builder startedAfter(OffsetDateTime startedAfter) { return this; } + /** + *

    If provided, will only return engagements started before this datetime.

    + */ @JsonSetter(value = "started_before", nulls = Nulls.SKIP) public Builder startedBefore(Optional startedBefore) { this.startedBefore = startedBefore; diff --git a/src/main/java/com/merge/api/crm/types/EngagementsRemoteFieldClassesListRequest.java b/src/main/java/com/merge/api/crm/types/EngagementsRemoteFieldClassesListRequest.java index f78f2d9af..fe891f2bd 100644 --- a/src/main/java/com/merge/api/crm/types/EngagementsRemoteFieldClassesListRequest.java +++ b/src/main/java/com/merge/api/crm/types/EngagementsRemoteFieldClassesListRequest.java @@ -32,6 +32,8 @@ public final class EngagementsRemoteFieldClassesListRequest { private final Optional isCommonModelField; + private final Optional isCustom; + private final Optional pageSize; private final Map additionalProperties; @@ -43,6 +45,7 @@ private EngagementsRemoteFieldClassesListRequest( Optional includeRemoteFields, Optional includeShellData, Optional isCommonModelField, + Optional isCustom, Optional pageSize, Map additionalProperties) { this.cursor = cursor; @@ -51,6 +54,7 @@ private EngagementsRemoteFieldClassesListRequest( this.includeRemoteFields = includeRemoteFields; this.includeShellData = includeShellData; this.isCommonModelField = isCommonModelField; + this.isCustom = isCustom; this.pageSize = pageSize; this.additionalProperties = additionalProperties; } @@ -103,6 +107,14 @@ public Optional getIsCommonModelField() { return isCommonModelField; } + /** + * @return If provided, will only return remote fields classes with this is_custom value + */ + @JsonProperty("is_custom") + public Optional getIsCustom() { + return isCustom; + } + /** * @return Number of results to return per page. */ @@ -130,6 +142,7 @@ private boolean equalTo(EngagementsRemoteFieldClassesListRequest other) { && includeRemoteFields.equals(other.includeRemoteFields) && includeShellData.equals(other.includeShellData) && isCommonModelField.equals(other.isCommonModelField) + && isCustom.equals(other.isCustom) && pageSize.equals(other.pageSize); } @@ -142,6 +155,7 @@ public int hashCode() { this.includeRemoteFields, this.includeShellData, this.isCommonModelField, + this.isCustom, this.pageSize); } @@ -168,6 +182,8 @@ public static final class Builder { private Optional isCommonModelField = Optional.empty(); + private Optional isCustom = Optional.empty(); + private Optional pageSize = Optional.empty(); @JsonAnySetter @@ -182,10 +198,14 @@ public Builder from(EngagementsRemoteFieldClassesListRequest other) { includeRemoteFields(other.getIncludeRemoteFields()); includeShellData(other.getIncludeShellData()); isCommonModelField(other.getIsCommonModelField()); + isCustom(other.getIsCustom()); pageSize(other.getPageSize()); return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -197,6 +217,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -208,6 +231,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -219,6 +245,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

    + */ @JsonSetter(value = "include_remote_fields", nulls = Nulls.SKIP) public Builder includeRemoteFields(Optional includeRemoteFields) { this.includeRemoteFields = includeRemoteFields; @@ -230,6 +259,9 @@ public Builder includeRemoteFields(Boolean includeRemoteFields) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -241,6 +273,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, will only return remote field classes with this is_common_model_field value

    + */ @JsonSetter(value = "is_common_model_field", nulls = Nulls.SKIP) public Builder isCommonModelField(Optional isCommonModelField) { this.isCommonModelField = isCommonModelField; @@ -252,6 +287,23 @@ public Builder isCommonModelField(Boolean isCommonModelField) { return this; } + /** + *

    If provided, will only return remote fields classes with this is_custom value

    + */ + @JsonSetter(value = "is_custom", nulls = Nulls.SKIP) + public Builder isCustom(Optional isCustom) { + this.isCustom = isCustom; + return this; + } + + public Builder isCustom(Boolean isCustom) { + this.isCustom = Optional.ofNullable(isCustom); + return this; + } + + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -271,6 +323,7 @@ public EngagementsRemoteFieldClassesListRequest build() { includeRemoteFields, includeShellData, isCommonModelField, + isCustom, pageSize, additionalProperties); } diff --git a/src/main/java/com/merge/api/crm/types/EngagementsRetrieveRequest.java b/src/main/java/com/merge/api/crm/types/EngagementsRetrieveRequest.java index 66f8f8edf..b7457dd0a 100644 --- a/src/main/java/com/merge/api/crm/types/EngagementsRetrieveRequest.java +++ b/src/main/java/com/merge/api/crm/types/EngagementsRetrieveRequest.java @@ -132,6 +132,9 @@ public Builder from(EngagementsRetrieveRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -148,6 +151,9 @@ public Builder expand(EngagementsRetrieveRequestExpandItem expand) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -159,6 +165,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

    + */ @JsonSetter(value = "include_remote_fields", nulls = Nulls.SKIP) public Builder includeRemoteFields(Optional includeRemoteFields) { this.includeRemoteFields = includeRemoteFields; @@ -170,6 +179,9 @@ public Builder includeRemoteFields(Boolean includeRemoteFields) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/crm/types/EventTypeEnum.java b/src/main/java/com/merge/api/crm/types/EventTypeEnum.java index bb0e53b73..2b12fd950 100644 --- a/src/main/java/com/merge/api/crm/types/EventTypeEnum.java +++ b/src/main/java/com/merge/api/crm/types/EventTypeEnum.java @@ -16,6 +16,8 @@ public enum EventTypeEnum { REGENERATED_PRODUCTION_API_KEY("REGENERATED_PRODUCTION_API_KEY"), + REGENERATED_WEBHOOK_SIGNATURE("REGENERATED_WEBHOOK_SIGNATURE"), + INVITED_USER("INVITED_USER"), TWO_FACTOR_AUTH_ENABLED("TWO_FACTOR_AUTH_ENABLED"), diff --git a/src/main/java/com/merge/api/crm/types/FieldMappingsRetrieveRequest.java b/src/main/java/com/merge/api/crm/types/FieldMappingsRetrieveRequest.java index 1080db84b..cefb77fe2 100644 --- a/src/main/java/com/merge/api/crm/types/FieldMappingsRetrieveRequest.java +++ b/src/main/java/com/merge/api/crm/types/FieldMappingsRetrieveRequest.java @@ -81,6 +81,9 @@ public Builder from(FieldMappingsRetrieveRequest other) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "exclude_remote_field_metadata", nulls = Nulls.SKIP) public Builder excludeRemoteFieldMetadata(Optional excludeRemoteFieldMetadata) { this.excludeRemoteFieldMetadata = excludeRemoteFieldMetadata; diff --git a/src/main/java/com/merge/api/crm/types/GenerateRemoteKeyRequest.java b/src/main/java/com/merge/api/crm/types/GenerateRemoteKeyRequest.java index 3f4cc5646..9fc64996a 100644 --- a/src/main/java/com/merge/api/crm/types/GenerateRemoteKeyRequest.java +++ b/src/main/java/com/merge/api/crm/types/GenerateRemoteKeyRequest.java @@ -66,6 +66,9 @@ public static NameStage builder() { } public interface NameStage { + /** + * The name of the remote key + */ _FinalStage name(@NotNull String name); Builder from(GenerateRemoteKeyRequest other); @@ -91,7 +94,7 @@ public Builder from(GenerateRemoteKeyRequest other) { } /** - *

    The name of the remote key

    + * The name of the remote key

    The name of the remote key

    * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override diff --git a/src/main/java/com/merge/api/crm/types/IgnoreCommonModelRequest.java b/src/main/java/com/merge/api/crm/types/IgnoreCommonModelRequest.java index 2751e829c..04b7151f0 100644 --- a/src/main/java/com/merge/api/crm/types/IgnoreCommonModelRequest.java +++ b/src/main/java/com/merge/api/crm/types/IgnoreCommonModelRequest.java @@ -21,21 +21,21 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = IgnoreCommonModelRequest.Builder.class) public final class IgnoreCommonModelRequest { - private final ReasonEnum reason; + private final IgnoreCommonModelRequestReason reason; private final Optional message; private final Map additionalProperties; private IgnoreCommonModelRequest( - ReasonEnum reason, Optional message, Map additionalProperties) { + IgnoreCommonModelRequestReason reason, Optional message, Map additionalProperties) { this.reason = reason; this.message = message; this.additionalProperties = additionalProperties; } @JsonProperty("reason") - public ReasonEnum getReason() { + public IgnoreCommonModelRequestReason getReason() { return reason; } @@ -74,7 +74,7 @@ public static ReasonStage builder() { } public interface ReasonStage { - _FinalStage reason(@NotNull ReasonEnum reason); + _FinalStage reason(@NotNull IgnoreCommonModelRequestReason reason); Builder from(IgnoreCommonModelRequest other); } @@ -89,7 +89,7 @@ public interface _FinalStage { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements ReasonStage, _FinalStage { - private ReasonEnum reason; + private IgnoreCommonModelRequestReason reason; private Optional message = Optional.empty(); @@ -107,7 +107,7 @@ public Builder from(IgnoreCommonModelRequest other) { @java.lang.Override @JsonSetter("reason") - public _FinalStage reason(@NotNull ReasonEnum reason) { + public _FinalStage reason(@NotNull IgnoreCommonModelRequestReason reason) { this.reason = reason; return this; } diff --git a/src/main/java/com/merge/api/crm/types/IgnoreCommonModelRequestReason.java b/src/main/java/com/merge/api/crm/types/IgnoreCommonModelRequestReason.java new file mode 100644 index 000000000..16b1996bf --- /dev/null +++ b/src/main/java/com/merge/api/crm/types/IgnoreCommonModelRequestReason.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.crm.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = IgnoreCommonModelRequestReason.Deserializer.class) +public final class IgnoreCommonModelRequestReason { + private final Object value; + + private final int type; + + private IgnoreCommonModelRequestReason(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((ReasonEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof IgnoreCommonModelRequestReason && equalTo((IgnoreCommonModelRequestReason) other); + } + + private boolean equalTo(IgnoreCommonModelRequestReason other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static IgnoreCommonModelRequestReason of(ReasonEnum value) { + return new IgnoreCommonModelRequestReason(value, 0); + } + + public static IgnoreCommonModelRequestReason of(String value) { + return new IgnoreCommonModelRequestReason(value, 1); + } + + public interface Visitor { + T visit(ReasonEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(IgnoreCommonModelRequestReason.class); + } + + @java.lang.Override + public IgnoreCommonModelRequestReason deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, ReasonEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/crm/types/Issue.java b/src/main/java/com/merge/api/crm/types/Issue.java index b7df77a8c..7c926ff6d 100644 --- a/src/main/java/com/merge/api/crm/types/Issue.java +++ b/src/main/java/com/merge/api/crm/types/Issue.java @@ -26,7 +26,7 @@ public final class Issue { private final Optional id; - private final Optional status; + private final Optional status; private final String errorDescription; @@ -44,7 +44,7 @@ public final class Issue { private Issue( Optional id, - Optional status, + Optional status, String errorDescription, Optional> endUser, Optional firstIncidentTime, @@ -76,7 +76,7 @@ public Optional getId() { * */ @JsonProperty("status") - public Optional getStatus() { + public Optional getStatus() { return status; } @@ -167,9 +167,16 @@ public interface _FinalStage { _FinalStage id(String id); - _FinalStage status(Optional status); + /** + *

    Status of the issue. Options: ('ONGOING', 'RESOLVED')

    + *
      + *
    • ONGOING - ONGOING
    • + *
    • RESOLVED - RESOLVED
    • + *
    + */ + _FinalStage status(Optional status); - _FinalStage status(IssueStatusEnum status); + _FinalStage status(IssueStatus status); _FinalStage endUser(Optional> endUser); @@ -206,7 +213,7 @@ public static final class Builder implements ErrorDescriptionStage, _FinalStage private Optional> endUser = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Optional id = Optional.empty(); @@ -309,14 +316,21 @@ public _FinalStage endUser(Optional> endUser) { * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override - public _FinalStage status(IssueStatusEnum status) { + public _FinalStage status(IssueStatus status) { this.status = Optional.ofNullable(status); return this; } + /** + *

    Status of the issue. Options: ('ONGOING', 'RESOLVED')

    + *
      + *
    • ONGOING - ONGOING
    • + *
    • RESOLVED - RESOLVED
    • + *
    + */ @java.lang.Override @JsonSetter(value = "status", nulls = Nulls.SKIP) - public _FinalStage status(Optional status) { + public _FinalStage status(Optional status) { this.status = status; return this; } diff --git a/src/main/java/com/merge/api/crm/types/IssueStatus.java b/src/main/java/com/merge/api/crm/types/IssueStatus.java new file mode 100644 index 000000000..c69ec0311 --- /dev/null +++ b/src/main/java/com/merge/api/crm/types/IssueStatus.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.crm.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = IssueStatus.Deserializer.class) +public final class IssueStatus { + private final Object value; + + private final int type; + + private IssueStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((IssueStatusEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof IssueStatus && equalTo((IssueStatus) other); + } + + private boolean equalTo(IssueStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static IssueStatus of(IssueStatusEnum value) { + return new IssueStatus(value, 0); + } + + public static IssueStatus of(String value) { + return new IssueStatus(value, 1); + } + + public interface Visitor { + T visit(IssueStatusEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(IssueStatus.class); + } + + @java.lang.Override + public IssueStatus deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, IssueStatusEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/crm/types/IssuesListRequest.java b/src/main/java/com/merge/api/crm/types/IssuesListRequest.java index 834d87f08..02b8c3ed6 100644 --- a/src/main/java/com/merge/api/crm/types/IssuesListRequest.java +++ b/src/main/java/com/merge/api/crm/types/IssuesListRequest.java @@ -311,6 +311,9 @@ public Builder accountToken(String accountToken) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -322,6 +325,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    If included, will only include issues whose most recent action occurred before this time

    + */ @JsonSetter(value = "end_date", nulls = Nulls.SKIP) public Builder endDate(Optional endDate) { this.endDate = endDate; @@ -344,6 +350,9 @@ public Builder endUserOrganizationName(String endUserOrganizationName) { return this; } + /** + *

    If provided, will only return issues whose first incident time was after this datetime.

    + */ @JsonSetter(value = "first_incident_time_after", nulls = Nulls.SKIP) public Builder firstIncidentTimeAfter(Optional firstIncidentTimeAfter) { this.firstIncidentTimeAfter = firstIncidentTimeAfter; @@ -355,6 +364,9 @@ public Builder firstIncidentTimeAfter(OffsetDateTime firstIncidentTimeAfter) { return this; } + /** + *

    If provided, will only return issues whose first incident time was before this datetime.

    + */ @JsonSetter(value = "first_incident_time_before", nulls = Nulls.SKIP) public Builder firstIncidentTimeBefore(Optional firstIncidentTimeBefore) { this.firstIncidentTimeBefore = firstIncidentTimeBefore; @@ -366,6 +378,9 @@ public Builder firstIncidentTimeBefore(OffsetDateTime firstIncidentTimeBefore) { return this; } + /** + *

    If true, will include muted issues

    + */ @JsonSetter(value = "include_muted", nulls = Nulls.SKIP) public Builder includeMuted(Optional includeMuted) { this.includeMuted = includeMuted; @@ -388,6 +403,9 @@ public Builder integrationName(String integrationName) { return this; } + /** + *

    If provided, will only return issues whose last incident time was after this datetime.

    + */ @JsonSetter(value = "last_incident_time_after", nulls = Nulls.SKIP) public Builder lastIncidentTimeAfter(Optional lastIncidentTimeAfter) { this.lastIncidentTimeAfter = lastIncidentTimeAfter; @@ -399,6 +417,9 @@ public Builder lastIncidentTimeAfter(OffsetDateTime lastIncidentTimeAfter) { return this; } + /** + *

    If provided, will only return issues whose last incident time was before this datetime.

    + */ @JsonSetter(value = "last_incident_time_before", nulls = Nulls.SKIP) public Builder lastIncidentTimeBefore(Optional lastIncidentTimeBefore) { this.lastIncidentTimeBefore = lastIncidentTimeBefore; @@ -410,6 +431,9 @@ public Builder lastIncidentTimeBefore(OffsetDateTime lastIncidentTimeBefore) { return this; } + /** + *

    If provided, will only include issues pertaining to the linked account passed in.

    + */ @JsonSetter(value = "linked_account_id", nulls = Nulls.SKIP) public Builder linkedAccountId(Optional linkedAccountId) { this.linkedAccountId = linkedAccountId; @@ -421,6 +445,9 @@ public Builder linkedAccountId(String linkedAccountId) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -432,6 +459,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    If included, will only include issues whose most recent action occurred after this time

    + */ @JsonSetter(value = "start_date", nulls = Nulls.SKIP) public Builder startDate(Optional startDate) { this.startDate = startDate; @@ -443,6 +473,13 @@ public Builder startDate(String startDate) { return this; } + /** + *

    Status of the issue. Options: ('ONGOING', 'RESOLVED')

    + *
      + *
    • ONGOING - ONGOING
    • + *
    • RESOLVED - RESOLVED
    • + *
    + */ @JsonSetter(value = "status", nulls = Nulls.SKIP) public Builder status(Optional status) { this.status = status; diff --git a/src/main/java/com/merge/api/crm/types/Lead.java b/src/main/java/com/merge/api/crm/types/Lead.java index af6721685..9baa7d7a2 100644 --- a/src/main/java/com/merge/api/crm/types/Lead.java +++ b/src/main/java/com/merge/api/crm/types/Lead.java @@ -433,6 +433,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -444,6 +447,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -455,6 +461,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -466,6 +475,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The lead's owner.

    + */ @JsonSetter(value = "owner", nulls = Nulls.SKIP) public Builder owner(Optional owner) { this.owner = owner; @@ -477,6 +489,9 @@ public Builder owner(LeadOwner owner) { return this; } + /** + *

    The lead's source.

    + */ @JsonSetter(value = "lead_source", nulls = Nulls.SKIP) public Builder leadSource(Optional leadSource) { this.leadSource = leadSource; @@ -488,6 +503,9 @@ public Builder leadSource(String leadSource) { return this; } + /** + *

    The lead's title.

    + */ @JsonSetter(value = "title", nulls = Nulls.SKIP) public Builder title(Optional title) { this.title = title; @@ -499,6 +517,9 @@ public Builder title(String title) { return this; } + /** + *

    The lead's company.

    + */ @JsonSetter(value = "company", nulls = Nulls.SKIP) public Builder company(Optional company) { this.company = company; @@ -510,6 +531,9 @@ public Builder company(String company) { return this; } + /** + *

    The lead's first name.

    + */ @JsonSetter(value = "first_name", nulls = Nulls.SKIP) public Builder firstName(Optional firstName) { this.firstName = firstName; @@ -521,6 +545,9 @@ public Builder firstName(String firstName) { return this; } + /** + *

    The lead's last name.

    + */ @JsonSetter(value = "last_name", nulls = Nulls.SKIP) public Builder lastName(Optional lastName) { this.lastName = lastName; @@ -565,6 +592,9 @@ public Builder phoneNumbers(List phoneNumbers) { return this; } + /** + *

    When the third party's lead was updated.

    + */ @JsonSetter(value = "remote_updated_at", nulls = Nulls.SKIP) public Builder remoteUpdatedAt(Optional remoteUpdatedAt) { this.remoteUpdatedAt = remoteUpdatedAt; @@ -576,6 +606,9 @@ public Builder remoteUpdatedAt(OffsetDateTime remoteUpdatedAt) { return this; } + /** + *

    When the third party's lead was created.

    + */ @JsonSetter(value = "remote_created_at", nulls = Nulls.SKIP) public Builder remoteCreatedAt(Optional remoteCreatedAt) { this.remoteCreatedAt = remoteCreatedAt; @@ -587,6 +620,9 @@ public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { return this; } + /** + *

    When the lead was converted.

    + */ @JsonSetter(value = "converted_date", nulls = Nulls.SKIP) public Builder convertedDate(Optional convertedDate) { this.convertedDate = convertedDate; @@ -598,6 +634,9 @@ public Builder convertedDate(OffsetDateTime convertedDate) { return this; } + /** + *

    The contact of the converted lead.

    + */ @JsonSetter(value = "converted_contact", nulls = Nulls.SKIP) public Builder convertedContact(Optional convertedContact) { this.convertedContact = convertedContact; @@ -609,6 +648,9 @@ public Builder convertedContact(LeadConvertedContact convertedContact) { return this; } + /** + *

    The account of the converted lead.

    + */ @JsonSetter(value = "converted_account", nulls = Nulls.SKIP) public Builder convertedAccount(Optional convertedAccount) { this.convertedAccount = convertedAccount; @@ -620,6 +662,9 @@ public Builder convertedAccount(LeadConvertedAccount convertedAccount) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/crm/types/LeadEndpointRequest.java b/src/main/java/com/merge/api/crm/types/LeadEndpointRequest.java index a60d3e80c..53b84adcc 100644 --- a/src/main/java/com/merge/api/crm/types/LeadEndpointRequest.java +++ b/src/main/java/com/merge/api/crm/types/LeadEndpointRequest.java @@ -99,10 +99,16 @@ public interface ModelStage { public interface _FinalStage { LeadEndpointRequest build(); + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ _FinalStage isDebugMode(Optional isDebugMode); _FinalStage isDebugMode(Boolean isDebugMode); + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ _FinalStage runAsync(Optional runAsync); _FinalStage runAsync(Boolean runAsync); @@ -146,6 +152,9 @@ public _FinalStage runAsync(Boolean runAsync) { return this; } + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ @java.lang.Override @JsonSetter(value = "run_async", nulls = Nulls.SKIP) public _FinalStage runAsync(Optional runAsync) { @@ -163,6 +172,9 @@ public _FinalStage isDebugMode(Boolean isDebugMode) { return this; } + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ @java.lang.Override @JsonSetter(value = "is_debug_mode", nulls = Nulls.SKIP) public _FinalStage isDebugMode(Optional isDebugMode) { diff --git a/src/main/java/com/merge/api/crm/types/LeadRequest.java b/src/main/java/com/merge/api/crm/types/LeadRequest.java index c208259fa..f2314c6af 100644 --- a/src/main/java/com/merge/api/crm/types/LeadRequest.java +++ b/src/main/java/com/merge/api/crm/types/LeadRequest.java @@ -306,6 +306,9 @@ public Builder from(LeadRequest other) { return this; } + /** + *

    The lead's owner.

    + */ @JsonSetter(value = "owner", nulls = Nulls.SKIP) public Builder owner(Optional owner) { this.owner = owner; @@ -317,6 +320,9 @@ public Builder owner(LeadRequestOwner owner) { return this; } + /** + *

    The lead's source.

    + */ @JsonSetter(value = "lead_source", nulls = Nulls.SKIP) public Builder leadSource(Optional leadSource) { this.leadSource = leadSource; @@ -328,6 +334,9 @@ public Builder leadSource(String leadSource) { return this; } + /** + *

    The lead's title.

    + */ @JsonSetter(value = "title", nulls = Nulls.SKIP) public Builder title(Optional title) { this.title = title; @@ -339,6 +348,9 @@ public Builder title(String title) { return this; } + /** + *

    The lead's company.

    + */ @JsonSetter(value = "company", nulls = Nulls.SKIP) public Builder company(Optional company) { this.company = company; @@ -350,6 +362,9 @@ public Builder company(String company) { return this; } + /** + *

    The lead's first name.

    + */ @JsonSetter(value = "first_name", nulls = Nulls.SKIP) public Builder firstName(Optional firstName) { this.firstName = firstName; @@ -361,6 +376,9 @@ public Builder firstName(String firstName) { return this; } + /** + *

    The lead's last name.

    + */ @JsonSetter(value = "last_name", nulls = Nulls.SKIP) public Builder lastName(Optional lastName) { this.lastName = lastName; @@ -405,6 +423,9 @@ public Builder phoneNumbers(List phoneNumbers) { return this; } + /** + *

    When the lead was converted.

    + */ @JsonSetter(value = "converted_date", nulls = Nulls.SKIP) public Builder convertedDate(Optional convertedDate) { this.convertedDate = convertedDate; @@ -416,6 +437,9 @@ public Builder convertedDate(OffsetDateTime convertedDate) { return this; } + /** + *

    The contact of the converted lead.

    + */ @JsonSetter(value = "converted_contact", nulls = Nulls.SKIP) public Builder convertedContact(Optional convertedContact) { this.convertedContact = convertedContact; @@ -427,6 +451,9 @@ public Builder convertedContact(LeadRequestConvertedContact convertedContact) { return this; } + /** + *

    The account of the converted lead.

    + */ @JsonSetter(value = "converted_account", nulls = Nulls.SKIP) public Builder convertedAccount(Optional convertedAccount) { this.convertedAccount = convertedAccount; diff --git a/src/main/java/com/merge/api/crm/types/LeadsListRequest.java b/src/main/java/com/merge/api/crm/types/LeadsListRequest.java index acba5f729..698296537 100644 --- a/src/main/java/com/merge/api/crm/types/LeadsListRequest.java +++ b/src/main/java/com/merge/api/crm/types/LeadsListRequest.java @@ -358,6 +358,9 @@ public Builder from(LeadsListRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -374,6 +377,9 @@ public Builder expand(LeadsListRequestExpandItem expand) { return this; } + /** + *

    If provided, will only return leads with this account.

    + */ @JsonSetter(value = "converted_account_id", nulls = Nulls.SKIP) public Builder convertedAccountId(Optional convertedAccountId) { this.convertedAccountId = convertedAccountId; @@ -385,6 +391,9 @@ public Builder convertedAccountId(String convertedAccountId) { return this; } + /** + *

    If provided, will only return leads with this contact.

    + */ @JsonSetter(value = "converted_contact_id", nulls = Nulls.SKIP) public Builder convertedContactId(Optional convertedContactId) { this.convertedContactId = convertedContactId; @@ -396,6 +405,9 @@ public Builder convertedContactId(String convertedContactId) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -407,6 +419,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -418,6 +433,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -429,6 +447,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    If provided, will only return contacts matching the email addresses; multiple email_addresses can be separated by commas.

    + */ @JsonSetter(value = "email_addresses", nulls = Nulls.SKIP) public Builder emailAddresses(Optional emailAddresses) { this.emailAddresses = emailAddresses; @@ -440,6 +461,9 @@ public Builder emailAddresses(String emailAddresses) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -451,6 +475,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -462,6 +489,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

    + */ @JsonSetter(value = "include_remote_fields", nulls = Nulls.SKIP) public Builder includeRemoteFields(Optional includeRemoteFields) { this.includeRemoteFields = includeRemoteFields; @@ -473,6 +503,9 @@ public Builder includeRemoteFields(Boolean includeRemoteFields) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -484,6 +517,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -495,6 +531,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -506,6 +545,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    If provided, will only return leads with this owner.

    + */ @JsonSetter(value = "owner_id", nulls = Nulls.SKIP) public Builder ownerId(Optional ownerId) { this.ownerId = ownerId; @@ -517,6 +559,9 @@ public Builder ownerId(String ownerId) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -528,6 +573,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    If provided, will only return contacts matching the phone numbers; multiple phone numbers can be separated by commas.

    + */ @JsonSetter(value = "phone_numbers", nulls = Nulls.SKIP) public Builder phoneNumbers(Optional phoneNumbers) { this.phoneNumbers = phoneNumbers; @@ -539,6 +587,9 @@ public Builder phoneNumbers(String phoneNumbers) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; diff --git a/src/main/java/com/merge/api/crm/types/LeadsRemoteFieldClassesListRequest.java b/src/main/java/com/merge/api/crm/types/LeadsRemoteFieldClassesListRequest.java index e5b3d9c12..274b0fc96 100644 --- a/src/main/java/com/merge/api/crm/types/LeadsRemoteFieldClassesListRequest.java +++ b/src/main/java/com/merge/api/crm/types/LeadsRemoteFieldClassesListRequest.java @@ -32,6 +32,8 @@ public final class LeadsRemoteFieldClassesListRequest { private final Optional isCommonModelField; + private final Optional isCustom; + private final Optional pageSize; private final Map additionalProperties; @@ -43,6 +45,7 @@ private LeadsRemoteFieldClassesListRequest( Optional includeRemoteFields, Optional includeShellData, Optional isCommonModelField, + Optional isCustom, Optional pageSize, Map additionalProperties) { this.cursor = cursor; @@ -51,6 +54,7 @@ private LeadsRemoteFieldClassesListRequest( this.includeRemoteFields = includeRemoteFields; this.includeShellData = includeShellData; this.isCommonModelField = isCommonModelField; + this.isCustom = isCustom; this.pageSize = pageSize; this.additionalProperties = additionalProperties; } @@ -103,6 +107,14 @@ public Optional getIsCommonModelField() { return isCommonModelField; } + /** + * @return If provided, will only return remote fields classes with this is_custom value + */ + @JsonProperty("is_custom") + public Optional getIsCustom() { + return isCustom; + } + /** * @return Number of results to return per page. */ @@ -130,6 +142,7 @@ private boolean equalTo(LeadsRemoteFieldClassesListRequest other) { && includeRemoteFields.equals(other.includeRemoteFields) && includeShellData.equals(other.includeShellData) && isCommonModelField.equals(other.isCommonModelField) + && isCustom.equals(other.isCustom) && pageSize.equals(other.pageSize); } @@ -142,6 +155,7 @@ public int hashCode() { this.includeRemoteFields, this.includeShellData, this.isCommonModelField, + this.isCustom, this.pageSize); } @@ -168,6 +182,8 @@ public static final class Builder { private Optional isCommonModelField = Optional.empty(); + private Optional isCustom = Optional.empty(); + private Optional pageSize = Optional.empty(); @JsonAnySetter @@ -182,10 +198,14 @@ public Builder from(LeadsRemoteFieldClassesListRequest other) { includeRemoteFields(other.getIncludeRemoteFields()); includeShellData(other.getIncludeShellData()); isCommonModelField(other.getIsCommonModelField()); + isCustom(other.getIsCustom()); pageSize(other.getPageSize()); return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -197,6 +217,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -208,6 +231,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -219,6 +245,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

    + */ @JsonSetter(value = "include_remote_fields", nulls = Nulls.SKIP) public Builder includeRemoteFields(Optional includeRemoteFields) { this.includeRemoteFields = includeRemoteFields; @@ -230,6 +259,9 @@ public Builder includeRemoteFields(Boolean includeRemoteFields) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -241,6 +273,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, will only return remote field classes with this is_common_model_field value

    + */ @JsonSetter(value = "is_common_model_field", nulls = Nulls.SKIP) public Builder isCommonModelField(Optional isCommonModelField) { this.isCommonModelField = isCommonModelField; @@ -252,6 +287,23 @@ public Builder isCommonModelField(Boolean isCommonModelField) { return this; } + /** + *

    If provided, will only return remote fields classes with this is_custom value

    + */ + @JsonSetter(value = "is_custom", nulls = Nulls.SKIP) + public Builder isCustom(Optional isCustom) { + this.isCustom = isCustom; + return this; + } + + public Builder isCustom(Boolean isCustom) { + this.isCustom = Optional.ofNullable(isCustom); + return this; + } + + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -271,6 +323,7 @@ public LeadsRemoteFieldClassesListRequest build() { includeRemoteFields, includeShellData, isCommonModelField, + isCustom, pageSize, additionalProperties); } diff --git a/src/main/java/com/merge/api/crm/types/LeadsRetrieveRequest.java b/src/main/java/com/merge/api/crm/types/LeadsRetrieveRequest.java index bd7af5845..89c5c655b 100644 --- a/src/main/java/com/merge/api/crm/types/LeadsRetrieveRequest.java +++ b/src/main/java/com/merge/api/crm/types/LeadsRetrieveRequest.java @@ -132,6 +132,9 @@ public Builder from(LeadsRetrieveRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -148,6 +151,9 @@ public Builder expand(LeadsRetrieveRequestExpandItem expand) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -159,6 +165,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

    + */ @JsonSetter(value = "include_remote_fields", nulls = Nulls.SKIP) public Builder includeRemoteFields(Optional includeRemoteFields) { this.includeRemoteFields = includeRemoteFields; @@ -170,6 +179,9 @@ public Builder includeRemoteFields(Boolean includeRemoteFields) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/crm/types/LinkedAccountCommonModelScopeDeserializerRequest.java b/src/main/java/com/merge/api/crm/types/LinkedAccountCommonModelScopeDeserializerRequest.java index d0171da15..545aea1db 100644 --- a/src/main/java/com/merge/api/crm/types/LinkedAccountCommonModelScopeDeserializerRequest.java +++ b/src/main/java/com/merge/api/crm/types/LinkedAccountCommonModelScopeDeserializerRequest.java @@ -84,6 +84,9 @@ public Builder from(LinkedAccountCommonModelScopeDeserializerRequest other) { return this; } + /** + *

    The common models you want to update the scopes for

    + */ @JsonSetter(value = "common_models", nulls = Nulls.SKIP) public Builder commonModels(List commonModels) { this.commonModels.clear(); diff --git a/src/main/java/com/merge/api/crm/types/LinkedAccountsListRequest.java b/src/main/java/com/merge/api/crm/types/LinkedAccountsListRequest.java index 51d0032ca..90189dc78 100644 --- a/src/main/java/com/merge/api/crm/types/LinkedAccountsListRequest.java +++ b/src/main/java/com/merge/api/crm/types/LinkedAccountsListRequest.java @@ -293,6 +293,18 @@ public Builder from(LinkedAccountsListRequest other) { return this; } + /** + *

    Options: accounting, ats, crm, filestorage, hris, mktg, ticketing

    + *
      + *
    • hris - hris
    • + *
    • ats - ats
    • + *
    • accounting - accounting
    • + *
    • ticketing - ticketing
    • + *
    • crm - crm
    • + *
    • mktg - mktg
    • + *
    • filestorage - filestorage
    • + *
    + */ @JsonSetter(value = "category", nulls = Nulls.SKIP) public Builder category(Optional category) { this.category = category; @@ -304,6 +316,9 @@ public Builder category(LinkedAccountsListRequestCategory category) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -315,6 +330,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    If provided, will only return linked accounts associated with the given email address.

    + */ @JsonSetter(value = "end_user_email_address", nulls = Nulls.SKIP) public Builder endUserEmailAddress(Optional endUserEmailAddress) { this.endUserEmailAddress = endUserEmailAddress; @@ -326,6 +344,9 @@ public Builder endUserEmailAddress(String endUserEmailAddress) { return this; } + /** + *

    If provided, will only return linked accounts associated with the given organization name.

    + */ @JsonSetter(value = "end_user_organization_name", nulls = Nulls.SKIP) public Builder endUserOrganizationName(Optional endUserOrganizationName) { this.endUserOrganizationName = endUserOrganizationName; @@ -337,6 +358,9 @@ public Builder endUserOrganizationName(String endUserOrganizationName) { return this; } + /** + *

    If provided, will only return linked accounts associated with the given origin ID.

    + */ @JsonSetter(value = "end_user_origin_id", nulls = Nulls.SKIP) public Builder endUserOriginId(Optional endUserOriginId) { this.endUserOriginId = endUserOriginId; @@ -348,6 +372,9 @@ public Builder endUserOriginId(String endUserOriginId) { return this; } + /** + *

    Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once.

    + */ @JsonSetter(value = "end_user_origin_ids", nulls = Nulls.SKIP) public Builder endUserOriginIds(Optional endUserOriginIds) { this.endUserOriginIds = endUserOriginIds; @@ -370,6 +397,9 @@ public Builder id(String id) { return this; } + /** + *

    Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once.

    + */ @JsonSetter(value = "ids", nulls = Nulls.SKIP) public Builder ids(Optional ids) { this.ids = ids; @@ -381,6 +411,9 @@ public Builder ids(String ids) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_duplicates", nulls = Nulls.SKIP) public Builder includeDuplicates(Optional includeDuplicates) { this.includeDuplicates = includeDuplicates; @@ -392,6 +425,9 @@ public Builder includeDuplicates(Boolean includeDuplicates) { return this; } + /** + *

    If provided, will only return linked accounts associated with the given integration name.

    + */ @JsonSetter(value = "integration_name", nulls = Nulls.SKIP) public Builder integrationName(Optional integrationName) { this.integrationName = integrationName; @@ -403,6 +439,9 @@ public Builder integrationName(String integrationName) { return this; } + /** + *

    If included, will only include test linked accounts. If not included, will only include non-test linked accounts.

    + */ @JsonSetter(value = "is_test_account", nulls = Nulls.SKIP) public Builder isTestAccount(Optional isTestAccount) { this.isTestAccount = isTestAccount; @@ -414,6 +453,9 @@ public Builder isTestAccount(String isTestAccount) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -425,6 +467,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    Filter by status. Options: COMPLETE, IDLE, INCOMPLETE, RELINK_NEEDED

    + */ @JsonSetter(value = "status", nulls = Nulls.SKIP) public Builder status(Optional status) { this.status = status; diff --git a/src/main/java/com/merge/api/crm/types/MultipartFormFieldRequest.java b/src/main/java/com/merge/api/crm/types/MultipartFormFieldRequest.java index dc384d04f..c04ebb5bc 100644 --- a/src/main/java/com/merge/api/crm/types/MultipartFormFieldRequest.java +++ b/src/main/java/com/merge/api/crm/types/MultipartFormFieldRequest.java @@ -25,7 +25,7 @@ public final class MultipartFormFieldRequest { private final String data; - private final Optional encoding; + private final Optional encoding; private final Optional fileName; @@ -36,7 +36,7 @@ public final class MultipartFormFieldRequest { private MultipartFormFieldRequest( String name, String data, - Optional encoding, + Optional encoding, Optional fileName, Optional contentType, Map additionalProperties) { @@ -73,7 +73,7 @@ public String getData() { * */ @JsonProperty("encoding") - public Optional getEncoding() { + public Optional getEncoding() { return encoding; } @@ -127,26 +127,46 @@ public static NameStage builder() { } public interface NameStage { + /** + * The name of the form field + */ DataStage name(@NotNull String name); Builder from(MultipartFormFieldRequest other); } public interface DataStage { + /** + * The data for the form field. + */ _FinalStage data(@NotNull String data); } public interface _FinalStage { MultipartFormFieldRequest build(); - _FinalStage encoding(Optional encoding); + /** + *

    The encoding of the value of data. Defaults to RAW if not defined.

    + *
      + *
    • RAW - RAW
    • + *
    • BASE64 - BASE64
    • + *
    • GZIP_BASE64 - GZIP_BASE64
    • + *
    + */ + _FinalStage encoding(Optional encoding); - _FinalStage encoding(EncodingEnum encoding); + _FinalStage encoding(MultipartFormFieldRequestEncoding encoding); + /** + *

    The file name of the form field, if the field is for a file.

    + */ _FinalStage fileName(Optional fileName); _FinalStage fileName(String fileName); + /** + *

    The MIME type of the file, if the field is for a file.

    + */ _FinalStage contentType(Optional contentType); _FinalStage contentType(String contentType); @@ -162,7 +182,7 @@ public static final class Builder implements NameStage, DataStage, _FinalStage { private Optional fileName = Optional.empty(); - private Optional encoding = Optional.empty(); + private Optional encoding = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -180,7 +200,7 @@ public Builder from(MultipartFormFieldRequest other) { } /** - *

    The name of the form field

    + * The name of the form field

    The name of the form field

    * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -191,7 +211,7 @@ public DataStage name(@NotNull String name) { } /** - *

    The data for the form field.

    + * The data for the form field.

    The data for the form field.

    * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -211,6 +231,9 @@ public _FinalStage contentType(String contentType) { return this; } + /** + *

    The MIME type of the file, if the field is for a file.

    + */ @java.lang.Override @JsonSetter(value = "content_type", nulls = Nulls.SKIP) public _FinalStage contentType(Optional contentType) { @@ -228,6 +251,9 @@ public _FinalStage fileName(String fileName) { return this; } + /** + *

    The file name of the form field, if the field is for a file.

    + */ @java.lang.Override @JsonSetter(value = "file_name", nulls = Nulls.SKIP) public _FinalStage fileName(Optional fileName) { @@ -245,14 +271,22 @@ public _FinalStage fileName(Optional fileName) { * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override - public _FinalStage encoding(EncodingEnum encoding) { + public _FinalStage encoding(MultipartFormFieldRequestEncoding encoding) { this.encoding = Optional.ofNullable(encoding); return this; } + /** + *

    The encoding of the value of data. Defaults to RAW if not defined.

    + *
      + *
    • RAW - RAW
    • + *
    • BASE64 - BASE64
    • + *
    • GZIP_BASE64 - GZIP_BASE64
    • + *
    + */ @java.lang.Override @JsonSetter(value = "encoding", nulls = Nulls.SKIP) - public _FinalStage encoding(Optional encoding) { + public _FinalStage encoding(Optional encoding) { this.encoding = encoding; return this; } diff --git a/src/main/java/com/merge/api/crm/types/MultipartFormFieldRequestEncoding.java b/src/main/java/com/merge/api/crm/types/MultipartFormFieldRequestEncoding.java new file mode 100644 index 000000000..7d799c535 --- /dev/null +++ b/src/main/java/com/merge/api/crm/types/MultipartFormFieldRequestEncoding.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.crm.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = MultipartFormFieldRequestEncoding.Deserializer.class) +public final class MultipartFormFieldRequestEncoding { + private final Object value; + + private final int type; + + private MultipartFormFieldRequestEncoding(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EncodingEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof MultipartFormFieldRequestEncoding && equalTo((MultipartFormFieldRequestEncoding) other); + } + + private boolean equalTo(MultipartFormFieldRequestEncoding other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static MultipartFormFieldRequestEncoding of(EncodingEnum value) { + return new MultipartFormFieldRequestEncoding(value, 0); + } + + public static MultipartFormFieldRequestEncoding of(String value) { + return new MultipartFormFieldRequestEncoding(value, 1); + } + + public interface Visitor { + T visit(EncodingEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(MultipartFormFieldRequestEncoding.class); + } + + @java.lang.Override + public MultipartFormFieldRequestEncoding deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, EncodingEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/crm/types/Note.java b/src/main/java/com/merge/api/crm/types/Note.java index a84e156e6..409c147a5 100644 --- a/src/main/java/com/merge/api/crm/types/Note.java +++ b/src/main/java/com/merge/api/crm/types/Note.java @@ -323,6 +323,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -334,6 +337,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -345,6 +351,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -356,6 +365,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The note's owner.

    + */ @JsonSetter(value = "owner", nulls = Nulls.SKIP) public Builder owner(Optional owner) { this.owner = owner; @@ -367,6 +379,9 @@ public Builder owner(NoteOwner owner) { return this; } + /** + *

    The note's content.

    + */ @JsonSetter(value = "content", nulls = Nulls.SKIP) public Builder content(Optional content) { this.content = content; @@ -378,6 +393,9 @@ public Builder content(String content) { return this; } + /** + *

    The note's contact.

    + */ @JsonSetter(value = "contact", nulls = Nulls.SKIP) public Builder contact(Optional contact) { this.contact = contact; @@ -389,6 +407,9 @@ public Builder contact(NoteContact contact) { return this; } + /** + *

    The note's account.

    + */ @JsonSetter(value = "account", nulls = Nulls.SKIP) public Builder account(Optional account) { this.account = account; @@ -400,6 +421,9 @@ public Builder account(NoteAccount account) { return this; } + /** + *

    The note's opportunity.

    + */ @JsonSetter(value = "opportunity", nulls = Nulls.SKIP) public Builder opportunity(Optional opportunity) { this.opportunity = opportunity; @@ -411,6 +435,9 @@ public Builder opportunity(NoteOpportunity opportunity) { return this; } + /** + *

    When the third party's lead was updated.

    + */ @JsonSetter(value = "remote_updated_at", nulls = Nulls.SKIP) public Builder remoteUpdatedAt(Optional remoteUpdatedAt) { this.remoteUpdatedAt = remoteUpdatedAt; @@ -422,6 +449,9 @@ public Builder remoteUpdatedAt(OffsetDateTime remoteUpdatedAt) { return this; } + /** + *

    When the third party's lead was created.

    + */ @JsonSetter(value = "remote_created_at", nulls = Nulls.SKIP) public Builder remoteCreatedAt(Optional remoteCreatedAt) { this.remoteCreatedAt = remoteCreatedAt; @@ -433,6 +463,9 @@ public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/crm/types/NoteEndpointRequest.java b/src/main/java/com/merge/api/crm/types/NoteEndpointRequest.java index 2213e2a47..52de9fc4a 100644 --- a/src/main/java/com/merge/api/crm/types/NoteEndpointRequest.java +++ b/src/main/java/com/merge/api/crm/types/NoteEndpointRequest.java @@ -99,10 +99,16 @@ public interface ModelStage { public interface _FinalStage { NoteEndpointRequest build(); + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ _FinalStage isDebugMode(Optional isDebugMode); _FinalStage isDebugMode(Boolean isDebugMode); + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ _FinalStage runAsync(Optional runAsync); _FinalStage runAsync(Boolean runAsync); @@ -146,6 +152,9 @@ public _FinalStage runAsync(Boolean runAsync) { return this; } + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ @java.lang.Override @JsonSetter(value = "run_async", nulls = Nulls.SKIP) public _FinalStage runAsync(Optional runAsync) { @@ -163,6 +172,9 @@ public _FinalStage isDebugMode(Boolean isDebugMode) { return this; } + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ @java.lang.Override @JsonSetter(value = "is_debug_mode", nulls = Nulls.SKIP) public _FinalStage isDebugMode(Optional isDebugMode) { diff --git a/src/main/java/com/merge/api/crm/types/NoteRequest.java b/src/main/java/com/merge/api/crm/types/NoteRequest.java index 532dffb49..9e76d513a 100644 --- a/src/main/java/com/merge/api/crm/types/NoteRequest.java +++ b/src/main/java/com/merge/api/crm/types/NoteRequest.java @@ -195,6 +195,9 @@ public Builder from(NoteRequest other) { return this; } + /** + *

    The note's owner.

    + */ @JsonSetter(value = "owner", nulls = Nulls.SKIP) public Builder owner(Optional owner) { this.owner = owner; @@ -206,6 +209,9 @@ public Builder owner(NoteRequestOwner owner) { return this; } + /** + *

    The note's content.

    + */ @JsonSetter(value = "content", nulls = Nulls.SKIP) public Builder content(Optional content) { this.content = content; @@ -217,6 +223,9 @@ public Builder content(String content) { return this; } + /** + *

    The note's contact.

    + */ @JsonSetter(value = "contact", nulls = Nulls.SKIP) public Builder contact(Optional contact) { this.contact = contact; @@ -228,6 +237,9 @@ public Builder contact(NoteRequestContact contact) { return this; } + /** + *

    The note's account.

    + */ @JsonSetter(value = "account", nulls = Nulls.SKIP) public Builder account(Optional account) { this.account = account; @@ -239,6 +251,9 @@ public Builder account(NoteRequestAccount account) { return this; } + /** + *

    The note's opportunity.

    + */ @JsonSetter(value = "opportunity", nulls = Nulls.SKIP) public Builder opportunity(Optional opportunity) { this.opportunity = opportunity; diff --git a/src/main/java/com/merge/api/crm/types/NotesListRequest.java b/src/main/java/com/merge/api/crm/types/NotesListRequest.java index 4c2a824c4..c6f477d2f 100644 --- a/src/main/java/com/merge/api/crm/types/NotesListRequest.java +++ b/src/main/java/com/merge/api/crm/types/NotesListRequest.java @@ -341,6 +341,9 @@ public Builder from(NotesListRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -357,6 +360,9 @@ public Builder expand(NotesListRequestExpandItem expand) { return this; } + /** + *

    If provided, will only return notes with this account.

    + */ @JsonSetter(value = "account_id", nulls = Nulls.SKIP) public Builder accountId(Optional accountId) { this.accountId = accountId; @@ -368,6 +374,9 @@ public Builder accountId(String accountId) { return this; } + /** + *

    If provided, will only return notes with this contact.

    + */ @JsonSetter(value = "contact_id", nulls = Nulls.SKIP) public Builder contactId(Optional contactId) { this.contactId = contactId; @@ -379,6 +388,9 @@ public Builder contactId(String contactId) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -390,6 +402,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -401,6 +416,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -412,6 +430,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -423,6 +444,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -434,6 +458,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

    + */ @JsonSetter(value = "include_remote_fields", nulls = Nulls.SKIP) public Builder includeRemoteFields(Optional includeRemoteFields) { this.includeRemoteFields = includeRemoteFields; @@ -445,6 +472,9 @@ public Builder includeRemoteFields(Boolean includeRemoteFields) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -456,6 +486,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -467,6 +500,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -478,6 +514,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    If provided, will only return notes with this opportunity.

    + */ @JsonSetter(value = "opportunity_id", nulls = Nulls.SKIP) public Builder opportunityId(Optional opportunityId) { this.opportunityId = opportunityId; @@ -489,6 +528,9 @@ public Builder opportunityId(String opportunityId) { return this; } + /** + *

    If provided, will only return notes with this owner.

    + */ @JsonSetter(value = "owner_id", nulls = Nulls.SKIP) public Builder ownerId(Optional ownerId) { this.ownerId = ownerId; @@ -500,6 +542,9 @@ public Builder ownerId(String ownerId) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -511,6 +556,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; diff --git a/src/main/java/com/merge/api/crm/types/NotesRemoteFieldClassesListRequest.java b/src/main/java/com/merge/api/crm/types/NotesRemoteFieldClassesListRequest.java index 99638e036..2177905ac 100644 --- a/src/main/java/com/merge/api/crm/types/NotesRemoteFieldClassesListRequest.java +++ b/src/main/java/com/merge/api/crm/types/NotesRemoteFieldClassesListRequest.java @@ -32,6 +32,8 @@ public final class NotesRemoteFieldClassesListRequest { private final Optional isCommonModelField; + private final Optional isCustom; + private final Optional pageSize; private final Map additionalProperties; @@ -43,6 +45,7 @@ private NotesRemoteFieldClassesListRequest( Optional includeRemoteFields, Optional includeShellData, Optional isCommonModelField, + Optional isCustom, Optional pageSize, Map additionalProperties) { this.cursor = cursor; @@ -51,6 +54,7 @@ private NotesRemoteFieldClassesListRequest( this.includeRemoteFields = includeRemoteFields; this.includeShellData = includeShellData; this.isCommonModelField = isCommonModelField; + this.isCustom = isCustom; this.pageSize = pageSize; this.additionalProperties = additionalProperties; } @@ -103,6 +107,14 @@ public Optional getIsCommonModelField() { return isCommonModelField; } + /** + * @return If provided, will only return remote fields classes with this is_custom value + */ + @JsonProperty("is_custom") + public Optional getIsCustom() { + return isCustom; + } + /** * @return Number of results to return per page. */ @@ -130,6 +142,7 @@ private boolean equalTo(NotesRemoteFieldClassesListRequest other) { && includeRemoteFields.equals(other.includeRemoteFields) && includeShellData.equals(other.includeShellData) && isCommonModelField.equals(other.isCommonModelField) + && isCustom.equals(other.isCustom) && pageSize.equals(other.pageSize); } @@ -142,6 +155,7 @@ public int hashCode() { this.includeRemoteFields, this.includeShellData, this.isCommonModelField, + this.isCustom, this.pageSize); } @@ -168,6 +182,8 @@ public static final class Builder { private Optional isCommonModelField = Optional.empty(); + private Optional isCustom = Optional.empty(); + private Optional pageSize = Optional.empty(); @JsonAnySetter @@ -182,10 +198,14 @@ public Builder from(NotesRemoteFieldClassesListRequest other) { includeRemoteFields(other.getIncludeRemoteFields()); includeShellData(other.getIncludeShellData()); isCommonModelField(other.getIsCommonModelField()); + isCustom(other.getIsCustom()); pageSize(other.getPageSize()); return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -197,6 +217,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -208,6 +231,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -219,6 +245,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

    + */ @JsonSetter(value = "include_remote_fields", nulls = Nulls.SKIP) public Builder includeRemoteFields(Optional includeRemoteFields) { this.includeRemoteFields = includeRemoteFields; @@ -230,6 +259,9 @@ public Builder includeRemoteFields(Boolean includeRemoteFields) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -241,6 +273,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, will only return remote field classes with this is_common_model_field value

    + */ @JsonSetter(value = "is_common_model_field", nulls = Nulls.SKIP) public Builder isCommonModelField(Optional isCommonModelField) { this.isCommonModelField = isCommonModelField; @@ -252,6 +287,23 @@ public Builder isCommonModelField(Boolean isCommonModelField) { return this; } + /** + *

    If provided, will only return remote fields classes with this is_custom value

    + */ + @JsonSetter(value = "is_custom", nulls = Nulls.SKIP) + public Builder isCustom(Optional isCustom) { + this.isCustom = isCustom; + return this; + } + + public Builder isCustom(Boolean isCustom) { + this.isCustom = Optional.ofNullable(isCustom); + return this; + } + + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -271,6 +323,7 @@ public NotesRemoteFieldClassesListRequest build() { includeRemoteFields, includeShellData, isCommonModelField, + isCustom, pageSize, additionalProperties); } diff --git a/src/main/java/com/merge/api/crm/types/NotesRetrieveRequest.java b/src/main/java/com/merge/api/crm/types/NotesRetrieveRequest.java index 66714647b..80dc21f09 100644 --- a/src/main/java/com/merge/api/crm/types/NotesRetrieveRequest.java +++ b/src/main/java/com/merge/api/crm/types/NotesRetrieveRequest.java @@ -132,6 +132,9 @@ public Builder from(NotesRetrieveRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -148,6 +151,9 @@ public Builder expand(NotesRetrieveRequestExpandItem expand) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -159,6 +165,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

    + */ @JsonSetter(value = "include_remote_fields", nulls = Nulls.SKIP) public Builder includeRemoteFields(Optional includeRemoteFields) { this.includeRemoteFields = includeRemoteFields; @@ -170,6 +179,9 @@ public Builder includeRemoteFields(Boolean includeRemoteFields) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/crm/types/OpportunitiesListRequest.java b/src/main/java/com/merge/api/crm/types/OpportunitiesListRequest.java index 1819c092c..39f33e95d 100644 --- a/src/main/java/com/merge/api/crm/types/OpportunitiesListRequest.java +++ b/src/main/java/com/merge/api/crm/types/OpportunitiesListRequest.java @@ -397,6 +397,9 @@ public Builder from(OpportunitiesListRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -413,6 +416,9 @@ public Builder expand(OpportunitiesListRequestExpandItem expand) { return this; } + /** + *

    If provided, will only return opportunities with this account.

    + */ @JsonSetter(value = "account_id", nulls = Nulls.SKIP) public Builder accountId(Optional accountId) { this.accountId = accountId; @@ -424,6 +430,9 @@ public Builder accountId(String accountId) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -435,6 +444,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -446,6 +458,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -457,6 +472,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -468,6 +486,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -479,6 +500,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

    + */ @JsonSetter(value = "include_remote_fields", nulls = Nulls.SKIP) public Builder includeRemoteFields(Optional includeRemoteFields) { this.includeRemoteFields = includeRemoteFields; @@ -490,6 +514,9 @@ public Builder includeRemoteFields(Boolean includeRemoteFields) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -501,6 +528,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -512,6 +542,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -523,6 +556,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    If provided, will only return opportunities with this owner.

    + */ @JsonSetter(value = "owner_id", nulls = Nulls.SKIP) public Builder ownerId(Optional ownerId) { this.ownerId = ownerId; @@ -534,6 +570,9 @@ public Builder ownerId(String ownerId) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -545,6 +584,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    If provided, will only return opportunities created in the third party platform after this datetime.

    + */ @JsonSetter(value = "remote_created_after", nulls = Nulls.SKIP) public Builder remoteCreatedAfter(Optional remoteCreatedAfter) { this.remoteCreatedAfter = remoteCreatedAfter; @@ -556,6 +598,9 @@ public Builder remoteCreatedAfter(OffsetDateTime remoteCreatedAfter) { return this; } + /** + *

    Deprecated. Use show_enum_origins.

    + */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -567,6 +612,9 @@ public Builder remoteFields(String remoteFields) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -578,6 +626,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    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

    + */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; @@ -589,6 +640,9 @@ public Builder showEnumOrigins(String showEnumOrigins) { return this; } + /** + *

    If provided, will only return opportunities with this stage.

    + */ @JsonSetter(value = "stage_id", nulls = Nulls.SKIP) public Builder stageId(Optional stageId) { this.stageId = stageId; @@ -600,6 +654,14 @@ public Builder stageId(String stageId) { return this; } + /** + *

    If provided, will only return opportunities with this status. Options: ('OPEN', 'WON', 'LOST')

    + *
      + *
    • OPEN - OPEN
    • + *
    • WON - WON
    • + *
    • LOST - LOST
    • + *
    + */ @JsonSetter(value = "status", nulls = Nulls.SKIP) public Builder status(Optional status) { this.status = status; diff --git a/src/main/java/com/merge/api/crm/types/OpportunitiesRemoteFieldClassesListRequest.java b/src/main/java/com/merge/api/crm/types/OpportunitiesRemoteFieldClassesListRequest.java index f556a92b7..060592459 100644 --- a/src/main/java/com/merge/api/crm/types/OpportunitiesRemoteFieldClassesListRequest.java +++ b/src/main/java/com/merge/api/crm/types/OpportunitiesRemoteFieldClassesListRequest.java @@ -32,6 +32,8 @@ public final class OpportunitiesRemoteFieldClassesListRequest { private final Optional isCommonModelField; + private final Optional isCustom; + private final Optional pageSize; private final Map additionalProperties; @@ -43,6 +45,7 @@ private OpportunitiesRemoteFieldClassesListRequest( Optional includeRemoteFields, Optional includeShellData, Optional isCommonModelField, + Optional isCustom, Optional pageSize, Map additionalProperties) { this.cursor = cursor; @@ -51,6 +54,7 @@ private OpportunitiesRemoteFieldClassesListRequest( this.includeRemoteFields = includeRemoteFields; this.includeShellData = includeShellData; this.isCommonModelField = isCommonModelField; + this.isCustom = isCustom; this.pageSize = pageSize; this.additionalProperties = additionalProperties; } @@ -103,6 +107,14 @@ public Optional getIsCommonModelField() { return isCommonModelField; } + /** + * @return If provided, will only return remote fields classes with this is_custom value + */ + @JsonProperty("is_custom") + public Optional getIsCustom() { + return isCustom; + } + /** * @return Number of results to return per page. */ @@ -130,6 +142,7 @@ private boolean equalTo(OpportunitiesRemoteFieldClassesListRequest other) { && includeRemoteFields.equals(other.includeRemoteFields) && includeShellData.equals(other.includeShellData) && isCommonModelField.equals(other.isCommonModelField) + && isCustom.equals(other.isCustom) && pageSize.equals(other.pageSize); } @@ -142,6 +155,7 @@ public int hashCode() { this.includeRemoteFields, this.includeShellData, this.isCommonModelField, + this.isCustom, this.pageSize); } @@ -168,6 +182,8 @@ public static final class Builder { private Optional isCommonModelField = Optional.empty(); + private Optional isCustom = Optional.empty(); + private Optional pageSize = Optional.empty(); @JsonAnySetter @@ -182,10 +198,14 @@ public Builder from(OpportunitiesRemoteFieldClassesListRequest other) { includeRemoteFields(other.getIncludeRemoteFields()); includeShellData(other.getIncludeShellData()); isCommonModelField(other.getIsCommonModelField()); + isCustom(other.getIsCustom()); pageSize(other.getPageSize()); return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -197,6 +217,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -208,6 +231,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -219,6 +245,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

    + */ @JsonSetter(value = "include_remote_fields", nulls = Nulls.SKIP) public Builder includeRemoteFields(Optional includeRemoteFields) { this.includeRemoteFields = includeRemoteFields; @@ -230,6 +259,9 @@ public Builder includeRemoteFields(Boolean includeRemoteFields) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -241,6 +273,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, will only return remote field classes with this is_common_model_field value

    + */ @JsonSetter(value = "is_common_model_field", nulls = Nulls.SKIP) public Builder isCommonModelField(Optional isCommonModelField) { this.isCommonModelField = isCommonModelField; @@ -252,6 +287,23 @@ public Builder isCommonModelField(Boolean isCommonModelField) { return this; } + /** + *

    If provided, will only return remote fields classes with this is_custom value

    + */ + @JsonSetter(value = "is_custom", nulls = Nulls.SKIP) + public Builder isCustom(Optional isCustom) { + this.isCustom = isCustom; + return this; + } + + public Builder isCustom(Boolean isCustom) { + this.isCustom = Optional.ofNullable(isCustom); + return this; + } + + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -271,6 +323,7 @@ public OpportunitiesRemoteFieldClassesListRequest build() { includeRemoteFields, includeShellData, isCommonModelField, + isCustom, pageSize, additionalProperties); } diff --git a/src/main/java/com/merge/api/crm/types/OpportunitiesRetrieveRequest.java b/src/main/java/com/merge/api/crm/types/OpportunitiesRetrieveRequest.java index b38695884..1f2e48c82 100644 --- a/src/main/java/com/merge/api/crm/types/OpportunitiesRetrieveRequest.java +++ b/src/main/java/com/merge/api/crm/types/OpportunitiesRetrieveRequest.java @@ -170,6 +170,9 @@ public Builder from(OpportunitiesRetrieveRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -186,6 +189,9 @@ public Builder expand(OpportunitiesRetrieveRequestExpandItem expand) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -197,6 +203,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

    + */ @JsonSetter(value = "include_remote_fields", nulls = Nulls.SKIP) public Builder includeRemoteFields(Optional includeRemoteFields) { this.includeRemoteFields = includeRemoteFields; @@ -208,6 +217,9 @@ public Builder includeRemoteFields(Boolean includeRemoteFields) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -219,6 +231,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    Deprecated. Use show_enum_origins.

    + */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -230,6 +245,9 @@ public Builder remoteFields(String remoteFields) { return this; } + /** + *

    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

    + */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; diff --git a/src/main/java/com/merge/api/crm/types/Opportunity.java b/src/main/java/com/merge/api/crm/types/Opportunity.java index c57f483d1..f8bd54fb5 100644 --- a/src/main/java/com/merge/api/crm/types/Opportunity.java +++ b/src/main/java/com/merge/api/crm/types/Opportunity.java @@ -43,7 +43,7 @@ public final class Opportunity { private final Optional stage; - private final Optional status; + private final Optional status; private final Optional lastActivityAt; @@ -72,7 +72,7 @@ private Opportunity( Optional owner, Optional account, Optional stage, - Optional status, + Optional status, Optional lastActivityAt, Optional closeDate, Optional remoteCreatedAt, @@ -188,7 +188,7 @@ public Optional getStage() { * */ @JsonProperty("status") - public Optional getStatus() { + public Optional getStatus() { return status; } @@ -325,7 +325,7 @@ public static final class Builder { private Optional stage = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Optional lastActivityAt = Optional.empty(); @@ -379,6 +379,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -390,6 +393,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -401,6 +407,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -412,6 +421,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The opportunity's name.

    + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -423,6 +435,9 @@ public Builder name(String name) { return this; } + /** + *

    The opportunity's description.

    + */ @JsonSetter(value = "description", nulls = Nulls.SKIP) public Builder description(Optional description) { this.description = description; @@ -434,6 +449,9 @@ public Builder description(String description) { return this; } + /** + *

    The opportunity's amount.

    + */ @JsonSetter(value = "amount", nulls = Nulls.SKIP) public Builder amount(Optional amount) { this.amount = amount; @@ -445,6 +463,9 @@ public Builder amount(Integer amount) { return this; } + /** + *

    The opportunity's owner.

    + */ @JsonSetter(value = "owner", nulls = Nulls.SKIP) public Builder owner(Optional owner) { this.owner = owner; @@ -456,6 +477,9 @@ public Builder owner(OpportunityOwner owner) { return this; } + /** + *

    The account of the opportunity.

    + */ @JsonSetter(value = "account", nulls = Nulls.SKIP) public Builder account(Optional account) { this.account = account; @@ -467,6 +491,9 @@ public Builder account(OpportunityAccount account) { return this; } + /** + *

    The stage of the opportunity.

    + */ @JsonSetter(value = "stage", nulls = Nulls.SKIP) public Builder stage(Optional stage) { this.stage = stage; @@ -478,17 +505,28 @@ public Builder stage(OpportunityStage stage) { return this; } + /** + *

    The opportunity's status.

    + *
      + *
    • OPEN - OPEN
    • + *
    • WON - WON
    • + *
    • LOST - LOST
    • + *
    + */ @JsonSetter(value = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { + public Builder status(Optional status) { this.status = status; return this; } - public Builder status(OpportunityStatusEnum status) { + public Builder status(OpportunityStatus status) { this.status = Optional.ofNullable(status); return this; } + /** + *

    When the opportunity's last activity occurred.

    + */ @JsonSetter(value = "last_activity_at", nulls = Nulls.SKIP) public Builder lastActivityAt(Optional lastActivityAt) { this.lastActivityAt = lastActivityAt; @@ -500,6 +538,9 @@ public Builder lastActivityAt(OffsetDateTime lastActivityAt) { return this; } + /** + *

    When the opportunity was closed.

    + */ @JsonSetter(value = "close_date", nulls = Nulls.SKIP) public Builder closeDate(Optional closeDate) { this.closeDate = closeDate; @@ -511,6 +552,9 @@ public Builder closeDate(OffsetDateTime closeDate) { return this; } + /** + *

    When the third party's opportunity was created.

    + */ @JsonSetter(value = "remote_created_at", nulls = Nulls.SKIP) public Builder remoteCreatedAt(Optional remoteCreatedAt) { this.remoteCreatedAt = remoteCreatedAt; @@ -522,6 +566,9 @@ public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/crm/types/OpportunityEndpointRequest.java b/src/main/java/com/merge/api/crm/types/OpportunityEndpointRequest.java index fa0283d81..711de98da 100644 --- a/src/main/java/com/merge/api/crm/types/OpportunityEndpointRequest.java +++ b/src/main/java/com/merge/api/crm/types/OpportunityEndpointRequest.java @@ -99,10 +99,16 @@ public interface ModelStage { public interface _FinalStage { OpportunityEndpointRequest build(); + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ _FinalStage isDebugMode(Optional isDebugMode); _FinalStage isDebugMode(Boolean isDebugMode); + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ _FinalStage runAsync(Optional runAsync); _FinalStage runAsync(Boolean runAsync); @@ -146,6 +152,9 @@ public _FinalStage runAsync(Boolean runAsync) { return this; } + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ @java.lang.Override @JsonSetter(value = "run_async", nulls = Nulls.SKIP) public _FinalStage runAsync(Optional runAsync) { @@ -163,6 +172,9 @@ public _FinalStage isDebugMode(Boolean isDebugMode) { return this; } + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ @java.lang.Override @JsonSetter(value = "is_debug_mode", nulls = Nulls.SKIP) public _FinalStage isDebugMode(Optional isDebugMode) { diff --git a/src/main/java/com/merge/api/crm/types/OpportunityRequest.java b/src/main/java/com/merge/api/crm/types/OpportunityRequest.java index ff76a7e8b..f3389eb64 100644 --- a/src/main/java/com/merge/api/crm/types/OpportunityRequest.java +++ b/src/main/java/com/merge/api/crm/types/OpportunityRequest.java @@ -35,7 +35,7 @@ public final class OpportunityRequest { private final Optional stage; - private final Optional status; + private final Optional status; private final Optional lastActivityAt; @@ -56,7 +56,7 @@ private OpportunityRequest( Optional owner, Optional account, Optional stage, - Optional status, + Optional status, Optional lastActivityAt, Optional closeDate, Optional> integrationParams, @@ -135,7 +135,7 @@ public Optional getStage() { * */ @JsonProperty("status") - public Optional getStatus() { + public Optional getStatus() { return status; } @@ -236,7 +236,7 @@ public static final class Builder { private Optional stage = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Optional lastActivityAt = Optional.empty(); @@ -269,6 +269,9 @@ public Builder from(OpportunityRequest other) { return this; } + /** + *

    The opportunity's name.

    + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -280,6 +283,9 @@ public Builder name(String name) { return this; } + /** + *

    The opportunity's description.

    + */ @JsonSetter(value = "description", nulls = Nulls.SKIP) public Builder description(Optional description) { this.description = description; @@ -291,6 +297,9 @@ public Builder description(String description) { return this; } + /** + *

    The opportunity's amount.

    + */ @JsonSetter(value = "amount", nulls = Nulls.SKIP) public Builder amount(Optional amount) { this.amount = amount; @@ -302,6 +311,9 @@ public Builder amount(Integer amount) { return this; } + /** + *

    The opportunity's owner.

    + */ @JsonSetter(value = "owner", nulls = Nulls.SKIP) public Builder owner(Optional owner) { this.owner = owner; @@ -313,6 +325,9 @@ public Builder owner(OpportunityRequestOwner owner) { return this; } + /** + *

    The account of the opportunity.

    + */ @JsonSetter(value = "account", nulls = Nulls.SKIP) public Builder account(Optional account) { this.account = account; @@ -324,6 +339,9 @@ public Builder account(OpportunityRequestAccount account) { return this; } + /** + *

    The stage of the opportunity.

    + */ @JsonSetter(value = "stage", nulls = Nulls.SKIP) public Builder stage(Optional stage) { this.stage = stage; @@ -335,17 +353,28 @@ public Builder stage(OpportunityRequestStage stage) { return this; } + /** + *

    The opportunity's status.

    + *
      + *
    • OPEN - OPEN
    • + *
    • WON - WON
    • + *
    • LOST - LOST
    • + *
    + */ @JsonSetter(value = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { + public Builder status(Optional status) { this.status = status; return this; } - public Builder status(OpportunityStatusEnum status) { + public Builder status(OpportunityRequestStatus status) { this.status = Optional.ofNullable(status); return this; } + /** + *

    When the opportunity's last activity occurred.

    + */ @JsonSetter(value = "last_activity_at", nulls = Nulls.SKIP) public Builder lastActivityAt(Optional lastActivityAt) { this.lastActivityAt = lastActivityAt; @@ -357,6 +386,9 @@ public Builder lastActivityAt(OffsetDateTime lastActivityAt) { return this; } + /** + *

    When the opportunity was closed.

    + */ @JsonSetter(value = "close_date", nulls = Nulls.SKIP) public Builder closeDate(Optional closeDate) { this.closeDate = closeDate; diff --git a/src/main/java/com/merge/api/crm/types/OpportunityRequestStatus.java b/src/main/java/com/merge/api/crm/types/OpportunityRequestStatus.java new file mode 100644 index 000000000..a161fd1f0 --- /dev/null +++ b/src/main/java/com/merge/api/crm/types/OpportunityRequestStatus.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.crm.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = OpportunityRequestStatus.Deserializer.class) +public final class OpportunityRequestStatus { + private final Object value; + + private final int type; + + private OpportunityRequestStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((OpportunityStatusEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof OpportunityRequestStatus && equalTo((OpportunityRequestStatus) other); + } + + private boolean equalTo(OpportunityRequestStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static OpportunityRequestStatus of(OpportunityStatusEnum value) { + return new OpportunityRequestStatus(value, 0); + } + + public static OpportunityRequestStatus of(String value) { + return new OpportunityRequestStatus(value, 1); + } + + public interface Visitor { + T visit(OpportunityStatusEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(OpportunityRequestStatus.class); + } + + @java.lang.Override + public OpportunityRequestStatus deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, OpportunityStatusEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/crm/types/OpportunityStatus.java b/src/main/java/com/merge/api/crm/types/OpportunityStatus.java new file mode 100644 index 000000000..a1ad3fb12 --- /dev/null +++ b/src/main/java/com/merge/api/crm/types/OpportunityStatus.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.crm.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = OpportunityStatus.Deserializer.class) +public final class OpportunityStatus { + private final Object value; + + private final int type; + + private OpportunityStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((OpportunityStatusEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof OpportunityStatus && equalTo((OpportunityStatus) other); + } + + private boolean equalTo(OpportunityStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static OpportunityStatus of(OpportunityStatusEnum value) { + return new OpportunityStatus(value, 0); + } + + public static OpportunityStatus of(String value) { + return new OpportunityStatus(value, 1); + } + + public interface Visitor { + T visit(OpportunityStatusEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(OpportunityStatus.class); + } + + @java.lang.Override + public OpportunityStatus deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, OpportunityStatusEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/crm/types/PatchedAccountRequest.java b/src/main/java/com/merge/api/crm/types/PatchedAccountRequest.java index 84d479257..fb3bdbbe7 100644 --- a/src/main/java/com/merge/api/crm/types/PatchedAccountRequest.java +++ b/src/main/java/com/merge/api/crm/types/PatchedAccountRequest.java @@ -244,6 +244,9 @@ public Builder from(PatchedAccountRequest other) { return this; } + /** + *

    The account's owner.

    + */ @JsonSetter(value = "owner", nulls = Nulls.SKIP) public Builder owner(Optional owner) { this.owner = owner; @@ -255,6 +258,9 @@ public Builder owner(String owner) { return this; } + /** + *

    The account's name.

    + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -266,6 +272,9 @@ public Builder name(String name) { return this; } + /** + *

    The account's description.

    + */ @JsonSetter(value = "description", nulls = Nulls.SKIP) public Builder description(Optional description) { this.description = description; @@ -277,6 +286,9 @@ public Builder description(String description) { return this; } + /** + *

    The account's industry.

    + */ @JsonSetter(value = "industry", nulls = Nulls.SKIP) public Builder industry(Optional industry) { this.industry = industry; @@ -288,6 +300,9 @@ public Builder industry(String industry) { return this; } + /** + *

    The account's website.

    + */ @JsonSetter(value = "website", nulls = Nulls.SKIP) public Builder website(Optional website) { this.website = website; @@ -299,6 +314,9 @@ public Builder website(String website) { return this; } + /** + *

    The account's number of employees.

    + */ @JsonSetter(value = "number_of_employees", nulls = Nulls.SKIP) public Builder numberOfEmployees(Optional numberOfEmployees) { this.numberOfEmployees = numberOfEmployees; @@ -321,6 +339,9 @@ public Builder addresses(List addresses) { return this; } + /** + *

    The last date (either most recent or furthest in the future) of when an activity occurs in an account.

    + */ @JsonSetter(value = "last_activity_at", nulls = Nulls.SKIP) public Builder lastActivityAt(Optional lastActivityAt) { this.lastActivityAt = lastActivityAt; diff --git a/src/main/java/com/merge/api/crm/types/PatchedContactRequest.java b/src/main/java/com/merge/api/crm/types/PatchedContactRequest.java index af913c0d7..c2022412d 100644 --- a/src/main/java/com/merge/api/crm/types/PatchedContactRequest.java +++ b/src/main/java/com/merge/api/crm/types/PatchedContactRequest.java @@ -238,6 +238,9 @@ public Builder from(PatchedContactRequest other) { return this; } + /** + *

    The contact's first name.

    + */ @JsonSetter(value = "first_name", nulls = Nulls.SKIP) public Builder firstName(Optional firstName) { this.firstName = firstName; @@ -249,6 +252,9 @@ public Builder firstName(String firstName) { return this; } + /** + *

    The contact's last name.

    + */ @JsonSetter(value = "last_name", nulls = Nulls.SKIP) public Builder lastName(Optional lastName) { this.lastName = lastName; @@ -260,6 +266,9 @@ public Builder lastName(String lastName) { return this; } + /** + *

    The contact's account.

    + */ @JsonSetter(value = "account", nulls = Nulls.SKIP) public Builder account(Optional account) { this.account = account; @@ -271,6 +280,9 @@ public Builder account(String account) { return this; } + /** + *

    The contact's owner.

    + */ @JsonSetter(value = "owner", nulls = Nulls.SKIP) public Builder owner(Optional owner) { this.owner = owner; @@ -315,6 +327,9 @@ public Builder phoneNumbers(List phoneNumbers) { return this; } + /** + *

    When the contact's last activity occurred.

    + */ @JsonSetter(value = "last_activity_at", nulls = Nulls.SKIP) public Builder lastActivityAt(Optional lastActivityAt) { this.lastActivityAt = lastActivityAt; diff --git a/src/main/java/com/merge/api/crm/types/PatchedCrmAccountEndpointRequest.java b/src/main/java/com/merge/api/crm/types/PatchedCrmAccountEndpointRequest.java index 8b2d65a61..d02ea6e48 100644 --- a/src/main/java/com/merge/api/crm/types/PatchedCrmAccountEndpointRequest.java +++ b/src/main/java/com/merge/api/crm/types/PatchedCrmAccountEndpointRequest.java @@ -99,10 +99,16 @@ public interface ModelStage { public interface _FinalStage { PatchedCrmAccountEndpointRequest build(); + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ _FinalStage isDebugMode(Optional isDebugMode); _FinalStage isDebugMode(Boolean isDebugMode); + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ _FinalStage runAsync(Optional runAsync); _FinalStage runAsync(Boolean runAsync); @@ -146,6 +152,9 @@ public _FinalStage runAsync(Boolean runAsync) { return this; } + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ @java.lang.Override @JsonSetter(value = "run_async", nulls = Nulls.SKIP) public _FinalStage runAsync(Optional runAsync) { @@ -163,6 +172,9 @@ public _FinalStage isDebugMode(Boolean isDebugMode) { return this; } + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ @java.lang.Override @JsonSetter(value = "is_debug_mode", nulls = Nulls.SKIP) public _FinalStage isDebugMode(Optional isDebugMode) { diff --git a/src/main/java/com/merge/api/crm/types/PatchedCrmContactEndpointRequest.java b/src/main/java/com/merge/api/crm/types/PatchedCrmContactEndpointRequest.java index fb78e6480..dce0865a6 100644 --- a/src/main/java/com/merge/api/crm/types/PatchedCrmContactEndpointRequest.java +++ b/src/main/java/com/merge/api/crm/types/PatchedCrmContactEndpointRequest.java @@ -99,10 +99,16 @@ public interface ModelStage { public interface _FinalStage { PatchedCrmContactEndpointRequest build(); + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ _FinalStage isDebugMode(Optional isDebugMode); _FinalStage isDebugMode(Boolean isDebugMode); + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ _FinalStage runAsync(Optional runAsync); _FinalStage runAsync(Boolean runAsync); @@ -146,6 +152,9 @@ public _FinalStage runAsync(Boolean runAsync) { return this; } + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ @java.lang.Override @JsonSetter(value = "run_async", nulls = Nulls.SKIP) public _FinalStage runAsync(Optional runAsync) { @@ -163,6 +172,9 @@ public _FinalStage isDebugMode(Boolean isDebugMode) { return this; } + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ @java.lang.Override @JsonSetter(value = "is_debug_mode", nulls = Nulls.SKIP) public _FinalStage isDebugMode(Optional isDebugMode) { diff --git a/src/main/java/com/merge/api/crm/types/PatchedEditFieldMappingRequest.java b/src/main/java/com/merge/api/crm/types/PatchedEditFieldMappingRequest.java index 2aa5f7988..03d84b1d8 100644 --- a/src/main/java/com/merge/api/crm/types/PatchedEditFieldMappingRequest.java +++ b/src/main/java/com/merge/api/crm/types/PatchedEditFieldMappingRequest.java @@ -116,6 +116,9 @@ public Builder from(PatchedEditFieldMappingRequest other) { return this; } + /** + *

    The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.

    + */ @JsonSetter(value = "remote_field_traversal_path", nulls = Nulls.SKIP) public Builder remoteFieldTraversalPath(Optional> remoteFieldTraversalPath) { this.remoteFieldTraversalPath = remoteFieldTraversalPath; @@ -127,6 +130,9 @@ public Builder remoteFieldTraversalPath(List remoteFieldTraversalPath) return this; } + /** + *

    The method of the remote endpoint where the remote field is coming from.

    + */ @JsonSetter(value = "remote_method", nulls = Nulls.SKIP) public Builder remoteMethod(Optional remoteMethod) { this.remoteMethod = remoteMethod; @@ -138,6 +144,9 @@ public Builder remoteMethod(String remoteMethod) { return this; } + /** + *

    The path of the remote endpoint where the remote field is coming from.

    + */ @JsonSetter(value = "remote_url_path", nulls = Nulls.SKIP) public Builder remoteUrlPath(Optional remoteUrlPath) { this.remoteUrlPath = remoteUrlPath; diff --git a/src/main/java/com/merge/api/crm/types/PatchedEngagementEndpointRequest.java b/src/main/java/com/merge/api/crm/types/PatchedEngagementEndpointRequest.java index fac59973c..a073e6dc4 100644 --- a/src/main/java/com/merge/api/crm/types/PatchedEngagementEndpointRequest.java +++ b/src/main/java/com/merge/api/crm/types/PatchedEngagementEndpointRequest.java @@ -99,10 +99,16 @@ public interface ModelStage { public interface _FinalStage { PatchedEngagementEndpointRequest build(); + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ _FinalStage isDebugMode(Optional isDebugMode); _FinalStage isDebugMode(Boolean isDebugMode); + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ _FinalStage runAsync(Optional runAsync); _FinalStage runAsync(Boolean runAsync); @@ -146,6 +152,9 @@ public _FinalStage runAsync(Boolean runAsync) { return this; } + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ @java.lang.Override @JsonSetter(value = "run_async", nulls = Nulls.SKIP) public _FinalStage runAsync(Optional runAsync) { @@ -163,6 +172,9 @@ public _FinalStage isDebugMode(Boolean isDebugMode) { return this; } + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ @java.lang.Override @JsonSetter(value = "is_debug_mode", nulls = Nulls.SKIP) public _FinalStage isDebugMode(Optional isDebugMode) { diff --git a/src/main/java/com/merge/api/crm/types/PatchedEngagementRequest.java b/src/main/java/com/merge/api/crm/types/PatchedEngagementRequest.java index a247451fb..880bb6a22 100644 --- a/src/main/java/com/merge/api/crm/types/PatchedEngagementRequest.java +++ b/src/main/java/com/merge/api/crm/types/PatchedEngagementRequest.java @@ -29,7 +29,7 @@ public final class PatchedEngagementRequest { private final Optional subject; - private final Optional direction; + private final Optional direction; private final Optional engagementType; @@ -53,7 +53,7 @@ private PatchedEngagementRequest( Optional owner, Optional content, Optional subject, - Optional direction, + Optional direction, Optional engagementType, Optional startTime, Optional endTime, @@ -110,7 +110,7 @@ public Optional getSubject() { * */ @JsonProperty("direction") - public Optional getDirection() { + public Optional getDirection() { return direction; } @@ -226,7 +226,7 @@ public static final class Builder { private Optional subject = Optional.empty(); - private Optional direction = Optional.empty(); + private Optional direction = Optional.empty(); private Optional engagementType = Optional.empty(); @@ -265,6 +265,9 @@ public Builder from(PatchedEngagementRequest other) { return this; } + /** + *

    The engagement's owner.

    + */ @JsonSetter(value = "owner", nulls = Nulls.SKIP) public Builder owner(Optional owner) { this.owner = owner; @@ -276,6 +279,9 @@ public Builder owner(String owner) { return this; } + /** + *

    The engagement's content.

    + */ @JsonSetter(value = "content", nulls = Nulls.SKIP) public Builder content(Optional content) { this.content = content; @@ -287,6 +293,9 @@ public Builder content(String content) { return this; } + /** + *

    The engagement's subject.

    + */ @JsonSetter(value = "subject", nulls = Nulls.SKIP) public Builder subject(Optional subject) { this.subject = subject; @@ -298,17 +307,27 @@ public Builder subject(String subject) { return this; } + /** + *

    The engagement's direction.

    + *
      + *
    • INBOUND - INBOUND
    • + *
    • OUTBOUND - OUTBOUND
    • + *
    + */ @JsonSetter(value = "direction", nulls = Nulls.SKIP) - public Builder direction(Optional direction) { + public Builder direction(Optional direction) { this.direction = direction; return this; } - public Builder direction(DirectionEnum direction) { + public Builder direction(PatchedEngagementRequestDirection direction) { this.direction = Optional.ofNullable(direction); return this; } + /** + *

    The engagement type of the engagement.

    + */ @JsonSetter(value = "engagement_type", nulls = Nulls.SKIP) public Builder engagementType(Optional engagementType) { this.engagementType = engagementType; @@ -320,6 +339,9 @@ public Builder engagementType(String engagementType) { return this; } + /** + *

    The time at which the engagement started.

    + */ @JsonSetter(value = "start_time", nulls = Nulls.SKIP) public Builder startTime(Optional startTime) { this.startTime = startTime; @@ -331,6 +353,9 @@ public Builder startTime(OffsetDateTime startTime) { return this; } + /** + *

    The time at which the engagement ended.

    + */ @JsonSetter(value = "end_time", nulls = Nulls.SKIP) public Builder endTime(Optional endTime) { this.endTime = endTime; @@ -342,6 +367,9 @@ public Builder endTime(OffsetDateTime endTime) { return this; } + /** + *

    The account of the engagement.

    + */ @JsonSetter(value = "account", nulls = Nulls.SKIP) public Builder account(Optional account) { this.account = account; diff --git a/src/main/java/com/merge/api/crm/types/PatchedEngagementRequestDirection.java b/src/main/java/com/merge/api/crm/types/PatchedEngagementRequestDirection.java new file mode 100644 index 000000000..bd7232c0c --- /dev/null +++ b/src/main/java/com/merge/api/crm/types/PatchedEngagementRequestDirection.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.crm.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = PatchedEngagementRequestDirection.Deserializer.class) +public final class PatchedEngagementRequestDirection { + private final Object value; + + private final int type; + + private PatchedEngagementRequestDirection(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((DirectionEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PatchedEngagementRequestDirection && equalTo((PatchedEngagementRequestDirection) other); + } + + private boolean equalTo(PatchedEngagementRequestDirection other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static PatchedEngagementRequestDirection of(DirectionEnum value) { + return new PatchedEngagementRequestDirection(value, 0); + } + + public static PatchedEngagementRequestDirection of(String value) { + return new PatchedEngagementRequestDirection(value, 1); + } + + public interface Visitor { + T visit(DirectionEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(PatchedEngagementRequestDirection.class); + } + + @java.lang.Override + public PatchedEngagementRequestDirection deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, DirectionEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/crm/types/PatchedOpportunityEndpointRequest.java b/src/main/java/com/merge/api/crm/types/PatchedOpportunityEndpointRequest.java index 841654c1e..90b5561eb 100644 --- a/src/main/java/com/merge/api/crm/types/PatchedOpportunityEndpointRequest.java +++ b/src/main/java/com/merge/api/crm/types/PatchedOpportunityEndpointRequest.java @@ -99,10 +99,16 @@ public interface ModelStage { public interface _FinalStage { PatchedOpportunityEndpointRequest build(); + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ _FinalStage isDebugMode(Optional isDebugMode); _FinalStage isDebugMode(Boolean isDebugMode); + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ _FinalStage runAsync(Optional runAsync); _FinalStage runAsync(Boolean runAsync); @@ -146,6 +152,9 @@ public _FinalStage runAsync(Boolean runAsync) { return this; } + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ @java.lang.Override @JsonSetter(value = "run_async", nulls = Nulls.SKIP) public _FinalStage runAsync(Optional runAsync) { @@ -163,6 +172,9 @@ public _FinalStage isDebugMode(Boolean isDebugMode) { return this; } + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ @java.lang.Override @JsonSetter(value = "is_debug_mode", nulls = Nulls.SKIP) public _FinalStage isDebugMode(Optional isDebugMode) { diff --git a/src/main/java/com/merge/api/crm/types/PatchedOpportunityRequest.java b/src/main/java/com/merge/api/crm/types/PatchedOpportunityRequest.java index 8028fbbd2..58a9c890b 100644 --- a/src/main/java/com/merge/api/crm/types/PatchedOpportunityRequest.java +++ b/src/main/java/com/merge/api/crm/types/PatchedOpportunityRequest.java @@ -35,7 +35,7 @@ public final class PatchedOpportunityRequest { private final Optional stage; - private final Optional status; + private final Optional status; private final Optional lastActivityAt; @@ -56,7 +56,7 @@ private PatchedOpportunityRequest( Optional owner, Optional account, Optional stage, - Optional status, + Optional status, Optional lastActivityAt, Optional closeDate, Optional> integrationParams, @@ -135,7 +135,7 @@ public Optional getStage() { * */ @JsonProperty("status") - public Optional getStatus() { + public Optional getStatus() { return status; } @@ -236,7 +236,7 @@ public static final class Builder { private Optional stage = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Optional lastActivityAt = Optional.empty(); @@ -269,6 +269,9 @@ public Builder from(PatchedOpportunityRequest other) { return this; } + /** + *

    The opportunity's name.

    + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -280,6 +283,9 @@ public Builder name(String name) { return this; } + /** + *

    The opportunity's description.

    + */ @JsonSetter(value = "description", nulls = Nulls.SKIP) public Builder description(Optional description) { this.description = description; @@ -291,6 +297,9 @@ public Builder description(String description) { return this; } + /** + *

    The opportunity's amount.

    + */ @JsonSetter(value = "amount", nulls = Nulls.SKIP) public Builder amount(Optional amount) { this.amount = amount; @@ -302,6 +311,9 @@ public Builder amount(Integer amount) { return this; } + /** + *

    The opportunity's owner.

    + */ @JsonSetter(value = "owner", nulls = Nulls.SKIP) public Builder owner(Optional owner) { this.owner = owner; @@ -313,6 +325,9 @@ public Builder owner(String owner) { return this; } + /** + *

    The account of the opportunity.

    + */ @JsonSetter(value = "account", nulls = Nulls.SKIP) public Builder account(Optional account) { this.account = account; @@ -324,6 +339,9 @@ public Builder account(String account) { return this; } + /** + *

    The stage of the opportunity.

    + */ @JsonSetter(value = "stage", nulls = Nulls.SKIP) public Builder stage(Optional stage) { this.stage = stage; @@ -335,17 +353,28 @@ public Builder stage(String stage) { return this; } + /** + *

    The opportunity's status.

    + *
      + *
    • OPEN - OPEN
    • + *
    • WON - WON
    • + *
    • LOST - LOST
    • + *
    + */ @JsonSetter(value = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { + public Builder status(Optional status) { this.status = status; return this; } - public Builder status(OpportunityStatusEnum status) { + public Builder status(PatchedOpportunityRequestStatus status) { this.status = Optional.ofNullable(status); return this; } + /** + *

    When the opportunity's last activity occurred.

    + */ @JsonSetter(value = "last_activity_at", nulls = Nulls.SKIP) public Builder lastActivityAt(Optional lastActivityAt) { this.lastActivityAt = lastActivityAt; @@ -357,6 +386,9 @@ public Builder lastActivityAt(OffsetDateTime lastActivityAt) { return this; } + /** + *

    When the opportunity was closed.

    + */ @JsonSetter(value = "close_date", nulls = Nulls.SKIP) public Builder closeDate(Optional closeDate) { this.closeDate = closeDate; diff --git a/src/main/java/com/merge/api/crm/types/PatchedOpportunityRequestStatus.java b/src/main/java/com/merge/api/crm/types/PatchedOpportunityRequestStatus.java new file mode 100644 index 000000000..b308df5bb --- /dev/null +++ b/src/main/java/com/merge/api/crm/types/PatchedOpportunityRequestStatus.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.crm.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = PatchedOpportunityRequestStatus.Deserializer.class) +public final class PatchedOpportunityRequestStatus { + private final Object value; + + private final int type; + + private PatchedOpportunityRequestStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((OpportunityStatusEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PatchedOpportunityRequestStatus && equalTo((PatchedOpportunityRequestStatus) other); + } + + private boolean equalTo(PatchedOpportunityRequestStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static PatchedOpportunityRequestStatus of(OpportunityStatusEnum value) { + return new PatchedOpportunityRequestStatus(value, 0); + } + + public static PatchedOpportunityRequestStatus of(String value) { + return new PatchedOpportunityRequestStatus(value, 1); + } + + public interface Visitor { + T visit(OpportunityStatusEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(PatchedOpportunityRequestStatus.class); + } + + @java.lang.Override + public PatchedOpportunityRequestStatus deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, OpportunityStatusEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/crm/types/PatchedTaskEndpointRequest.java b/src/main/java/com/merge/api/crm/types/PatchedTaskEndpointRequest.java index ae7d55331..37789f30a 100644 --- a/src/main/java/com/merge/api/crm/types/PatchedTaskEndpointRequest.java +++ b/src/main/java/com/merge/api/crm/types/PatchedTaskEndpointRequest.java @@ -99,10 +99,16 @@ public interface ModelStage { public interface _FinalStage { PatchedTaskEndpointRequest build(); + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ _FinalStage isDebugMode(Optional isDebugMode); _FinalStage isDebugMode(Boolean isDebugMode); + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ _FinalStage runAsync(Optional runAsync); _FinalStage runAsync(Boolean runAsync); @@ -146,6 +152,9 @@ public _FinalStage runAsync(Boolean runAsync) { return this; } + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ @java.lang.Override @JsonSetter(value = "run_async", nulls = Nulls.SKIP) public _FinalStage runAsync(Optional runAsync) { @@ -163,6 +172,9 @@ public _FinalStage isDebugMode(Boolean isDebugMode) { return this; } + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ @java.lang.Override @JsonSetter(value = "is_debug_mode", nulls = Nulls.SKIP) public _FinalStage isDebugMode(Optional isDebugMode) { diff --git a/src/main/java/com/merge/api/crm/types/PatchedTaskRequest.java b/src/main/java/com/merge/api/crm/types/PatchedTaskRequest.java index ac6ff7e34..146e9aeac 100644 --- a/src/main/java/com/merge/api/crm/types/PatchedTaskRequest.java +++ b/src/main/java/com/merge/api/crm/types/PatchedTaskRequest.java @@ -37,7 +37,7 @@ public final class PatchedTaskRequest { private final Optional dueDate; - private final Optional status; + private final Optional status; private final Optional> integrationParams; @@ -55,7 +55,7 @@ private PatchedTaskRequest( Optional opportunity, Optional completedDate, Optional dueDate, - Optional status, + Optional status, Optional> integrationParams, Optional> linkedAccountParams, Optional> remoteFields, @@ -138,7 +138,7 @@ public Optional getDueDate() { * */ @JsonProperty("status") - public Optional getStatus() { + public Optional getStatus() { return status; } @@ -223,7 +223,7 @@ public static final class Builder { private Optional dueDate = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Optional> integrationParams = Optional.empty(); @@ -251,6 +251,9 @@ public Builder from(PatchedTaskRequest other) { return this; } + /** + *

    The task's subject.

    + */ @JsonSetter(value = "subject", nulls = Nulls.SKIP) public Builder subject(Optional subject) { this.subject = subject; @@ -262,6 +265,9 @@ public Builder subject(String subject) { return this; } + /** + *

    The task's content.

    + */ @JsonSetter(value = "content", nulls = Nulls.SKIP) public Builder content(Optional content) { this.content = content; @@ -273,6 +279,9 @@ public Builder content(String content) { return this; } + /** + *

    The task's owner.

    + */ @JsonSetter(value = "owner", nulls = Nulls.SKIP) public Builder owner(Optional owner) { this.owner = owner; @@ -284,6 +293,9 @@ public Builder owner(String owner) { return this; } + /** + *

    The task's account.

    + */ @JsonSetter(value = "account", nulls = Nulls.SKIP) public Builder account(Optional account) { this.account = account; @@ -295,6 +307,9 @@ public Builder account(String account) { return this; } + /** + *

    The task's opportunity.

    + */ @JsonSetter(value = "opportunity", nulls = Nulls.SKIP) public Builder opportunity(Optional opportunity) { this.opportunity = opportunity; @@ -306,6 +321,9 @@ public Builder opportunity(String opportunity) { return this; } + /** + *

    When the task is completed.

    + */ @JsonSetter(value = "completed_date", nulls = Nulls.SKIP) public Builder completedDate(Optional completedDate) { this.completedDate = completedDate; @@ -317,6 +335,9 @@ public Builder completedDate(OffsetDateTime completedDate) { return this; } + /** + *

    When the task is due.

    + */ @JsonSetter(value = "due_date", nulls = Nulls.SKIP) public Builder dueDate(Optional dueDate) { this.dueDate = dueDate; @@ -328,13 +349,20 @@ public Builder dueDate(OffsetDateTime dueDate) { return this; } + /** + *

    The task's status.

    + *
      + *
    • OPEN - OPEN
    • + *
    • CLOSED - CLOSED
    • + *
    + */ @JsonSetter(value = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { + public Builder status(Optional status) { this.status = status; return this; } - public Builder status(TaskStatusEnum status) { + public Builder status(PatchedTaskRequestStatus status) { this.status = Optional.ofNullable(status); return this; } diff --git a/src/main/java/com/merge/api/crm/types/PatchedTaskRequestStatus.java b/src/main/java/com/merge/api/crm/types/PatchedTaskRequestStatus.java new file mode 100644 index 000000000..31287cfc1 --- /dev/null +++ b/src/main/java/com/merge/api/crm/types/PatchedTaskRequestStatus.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.crm.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = PatchedTaskRequestStatus.Deserializer.class) +public final class PatchedTaskRequestStatus { + private final Object value; + + private final int type; + + private PatchedTaskRequestStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((TaskStatusEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PatchedTaskRequestStatus && equalTo((PatchedTaskRequestStatus) other); + } + + private boolean equalTo(PatchedTaskRequestStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static PatchedTaskRequestStatus of(TaskStatusEnum value) { + return new PatchedTaskRequestStatus(value, 0); + } + + public static PatchedTaskRequestStatus of(String value) { + return new PatchedTaskRequestStatus(value, 1); + } + + public interface Visitor { + T visit(TaskStatusEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(PatchedTaskRequestStatus.class); + } + + @java.lang.Override + public PatchedTaskRequestStatus deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TaskStatusEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/crm/types/PhoneNumber.java b/src/main/java/com/merge/api/crm/types/PhoneNumber.java index e920f9512..6a8a18848 100644 --- a/src/main/java/com/merge/api/crm/types/PhoneNumber.java +++ b/src/main/java/com/merge/api/crm/types/PhoneNumber.java @@ -131,6 +131,9 @@ public Builder from(PhoneNumber other) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -142,6 +145,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -153,6 +159,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The phone number.

    + */ @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) public Builder phoneNumber(Optional phoneNumber) { this.phoneNumber = phoneNumber; @@ -164,6 +173,9 @@ public Builder phoneNumber(String phoneNumber) { return this; } + /** + *

    The phone number's type.

    + */ @JsonSetter(value = "phone_number_type", nulls = Nulls.SKIP) public Builder phoneNumberType(Optional phoneNumberType) { this.phoneNumberType = phoneNumberType; diff --git a/src/main/java/com/merge/api/crm/types/PhoneNumberRequest.java b/src/main/java/com/merge/api/crm/types/PhoneNumberRequest.java index c6625ec3e..9b7396157 100644 --- a/src/main/java/com/merge/api/crm/types/PhoneNumberRequest.java +++ b/src/main/java/com/merge/api/crm/types/PhoneNumberRequest.java @@ -125,6 +125,9 @@ public Builder from(PhoneNumberRequest other) { return this; } + /** + *

    The phone number.

    + */ @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) public Builder phoneNumber(Optional phoneNumber) { this.phoneNumber = phoneNumber; @@ -136,6 +139,9 @@ public Builder phoneNumber(String phoneNumber) { return this; } + /** + *

    The phone number's type.

    + */ @JsonSetter(value = "phone_number_type", nulls = Nulls.SKIP) public Builder phoneNumberType(Optional phoneNumberType) { this.phoneNumberType = phoneNumberType; diff --git a/src/main/java/com/merge/api/crm/types/RemoteData.java b/src/main/java/com/merge/api/crm/types/RemoteData.java index e940918d1..b964aaa67 100644 --- a/src/main/java/com/merge/api/crm/types/RemoteData.java +++ b/src/main/java/com/merge/api/crm/types/RemoteData.java @@ -77,6 +77,9 @@ public static PathStage builder() { } public interface PathStage { + /** + * The third-party API path that is being called. + */ _FinalStage path(@NotNull String path); Builder from(RemoteData other); @@ -109,7 +112,7 @@ public Builder from(RemoteData other) { } /** - *

    The third-party API path that is being called.

    + * The third-party API path that is being called.

    The third-party API path that is being called.

    * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override diff --git a/src/main/java/com/merge/api/crm/types/RemoteFieldClassForCustomObjectClass.java b/src/main/java/com/merge/api/crm/types/RemoteFieldClassForCustomObjectClass.java index 77db8b030..a061aeb51 100644 --- a/src/main/java/com/merge/api/crm/types/RemoteFieldClassForCustomObjectClass.java +++ b/src/main/java/com/merge/api/crm/types/RemoteFieldClassForCustomObjectClass.java @@ -34,9 +34,9 @@ public final class RemoteFieldClassForCustomObjectClass { private final Optional isRequired; - private final Optional fieldType; + private final Optional fieldType; - private final Optional fieldFormat; + private final Optional fieldFormat; private final Optional> fieldChoices; @@ -51,8 +51,8 @@ private RemoteFieldClassForCustomObjectClass( Optional remoteKeyName, Optional description, Optional isRequired, - Optional fieldType, - Optional fieldFormat, + Optional fieldType, + Optional fieldFormat, Optional> fieldChoices, Optional itemSchema, Map additionalProperties) { @@ -106,12 +106,12 @@ public Optional getIsRequired() { } @JsonProperty("field_type") - public Optional getFieldType() { + public Optional getFieldType() { return fieldType; } @JsonProperty("field_format") - public Optional getFieldFormat() { + public Optional getFieldFormat() { return fieldFormat; } @@ -188,9 +188,9 @@ public static final class Builder { private Optional isRequired = Optional.empty(); - private Optional fieldType = Optional.empty(); + private Optional fieldType = Optional.empty(); - private Optional fieldFormat = Optional.empty(); + private Optional fieldFormat = Optional.empty(); private Optional> fieldChoices = Optional.empty(); @@ -215,6 +215,9 @@ public Builder from(RemoteFieldClassForCustomObjectClass other) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -226,6 +229,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -282,23 +288,23 @@ public Builder isRequired(Boolean isRequired) { } @JsonSetter(value = "field_type", nulls = Nulls.SKIP) - public Builder fieldType(Optional fieldType) { + public Builder fieldType(Optional fieldType) { this.fieldType = fieldType; return this; } - public Builder fieldType(FieldTypeEnum fieldType) { + public Builder fieldType(RemoteFieldClassForCustomObjectClassFieldType fieldType) { this.fieldType = Optional.ofNullable(fieldType); return this; } @JsonSetter(value = "field_format", nulls = Nulls.SKIP) - public Builder fieldFormat(Optional fieldFormat) { + public Builder fieldFormat(Optional fieldFormat) { this.fieldFormat = fieldFormat; return this; } - public Builder fieldFormat(FieldFormatEnum fieldFormat) { + public Builder fieldFormat(RemoteFieldClassForCustomObjectClassFieldFormat fieldFormat) { this.fieldFormat = Optional.ofNullable(fieldFormat); return this; } diff --git a/src/main/java/com/merge/api/crm/types/RemoteFieldClassForCustomObjectClassFieldFormat.java b/src/main/java/com/merge/api/crm/types/RemoteFieldClassForCustomObjectClassFieldFormat.java new file mode 100644 index 000000000..67c74f267 --- /dev/null +++ b/src/main/java/com/merge/api/crm/types/RemoteFieldClassForCustomObjectClassFieldFormat.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.crm.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = RemoteFieldClassForCustomObjectClassFieldFormat.Deserializer.class) +public final class RemoteFieldClassForCustomObjectClassFieldFormat { + private final Object value; + + private final int type; + + private RemoteFieldClassForCustomObjectClassFieldFormat(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((FieldFormatEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof RemoteFieldClassForCustomObjectClassFieldFormat + && equalTo((RemoteFieldClassForCustomObjectClassFieldFormat) other); + } + + private boolean equalTo(RemoteFieldClassForCustomObjectClassFieldFormat other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static RemoteFieldClassForCustomObjectClassFieldFormat of(FieldFormatEnum value) { + return new RemoteFieldClassForCustomObjectClassFieldFormat(value, 0); + } + + public static RemoteFieldClassForCustomObjectClassFieldFormat of(String value) { + return new RemoteFieldClassForCustomObjectClassFieldFormat(value, 1); + } + + public interface Visitor { + T visit(FieldFormatEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(RemoteFieldClassForCustomObjectClassFieldFormat.class); + } + + @java.lang.Override + public RemoteFieldClassForCustomObjectClassFieldFormat deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FieldFormatEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/crm/types/RemoteFieldClassForCustomObjectClassFieldType.java b/src/main/java/com/merge/api/crm/types/RemoteFieldClassForCustomObjectClassFieldType.java new file mode 100644 index 000000000..4db1db624 --- /dev/null +++ b/src/main/java/com/merge/api/crm/types/RemoteFieldClassForCustomObjectClassFieldType.java @@ -0,0 +1,97 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.crm.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = RemoteFieldClassForCustomObjectClassFieldType.Deserializer.class) +public final class RemoteFieldClassForCustomObjectClassFieldType { + private final Object value; + + private final int type; + + private RemoteFieldClassForCustomObjectClassFieldType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((FieldTypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof RemoteFieldClassForCustomObjectClassFieldType + && equalTo((RemoteFieldClassForCustomObjectClassFieldType) other); + } + + private boolean equalTo(RemoteFieldClassForCustomObjectClassFieldType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static RemoteFieldClassForCustomObjectClassFieldType of(FieldTypeEnum value) { + return new RemoteFieldClassForCustomObjectClassFieldType(value, 0); + } + + public static RemoteFieldClassForCustomObjectClassFieldType of(String value) { + return new RemoteFieldClassForCustomObjectClassFieldType(value, 1); + } + + public interface Visitor { + T visit(FieldTypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(RemoteFieldClassForCustomObjectClassFieldType.class); + } + + @java.lang.Override + public RemoteFieldClassForCustomObjectClassFieldType deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FieldTypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/crm/types/RemoteFieldsRetrieveRequest.java b/src/main/java/com/merge/api/crm/types/RemoteFieldsRetrieveRequest.java index 390c0e6b5..e04d3785c 100644 --- a/src/main/java/com/merge/api/crm/types/RemoteFieldsRetrieveRequest.java +++ b/src/main/java/com/merge/api/crm/types/RemoteFieldsRetrieveRequest.java @@ -97,6 +97,9 @@ public Builder from(RemoteFieldsRetrieveRequest other) { return this; } + /** + *

    A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models.

    + */ @JsonSetter(value = "common_models", nulls = Nulls.SKIP) public Builder commonModels(Optional commonModels) { this.commonModels = commonModels; @@ -108,6 +111,9 @@ public Builder commonModels(String commonModels) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_example_values", nulls = Nulls.SKIP) public Builder includeExampleValues(Optional includeExampleValues) { this.includeExampleValues = includeExampleValues; diff --git a/src/main/java/com/merge/api/crm/types/RemoteKeyForRegenerationRequest.java b/src/main/java/com/merge/api/crm/types/RemoteKeyForRegenerationRequest.java index 4715accd8..674ca7890 100644 --- a/src/main/java/com/merge/api/crm/types/RemoteKeyForRegenerationRequest.java +++ b/src/main/java/com/merge/api/crm/types/RemoteKeyForRegenerationRequest.java @@ -66,6 +66,9 @@ public static NameStage builder() { } public interface NameStage { + /** + * The name of the remote key + */ _FinalStage name(@NotNull String name); Builder from(RemoteKeyForRegenerationRequest other); @@ -91,7 +94,7 @@ public Builder from(RemoteKeyForRegenerationRequest other) { } /** - *

    The name of the remote key

    + * The name of the remote key

    The name of the remote key

    * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override diff --git a/src/main/java/com/merge/api/crm/types/RemoteResponse.java b/src/main/java/com/merge/api/crm/types/RemoteResponse.java index b2b09e447..3bbe035fe 100644 --- a/src/main/java/com/merge/api/crm/types/RemoteResponse.java +++ b/src/main/java/com/merge/api/crm/types/RemoteResponse.java @@ -32,7 +32,7 @@ public final class RemoteResponse { private final Optional> responseHeaders; - private final Optional responseType; + private final Optional responseType; private final Optional> headers; @@ -44,7 +44,7 @@ private RemoteResponse( int status, JsonNode response, Optional> responseHeaders, - Optional responseType, + Optional responseType, Optional> headers, Map additionalProperties) { this.method = method; @@ -83,7 +83,7 @@ public Optional> getResponseHeaders() { } @JsonProperty("response_type") - public Optional getResponseType() { + public Optional getResponseType() { return responseType; } @@ -159,9 +159,9 @@ public interface _FinalStage { _FinalStage responseHeaders(Map responseHeaders); - _FinalStage responseType(Optional responseType); + _FinalStage responseType(Optional responseType); - _FinalStage responseType(ResponseTypeEnum responseType); + _FinalStage responseType(RemoteResponseResponseType responseType); _FinalStage headers(Optional> headers); @@ -180,7 +180,7 @@ public static final class Builder implements MethodStage, PathStage, StatusStage private Optional> headers = Optional.empty(); - private Optional responseType = Optional.empty(); + private Optional responseType = Optional.empty(); private Optional> responseHeaders = Optional.empty(); @@ -243,14 +243,14 @@ public _FinalStage headers(Optional> headers) { } @java.lang.Override - public _FinalStage responseType(ResponseTypeEnum responseType) { + public _FinalStage responseType(RemoteResponseResponseType responseType) { this.responseType = Optional.ofNullable(responseType); return this; } @java.lang.Override @JsonSetter(value = "response_type", nulls = Nulls.SKIP) - public _FinalStage responseType(Optional responseType) { + public _FinalStage responseType(Optional responseType) { this.responseType = responseType; return this; } diff --git a/src/main/java/com/merge/api/crm/types/RemoteResponseResponseType.java b/src/main/java/com/merge/api/crm/types/RemoteResponseResponseType.java new file mode 100644 index 000000000..4914ce1ff --- /dev/null +++ b/src/main/java/com/merge/api/crm/types/RemoteResponseResponseType.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.crm.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = RemoteResponseResponseType.Deserializer.class) +public final class RemoteResponseResponseType { + private final Object value; + + private final int type; + + private RemoteResponseResponseType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((ResponseTypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof RemoteResponseResponseType && equalTo((RemoteResponseResponseType) other); + } + + private boolean equalTo(RemoteResponseResponseType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static RemoteResponseResponseType of(ResponseTypeEnum value) { + return new RemoteResponseResponseType(value, 0); + } + + public static RemoteResponseResponseType of(String value) { + return new RemoteResponseResponseType(value, 1); + } + + public interface Visitor { + T visit(ResponseTypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(RemoteResponseResponseType.class); + } + + @java.lang.Override + public RemoteResponseResponseType deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, ResponseTypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/crm/types/Stage.java b/src/main/java/com/merge/api/crm/types/Stage.java index d1873eb9e..3e93d75f0 100644 --- a/src/main/java/com/merge/api/crm/types/Stage.java +++ b/src/main/java/com/merge/api/crm/types/Stage.java @@ -221,6 +221,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -232,6 +235,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -243,6 +249,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -254,6 +263,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The stage's name.

    + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -265,6 +277,9 @@ public Builder name(String name) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/crm/types/StagesListRequest.java b/src/main/java/com/merge/api/crm/types/StagesListRequest.java index 104f90980..669757c09 100644 --- a/src/main/java/com/merge/api/crm/types/StagesListRequest.java +++ b/src/main/java/com/merge/api/crm/types/StagesListRequest.java @@ -254,6 +254,9 @@ public Builder from(StagesListRequest other) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -265,6 +268,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -276,6 +282,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -287,6 +296,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -298,6 +310,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -309,6 +324,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

    + */ @JsonSetter(value = "include_remote_fields", nulls = Nulls.SKIP) public Builder includeRemoteFields(Optional includeRemoteFields) { this.includeRemoteFields = includeRemoteFields; @@ -320,6 +338,9 @@ public Builder includeRemoteFields(Boolean includeRemoteFields) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -331,6 +352,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -342,6 +366,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -353,6 +380,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -364,6 +394,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; diff --git a/src/main/java/com/merge/api/crm/types/StagesRemoteFieldClassesListRequest.java b/src/main/java/com/merge/api/crm/types/StagesRemoteFieldClassesListRequest.java index b5e7600e1..c90dba1f1 100644 --- a/src/main/java/com/merge/api/crm/types/StagesRemoteFieldClassesListRequest.java +++ b/src/main/java/com/merge/api/crm/types/StagesRemoteFieldClassesListRequest.java @@ -32,6 +32,8 @@ public final class StagesRemoteFieldClassesListRequest { private final Optional isCommonModelField; + private final Optional isCustom; + private final Optional pageSize; private final Map additionalProperties; @@ -43,6 +45,7 @@ private StagesRemoteFieldClassesListRequest( Optional includeRemoteFields, Optional includeShellData, Optional isCommonModelField, + Optional isCustom, Optional pageSize, Map additionalProperties) { this.cursor = cursor; @@ -51,6 +54,7 @@ private StagesRemoteFieldClassesListRequest( this.includeRemoteFields = includeRemoteFields; this.includeShellData = includeShellData; this.isCommonModelField = isCommonModelField; + this.isCustom = isCustom; this.pageSize = pageSize; this.additionalProperties = additionalProperties; } @@ -103,6 +107,14 @@ public Optional getIsCommonModelField() { return isCommonModelField; } + /** + * @return If provided, will only return remote fields classes with this is_custom value + */ + @JsonProperty("is_custom") + public Optional getIsCustom() { + return isCustom; + } + /** * @return Number of results to return per page. */ @@ -130,6 +142,7 @@ private boolean equalTo(StagesRemoteFieldClassesListRequest other) { && includeRemoteFields.equals(other.includeRemoteFields) && includeShellData.equals(other.includeShellData) && isCommonModelField.equals(other.isCommonModelField) + && isCustom.equals(other.isCustom) && pageSize.equals(other.pageSize); } @@ -142,6 +155,7 @@ public int hashCode() { this.includeRemoteFields, this.includeShellData, this.isCommonModelField, + this.isCustom, this.pageSize); } @@ -168,6 +182,8 @@ public static final class Builder { private Optional isCommonModelField = Optional.empty(); + private Optional isCustom = Optional.empty(); + private Optional pageSize = Optional.empty(); @JsonAnySetter @@ -182,10 +198,14 @@ public Builder from(StagesRemoteFieldClassesListRequest other) { includeRemoteFields(other.getIncludeRemoteFields()); includeShellData(other.getIncludeShellData()); isCommonModelField(other.getIsCommonModelField()); + isCustom(other.getIsCustom()); pageSize(other.getPageSize()); return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -197,6 +217,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -208,6 +231,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -219,6 +245,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

    + */ @JsonSetter(value = "include_remote_fields", nulls = Nulls.SKIP) public Builder includeRemoteFields(Optional includeRemoteFields) { this.includeRemoteFields = includeRemoteFields; @@ -230,6 +259,9 @@ public Builder includeRemoteFields(Boolean includeRemoteFields) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -241,6 +273,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, will only return remote field classes with this is_common_model_field value

    + */ @JsonSetter(value = "is_common_model_field", nulls = Nulls.SKIP) public Builder isCommonModelField(Optional isCommonModelField) { this.isCommonModelField = isCommonModelField; @@ -252,6 +287,23 @@ public Builder isCommonModelField(Boolean isCommonModelField) { return this; } + /** + *

    If provided, will only return remote fields classes with this is_custom value

    + */ + @JsonSetter(value = "is_custom", nulls = Nulls.SKIP) + public Builder isCustom(Optional isCustom) { + this.isCustom = isCustom; + return this; + } + + public Builder isCustom(Boolean isCustom) { + this.isCustom = Optional.ofNullable(isCustom); + return this; + } + + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -271,6 +323,7 @@ public StagesRemoteFieldClassesListRequest build() { includeRemoteFields, includeShellData, isCommonModelField, + isCustom, pageSize, additionalProperties); } diff --git a/src/main/java/com/merge/api/crm/types/StagesRetrieveRequest.java b/src/main/java/com/merge/api/crm/types/StagesRetrieveRequest.java index 96c0538db..2c8ab89fc 100644 --- a/src/main/java/com/merge/api/crm/types/StagesRetrieveRequest.java +++ b/src/main/java/com/merge/api/crm/types/StagesRetrieveRequest.java @@ -114,6 +114,9 @@ public Builder from(StagesRetrieveRequest other) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -125,6 +128,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

    + */ @JsonSetter(value = "include_remote_fields", nulls = Nulls.SKIP) public Builder includeRemoteFields(Optional includeRemoteFields) { this.includeRemoteFields = includeRemoteFields; @@ -136,6 +142,9 @@ public Builder includeRemoteFields(Boolean includeRemoteFields) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/crm/types/SyncStatus.java b/src/main/java/com/merge/api/crm/types/SyncStatus.java index bc79ffa57..af8d22033 100644 --- a/src/main/java/com/merge/api/crm/types/SyncStatus.java +++ b/src/main/java/com/merge/api/crm/types/SyncStatus.java @@ -30,11 +30,11 @@ public final class SyncStatus { private final Optional nextSyncStart; - private final Optional lastSyncResult; + private final Optional lastSyncResult; private final Optional lastSyncFinished; - private final StatusFd5Enum status; + private final SyncStatusStatus status; private final boolean isInitialSync; @@ -47,9 +47,9 @@ private SyncStatus( String modelId, Optional lastSyncStart, Optional nextSyncStart, - Optional lastSyncResult, + Optional lastSyncResult, Optional lastSyncFinished, - StatusFd5Enum status, + SyncStatusStatus status, boolean isInitialSync, Optional selectiveSyncConfigurationsUsage, Map additionalProperties) { @@ -86,7 +86,7 @@ public Optional getNextSyncStart() { } @JsonProperty("last_sync_result") - public Optional getLastSyncResult() { + public Optional getLastSyncResult() { return lastSyncResult; } @@ -96,7 +96,7 @@ public Optional getLastSyncFinished() { } @JsonProperty("status") - public StatusFd5Enum getStatus() { + public SyncStatusStatus getStatus() { return status; } @@ -167,7 +167,7 @@ public interface ModelIdStage { } public interface StatusStage { - IsInitialSyncStage status(@NotNull StatusFd5Enum status); + IsInitialSyncStage status(@NotNull SyncStatusStatus status); } public interface IsInitialSyncStage { @@ -185,9 +185,9 @@ public interface _FinalStage { _FinalStage nextSyncStart(OffsetDateTime nextSyncStart); - _FinalStage lastSyncResult(Optional lastSyncResult); + _FinalStage lastSyncResult(Optional lastSyncResult); - _FinalStage lastSyncResult(LastSyncResultEnum lastSyncResult); + _FinalStage lastSyncResult(SyncStatusLastSyncResult lastSyncResult); _FinalStage lastSyncFinished(Optional lastSyncFinished); @@ -207,7 +207,7 @@ public static final class Builder private String modelId; - private StatusFd5Enum status; + private SyncStatusStatus status; private boolean isInitialSync; @@ -215,7 +215,7 @@ public static final class Builder private Optional lastSyncFinished = Optional.empty(); - private Optional lastSyncResult = Optional.empty(); + private Optional lastSyncResult = Optional.empty(); private Optional nextSyncStart = Optional.empty(); @@ -256,7 +256,7 @@ public StatusStage modelId(@NotNull String modelId) { @java.lang.Override @JsonSetter("status") - public IsInitialSyncStage status(@NotNull StatusFd5Enum status) { + public IsInitialSyncStage status(@NotNull SyncStatusStatus status) { this.status = status; return this; } @@ -297,14 +297,14 @@ public _FinalStage lastSyncFinished(Optional lastSyncFinished) { } @java.lang.Override - public _FinalStage lastSyncResult(LastSyncResultEnum lastSyncResult) { + public _FinalStage lastSyncResult(SyncStatusLastSyncResult lastSyncResult) { this.lastSyncResult = Optional.ofNullable(lastSyncResult); return this; } @java.lang.Override @JsonSetter(value = "last_sync_result", nulls = Nulls.SKIP) - public _FinalStage lastSyncResult(Optional lastSyncResult) { + public _FinalStage lastSyncResult(Optional lastSyncResult) { this.lastSyncResult = lastSyncResult; return this; } diff --git a/src/main/java/com/merge/api/crm/types/SyncStatusLastSyncResult.java b/src/main/java/com/merge/api/crm/types/SyncStatusLastSyncResult.java new file mode 100644 index 000000000..d557f4781 --- /dev/null +++ b/src/main/java/com/merge/api/crm/types/SyncStatusLastSyncResult.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.crm.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = SyncStatusLastSyncResult.Deserializer.class) +public final class SyncStatusLastSyncResult { + private final Object value; + + private final int type; + + private SyncStatusLastSyncResult(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((LastSyncResultEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SyncStatusLastSyncResult && equalTo((SyncStatusLastSyncResult) other); + } + + private boolean equalTo(SyncStatusLastSyncResult other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static SyncStatusLastSyncResult of(LastSyncResultEnum value) { + return new SyncStatusLastSyncResult(value, 0); + } + + public static SyncStatusLastSyncResult of(String value) { + return new SyncStatusLastSyncResult(value, 1); + } + + public interface Visitor { + T visit(LastSyncResultEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(SyncStatusLastSyncResult.class); + } + + @java.lang.Override + public SyncStatusLastSyncResult deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, LastSyncResultEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/crm/types/SyncStatusListRequest.java b/src/main/java/com/merge/api/crm/types/SyncStatusListRequest.java index b841e6fe6..c28cd55f7 100644 --- a/src/main/java/com/merge/api/crm/types/SyncStatusListRequest.java +++ b/src/main/java/com/merge/api/crm/types/SyncStatusListRequest.java @@ -95,6 +95,9 @@ public Builder from(SyncStatusListRequest other) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -106,6 +109,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; diff --git a/src/main/java/com/merge/api/crm/types/SyncStatusStatus.java b/src/main/java/com/merge/api/crm/types/SyncStatusStatus.java new file mode 100644 index 000000000..5dc832b84 --- /dev/null +++ b/src/main/java/com/merge/api/crm/types/SyncStatusStatus.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.crm.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = SyncStatusStatus.Deserializer.class) +public final class SyncStatusStatus { + private final Object value; + + private final int type; + + private SyncStatusStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((StatusFd5Enum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SyncStatusStatus && equalTo((SyncStatusStatus) other); + } + + private boolean equalTo(SyncStatusStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static SyncStatusStatus of(StatusFd5Enum value) { + return new SyncStatusStatus(value, 0); + } + + public static SyncStatusStatus of(String value) { + return new SyncStatusStatus(value, 1); + } + + public interface Visitor { + T visit(StatusFd5Enum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(SyncStatusStatus.class); + } + + @java.lang.Override + public SyncStatusStatus deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, StatusFd5Enum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/crm/types/Task.java b/src/main/java/com/merge/api/crm/types/Task.java index f8d73207f..8446e9b0b 100644 --- a/src/main/java/com/merge/api/crm/types/Task.java +++ b/src/main/java/com/merge/api/crm/types/Task.java @@ -45,7 +45,7 @@ public final class Task { private final Optional dueDate; - private final Optional status; + private final Optional status; private final Optional remoteWasDeleted; @@ -69,7 +69,7 @@ private Task( Optional opportunity, Optional completedDate, Optional dueDate, - Optional status, + Optional status, Optional remoteWasDeleted, Optional> fieldMappings, Optional> remoteData, @@ -187,7 +187,7 @@ public Optional getDueDate() { * */ @JsonProperty("status") - public Optional getStatus() { + public Optional getStatus() { return status; } @@ -298,7 +298,7 @@ public static final class Builder { private Optional dueDate = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Optional remoteWasDeleted = Optional.empty(); @@ -344,6 +344,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -355,6 +358,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -366,6 +372,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -377,6 +386,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The task's subject.

    + */ @JsonSetter(value = "subject", nulls = Nulls.SKIP) public Builder subject(Optional subject) { this.subject = subject; @@ -388,6 +400,9 @@ public Builder subject(String subject) { return this; } + /** + *

    The task's content.

    + */ @JsonSetter(value = "content", nulls = Nulls.SKIP) public Builder content(Optional content) { this.content = content; @@ -399,6 +414,9 @@ public Builder content(String content) { return this; } + /** + *

    The task's owner.

    + */ @JsonSetter(value = "owner", nulls = Nulls.SKIP) public Builder owner(Optional owner) { this.owner = owner; @@ -410,6 +428,9 @@ public Builder owner(TaskOwner owner) { return this; } + /** + *

    The task's account.

    + */ @JsonSetter(value = "account", nulls = Nulls.SKIP) public Builder account(Optional account) { this.account = account; @@ -421,6 +442,9 @@ public Builder account(TaskAccount account) { return this; } + /** + *

    The task's opportunity.

    + */ @JsonSetter(value = "opportunity", nulls = Nulls.SKIP) public Builder opportunity(Optional opportunity) { this.opportunity = opportunity; @@ -432,6 +456,9 @@ public Builder opportunity(TaskOpportunity opportunity) { return this; } + /** + *

    When the task is completed.

    + */ @JsonSetter(value = "completed_date", nulls = Nulls.SKIP) public Builder completedDate(Optional completedDate) { this.completedDate = completedDate; @@ -443,6 +470,9 @@ public Builder completedDate(OffsetDateTime completedDate) { return this; } + /** + *

    When the task is due.

    + */ @JsonSetter(value = "due_date", nulls = Nulls.SKIP) public Builder dueDate(Optional dueDate) { this.dueDate = dueDate; @@ -454,17 +484,27 @@ public Builder dueDate(OffsetDateTime dueDate) { return this; } + /** + *

    The task's status.

    + *
      + *
    • OPEN - OPEN
    • + *
    • CLOSED - CLOSED
    • + *
    + */ @JsonSetter(value = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { + public Builder status(Optional status) { this.status = status; return this; } - public Builder status(TaskStatusEnum status) { + public Builder status(TaskStatus status) { this.status = Optional.ofNullable(status); return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/crm/types/TaskEndpointRequest.java b/src/main/java/com/merge/api/crm/types/TaskEndpointRequest.java index 234b7618f..dff2d21f4 100644 --- a/src/main/java/com/merge/api/crm/types/TaskEndpointRequest.java +++ b/src/main/java/com/merge/api/crm/types/TaskEndpointRequest.java @@ -99,10 +99,16 @@ public interface ModelStage { public interface _FinalStage { TaskEndpointRequest build(); + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ _FinalStage isDebugMode(Optional isDebugMode); _FinalStage isDebugMode(Boolean isDebugMode); + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ _FinalStage runAsync(Optional runAsync); _FinalStage runAsync(Boolean runAsync); @@ -146,6 +152,9 @@ public _FinalStage runAsync(Boolean runAsync) { return this; } + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ @java.lang.Override @JsonSetter(value = "run_async", nulls = Nulls.SKIP) public _FinalStage runAsync(Optional runAsync) { @@ -163,6 +172,9 @@ public _FinalStage isDebugMode(Boolean isDebugMode) { return this; } + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ @java.lang.Override @JsonSetter(value = "is_debug_mode", nulls = Nulls.SKIP) public _FinalStage isDebugMode(Optional isDebugMode) { diff --git a/src/main/java/com/merge/api/crm/types/TaskRequest.java b/src/main/java/com/merge/api/crm/types/TaskRequest.java index 20eb99c05..929645569 100644 --- a/src/main/java/com/merge/api/crm/types/TaskRequest.java +++ b/src/main/java/com/merge/api/crm/types/TaskRequest.java @@ -37,7 +37,7 @@ public final class TaskRequest { private final Optional dueDate; - private final Optional status; + private final Optional status; private final Optional> integrationParams; @@ -55,7 +55,7 @@ private TaskRequest( Optional opportunity, Optional completedDate, Optional dueDate, - Optional status, + Optional status, Optional> integrationParams, Optional> linkedAccountParams, Optional> remoteFields, @@ -138,7 +138,7 @@ public Optional getDueDate() { * */ @JsonProperty("status") - public Optional getStatus() { + public Optional getStatus() { return status; } @@ -223,7 +223,7 @@ public static final class Builder { private Optional dueDate = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Optional> integrationParams = Optional.empty(); @@ -251,6 +251,9 @@ public Builder from(TaskRequest other) { return this; } + /** + *

    The task's subject.

    + */ @JsonSetter(value = "subject", nulls = Nulls.SKIP) public Builder subject(Optional subject) { this.subject = subject; @@ -262,6 +265,9 @@ public Builder subject(String subject) { return this; } + /** + *

    The task's content.

    + */ @JsonSetter(value = "content", nulls = Nulls.SKIP) public Builder content(Optional content) { this.content = content; @@ -273,6 +279,9 @@ public Builder content(String content) { return this; } + /** + *

    The task's owner.

    + */ @JsonSetter(value = "owner", nulls = Nulls.SKIP) public Builder owner(Optional owner) { this.owner = owner; @@ -284,6 +293,9 @@ public Builder owner(TaskRequestOwner owner) { return this; } + /** + *

    The task's account.

    + */ @JsonSetter(value = "account", nulls = Nulls.SKIP) public Builder account(Optional account) { this.account = account; @@ -295,6 +307,9 @@ public Builder account(TaskRequestAccount account) { return this; } + /** + *

    The task's opportunity.

    + */ @JsonSetter(value = "opportunity", nulls = Nulls.SKIP) public Builder opportunity(Optional opportunity) { this.opportunity = opportunity; @@ -306,6 +321,9 @@ public Builder opportunity(TaskRequestOpportunity opportunity) { return this; } + /** + *

    When the task is completed.

    + */ @JsonSetter(value = "completed_date", nulls = Nulls.SKIP) public Builder completedDate(Optional completedDate) { this.completedDate = completedDate; @@ -317,6 +335,9 @@ public Builder completedDate(OffsetDateTime completedDate) { return this; } + /** + *

    When the task is due.

    + */ @JsonSetter(value = "due_date", nulls = Nulls.SKIP) public Builder dueDate(Optional dueDate) { this.dueDate = dueDate; @@ -328,13 +349,20 @@ public Builder dueDate(OffsetDateTime dueDate) { return this; } + /** + *

    The task's status.

    + *
      + *
    • OPEN - OPEN
    • + *
    • CLOSED - CLOSED
    • + *
    + */ @JsonSetter(value = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { + public Builder status(Optional status) { this.status = status; return this; } - public Builder status(TaskStatusEnum status) { + public Builder status(TaskRequestStatus status) { this.status = Optional.ofNullable(status); return this; } diff --git a/src/main/java/com/merge/api/crm/types/TaskRequestStatus.java b/src/main/java/com/merge/api/crm/types/TaskRequestStatus.java new file mode 100644 index 000000000..e38736514 --- /dev/null +++ b/src/main/java/com/merge/api/crm/types/TaskRequestStatus.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.crm.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = TaskRequestStatus.Deserializer.class) +public final class TaskRequestStatus { + private final Object value; + + private final int type; + + private TaskRequestStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((TaskStatusEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof TaskRequestStatus && equalTo((TaskRequestStatus) other); + } + + private boolean equalTo(TaskRequestStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static TaskRequestStatus of(TaskStatusEnum value) { + return new TaskRequestStatus(value, 0); + } + + public static TaskRequestStatus of(String value) { + return new TaskRequestStatus(value, 1); + } + + public interface Visitor { + T visit(TaskStatusEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(TaskRequestStatus.class); + } + + @java.lang.Override + public TaskRequestStatus deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TaskStatusEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/crm/types/TaskStatus.java b/src/main/java/com/merge/api/crm/types/TaskStatus.java new file mode 100644 index 000000000..5b65d61ba --- /dev/null +++ b/src/main/java/com/merge/api/crm/types/TaskStatus.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.crm.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = TaskStatus.Deserializer.class) +public final class TaskStatus { + private final Object value; + + private final int type; + + private TaskStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((TaskStatusEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof TaskStatus && equalTo((TaskStatus) other); + } + + private boolean equalTo(TaskStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static TaskStatus of(TaskStatusEnum value) { + return new TaskStatus(value, 0); + } + + public static TaskStatus of(String value) { + return new TaskStatus(value, 1); + } + + public interface Visitor { + T visit(TaskStatusEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(TaskStatus.class); + } + + @java.lang.Override + public TaskStatus deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TaskStatusEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/crm/types/TasksListRequest.java b/src/main/java/com/merge/api/crm/types/TasksListRequest.java index 92a251f07..5e2fdba30 100644 --- a/src/main/java/com/merge/api/crm/types/TasksListRequest.java +++ b/src/main/java/com/merge/api/crm/types/TasksListRequest.java @@ -273,6 +273,9 @@ public Builder from(TasksListRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -289,6 +292,9 @@ public Builder expand(TasksListRequestExpandItem expand) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -300,6 +306,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -311,6 +320,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -322,6 +334,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -333,6 +348,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -344,6 +362,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

    + */ @JsonSetter(value = "include_remote_fields", nulls = Nulls.SKIP) public Builder includeRemoteFields(Optional includeRemoteFields) { this.includeRemoteFields = includeRemoteFields; @@ -355,6 +376,9 @@ public Builder includeRemoteFields(Boolean includeRemoteFields) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -366,6 +390,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -377,6 +404,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -388,6 +418,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -399,6 +432,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; diff --git a/src/main/java/com/merge/api/crm/types/TasksRemoteFieldClassesListRequest.java b/src/main/java/com/merge/api/crm/types/TasksRemoteFieldClassesListRequest.java index d475332b3..e5efac55c 100644 --- a/src/main/java/com/merge/api/crm/types/TasksRemoteFieldClassesListRequest.java +++ b/src/main/java/com/merge/api/crm/types/TasksRemoteFieldClassesListRequest.java @@ -32,6 +32,8 @@ public final class TasksRemoteFieldClassesListRequest { private final Optional isCommonModelField; + private final Optional isCustom; + private final Optional pageSize; private final Map additionalProperties; @@ -43,6 +45,7 @@ private TasksRemoteFieldClassesListRequest( Optional includeRemoteFields, Optional includeShellData, Optional isCommonModelField, + Optional isCustom, Optional pageSize, Map additionalProperties) { this.cursor = cursor; @@ -51,6 +54,7 @@ private TasksRemoteFieldClassesListRequest( this.includeRemoteFields = includeRemoteFields; this.includeShellData = includeShellData; this.isCommonModelField = isCommonModelField; + this.isCustom = isCustom; this.pageSize = pageSize; this.additionalProperties = additionalProperties; } @@ -103,6 +107,14 @@ public Optional getIsCommonModelField() { return isCommonModelField; } + /** + * @return If provided, will only return remote fields classes with this is_custom value + */ + @JsonProperty("is_custom") + public Optional getIsCustom() { + return isCustom; + } + /** * @return Number of results to return per page. */ @@ -130,6 +142,7 @@ private boolean equalTo(TasksRemoteFieldClassesListRequest other) { && includeRemoteFields.equals(other.includeRemoteFields) && includeShellData.equals(other.includeShellData) && isCommonModelField.equals(other.isCommonModelField) + && isCustom.equals(other.isCustom) && pageSize.equals(other.pageSize); } @@ -142,6 +155,7 @@ public int hashCode() { this.includeRemoteFields, this.includeShellData, this.isCommonModelField, + this.isCustom, this.pageSize); } @@ -168,6 +182,8 @@ public static final class Builder { private Optional isCommonModelField = Optional.empty(); + private Optional isCustom = Optional.empty(); + private Optional pageSize = Optional.empty(); @JsonAnySetter @@ -182,10 +198,14 @@ public Builder from(TasksRemoteFieldClassesListRequest other) { includeRemoteFields(other.getIncludeRemoteFields()); includeShellData(other.getIncludeShellData()); isCommonModelField(other.getIsCommonModelField()); + isCustom(other.getIsCustom()); pageSize(other.getPageSize()); return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -197,6 +217,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -208,6 +231,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -219,6 +245,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

    + */ @JsonSetter(value = "include_remote_fields", nulls = Nulls.SKIP) public Builder includeRemoteFields(Optional includeRemoteFields) { this.includeRemoteFields = includeRemoteFields; @@ -230,6 +259,9 @@ public Builder includeRemoteFields(Boolean includeRemoteFields) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -241,6 +273,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, will only return remote field classes with this is_common_model_field value

    + */ @JsonSetter(value = "is_common_model_field", nulls = Nulls.SKIP) public Builder isCommonModelField(Optional isCommonModelField) { this.isCommonModelField = isCommonModelField; @@ -252,6 +287,23 @@ public Builder isCommonModelField(Boolean isCommonModelField) { return this; } + /** + *

    If provided, will only return remote fields classes with this is_custom value

    + */ + @JsonSetter(value = "is_custom", nulls = Nulls.SKIP) + public Builder isCustom(Optional isCustom) { + this.isCustom = isCustom; + return this; + } + + public Builder isCustom(Boolean isCustom) { + this.isCustom = Optional.ofNullable(isCustom); + return this; + } + + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -271,6 +323,7 @@ public TasksRemoteFieldClassesListRequest build() { includeRemoteFields, includeShellData, isCommonModelField, + isCustom, pageSize, additionalProperties); } diff --git a/src/main/java/com/merge/api/crm/types/TasksRetrieveRequest.java b/src/main/java/com/merge/api/crm/types/TasksRetrieveRequest.java index cc70b5c1b..734bbbe1b 100644 --- a/src/main/java/com/merge/api/crm/types/TasksRetrieveRequest.java +++ b/src/main/java/com/merge/api/crm/types/TasksRetrieveRequest.java @@ -132,6 +132,9 @@ public Builder from(TasksRetrieveRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -148,6 +151,9 @@ public Builder expand(TasksRetrieveRequestExpandItem expand) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -159,6 +165,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

    + */ @JsonSetter(value = "include_remote_fields", nulls = Nulls.SKIP) public Builder includeRemoteFields(Optional includeRemoteFields) { this.includeRemoteFields = includeRemoteFields; @@ -170,6 +179,9 @@ public Builder includeRemoteFields(Boolean includeRemoteFields) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/crm/types/User.java b/src/main/java/com/merge/api/crm/types/User.java index c5ce7145e..3a8aa2bdc 100644 --- a/src/main/java/com/merge/api/crm/types/User.java +++ b/src/main/java/com/merge/api/crm/types/User.java @@ -255,6 +255,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -266,6 +269,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -277,6 +283,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -288,6 +297,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The user's name.

    + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -299,6 +311,9 @@ public Builder name(String name) { return this; } + /** + *

    The user's email address.

    + */ @JsonSetter(value = "email", nulls = Nulls.SKIP) public Builder email(Optional email) { this.email = email; @@ -310,6 +325,9 @@ public Builder email(String email) { return this; } + /** + *

    Whether or not the user is active.

    + */ @JsonSetter(value = "is_active", nulls = Nulls.SKIP) public Builder isActive(Optional isActive) { this.isActive = isActive; @@ -321,6 +339,9 @@ public Builder isActive(Boolean isActive) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/crm/types/UsersListRequest.java b/src/main/java/com/merge/api/crm/types/UsersListRequest.java index 9a7c9d751..45913de32 100644 --- a/src/main/java/com/merge/api/crm/types/UsersListRequest.java +++ b/src/main/java/com/merge/api/crm/types/UsersListRequest.java @@ -271,6 +271,9 @@ public Builder from(UsersListRequest other) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -282,6 +285,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -293,6 +299,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -304,6 +313,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    If provided, will only return users with this email.

    + */ @JsonSetter(value = "email", nulls = Nulls.SKIP) public Builder email(Optional email) { this.email = email; @@ -315,6 +327,9 @@ public Builder email(String email) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -326,6 +341,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -337,6 +355,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

    + */ @JsonSetter(value = "include_remote_fields", nulls = Nulls.SKIP) public Builder includeRemoteFields(Optional includeRemoteFields) { this.includeRemoteFields = includeRemoteFields; @@ -348,6 +369,9 @@ public Builder includeRemoteFields(Boolean includeRemoteFields) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -359,6 +383,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -370,6 +397,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -381,6 +411,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -392,6 +425,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; diff --git a/src/main/java/com/merge/api/crm/types/UsersRemoteFieldClassesListRequest.java b/src/main/java/com/merge/api/crm/types/UsersRemoteFieldClassesListRequest.java index fe73df048..18388b817 100644 --- a/src/main/java/com/merge/api/crm/types/UsersRemoteFieldClassesListRequest.java +++ b/src/main/java/com/merge/api/crm/types/UsersRemoteFieldClassesListRequest.java @@ -32,6 +32,8 @@ public final class UsersRemoteFieldClassesListRequest { private final Optional isCommonModelField; + private final Optional isCustom; + private final Optional pageSize; private final Map additionalProperties; @@ -43,6 +45,7 @@ private UsersRemoteFieldClassesListRequest( Optional includeRemoteFields, Optional includeShellData, Optional isCommonModelField, + Optional isCustom, Optional pageSize, Map additionalProperties) { this.cursor = cursor; @@ -51,6 +54,7 @@ private UsersRemoteFieldClassesListRequest( this.includeRemoteFields = includeRemoteFields; this.includeShellData = includeShellData; this.isCommonModelField = isCommonModelField; + this.isCustom = isCustom; this.pageSize = pageSize; this.additionalProperties = additionalProperties; } @@ -103,6 +107,14 @@ public Optional getIsCommonModelField() { return isCommonModelField; } + /** + * @return If provided, will only return remote fields classes with this is_custom value + */ + @JsonProperty("is_custom") + public Optional getIsCustom() { + return isCustom; + } + /** * @return Number of results to return per page. */ @@ -130,6 +142,7 @@ private boolean equalTo(UsersRemoteFieldClassesListRequest other) { && includeRemoteFields.equals(other.includeRemoteFields) && includeShellData.equals(other.includeShellData) && isCommonModelField.equals(other.isCommonModelField) + && isCustom.equals(other.isCustom) && pageSize.equals(other.pageSize); } @@ -142,6 +155,7 @@ public int hashCode() { this.includeRemoteFields, this.includeShellData, this.isCommonModelField, + this.isCustom, this.pageSize); } @@ -168,6 +182,8 @@ public static final class Builder { private Optional isCommonModelField = Optional.empty(); + private Optional isCustom = Optional.empty(); + private Optional pageSize = Optional.empty(); @JsonAnySetter @@ -182,10 +198,14 @@ public Builder from(UsersRemoteFieldClassesListRequest other) { includeRemoteFields(other.getIncludeRemoteFields()); includeShellData(other.getIncludeShellData()); isCommonModelField(other.getIsCommonModelField()); + isCustom(other.getIsCustom()); pageSize(other.getPageSize()); return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -197,6 +217,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -208,6 +231,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -219,6 +245,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

    + */ @JsonSetter(value = "include_remote_fields", nulls = Nulls.SKIP) public Builder includeRemoteFields(Optional includeRemoteFields) { this.includeRemoteFields = includeRemoteFields; @@ -230,6 +259,9 @@ public Builder includeRemoteFields(Boolean includeRemoteFields) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -241,6 +273,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, will only return remote field classes with this is_common_model_field value

    + */ @JsonSetter(value = "is_common_model_field", nulls = Nulls.SKIP) public Builder isCommonModelField(Optional isCommonModelField) { this.isCommonModelField = isCommonModelField; @@ -252,6 +287,23 @@ public Builder isCommonModelField(Boolean isCommonModelField) { return this; } + /** + *

    If provided, will only return remote fields classes with this is_custom value

    + */ + @JsonSetter(value = "is_custom", nulls = Nulls.SKIP) + public Builder isCustom(Optional isCustom) { + this.isCustom = isCustom; + return this; + } + + public Builder isCustom(Boolean isCustom) { + this.isCustom = Optional.ofNullable(isCustom); + return this; + } + + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -271,6 +323,7 @@ public UsersRemoteFieldClassesListRequest build() { includeRemoteFields, includeShellData, isCommonModelField, + isCustom, pageSize, additionalProperties); } diff --git a/src/main/java/com/merge/api/crm/types/UsersRetrieveRequest.java b/src/main/java/com/merge/api/crm/types/UsersRetrieveRequest.java index f07707488..87d7b4f40 100644 --- a/src/main/java/com/merge/api/crm/types/UsersRetrieveRequest.java +++ b/src/main/java/com/merge/api/crm/types/UsersRetrieveRequest.java @@ -114,6 +114,9 @@ public Builder from(UsersRetrieveRequest other) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -125,6 +128,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

    + */ @JsonSetter(value = "include_remote_fields", nulls = Nulls.SKIP) public Builder includeRemoteFields(Optional includeRemoteFields) { this.includeRemoteFields = includeRemoteFields; @@ -136,6 +142,9 @@ public Builder includeRemoteFields(Boolean includeRemoteFields) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/filestorage/AsyncRawAccountDetailsClient.java b/src/main/java/com/merge/api/filestorage/AsyncRawAccountDetailsClient.java index 6f0cf937f..8adc4b577 100644 --- a/src/main/java/com/merge/api/filestorage/AsyncRawAccountDetailsClient.java +++ b/src/main/java/com/merge/api/filestorage/AsyncRawAccountDetailsClient.java @@ -40,7 +40,7 @@ public CompletableFuture> retrieve() { * Get details for a linked account. */ public CompletableFuture> retrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/account-details") .build(); diff --git a/src/main/java/com/merge/api/filestorage/AsyncRawAccountTokenClient.java b/src/main/java/com/merge/api/filestorage/AsyncRawAccountTokenClient.java index 2e2e03ad9..38f463df2 100644 --- a/src/main/java/com/merge/api/filestorage/AsyncRawAccountTokenClient.java +++ b/src/main/java/com/merge/api/filestorage/AsyncRawAccountTokenClient.java @@ -41,7 +41,7 @@ public CompletableFuture> retrieve(String pub */ public CompletableFuture> retrieve( String publicToken, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/account-token") .addPathSegment(publicToken) diff --git a/src/main/java/com/merge/api/filestorage/AsyncRawAsyncPassthroughClient.java b/src/main/java/com/merge/api/filestorage/AsyncRawAsyncPassthroughClient.java index 900bd0b7c..08bb0615e 100644 --- a/src/main/java/com/merge/api/filestorage/AsyncRawAsyncPassthroughClient.java +++ b/src/main/java/com/merge/api/filestorage/AsyncRawAsyncPassthroughClient.java @@ -46,7 +46,7 @@ public CompletableFuture> create(D */ public CompletableFuture> create( DataPassthroughRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/async-passthrough") .build(); @@ -113,7 +113,7 @@ public CompletableFuture> */ public CompletableFuture> retrieve( String asyncPassthroughReceiptId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/async-passthrough") .addPathSegment(asyncPassthroughReceiptId) diff --git a/src/main/java/com/merge/api/filestorage/AsyncRawAuditTrailClient.java b/src/main/java/com/merge/api/filestorage/AsyncRawAuditTrailClient.java index 948c33d4f..a491c5ca8 100644 --- a/src/main/java/com/merge/api/filestorage/AsyncRawAuditTrailClient.java +++ b/src/main/java/com/merge/api/filestorage/AsyncRawAuditTrailClient.java @@ -57,7 +57,7 @@ public CompletableFuture> */ public CompletableFuture>> list( AuditTrailListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/audit-trail"); if (request.getCursor().isPresent()) { diff --git a/src/main/java/com/merge/api/filestorage/AsyncRawAvailableActionsClient.java b/src/main/java/com/merge/api/filestorage/AsyncRawAvailableActionsClient.java index 098630669..17f8b92f4 100644 --- a/src/main/java/com/merge/api/filestorage/AsyncRawAvailableActionsClient.java +++ b/src/main/java/com/merge/api/filestorage/AsyncRawAvailableActionsClient.java @@ -40,7 +40,7 @@ public CompletableFuture> retrieve() { * Returns a list of models and actions available for an account. */ public CompletableFuture> retrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/available-actions") .build(); diff --git a/src/main/java/com/merge/api/filestorage/AsyncRawDeleteAccountClient.java b/src/main/java/com/merge/api/filestorage/AsyncRawDeleteAccountClient.java index 919c58759..bc1c5c40d 100644 --- a/src/main/java/com/merge/api/filestorage/AsyncRawDeleteAccountClient.java +++ b/src/main/java/com/merge/api/filestorage/AsyncRawDeleteAccountClient.java @@ -40,7 +40,7 @@ public CompletableFuture> delete() { * Delete a linked account. */ public CompletableFuture> delete(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/delete-account") .build(); diff --git a/src/main/java/com/merge/api/filestorage/AsyncRawDrivesClient.java b/src/main/java/com/merge/api/filestorage/AsyncRawDrivesClient.java index fcab5d3c0..01d7fefa4 100644 --- a/src/main/java/com/merge/api/filestorage/AsyncRawDrivesClient.java +++ b/src/main/java/com/merge/api/filestorage/AsyncRawDrivesClient.java @@ -57,7 +57,7 @@ public CompletableFuture>> list(D */ public CompletableFuture>> list( DrivesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/drives"); if (request.getCreatedAfter().isPresent()) { @@ -193,7 +193,7 @@ public CompletableFuture> retrieve(String id, Drives */ public CompletableFuture> retrieve( String id, DrivesRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/drives") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/filestorage/AsyncRawFieldMappingClient.java b/src/main/java/com/merge/api/filestorage/AsyncRawFieldMappingClient.java index fb98913b3..3e1d9457e 100644 --- a/src/main/java/com/merge/api/filestorage/AsyncRawFieldMappingClient.java +++ b/src/main/java/com/merge/api/filestorage/AsyncRawFieldMappingClient.java @@ -62,7 +62,7 @@ public CompletableFuture> */ public CompletableFuture> fieldMappingsRetrieve( FieldMappingsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/field-mappings"); if (request.getExcludeRemoteFieldMetadata().isPresent()) { @@ -128,7 +128,7 @@ public CompletableFuture> fie */ public CompletableFuture> fieldMappingsCreate( CreateFieldMappingRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/field-mappings"); if (request.getExcludeRemoteFieldMetadata().isPresent()) { @@ -208,7 +208,7 @@ public CompletableFuture> fie */ public CompletableFuture> fieldMappingsDestroy( String fieldMappingId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/field-mappings") .addPathSegment(fieldMappingId) @@ -278,7 +278,7 @@ public CompletableFuture> fie */ public CompletableFuture> fieldMappingsPartialUpdate( String fieldMappingId, PatchedEditFieldMappingRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/field-mappings") .addPathSegment(fieldMappingId) @@ -353,7 +353,7 @@ public CompletableFuture> remoteFie */ public CompletableFuture> remoteFieldsRetrieve( RemoteFieldsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/remote-fields"); if (request.getCommonModels().isPresent()) { @@ -422,7 +422,7 @@ public CompletableFuture> t */ public CompletableFuture> targetFieldsRetrieve( RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/target-fields") .build(); diff --git a/src/main/java/com/merge/api/filestorage/AsyncRawFilesClient.java b/src/main/java/com/merge/api/filestorage/AsyncRawFilesClient.java index 87f3c91a3..153000623 100644 --- a/src/main/java/com/merge/api/filestorage/AsyncRawFilesClient.java +++ b/src/main/java/com/merge/api/filestorage/AsyncRawFilesClient.java @@ -71,7 +71,7 @@ public CompletableFuture>> list(Fi */ public CompletableFuture>> list( FilesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/files"); if (request.getCreatedAfter().isPresent()) { @@ -134,6 +134,10 @@ public CompletableFuture>> list( QueryStringMapper.addQueryParameter( httpUrl, "name", request.getName().get(), false); } + if (request.getOrderBy().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "order_by", request.getOrderBy().get().toString(), false); + } if (request.getPageSize().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "page_size", request.getPageSize().get().toString(), false); @@ -217,7 +221,7 @@ public CompletableFuture> create( */ public CompletableFuture> create( FileStorageFileEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/files"); if (request.getIsDebugMode().isPresent()) { @@ -299,7 +303,7 @@ public CompletableFuture> retrieve(String id, FilesRe */ public CompletableFuture> retrieve( String id, FilesRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/files") .addPathSegment(id); @@ -382,7 +386,7 @@ public CompletableFuture> downloadRetrieve( */ public CompletableFuture> downloadRetrieve( String id, FilesDownloadRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/files") .addPathSegment(id) @@ -459,7 +463,7 @@ public CompletableFuture> downloadRequ */ public CompletableFuture> downloadRequestMetaRetrieve( String id, FilesDownloadRequestMetaRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/files") .addPathSegment(id) @@ -531,9 +535,17 @@ public CompletableFuture>> downloadRequestMetaList( FilesDownloadRequestMetaListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/files/download/request-meta"); + if (request.getCreatedAfter().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "created_after", request.getCreatedAfter().get(), false); + } + if (request.getCreatedBefore().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "created_before", request.getCreatedBefore().get(), false); + } if (request.getCursor().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "cursor", request.getCursor().get(), false); @@ -545,9 +557,21 @@ public CompletableFuture> metaPostRetrieve() * Returns metadata for FileStorageFile POSTs. */ public CompletableFuture> metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/files/meta/post") .build(); diff --git a/src/main/java/com/merge/api/filestorage/AsyncRawFoldersClient.java b/src/main/java/com/merge/api/filestorage/AsyncRawFoldersClient.java index f23f6a26f..b9d2347a2 100644 --- a/src/main/java/com/merge/api/filestorage/AsyncRawFoldersClient.java +++ b/src/main/java/com/merge/api/filestorage/AsyncRawFoldersClient.java @@ -64,7 +64,7 @@ public CompletableFuture>> list( */ public CompletableFuture>> list( FoldersListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/folders"); if (request.getCreatedAfter().isPresent()) { @@ -206,7 +206,7 @@ public CompletableFuture> create */ public CompletableFuture> create( FileStorageFolderEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/folders"); if (request.getIsDebugMode().isPresent()) { @@ -288,7 +288,7 @@ public CompletableFuture> retrieve(String id, Folde */ public CompletableFuture> retrieve( String id, FoldersRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/folders") .addPathSegment(id); @@ -362,7 +362,7 @@ public CompletableFuture> metaPostRetrieve() * Returns metadata for FileStorageFolder POSTs. */ public CompletableFuture> metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/folders/meta/post") .build(); diff --git a/src/main/java/com/merge/api/filestorage/AsyncRawForceResyncClient.java b/src/main/java/com/merge/api/filestorage/AsyncRawForceResyncClient.java index 764b8a3b3..debbd8a0a 100644 --- a/src/main/java/com/merge/api/filestorage/AsyncRawForceResyncClient.java +++ b/src/main/java/com/merge/api/filestorage/AsyncRawForceResyncClient.java @@ -44,7 +44,7 @@ public CompletableFuture>> syncStatusResyn */ public CompletableFuture>> syncStatusResyncCreate( RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/sync-status/resync") .build(); diff --git a/src/main/java/com/merge/api/filestorage/AsyncRawGenerateKeyClient.java b/src/main/java/com/merge/api/filestorage/AsyncRawGenerateKeyClient.java index e789b0ad1..41672596f 100644 --- a/src/main/java/com/merge/api/filestorage/AsyncRawGenerateKeyClient.java +++ b/src/main/java/com/merge/api/filestorage/AsyncRawGenerateKeyClient.java @@ -45,7 +45,7 @@ public CompletableFuture> create(GenerateRemoteK */ public CompletableFuture> create( GenerateRemoteKeyRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/generate-key") .build(); diff --git a/src/main/java/com/merge/api/filestorage/AsyncRawGroupsClient.java b/src/main/java/com/merge/api/filestorage/AsyncRawGroupsClient.java index 6af8bfb24..577454dbf 100644 --- a/src/main/java/com/merge/api/filestorage/AsyncRawGroupsClient.java +++ b/src/main/java/com/merge/api/filestorage/AsyncRawGroupsClient.java @@ -57,7 +57,7 @@ public CompletableFuture>> list(G */ public CompletableFuture>> list( GroupsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/groups"); if (request.getCreatedAfter().isPresent()) { @@ -193,7 +193,7 @@ public CompletableFuture> retrieve(String id, Groups */ public CompletableFuture> retrieve( String id, GroupsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/groups") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/filestorage/AsyncRawIssuesClient.java b/src/main/java/com/merge/api/filestorage/AsyncRawIssuesClient.java index eb66b97ac..68baf5cf8 100644 --- a/src/main/java/com/merge/api/filestorage/AsyncRawIssuesClient.java +++ b/src/main/java/com/merge/api/filestorage/AsyncRawIssuesClient.java @@ -56,7 +56,7 @@ public CompletableFuture>> list(I */ public CompletableFuture>> list( IssuesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/issues"); if (request.getAccountToken().isPresent()) { @@ -199,7 +199,7 @@ public CompletableFuture> retrieve(String id) { * Get a specific issue. */ public CompletableFuture> retrieve(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/issues") .addPathSegment(id) diff --git a/src/main/java/com/merge/api/filestorage/AsyncRawLinkTokenClient.java b/src/main/java/com/merge/api/filestorage/AsyncRawLinkTokenClient.java index 1508a124d..f8c724952 100644 --- a/src/main/java/com/merge/api/filestorage/AsyncRawLinkTokenClient.java +++ b/src/main/java/com/merge/api/filestorage/AsyncRawLinkTokenClient.java @@ -45,7 +45,7 @@ public CompletableFuture> create(EndUserDetailsR */ public CompletableFuture> create( EndUserDetailsRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/link-token") .build(); diff --git a/src/main/java/com/merge/api/filestorage/AsyncRawLinkedAccountsClient.java b/src/main/java/com/merge/api/filestorage/AsyncRawLinkedAccountsClient.java index c2c8638b5..ef0115922 100644 --- a/src/main/java/com/merge/api/filestorage/AsyncRawLinkedAccountsClient.java +++ b/src/main/java/com/merge/api/filestorage/AsyncRawLinkedAccountsClient.java @@ -57,7 +57,7 @@ public CompletableFuture>> list( LinkedAccountsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/linked-accounts"); if (request.getCategory().isPresent()) { diff --git a/src/main/java/com/merge/api/filestorage/AsyncRawPassthroughClient.java b/src/main/java/com/merge/api/filestorage/AsyncRawPassthroughClient.java index 10cd403a3..f7f1e8d76 100644 --- a/src/main/java/com/merge/api/filestorage/AsyncRawPassthroughClient.java +++ b/src/main/java/com/merge/api/filestorage/AsyncRawPassthroughClient.java @@ -45,7 +45,7 @@ public CompletableFuture> create(DataPassth */ public CompletableFuture> create( DataPassthroughRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/passthrough") .build(); diff --git a/src/main/java/com/merge/api/filestorage/AsyncRawRegenerateKeyClient.java b/src/main/java/com/merge/api/filestorage/AsyncRawRegenerateKeyClient.java index 942d9df97..8966768a8 100644 --- a/src/main/java/com/merge/api/filestorage/AsyncRawRegenerateKeyClient.java +++ b/src/main/java/com/merge/api/filestorage/AsyncRawRegenerateKeyClient.java @@ -45,7 +45,7 @@ public CompletableFuture> create(RemoteKeyForReg */ public CompletableFuture> create( RemoteKeyForRegenerationRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/regenerate-key") .build(); diff --git a/src/main/java/com/merge/api/filestorage/AsyncRawScopesClient.java b/src/main/java/com/merge/api/filestorage/AsyncRawScopesClient.java index e2c51e5a6..326700b52 100644 --- a/src/main/java/com/merge/api/filestorage/AsyncRawScopesClient.java +++ b/src/main/java/com/merge/api/filestorage/AsyncRawScopesClient.java @@ -45,7 +45,7 @@ public CompletableFuture> defaultScope */ public CompletableFuture> defaultScopesRetrieve( RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/default-scopes") .build(); @@ -103,7 +103,7 @@ public CompletableFuture> linkedAccoun */ public CompletableFuture> linkedAccountScopesRetrieve( RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/linked-account-scopes") .build(); @@ -162,7 +162,7 @@ public CompletableFuture> linkedAccoun */ public CompletableFuture> linkedAccountScopesCreate( LinkedAccountCommonModelScopeDeserializerRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/linked-account-scopes") .build(); diff --git a/src/main/java/com/merge/api/filestorage/AsyncRawSyncStatusClient.java b/src/main/java/com/merge/api/filestorage/AsyncRawSyncStatusClient.java index 2edbe952d..78b503328 100644 --- a/src/main/java/com/merge/api/filestorage/AsyncRawSyncStatusClient.java +++ b/src/main/java/com/merge/api/filestorage/AsyncRawSyncStatusClient.java @@ -38,25 +38,25 @@ public AsyncRawSyncStatusClient(ClientOptions clientOptions) { } /** - * Get syncing status. Possible values: DISABLED, DONE, FAILED, PARTIALLY_SYNCED, PAUSED, SYNCING. Learn more about sync status in our Help Center. + * 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. */ public CompletableFuture>> list() { return list(SyncStatusListRequest.builder().build()); } /** - * Get syncing status. Possible values: DISABLED, DONE, FAILED, PARTIALLY_SYNCED, PAUSED, SYNCING. Learn more about sync status in our Help Center. + * 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. */ public CompletableFuture>> list(SyncStatusListRequest request) { return list(request, null); } /** - * Get syncing status. Possible values: DISABLED, DONE, FAILED, PARTIALLY_SYNCED, PAUSED, SYNCING. Learn more about sync status in our Help Center. + * 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. */ public CompletableFuture>> list( SyncStatusListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/sync-status"); if (request.getCursor().isPresent()) { diff --git a/src/main/java/com/merge/api/filestorage/AsyncRawUsersClient.java b/src/main/java/com/merge/api/filestorage/AsyncRawUsersClient.java index 03438cb24..05f7cf3b4 100644 --- a/src/main/java/com/merge/api/filestorage/AsyncRawUsersClient.java +++ b/src/main/java/com/merge/api/filestorage/AsyncRawUsersClient.java @@ -57,7 +57,7 @@ public CompletableFuture>> list(Us */ public CompletableFuture>> list( UsersListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/users"); if (request.getCreatedAfter().isPresent()) { @@ -193,7 +193,7 @@ public CompletableFuture> retrieve(String id, UsersRe */ public CompletableFuture> retrieve( String id, UsersRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/users") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/filestorage/AsyncRawWebhookReceiversClient.java b/src/main/java/com/merge/api/filestorage/AsyncRawWebhookReceiversClient.java index c453e0167..014d07f26 100644 --- a/src/main/java/com/merge/api/filestorage/AsyncRawWebhookReceiversClient.java +++ b/src/main/java/com/merge/api/filestorage/AsyncRawWebhookReceiversClient.java @@ -46,7 +46,7 @@ public CompletableFuture>> list() { * Returns a list of WebhookReceiver objects. */ public CompletableFuture>> list(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/webhook-receivers") .build(); @@ -105,7 +105,7 @@ public CompletableFuture> create(WebhookRe */ public CompletableFuture> create( WebhookReceiverRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/webhook-receivers") .build(); diff --git a/src/main/java/com/merge/api/filestorage/AsyncSyncStatusClient.java b/src/main/java/com/merge/api/filestorage/AsyncSyncStatusClient.java index 3d8edec01..710d6e8f2 100644 --- a/src/main/java/com/merge/api/filestorage/AsyncSyncStatusClient.java +++ b/src/main/java/com/merge/api/filestorage/AsyncSyncStatusClient.java @@ -28,21 +28,21 @@ public AsyncRawSyncStatusClient withRawResponse() { } /** - * Get syncing status. Possible values: DISABLED, DONE, FAILED, PARTIALLY_SYNCED, PAUSED, SYNCING. Learn more about sync status in our Help Center. + * 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. */ public CompletableFuture> list() { return this.rawClient.list().thenApply(response -> response.body()); } /** - * Get syncing status. Possible values: DISABLED, DONE, FAILED, PARTIALLY_SYNCED, PAUSED, SYNCING. Learn more about sync status in our Help Center. + * 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. */ public CompletableFuture> list(SyncStatusListRequest request) { return this.rawClient.list(request).thenApply(response -> response.body()); } /** - * Get syncing status. Possible values: DISABLED, DONE, FAILED, PARTIALLY_SYNCED, PAUSED, SYNCING. Learn more about sync status in our Help Center. + * 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. */ public CompletableFuture> list( SyncStatusListRequest request, RequestOptions requestOptions) { diff --git a/src/main/java/com/merge/api/filestorage/RawAccountDetailsClient.java b/src/main/java/com/merge/api/filestorage/RawAccountDetailsClient.java index 90337d284..941c7cc8b 100644 --- a/src/main/java/com/merge/api/filestorage/RawAccountDetailsClient.java +++ b/src/main/java/com/merge/api/filestorage/RawAccountDetailsClient.java @@ -36,7 +36,7 @@ public MergeApiHttpResponse retrieve() { * Get details for a linked account. */ public MergeApiHttpResponse retrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/account-details") .build(); diff --git a/src/main/java/com/merge/api/filestorage/RawAccountTokenClient.java b/src/main/java/com/merge/api/filestorage/RawAccountTokenClient.java index 01f2c2e17..7e9dfc89d 100644 --- a/src/main/java/com/merge/api/filestorage/RawAccountTokenClient.java +++ b/src/main/java/com/merge/api/filestorage/RawAccountTokenClient.java @@ -36,7 +36,7 @@ public MergeApiHttpResponse retrieve(String publicToken) { * Returns the account token for the end user with the provided public token. */ public MergeApiHttpResponse retrieve(String publicToken, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/account-token") .addPathSegment(publicToken) diff --git a/src/main/java/com/merge/api/filestorage/RawAsyncPassthroughClient.java b/src/main/java/com/merge/api/filestorage/RawAsyncPassthroughClient.java index d80f4f4a5..e700f3afe 100644 --- a/src/main/java/com/merge/api/filestorage/RawAsyncPassthroughClient.java +++ b/src/main/java/com/merge/api/filestorage/RawAsyncPassthroughClient.java @@ -42,7 +42,7 @@ public MergeApiHttpResponse create(DataPassthroughReque */ public MergeApiHttpResponse create( DataPassthroughRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/async-passthrough") .build(); @@ -94,7 +94,7 @@ public MergeApiHttpResponse retrieve(String as */ public MergeApiHttpResponse retrieve( String asyncPassthroughReceiptId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/async-passthrough") .addPathSegment(asyncPassthroughReceiptId) diff --git a/src/main/java/com/merge/api/filestorage/RawAuditTrailClient.java b/src/main/java/com/merge/api/filestorage/RawAuditTrailClient.java index 03ac510b9..59c3b1118 100644 --- a/src/main/java/com/merge/api/filestorage/RawAuditTrailClient.java +++ b/src/main/java/com/merge/api/filestorage/RawAuditTrailClient.java @@ -51,7 +51,7 @@ public MergeApiHttpResponse> list(AuditTrailLi */ public MergeApiHttpResponse> list( AuditTrailListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/audit-trail"); if (request.getCursor().isPresent()) { diff --git a/src/main/java/com/merge/api/filestorage/RawAvailableActionsClient.java b/src/main/java/com/merge/api/filestorage/RawAvailableActionsClient.java index eaa274ab5..6fb2bb755 100644 --- a/src/main/java/com/merge/api/filestorage/RawAvailableActionsClient.java +++ b/src/main/java/com/merge/api/filestorage/RawAvailableActionsClient.java @@ -36,7 +36,7 @@ public MergeApiHttpResponse retrieve() { * Returns a list of models and actions available for an account. */ public MergeApiHttpResponse retrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/available-actions") .build(); diff --git a/src/main/java/com/merge/api/filestorage/RawDeleteAccountClient.java b/src/main/java/com/merge/api/filestorage/RawDeleteAccountClient.java index 559ab00ee..81a474def 100644 --- a/src/main/java/com/merge/api/filestorage/RawDeleteAccountClient.java +++ b/src/main/java/com/merge/api/filestorage/RawDeleteAccountClient.java @@ -36,7 +36,7 @@ public MergeApiHttpResponse delete() { * Delete a linked account. */ public MergeApiHttpResponse delete(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/delete-account") .build(); diff --git a/src/main/java/com/merge/api/filestorage/RawDrivesClient.java b/src/main/java/com/merge/api/filestorage/RawDrivesClient.java index e50bfd03f..6fae567b0 100644 --- a/src/main/java/com/merge/api/filestorage/RawDrivesClient.java +++ b/src/main/java/com/merge/api/filestorage/RawDrivesClient.java @@ -52,7 +52,7 @@ public MergeApiHttpResponse> list(DrivesListRequest re */ public MergeApiHttpResponse> list( DrivesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/drives"); if (request.getCreatedAfter().isPresent()) { @@ -169,7 +169,7 @@ public MergeApiHttpResponse retrieve(String id, DrivesRetrieveRequest req */ public MergeApiHttpResponse retrieve( String id, DrivesRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/drives") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/filestorage/RawFieldMappingClient.java b/src/main/java/com/merge/api/filestorage/RawFieldMappingClient.java index 46d8e276e..10ab17771 100644 --- a/src/main/java/com/merge/api/filestorage/RawFieldMappingClient.java +++ b/src/main/java/com/merge/api/filestorage/RawFieldMappingClient.java @@ -58,7 +58,7 @@ public MergeApiHttpResponse fieldMappingsRetrie */ public MergeApiHttpResponse fieldMappingsRetrieve( FieldMappingsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/field-mappings"); if (request.getExcludeRemoteFieldMetadata().isPresent()) { @@ -110,7 +110,7 @@ public MergeApiHttpResponse fieldMappingsCreate(Cr */ public MergeApiHttpResponse fieldMappingsCreate( CreateFieldMappingRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/field-mappings"); if (request.getExcludeRemoteFieldMetadata().isPresent()) { @@ -175,7 +175,7 @@ public MergeApiHttpResponse fieldMappingsDestroy(S */ public MergeApiHttpResponse fieldMappingsDestroy( String fieldMappingId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/field-mappings") .addPathSegment(fieldMappingId) @@ -230,7 +230,7 @@ public MergeApiHttpResponse fieldMappingsPartialUp */ public MergeApiHttpResponse fieldMappingsPartialUpdate( String fieldMappingId, PatchedEditFieldMappingRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/field-mappings") .addPathSegment(fieldMappingId) @@ -290,7 +290,7 @@ public MergeApiHttpResponse remoteFieldsRetrieve(RemoteF */ public MergeApiHttpResponse remoteFieldsRetrieve( RemoteFieldsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/remote-fields"); if (request.getCommonModels().isPresent()) { @@ -344,7 +344,7 @@ public MergeApiHttpResponse targetFieldsRetrieve * 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. */ public MergeApiHttpResponse targetFieldsRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/target-fields") .build(); diff --git a/src/main/java/com/merge/api/filestorage/RawFilesClient.java b/src/main/java/com/merge/api/filestorage/RawFilesClient.java index 5a876094e..93f4681d3 100644 --- a/src/main/java/com/merge/api/filestorage/RawFilesClient.java +++ b/src/main/java/com/merge/api/filestorage/RawFilesClient.java @@ -66,7 +66,7 @@ public MergeApiHttpResponse> list(FilesListRequest requ */ public MergeApiHttpResponse> list( FilesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/files"); if (request.getCreatedAfter().isPresent()) { @@ -129,6 +129,10 @@ public MergeApiHttpResponse> list( QueryStringMapper.addQueryParameter( httpUrl, "name", request.getName().get(), false); } + if (request.getOrderBy().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "order_by", request.getOrderBy().get().toString(), false); + } if (request.getPageSize().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "page_size", request.getPageSize().get().toString(), false); @@ -192,7 +196,7 @@ public MergeApiHttpResponse create(FileStorageFileEndpo */ public MergeApiHttpResponse create( FileStorageFileEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/files"); if (request.getIsDebugMode().isPresent()) { @@ -259,7 +263,7 @@ public MergeApiHttpResponse retrieve(String id, FilesRetrieveRequest reque * Returns a File object with the given id. */ public MergeApiHttpResponse retrieve(String id, FilesRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/files") .addPathSegment(id); @@ -328,7 +332,7 @@ public MergeApiHttpResponse downloadRetrieve(String id, FilesDownlo */ public MergeApiHttpResponse downloadRetrieve( String id, FilesDownloadRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/files") .addPathSegment(id) @@ -392,7 +396,7 @@ public MergeApiHttpResponse downloadRequestMetaRetrieve( */ public MergeApiHttpResponse downloadRequestMetaRetrieve( String id, FilesDownloadRequestMetaRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/files") .addPathSegment(id) @@ -451,9 +455,17 @@ public MergeApiHttpResponse> downloadReq */ public MergeApiHttpResponse> downloadRequestMetaList( FilesDownloadRequestMetaListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/files/download/request-meta"); + if (request.getCreatedAfter().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "created_after", request.getCreatedAfter().get(), false); + } + if (request.getCreatedBefore().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "created_before", request.getCreatedBefore().get(), false); + } if (request.getCursor().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "cursor", request.getCursor().get(), false); @@ -465,9 +477,21 @@ public MergeApiHttpResponse> downloadReq request.getIncludeDeletedData().get().toString(), false); } - if (request.getMimeType().isPresent()) { + if (request.getMimeTypes().isPresent()) { QueryStringMapper.addQueryParameter( - httpUrl, "mime_type", request.getMimeType().get(), false); + httpUrl, "mime_types", request.getMimeTypes().get(), false); + } + if (request.getModifiedAfter().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "modified_after", request.getModifiedAfter().get(), false); + } + if (request.getModifiedBefore().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "modified_before", request.getModifiedBefore().get(), false); + } + if (request.getOrderBy().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "order_by", request.getOrderBy().get().toString(), false); } if (request.getPageSize().isPresent()) { QueryStringMapper.addQueryParameter( @@ -524,7 +548,7 @@ public MergeApiHttpResponse metaPostRetrieve() { * Returns metadata for FileStorageFile POSTs. */ public MergeApiHttpResponse metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/files/meta/post") .build(); diff --git a/src/main/java/com/merge/api/filestorage/RawFoldersClient.java b/src/main/java/com/merge/api/filestorage/RawFoldersClient.java index ddfaa9f29..c65476b78 100644 --- a/src/main/java/com/merge/api/filestorage/RawFoldersClient.java +++ b/src/main/java/com/merge/api/filestorage/RawFoldersClient.java @@ -59,7 +59,7 @@ public MergeApiHttpResponse> list(FoldersListRequest */ public MergeApiHttpResponse> list( FoldersListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/folders"); if (request.getCreatedAfter().isPresent()) { @@ -181,7 +181,7 @@ public MergeApiHttpResponse create(FileStorageFolderE */ public MergeApiHttpResponse create( FileStorageFolderEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/folders"); if (request.getIsDebugMode().isPresent()) { @@ -249,7 +249,7 @@ public MergeApiHttpResponse retrieve(String id, FoldersRetrieveRequest r */ public MergeApiHttpResponse retrieve( String id, FoldersRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/folders") .addPathSegment(id); @@ -310,7 +310,7 @@ public MergeApiHttpResponse metaPostRetrieve() { * Returns metadata for FileStorageFolder POSTs. */ public MergeApiHttpResponse metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/folders/meta/post") .build(); diff --git a/src/main/java/com/merge/api/filestorage/RawForceResyncClient.java b/src/main/java/com/merge/api/filestorage/RawForceResyncClient.java index 781e7c3c9..19bbeba7c 100644 --- a/src/main/java/com/merge/api/filestorage/RawForceResyncClient.java +++ b/src/main/java/com/merge/api/filestorage/RawForceResyncClient.java @@ -39,7 +39,7 @@ public MergeApiHttpResponse> syncStatusResyncCreate() { * 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. */ public MergeApiHttpResponse> syncStatusResyncCreate(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/sync-status/resync") .build(); diff --git a/src/main/java/com/merge/api/filestorage/RawGenerateKeyClient.java b/src/main/java/com/merge/api/filestorage/RawGenerateKeyClient.java index 37becfccd..77177871f 100644 --- a/src/main/java/com/merge/api/filestorage/RawGenerateKeyClient.java +++ b/src/main/java/com/merge/api/filestorage/RawGenerateKeyClient.java @@ -40,7 +40,7 @@ public MergeApiHttpResponse create(GenerateRemoteKeyRequest request) * Create a remote key. */ public MergeApiHttpResponse create(GenerateRemoteKeyRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/generate-key") .build(); diff --git a/src/main/java/com/merge/api/filestorage/RawGroupsClient.java b/src/main/java/com/merge/api/filestorage/RawGroupsClient.java index 6f40b5ce8..f3b89e3f5 100644 --- a/src/main/java/com/merge/api/filestorage/RawGroupsClient.java +++ b/src/main/java/com/merge/api/filestorage/RawGroupsClient.java @@ -52,7 +52,7 @@ public MergeApiHttpResponse> list(GroupsListRequest re */ public MergeApiHttpResponse> list( GroupsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/groups"); if (request.getCreatedAfter().isPresent()) { @@ -169,7 +169,7 @@ public MergeApiHttpResponse retrieve(String id, GroupsRetrieveRequest req */ public MergeApiHttpResponse retrieve( String id, GroupsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/groups") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/filestorage/RawIssuesClient.java b/src/main/java/com/merge/api/filestorage/RawIssuesClient.java index 84000cc76..34be61618 100644 --- a/src/main/java/com/merge/api/filestorage/RawIssuesClient.java +++ b/src/main/java/com/merge/api/filestorage/RawIssuesClient.java @@ -51,7 +51,7 @@ public MergeApiHttpResponse> list(IssuesListRequest re */ public MergeApiHttpResponse> list( IssuesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/issues"); if (request.getAccountToken().isPresent()) { @@ -175,7 +175,7 @@ public MergeApiHttpResponse retrieve(String id) { * Get a specific issue. */ public MergeApiHttpResponse retrieve(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/issues") .addPathSegment(id) diff --git a/src/main/java/com/merge/api/filestorage/RawLinkTokenClient.java b/src/main/java/com/merge/api/filestorage/RawLinkTokenClient.java index 00c042dab..b7de7f977 100644 --- a/src/main/java/com/merge/api/filestorage/RawLinkTokenClient.java +++ b/src/main/java/com/merge/api/filestorage/RawLinkTokenClient.java @@ -40,7 +40,7 @@ public MergeApiHttpResponse create(EndUserDetailsRequest request) { * Creates a link token to be used when linking a new end user. */ public MergeApiHttpResponse create(EndUserDetailsRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/link-token") .build(); diff --git a/src/main/java/com/merge/api/filestorage/RawLinkedAccountsClient.java b/src/main/java/com/merge/api/filestorage/RawLinkedAccountsClient.java index 07e91c436..1b99a853c 100644 --- a/src/main/java/com/merge/api/filestorage/RawLinkedAccountsClient.java +++ b/src/main/java/com/merge/api/filestorage/RawLinkedAccountsClient.java @@ -51,7 +51,7 @@ public MergeApiHttpResponse> list(L */ public MergeApiHttpResponse> list( LinkedAccountsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/linked-accounts"); if (request.getCategory().isPresent()) { diff --git a/src/main/java/com/merge/api/filestorage/RawPassthroughClient.java b/src/main/java/com/merge/api/filestorage/RawPassthroughClient.java index 8017aa2d9..eb81ed2e8 100644 --- a/src/main/java/com/merge/api/filestorage/RawPassthroughClient.java +++ b/src/main/java/com/merge/api/filestorage/RawPassthroughClient.java @@ -40,7 +40,7 @@ public MergeApiHttpResponse create(DataPassthroughRequest reques * Pull data from an endpoint not currently supported by Merge. */ public MergeApiHttpResponse create(DataPassthroughRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/passthrough") .build(); diff --git a/src/main/java/com/merge/api/filestorage/RawRegenerateKeyClient.java b/src/main/java/com/merge/api/filestorage/RawRegenerateKeyClient.java index 83c2d4ec4..11ffdab5f 100644 --- a/src/main/java/com/merge/api/filestorage/RawRegenerateKeyClient.java +++ b/src/main/java/com/merge/api/filestorage/RawRegenerateKeyClient.java @@ -41,7 +41,7 @@ public MergeApiHttpResponse create(RemoteKeyForRegenerationRequest re */ public MergeApiHttpResponse create( RemoteKeyForRegenerationRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/regenerate-key") .build(); diff --git a/src/main/java/com/merge/api/filestorage/RawScopesClient.java b/src/main/java/com/merge/api/filestorage/RawScopesClient.java index 39e1fc763..9988d6b56 100644 --- a/src/main/java/com/merge/api/filestorage/RawScopesClient.java +++ b/src/main/java/com/merge/api/filestorage/RawScopesClient.java @@ -40,7 +40,7 @@ public MergeApiHttpResponse defaultScopesRetrieve() { * Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. Learn more. */ public MergeApiHttpResponse defaultScopesRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/default-scopes") .build(); @@ -84,7 +84,7 @@ public MergeApiHttpResponse linkedAccountScopesRetrieve() { * Get all available permissions for Merge Common Models and fields for a single Linked Account. Learn more. */ public MergeApiHttpResponse linkedAccountScopesRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/linked-account-scopes") .build(); @@ -130,7 +130,7 @@ public MergeApiHttpResponse linkedAccountScopesCreate( */ public MergeApiHttpResponse linkedAccountScopesCreate( LinkedAccountCommonModelScopeDeserializerRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/linked-account-scopes") .build(); diff --git a/src/main/java/com/merge/api/filestorage/RawSyncStatusClient.java b/src/main/java/com/merge/api/filestorage/RawSyncStatusClient.java index 236a380b5..be05175a3 100644 --- a/src/main/java/com/merge/api/filestorage/RawSyncStatusClient.java +++ b/src/main/java/com/merge/api/filestorage/RawSyncStatusClient.java @@ -33,25 +33,25 @@ public RawSyncStatusClient(ClientOptions clientOptions) { } /** - * Get syncing status. Possible values: DISABLED, DONE, FAILED, PARTIALLY_SYNCED, PAUSED, SYNCING. Learn more about sync status in our Help Center. + * 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. */ public MergeApiHttpResponse> list() { return list(SyncStatusListRequest.builder().build()); } /** - * Get syncing status. Possible values: DISABLED, DONE, FAILED, PARTIALLY_SYNCED, PAUSED, SYNCING. Learn more about sync status in our Help Center. + * 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. */ public MergeApiHttpResponse> list(SyncStatusListRequest request) { return list(request, null); } /** - * Get syncing status. Possible values: DISABLED, DONE, FAILED, PARTIALLY_SYNCED, PAUSED, SYNCING. Learn more about sync status in our Help Center. + * 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. */ public MergeApiHttpResponse> list( SyncStatusListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/sync-status"); if (request.getCursor().isPresent()) { diff --git a/src/main/java/com/merge/api/filestorage/RawUsersClient.java b/src/main/java/com/merge/api/filestorage/RawUsersClient.java index 2efb17299..66e62dd79 100644 --- a/src/main/java/com/merge/api/filestorage/RawUsersClient.java +++ b/src/main/java/com/merge/api/filestorage/RawUsersClient.java @@ -52,7 +52,7 @@ public MergeApiHttpResponse> list(UsersListRequest requ */ public MergeApiHttpResponse> list( UsersListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/users"); if (request.getCreatedAfter().isPresent()) { @@ -168,7 +168,7 @@ public MergeApiHttpResponse retrieve(String id, UsersRetrieveRequest reque * Returns a User object with the given id. */ public MergeApiHttpResponse retrieve(String id, UsersRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/users") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/filestorage/RawWebhookReceiversClient.java b/src/main/java/com/merge/api/filestorage/RawWebhookReceiversClient.java index 127b9fbd1..598391364 100644 --- a/src/main/java/com/merge/api/filestorage/RawWebhookReceiversClient.java +++ b/src/main/java/com/merge/api/filestorage/RawWebhookReceiversClient.java @@ -42,7 +42,7 @@ public MergeApiHttpResponse> list() { * Returns a list of WebhookReceiver objects. */ public MergeApiHttpResponse> list(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/webhook-receivers") .build(); @@ -87,7 +87,7 @@ public MergeApiHttpResponse create(WebhookReceiverRequest reque * Creates a WebhookReceiver object with the given values. */ public MergeApiHttpResponse create(WebhookReceiverRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("filestorage/v1/webhook-receivers") .build(); diff --git a/src/main/java/com/merge/api/filestorage/SyncStatusClient.java b/src/main/java/com/merge/api/filestorage/SyncStatusClient.java index c14d663b5..3e7be8300 100644 --- a/src/main/java/com/merge/api/filestorage/SyncStatusClient.java +++ b/src/main/java/com/merge/api/filestorage/SyncStatusClient.java @@ -27,21 +27,21 @@ public RawSyncStatusClient withRawResponse() { } /** - * Get syncing status. Possible values: DISABLED, DONE, FAILED, PARTIALLY_SYNCED, PAUSED, SYNCING. Learn more about sync status in our Help Center. + * 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. */ public SyncPagingIterable list() { return this.rawClient.list().body(); } /** - * Get syncing status. Possible values: DISABLED, DONE, FAILED, PARTIALLY_SYNCED, PAUSED, SYNCING. Learn more about sync status in our Help Center. + * 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. */ public SyncPagingIterable list(SyncStatusListRequest request) { return this.rawClient.list(request).body(); } /** - * Get syncing status. Possible values: DISABLED, DONE, FAILED, PARTIALLY_SYNCED, PAUSED, SYNCING. Learn more about sync status in our Help Center. + * 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. */ public SyncPagingIterable list(SyncStatusListRequest request, RequestOptions requestOptions) { return this.rawClient.list(request, requestOptions).body(); diff --git a/src/main/java/com/merge/api/filestorage/types/AccountDetails.java b/src/main/java/com/merge/api/filestorage/types/AccountDetails.java index d27529e08..683841fde 100644 --- a/src/main/java/com/merge/api/filestorage/types/AccountDetails.java +++ b/src/main/java/com/merge/api/filestorage/types/AccountDetails.java @@ -27,7 +27,7 @@ public final class AccountDetails { private final Optional integrationSlug; - private final Optional category; + private final Optional category; private final Optional endUserOriginId; @@ -51,7 +51,7 @@ private AccountDetails( Optional id, Optional integration, Optional integrationSlug, - Optional category, + Optional category, Optional endUserOriginId, Optional endUserOrganizationName, Optional endUserEmailAddress, @@ -92,7 +92,7 @@ public Optional getIntegrationSlug() { } @JsonProperty("category") - public Optional getCategory() { + public Optional getCategory() { return category; } @@ -202,7 +202,7 @@ public static final class Builder { private Optional integrationSlug = Optional.empty(); - private Optional category = Optional.empty(); + private Optional category = Optional.empty(); private Optional endUserOriginId = Optional.empty(); @@ -275,12 +275,12 @@ public Builder integrationSlug(String integrationSlug) { } @JsonSetter(value = "category", nulls = Nulls.SKIP) - public Builder category(Optional category) { + public Builder category(Optional category) { this.category = category; return this; } - public Builder category(CategoryEnum category) { + public Builder category(AccountDetailsCategory category) { this.category = Optional.ofNullable(category); return this; } @@ -340,6 +340,9 @@ public Builder webhookListenerUrl(String webhookListenerUrl) { return this; } + /** + *

    Whether a Production Linked Account's credentials match another existing Production Linked Account. This field is null for Test Linked Accounts, incomplete Production Linked Accounts, and ignored duplicate Production Linked Account sets.

    + */ @JsonSetter(value = "is_duplicate", nulls = Nulls.SKIP) public Builder isDuplicate(Optional isDuplicate) { this.isDuplicate = isDuplicate; @@ -362,6 +365,9 @@ public Builder accountType(String accountType) { return this; } + /** + *

    The time at which account completes the linking flow.

    + */ @JsonSetter(value = "completed_at", nulls = Nulls.SKIP) public Builder completedAt(Optional completedAt) { this.completedAt = completedAt; diff --git a/src/main/java/com/merge/api/filestorage/types/AccountDetailsAndActions.java b/src/main/java/com/merge/api/filestorage/types/AccountDetailsAndActions.java index 840d359bb..7e5fdb6b0 100644 --- a/src/main/java/com/merge/api/filestorage/types/AccountDetailsAndActions.java +++ b/src/main/java/com/merge/api/filestorage/types/AccountDetailsAndActions.java @@ -24,9 +24,9 @@ public final class AccountDetailsAndActions { private final String id; - private final Optional category; + private final Optional category; - private final AccountDetailsAndActionsStatusEnum status; + private final AccountDetailsAndActionsStatus status; private final Optional statusDetail; @@ -52,8 +52,8 @@ public final class AccountDetailsAndActions { private AccountDetailsAndActions( String id, - Optional category, - AccountDetailsAndActionsStatusEnum status, + Optional category, + AccountDetailsAndActionsStatus status, Optional statusDetail, Optional endUserOriginId, String endUserOrganizationName, @@ -87,12 +87,12 @@ public String getId() { } @JsonProperty("category") - public Optional getCategory() { + public Optional getCategory() { return category; } @JsonProperty("status") - public AccountDetailsAndActionsStatusEnum getStatus() { + public AccountDetailsAndActionsStatus getStatus() { return status; } @@ -213,7 +213,7 @@ public interface IdStage { } public interface StatusStage { - EndUserOrganizationNameStage status(@NotNull AccountDetailsAndActionsStatusEnum status); + EndUserOrganizationNameStage status(@NotNull AccountDetailsAndActionsStatus status); } public interface EndUserOrganizationNameStage { @@ -239,9 +239,9 @@ public interface CompletedAtStage { public interface _FinalStage { AccountDetailsAndActions build(); - _FinalStage category(Optional category); + _FinalStage category(Optional category); - _FinalStage category(CategoryEnum category); + _FinalStage category(AccountDetailsAndActionsCategory category); _FinalStage statusDetail(Optional statusDetail); @@ -251,10 +251,16 @@ public interface _FinalStage { _FinalStage endUserOriginId(String endUserOriginId); + /** + *

    The tenant or domain the customer has provided access to.

    + */ _FinalStage subdomain(Optional subdomain); _FinalStage subdomain(String subdomain); + /** + *

    Whether a Production Linked Account's credentials match another existing Production Linked Account. This field is null for Test Linked Accounts, incomplete Production Linked Accounts, and ignored duplicate Production Linked Account sets.

    + */ _FinalStage isDuplicate(Optional isDuplicate); _FinalStage isDuplicate(Boolean isDuplicate); @@ -276,7 +282,7 @@ public static final class Builder _FinalStage { private String id; - private AccountDetailsAndActionsStatusEnum status; + private AccountDetailsAndActionsStatus status; private String endUserOrganizationName; @@ -298,7 +304,7 @@ public static final class Builder private Optional statusDetail = Optional.empty(); - private Optional category = Optional.empty(); + private Optional category = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -332,7 +338,7 @@ public StatusStage id(@NotNull String id) { @java.lang.Override @JsonSetter("status") - public EndUserOrganizationNameStage status(@NotNull AccountDetailsAndActionsStatusEnum status) { + public EndUserOrganizationNameStage status(@NotNull AccountDetailsAndActionsStatus status) { this.status = status; return this; } @@ -395,6 +401,9 @@ public _FinalStage isDuplicate(Boolean isDuplicate) { return this; } + /** + *

    Whether a Production Linked Account's credentials match another existing Production Linked Account. This field is null for Test Linked Accounts, incomplete Production Linked Accounts, and ignored duplicate Production Linked Account sets.

    + */ @java.lang.Override @JsonSetter(value = "is_duplicate", nulls = Nulls.SKIP) public _FinalStage isDuplicate(Optional isDuplicate) { @@ -412,6 +421,9 @@ public _FinalStage subdomain(String subdomain) { return this; } + /** + *

    The tenant or domain the customer has provided access to.

    + */ @java.lang.Override @JsonSetter(value = "subdomain", nulls = Nulls.SKIP) public _FinalStage subdomain(Optional subdomain) { @@ -446,14 +458,14 @@ public _FinalStage statusDetail(Optional statusDetail) { } @java.lang.Override - public _FinalStage category(CategoryEnum category) { + public _FinalStage category(AccountDetailsAndActionsCategory category) { this.category = Optional.ofNullable(category); return this; } @java.lang.Override @JsonSetter(value = "category", nulls = Nulls.SKIP) - public _FinalStage category(Optional category) { + public _FinalStage category(Optional category) { this.category = category; return this; } diff --git a/src/main/java/com/merge/api/filestorage/types/AccountDetailsAndActionsCategory.java b/src/main/java/com/merge/api/filestorage/types/AccountDetailsAndActionsCategory.java new file mode 100644 index 000000000..6c4898493 --- /dev/null +++ b/src/main/java/com/merge/api/filestorage/types/AccountDetailsAndActionsCategory.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.filestorage.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = AccountDetailsAndActionsCategory.Deserializer.class) +public final class AccountDetailsAndActionsCategory { + private final Object value; + + private final int type; + + private AccountDetailsAndActionsCategory(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((CategoryEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AccountDetailsAndActionsCategory && equalTo((AccountDetailsAndActionsCategory) other); + } + + private boolean equalTo(AccountDetailsAndActionsCategory other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static AccountDetailsAndActionsCategory of(CategoryEnum value) { + return new AccountDetailsAndActionsCategory(value, 0); + } + + public static AccountDetailsAndActionsCategory of(String value) { + return new AccountDetailsAndActionsCategory(value, 1); + } + + public interface Visitor { + T visit(CategoryEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(AccountDetailsAndActionsCategory.class); + } + + @java.lang.Override + public AccountDetailsAndActionsCategory deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, CategoryEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/filestorage/types/AccountDetailsAndActionsStatus.java b/src/main/java/com/merge/api/filestorage/types/AccountDetailsAndActionsStatus.java new file mode 100644 index 000000000..46cc791da --- /dev/null +++ b/src/main/java/com/merge/api/filestorage/types/AccountDetailsAndActionsStatus.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.filestorage.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = AccountDetailsAndActionsStatus.Deserializer.class) +public final class AccountDetailsAndActionsStatus { + private final Object value; + + private final int type; + + private AccountDetailsAndActionsStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((AccountDetailsAndActionsStatusEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AccountDetailsAndActionsStatus && equalTo((AccountDetailsAndActionsStatus) other); + } + + private boolean equalTo(AccountDetailsAndActionsStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static AccountDetailsAndActionsStatus of(AccountDetailsAndActionsStatusEnum value) { + return new AccountDetailsAndActionsStatus(value, 0); + } + + public static AccountDetailsAndActionsStatus of(String value) { + return new AccountDetailsAndActionsStatus(value, 1); + } + + public interface Visitor { + T visit(AccountDetailsAndActionsStatusEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(AccountDetailsAndActionsStatus.class); + } + + @java.lang.Override + public AccountDetailsAndActionsStatus deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, AccountDetailsAndActionsStatusEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/filestorage/types/AccountDetailsCategory.java b/src/main/java/com/merge/api/filestorage/types/AccountDetailsCategory.java new file mode 100644 index 000000000..f62ccc843 --- /dev/null +++ b/src/main/java/com/merge/api/filestorage/types/AccountDetailsCategory.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.filestorage.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = AccountDetailsCategory.Deserializer.class) +public final class AccountDetailsCategory { + private final Object value; + + private final int type; + + private AccountDetailsCategory(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((CategoryEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AccountDetailsCategory && equalTo((AccountDetailsCategory) other); + } + + private boolean equalTo(AccountDetailsCategory other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static AccountDetailsCategory of(CategoryEnum value) { + return new AccountDetailsCategory(value, 0); + } + + public static AccountDetailsCategory of(String value) { + return new AccountDetailsCategory(value, 1); + } + + public interface Visitor { + T visit(CategoryEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(AccountDetailsCategory.class); + } + + @java.lang.Override + public AccountDetailsCategory deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, CategoryEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/filestorage/types/AccountIntegration.java b/src/main/java/com/merge/api/filestorage/types/AccountIntegration.java index 7cd2968b1..0649154b7 100644 --- a/src/main/java/com/merge/api/filestorage/types/AccountIntegration.java +++ b/src/main/java/com/merge/api/filestorage/types/AccountIntegration.java @@ -196,6 +196,9 @@ public static NameStage builder() { } public interface NameStage { + /** + * Company name. + */ _FinalStage name(@NotNull String name); Builder from(AccountIntegration other); @@ -204,22 +207,37 @@ public interface NameStage { public interface _FinalStage { AccountIntegration build(); + /** + *

    Optional. This shortened name appears in places with limited space, usually in conjunction with the platform's logo (e.g., Merge Link menu).<br><br>Example: <i>Workforce Now (in lieu of ADP Workforce Now), SuccessFactors (in lieu of SAP SuccessFactors)</i>

    + */ _FinalStage abbreviatedName(Optional abbreviatedName); _FinalStage abbreviatedName(String abbreviatedName); + /** + *

    Category or categories this integration belongs to. Multiple categories should be comma separated, i.e. [ats, hris].

    + */ _FinalStage categories(Optional> categories); _FinalStage categories(List categories); + /** + *

    Company logo in rectangular shape.

    + */ _FinalStage image(Optional image); _FinalStage image(String image); + /** + *

    Company logo in square shape.

    + */ _FinalStage squareImage(Optional squareImage); _FinalStage squareImage(String squareImage); + /** + *

    The color of this integration used for buttons and text throughout the app and landing pages. <b>Choose a darker, saturated color.</b>

    + */ _FinalStage color(Optional color); _FinalStage color(String color); @@ -228,14 +246,23 @@ public interface _FinalStage { _FinalStage slug(String slug); + /** + *

    Mapping of API endpoints to documentation urls for support. Example: {'GET': [['/common-model-scopes', 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], 'POST': []}

    + */ _FinalStage apiEndpointsToDocumentationUrls(Optional> apiEndpointsToDocumentationUrls); _FinalStage apiEndpointsToDocumentationUrls(Map apiEndpointsToDocumentationUrls); + /** + *

    Setup guide URL for third party webhook creation. Exposed in Merge Docs.

    + */ _FinalStage webhookSetupGuideUrl(Optional webhookSetupGuideUrl); _FinalStage webhookSetupGuideUrl(String webhookSetupGuideUrl); + /** + *

    Category or categories this integration is in beta status for.

    + */ _FinalStage categoryBetaStatus(Optional> categoryBetaStatus); _FinalStage categoryBetaStatus(Map categoryBetaStatus); @@ -284,7 +311,7 @@ public Builder from(AccountIntegration other) { } /** - *

    Company name.

    + * Company name.

    Company name.

    * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -304,6 +331,9 @@ public _FinalStage categoryBetaStatus(Map categoryBetaStatus) return this; } + /** + *

    Category or categories this integration is in beta status for.

    + */ @java.lang.Override @JsonSetter(value = "category_beta_status", nulls = Nulls.SKIP) public _FinalStage categoryBetaStatus(Optional> categoryBetaStatus) { @@ -321,6 +351,9 @@ public _FinalStage webhookSetupGuideUrl(String webhookSetupGuideUrl) { return this; } + /** + *

    Setup guide URL for third party webhook creation. Exposed in Merge Docs.

    + */ @java.lang.Override @JsonSetter(value = "webhook_setup_guide_url", nulls = Nulls.SKIP) public _FinalStage webhookSetupGuideUrl(Optional webhookSetupGuideUrl) { @@ -338,6 +371,9 @@ public _FinalStage apiEndpointsToDocumentationUrls(Map apiEndp return this; } + /** + *

    Mapping of API endpoints to documentation urls for support. Example: {'GET': [['/common-model-scopes', 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], 'POST': []}

    + */ @java.lang.Override @JsonSetter(value = "api_endpoints_to_documentation_urls", nulls = Nulls.SKIP) public _FinalStage apiEndpointsToDocumentationUrls( @@ -369,6 +405,9 @@ public _FinalStage color(String color) { return this; } + /** + *

    The color of this integration used for buttons and text throughout the app and landing pages. <b>Choose a darker, saturated color.</b>

    + */ @java.lang.Override @JsonSetter(value = "color", nulls = Nulls.SKIP) public _FinalStage color(Optional color) { @@ -386,6 +425,9 @@ public _FinalStage squareImage(String squareImage) { return this; } + /** + *

    Company logo in square shape.

    + */ @java.lang.Override @JsonSetter(value = "square_image", nulls = Nulls.SKIP) public _FinalStage squareImage(Optional squareImage) { @@ -403,6 +445,9 @@ public _FinalStage image(String image) { return this; } + /** + *

    Company logo in rectangular shape.

    + */ @java.lang.Override @JsonSetter(value = "image", nulls = Nulls.SKIP) public _FinalStage image(Optional image) { @@ -420,6 +465,9 @@ public _FinalStage categories(List categories) { return this; } + /** + *

    Category or categories this integration belongs to. Multiple categories should be comma separated, i.e. [ats, hris].

    + */ @java.lang.Override @JsonSetter(value = "categories", nulls = Nulls.SKIP) public _FinalStage categories(Optional> categories) { @@ -437,6 +485,9 @@ public _FinalStage abbreviatedName(String abbreviatedName) { return this; } + /** + *

    Optional. This shortened name appears in places with limited space, usually in conjunction with the platform's logo (e.g., Merge Link menu).<br><br>Example: <i>Workforce Now (in lieu of ADP Workforce Now), SuccessFactors (in lieu of SAP SuccessFactors)</i>

    + */ @java.lang.Override @JsonSetter(value = "abbreviated_name", nulls = Nulls.SKIP) public _FinalStage abbreviatedName(Optional abbreviatedName) { diff --git a/src/main/java/com/merge/api/filestorage/types/AuditLogEvent.java b/src/main/java/com/merge/api/filestorage/types/AuditLogEvent.java index 277f88c59..335290fd5 100644 --- a/src/main/java/com/merge/api/filestorage/types/AuditLogEvent.java +++ b/src/main/java/com/merge/api/filestorage/types/AuditLogEvent.java @@ -28,11 +28,11 @@ public final class AuditLogEvent { private final Optional userEmail; - private final RoleEnum role; + private final AuditLogEventRole role; private final String ipAddress; - private final EventTypeEnum eventType; + private final AuditLogEventEventType eventType; private final String eventDescription; @@ -44,9 +44,9 @@ private AuditLogEvent( Optional id, Optional userName, Optional userEmail, - RoleEnum role, + AuditLogEventRole role, String ipAddress, - EventTypeEnum eventType, + AuditLogEventEventType eventType, String eventDescription, Optional createdAt, Map additionalProperties) { @@ -94,7 +94,7 @@ public Optional getUserEmail() { * */ @JsonProperty("role") - public RoleEnum getRole() { + public AuditLogEventRole getRole() { return role; } @@ -111,6 +111,7 @@ public String getIpAddress() { *
  • CREATED_TEST_API_KEY - CREATED_TEST_API_KEY
  • *
  • DELETED_TEST_API_KEY - DELETED_TEST_API_KEY
  • *
  • REGENERATED_PRODUCTION_API_KEY - REGENERATED_PRODUCTION_API_KEY
  • + *
  • REGENERATED_WEBHOOK_SIGNATURE - REGENERATED_WEBHOOK_SIGNATURE
  • *
  • INVITED_USER - INVITED_USER
  • *
  • TWO_FACTOR_AUTH_ENABLED - TWO_FACTOR_AUTH_ENABLED
  • *
  • TWO_FACTOR_AUTH_DISABLED - TWO_FACTOR_AUTH_DISABLED
  • @@ -151,7 +152,7 @@ public String getIpAddress() { * */ @JsonProperty("event_type") - public EventTypeEnum getEventType() { + public AuditLogEventEventType getEventType() { return eventType; } @@ -210,7 +211,17 @@ public static RoleStage builder() { } public interface RoleStage { - IpAddressStage role(@NotNull RoleEnum role); + /** + * Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. + * + * * `ADMIN` - ADMIN + * * `DEVELOPER` - DEVELOPER + * * `MEMBER` - MEMBER + * * `API` - API + * * `SYSTEM` - SYSTEM + * * `MERGE_TEAM` - MERGE_TEAM + */ + IpAddressStage role(@NotNull AuditLogEventRole role); Builder from(AuditLogEvent other); } @@ -220,7 +231,54 @@ public interface IpAddressStage { } public interface EventTypeStage { - EventDescriptionStage eventType(@NotNull EventTypeEnum eventType); + /** + * Designates the type of event that occurred. + * + * * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + * * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + * * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + * * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + * * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + * * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + * * `INVITED_USER` - INVITED_USER + * * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + * * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + * * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + * * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + * * `CREATED_DESTINATION` - CREATED_DESTINATION + * * `DELETED_DESTINATION` - DELETED_DESTINATION + * * `CHANGED_DESTINATION` - CHANGED_DESTINATION + * * `CHANGED_SCOPES` - CHANGED_SCOPES + * * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + * * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + * * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + * * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + * * `ENABLED_CATEGORY` - ENABLED_CATEGORY + * * `DISABLED_CATEGORY` - DISABLED_CATEGORY + * * `CHANGED_PASSWORD` - CHANGED_PASSWORD + * * `RESET_PASSWORD` - RESET_PASSWORD + * * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING + * * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING + * * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + * * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + * * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING + * * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING + * * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + * * `MUTED_ISSUE` - MUTED_ISSUE + * * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + * * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + * * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + * * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + * * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + */ + EventDescriptionStage eventType(@NotNull AuditLogEventEventType eventType); } public interface EventDescriptionStage { @@ -234,10 +292,16 @@ public interface _FinalStage { _FinalStage id(String id); + /** + *

    The User's full name at the time of this Event occurring.

    + */ _FinalStage userName(Optional userName); _FinalStage userName(String userName); + /** + *

    The User's email at the time of this Event occurring.

    + */ _FinalStage userEmail(Optional userEmail); _FinalStage userEmail(String userEmail); @@ -250,11 +314,11 @@ public interface _FinalStage { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements RoleStage, IpAddressStage, EventTypeStage, EventDescriptionStage, _FinalStage { - private RoleEnum role; + private AuditLogEventRole role; private String ipAddress; - private EventTypeEnum eventType; + private AuditLogEventEventType eventType; private String eventDescription; @@ -285,7 +349,14 @@ public Builder from(AuditLogEvent other) { } /** - *

    Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring.

    + * Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. + * + * * `ADMIN` - ADMIN + * * `DEVELOPER` - DEVELOPER + * * `MEMBER` - MEMBER + * * `API` - API + * * `SYSTEM` - SYSTEM + * * `MERGE_TEAM` - MERGE_TEAM

    Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring.

    *
      *
    • ADMIN - ADMIN
    • *
    • DEVELOPER - DEVELOPER
    • @@ -298,7 +369,7 @@ public Builder from(AuditLogEvent other) { */ @java.lang.Override @JsonSetter("role") - public IpAddressStage role(@NotNull RoleEnum role) { + public IpAddressStage role(@NotNull AuditLogEventRole role) { this.role = role; return this; } @@ -311,13 +382,58 @@ public EventTypeStage ipAddress(@NotNull String ipAddress) { } /** - *

      Designates the type of event that occurred.

      + * Designates the type of event that occurred. + * + * * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + * * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + * * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + * * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + * * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + * * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + * * `INVITED_USER` - INVITED_USER + * * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + * * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + * * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + * * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + * * `CREATED_DESTINATION` - CREATED_DESTINATION + * * `DELETED_DESTINATION` - DELETED_DESTINATION + * * `CHANGED_DESTINATION` - CHANGED_DESTINATION + * * `CHANGED_SCOPES` - CHANGED_SCOPES + * * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + * * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + * * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + * * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + * * `ENABLED_CATEGORY` - ENABLED_CATEGORY + * * `DISABLED_CATEGORY` - DISABLED_CATEGORY + * * `CHANGED_PASSWORD` - CHANGED_PASSWORD + * * `RESET_PASSWORD` - RESET_PASSWORD + * * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING + * * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING + * * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + * * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + * * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING + * * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING + * * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + * * `MUTED_ISSUE` - MUTED_ISSUE + * * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + * * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + * * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + * * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + * * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED

      Designates the type of event that occurred.

      *
        *
      • CREATED_REMOTE_PRODUCTION_API_KEY - CREATED_REMOTE_PRODUCTION_API_KEY
      • *
      • DELETED_REMOTE_PRODUCTION_API_KEY - DELETED_REMOTE_PRODUCTION_API_KEY
      • *
      • CREATED_TEST_API_KEY - CREATED_TEST_API_KEY
      • *
      • DELETED_TEST_API_KEY - DELETED_TEST_API_KEY
      • *
      • REGENERATED_PRODUCTION_API_KEY - REGENERATED_PRODUCTION_API_KEY
      • + *
      • REGENERATED_WEBHOOK_SIGNATURE - REGENERATED_WEBHOOK_SIGNATURE
      • *
      • INVITED_USER - INVITED_USER
      • *
      • TWO_FACTOR_AUTH_ENABLED - TWO_FACTOR_AUTH_ENABLED
      • *
      • TWO_FACTOR_AUTH_DISABLED - TWO_FACTOR_AUTH_DISABLED
      • @@ -360,7 +476,7 @@ public EventTypeStage ipAddress(@NotNull String ipAddress) { */ @java.lang.Override @JsonSetter("event_type") - public EventDescriptionStage eventType(@NotNull EventTypeEnum eventType) { + public EventDescriptionStage eventType(@NotNull AuditLogEventEventType eventType) { this.eventType = eventType; return this; } @@ -395,6 +511,9 @@ public _FinalStage userEmail(String userEmail) { return this; } + /** + *

        The User's email at the time of this Event occurring.

        + */ @java.lang.Override @JsonSetter(value = "user_email", nulls = Nulls.SKIP) public _FinalStage userEmail(Optional userEmail) { @@ -412,6 +531,9 @@ public _FinalStage userName(String userName) { return this; } + /** + *

        The User's full name at the time of this Event occurring.

        + */ @java.lang.Override @JsonSetter(value = "user_name", nulls = Nulls.SKIP) public _FinalStage userName(Optional userName) { diff --git a/src/main/java/com/merge/api/filestorage/types/AuditLogEventEventType.java b/src/main/java/com/merge/api/filestorage/types/AuditLogEventEventType.java new file mode 100644 index 000000000..297857295 --- /dev/null +++ b/src/main/java/com/merge/api/filestorage/types/AuditLogEventEventType.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.filestorage.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = AuditLogEventEventType.Deserializer.class) +public final class AuditLogEventEventType { + private final Object value; + + private final int type; + + private AuditLogEventEventType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EventTypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AuditLogEventEventType && equalTo((AuditLogEventEventType) other); + } + + private boolean equalTo(AuditLogEventEventType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static AuditLogEventEventType of(EventTypeEnum value) { + return new AuditLogEventEventType(value, 0); + } + + public static AuditLogEventEventType of(String value) { + return new AuditLogEventEventType(value, 1); + } + + public interface Visitor { + T visit(EventTypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(AuditLogEventEventType.class); + } + + @java.lang.Override + public AuditLogEventEventType deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, EventTypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/filestorage/types/AuditLogEventRole.java b/src/main/java/com/merge/api/filestorage/types/AuditLogEventRole.java new file mode 100644 index 000000000..1e3d49da9 --- /dev/null +++ b/src/main/java/com/merge/api/filestorage/types/AuditLogEventRole.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.filestorage.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = AuditLogEventRole.Deserializer.class) +public final class AuditLogEventRole { + private final Object value; + + private final int type; + + private AuditLogEventRole(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((RoleEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AuditLogEventRole && equalTo((AuditLogEventRole) other); + } + + private boolean equalTo(AuditLogEventRole other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static AuditLogEventRole of(RoleEnum value) { + return new AuditLogEventRole(value, 0); + } + + public static AuditLogEventRole of(String value) { + return new AuditLogEventRole(value, 1); + } + + public interface Visitor { + T visit(RoleEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(AuditLogEventRole.class); + } + + @java.lang.Override + public AuditLogEventRole deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, RoleEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/filestorage/types/AuditTrailListRequest.java b/src/main/java/com/merge/api/filestorage/types/AuditTrailListRequest.java index b70b6c075..01100928d 100644 --- a/src/main/java/com/merge/api/filestorage/types/AuditTrailListRequest.java +++ b/src/main/java/com/merge/api/filestorage/types/AuditTrailListRequest.java @@ -68,7 +68,7 @@ public Optional getEndDate() { } /** - * @return If included, will only include events with the given event type. Possible values include: CREATED_REMOTE_PRODUCTION_API_KEY, DELETED_REMOTE_PRODUCTION_API_KEY, CREATED_TEST_API_KEY, DELETED_TEST_API_KEY, REGENERATED_PRODUCTION_API_KEY, INVITED_USER, TWO_FACTOR_AUTH_ENABLED, TWO_FACTOR_AUTH_DISABLED, DELETED_LINKED_ACCOUNT, 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 + * @return 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 */ @JsonProperty("event_type") public Optional getEventType() { @@ -162,6 +162,9 @@ public Builder from(AuditTrailListRequest other) { return this; } + /** + *

        The pagination cursor value.

        + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -173,6 +176,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

        If included, will only include audit trail events that occurred before this time

        + */ @JsonSetter(value = "end_date", nulls = Nulls.SKIP) public Builder endDate(Optional endDate) { this.endDate = endDate; @@ -184,6 +190,9 @@ public Builder endDate(String endDate) { return this; } + /** + *

        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

        + */ @JsonSetter(value = "event_type", nulls = Nulls.SKIP) public Builder eventType(Optional eventType) { this.eventType = eventType; @@ -195,6 +204,9 @@ public Builder eventType(String eventType) { return this; } + /** + *

        Number of results to return per page.

        + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -206,6 +218,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

        If included, will only include audit trail events that occurred after this time

        + */ @JsonSetter(value = "start_date", nulls = Nulls.SKIP) public Builder startDate(Optional startDate) { this.startDate = startDate; @@ -217,6 +232,9 @@ public Builder startDate(String startDate) { return this; } + /** + *

        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.

        + */ @JsonSetter(value = "user_email", nulls = Nulls.SKIP) public Builder userEmail(Optional userEmail) { this.userEmail = userEmail; diff --git a/src/main/java/com/merge/api/filestorage/types/CommonModelScopeApi.java b/src/main/java/com/merge/api/filestorage/types/CommonModelScopeApi.java index ce7bfbdc9..9e492d942 100644 --- a/src/main/java/com/merge/api/filestorage/types/CommonModelScopeApi.java +++ b/src/main/java/com/merge/api/filestorage/types/CommonModelScopeApi.java @@ -82,6 +82,9 @@ public Builder from(CommonModelScopeApi other) { return this; } + /** + *

        The common models you want to update the scopes for

        + */ @JsonSetter(value = "common_models", nulls = Nulls.SKIP) public Builder commonModels(List commonModels) { this.commonModels.clear(); diff --git a/src/main/java/com/merge/api/filestorage/types/CreateFieldMappingRequest.java b/src/main/java/com/merge/api/filestorage/types/CreateFieldMappingRequest.java index e3159f3a5..026b32730 100644 --- a/src/main/java/com/merge/api/filestorage/types/CreateFieldMappingRequest.java +++ b/src/main/java/com/merge/api/filestorage/types/CreateFieldMappingRequest.java @@ -158,34 +158,55 @@ public static TargetFieldNameStage builder() { } public interface TargetFieldNameStage { + /** + * The name of the target field you want this remote field to map to. + */ TargetFieldDescriptionStage targetFieldName(@NotNull String targetFieldName); Builder from(CreateFieldMappingRequest other); } public interface TargetFieldDescriptionStage { + /** + * The description of the target field you want this remote field to map to. + */ RemoteMethodStage targetFieldDescription(@NotNull String targetFieldDescription); } public interface RemoteMethodStage { + /** + * The method of the remote endpoint where the remote field is coming from. + */ RemoteUrlPathStage remoteMethod(@NotNull String remoteMethod); } public interface RemoteUrlPathStage { + /** + * The path of the remote endpoint where the remote field is coming from. + */ CommonModelNameStage remoteUrlPath(@NotNull String remoteUrlPath); } public interface CommonModelNameStage { + /** + * The name of the Common Model that the remote field corresponds to in a given category. + */ _FinalStage commonModelName(@NotNull String commonModelName); } public interface _FinalStage { CreateFieldMappingRequest build(); + /** + *

        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.

        + */ _FinalStage excludeRemoteFieldMetadata(Optional excludeRemoteFieldMetadata); _FinalStage excludeRemoteFieldMetadata(Boolean excludeRemoteFieldMetadata); + /** + *

        The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.

        + */ _FinalStage remoteFieldTraversalPath(List remoteFieldTraversalPath); _FinalStage addRemoteFieldTraversalPath(JsonNode remoteFieldTraversalPath); @@ -233,7 +254,7 @@ public Builder from(CreateFieldMappingRequest other) { } /** - *

        The name of the target field you want this remote field to map to.

        + * The name of the target field you want this remote field to map to.

        The name of the target field you want this remote field to map to.

        * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -244,7 +265,7 @@ public TargetFieldDescriptionStage targetFieldName(@NotNull String targetFieldNa } /** - *

        The description of the target field you want this remote field to map to.

        + * The description of the target field you want this remote field to map to.

        The description of the target field you want this remote field to map to.

        * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -255,7 +276,7 @@ public RemoteMethodStage targetFieldDescription(@NotNull String targetFieldDescr } /** - *

        The method of the remote endpoint where the remote field is coming from.

        + * The method of the remote endpoint where the remote field is coming from.

        The method of the remote endpoint where the remote field is coming from.

        * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -266,7 +287,7 @@ public RemoteUrlPathStage remoteMethod(@NotNull String remoteMethod) { } /** - *

        The path of the remote endpoint where the remote field is coming from.

        + * The path of the remote endpoint where the remote field is coming from.

        The path of the remote endpoint where the remote field is coming from.

        * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -277,7 +298,7 @@ public CommonModelNameStage remoteUrlPath(@NotNull String remoteUrlPath) { } /** - *

        The name of the Common Model that the remote field corresponds to in a given category.

        + * The name of the Common Model that the remote field corresponds to in a given category.

        The name of the Common Model that the remote field corresponds to in a given category.

        * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -307,6 +328,9 @@ public _FinalStage addRemoteFieldTraversalPath(JsonNode remoteFieldTraversalPath return this; } + /** + *

        The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.

        + */ @java.lang.Override @JsonSetter(value = "remote_field_traversal_path", nulls = Nulls.SKIP) public _FinalStage remoteFieldTraversalPath(List remoteFieldTraversalPath) { @@ -325,6 +349,9 @@ public _FinalStage excludeRemoteFieldMetadata(Boolean excludeRemoteFieldMetadata return this; } + /** + *

        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.

        + */ @java.lang.Override @JsonSetter(value = "exclude_remote_field_metadata", nulls = Nulls.SKIP) public _FinalStage excludeRemoteFieldMetadata(Optional excludeRemoteFieldMetadata) { diff --git a/src/main/java/com/merge/api/filestorage/types/DataPassthroughRequest.java b/src/main/java/com/merge/api/filestorage/types/DataPassthroughRequest.java index afd410079..09377c8d4 100644 --- a/src/main/java/com/merge/api/filestorage/types/DataPassthroughRequest.java +++ b/src/main/java/com/merge/api/filestorage/types/DataPassthroughRequest.java @@ -171,24 +171,39 @@ public interface MethodStage { } public interface PathStage { + /** + * The path of the request in the third party's platform. + */ _FinalStage path(@NotNull String path); } public interface _FinalStage { DataPassthroughRequest build(); + /** + *

        An optional override of the third party's base url for the request.

        + */ _FinalStage baseUrlOverride(Optional baseUrlOverride); _FinalStage baseUrlOverride(String baseUrlOverride); + /** + *

        The data with the request. You must include a request_format parameter matching the data's format

        + */ _FinalStage data(Optional data); _FinalStage data(String data); + /** + *

        Pass an array of MultipartFormField objects in here instead of using the data param if request_format is set to MULTIPART.

        + */ _FinalStage multipartFormData(Optional> multipartFormData); _FinalStage multipartFormData(List multipartFormData); + /** + *

        The headers to use for the request (Merge will handle the account's authorization headers). Content-Type header is required for passthrough. Choose content type corresponding to expected format of receiving server.

        + */ _FinalStage headers(Optional> headers); _FinalStage headers(Map headers); @@ -197,6 +212,9 @@ public interface _FinalStage { _FinalStage requestFormat(RequestFormatEnum requestFormat); + /** + *

        Optional. If true, the response will always be an object of the form {"type": T, "value": ...} where T will be one of string, boolean, number, null, array, object.

        + */ _FinalStage normalizeResponse(Optional normalizeResponse); _FinalStage normalizeResponse(Boolean normalizeResponse); @@ -246,7 +264,7 @@ public PathStage method(@NotNull MethodEnum method) { } /** - *

        The path of the request in the third party's platform.

        + * The path of the request in the third party's platform.

        The path of the request in the third party's platform.

        * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -266,6 +284,9 @@ public _FinalStage normalizeResponse(Boolean normalizeResponse) { return this; } + /** + *

        Optional. If true, the response will always be an object of the form {"type": T, "value": ...} where T will be one of string, boolean, number, null, array, object.

        + */ @java.lang.Override @JsonSetter(value = "normalize_response", nulls = Nulls.SKIP) public _FinalStage normalizeResponse(Optional normalizeResponse) { @@ -296,6 +317,9 @@ public _FinalStage headers(Map headers) { return this; } + /** + *

        The headers to use for the request (Merge will handle the account's authorization headers). Content-Type header is required for passthrough. Choose content type corresponding to expected format of receiving server.

        + */ @java.lang.Override @JsonSetter(value = "headers", nulls = Nulls.SKIP) public _FinalStage headers(Optional> headers) { @@ -313,6 +337,9 @@ public _FinalStage multipartFormData(List multipartFo return this; } + /** + *

        Pass an array of MultipartFormField objects in here instead of using the data param if request_format is set to MULTIPART.

        + */ @java.lang.Override @JsonSetter(value = "multipart_form_data", nulls = Nulls.SKIP) public _FinalStage multipartFormData(Optional> multipartFormData) { @@ -330,6 +357,9 @@ public _FinalStage data(String data) { return this; } + /** + *

        The data with the request. You must include a request_format parameter matching the data's format

        + */ @java.lang.Override @JsonSetter(value = "data", nulls = Nulls.SKIP) public _FinalStage data(Optional data) { @@ -347,6 +377,9 @@ public _FinalStage baseUrlOverride(String baseUrlOverride) { return this; } + /** + *

        An optional override of the third party's base url for the request.

        + */ @java.lang.Override @JsonSetter(value = "base_url_override", nulls = Nulls.SKIP) public _FinalStage baseUrlOverride(Optional baseUrlOverride) { diff --git a/src/main/java/com/merge/api/filestorage/types/DownloadRequestMeta.java b/src/main/java/com/merge/api/filestorage/types/DownloadRequestMeta.java index ae08fc733..c9d153574 100644 --- a/src/main/java/com/merge/api/filestorage/types/DownloadRequestMeta.java +++ b/src/main/java/com/merge/api/filestorage/types/DownloadRequestMeta.java @@ -30,8 +30,6 @@ public final class DownloadRequestMeta { private final Map headers; - private final Map body; - private final Map additionalProperties; private DownloadRequestMeta( @@ -39,13 +37,11 @@ private DownloadRequestMeta( String url, String method, Map headers, - Map body, Map additionalProperties) { this.id = id; this.url = url; this.method = method; this.headers = headers; - this.body = body; this.additionalProperties = additionalProperties; } @@ -69,11 +65,6 @@ public Map getHeaders() { return headers; } - @JsonProperty("body") - public Map getBody() { - return body; - } - @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -89,13 +80,12 @@ private boolean equalTo(DownloadRequestMeta other) { return id.equals(other.id) && url.equals(other.url) && method.equals(other.method) - && headers.equals(other.headers) - && body.equals(other.body); + && headers.equals(other.headers); } @java.lang.Override public int hashCode() { - return Objects.hash(this.id, this.url, this.method, this.headers, this.body); + return Objects.hash(this.id, this.url, this.method, this.headers); } @java.lang.Override @@ -129,12 +119,6 @@ public interface _FinalStage { _FinalStage putAllHeaders(Map headers); _FinalStage headers(String key, JsonNode value); - - _FinalStage body(Map body); - - _FinalStage putAllBody(Map body); - - _FinalStage body(String key, JsonNode value); } @JsonIgnoreProperties(ignoreUnknown = true) @@ -145,8 +129,6 @@ public static final class Builder implements IdStage, UrlStage, MethodStage, _Fi private String method; - private Map body = new LinkedHashMap<>(); - private Map headers = new LinkedHashMap<>(); @JsonAnySetter @@ -160,7 +142,6 @@ public Builder from(DownloadRequestMeta other) { url(other.getUrl()); method(other.getMethod()); headers(other.getHeaders()); - body(other.getBody()); return this; } @@ -185,26 +166,6 @@ public _FinalStage method(@NotNull String method) { return this; } - @java.lang.Override - public _FinalStage body(String key, JsonNode value) { - this.body.put(key, value); - return this; - } - - @java.lang.Override - public _FinalStage putAllBody(Map body) { - this.body.putAll(body); - return this; - } - - @java.lang.Override - @JsonSetter(value = "body", nulls = Nulls.SKIP) - public _FinalStage body(Map body) { - this.body.clear(); - this.body.putAll(body); - return this; - } - @java.lang.Override public _FinalStage headers(String key, JsonNode value) { this.headers.put(key, value); @@ -227,7 +188,7 @@ public _FinalStage headers(Map headers) { @java.lang.Override public DownloadRequestMeta build() { - return new DownloadRequestMeta(id, url, method, headers, body, additionalProperties); + return new DownloadRequestMeta(id, url, method, headers, additionalProperties); } } } diff --git a/src/main/java/com/merge/api/filestorage/types/Drive.java b/src/main/java/com/merge/api/filestorage/types/Drive.java index fb9334dea..c0ab3fc33 100644 --- a/src/main/java/com/merge/api/filestorage/types/Drive.java +++ b/src/main/java/com/merge/api/filestorage/types/Drive.java @@ -241,6 +241,9 @@ public Builder id(String id) { return this; } + /** + *

        The third-party API ID of the matching object.

        + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -252,6 +255,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

        The datetime that this object was created by Merge.

        + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -263,6 +269,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

        The datetime that this object was modified by Merge.

        + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -274,6 +283,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

        The drive's name.

        + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -285,6 +297,9 @@ public Builder name(String name) { return this; } + /** + *

        When the third party's drive was created.

        + */ @JsonSetter(value = "remote_created_at", nulls = Nulls.SKIP) public Builder remoteCreatedAt(Optional remoteCreatedAt) { this.remoteCreatedAt = remoteCreatedAt; @@ -296,6 +311,9 @@ public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { return this; } + /** + *

        The drive's url.

        + */ @JsonSetter(value = "drive_url", nulls = Nulls.SKIP) public Builder driveUrl(Optional driveUrl) { this.driveUrl = driveUrl; @@ -307,6 +325,9 @@ public Builder driveUrl(String driveUrl) { return this; } + /** + *

        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.

        + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/filestorage/types/DrivesListRequest.java b/src/main/java/com/merge/api/filestorage/types/DrivesListRequest.java index 0b20547b3..7dd00be88 100644 --- a/src/main/java/com/merge/api/filestorage/types/DrivesListRequest.java +++ b/src/main/java/com/merge/api/filestorage/types/DrivesListRequest.java @@ -254,6 +254,9 @@ public Builder from(DrivesListRequest other) { return this; } + /** + *

        If provided, will only return objects created after this datetime.

        + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -265,6 +268,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

        If provided, will only return objects created before this datetime.

        + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -276,6 +282,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

        The pagination cursor value.

        + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -287,6 +296,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

        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.

        + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -298,6 +310,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

        Whether to include the original data Merge fetched from the third-party to produce these models.

        + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -309,6 +324,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

        Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

        + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -320,6 +338,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

        If provided, only objects synced by Merge after this date time will be returned.

        + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -331,6 +352,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

        If provided, only objects synced by Merge before this date time will be returned.

        + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -342,6 +366,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

        If provided, will only return drives with this name. This performs an exact match.

        + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -353,6 +380,9 @@ public Builder name(String name) { return this; } + /** + *

        Number of results to return per page.

        + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -364,6 +394,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

        The API provider's ID for the given object.

        + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; diff --git a/src/main/java/com/merge/api/filestorage/types/DrivesRetrieveRequest.java b/src/main/java/com/merge/api/filestorage/types/DrivesRetrieveRequest.java index c503815ef..bdf622568 100644 --- a/src/main/java/com/merge/api/filestorage/types/DrivesRetrieveRequest.java +++ b/src/main/java/com/merge/api/filestorage/types/DrivesRetrieveRequest.java @@ -97,6 +97,9 @@ public Builder from(DrivesRetrieveRequest other) { return this; } + /** + *

        Whether to include the original data Merge fetched from the third-party to produce these models.

        + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -108,6 +111,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

        Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

        + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/filestorage/types/EndUserDetailsRequest.java b/src/main/java/com/merge/api/filestorage/types/EndUserDetailsRequest.java index a5dad7f71..d18452c63 100644 --- a/src/main/java/com/merge/api/filestorage/types/EndUserDetailsRequest.java +++ b/src/main/java/com/merge/api/filestorage/types/EndUserDetailsRequest.java @@ -45,7 +45,7 @@ public final class EndUserDetailsRequest { private final Optional>>> categoryCommonModelScopes; - private final Optional language; + private final Optional language; private final Optional areSyncsDisabled; @@ -65,7 +65,7 @@ private EndUserDetailsRequest( Optional> commonModels, Optional>>> categoryCommonModelScopes, - Optional language, + Optional language, Optional areSyncsDisabled, Optional> integrationSpecificConfig, Map additionalProperties) { @@ -174,7 +174,7 @@ public Optional> getCommonModels() { *
      */ @JsonProperty("language") - public Optional getLanguage() { + public Optional getLanguage() { return language; } @@ -249,48 +249,78 @@ public static EndUserEmailAddressStage builder() { } public interface EndUserEmailAddressStage { + /** + * Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent. + */ EndUserOrganizationNameStage endUserEmailAddress(@NotNull String endUserEmailAddress); Builder from(EndUserDetailsRequest other); } public interface EndUserOrganizationNameStage { + /** + * Your end user's organization. + */ EndUserOriginIdStage endUserOrganizationName(@NotNull String endUserOrganizationName); } public interface EndUserOriginIdStage { + /** + * 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. + */ _FinalStage endUserOriginId(@NotNull String endUserOriginId); } public interface _FinalStage { EndUserDetailsRequest build(); + /** + *

      The integration categories to show in Merge Link.

      + */ _FinalStage categories(List categories); _FinalStage addCategories(CategoriesEnum categories); _FinalStage addAllCategories(List categories); + /** + *

      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/.

      + */ _FinalStage integration(Optional integration); _FinalStage integration(String integration); + /** + *

      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.

      + */ _FinalStage linkExpiryMins(Optional linkExpiryMins); _FinalStage linkExpiryMins(Integer linkExpiryMins); + /** + *

      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.

      + */ _FinalStage shouldCreateMagicLinkUrl(Optional shouldCreateMagicLinkUrl); _FinalStage shouldCreateMagicLinkUrl(Boolean shouldCreateMagicLinkUrl); + /** + *

      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.

      + */ _FinalStage hideAdminMagicLink(Optional hideAdminMagicLink); _FinalStage hideAdminMagicLink(Boolean hideAdminMagicLink); + /** + *

      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.

      + */ _FinalStage commonModels(Optional> commonModels); _FinalStage commonModels(List commonModels); + /** + *

      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.

      + */ _FinalStage categoryCommonModelScopes( Optional>>> categoryCommonModelScopes); @@ -298,14 +328,27 @@ _FinalStage categoryCommonModelScopes( _FinalStage categoryCommonModelScopes( Map>> categoryCommonModelScopes); - _FinalStage language(Optional language); + /** + *

      The following subset of IETF language tags can be used to configure localization.

      + *
        + *
      • en - en
      • + *
      • de - de
      • + *
      + */ + _FinalStage language(Optional language); - _FinalStage language(LanguageEnum language); + _FinalStage language(EndUserDetailsRequestLanguage language); + /** + *

      The boolean that indicates whether initial, periodic, and force syncs will be disabled.

      + */ _FinalStage areSyncsDisabled(Optional areSyncsDisabled); _FinalStage areSyncsDisabled(Boolean areSyncsDisabled); + /** + *

      A JSON object containing integration-specific configuration options.

      + */ _FinalStage integrationSpecificConfig(Optional> integrationSpecificConfig); _FinalStage integrationSpecificConfig(Map integrationSpecificConfig); @@ -324,7 +367,7 @@ public static final class Builder private Optional areSyncsDisabled = Optional.empty(); - private Optional language = Optional.empty(); + private Optional language = Optional.empty(); private Optional>>> categoryCommonModelScopes = Optional.empty(); @@ -365,7 +408,7 @@ public Builder from(EndUserDetailsRequest other) { } /** - *

      Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent.

      + * Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent.

      Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent.

      * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -376,7 +419,7 @@ public EndUserOrganizationNameStage endUserEmailAddress(@NotNull String endUserE } /** - *

      Your end user's organization.

      + * Your end user's organization.

      Your end user's organization.

      * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -387,7 +430,7 @@ public EndUserOriginIdStage endUserOrganizationName(@NotNull String endUserOrgan } /** - *

      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.

      + * 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.

      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.

      * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -407,6 +450,9 @@ public _FinalStage integrationSpecificConfig(Map integrationSp return this; } + /** + *

      A JSON object containing integration-specific configuration options.

      + */ @java.lang.Override @JsonSetter(value = "integration_specific_config", nulls = Nulls.SKIP) public _FinalStage integrationSpecificConfig(Optional> integrationSpecificConfig) { @@ -424,6 +470,9 @@ public _FinalStage areSyncsDisabled(Boolean areSyncsDisabled) { return this; } + /** + *

      The boolean that indicates whether initial, periodic, and force syncs will be disabled.

      + */ @java.lang.Override @JsonSetter(value = "are_syncs_disabled", nulls = Nulls.SKIP) public _FinalStage areSyncsDisabled(Optional areSyncsDisabled) { @@ -440,14 +489,21 @@ public _FinalStage areSyncsDisabled(Optional areSyncsDisabled) { * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override - public _FinalStage language(LanguageEnum language) { + public _FinalStage language(EndUserDetailsRequestLanguage language) { this.language = Optional.ofNullable(language); return this; } + /** + *

      The following subset of IETF language tags can be used to configure localization.

      + *
        + *
      • en - en
      • + *
      • de - de
      • + *
      + */ @java.lang.Override @JsonSetter(value = "language", nulls = Nulls.SKIP) - public _FinalStage language(Optional language) { + public _FinalStage language(Optional language) { this.language = language; return this; } @@ -463,6 +519,9 @@ public _FinalStage categoryCommonModelScopes( return this; } + /** + *

      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.

      + */ @java.lang.Override @JsonSetter(value = "category_common_model_scopes", nulls = Nulls.SKIP) public _FinalStage categoryCommonModelScopes( @@ -482,6 +541,9 @@ public _FinalStage commonModels(List commonModels) return this; } + /** + *

      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.

      + */ @java.lang.Override @JsonSetter(value = "common_models", nulls = Nulls.SKIP) public _FinalStage commonModels(Optional> commonModels) { @@ -499,6 +561,9 @@ public _FinalStage hideAdminMagicLink(Boolean hideAdminMagicLink) { return this; } + /** + *

      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.

      + */ @java.lang.Override @JsonSetter(value = "hide_admin_magic_link", nulls = Nulls.SKIP) public _FinalStage hideAdminMagicLink(Optional hideAdminMagicLink) { @@ -516,6 +581,9 @@ public _FinalStage shouldCreateMagicLinkUrl(Boolean shouldCreateMagicLinkUrl) { return this; } + /** + *

      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.

      + */ @java.lang.Override @JsonSetter(value = "should_create_magic_link_url", nulls = Nulls.SKIP) public _FinalStage shouldCreateMagicLinkUrl(Optional shouldCreateMagicLinkUrl) { @@ -533,6 +601,9 @@ public _FinalStage linkExpiryMins(Integer linkExpiryMins) { return this; } + /** + *

      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.

      + */ @java.lang.Override @JsonSetter(value = "link_expiry_mins", nulls = Nulls.SKIP) public _FinalStage linkExpiryMins(Optional linkExpiryMins) { @@ -550,6 +621,9 @@ public _FinalStage integration(String integration) { return this; } + /** + *

      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/.

      + */ @java.lang.Override @JsonSetter(value = "integration", nulls = Nulls.SKIP) public _FinalStage integration(Optional integration) { @@ -577,6 +651,9 @@ public _FinalStage addCategories(CategoriesEnum categories) { return this; } + /** + *

      The integration categories to show in Merge Link.

      + */ @java.lang.Override @JsonSetter(value = "categories", nulls = Nulls.SKIP) public _FinalStage categories(List categories) { diff --git a/src/main/java/com/merge/api/filestorage/types/EndUserDetailsRequestLanguage.java b/src/main/java/com/merge/api/filestorage/types/EndUserDetailsRequestLanguage.java new file mode 100644 index 000000000..27bc13b2c --- /dev/null +++ b/src/main/java/com/merge/api/filestorage/types/EndUserDetailsRequestLanguage.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.filestorage.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EndUserDetailsRequestLanguage.Deserializer.class) +public final class EndUserDetailsRequestLanguage { + private final Object value; + + private final int type; + + private EndUserDetailsRequestLanguage(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((LanguageEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EndUserDetailsRequestLanguage && equalTo((EndUserDetailsRequestLanguage) other); + } + + private boolean equalTo(EndUserDetailsRequestLanguage other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EndUserDetailsRequestLanguage of(LanguageEnum value) { + return new EndUserDetailsRequestLanguage(value, 0); + } + + public static EndUserDetailsRequestLanguage of(String value) { + return new EndUserDetailsRequestLanguage(value, 1); + } + + public interface Visitor { + T visit(LanguageEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EndUserDetailsRequestLanguage.class); + } + + @java.lang.Override + public EndUserDetailsRequestLanguage deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, LanguageEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/filestorage/types/EventTypeEnum.java b/src/main/java/com/merge/api/filestorage/types/EventTypeEnum.java index 2abea1fa4..a184534bf 100644 --- a/src/main/java/com/merge/api/filestorage/types/EventTypeEnum.java +++ b/src/main/java/com/merge/api/filestorage/types/EventTypeEnum.java @@ -16,6 +16,8 @@ public enum EventTypeEnum { REGENERATED_PRODUCTION_API_KEY("REGENERATED_PRODUCTION_API_KEY"), + REGENERATED_WEBHOOK_SIGNATURE("REGENERATED_WEBHOOK_SIGNATURE"), + INVITED_USER("INVITED_USER"), TWO_FACTOR_AUTH_ENABLED("TWO_FACTOR_AUTH_ENABLED"), diff --git a/src/main/java/com/merge/api/filestorage/types/FieldMappingsRetrieveRequest.java b/src/main/java/com/merge/api/filestorage/types/FieldMappingsRetrieveRequest.java index 87f7e26ef..cbbcae4e7 100644 --- a/src/main/java/com/merge/api/filestorage/types/FieldMappingsRetrieveRequest.java +++ b/src/main/java/com/merge/api/filestorage/types/FieldMappingsRetrieveRequest.java @@ -81,6 +81,9 @@ public Builder from(FieldMappingsRetrieveRequest other) { return this; } + /** + *

      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.

      + */ @JsonSetter(value = "exclude_remote_field_metadata", nulls = Nulls.SKIP) public Builder excludeRemoteFieldMetadata(Optional excludeRemoteFieldMetadata) { this.excludeRemoteFieldMetadata = excludeRemoteFieldMetadata; diff --git a/src/main/java/com/merge/api/filestorage/types/File.java b/src/main/java/com/merge/api/filestorage/types/File.java index 8913f8d97..7bc6f1fe2 100644 --- a/src/main/java/com/merge/api/filestorage/types/File.java +++ b/src/main/java/com/merge/api/filestorage/types/File.java @@ -45,6 +45,8 @@ public final class File { private final Optional folder; + private final Optional> checksum; + private final Optional permissions; private final Optional drive; @@ -73,6 +75,7 @@ private File( Optional mimeType, Optional description, Optional folder, + Optional> checksum, Optional permissions, Optional drive, Optional remoteCreatedAt, @@ -92,6 +95,7 @@ private File( this.mimeType = mimeType; this.description = description; this.folder = folder; + this.checksum = checksum; this.permissions = permissions; this.drive = drive; this.remoteCreatedAt = remoteCreatedAt; @@ -187,6 +191,14 @@ public Optional getFolder() { return folder; } + /** + * @return This field stores file checksum data. 'type' indicates the algorithm (e.g. crc_32, sha1, sha256, quickXor, or md5), and 'content_hash' is the unique hash used to verify file integrity and detect alterations. + */ + @JsonProperty("checksum") + public Optional> getChecksum() { + return checksum; + } + /** * @return The Permission object is used to represent a user's or group's access to a File or Folder. Permissions are unexpanded by default. Use the query param expand=permissions to see more details under GET /files. */ @@ -260,6 +272,7 @@ private boolean equalTo(File other) { && mimeType.equals(other.mimeType) && description.equals(other.description) && folder.equals(other.folder) + && checksum.equals(other.checksum) && permissions.equals(other.permissions) && drive.equals(other.drive) && remoteCreatedAt.equals(other.remoteCreatedAt) @@ -283,6 +296,7 @@ public int hashCode() { this.mimeType, this.description, this.folder, + this.checksum, this.permissions, this.drive, this.remoteCreatedAt, @@ -325,6 +339,8 @@ public static final class Builder { private Optional folder = Optional.empty(); + private Optional> checksum = Optional.empty(); + private Optional permissions = Optional.empty(); private Optional drive = Optional.empty(); @@ -356,6 +372,7 @@ public Builder from(File other) { mimeType(other.getMimeType()); description(other.getDescription()); folder(other.getFolder()); + checksum(other.getChecksum()); permissions(other.getPermissions()); drive(other.getDrive()); remoteCreatedAt(other.getRemoteCreatedAt()); @@ -377,6 +394,9 @@ public Builder id(String id) { return this; } + /** + *

      The third-party API ID of the matching object.

      + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -388,6 +408,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

      The datetime that this object was created by Merge.

      + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -399,6 +422,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

      The datetime that this object was modified by Merge.

      + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -410,6 +436,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

      The file's name.

      + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -421,6 +450,9 @@ public Builder name(String name) { return this; } + /** + *

      The URL to access the file.

      + */ @JsonSetter(value = "file_url", nulls = Nulls.SKIP) public Builder fileUrl(Optional fileUrl) { this.fileUrl = fileUrl; @@ -432,6 +464,9 @@ public Builder fileUrl(String fileUrl) { return this; } + /** + *

      The URL that produces a thumbnail preview of the file. Typically an image.

      + */ @JsonSetter(value = "file_thumbnail_url", nulls = Nulls.SKIP) public Builder fileThumbnailUrl(Optional fileThumbnailUrl) { this.fileThumbnailUrl = fileThumbnailUrl; @@ -443,6 +478,9 @@ public Builder fileThumbnailUrl(String fileThumbnailUrl) { return this; } + /** + *

      The file's size, in bytes.

      + */ @JsonSetter(value = "size", nulls = Nulls.SKIP) public Builder size(Optional size) { this.size = size; @@ -454,6 +492,9 @@ public Builder size(Long size) { return this; } + /** + *

      The file's mime type.

      + */ @JsonSetter(value = "mime_type", nulls = Nulls.SKIP) public Builder mimeType(Optional mimeType) { this.mimeType = mimeType; @@ -465,6 +506,9 @@ public Builder mimeType(String mimeType) { return this; } + /** + *

      The file's description.

      + */ @JsonSetter(value = "description", nulls = Nulls.SKIP) public Builder description(Optional description) { this.description = description; @@ -476,6 +520,9 @@ public Builder description(String description) { return this; } + /** + *

      The folder that the file belongs to.

      + */ @JsonSetter(value = "folder", nulls = Nulls.SKIP) public Builder folder(Optional folder) { this.folder = folder; @@ -487,6 +534,23 @@ public Builder folder(FileFolder folder) { return this; } + /** + *

      This field stores file checksum data. 'type' indicates the algorithm (e.g. crc_32, sha1, sha256, quickXor, or md5), and 'content_hash' is the unique hash used to verify file integrity and detect alterations.

      + */ + @JsonSetter(value = "checksum", nulls = Nulls.SKIP) + public Builder checksum(Optional> checksum) { + this.checksum = checksum; + return this; + } + + public Builder checksum(Map checksum) { + this.checksum = Optional.ofNullable(checksum); + return this; + } + + /** + *

      The Permission object is used to represent a user's or group's access to a File or Folder. Permissions are unexpanded by default. Use the query param expand=permissions to see more details under GET /files.

      + */ @JsonSetter(value = "permissions", nulls = Nulls.SKIP) public Builder permissions(Optional permissions) { this.permissions = permissions; @@ -498,6 +562,9 @@ public Builder permissions(FilePermissions permissions) { return this; } + /** + *

      The drive that the file belongs to.

      + */ @JsonSetter(value = "drive", nulls = Nulls.SKIP) public Builder drive(Optional drive) { this.drive = drive; @@ -509,6 +576,9 @@ public Builder drive(FileDrive drive) { return this; } + /** + *

      When the third party's file was created.

      + */ @JsonSetter(value = "remote_created_at", nulls = Nulls.SKIP) public Builder remoteCreatedAt(Optional remoteCreatedAt) { this.remoteCreatedAt = remoteCreatedAt; @@ -520,6 +590,9 @@ public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { return this; } + /** + *

      When the third party's file was updated.

      + */ @JsonSetter(value = "remote_updated_at", nulls = Nulls.SKIP) public Builder remoteUpdatedAt(Optional remoteUpdatedAt) { this.remoteUpdatedAt = remoteUpdatedAt; @@ -531,6 +604,9 @@ public Builder remoteUpdatedAt(OffsetDateTime remoteUpdatedAt) { return this; } + /** + *

      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.

      + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; @@ -577,6 +653,7 @@ public File build() { mimeType, description, folder, + checksum, permissions, drive, remoteCreatedAt, diff --git a/src/main/java/com/merge/api/filestorage/types/FileRequest.java b/src/main/java/com/merge/api/filestorage/types/FileRequest.java index 39aaa69ed..7839c31cd 100644 --- a/src/main/java/com/merge/api/filestorage/types/FileRequest.java +++ b/src/main/java/com/merge/api/filestorage/types/FileRequest.java @@ -35,6 +35,8 @@ public final class FileRequest { private final Optional folder; + private final Optional> checksum; + private final Optional permissions; private final Optional drive; @@ -53,6 +55,7 @@ private FileRequest( Optional mimeType, Optional description, Optional folder, + Optional> checksum, Optional permissions, Optional drive, Optional> integrationParams, @@ -65,6 +68,7 @@ private FileRequest( this.mimeType = mimeType; this.description = description; this.folder = folder; + this.checksum = checksum; this.permissions = permissions; this.drive = drive; this.integrationParams = integrationParams; @@ -128,6 +132,14 @@ public Optional getFolder() { return folder; } + /** + * @return This field stores file checksum data. 'type' indicates the algorithm (e.g. crc_32, sha1, sha256, quickXor, or md5), and 'content_hash' is the unique hash used to verify file integrity and detect alterations. + */ + @JsonProperty("checksum") + public Optional> getChecksum() { + return checksum; + } + /** * @return The Permission object is used to represent a user's or group's access to a File or Folder. Permissions are unexpanded by default. Use the query param expand=permissions to see more details under GET /files. */ @@ -173,6 +185,7 @@ private boolean equalTo(FileRequest other) { && mimeType.equals(other.mimeType) && description.equals(other.description) && folder.equals(other.folder) + && checksum.equals(other.checksum) && permissions.equals(other.permissions) && drive.equals(other.drive) && integrationParams.equals(other.integrationParams) @@ -189,6 +202,7 @@ public int hashCode() { this.mimeType, this.description, this.folder, + this.checksum, this.permissions, this.drive, this.integrationParams, @@ -220,6 +234,8 @@ public static final class Builder { private Optional folder = Optional.empty(); + private Optional> checksum = Optional.empty(); + private Optional permissions = Optional.empty(); private Optional drive = Optional.empty(); @@ -241,6 +257,7 @@ public Builder from(FileRequest other) { mimeType(other.getMimeType()); description(other.getDescription()); folder(other.getFolder()); + checksum(other.getChecksum()); permissions(other.getPermissions()); drive(other.getDrive()); integrationParams(other.getIntegrationParams()); @@ -248,6 +265,9 @@ public Builder from(FileRequest other) { return this; } + /** + *

      The file's name.

      + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -259,6 +279,9 @@ public Builder name(String name) { return this; } + /** + *

      The URL to access the file.

      + */ @JsonSetter(value = "file_url", nulls = Nulls.SKIP) public Builder fileUrl(Optional fileUrl) { this.fileUrl = fileUrl; @@ -270,6 +293,9 @@ public Builder fileUrl(String fileUrl) { return this; } + /** + *

      The URL that produces a thumbnail preview of the file. Typically an image.

      + */ @JsonSetter(value = "file_thumbnail_url", nulls = Nulls.SKIP) public Builder fileThumbnailUrl(Optional fileThumbnailUrl) { this.fileThumbnailUrl = fileThumbnailUrl; @@ -281,6 +307,9 @@ public Builder fileThumbnailUrl(String fileThumbnailUrl) { return this; } + /** + *

      The file's size, in bytes.

      + */ @JsonSetter(value = "size", nulls = Nulls.SKIP) public Builder size(Optional size) { this.size = size; @@ -292,6 +321,9 @@ public Builder size(Long size) { return this; } + /** + *

      The file's mime type.

      + */ @JsonSetter(value = "mime_type", nulls = Nulls.SKIP) public Builder mimeType(Optional mimeType) { this.mimeType = mimeType; @@ -303,6 +335,9 @@ public Builder mimeType(String mimeType) { return this; } + /** + *

      The file's description.

      + */ @JsonSetter(value = "description", nulls = Nulls.SKIP) public Builder description(Optional description) { this.description = description; @@ -314,6 +349,9 @@ public Builder description(String description) { return this; } + /** + *

      The folder that the file belongs to.

      + */ @JsonSetter(value = "folder", nulls = Nulls.SKIP) public Builder folder(Optional folder) { this.folder = folder; @@ -325,6 +363,23 @@ public Builder folder(FileRequestFolder folder) { return this; } + /** + *

      This field stores file checksum data. 'type' indicates the algorithm (e.g. crc_32, sha1, sha256, quickXor, or md5), and 'content_hash' is the unique hash used to verify file integrity and detect alterations.

      + */ + @JsonSetter(value = "checksum", nulls = Nulls.SKIP) + public Builder checksum(Optional> checksum) { + this.checksum = checksum; + return this; + } + + public Builder checksum(Map checksum) { + this.checksum = Optional.ofNullable(checksum); + return this; + } + + /** + *

      The Permission object is used to represent a user's or group's access to a File or Folder. Permissions are unexpanded by default. Use the query param expand=permissions to see more details under GET /files.

      + */ @JsonSetter(value = "permissions", nulls = Nulls.SKIP) public Builder permissions(Optional permissions) { this.permissions = permissions; @@ -336,6 +391,9 @@ public Builder permissions(FileRequestPermissions permissions) { return this; } + /** + *

      The drive that the file belongs to.

      + */ @JsonSetter(value = "drive", nulls = Nulls.SKIP) public Builder drive(Optional drive) { this.drive = drive; @@ -378,6 +436,7 @@ public FileRequest build() { mimeType, description, folder, + checksum, permissions, drive, integrationParams, diff --git a/src/main/java/com/merge/api/filestorage/types/FileStorageFileEndpointRequest.java b/src/main/java/com/merge/api/filestorage/types/FileStorageFileEndpointRequest.java index e3f654970..062476407 100644 --- a/src/main/java/com/merge/api/filestorage/types/FileStorageFileEndpointRequest.java +++ b/src/main/java/com/merge/api/filestorage/types/FileStorageFileEndpointRequest.java @@ -99,10 +99,16 @@ public interface ModelStage { public interface _FinalStage { FileStorageFileEndpointRequest build(); + /** + *

      Whether to include debug fields (such as log file links) in the response.

      + */ _FinalStage isDebugMode(Optional isDebugMode); _FinalStage isDebugMode(Boolean isDebugMode); + /** + *

      Whether or not third-party updates should be run asynchronously.

      + */ _FinalStage runAsync(Optional runAsync); _FinalStage runAsync(Boolean runAsync); @@ -146,6 +152,9 @@ public _FinalStage runAsync(Boolean runAsync) { return this; } + /** + *

      Whether or not third-party updates should be run asynchronously.

      + */ @java.lang.Override @JsonSetter(value = "run_async", nulls = Nulls.SKIP) public _FinalStage runAsync(Optional runAsync) { @@ -163,6 +172,9 @@ public _FinalStage isDebugMode(Boolean isDebugMode) { return this; } + /** + *

      Whether to include debug fields (such as log file links) in the response.

      + */ @java.lang.Override @JsonSetter(value = "is_debug_mode", nulls = Nulls.SKIP) public _FinalStage isDebugMode(Optional isDebugMode) { diff --git a/src/main/java/com/merge/api/filestorage/types/FileStorageFolderEndpointRequest.java b/src/main/java/com/merge/api/filestorage/types/FileStorageFolderEndpointRequest.java index 2a435610c..8b84dee78 100644 --- a/src/main/java/com/merge/api/filestorage/types/FileStorageFolderEndpointRequest.java +++ b/src/main/java/com/merge/api/filestorage/types/FileStorageFolderEndpointRequest.java @@ -99,10 +99,16 @@ public interface ModelStage { public interface _FinalStage { FileStorageFolderEndpointRequest build(); + /** + *

      Whether to include debug fields (such as log file links) in the response.

      + */ _FinalStage isDebugMode(Optional isDebugMode); _FinalStage isDebugMode(Boolean isDebugMode); + /** + *

      Whether or not third-party updates should be run asynchronously.

      + */ _FinalStage runAsync(Optional runAsync); _FinalStage runAsync(Boolean runAsync); @@ -146,6 +152,9 @@ public _FinalStage runAsync(Boolean runAsync) { return this; } + /** + *

      Whether or not third-party updates should be run asynchronously.

      + */ @java.lang.Override @JsonSetter(value = "run_async", nulls = Nulls.SKIP) public _FinalStage runAsync(Optional runAsync) { @@ -163,6 +172,9 @@ public _FinalStage isDebugMode(Boolean isDebugMode) { return this; } + /** + *

      Whether to include debug fields (such as log file links) in the response.

      + */ @java.lang.Override @JsonSetter(value = "is_debug_mode", nulls = Nulls.SKIP) public _FinalStage isDebugMode(Optional isDebugMode) { diff --git a/src/main/java/com/merge/api/filestorage/types/FilesDownloadRequestMetaListRequest.java b/src/main/java/com/merge/api/filestorage/types/FilesDownloadRequestMetaListRequest.java index b645b68f1..61a65f80b 100644 --- a/src/main/java/com/merge/api/filestorage/types/FilesDownloadRequestMetaListRequest.java +++ b/src/main/java/com/merge/api/filestorage/types/FilesDownloadRequestMetaListRequest.java @@ -20,29 +20,65 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FilesDownloadRequestMetaListRequest.Builder.class) public final class FilesDownloadRequestMetaListRequest { + private final Optional createdAfter; + + private final Optional createdBefore; + private final Optional cursor; private final Optional includeDeletedData; - private final Optional mimeType; + private final Optional mimeTypes; + + private final Optional modifiedAfter; + + private final Optional modifiedBefore; + + private final Optional orderBy; private final Optional pageSize; private final Map additionalProperties; private FilesDownloadRequestMetaListRequest( + Optional createdAfter, + Optional createdBefore, Optional cursor, Optional includeDeletedData, - Optional mimeType, + Optional mimeTypes, + Optional modifiedAfter, + Optional modifiedBefore, + Optional orderBy, Optional pageSize, Map additionalProperties) { + this.createdAfter = createdAfter; + this.createdBefore = createdBefore; this.cursor = cursor; this.includeDeletedData = includeDeletedData; - this.mimeType = mimeType; + this.mimeTypes = mimeTypes; + this.modifiedAfter = modifiedAfter; + this.modifiedBefore = modifiedBefore; + this.orderBy = orderBy; this.pageSize = pageSize; this.additionalProperties = additionalProperties; } + /** + * @return If provided, will only return objects created after this datetime. + */ + @JsonProperty("created_after") + public Optional getCreatedAfter() { + return createdAfter; + } + + /** + * @return If provided, will only return objects created before this datetime. + */ + @JsonProperty("created_before") + public Optional getCreatedBefore() { + return createdBefore; + } + /** * @return The pagination cursor value. */ @@ -60,11 +96,35 @@ public Optional getIncludeDeletedData() { } /** - * @return If provided, specifies the export format of the files to be downloaded. For information on supported export formats, please refer to our <a href='https://help.merge.dev/en/articles/8615316-file-export-and-download-specification' target='_blank'>export format help center article</a>. + * @return A comma-separated list of preferred MIME types in order of priority. If supported by the third-party provider, the file(s) will be returned in the first supported MIME type from the list. The default MIME type is PDF. To see supported MIME types by file type, refer to our <a href='https://help.merge.dev/en/articles/8615316-file-export-and-download-specification' target='_blank'>export format help center article</a>. + */ + @JsonProperty("mime_types") + public Optional getMimeTypes() { + return mimeTypes; + } + + /** + * @return If provided, will only return objects modified after this datetime. + */ + @JsonProperty("modified_after") + public Optional getModifiedAfter() { + return modifiedAfter; + } + + /** + * @return If provided, will only return objects modified before this datetime. */ - @JsonProperty("mime_type") - public Optional getMimeType() { - return mimeType; + @JsonProperty("modified_before") + public Optional getModifiedBefore() { + return modifiedBefore; + } + + /** + * @return Overrides the default ordering for this endpoint. Possible values include: created_at, -created_at, modified_at, -modified_at. + */ + @JsonProperty("order_by") + public Optional getOrderBy() { + return orderBy; } /** @@ -88,15 +148,29 @@ public Map getAdditionalProperties() { } private boolean equalTo(FilesDownloadRequestMetaListRequest other) { - return cursor.equals(other.cursor) + return createdAfter.equals(other.createdAfter) + && createdBefore.equals(other.createdBefore) + && cursor.equals(other.cursor) && includeDeletedData.equals(other.includeDeletedData) - && mimeType.equals(other.mimeType) + && mimeTypes.equals(other.mimeTypes) + && modifiedAfter.equals(other.modifiedAfter) + && modifiedBefore.equals(other.modifiedBefore) + && orderBy.equals(other.orderBy) && pageSize.equals(other.pageSize); } @java.lang.Override public int hashCode() { - return Objects.hash(this.cursor, this.includeDeletedData, this.mimeType, this.pageSize); + return Objects.hash( + this.createdAfter, + this.createdBefore, + this.cursor, + this.includeDeletedData, + this.mimeTypes, + this.modifiedAfter, + this.modifiedBefore, + this.orderBy, + this.pageSize); } @java.lang.Override @@ -110,11 +184,21 @@ public static Builder builder() { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder { + private Optional createdAfter = Optional.empty(); + + private Optional createdBefore = Optional.empty(); + private Optional cursor = Optional.empty(); private Optional includeDeletedData = Optional.empty(); - private Optional mimeType = Optional.empty(); + private Optional mimeTypes = Optional.empty(); + + private Optional modifiedAfter = Optional.empty(); + + private Optional modifiedBefore = Optional.empty(); + + private Optional orderBy = Optional.empty(); private Optional pageSize = Optional.empty(); @@ -124,13 +208,49 @@ public static final class Builder { private Builder() {} public Builder from(FilesDownloadRequestMetaListRequest other) { + createdAfter(other.getCreatedAfter()); + createdBefore(other.getCreatedBefore()); cursor(other.getCursor()); includeDeletedData(other.getIncludeDeletedData()); - mimeType(other.getMimeType()); + mimeTypes(other.getMimeTypes()); + modifiedAfter(other.getModifiedAfter()); + modifiedBefore(other.getModifiedBefore()); + orderBy(other.getOrderBy()); pageSize(other.getPageSize()); return this; } + /** + *

      If provided, will only return objects created after this datetime.

      + */ + @JsonSetter(value = "created_after", nulls = Nulls.SKIP) + public Builder createdAfter(Optional createdAfter) { + this.createdAfter = createdAfter; + return this; + } + + public Builder createdAfter(String createdAfter) { + this.createdAfter = Optional.ofNullable(createdAfter); + return this; + } + + /** + *

      If provided, will only return objects created before this datetime.

      + */ + @JsonSetter(value = "created_before", nulls = Nulls.SKIP) + public Builder createdBefore(Optional createdBefore) { + this.createdBefore = createdBefore; + return this; + } + + public Builder createdBefore(String createdBefore) { + this.createdBefore = Optional.ofNullable(createdBefore); + return this; + } + + /** + *

      The pagination cursor value.

      + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -142,6 +262,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

      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.

      + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -153,17 +276,65 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } - @JsonSetter(value = "mime_type", nulls = Nulls.SKIP) - public Builder mimeType(Optional mimeType) { - this.mimeType = mimeType; + /** + *

      A comma-separated list of preferred MIME types in order of priority. If supported by the third-party provider, the file(s) will be returned in the first supported MIME type from the list. The default MIME type is PDF. To see supported MIME types by file type, refer to our <a href='https://help.merge.dev/en/articles/8615316-file-export-and-download-specification' target='_blank'>export format help center article</a>.

      + */ + @JsonSetter(value = "mime_types", nulls = Nulls.SKIP) + public Builder mimeTypes(Optional mimeTypes) { + this.mimeTypes = mimeTypes; + return this; + } + + public Builder mimeTypes(String mimeTypes) { + this.mimeTypes = Optional.ofNullable(mimeTypes); + return this; + } + + /** + *

      If provided, will only return objects modified after this datetime.

      + */ + @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) + public Builder modifiedAfter(Optional modifiedAfter) { + this.modifiedAfter = modifiedAfter; + return this; + } + + public Builder modifiedAfter(String modifiedAfter) { + this.modifiedAfter = Optional.ofNullable(modifiedAfter); + return this; + } + + /** + *

      If provided, will only return objects modified before this datetime.

      + */ + @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) + public Builder modifiedBefore(Optional modifiedBefore) { + this.modifiedBefore = modifiedBefore; + return this; + } + + public Builder modifiedBefore(String modifiedBefore) { + this.modifiedBefore = Optional.ofNullable(modifiedBefore); + return this; + } + + /** + *

      Overrides the default ordering for this endpoint. Possible values include: created_at, -created_at, modified_at, -modified_at.

      + */ + @JsonSetter(value = "order_by", nulls = Nulls.SKIP) + public Builder orderBy(Optional orderBy) { + this.orderBy = orderBy; return this; } - public Builder mimeType(String mimeType) { - this.mimeType = Optional.ofNullable(mimeType); + public Builder orderBy(FilesDownloadRequestMetaListRequestOrderBy orderBy) { + this.orderBy = Optional.ofNullable(orderBy); return this; } + /** + *

      Number of results to return per page.

      + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -177,7 +348,16 @@ public Builder pageSize(Integer pageSize) { public FilesDownloadRequestMetaListRequest build() { return new FilesDownloadRequestMetaListRequest( - cursor, includeDeletedData, mimeType, pageSize, additionalProperties); + createdAfter, + createdBefore, + cursor, + includeDeletedData, + mimeTypes, + modifiedAfter, + modifiedBefore, + orderBy, + pageSize, + additionalProperties); } } } diff --git a/src/main/java/com/merge/api/filestorage/types/FilesDownloadRequestMetaListRequestOrderBy.java b/src/main/java/com/merge/api/filestorage/types/FilesDownloadRequestMetaListRequestOrderBy.java new file mode 100644 index 000000000..d60af02b9 --- /dev/null +++ b/src/main/java/com/merge/api/filestorage/types/FilesDownloadRequestMetaListRequestOrderBy.java @@ -0,0 +1,28 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.filestorage.types; + +import com.fasterxml.jackson.annotation.JsonValue; + +public enum FilesDownloadRequestMetaListRequestOrderBy { + CREATED_AT_DESCENDING("-created_at"), + + MODIFIED_AT_DESCENDING("-modified_at"), + + CREATED_AT_ASCENDING("created_at"), + + MODIFIED_AT_ASCENDING("modified_at"); + + private final String value; + + FilesDownloadRequestMetaListRequestOrderBy(String value) { + this.value = value; + } + + @JsonValue + @java.lang.Override + public String toString() { + return this.value; + } +} diff --git a/src/main/java/com/merge/api/filestorage/types/FilesDownloadRequestMetaRetrieveRequest.java b/src/main/java/com/merge/api/filestorage/types/FilesDownloadRequestMetaRetrieveRequest.java index a65d919f3..b6735214d 100644 --- a/src/main/java/com/merge/api/filestorage/types/FilesDownloadRequestMetaRetrieveRequest.java +++ b/src/main/java/com/merge/api/filestorage/types/FilesDownloadRequestMetaRetrieveRequest.java @@ -82,6 +82,9 @@ public Builder from(FilesDownloadRequestMetaRetrieveRequest other) { return this; } + /** + *

      If provided, specifies the export format of the file to be downloaded. For information on supported export formats, please refer to our <a href='https://help.merge.dev/en/articles/8615316-file-export-and-download-specification' target='_blank'>export format help center article</a>.

      + */ @JsonSetter(value = "mime_type", nulls = Nulls.SKIP) public Builder mimeType(Optional mimeType) { this.mimeType = mimeType; diff --git a/src/main/java/com/merge/api/filestorage/types/FilesDownloadRetrieveRequest.java b/src/main/java/com/merge/api/filestorage/types/FilesDownloadRetrieveRequest.java index adbe6f25a..ebd8db16b 100644 --- a/src/main/java/com/merge/api/filestorage/types/FilesDownloadRetrieveRequest.java +++ b/src/main/java/com/merge/api/filestorage/types/FilesDownloadRetrieveRequest.java @@ -95,6 +95,9 @@ public Builder from(FilesDownloadRetrieveRequest other) { return this; } + /** + *

      Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

      + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -106,6 +109,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

      If provided, specifies the export format of the file to be downloaded. For information on supported export formats, please refer to our <a href='https://help.merge.dev/en/articles/8615316-file-export-and-download-specification' target='_blank'>export format help center article</a>.

      + */ @JsonSetter(value = "mime_type", nulls = Nulls.SKIP) public Builder mimeType(Optional mimeType) { this.mimeType = mimeType; diff --git a/src/main/java/com/merge/api/filestorage/types/FilesListRequest.java b/src/main/java/com/merge/api/filestorage/types/FilesListRequest.java index abe6f9ac2..463de88d9 100644 --- a/src/main/java/com/merge/api/filestorage/types/FilesListRequest.java +++ b/src/main/java/com/merge/api/filestorage/types/FilesListRequest.java @@ -49,6 +49,8 @@ public final class FilesListRequest { private final Optional name; + private final Optional orderBy; + private final Optional pageSize; private final Optional remoteId; @@ -69,6 +71,7 @@ private FilesListRequest( Optional modifiedAfter, Optional modifiedBefore, Optional name, + Optional orderBy, Optional pageSize, Optional remoteId, Map additionalProperties) { @@ -85,6 +88,7 @@ private FilesListRequest( this.modifiedAfter = modifiedAfter; this.modifiedBefore = modifiedBefore; this.name = name; + this.orderBy = orderBy; this.pageSize = pageSize; this.remoteId = remoteId; this.additionalProperties = additionalProperties; @@ -194,6 +198,14 @@ public Optional getName() { return name; } + /** + * @return Overrides the default ordering for this endpoint. Possible values include: created_at, -created_at, modified_at, -modified_at. + */ + @JsonProperty("order_by") + public Optional getOrderBy() { + return orderBy; + } + /** * @return Number of results to return per page. */ @@ -235,6 +247,7 @@ private boolean equalTo(FilesListRequest other) { && modifiedAfter.equals(other.modifiedAfter) && modifiedBefore.equals(other.modifiedBefore) && name.equals(other.name) + && orderBy.equals(other.orderBy) && pageSize.equals(other.pageSize) && remoteId.equals(other.remoteId); } @@ -255,6 +268,7 @@ public int hashCode() { this.modifiedAfter, this.modifiedBefore, this.name, + this.orderBy, this.pageSize, this.remoteId); } @@ -296,6 +310,8 @@ public static final class Builder { private Optional name = Optional.empty(); + private Optional orderBy = Optional.empty(); + private Optional pageSize = Optional.empty(); private Optional remoteId = Optional.empty(); @@ -319,11 +335,15 @@ public Builder from(FilesListRequest other) { modifiedAfter(other.getModifiedAfter()); modifiedBefore(other.getModifiedBefore()); name(other.getName()); + orderBy(other.getOrderBy()); pageSize(other.getPageSize()); remoteId(other.getRemoteId()); return this; } + /** + *

      Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

      + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -340,6 +360,9 @@ public Builder expand(FilesListRequestExpandItem expand) { return this; } + /** + *

      If provided, will only return objects created after this datetime.

      + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -351,6 +374,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

      If provided, will only return objects created before this datetime.

      + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -362,6 +388,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

      The pagination cursor value.

      + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -373,6 +402,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

      Specifying a drive id returns only the files in that drive. Specifying null returns only the files outside the top-level drive.

      + */ @JsonSetter(value = "drive_id", nulls = Nulls.SKIP) public Builder driveId(Optional driveId) { this.driveId = driveId; @@ -384,6 +416,9 @@ public Builder driveId(String driveId) { return this; } + /** + *

      Specifying a folder id returns only the files in that folder. Specifying null returns only the files in root directory.

      + */ @JsonSetter(value = "folder_id", nulls = Nulls.SKIP) public Builder folderId(Optional folderId) { this.folderId = folderId; @@ -395,6 +430,9 @@ public Builder folderId(String folderId) { return this; } + /** + *

      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.

      + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -406,6 +444,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

      Whether to include the original data Merge fetched from the third-party to produce these models.

      + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -417,6 +458,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

      Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

      + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -428,6 +472,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

      If provided, will only return files with these mime_types. Multiple values can be separated by commas.

      + */ @JsonSetter(value = "mime_type", nulls = Nulls.SKIP) public Builder mimeType(Optional mimeType) { this.mimeType = mimeType; @@ -439,6 +486,9 @@ public Builder mimeType(String mimeType) { return this; } + /** + *

      If provided, only objects synced by Merge after this date time will be returned.

      + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -450,6 +500,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

      If provided, only objects synced by Merge before this date time will be returned.

      + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -461,6 +514,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

      If provided, will only return files with this name. This performs an exact match.

      + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -472,6 +528,23 @@ public Builder name(String name) { return this; } + /** + *

      Overrides the default ordering for this endpoint. Possible values include: created_at, -created_at, modified_at, -modified_at.

      + */ + @JsonSetter(value = "order_by", nulls = Nulls.SKIP) + public Builder orderBy(Optional orderBy) { + this.orderBy = orderBy; + return this; + } + + public Builder orderBy(FilesListRequestOrderBy orderBy) { + this.orderBy = Optional.ofNullable(orderBy); + return this; + } + + /** + *

      Number of results to return per page.

      + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -483,6 +556,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

      The API provider's ID for the given object.

      + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -509,6 +585,7 @@ public FilesListRequest build() { modifiedAfter, modifiedBefore, name, + orderBy, pageSize, remoteId, additionalProperties); diff --git a/src/main/java/com/merge/api/filestorage/types/FilesListRequestOrderBy.java b/src/main/java/com/merge/api/filestorage/types/FilesListRequestOrderBy.java new file mode 100644 index 000000000..b2aee1d9b --- /dev/null +++ b/src/main/java/com/merge/api/filestorage/types/FilesListRequestOrderBy.java @@ -0,0 +1,28 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.filestorage.types; + +import com.fasterxml.jackson.annotation.JsonValue; + +public enum FilesListRequestOrderBy { + CREATED_AT_DESCENDING("-created_at"), + + MODIFIED_AT_DESCENDING("-modified_at"), + + CREATED_AT_ASCENDING("created_at"), + + MODIFIED_AT_ASCENDING("modified_at"); + + private final String value; + + FilesListRequestOrderBy(String value) { + this.value = value; + } + + @JsonValue + @java.lang.Override + public String toString() { + return this.value; + } +} diff --git a/src/main/java/com/merge/api/filestorage/types/FilesRetrieveRequest.java b/src/main/java/com/merge/api/filestorage/types/FilesRetrieveRequest.java index ac186bd0e..61d6c0dd2 100644 --- a/src/main/java/com/merge/api/filestorage/types/FilesRetrieveRequest.java +++ b/src/main/java/com/merge/api/filestorage/types/FilesRetrieveRequest.java @@ -116,6 +116,9 @@ public Builder from(FilesRetrieveRequest other) { return this; } + /** + *

      Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

      + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -132,6 +135,9 @@ public Builder expand(FilesRetrieveRequestExpandItem expand) { return this; } + /** + *

      Whether to include the original data Merge fetched from the third-party to produce these models.

      + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -143,6 +149,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

      Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

      + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/filestorage/types/Folder.java b/src/main/java/com/merge/api/filestorage/types/Folder.java index 8d607ed9c..84b818411 100644 --- a/src/main/java/com/merge/api/filestorage/types/Folder.java +++ b/src/main/java/com/merge/api/filestorage/types/Folder.java @@ -343,6 +343,9 @@ public Builder id(String id) { return this; } + /** + *

      The third-party API ID of the matching object.

      + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -354,6 +357,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

      The datetime that this object was created by Merge.

      + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -365,6 +371,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

      The datetime that this object was modified by Merge.

      + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -376,6 +385,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

      The folder's name.

      + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -387,6 +399,9 @@ public Builder name(String name) { return this; } + /** + *

      The URL to access the folder.

      + */ @JsonSetter(value = "folder_url", nulls = Nulls.SKIP) public Builder folderUrl(Optional folderUrl) { this.folderUrl = folderUrl; @@ -398,6 +413,9 @@ public Builder folderUrl(String folderUrl) { return this; } + /** + *

      The folder's size, in bytes.

      + */ @JsonSetter(value = "size", nulls = Nulls.SKIP) public Builder size(Optional size) { this.size = size; @@ -409,6 +427,9 @@ public Builder size(Long size) { return this; } + /** + *

      The folder's description.

      + */ @JsonSetter(value = "description", nulls = Nulls.SKIP) public Builder description(Optional description) { this.description = description; @@ -420,6 +441,9 @@ public Builder description(String description) { return this; } + /** + *

      The folder that the folder belongs to.

      + */ @JsonSetter(value = "parent_folder", nulls = Nulls.SKIP) public Builder parentFolder(Optional parentFolder) { this.parentFolder = parentFolder; @@ -431,6 +455,9 @@ public Builder parentFolder(FolderParentFolder parentFolder) { return this; } + /** + *

      The drive that the folder belongs to.

      + */ @JsonSetter(value = "drive", nulls = Nulls.SKIP) public Builder drive(Optional drive) { this.drive = drive; @@ -442,6 +469,9 @@ public Builder drive(FolderDrive drive) { return this; } + /** + *

      The Permission object is used to represent a user's or group's access to a File or Folder. Permissions are unexpanded by default. Use the query param expand=permissions to see more details under GET /folders.

      + */ @JsonSetter(value = "permissions", nulls = Nulls.SKIP) public Builder permissions(Optional permissions) { this.permissions = permissions; @@ -453,6 +483,9 @@ public Builder permissions(FolderPermissions permissions) { return this; } + /** + *

      When the third party's folder was created.

      + */ @JsonSetter(value = "remote_created_at", nulls = Nulls.SKIP) public Builder remoteCreatedAt(Optional remoteCreatedAt) { this.remoteCreatedAt = remoteCreatedAt; @@ -464,6 +497,9 @@ public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { return this; } + /** + *

      When the third party's folder was updated.

      + */ @JsonSetter(value = "remote_updated_at", nulls = Nulls.SKIP) public Builder remoteUpdatedAt(Optional remoteUpdatedAt) { this.remoteUpdatedAt = remoteUpdatedAt; @@ -475,6 +511,9 @@ public Builder remoteUpdatedAt(OffsetDateTime remoteUpdatedAt) { return this; } + /** + *

      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.

      + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/filestorage/types/FolderRequest.java b/src/main/java/com/merge/api/filestorage/types/FolderRequest.java index eea23d03d..f1d3b71b2 100644 --- a/src/main/java/com/merge/api/filestorage/types/FolderRequest.java +++ b/src/main/java/com/merge/api/filestorage/types/FolderRequest.java @@ -214,6 +214,9 @@ public Builder from(FolderRequest other) { return this; } + /** + *

      The folder's name.

      + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -225,6 +228,9 @@ public Builder name(String name) { return this; } + /** + *

      The URL to access the folder.

      + */ @JsonSetter(value = "folder_url", nulls = Nulls.SKIP) public Builder folderUrl(Optional folderUrl) { this.folderUrl = folderUrl; @@ -236,6 +242,9 @@ public Builder folderUrl(String folderUrl) { return this; } + /** + *

      The folder's size, in bytes.

      + */ @JsonSetter(value = "size", nulls = Nulls.SKIP) public Builder size(Optional size) { this.size = size; @@ -247,6 +256,9 @@ public Builder size(Long size) { return this; } + /** + *

      The folder's description.

      + */ @JsonSetter(value = "description", nulls = Nulls.SKIP) public Builder description(Optional description) { this.description = description; @@ -258,6 +270,9 @@ public Builder description(String description) { return this; } + /** + *

      The folder that the folder belongs to.

      + */ @JsonSetter(value = "parent_folder", nulls = Nulls.SKIP) public Builder parentFolder(Optional parentFolder) { this.parentFolder = parentFolder; @@ -269,6 +284,9 @@ public Builder parentFolder(FolderRequestParentFolder parentFolder) { return this; } + /** + *

      The drive that the folder belongs to.

      + */ @JsonSetter(value = "drive", nulls = Nulls.SKIP) public Builder drive(Optional drive) { this.drive = drive; @@ -280,6 +298,9 @@ public Builder drive(FolderRequestDrive drive) { return this; } + /** + *

      The Permission object is used to represent a user's or group's access to a File or Folder. Permissions are unexpanded by default. Use the query param expand=permissions to see more details under GET /folders.

      + */ @JsonSetter(value = "permissions", nulls = Nulls.SKIP) public Builder permissions(Optional permissions) { this.permissions = permissions; diff --git a/src/main/java/com/merge/api/filestorage/types/FoldersListRequest.java b/src/main/java/com/merge/api/filestorage/types/FoldersListRequest.java index 02625e40d..a53188375 100644 --- a/src/main/java/com/merge/api/filestorage/types/FoldersListRequest.java +++ b/src/main/java/com/merge/api/filestorage/types/FoldersListRequest.java @@ -307,6 +307,9 @@ public Builder from(FoldersListRequest other) { return this; } + /** + *

      Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

      + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -323,6 +326,9 @@ public Builder expand(FoldersListRequestExpandItem expand) { return this; } + /** + *

      If provided, will only return objects created after this datetime.

      + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -334,6 +340,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

      If provided, will only return objects created before this datetime.

      + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -345,6 +354,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

      The pagination cursor value.

      + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -356,6 +368,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

      If provided, will only return folders in this drive.

      + */ @JsonSetter(value = "drive_id", nulls = Nulls.SKIP) public Builder driveId(Optional driveId) { this.driveId = driveId; @@ -367,6 +382,9 @@ public Builder driveId(String driveId) { return this; } + /** + *

      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.

      + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -378,6 +396,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

      Whether to include the original data Merge fetched from the third-party to produce these models.

      + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -389,6 +410,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

      Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

      + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -400,6 +424,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

      If provided, only objects synced by Merge after this date time will be returned.

      + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -411,6 +438,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

      If provided, only objects synced by Merge before this date time will be returned.

      + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -422,6 +452,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

      If provided, will only return folders with this name. This performs an exact match.

      + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -433,6 +466,9 @@ public Builder name(String name) { return this; } + /** + *

      Number of results to return per page.

      + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -444,6 +480,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

      If provided, will only return folders in this parent folder. If null, will return folders in root directory.

      + */ @JsonSetter(value = "parent_folder_id", nulls = Nulls.SKIP) public Builder parentFolderId(Optional parentFolderId) { this.parentFolderId = parentFolderId; @@ -455,6 +494,9 @@ public Builder parentFolderId(String parentFolderId) { return this; } + /** + *

      The API provider's ID for the given object.

      + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; diff --git a/src/main/java/com/merge/api/filestorage/types/FoldersRetrieveRequest.java b/src/main/java/com/merge/api/filestorage/types/FoldersRetrieveRequest.java index c0deea910..104ead227 100644 --- a/src/main/java/com/merge/api/filestorage/types/FoldersRetrieveRequest.java +++ b/src/main/java/com/merge/api/filestorage/types/FoldersRetrieveRequest.java @@ -116,6 +116,9 @@ public Builder from(FoldersRetrieveRequest other) { return this; } + /** + *

      Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

      + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -132,6 +135,9 @@ public Builder expand(FoldersRetrieveRequestExpandItem expand) { return this; } + /** + *

      Whether to include the original data Merge fetched from the third-party to produce these models.

      + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -143,6 +149,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

      Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

      + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/filestorage/types/GenerateRemoteKeyRequest.java b/src/main/java/com/merge/api/filestorage/types/GenerateRemoteKeyRequest.java index 874f253c1..20f1e6d22 100644 --- a/src/main/java/com/merge/api/filestorage/types/GenerateRemoteKeyRequest.java +++ b/src/main/java/com/merge/api/filestorage/types/GenerateRemoteKeyRequest.java @@ -66,6 +66,9 @@ public static NameStage builder() { } public interface NameStage { + /** + * The name of the remote key + */ _FinalStage name(@NotNull String name); Builder from(GenerateRemoteKeyRequest other); @@ -91,7 +94,7 @@ public Builder from(GenerateRemoteKeyRequest other) { } /** - *

      The name of the remote key

      + * The name of the remote key

      The name of the remote key

      * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override diff --git a/src/main/java/com/merge/api/filestorage/types/Group.java b/src/main/java/com/merge/api/filestorage/types/Group.java index 0174e679c..4a0a93c8d 100644 --- a/src/main/java/com/merge/api/filestorage/types/Group.java +++ b/src/main/java/com/merge/api/filestorage/types/Group.java @@ -242,6 +242,9 @@ public Builder id(String id) { return this; } + /** + *

      The third-party API ID of the matching object.

      + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -253,6 +256,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

      The datetime that this object was created by Merge.

      + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -264,6 +270,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

      The datetime that this object was modified by Merge.

      + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -275,6 +284,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

      The group's name.

      + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -286,6 +298,9 @@ public Builder name(String name) { return this; } + /** + *

      The users that belong in the group. If null, this typically means it's either a domain or the third-party platform does not surface this information.

      + */ @JsonSetter(value = "users", nulls = Nulls.SKIP) public Builder users(List users) { this.users.clear(); @@ -303,6 +318,9 @@ public Builder addAllUsers(List users) { return this; } + /** + *

      Groups that inherit the permissions of the parent group.

      + */ @JsonSetter(value = "child_groups", nulls = Nulls.SKIP) public Builder childGroups(Optional> childGroups) { this.childGroups = childGroups; @@ -314,6 +332,9 @@ public Builder childGroups(List childGroups) { return this; } + /** + *

      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.

      + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/filestorage/types/GroupsListRequest.java b/src/main/java/com/merge/api/filestorage/types/GroupsListRequest.java index 6b1df020e..968133545 100644 --- a/src/main/java/com/merge/api/filestorage/types/GroupsListRequest.java +++ b/src/main/java/com/merge/api/filestorage/types/GroupsListRequest.java @@ -256,6 +256,9 @@ public Builder from(GroupsListRequest other) { return this; } + /** + *

      Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

      + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -272,6 +275,9 @@ public Builder expand(GroupsListRequestExpandItem expand) { return this; } + /** + *

      If provided, will only return objects created after this datetime.

      + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -283,6 +289,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

      If provided, will only return objects created before this datetime.

      + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -294,6 +303,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

      The pagination cursor value.

      + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -305,6 +317,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

      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.

      + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -316,6 +331,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

      Whether to include the original data Merge fetched from the third-party to produce these models.

      + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -327,6 +345,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

      Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

      + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -338,6 +359,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

      If provided, only objects synced by Merge after this date time will be returned.

      + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -349,6 +373,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

      If provided, only objects synced by Merge before this date time will be returned.

      + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -360,6 +387,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

      Number of results to return per page.

      + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -371,6 +401,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

      The API provider's ID for the given object.

      + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; diff --git a/src/main/java/com/merge/api/filestorage/types/GroupsRetrieveRequest.java b/src/main/java/com/merge/api/filestorage/types/GroupsRetrieveRequest.java index d3f281a10..d3fd606fc 100644 --- a/src/main/java/com/merge/api/filestorage/types/GroupsRetrieveRequest.java +++ b/src/main/java/com/merge/api/filestorage/types/GroupsRetrieveRequest.java @@ -116,6 +116,9 @@ public Builder from(GroupsRetrieveRequest other) { return this; } + /** + *

      Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

      + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -132,6 +135,9 @@ public Builder expand(GroupsRetrieveRequestExpandItem expand) { return this; } + /** + *

      Whether to include the original data Merge fetched from the third-party to produce these models.

      + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -143,6 +149,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

      Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

      + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/filestorage/types/Issue.java b/src/main/java/com/merge/api/filestorage/types/Issue.java index e6f8f6343..f7725ed33 100644 --- a/src/main/java/com/merge/api/filestorage/types/Issue.java +++ b/src/main/java/com/merge/api/filestorage/types/Issue.java @@ -26,7 +26,7 @@ public final class Issue { private final Optional id; - private final Optional status; + private final Optional status; private final String errorDescription; @@ -44,7 +44,7 @@ public final class Issue { private Issue( Optional id, - Optional status, + Optional status, String errorDescription, Optional> endUser, Optional firstIncidentTime, @@ -76,7 +76,7 @@ public Optional getId() { *
    */ @JsonProperty("status") - public Optional getStatus() { + public Optional getStatus() { return status; } @@ -167,9 +167,16 @@ public interface _FinalStage { _FinalStage id(String id); - _FinalStage status(Optional status); + /** + *

    Status of the issue. Options: ('ONGOING', 'RESOLVED')

    + *
      + *
    • ONGOING - ONGOING
    • + *
    • RESOLVED - RESOLVED
    • + *
    + */ + _FinalStage status(Optional status); - _FinalStage status(IssueStatusEnum status); + _FinalStage status(IssueStatus status); _FinalStage endUser(Optional> endUser); @@ -206,7 +213,7 @@ public static final class Builder implements ErrorDescriptionStage, _FinalStage private Optional> endUser = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Optional id = Optional.empty(); @@ -309,14 +316,21 @@ public _FinalStage endUser(Optional> endUser) { * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override - public _FinalStage status(IssueStatusEnum status) { + public _FinalStage status(IssueStatus status) { this.status = Optional.ofNullable(status); return this; } + /** + *

    Status of the issue. Options: ('ONGOING', 'RESOLVED')

    + *
      + *
    • ONGOING - ONGOING
    • + *
    • RESOLVED - RESOLVED
    • + *
    + */ @java.lang.Override @JsonSetter(value = "status", nulls = Nulls.SKIP) - public _FinalStage status(Optional status) { + public _FinalStage status(Optional status) { this.status = status; return this; } diff --git a/src/main/java/com/merge/api/filestorage/types/IssueStatus.java b/src/main/java/com/merge/api/filestorage/types/IssueStatus.java new file mode 100644 index 000000000..293fb53eb --- /dev/null +++ b/src/main/java/com/merge/api/filestorage/types/IssueStatus.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.filestorage.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = IssueStatus.Deserializer.class) +public final class IssueStatus { + private final Object value; + + private final int type; + + private IssueStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((IssueStatusEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof IssueStatus && equalTo((IssueStatus) other); + } + + private boolean equalTo(IssueStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static IssueStatus of(IssueStatusEnum value) { + return new IssueStatus(value, 0); + } + + public static IssueStatus of(String value) { + return new IssueStatus(value, 1); + } + + public interface Visitor { + T visit(IssueStatusEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(IssueStatus.class); + } + + @java.lang.Override + public IssueStatus deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, IssueStatusEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/filestorage/types/IssuesListRequest.java b/src/main/java/com/merge/api/filestorage/types/IssuesListRequest.java index ed26e389b..bb86d7da8 100644 --- a/src/main/java/com/merge/api/filestorage/types/IssuesListRequest.java +++ b/src/main/java/com/merge/api/filestorage/types/IssuesListRequest.java @@ -311,6 +311,9 @@ public Builder accountToken(String accountToken) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -322,6 +325,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    If included, will only include issues whose most recent action occurred before this time

    + */ @JsonSetter(value = "end_date", nulls = Nulls.SKIP) public Builder endDate(Optional endDate) { this.endDate = endDate; @@ -344,6 +350,9 @@ public Builder endUserOrganizationName(String endUserOrganizationName) { return this; } + /** + *

    If provided, will only return issues whose first incident time was after this datetime.

    + */ @JsonSetter(value = "first_incident_time_after", nulls = Nulls.SKIP) public Builder firstIncidentTimeAfter(Optional firstIncidentTimeAfter) { this.firstIncidentTimeAfter = firstIncidentTimeAfter; @@ -355,6 +364,9 @@ public Builder firstIncidentTimeAfter(OffsetDateTime firstIncidentTimeAfter) { return this; } + /** + *

    If provided, will only return issues whose first incident time was before this datetime.

    + */ @JsonSetter(value = "first_incident_time_before", nulls = Nulls.SKIP) public Builder firstIncidentTimeBefore(Optional firstIncidentTimeBefore) { this.firstIncidentTimeBefore = firstIncidentTimeBefore; @@ -366,6 +378,9 @@ public Builder firstIncidentTimeBefore(OffsetDateTime firstIncidentTimeBefore) { return this; } + /** + *

    If true, will include muted issues

    + */ @JsonSetter(value = "include_muted", nulls = Nulls.SKIP) public Builder includeMuted(Optional includeMuted) { this.includeMuted = includeMuted; @@ -388,6 +403,9 @@ public Builder integrationName(String integrationName) { return this; } + /** + *

    If provided, will only return issues whose last incident time was after this datetime.

    + */ @JsonSetter(value = "last_incident_time_after", nulls = Nulls.SKIP) public Builder lastIncidentTimeAfter(Optional lastIncidentTimeAfter) { this.lastIncidentTimeAfter = lastIncidentTimeAfter; @@ -399,6 +417,9 @@ public Builder lastIncidentTimeAfter(OffsetDateTime lastIncidentTimeAfter) { return this; } + /** + *

    If provided, will only return issues whose last incident time was before this datetime.

    + */ @JsonSetter(value = "last_incident_time_before", nulls = Nulls.SKIP) public Builder lastIncidentTimeBefore(Optional lastIncidentTimeBefore) { this.lastIncidentTimeBefore = lastIncidentTimeBefore; @@ -410,6 +431,9 @@ public Builder lastIncidentTimeBefore(OffsetDateTime lastIncidentTimeBefore) { return this; } + /** + *

    If provided, will only include issues pertaining to the linked account passed in.

    + */ @JsonSetter(value = "linked_account_id", nulls = Nulls.SKIP) public Builder linkedAccountId(Optional linkedAccountId) { this.linkedAccountId = linkedAccountId; @@ -421,6 +445,9 @@ public Builder linkedAccountId(String linkedAccountId) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -432,6 +459,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    If included, will only include issues whose most recent action occurred after this time

    + */ @JsonSetter(value = "start_date", nulls = Nulls.SKIP) public Builder startDate(Optional startDate) { this.startDate = startDate; @@ -443,6 +473,13 @@ public Builder startDate(String startDate) { return this; } + /** + *

    Status of the issue. Options: ('ONGOING', 'RESOLVED')

    + *
      + *
    • ONGOING - ONGOING
    • + *
    • RESOLVED - RESOLVED
    • + *
    + */ @JsonSetter(value = "status", nulls = Nulls.SKIP) public Builder status(Optional status) { this.status = status; diff --git a/src/main/java/com/merge/api/filestorage/types/LinkedAccountCommonModelScopeDeserializerRequest.java b/src/main/java/com/merge/api/filestorage/types/LinkedAccountCommonModelScopeDeserializerRequest.java index 90b6cd840..66aeace14 100644 --- a/src/main/java/com/merge/api/filestorage/types/LinkedAccountCommonModelScopeDeserializerRequest.java +++ b/src/main/java/com/merge/api/filestorage/types/LinkedAccountCommonModelScopeDeserializerRequest.java @@ -84,6 +84,9 @@ public Builder from(LinkedAccountCommonModelScopeDeserializerRequest other) { return this; } + /** + *

    The common models you want to update the scopes for

    + */ @JsonSetter(value = "common_models", nulls = Nulls.SKIP) public Builder commonModels(List commonModels) { this.commonModels.clear(); diff --git a/src/main/java/com/merge/api/filestorage/types/LinkedAccountsListRequest.java b/src/main/java/com/merge/api/filestorage/types/LinkedAccountsListRequest.java index 37e161b40..42d086fcd 100644 --- a/src/main/java/com/merge/api/filestorage/types/LinkedAccountsListRequest.java +++ b/src/main/java/com/merge/api/filestorage/types/LinkedAccountsListRequest.java @@ -293,6 +293,18 @@ public Builder from(LinkedAccountsListRequest other) { return this; } + /** + *

    Options: accounting, ats, crm, filestorage, hris, mktg, ticketing

    + *
      + *
    • hris - hris
    • + *
    • ats - ats
    • + *
    • accounting - accounting
    • + *
    • ticketing - ticketing
    • + *
    • crm - crm
    • + *
    • mktg - mktg
    • + *
    • filestorage - filestorage
    • + *
    + */ @JsonSetter(value = "category", nulls = Nulls.SKIP) public Builder category(Optional category) { this.category = category; @@ -304,6 +316,9 @@ public Builder category(LinkedAccountsListRequestCategory category) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -315,6 +330,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    If provided, will only return linked accounts associated with the given email address.

    + */ @JsonSetter(value = "end_user_email_address", nulls = Nulls.SKIP) public Builder endUserEmailAddress(Optional endUserEmailAddress) { this.endUserEmailAddress = endUserEmailAddress; @@ -326,6 +344,9 @@ public Builder endUserEmailAddress(String endUserEmailAddress) { return this; } + /** + *

    If provided, will only return linked accounts associated with the given organization name.

    + */ @JsonSetter(value = "end_user_organization_name", nulls = Nulls.SKIP) public Builder endUserOrganizationName(Optional endUserOrganizationName) { this.endUserOrganizationName = endUserOrganizationName; @@ -337,6 +358,9 @@ public Builder endUserOrganizationName(String endUserOrganizationName) { return this; } + /** + *

    If provided, will only return linked accounts associated with the given origin ID.

    + */ @JsonSetter(value = "end_user_origin_id", nulls = Nulls.SKIP) public Builder endUserOriginId(Optional endUserOriginId) { this.endUserOriginId = endUserOriginId; @@ -348,6 +372,9 @@ public Builder endUserOriginId(String endUserOriginId) { return this; } + /** + *

    Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once.

    + */ @JsonSetter(value = "end_user_origin_ids", nulls = Nulls.SKIP) public Builder endUserOriginIds(Optional endUserOriginIds) { this.endUserOriginIds = endUserOriginIds; @@ -370,6 +397,9 @@ public Builder id(String id) { return this; } + /** + *

    Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once.

    + */ @JsonSetter(value = "ids", nulls = Nulls.SKIP) public Builder ids(Optional ids) { this.ids = ids; @@ -381,6 +411,9 @@ public Builder ids(String ids) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_duplicates", nulls = Nulls.SKIP) public Builder includeDuplicates(Optional includeDuplicates) { this.includeDuplicates = includeDuplicates; @@ -392,6 +425,9 @@ public Builder includeDuplicates(Boolean includeDuplicates) { return this; } + /** + *

    If provided, will only return linked accounts associated with the given integration name.

    + */ @JsonSetter(value = "integration_name", nulls = Nulls.SKIP) public Builder integrationName(Optional integrationName) { this.integrationName = integrationName; @@ -403,6 +439,9 @@ public Builder integrationName(String integrationName) { return this; } + /** + *

    If included, will only include test linked accounts. If not included, will only include non-test linked accounts.

    + */ @JsonSetter(value = "is_test_account", nulls = Nulls.SKIP) public Builder isTestAccount(Optional isTestAccount) { this.isTestAccount = isTestAccount; @@ -414,6 +453,9 @@ public Builder isTestAccount(String isTestAccount) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -425,6 +467,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    Filter by status. Options: COMPLETE, IDLE, INCOMPLETE, RELINK_NEEDED

    + */ @JsonSetter(value = "status", nulls = Nulls.SKIP) public Builder status(Optional status) { this.status = status; diff --git a/src/main/java/com/merge/api/filestorage/types/MultipartFormFieldRequest.java b/src/main/java/com/merge/api/filestorage/types/MultipartFormFieldRequest.java index 4964b82b9..d3b685c14 100644 --- a/src/main/java/com/merge/api/filestorage/types/MultipartFormFieldRequest.java +++ b/src/main/java/com/merge/api/filestorage/types/MultipartFormFieldRequest.java @@ -25,7 +25,7 @@ public final class MultipartFormFieldRequest { private final String data; - private final Optional encoding; + private final Optional encoding; private final Optional fileName; @@ -36,7 +36,7 @@ public final class MultipartFormFieldRequest { private MultipartFormFieldRequest( String name, String data, - Optional encoding, + Optional encoding, Optional fileName, Optional contentType, Map additionalProperties) { @@ -73,7 +73,7 @@ public String getData() { * */ @JsonProperty("encoding") - public Optional getEncoding() { + public Optional getEncoding() { return encoding; } @@ -127,26 +127,46 @@ public static NameStage builder() { } public interface NameStage { + /** + * The name of the form field + */ DataStage name(@NotNull String name); Builder from(MultipartFormFieldRequest other); } public interface DataStage { + /** + * The data for the form field. + */ _FinalStage data(@NotNull String data); } public interface _FinalStage { MultipartFormFieldRequest build(); - _FinalStage encoding(Optional encoding); + /** + *

    The encoding of the value of data. Defaults to RAW if not defined.

    + *
      + *
    • RAW - RAW
    • + *
    • BASE64 - BASE64
    • + *
    • GZIP_BASE64 - GZIP_BASE64
    • + *
    + */ + _FinalStage encoding(Optional encoding); - _FinalStage encoding(EncodingEnum encoding); + _FinalStage encoding(MultipartFormFieldRequestEncoding encoding); + /** + *

    The file name of the form field, if the field is for a file.

    + */ _FinalStage fileName(Optional fileName); _FinalStage fileName(String fileName); + /** + *

    The MIME type of the file, if the field is for a file.

    + */ _FinalStage contentType(Optional contentType); _FinalStage contentType(String contentType); @@ -162,7 +182,7 @@ public static final class Builder implements NameStage, DataStage, _FinalStage { private Optional fileName = Optional.empty(); - private Optional encoding = Optional.empty(); + private Optional encoding = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -180,7 +200,7 @@ public Builder from(MultipartFormFieldRequest other) { } /** - *

    The name of the form field

    + * The name of the form field

    The name of the form field

    * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -191,7 +211,7 @@ public DataStage name(@NotNull String name) { } /** - *

    The data for the form field.

    + * The data for the form field.

    The data for the form field.

    * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -211,6 +231,9 @@ public _FinalStage contentType(String contentType) { return this; } + /** + *

    The MIME type of the file, if the field is for a file.

    + */ @java.lang.Override @JsonSetter(value = "content_type", nulls = Nulls.SKIP) public _FinalStage contentType(Optional contentType) { @@ -228,6 +251,9 @@ public _FinalStage fileName(String fileName) { return this; } + /** + *

    The file name of the form field, if the field is for a file.

    + */ @java.lang.Override @JsonSetter(value = "file_name", nulls = Nulls.SKIP) public _FinalStage fileName(Optional fileName) { @@ -245,14 +271,22 @@ public _FinalStage fileName(Optional fileName) { * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override - public _FinalStage encoding(EncodingEnum encoding) { + public _FinalStage encoding(MultipartFormFieldRequestEncoding encoding) { this.encoding = Optional.ofNullable(encoding); return this; } + /** + *

    The encoding of the value of data. Defaults to RAW if not defined.

    + *
      + *
    • RAW - RAW
    • + *
    • BASE64 - BASE64
    • + *
    • GZIP_BASE64 - GZIP_BASE64
    • + *
    + */ @java.lang.Override @JsonSetter(value = "encoding", nulls = Nulls.SKIP) - public _FinalStage encoding(Optional encoding) { + public _FinalStage encoding(Optional encoding) { this.encoding = encoding; return this; } diff --git a/src/main/java/com/merge/api/filestorage/types/MultipartFormFieldRequestEncoding.java b/src/main/java/com/merge/api/filestorage/types/MultipartFormFieldRequestEncoding.java new file mode 100644 index 000000000..dfe57a152 --- /dev/null +++ b/src/main/java/com/merge/api/filestorage/types/MultipartFormFieldRequestEncoding.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.filestorage.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = MultipartFormFieldRequestEncoding.Deserializer.class) +public final class MultipartFormFieldRequestEncoding { + private final Object value; + + private final int type; + + private MultipartFormFieldRequestEncoding(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EncodingEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof MultipartFormFieldRequestEncoding && equalTo((MultipartFormFieldRequestEncoding) other); + } + + private boolean equalTo(MultipartFormFieldRequestEncoding other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static MultipartFormFieldRequestEncoding of(EncodingEnum value) { + return new MultipartFormFieldRequestEncoding(value, 0); + } + + public static MultipartFormFieldRequestEncoding of(String value) { + return new MultipartFormFieldRequestEncoding(value, 1); + } + + public interface Visitor { + T visit(EncodingEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(MultipartFormFieldRequestEncoding.class); + } + + @java.lang.Override + public MultipartFormFieldRequestEncoding deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, EncodingEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/filestorage/types/PatchedEditFieldMappingRequest.java b/src/main/java/com/merge/api/filestorage/types/PatchedEditFieldMappingRequest.java index 4467d4226..dfcd50a8d 100644 --- a/src/main/java/com/merge/api/filestorage/types/PatchedEditFieldMappingRequest.java +++ b/src/main/java/com/merge/api/filestorage/types/PatchedEditFieldMappingRequest.java @@ -116,6 +116,9 @@ public Builder from(PatchedEditFieldMappingRequest other) { return this; } + /** + *

    The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.

    + */ @JsonSetter(value = "remote_field_traversal_path", nulls = Nulls.SKIP) public Builder remoteFieldTraversalPath(Optional> remoteFieldTraversalPath) { this.remoteFieldTraversalPath = remoteFieldTraversalPath; @@ -127,6 +130,9 @@ public Builder remoteFieldTraversalPath(List remoteFieldTraversalPath) return this; } + /** + *

    The method of the remote endpoint where the remote field is coming from.

    + */ @JsonSetter(value = "remote_method", nulls = Nulls.SKIP) public Builder remoteMethod(Optional remoteMethod) { this.remoteMethod = remoteMethod; @@ -138,6 +144,9 @@ public Builder remoteMethod(String remoteMethod) { return this; } + /** + *

    The path of the remote endpoint where the remote field is coming from.

    + */ @JsonSetter(value = "remote_url_path", nulls = Nulls.SKIP) public Builder remoteUrlPath(Optional remoteUrlPath) { this.remoteUrlPath = remoteUrlPath; diff --git a/src/main/java/com/merge/api/filestorage/types/Permission.java b/src/main/java/com/merge/api/filestorage/types/Permission.java index dc991e56f..401d33bf1 100644 --- a/src/main/java/com/merge/api/filestorage/types/Permission.java +++ b/src/main/java/com/merge/api/filestorage/types/Permission.java @@ -34,9 +34,9 @@ public final class Permission { private final Optional group; - private final Optional type; + private final Optional type; - private final Optional> roles; + private final Optional>> roles; private final Map additionalProperties; @@ -47,8 +47,8 @@ private Permission( Optional modifiedAt, Optional user, Optional group, - Optional type, - Optional> roles, + Optional type, + Optional>> roles, Map additionalProperties) { this.id = id; this.remoteId = remoteId; @@ -116,7 +116,7 @@ public Optional getGroup() { * */ @JsonProperty("type") - public Optional getType() { + public Optional getType() { return type; } @@ -124,7 +124,7 @@ public Optional getType() { * @return The permissions that the user or group has for the File or Folder. It is possible for a user or group to have multiple roles, such as viewing & uploading. Possible values include: READ, WRITE, OWNER. In cases where there is no clear mapping, the original value passed through will be returned. */ @JsonProperty("roles") - public Optional> getRoles() { + public Optional>> getRoles() { return roles; } @@ -179,9 +179,9 @@ public static final class Builder { private Optional group = Optional.empty(); - private Optional type = Optional.empty(); + private Optional type = Optional.empty(); - private Optional> roles = Optional.empty(); + private Optional>> roles = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -211,6 +211,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -222,6 +225,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -233,6 +239,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -244,6 +253,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The user that is granted this permission. This will only be populated if the type is USER.

    + */ @JsonSetter(value = "user", nulls = Nulls.SKIP) public Builder user(Optional user) { this.user = user; @@ -255,6 +267,9 @@ public Builder user(PermissionUser user) { return this; } + /** + *

    The group that is granted this permission. This will only be populated if the type is GROUP.

    + */ @JsonSetter(value = "group", nulls = Nulls.SKIP) public Builder group(Optional group) { this.group = group; @@ -266,24 +281,36 @@ public Builder group(PermissionGroup group) { return this; } + /** + *

    Denotes what type of people have access to the file.

    + *
      + *
    • USER - USER
    • + *
    • GROUP - GROUP
    • + *
    • COMPANY - COMPANY
    • + *
    • ANYONE - ANYONE
    • + *
    + */ @JsonSetter(value = "type", nulls = Nulls.SKIP) - public Builder type(Optional type) { + public Builder type(Optional type) { this.type = type; return this; } - public Builder type(TypeEnum type) { + public Builder type(PermissionType type) { this.type = Optional.ofNullable(type); return this; } + /** + *

    The permissions that the user or group has for the File or Folder. It is possible for a user or group to have multiple roles, such as viewing & uploading. Possible values include: READ, WRITE, OWNER. In cases where there is no clear mapping, the original value passed through will be returned.

    + */ @JsonSetter(value = "roles", nulls = Nulls.SKIP) - public Builder roles(Optional> roles) { + public Builder roles(Optional>> roles) { this.roles = roles; return this; } - public Builder roles(List roles) { + public Builder roles(List> roles) { this.roles = Optional.ofNullable(roles); return this; } diff --git a/src/main/java/com/merge/api/filestorage/types/PermissionRequest.java b/src/main/java/com/merge/api/filestorage/types/PermissionRequest.java index 6f5aeaa6a..d52f727d8 100644 --- a/src/main/java/com/merge/api/filestorage/types/PermissionRequest.java +++ b/src/main/java/com/merge/api/filestorage/types/PermissionRequest.java @@ -28,9 +28,9 @@ public final class PermissionRequest { private final Optional group; - private final Optional type; + private final Optional type; - private final Optional> roles; + private final Optional>> roles; private final Optional> integrationParams; @@ -42,8 +42,8 @@ private PermissionRequest( Optional remoteId, Optional user, Optional group, - Optional type, - Optional> roles, + Optional type, + Optional>> roles, Optional> integrationParams, Optional> linkedAccountParams, Map additionalProperties) { @@ -91,7 +91,7 @@ public Optional getGroup() { * */ @JsonProperty("type") - public Optional getType() { + public Optional getType() { return type; } @@ -99,7 +99,7 @@ public Optional getType() { * @return The permissions that the user or group has for the File or Folder. It is possible for a user or group to have multiple roles, such as viewing & uploading. Possible values include: READ, WRITE, OWNER. In cases where there is no clear mapping, the original value passed through will be returned. */ @JsonProperty("roles") - public Optional> getRoles() { + public Optional>> getRoles() { return roles; } @@ -163,9 +163,9 @@ public static final class Builder { private Optional group = Optional.empty(); - private Optional type = Optional.empty(); + private Optional type = Optional.empty(); - private Optional> roles = Optional.empty(); + private Optional>> roles = Optional.empty(); private Optional> integrationParams = Optional.empty(); @@ -187,6 +187,9 @@ public Builder from(PermissionRequest other) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -198,6 +201,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The user that is granted this permission. This will only be populated if the type is USER.

    + */ @JsonSetter(value = "user", nulls = Nulls.SKIP) public Builder user(Optional user) { this.user = user; @@ -209,6 +215,9 @@ public Builder user(PermissionRequestUser user) { return this; } + /** + *

    The group that is granted this permission. This will only be populated if the type is GROUP.

    + */ @JsonSetter(value = "group", nulls = Nulls.SKIP) public Builder group(Optional group) { this.group = group; @@ -220,24 +229,36 @@ public Builder group(PermissionRequestGroup group) { return this; } + /** + *

    Denotes what type of people have access to the file.

    + *
      + *
    • USER - USER
    • + *
    • GROUP - GROUP
    • + *
    • COMPANY - COMPANY
    • + *
    • ANYONE - ANYONE
    • + *
    + */ @JsonSetter(value = "type", nulls = Nulls.SKIP) - public Builder type(Optional type) { + public Builder type(Optional type) { this.type = type; return this; } - public Builder type(TypeEnum type) { + public Builder type(PermissionRequestType type) { this.type = Optional.ofNullable(type); return this; } + /** + *

    The permissions that the user or group has for the File or Folder. It is possible for a user or group to have multiple roles, such as viewing & uploading. Possible values include: READ, WRITE, OWNER. In cases where there is no clear mapping, the original value passed through will be returned.

    + */ @JsonSetter(value = "roles", nulls = Nulls.SKIP) - public Builder roles(Optional> roles) { + public Builder roles(Optional>> roles) { this.roles = roles; return this; } - public Builder roles(List roles) { + public Builder roles(List> roles) { this.roles = Optional.ofNullable(roles); return this; } diff --git a/src/main/java/com/merge/api/filestorage/types/PermissionRequestRolesItem.java b/src/main/java/com/merge/api/filestorage/types/PermissionRequestRolesItem.java new file mode 100644 index 000000000..cf2f1f42a --- /dev/null +++ b/src/main/java/com/merge/api/filestorage/types/PermissionRequestRolesItem.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.filestorage.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = PermissionRequestRolesItem.Deserializer.class) +public final class PermissionRequestRolesItem { + private final Object value; + + private final int type; + + private PermissionRequestRolesItem(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((RolesEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PermissionRequestRolesItem && equalTo((PermissionRequestRolesItem) other); + } + + private boolean equalTo(PermissionRequestRolesItem other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static PermissionRequestRolesItem of(RolesEnum value) { + return new PermissionRequestRolesItem(value, 0); + } + + public static PermissionRequestRolesItem of(String value) { + return new PermissionRequestRolesItem(value, 1); + } + + public interface Visitor { + T visit(RolesEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(PermissionRequestRolesItem.class); + } + + @java.lang.Override + public PermissionRequestRolesItem deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, RolesEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/filestorage/types/PermissionRequestType.java b/src/main/java/com/merge/api/filestorage/types/PermissionRequestType.java new file mode 100644 index 000000000..eae03fb60 --- /dev/null +++ b/src/main/java/com/merge/api/filestorage/types/PermissionRequestType.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.filestorage.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = PermissionRequestType.Deserializer.class) +public final class PermissionRequestType { + private final Object value; + + private final int type; + + private PermissionRequestType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((TypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PermissionRequestType && equalTo((PermissionRequestType) other); + } + + private boolean equalTo(PermissionRequestType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static PermissionRequestType of(TypeEnum value) { + return new PermissionRequestType(value, 0); + } + + public static PermissionRequestType of(String value) { + return new PermissionRequestType(value, 1); + } + + public interface Visitor { + T visit(TypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(PermissionRequestType.class); + } + + @java.lang.Override + public PermissionRequestType deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/filestorage/types/PermissionRolesItem.java b/src/main/java/com/merge/api/filestorage/types/PermissionRolesItem.java new file mode 100644 index 000000000..aae57775e --- /dev/null +++ b/src/main/java/com/merge/api/filestorage/types/PermissionRolesItem.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.filestorage.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = PermissionRolesItem.Deserializer.class) +public final class PermissionRolesItem { + private final Object value; + + private final int type; + + private PermissionRolesItem(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((RolesEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PermissionRolesItem && equalTo((PermissionRolesItem) other); + } + + private boolean equalTo(PermissionRolesItem other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static PermissionRolesItem of(RolesEnum value) { + return new PermissionRolesItem(value, 0); + } + + public static PermissionRolesItem of(String value) { + return new PermissionRolesItem(value, 1); + } + + public interface Visitor { + T visit(RolesEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(PermissionRolesItem.class); + } + + @java.lang.Override + public PermissionRolesItem deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, RolesEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/filestorage/types/PermissionType.java b/src/main/java/com/merge/api/filestorage/types/PermissionType.java new file mode 100644 index 000000000..d30cd1da5 --- /dev/null +++ b/src/main/java/com/merge/api/filestorage/types/PermissionType.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.filestorage.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = PermissionType.Deserializer.class) +public final class PermissionType { + private final Object value; + + private final int type; + + private PermissionType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((TypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PermissionType && equalTo((PermissionType) other); + } + + private boolean equalTo(PermissionType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static PermissionType of(TypeEnum value) { + return new PermissionType(value, 0); + } + + public static PermissionType of(String value) { + return new PermissionType(value, 1); + } + + public interface Visitor { + T visit(TypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(PermissionType.class); + } + + @java.lang.Override + public PermissionType deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/filestorage/types/RemoteData.java b/src/main/java/com/merge/api/filestorage/types/RemoteData.java index e6560ce3b..b390ac160 100644 --- a/src/main/java/com/merge/api/filestorage/types/RemoteData.java +++ b/src/main/java/com/merge/api/filestorage/types/RemoteData.java @@ -77,6 +77,9 @@ public static PathStage builder() { } public interface PathStage { + /** + * The third-party API path that is being called. + */ _FinalStage path(@NotNull String path); Builder from(RemoteData other); @@ -109,7 +112,7 @@ public Builder from(RemoteData other) { } /** - *

    The third-party API path that is being called.

    + * The third-party API path that is being called.

    The third-party API path that is being called.

    * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override diff --git a/src/main/java/com/merge/api/filestorage/types/RemoteFieldsRetrieveRequest.java b/src/main/java/com/merge/api/filestorage/types/RemoteFieldsRetrieveRequest.java index 89f49ed07..e3498ba17 100644 --- a/src/main/java/com/merge/api/filestorage/types/RemoteFieldsRetrieveRequest.java +++ b/src/main/java/com/merge/api/filestorage/types/RemoteFieldsRetrieveRequest.java @@ -97,6 +97,9 @@ public Builder from(RemoteFieldsRetrieveRequest other) { return this; } + /** + *

    A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models.

    + */ @JsonSetter(value = "common_models", nulls = Nulls.SKIP) public Builder commonModels(Optional commonModels) { this.commonModels = commonModels; @@ -108,6 +111,9 @@ public Builder commonModels(String commonModels) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_example_values", nulls = Nulls.SKIP) public Builder includeExampleValues(Optional includeExampleValues) { this.includeExampleValues = includeExampleValues; diff --git a/src/main/java/com/merge/api/filestorage/types/RemoteKeyForRegenerationRequest.java b/src/main/java/com/merge/api/filestorage/types/RemoteKeyForRegenerationRequest.java index 12f301a5c..786df6dcf 100644 --- a/src/main/java/com/merge/api/filestorage/types/RemoteKeyForRegenerationRequest.java +++ b/src/main/java/com/merge/api/filestorage/types/RemoteKeyForRegenerationRequest.java @@ -66,6 +66,9 @@ public static NameStage builder() { } public interface NameStage { + /** + * The name of the remote key + */ _FinalStage name(@NotNull String name); Builder from(RemoteKeyForRegenerationRequest other); @@ -91,7 +94,7 @@ public Builder from(RemoteKeyForRegenerationRequest other) { } /** - *

    The name of the remote key

    + * The name of the remote key

    The name of the remote key

    * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override diff --git a/src/main/java/com/merge/api/filestorage/types/RemoteResponse.java b/src/main/java/com/merge/api/filestorage/types/RemoteResponse.java index 2f1d2ae84..95171147d 100644 --- a/src/main/java/com/merge/api/filestorage/types/RemoteResponse.java +++ b/src/main/java/com/merge/api/filestorage/types/RemoteResponse.java @@ -32,7 +32,7 @@ public final class RemoteResponse { private final Optional> responseHeaders; - private final Optional responseType; + private final Optional responseType; private final Optional> headers; @@ -44,7 +44,7 @@ private RemoteResponse( int status, JsonNode response, Optional> responseHeaders, - Optional responseType, + Optional responseType, Optional> headers, Map additionalProperties) { this.method = method; @@ -83,7 +83,7 @@ public Optional> getResponseHeaders() { } @JsonProperty("response_type") - public Optional getResponseType() { + public Optional getResponseType() { return responseType; } @@ -159,9 +159,9 @@ public interface _FinalStage { _FinalStage responseHeaders(Map responseHeaders); - _FinalStage responseType(Optional responseType); + _FinalStage responseType(Optional responseType); - _FinalStage responseType(ResponseTypeEnum responseType); + _FinalStage responseType(RemoteResponseResponseType responseType); _FinalStage headers(Optional> headers); @@ -180,7 +180,7 @@ public static final class Builder implements MethodStage, PathStage, StatusStage private Optional> headers = Optional.empty(); - private Optional responseType = Optional.empty(); + private Optional responseType = Optional.empty(); private Optional> responseHeaders = Optional.empty(); @@ -243,14 +243,14 @@ public _FinalStage headers(Optional> headers) { } @java.lang.Override - public _FinalStage responseType(ResponseTypeEnum responseType) { + public _FinalStage responseType(RemoteResponseResponseType responseType) { this.responseType = Optional.ofNullable(responseType); return this; } @java.lang.Override @JsonSetter(value = "response_type", nulls = Nulls.SKIP) - public _FinalStage responseType(Optional responseType) { + public _FinalStage responseType(Optional responseType) { this.responseType = responseType; return this; } diff --git a/src/main/java/com/merge/api/filestorage/types/RemoteResponseResponseType.java b/src/main/java/com/merge/api/filestorage/types/RemoteResponseResponseType.java new file mode 100644 index 000000000..52e10fd5b --- /dev/null +++ b/src/main/java/com/merge/api/filestorage/types/RemoteResponseResponseType.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.filestorage.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = RemoteResponseResponseType.Deserializer.class) +public final class RemoteResponseResponseType { + private final Object value; + + private final int type; + + private RemoteResponseResponseType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((ResponseTypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof RemoteResponseResponseType && equalTo((RemoteResponseResponseType) other); + } + + private boolean equalTo(RemoteResponseResponseType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static RemoteResponseResponseType of(ResponseTypeEnum value) { + return new RemoteResponseResponseType(value, 0); + } + + public static RemoteResponseResponseType of(String value) { + return new RemoteResponseResponseType(value, 1); + } + + public interface Visitor { + T visit(ResponseTypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(RemoteResponseResponseType.class); + } + + @java.lang.Override + public RemoteResponseResponseType deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, ResponseTypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/filestorage/types/SyncStatus.java b/src/main/java/com/merge/api/filestorage/types/SyncStatus.java index a03696390..1067260e7 100644 --- a/src/main/java/com/merge/api/filestorage/types/SyncStatus.java +++ b/src/main/java/com/merge/api/filestorage/types/SyncStatus.java @@ -30,11 +30,11 @@ public final class SyncStatus { private final Optional nextSyncStart; - private final Optional lastSyncResult; + private final Optional lastSyncResult; private final Optional lastSyncFinished; - private final StatusFd5Enum status; + private final SyncStatusStatus status; private final boolean isInitialSync; @@ -47,9 +47,9 @@ private SyncStatus( String modelId, Optional lastSyncStart, Optional nextSyncStart, - Optional lastSyncResult, + Optional lastSyncResult, Optional lastSyncFinished, - StatusFd5Enum status, + SyncStatusStatus status, boolean isInitialSync, Optional selectiveSyncConfigurationsUsage, Map additionalProperties) { @@ -86,7 +86,7 @@ public Optional getNextSyncStart() { } @JsonProperty("last_sync_result") - public Optional getLastSyncResult() { + public Optional getLastSyncResult() { return lastSyncResult; } @@ -96,7 +96,7 @@ public Optional getLastSyncFinished() { } @JsonProperty("status") - public StatusFd5Enum getStatus() { + public SyncStatusStatus getStatus() { return status; } @@ -167,7 +167,7 @@ public interface ModelIdStage { } public interface StatusStage { - IsInitialSyncStage status(@NotNull StatusFd5Enum status); + IsInitialSyncStage status(@NotNull SyncStatusStatus status); } public interface IsInitialSyncStage { @@ -185,9 +185,9 @@ public interface _FinalStage { _FinalStage nextSyncStart(OffsetDateTime nextSyncStart); - _FinalStage lastSyncResult(Optional lastSyncResult); + _FinalStage lastSyncResult(Optional lastSyncResult); - _FinalStage lastSyncResult(LastSyncResultEnum lastSyncResult); + _FinalStage lastSyncResult(SyncStatusLastSyncResult lastSyncResult); _FinalStage lastSyncFinished(Optional lastSyncFinished); @@ -207,7 +207,7 @@ public static final class Builder private String modelId; - private StatusFd5Enum status; + private SyncStatusStatus status; private boolean isInitialSync; @@ -215,7 +215,7 @@ public static final class Builder private Optional lastSyncFinished = Optional.empty(); - private Optional lastSyncResult = Optional.empty(); + private Optional lastSyncResult = Optional.empty(); private Optional nextSyncStart = Optional.empty(); @@ -256,7 +256,7 @@ public StatusStage modelId(@NotNull String modelId) { @java.lang.Override @JsonSetter("status") - public IsInitialSyncStage status(@NotNull StatusFd5Enum status) { + public IsInitialSyncStage status(@NotNull SyncStatusStatus status) { this.status = status; return this; } @@ -297,14 +297,14 @@ public _FinalStage lastSyncFinished(Optional lastSyncFinished) { } @java.lang.Override - public _FinalStage lastSyncResult(LastSyncResultEnum lastSyncResult) { + public _FinalStage lastSyncResult(SyncStatusLastSyncResult lastSyncResult) { this.lastSyncResult = Optional.ofNullable(lastSyncResult); return this; } @java.lang.Override @JsonSetter(value = "last_sync_result", nulls = Nulls.SKIP) - public _FinalStage lastSyncResult(Optional lastSyncResult) { + public _FinalStage lastSyncResult(Optional lastSyncResult) { this.lastSyncResult = lastSyncResult; return this; } diff --git a/src/main/java/com/merge/api/filestorage/types/SyncStatusLastSyncResult.java b/src/main/java/com/merge/api/filestorage/types/SyncStatusLastSyncResult.java new file mode 100644 index 000000000..f06b75bb8 --- /dev/null +++ b/src/main/java/com/merge/api/filestorage/types/SyncStatusLastSyncResult.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.filestorage.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = SyncStatusLastSyncResult.Deserializer.class) +public final class SyncStatusLastSyncResult { + private final Object value; + + private final int type; + + private SyncStatusLastSyncResult(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((LastSyncResultEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SyncStatusLastSyncResult && equalTo((SyncStatusLastSyncResult) other); + } + + private boolean equalTo(SyncStatusLastSyncResult other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static SyncStatusLastSyncResult of(LastSyncResultEnum value) { + return new SyncStatusLastSyncResult(value, 0); + } + + public static SyncStatusLastSyncResult of(String value) { + return new SyncStatusLastSyncResult(value, 1); + } + + public interface Visitor { + T visit(LastSyncResultEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(SyncStatusLastSyncResult.class); + } + + @java.lang.Override + public SyncStatusLastSyncResult deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, LastSyncResultEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/filestorage/types/SyncStatusListRequest.java b/src/main/java/com/merge/api/filestorage/types/SyncStatusListRequest.java index f684233f5..8927a253f 100644 --- a/src/main/java/com/merge/api/filestorage/types/SyncStatusListRequest.java +++ b/src/main/java/com/merge/api/filestorage/types/SyncStatusListRequest.java @@ -95,6 +95,9 @@ public Builder from(SyncStatusListRequest other) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -106,6 +109,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; diff --git a/src/main/java/com/merge/api/filestorage/types/SyncStatusStatus.java b/src/main/java/com/merge/api/filestorage/types/SyncStatusStatus.java new file mode 100644 index 000000000..344fb7fe1 --- /dev/null +++ b/src/main/java/com/merge/api/filestorage/types/SyncStatusStatus.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.filestorage.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = SyncStatusStatus.Deserializer.class) +public final class SyncStatusStatus { + private final Object value; + + private final int type; + + private SyncStatusStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((StatusFd5Enum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SyncStatusStatus && equalTo((SyncStatusStatus) other); + } + + private boolean equalTo(SyncStatusStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static SyncStatusStatus of(StatusFd5Enum value) { + return new SyncStatusStatus(value, 0); + } + + public static SyncStatusStatus of(String value) { + return new SyncStatusStatus(value, 1); + } + + public interface Visitor { + T visit(StatusFd5Enum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(SyncStatusStatus.class); + } + + @java.lang.Override + public SyncStatusStatus deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, StatusFd5Enum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/filestorage/types/User.java b/src/main/java/com/merge/api/filestorage/types/User.java index 5b9874aac..c355219a5 100644 --- a/src/main/java/com/merge/api/filestorage/types/User.java +++ b/src/main/java/com/merge/api/filestorage/types/User.java @@ -241,6 +241,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -252,6 +255,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -263,6 +269,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -274,6 +283,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The user's name.

    + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -285,6 +297,9 @@ public Builder name(String name) { return this; } + /** + *

    The user's email address. This is typically used to identify a user across linked accounts.

    + */ @JsonSetter(value = "email_address", nulls = Nulls.SKIP) public Builder emailAddress(Optional emailAddress) { this.emailAddress = emailAddress; @@ -296,6 +311,9 @@ public Builder emailAddress(String emailAddress) { return this; } + /** + *

    Whether the user is the one who linked this account.

    + */ @JsonSetter(value = "is_me", nulls = Nulls.SKIP) public Builder isMe(Optional isMe) { this.isMe = isMe; @@ -307,6 +325,9 @@ public Builder isMe(Boolean isMe) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/filestorage/types/UsersListRequest.java b/src/main/java/com/merge/api/filestorage/types/UsersListRequest.java index 1686b1d2b..009651f5a 100644 --- a/src/main/java/com/merge/api/filestorage/types/UsersListRequest.java +++ b/src/main/java/com/merge/api/filestorage/types/UsersListRequest.java @@ -254,6 +254,9 @@ public Builder from(UsersListRequest other) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -265,6 +268,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -276,6 +282,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -287,6 +296,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -298,6 +310,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -309,6 +324,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -320,6 +338,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, will only return the user object for requestor.

    + */ @JsonSetter(value = "is_me", nulls = Nulls.SKIP) public Builder isMe(Optional isMe) { this.isMe = isMe; @@ -331,6 +352,9 @@ public Builder isMe(String isMe) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -342,6 +366,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -353,6 +380,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -364,6 +394,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; diff --git a/src/main/java/com/merge/api/filestorage/types/UsersRetrieveRequest.java b/src/main/java/com/merge/api/filestorage/types/UsersRetrieveRequest.java index 9c5da39b1..2d140747e 100644 --- a/src/main/java/com/merge/api/filestorage/types/UsersRetrieveRequest.java +++ b/src/main/java/com/merge/api/filestorage/types/UsersRetrieveRequest.java @@ -97,6 +97,9 @@ public Builder from(UsersRetrieveRequest other) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -108,6 +111,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/hris/AsyncRawAccountDetailsClient.java b/src/main/java/com/merge/api/hris/AsyncRawAccountDetailsClient.java index 6622d0cac..fbed9550f 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawAccountDetailsClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawAccountDetailsClient.java @@ -40,7 +40,7 @@ public CompletableFuture> retrieve() { * Get details for a linked account. */ public CompletableFuture> retrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/account-details") .build(); diff --git a/src/main/java/com/merge/api/hris/AsyncRawAccountTokenClient.java b/src/main/java/com/merge/api/hris/AsyncRawAccountTokenClient.java index 36a401330..21ec55f91 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawAccountTokenClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawAccountTokenClient.java @@ -41,7 +41,7 @@ public CompletableFuture> retrieve(String pub */ public CompletableFuture> retrieve( String publicToken, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/account-token") .addPathSegment(publicToken) diff --git a/src/main/java/com/merge/api/hris/AsyncRawAsyncPassthroughClient.java b/src/main/java/com/merge/api/hris/AsyncRawAsyncPassthroughClient.java index dfb81c48d..f1eee8062 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawAsyncPassthroughClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawAsyncPassthroughClient.java @@ -46,7 +46,7 @@ public CompletableFuture> create(D */ public CompletableFuture> create( DataPassthroughRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/async-passthrough") .build(); @@ -113,7 +113,7 @@ public CompletableFuture> */ public CompletableFuture> retrieve( String asyncPassthroughReceiptId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/async-passthrough") .addPathSegment(asyncPassthroughReceiptId) diff --git a/src/main/java/com/merge/api/hris/AsyncRawAuditTrailClient.java b/src/main/java/com/merge/api/hris/AsyncRawAuditTrailClient.java index fe41b8863..ac5dd3130 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawAuditTrailClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawAuditTrailClient.java @@ -57,7 +57,7 @@ public CompletableFuture> */ public CompletableFuture>> list( AuditTrailListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/audit-trail"); if (request.getCursor().isPresent()) { diff --git a/src/main/java/com/merge/api/hris/AsyncRawAvailableActionsClient.java b/src/main/java/com/merge/api/hris/AsyncRawAvailableActionsClient.java index 089570ee4..2fa1ead72 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawAvailableActionsClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawAvailableActionsClient.java @@ -40,7 +40,7 @@ public CompletableFuture> retrieve() { * Returns a list of models and actions available for an account. */ public CompletableFuture> retrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/available-actions") .build(); diff --git a/src/main/java/com/merge/api/hris/AsyncRawBankInfoClient.java b/src/main/java/com/merge/api/hris/AsyncRawBankInfoClient.java index 28c436fb7..96a066d70 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawBankInfoClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawBankInfoClient.java @@ -57,7 +57,7 @@ public CompletableFuture>> lis */ public CompletableFuture>> list( BankInfoListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/bank-info"); if (request.getAccountType().isPresent()) { @@ -217,7 +217,7 @@ public CompletableFuture> retrieve(String id, Ban */ public CompletableFuture> retrieve( String id, BankInfoRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/bank-info") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/hris/AsyncRawBenefitsClient.java b/src/main/java/com/merge/api/hris/AsyncRawBenefitsClient.java index 2cfa05fe6..dceacb934 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawBenefitsClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawBenefitsClient.java @@ -57,7 +57,7 @@ public CompletableFuture>> list */ public CompletableFuture>> list( BenefitsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/benefits"); if (request.getCreatedAfter().isPresent()) { @@ -197,7 +197,7 @@ public CompletableFuture> retrieve(String id, Bene */ public CompletableFuture> retrieve( String id, BenefitsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/benefits") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/hris/AsyncRawCompaniesClient.java b/src/main/java/com/merge/api/hris/AsyncRawCompaniesClient.java index ecebc12b3..e5b5d1422 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawCompaniesClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawCompaniesClient.java @@ -57,7 +57,7 @@ public CompletableFuture>> list */ public CompletableFuture>> list( CompaniesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/companies"); if (request.getCreatedAfter().isPresent()) { @@ -189,7 +189,7 @@ public CompletableFuture> retrieve(String id, Comp */ public CompletableFuture> retrieve( String id, CompaniesRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/companies") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/hris/AsyncRawDeleteAccountClient.java b/src/main/java/com/merge/api/hris/AsyncRawDeleteAccountClient.java index 2f3fddc64..2add19910 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawDeleteAccountClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawDeleteAccountClient.java @@ -40,7 +40,7 @@ public CompletableFuture> delete() { * Delete a linked account. */ public CompletableFuture> delete(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/delete-account") .build(); diff --git a/src/main/java/com/merge/api/hris/AsyncRawDependentsClient.java b/src/main/java/com/merge/api/hris/AsyncRawDependentsClient.java index 9a2e1c674..885a1e6bd 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawDependentsClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawDependentsClient.java @@ -57,7 +57,7 @@ public CompletableFuture>> li */ public CompletableFuture>> list( DependentsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/dependents"); if (request.getCreatedAfter().isPresent()) { @@ -196,7 +196,7 @@ public CompletableFuture> retrieve(String id, De */ public CompletableFuture> retrieve( String id, DependentsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/dependents") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/hris/AsyncRawEmployeePayrollRunsClient.java b/src/main/java/com/merge/api/hris/AsyncRawEmployeePayrollRunsClient.java index f44635d78..e47c1e88d 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawEmployeePayrollRunsClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawEmployeePayrollRunsClient.java @@ -58,7 +58,7 @@ public CompletableFuture>> list( EmployeePayrollRunsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/employee-payroll-runs"); if (request.getCreatedAfter().isPresent()) { @@ -221,7 +221,7 @@ public CompletableFuture> retrieve( */ public CompletableFuture> retrieve( String id, EmployeePayrollRunsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/employee-payroll-runs") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/hris/AsyncRawEmployeesClient.java b/src/main/java/com/merge/api/hris/AsyncRawEmployeesClient.java index b4dc7af32..8ef84a2c9 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawEmployeesClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawEmployeesClient.java @@ -66,7 +66,7 @@ public CompletableFuture>> lis */ public CompletableFuture>> list( EmployeesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/employees"); if (request.getCompanyId().isPresent()) { @@ -298,7 +298,7 @@ public CompletableFuture> create(Employee */ public CompletableFuture> create( EmployeeEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/employees"); if (request.getIsDebugMode().isPresent()) { @@ -379,7 +379,7 @@ public CompletableFuture> retrieve(String id, Emp */ public CompletableFuture> retrieve( String id, EmployeesRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/employees") .addPathSegment(id); @@ -473,7 +473,7 @@ public CompletableFuture> ignoreCreate( */ public CompletableFuture> ignoreCreate( String modelId, IgnoreCommonModelRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/employees/ignore") .addPathSegment(modelId) @@ -535,7 +535,7 @@ public CompletableFuture> metaPostRetrieve() * Returns metadata for Employee POSTs. */ public CompletableFuture> metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/employees/meta/post") .build(); diff --git a/src/main/java/com/merge/api/hris/AsyncRawEmployerBenefitsClient.java b/src/main/java/com/merge/api/hris/AsyncRawEmployerBenefitsClient.java index 0ac7bfe8e..246c26ebf 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawEmployerBenefitsClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawEmployerBenefitsClient.java @@ -58,7 +58,7 @@ public CompletableFuture>> list( EmployerBenefitsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/employer-benefits"); if (request.getCreatedAfter().isPresent()) { @@ -192,7 +192,7 @@ public CompletableFuture> retrieve( */ public CompletableFuture> retrieve( String id, EmployerBenefitsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/employer-benefits") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/hris/AsyncRawEmploymentsClient.java b/src/main/java/com/merge/api/hris/AsyncRawEmploymentsClient.java index b375e6ef0..3da704ddc 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawEmploymentsClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawEmploymentsClient.java @@ -58,7 +58,7 @@ public CompletableFuture>> l */ public CompletableFuture>> list( EmploymentsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/employments"); if (request.getCreatedAfter().isPresent()) { @@ -213,7 +213,7 @@ public CompletableFuture> retrieve(String id, E */ public CompletableFuture> retrieve( String id, EmploymentsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/employments") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/hris/AsyncRawFieldMappingClient.java b/src/main/java/com/merge/api/hris/AsyncRawFieldMappingClient.java index 0481a2509..ef00de387 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawFieldMappingClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawFieldMappingClient.java @@ -62,7 +62,7 @@ public CompletableFuture> */ public CompletableFuture> fieldMappingsRetrieve( FieldMappingsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/field-mappings"); if (request.getExcludeRemoteFieldMetadata().isPresent()) { @@ -128,7 +128,7 @@ public CompletableFuture> fie */ public CompletableFuture> fieldMappingsCreate( CreateFieldMappingRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/field-mappings"); if (request.getExcludeRemoteFieldMetadata().isPresent()) { @@ -208,7 +208,7 @@ public CompletableFuture> fie */ public CompletableFuture> fieldMappingsDestroy( String fieldMappingId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/field-mappings") .addPathSegment(fieldMappingId) @@ -278,7 +278,7 @@ public CompletableFuture> fie */ public CompletableFuture> fieldMappingsPartialUpdate( String fieldMappingId, PatchedEditFieldMappingRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/field-mappings") .addPathSegment(fieldMappingId) @@ -353,7 +353,7 @@ public CompletableFuture> remoteFie */ public CompletableFuture> remoteFieldsRetrieve( RemoteFieldsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/remote-fields"); if (request.getCommonModels().isPresent()) { @@ -422,7 +422,7 @@ public CompletableFuture> t */ public CompletableFuture> targetFieldsRetrieve( RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/target-fields") .build(); diff --git a/src/main/java/com/merge/api/hris/AsyncRawForceResyncClient.java b/src/main/java/com/merge/api/hris/AsyncRawForceResyncClient.java index 26c692796..2c18cf670 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawForceResyncClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawForceResyncClient.java @@ -44,7 +44,7 @@ public CompletableFuture>> syncStatusResyn */ public CompletableFuture>> syncStatusResyncCreate( RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/sync-status/resync") .build(); diff --git a/src/main/java/com/merge/api/hris/AsyncRawGenerateKeyClient.java b/src/main/java/com/merge/api/hris/AsyncRawGenerateKeyClient.java index ac9e46327..88afde0f4 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawGenerateKeyClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawGenerateKeyClient.java @@ -45,7 +45,7 @@ public CompletableFuture> create(GenerateRemoteK */ public CompletableFuture> create( GenerateRemoteKeyRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/generate-key") .build(); diff --git a/src/main/java/com/merge/api/hris/AsyncRawGroupsClient.java b/src/main/java/com/merge/api/hris/AsyncRawGroupsClient.java index 8a8a938d7..77b6c1b2f 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawGroupsClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawGroupsClient.java @@ -57,7 +57,7 @@ public CompletableFuture>> list(G */ public CompletableFuture>> list( GroupsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/groups"); if (request.getCreatedAfter().isPresent()) { @@ -212,7 +212,7 @@ public CompletableFuture> retrieve(String id, Groups */ public CompletableFuture> retrieve( String id, GroupsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/groups") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/hris/AsyncRawIssuesClient.java b/src/main/java/com/merge/api/hris/AsyncRawIssuesClient.java index 8f14d6723..bc22ad1a4 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawIssuesClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawIssuesClient.java @@ -56,7 +56,7 @@ public CompletableFuture>> list(I */ public CompletableFuture>> list( IssuesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/issues"); if (request.getAccountToken().isPresent()) { @@ -199,7 +199,7 @@ public CompletableFuture> retrieve(String id) { * Get a specific issue. */ public CompletableFuture> retrieve(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/issues") .addPathSegment(id) diff --git a/src/main/java/com/merge/api/hris/AsyncRawLinkTokenClient.java b/src/main/java/com/merge/api/hris/AsyncRawLinkTokenClient.java index be04a5752..7f56c2420 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawLinkTokenClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawLinkTokenClient.java @@ -45,7 +45,7 @@ public CompletableFuture> create(EndUserDetailsR */ public CompletableFuture> create( EndUserDetailsRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/link-token") .build(); diff --git a/src/main/java/com/merge/api/hris/AsyncRawLinkedAccountsClient.java b/src/main/java/com/merge/api/hris/AsyncRawLinkedAccountsClient.java index 2f3825d80..ab34ff213 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawLinkedAccountsClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawLinkedAccountsClient.java @@ -57,7 +57,7 @@ public CompletableFuture>> list( LinkedAccountsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/linked-accounts"); if (request.getCategory().isPresent()) { diff --git a/src/main/java/com/merge/api/hris/AsyncRawLocationsClient.java b/src/main/java/com/merge/api/hris/AsyncRawLocationsClient.java index fb1bccb00..46cedfd96 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawLocationsClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawLocationsClient.java @@ -57,7 +57,7 @@ public CompletableFuture>> lis */ public CompletableFuture>> list( LocationsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/locations"); if (request.getCreatedAfter().isPresent()) { @@ -204,7 +204,7 @@ public CompletableFuture> retrieve(String id, Loc */ public CompletableFuture> retrieve( String id, LocationsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/locations") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/hris/AsyncRawPassthroughClient.java b/src/main/java/com/merge/api/hris/AsyncRawPassthroughClient.java index 0a1e2e073..746c70f87 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawPassthroughClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawPassthroughClient.java @@ -45,7 +45,7 @@ public CompletableFuture> create(DataPassth */ public CompletableFuture> create( DataPassthroughRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/passthrough") .build(); diff --git a/src/main/java/com/merge/api/hris/AsyncRawPayGroupsClient.java b/src/main/java/com/merge/api/hris/AsyncRawPayGroupsClient.java index 7157ee8bb..6305a886e 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawPayGroupsClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawPayGroupsClient.java @@ -57,7 +57,7 @@ public CompletableFuture>> lis */ public CompletableFuture>> list( PayGroupsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/pay-groups"); if (request.getCreatedAfter().isPresent()) { @@ -189,7 +189,7 @@ public CompletableFuture> retrieve(String id, Pay */ public CompletableFuture> retrieve( String id, PayGroupsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/pay-groups") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/hris/AsyncRawPayrollRunsClient.java b/src/main/java/com/merge/api/hris/AsyncRawPayrollRunsClient.java index 52b3022ae..b3544e8c0 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawPayrollRunsClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawPayrollRunsClient.java @@ -58,7 +58,7 @@ public CompletableFuture>> l */ public CompletableFuture>> list( PayrollRunsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/payroll-runs"); if (request.getCreatedAfter().isPresent()) { @@ -221,7 +221,7 @@ public CompletableFuture> retrieve(String id, P */ public CompletableFuture> retrieve( String id, PayrollRunsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/payroll-runs") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/hris/AsyncRawRegenerateKeyClient.java b/src/main/java/com/merge/api/hris/AsyncRawRegenerateKeyClient.java index 8b3fe86a7..1b6d12013 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawRegenerateKeyClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawRegenerateKeyClient.java @@ -45,7 +45,7 @@ public CompletableFuture> create(RemoteKeyForReg */ public CompletableFuture> create( RemoteKeyForRegenerationRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/regenerate-key") .build(); diff --git a/src/main/java/com/merge/api/hris/AsyncRawScopesClient.java b/src/main/java/com/merge/api/hris/AsyncRawScopesClient.java index 87e00d903..f8ea6f711 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawScopesClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawScopesClient.java @@ -45,7 +45,7 @@ public CompletableFuture> defaultScope */ public CompletableFuture> defaultScopesRetrieve( RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/default-scopes") .build(); @@ -103,7 +103,7 @@ public CompletableFuture> linkedAccoun */ public CompletableFuture> linkedAccountScopesRetrieve( RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/linked-account-scopes") .build(); @@ -162,7 +162,7 @@ public CompletableFuture> linkedAccoun */ public CompletableFuture> linkedAccountScopesCreate( LinkedAccountCommonModelScopeDeserializerRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/linked-account-scopes") .build(); diff --git a/src/main/java/com/merge/api/hris/AsyncRawSyncStatusClient.java b/src/main/java/com/merge/api/hris/AsyncRawSyncStatusClient.java index 9d5d80ac0..06545e1ac 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawSyncStatusClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawSyncStatusClient.java @@ -56,7 +56,7 @@ public CompletableFuture>> l */ public CompletableFuture>> list( SyncStatusListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/sync-status"); if (request.getCursor().isPresent()) { diff --git a/src/main/java/com/merge/api/hris/AsyncRawTeamsClient.java b/src/main/java/com/merge/api/hris/AsyncRawTeamsClient.java index 62360fa5b..cf97daafa 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawTeamsClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawTeamsClient.java @@ -57,7 +57,7 @@ public CompletableFuture>> list(Te */ public CompletableFuture>> list( TeamsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/teams"); if (request.getCreatedAfter().isPresent()) { @@ -197,7 +197,7 @@ public CompletableFuture> retrieve(String id, TeamsRe */ public CompletableFuture> retrieve( String id, TeamsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/teams") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/hris/AsyncRawTimeOffBalancesClient.java b/src/main/java/com/merge/api/hris/AsyncRawTimeOffBalancesClient.java index 097ff5b2d..8225fdc1d 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawTimeOffBalancesClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawTimeOffBalancesClient.java @@ -58,7 +58,7 @@ public CompletableFuture */ public CompletableFuture>> list( TimeOffBalancesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/time-off-balances"); if (request.getCreatedAfter().isPresent()) { @@ -212,7 +212,7 @@ public CompletableFuture> retrieve( */ public CompletableFuture> retrieve( String id, TimeOffBalancesRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/time-off-balances") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/hris/AsyncRawTimeOffClient.java b/src/main/java/com/merge/api/hris/AsyncRawTimeOffClient.java index 34adc8778..b9d606c62 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawTimeOffClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawTimeOffClient.java @@ -64,7 +64,7 @@ public CompletableFuture>> list */ public CompletableFuture>> list( TimeOffListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/time-off"); if (request.getApproverId().isPresent()) { @@ -236,7 +236,7 @@ public CompletableFuture> create(TimeOffEn */ public CompletableFuture> create( TimeOffEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/time-off"); if (request.getIsDebugMode().isPresent()) { @@ -317,7 +317,7 @@ public CompletableFuture> retrieve(String id, Time */ public CompletableFuture> retrieve( String id, TimeOffRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/time-off") .addPathSegment(id); @@ -402,7 +402,7 @@ public CompletableFuture> metaPostRetrieve() * Returns metadata for TimeOff POSTs. */ public CompletableFuture> metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/time-off/meta/post") .build(); diff --git a/src/main/java/com/merge/api/hris/AsyncRawTimesheetEntriesClient.java b/src/main/java/com/merge/api/hris/AsyncRawTimesheetEntriesClient.java index 0ae156fc8..169322dc0 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawTimesheetEntriesClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawTimesheetEntriesClient.java @@ -65,7 +65,7 @@ public CompletableFuture */ public CompletableFuture>> list( TimesheetEntriesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/timesheet-entries"); if (request.getCreatedAfter().isPresent()) { @@ -220,7 +220,7 @@ public CompletableFuture> create( */ public CompletableFuture> create( TimesheetEntryEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/timesheet-entries"); if (request.getIsDebugMode().isPresent()) { @@ -303,7 +303,7 @@ public CompletableFuture> retrieve( */ public CompletableFuture> retrieve( String id, TimesheetEntriesRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/timesheet-entries") .addPathSegment(id); @@ -378,7 +378,7 @@ public CompletableFuture> metaPostRetrieve() * Returns metadata for TimesheetEntry POSTs. */ public CompletableFuture> metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/timesheet-entries/meta/post") .build(); diff --git a/src/main/java/com/merge/api/hris/AsyncRawWebhookReceiversClient.java b/src/main/java/com/merge/api/hris/AsyncRawWebhookReceiversClient.java index cf43e8b22..66d9370d6 100644 --- a/src/main/java/com/merge/api/hris/AsyncRawWebhookReceiversClient.java +++ b/src/main/java/com/merge/api/hris/AsyncRawWebhookReceiversClient.java @@ -46,7 +46,7 @@ public CompletableFuture>> list() { * Returns a list of WebhookReceiver objects. */ public CompletableFuture>> list(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/webhook-receivers") .build(); @@ -105,7 +105,7 @@ public CompletableFuture> create(WebhookRe */ public CompletableFuture> create( WebhookReceiverRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/webhook-receivers") .build(); diff --git a/src/main/java/com/merge/api/hris/RawAccountDetailsClient.java b/src/main/java/com/merge/api/hris/RawAccountDetailsClient.java index 4148bf17c..8fd8945c8 100644 --- a/src/main/java/com/merge/api/hris/RawAccountDetailsClient.java +++ b/src/main/java/com/merge/api/hris/RawAccountDetailsClient.java @@ -36,7 +36,7 @@ public MergeApiHttpResponse retrieve() { * Get details for a linked account. */ public MergeApiHttpResponse retrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/account-details") .build(); diff --git a/src/main/java/com/merge/api/hris/RawAccountTokenClient.java b/src/main/java/com/merge/api/hris/RawAccountTokenClient.java index 513d15c16..203e753fd 100644 --- a/src/main/java/com/merge/api/hris/RawAccountTokenClient.java +++ b/src/main/java/com/merge/api/hris/RawAccountTokenClient.java @@ -36,7 +36,7 @@ public MergeApiHttpResponse retrieve(String publicToken) { * Returns the account token for the end user with the provided public token. */ public MergeApiHttpResponse retrieve(String publicToken, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/account-token") .addPathSegment(publicToken) diff --git a/src/main/java/com/merge/api/hris/RawAsyncPassthroughClient.java b/src/main/java/com/merge/api/hris/RawAsyncPassthroughClient.java index eca3662d6..34456c593 100644 --- a/src/main/java/com/merge/api/hris/RawAsyncPassthroughClient.java +++ b/src/main/java/com/merge/api/hris/RawAsyncPassthroughClient.java @@ -42,7 +42,7 @@ public MergeApiHttpResponse create(DataPassthroughReque */ public MergeApiHttpResponse create( DataPassthroughRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/async-passthrough") .build(); @@ -94,7 +94,7 @@ public MergeApiHttpResponse retrieve(String as */ public MergeApiHttpResponse retrieve( String asyncPassthroughReceiptId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/async-passthrough") .addPathSegment(asyncPassthroughReceiptId) diff --git a/src/main/java/com/merge/api/hris/RawAuditTrailClient.java b/src/main/java/com/merge/api/hris/RawAuditTrailClient.java index 626d6ae46..c6ff09299 100644 --- a/src/main/java/com/merge/api/hris/RawAuditTrailClient.java +++ b/src/main/java/com/merge/api/hris/RawAuditTrailClient.java @@ -51,7 +51,7 @@ public MergeApiHttpResponse> list(AuditTrailLi */ public MergeApiHttpResponse> list( AuditTrailListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/audit-trail"); if (request.getCursor().isPresent()) { diff --git a/src/main/java/com/merge/api/hris/RawAvailableActionsClient.java b/src/main/java/com/merge/api/hris/RawAvailableActionsClient.java index a5c6d5d5b..6953fe137 100644 --- a/src/main/java/com/merge/api/hris/RawAvailableActionsClient.java +++ b/src/main/java/com/merge/api/hris/RawAvailableActionsClient.java @@ -36,7 +36,7 @@ public MergeApiHttpResponse retrieve() { * Returns a list of models and actions available for an account. */ public MergeApiHttpResponse retrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/available-actions") .build(); diff --git a/src/main/java/com/merge/api/hris/RawBankInfoClient.java b/src/main/java/com/merge/api/hris/RawBankInfoClient.java index f2a91636e..709211a07 100644 --- a/src/main/java/com/merge/api/hris/RawBankInfoClient.java +++ b/src/main/java/com/merge/api/hris/RawBankInfoClient.java @@ -52,7 +52,7 @@ public MergeApiHttpResponse> list(BankInfoListReque */ public MergeApiHttpResponse> list( BankInfoListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/bank-info"); if (request.getAccountType().isPresent()) { @@ -193,7 +193,7 @@ public MergeApiHttpResponse retrieve(String id, BankInfoRetrieveReques */ public MergeApiHttpResponse retrieve( String id, BankInfoRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/bank-info") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/hris/RawBenefitsClient.java b/src/main/java/com/merge/api/hris/RawBenefitsClient.java index 9270b648a..4f9b2199e 100644 --- a/src/main/java/com/merge/api/hris/RawBenefitsClient.java +++ b/src/main/java/com/merge/api/hris/RawBenefitsClient.java @@ -52,7 +52,7 @@ public MergeApiHttpResponse> list(BenefitsListReques */ public MergeApiHttpResponse> list( BenefitsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/benefits"); if (request.getCreatedAfter().isPresent()) { @@ -173,7 +173,7 @@ public MergeApiHttpResponse retrieve(String id, BenefitsRetrieveRequest */ public MergeApiHttpResponse retrieve( String id, BenefitsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/benefits") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/hris/RawCompaniesClient.java b/src/main/java/com/merge/api/hris/RawCompaniesClient.java index 9fe6da94e..2f1ed0542 100644 --- a/src/main/java/com/merge/api/hris/RawCompaniesClient.java +++ b/src/main/java/com/merge/api/hris/RawCompaniesClient.java @@ -52,7 +52,7 @@ public MergeApiHttpResponse> list(CompaniesListReque */ public MergeApiHttpResponse> list( CompaniesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/companies"); if (request.getCreatedAfter().isPresent()) { @@ -165,7 +165,7 @@ public MergeApiHttpResponse retrieve(String id, CompaniesRetrieveReques */ public MergeApiHttpResponse retrieve( String id, CompaniesRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/companies") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/hris/RawDeleteAccountClient.java b/src/main/java/com/merge/api/hris/RawDeleteAccountClient.java index b84ae3549..3cb5ea479 100644 --- a/src/main/java/com/merge/api/hris/RawDeleteAccountClient.java +++ b/src/main/java/com/merge/api/hris/RawDeleteAccountClient.java @@ -36,7 +36,7 @@ public MergeApiHttpResponse delete() { * Delete a linked account. */ public MergeApiHttpResponse delete(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/delete-account") .build(); diff --git a/src/main/java/com/merge/api/hris/RawDependentsClient.java b/src/main/java/com/merge/api/hris/RawDependentsClient.java index 2fab4ca5e..8614be3b0 100644 --- a/src/main/java/com/merge/api/hris/RawDependentsClient.java +++ b/src/main/java/com/merge/api/hris/RawDependentsClient.java @@ -52,7 +52,7 @@ public MergeApiHttpResponse> list(DependentsListRe */ public MergeApiHttpResponse> list( DependentsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/dependents"); if (request.getCreatedAfter().isPresent()) { @@ -172,7 +172,7 @@ public MergeApiHttpResponse retrieve(String id, DependentsRetrieveReq */ public MergeApiHttpResponse retrieve( String id, DependentsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/dependents") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/hris/RawEmployeePayrollRunsClient.java b/src/main/java/com/merge/api/hris/RawEmployeePayrollRunsClient.java index 0846b250e..0930b35ce 100644 --- a/src/main/java/com/merge/api/hris/RawEmployeePayrollRunsClient.java +++ b/src/main/java/com/merge/api/hris/RawEmployeePayrollRunsClient.java @@ -52,7 +52,7 @@ public MergeApiHttpResponse> list(Employe */ public MergeApiHttpResponse> list( EmployeePayrollRunsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/employee-payroll-runs"); if (request.getCreatedAfter().isPresent()) { @@ -193,7 +193,7 @@ public MergeApiHttpResponse retrieve(String id, EmployeePayr */ public MergeApiHttpResponse retrieve( String id, EmployeePayrollRunsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/employee-payroll-runs") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/hris/RawEmployeesClient.java b/src/main/java/com/merge/api/hris/RawEmployeesClient.java index ad716786b..5e0cb4466 100644 --- a/src/main/java/com/merge/api/hris/RawEmployeesClient.java +++ b/src/main/java/com/merge/api/hris/RawEmployeesClient.java @@ -61,7 +61,7 @@ public MergeApiHttpResponse> list(EmployeesListRequ */ public MergeApiHttpResponse> list( EmployeesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/employees"); if (request.getCompanyId().isPresent()) { @@ -274,7 +274,7 @@ public MergeApiHttpResponse create(EmployeeEndpointRequest req */ public MergeApiHttpResponse create( EmployeeEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/employees"); if (request.getIsDebugMode().isPresent()) { @@ -341,7 +341,7 @@ public MergeApiHttpResponse retrieve(String id, EmployeesRetrieveReque */ public MergeApiHttpResponse retrieve( String id, EmployeesRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/employees") .addPathSegment(id); @@ -421,7 +421,7 @@ public MergeApiHttpResponse ignoreCreate(String modelId, IgnoreCommonModel */ public MergeApiHttpResponse ignoreCreate( String modelId, IgnoreCommonModelRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/employees/ignore") .addPathSegment(modelId) @@ -470,7 +470,7 @@ public MergeApiHttpResponse metaPostRetrieve() { * Returns metadata for Employee POSTs. */ public MergeApiHttpResponse metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/employees/meta/post") .build(); diff --git a/src/main/java/com/merge/api/hris/RawEmployerBenefitsClient.java b/src/main/java/com/merge/api/hris/RawEmployerBenefitsClient.java index 2900cc6d2..48a70c32b 100644 --- a/src/main/java/com/merge/api/hris/RawEmployerBenefitsClient.java +++ b/src/main/java/com/merge/api/hris/RawEmployerBenefitsClient.java @@ -52,7 +52,7 @@ public MergeApiHttpResponse> list(EmployerBe */ public MergeApiHttpResponse> list( EmployerBenefitsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/employer-benefits"); if (request.getCreatedAfter().isPresent()) { @@ -165,7 +165,7 @@ public MergeApiHttpResponse retrieve(String id, EmployerBenefit */ public MergeApiHttpResponse retrieve( String id, EmployerBenefitsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/employer-benefits") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/hris/RawEmploymentsClient.java b/src/main/java/com/merge/api/hris/RawEmploymentsClient.java index 933c4a05a..e617aec09 100644 --- a/src/main/java/com/merge/api/hris/RawEmploymentsClient.java +++ b/src/main/java/com/merge/api/hris/RawEmploymentsClient.java @@ -52,7 +52,7 @@ public MergeApiHttpResponse> list(EmploymentsList */ public MergeApiHttpResponse> list( EmploymentsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/employments"); if (request.getCreatedAfter().isPresent()) { @@ -188,7 +188,7 @@ public MergeApiHttpResponse retrieve(String id, EmploymentsRetrieveR */ public MergeApiHttpResponse retrieve( String id, EmploymentsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/employments") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/hris/RawFieldMappingClient.java b/src/main/java/com/merge/api/hris/RawFieldMappingClient.java index 4e987b47c..54347b371 100644 --- a/src/main/java/com/merge/api/hris/RawFieldMappingClient.java +++ b/src/main/java/com/merge/api/hris/RawFieldMappingClient.java @@ -58,7 +58,7 @@ public MergeApiHttpResponse fieldMappingsRetrie */ public MergeApiHttpResponse fieldMappingsRetrieve( FieldMappingsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/field-mappings"); if (request.getExcludeRemoteFieldMetadata().isPresent()) { @@ -110,7 +110,7 @@ public MergeApiHttpResponse fieldMappingsCreate(Cr */ public MergeApiHttpResponse fieldMappingsCreate( CreateFieldMappingRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/field-mappings"); if (request.getExcludeRemoteFieldMetadata().isPresent()) { @@ -175,7 +175,7 @@ public MergeApiHttpResponse fieldMappingsDestroy(S */ public MergeApiHttpResponse fieldMappingsDestroy( String fieldMappingId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/field-mappings") .addPathSegment(fieldMappingId) @@ -230,7 +230,7 @@ public MergeApiHttpResponse fieldMappingsPartialUp */ public MergeApiHttpResponse fieldMappingsPartialUpdate( String fieldMappingId, PatchedEditFieldMappingRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/field-mappings") .addPathSegment(fieldMappingId) @@ -290,7 +290,7 @@ public MergeApiHttpResponse remoteFieldsRetrieve(RemoteF */ public MergeApiHttpResponse remoteFieldsRetrieve( RemoteFieldsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/remote-fields"); if (request.getCommonModels().isPresent()) { @@ -344,7 +344,7 @@ public MergeApiHttpResponse targetFieldsRetrieve * 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. */ public MergeApiHttpResponse targetFieldsRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/target-fields") .build(); diff --git a/src/main/java/com/merge/api/hris/RawForceResyncClient.java b/src/main/java/com/merge/api/hris/RawForceResyncClient.java index 8744bc6d1..3d3f2d5b3 100644 --- a/src/main/java/com/merge/api/hris/RawForceResyncClient.java +++ b/src/main/java/com/merge/api/hris/RawForceResyncClient.java @@ -39,7 +39,7 @@ public MergeApiHttpResponse> syncStatusResyncCreate() { * 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. */ public MergeApiHttpResponse> syncStatusResyncCreate(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/sync-status/resync") .build(); diff --git a/src/main/java/com/merge/api/hris/RawGenerateKeyClient.java b/src/main/java/com/merge/api/hris/RawGenerateKeyClient.java index 4588b5910..484f787cc 100644 --- a/src/main/java/com/merge/api/hris/RawGenerateKeyClient.java +++ b/src/main/java/com/merge/api/hris/RawGenerateKeyClient.java @@ -40,7 +40,7 @@ public MergeApiHttpResponse create(GenerateRemoteKeyRequest request) * Create a remote key. */ public MergeApiHttpResponse create(GenerateRemoteKeyRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/generate-key") .build(); diff --git a/src/main/java/com/merge/api/hris/RawGroupsClient.java b/src/main/java/com/merge/api/hris/RawGroupsClient.java index abd2d16e2..3d9bfdbec 100644 --- a/src/main/java/com/merge/api/hris/RawGroupsClient.java +++ b/src/main/java/com/merge/api/hris/RawGroupsClient.java @@ -52,7 +52,7 @@ public MergeApiHttpResponse> list(GroupsListRequest re */ public MergeApiHttpResponse> list( GroupsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/groups"); if (request.getCreatedAfter().isPresent()) { @@ -188,7 +188,7 @@ public MergeApiHttpResponse retrieve(String id, GroupsRetrieveRequest req */ public MergeApiHttpResponse retrieve( String id, GroupsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/groups") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/hris/RawIssuesClient.java b/src/main/java/com/merge/api/hris/RawIssuesClient.java index 90af373d8..c0e8a9fa8 100644 --- a/src/main/java/com/merge/api/hris/RawIssuesClient.java +++ b/src/main/java/com/merge/api/hris/RawIssuesClient.java @@ -51,7 +51,7 @@ public MergeApiHttpResponse> list(IssuesListRequest re */ public MergeApiHttpResponse> list( IssuesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/issues"); if (request.getAccountToken().isPresent()) { @@ -175,7 +175,7 @@ public MergeApiHttpResponse retrieve(String id) { * Get a specific issue. */ public MergeApiHttpResponse retrieve(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/issues") .addPathSegment(id) diff --git a/src/main/java/com/merge/api/hris/RawLinkTokenClient.java b/src/main/java/com/merge/api/hris/RawLinkTokenClient.java index 6121e29bf..19979b229 100644 --- a/src/main/java/com/merge/api/hris/RawLinkTokenClient.java +++ b/src/main/java/com/merge/api/hris/RawLinkTokenClient.java @@ -40,7 +40,7 @@ public MergeApiHttpResponse create(EndUserDetailsRequest request) { * Creates a link token to be used when linking a new end user. */ public MergeApiHttpResponse create(EndUserDetailsRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/link-token") .build(); diff --git a/src/main/java/com/merge/api/hris/RawLinkedAccountsClient.java b/src/main/java/com/merge/api/hris/RawLinkedAccountsClient.java index 7d7a56652..1b7e8115e 100644 --- a/src/main/java/com/merge/api/hris/RawLinkedAccountsClient.java +++ b/src/main/java/com/merge/api/hris/RawLinkedAccountsClient.java @@ -51,7 +51,7 @@ public MergeApiHttpResponse> list(L */ public MergeApiHttpResponse> list( LinkedAccountsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/linked-accounts"); if (request.getCategory().isPresent()) { diff --git a/src/main/java/com/merge/api/hris/RawLocationsClient.java b/src/main/java/com/merge/api/hris/RawLocationsClient.java index a50e11d9d..2f696a7ea 100644 --- a/src/main/java/com/merge/api/hris/RawLocationsClient.java +++ b/src/main/java/com/merge/api/hris/RawLocationsClient.java @@ -52,7 +52,7 @@ public MergeApiHttpResponse> list(LocationsListRequ */ public MergeApiHttpResponse> list( LocationsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/locations"); if (request.getCreatedAfter().isPresent()) { @@ -180,7 +180,7 @@ public MergeApiHttpResponse retrieve(String id, LocationsRetrieveReque */ public MergeApiHttpResponse retrieve( String id, LocationsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/locations") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/hris/RawPassthroughClient.java b/src/main/java/com/merge/api/hris/RawPassthroughClient.java index 2dbff8a2b..e8e662f6d 100644 --- a/src/main/java/com/merge/api/hris/RawPassthroughClient.java +++ b/src/main/java/com/merge/api/hris/RawPassthroughClient.java @@ -40,7 +40,7 @@ public MergeApiHttpResponse create(DataPassthroughRequest reques * Pull data from an endpoint not currently supported by Merge. */ public MergeApiHttpResponse create(DataPassthroughRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/passthrough") .build(); diff --git a/src/main/java/com/merge/api/hris/RawPayGroupsClient.java b/src/main/java/com/merge/api/hris/RawPayGroupsClient.java index 4a93110e9..ece11ff2c 100644 --- a/src/main/java/com/merge/api/hris/RawPayGroupsClient.java +++ b/src/main/java/com/merge/api/hris/RawPayGroupsClient.java @@ -52,7 +52,7 @@ public MergeApiHttpResponse> list(PayGroupsListRequ */ public MergeApiHttpResponse> list( PayGroupsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/pay-groups"); if (request.getCreatedAfter().isPresent()) { @@ -165,7 +165,7 @@ public MergeApiHttpResponse retrieve(String id, PayGroupsRetrieveReque */ public MergeApiHttpResponse retrieve( String id, PayGroupsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/pay-groups") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/hris/RawPayrollRunsClient.java b/src/main/java/com/merge/api/hris/RawPayrollRunsClient.java index 6baf0738b..ac1604251 100644 --- a/src/main/java/com/merge/api/hris/RawPayrollRunsClient.java +++ b/src/main/java/com/merge/api/hris/RawPayrollRunsClient.java @@ -52,7 +52,7 @@ public MergeApiHttpResponse> list(PayrollRunsList */ public MergeApiHttpResponse> list( PayrollRunsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/payroll-runs"); if (request.getCreatedAfter().isPresent()) { @@ -196,7 +196,7 @@ public MergeApiHttpResponse retrieve(String id, PayrollRunsRetrieveR */ public MergeApiHttpResponse retrieve( String id, PayrollRunsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/payroll-runs") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/hris/RawRegenerateKeyClient.java b/src/main/java/com/merge/api/hris/RawRegenerateKeyClient.java index b17b98c19..ca1c148d6 100644 --- a/src/main/java/com/merge/api/hris/RawRegenerateKeyClient.java +++ b/src/main/java/com/merge/api/hris/RawRegenerateKeyClient.java @@ -41,7 +41,7 @@ public MergeApiHttpResponse create(RemoteKeyForRegenerationRequest re */ public MergeApiHttpResponse create( RemoteKeyForRegenerationRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/regenerate-key") .build(); diff --git a/src/main/java/com/merge/api/hris/RawScopesClient.java b/src/main/java/com/merge/api/hris/RawScopesClient.java index e99134096..0c49c4474 100644 --- a/src/main/java/com/merge/api/hris/RawScopesClient.java +++ b/src/main/java/com/merge/api/hris/RawScopesClient.java @@ -40,7 +40,7 @@ public MergeApiHttpResponse defaultScopesRetrieve() { * Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. Learn more. */ public MergeApiHttpResponse defaultScopesRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/default-scopes") .build(); @@ -84,7 +84,7 @@ public MergeApiHttpResponse linkedAccountScopesRetrieve() { * Get all available permissions for Merge Common Models and fields for a single Linked Account. Learn more. */ public MergeApiHttpResponse linkedAccountScopesRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/linked-account-scopes") .build(); @@ -130,7 +130,7 @@ public MergeApiHttpResponse linkedAccountScopesCreate( */ public MergeApiHttpResponse linkedAccountScopesCreate( LinkedAccountCommonModelScopeDeserializerRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/linked-account-scopes") .build(); diff --git a/src/main/java/com/merge/api/hris/RawSyncStatusClient.java b/src/main/java/com/merge/api/hris/RawSyncStatusClient.java index 84fa7840e..ea949ac15 100644 --- a/src/main/java/com/merge/api/hris/RawSyncStatusClient.java +++ b/src/main/java/com/merge/api/hris/RawSyncStatusClient.java @@ -51,7 +51,7 @@ public MergeApiHttpResponse> list(SyncStatusListR */ public MergeApiHttpResponse> list( SyncStatusListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/sync-status"); if (request.getCursor().isPresent()) { diff --git a/src/main/java/com/merge/api/hris/RawTeamsClient.java b/src/main/java/com/merge/api/hris/RawTeamsClient.java index 244562aad..ee1876df6 100644 --- a/src/main/java/com/merge/api/hris/RawTeamsClient.java +++ b/src/main/java/com/merge/api/hris/RawTeamsClient.java @@ -52,7 +52,7 @@ public MergeApiHttpResponse> list(TeamsListRequest requ */ public MergeApiHttpResponse> list( TeamsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/teams"); if (request.getCreatedAfter().isPresent()) { @@ -172,7 +172,7 @@ public MergeApiHttpResponse retrieve(String id, TeamsRetrieveRequest reque * Returns a Team object with the given id. */ public MergeApiHttpResponse retrieve(String id, TeamsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/teams") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/hris/RawTimeOffBalancesClient.java b/src/main/java/com/merge/api/hris/RawTimeOffBalancesClient.java index 694d43bdd..252f48224 100644 --- a/src/main/java/com/merge/api/hris/RawTimeOffBalancesClient.java +++ b/src/main/java/com/merge/api/hris/RawTimeOffBalancesClient.java @@ -52,7 +52,7 @@ public MergeApiHttpResponse> list(TimeOffBala */ public MergeApiHttpResponse> list( TimeOffBalancesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/time-off-balances"); if (request.getCreatedAfter().isPresent()) { @@ -185,7 +185,7 @@ public MergeApiHttpResponse retrieve(String id, TimeOffBalancesR */ public MergeApiHttpResponse retrieve( String id, TimeOffBalancesRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/time-off-balances") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/hris/RawTimeOffClient.java b/src/main/java/com/merge/api/hris/RawTimeOffClient.java index 151883a0e..33a586b3c 100644 --- a/src/main/java/com/merge/api/hris/RawTimeOffClient.java +++ b/src/main/java/com/merge/api/hris/RawTimeOffClient.java @@ -59,7 +59,7 @@ public MergeApiHttpResponse> list(TimeOffListRequest */ public MergeApiHttpResponse> list( TimeOffListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/time-off"); if (request.getApproverId().isPresent()) { @@ -211,7 +211,7 @@ public MergeApiHttpResponse create(TimeOffEndpointRequest reque * Creates a TimeOff object with the given values. */ public MergeApiHttpResponse create(TimeOffEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/time-off"); if (request.getIsDebugMode().isPresent()) { @@ -278,7 +278,7 @@ public MergeApiHttpResponse retrieve(String id, TimeOffRetrieveRequest */ public MergeApiHttpResponse retrieve( String id, TimeOffRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/time-off") .addPathSegment(id); @@ -350,7 +350,7 @@ public MergeApiHttpResponse metaPostRetrieve() { * Returns metadata for TimeOff POSTs. */ public MergeApiHttpResponse metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/time-off/meta/post") .build(); diff --git a/src/main/java/com/merge/api/hris/RawTimesheetEntriesClient.java b/src/main/java/com/merge/api/hris/RawTimesheetEntriesClient.java index 79ce7ab45..2b3a0562a 100644 --- a/src/main/java/com/merge/api/hris/RawTimesheetEntriesClient.java +++ b/src/main/java/com/merge/api/hris/RawTimesheetEntriesClient.java @@ -59,7 +59,7 @@ public MergeApiHttpResponse> list(TimesheetEn */ public MergeApiHttpResponse> list( TimesheetEntriesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/timesheet-entries"); if (request.getCreatedAfter().isPresent()) { @@ -193,7 +193,7 @@ public MergeApiHttpResponse create(TimesheetEntryEndpoin */ public MergeApiHttpResponse create( TimesheetEntryEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/timesheet-entries"); if (request.getIsDebugMode().isPresent()) { @@ -261,7 +261,7 @@ public MergeApiHttpResponse retrieve(String id, TimesheetEntries */ public MergeApiHttpResponse retrieve( String id, TimesheetEntriesRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/timesheet-entries") .addPathSegment(id); @@ -322,7 +322,7 @@ public MergeApiHttpResponse metaPostRetrieve() { * Returns metadata for TimesheetEntry POSTs. */ public MergeApiHttpResponse metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/timesheet-entries/meta/post") .build(); diff --git a/src/main/java/com/merge/api/hris/RawWebhookReceiversClient.java b/src/main/java/com/merge/api/hris/RawWebhookReceiversClient.java index ec362ddae..b7b509bca 100644 --- a/src/main/java/com/merge/api/hris/RawWebhookReceiversClient.java +++ b/src/main/java/com/merge/api/hris/RawWebhookReceiversClient.java @@ -42,7 +42,7 @@ public MergeApiHttpResponse> list() { * Returns a list of WebhookReceiver objects. */ public MergeApiHttpResponse> list(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/webhook-receivers") .build(); @@ -87,7 +87,7 @@ public MergeApiHttpResponse create(WebhookReceiverRequest reque * Creates a WebhookReceiver object with the given values. */ public MergeApiHttpResponse create(WebhookReceiverRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("hris/v1/webhook-receivers") .build(); diff --git a/src/main/java/com/merge/api/hris/types/AccountDetails.java b/src/main/java/com/merge/api/hris/types/AccountDetails.java index d79068675..a3367a6c6 100644 --- a/src/main/java/com/merge/api/hris/types/AccountDetails.java +++ b/src/main/java/com/merge/api/hris/types/AccountDetails.java @@ -27,7 +27,7 @@ public final class AccountDetails { private final Optional integrationSlug; - private final Optional category; + private final Optional category; private final Optional endUserOriginId; @@ -51,7 +51,7 @@ private AccountDetails( Optional id, Optional integration, Optional integrationSlug, - Optional category, + Optional category, Optional endUserOriginId, Optional endUserOrganizationName, Optional endUserEmailAddress, @@ -92,7 +92,7 @@ public Optional getIntegrationSlug() { } @JsonProperty("category") - public Optional getCategory() { + public Optional getCategory() { return category; } @@ -202,7 +202,7 @@ public static final class Builder { private Optional integrationSlug = Optional.empty(); - private Optional category = Optional.empty(); + private Optional category = Optional.empty(); private Optional endUserOriginId = Optional.empty(); @@ -275,12 +275,12 @@ public Builder integrationSlug(String integrationSlug) { } @JsonSetter(value = "category", nulls = Nulls.SKIP) - public Builder category(Optional category) { + public Builder category(Optional category) { this.category = category; return this; } - public Builder category(CategoryEnum category) { + public Builder category(AccountDetailsCategory category) { this.category = Optional.ofNullable(category); return this; } @@ -340,6 +340,9 @@ public Builder webhookListenerUrl(String webhookListenerUrl) { return this; } + /** + *

    Whether a Production Linked Account's credentials match another existing Production Linked Account. This field is null for Test Linked Accounts, incomplete Production Linked Accounts, and ignored duplicate Production Linked Account sets.

    + */ @JsonSetter(value = "is_duplicate", nulls = Nulls.SKIP) public Builder isDuplicate(Optional isDuplicate) { this.isDuplicate = isDuplicate; @@ -362,6 +365,9 @@ public Builder accountType(String accountType) { return this; } + /** + *

    The time at which account completes the linking flow.

    + */ @JsonSetter(value = "completed_at", nulls = Nulls.SKIP) public Builder completedAt(Optional completedAt) { this.completedAt = completedAt; diff --git a/src/main/java/com/merge/api/hris/types/AccountDetailsAndActions.java b/src/main/java/com/merge/api/hris/types/AccountDetailsAndActions.java index 9e450b52e..b1bd1afca 100644 --- a/src/main/java/com/merge/api/hris/types/AccountDetailsAndActions.java +++ b/src/main/java/com/merge/api/hris/types/AccountDetailsAndActions.java @@ -24,9 +24,9 @@ public final class AccountDetailsAndActions { private final String id; - private final Optional category; + private final Optional category; - private final AccountDetailsAndActionsStatusEnum status; + private final AccountDetailsAndActionsStatus status; private final Optional statusDetail; @@ -52,8 +52,8 @@ public final class AccountDetailsAndActions { private AccountDetailsAndActions( String id, - Optional category, - AccountDetailsAndActionsStatusEnum status, + Optional category, + AccountDetailsAndActionsStatus status, Optional statusDetail, Optional endUserOriginId, String endUserOrganizationName, @@ -87,12 +87,12 @@ public String getId() { } @JsonProperty("category") - public Optional getCategory() { + public Optional getCategory() { return category; } @JsonProperty("status") - public AccountDetailsAndActionsStatusEnum getStatus() { + public AccountDetailsAndActionsStatus getStatus() { return status; } @@ -213,7 +213,7 @@ public interface IdStage { } public interface StatusStage { - EndUserOrganizationNameStage status(@NotNull AccountDetailsAndActionsStatusEnum status); + EndUserOrganizationNameStage status(@NotNull AccountDetailsAndActionsStatus status); } public interface EndUserOrganizationNameStage { @@ -239,9 +239,9 @@ public interface CompletedAtStage { public interface _FinalStage { AccountDetailsAndActions build(); - _FinalStage category(Optional category); + _FinalStage category(Optional category); - _FinalStage category(CategoryEnum category); + _FinalStage category(AccountDetailsAndActionsCategory category); _FinalStage statusDetail(Optional statusDetail); @@ -251,10 +251,16 @@ public interface _FinalStage { _FinalStage endUserOriginId(String endUserOriginId); + /** + *

    The tenant or domain the customer has provided access to.

    + */ _FinalStage subdomain(Optional subdomain); _FinalStage subdomain(String subdomain); + /** + *

    Whether a Production Linked Account's credentials match another existing Production Linked Account. This field is null for Test Linked Accounts, incomplete Production Linked Accounts, and ignored duplicate Production Linked Account sets.

    + */ _FinalStage isDuplicate(Optional isDuplicate); _FinalStage isDuplicate(Boolean isDuplicate); @@ -276,7 +282,7 @@ public static final class Builder _FinalStage { private String id; - private AccountDetailsAndActionsStatusEnum status; + private AccountDetailsAndActionsStatus status; private String endUserOrganizationName; @@ -298,7 +304,7 @@ public static final class Builder private Optional statusDetail = Optional.empty(); - private Optional category = Optional.empty(); + private Optional category = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -332,7 +338,7 @@ public StatusStage id(@NotNull String id) { @java.lang.Override @JsonSetter("status") - public EndUserOrganizationNameStage status(@NotNull AccountDetailsAndActionsStatusEnum status) { + public EndUserOrganizationNameStage status(@NotNull AccountDetailsAndActionsStatus status) { this.status = status; return this; } @@ -395,6 +401,9 @@ public _FinalStage isDuplicate(Boolean isDuplicate) { return this; } + /** + *

    Whether a Production Linked Account's credentials match another existing Production Linked Account. This field is null for Test Linked Accounts, incomplete Production Linked Accounts, and ignored duplicate Production Linked Account sets.

    + */ @java.lang.Override @JsonSetter(value = "is_duplicate", nulls = Nulls.SKIP) public _FinalStage isDuplicate(Optional isDuplicate) { @@ -412,6 +421,9 @@ public _FinalStage subdomain(String subdomain) { return this; } + /** + *

    The tenant or domain the customer has provided access to.

    + */ @java.lang.Override @JsonSetter(value = "subdomain", nulls = Nulls.SKIP) public _FinalStage subdomain(Optional subdomain) { @@ -446,14 +458,14 @@ public _FinalStage statusDetail(Optional statusDetail) { } @java.lang.Override - public _FinalStage category(CategoryEnum category) { + public _FinalStage category(AccountDetailsAndActionsCategory category) { this.category = Optional.ofNullable(category); return this; } @java.lang.Override @JsonSetter(value = "category", nulls = Nulls.SKIP) - public _FinalStage category(Optional category) { + public _FinalStage category(Optional category) { this.category = category; return this; } diff --git a/src/main/java/com/merge/api/hris/types/AccountDetailsAndActionsCategory.java b/src/main/java/com/merge/api/hris/types/AccountDetailsAndActionsCategory.java new file mode 100644 index 000000000..85a170e78 --- /dev/null +++ b/src/main/java/com/merge/api/hris/types/AccountDetailsAndActionsCategory.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.hris.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = AccountDetailsAndActionsCategory.Deserializer.class) +public final class AccountDetailsAndActionsCategory { + private final Object value; + + private final int type; + + private AccountDetailsAndActionsCategory(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((CategoryEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AccountDetailsAndActionsCategory && equalTo((AccountDetailsAndActionsCategory) other); + } + + private boolean equalTo(AccountDetailsAndActionsCategory other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static AccountDetailsAndActionsCategory of(CategoryEnum value) { + return new AccountDetailsAndActionsCategory(value, 0); + } + + public static AccountDetailsAndActionsCategory of(String value) { + return new AccountDetailsAndActionsCategory(value, 1); + } + + public interface Visitor { + T visit(CategoryEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(AccountDetailsAndActionsCategory.class); + } + + @java.lang.Override + public AccountDetailsAndActionsCategory deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, CategoryEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/hris/types/AccountDetailsAndActionsStatus.java b/src/main/java/com/merge/api/hris/types/AccountDetailsAndActionsStatus.java new file mode 100644 index 000000000..7146f6fd8 --- /dev/null +++ b/src/main/java/com/merge/api/hris/types/AccountDetailsAndActionsStatus.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.hris.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = AccountDetailsAndActionsStatus.Deserializer.class) +public final class AccountDetailsAndActionsStatus { + private final Object value; + + private final int type; + + private AccountDetailsAndActionsStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((AccountDetailsAndActionsStatusEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AccountDetailsAndActionsStatus && equalTo((AccountDetailsAndActionsStatus) other); + } + + private boolean equalTo(AccountDetailsAndActionsStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static AccountDetailsAndActionsStatus of(AccountDetailsAndActionsStatusEnum value) { + return new AccountDetailsAndActionsStatus(value, 0); + } + + public static AccountDetailsAndActionsStatus of(String value) { + return new AccountDetailsAndActionsStatus(value, 1); + } + + public interface Visitor { + T visit(AccountDetailsAndActionsStatusEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(AccountDetailsAndActionsStatus.class); + } + + @java.lang.Override + public AccountDetailsAndActionsStatus deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, AccountDetailsAndActionsStatusEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/hris/types/AccountDetailsCategory.java b/src/main/java/com/merge/api/hris/types/AccountDetailsCategory.java new file mode 100644 index 000000000..8e79a9ee4 --- /dev/null +++ b/src/main/java/com/merge/api/hris/types/AccountDetailsCategory.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.hris.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = AccountDetailsCategory.Deserializer.class) +public final class AccountDetailsCategory { + private final Object value; + + private final int type; + + private AccountDetailsCategory(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((CategoryEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AccountDetailsCategory && equalTo((AccountDetailsCategory) other); + } + + private boolean equalTo(AccountDetailsCategory other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static AccountDetailsCategory of(CategoryEnum value) { + return new AccountDetailsCategory(value, 0); + } + + public static AccountDetailsCategory of(String value) { + return new AccountDetailsCategory(value, 1); + } + + public interface Visitor { + T visit(CategoryEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(AccountDetailsCategory.class); + } + + @java.lang.Override + public AccountDetailsCategory deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, CategoryEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/hris/types/AccountIntegration.java b/src/main/java/com/merge/api/hris/types/AccountIntegration.java index d2df5d64f..939812d8b 100644 --- a/src/main/java/com/merge/api/hris/types/AccountIntegration.java +++ b/src/main/java/com/merge/api/hris/types/AccountIntegration.java @@ -196,6 +196,9 @@ public static NameStage builder() { } public interface NameStage { + /** + * Company name. + */ _FinalStage name(@NotNull String name); Builder from(AccountIntegration other); @@ -204,22 +207,37 @@ public interface NameStage { public interface _FinalStage { AccountIntegration build(); + /** + *

    Optional. This shortened name appears in places with limited space, usually in conjunction with the platform's logo (e.g., Merge Link menu).<br><br>Example: <i>Workforce Now (in lieu of ADP Workforce Now), SuccessFactors (in lieu of SAP SuccessFactors)</i>

    + */ _FinalStage abbreviatedName(Optional abbreviatedName); _FinalStage abbreviatedName(String abbreviatedName); + /** + *

    Category or categories this integration belongs to. Multiple categories should be comma separated, i.e. [ats, hris].

    + */ _FinalStage categories(Optional> categories); _FinalStage categories(List categories); + /** + *

    Company logo in rectangular shape.

    + */ _FinalStage image(Optional image); _FinalStage image(String image); + /** + *

    Company logo in square shape.

    + */ _FinalStage squareImage(Optional squareImage); _FinalStage squareImage(String squareImage); + /** + *

    The color of this integration used for buttons and text throughout the app and landing pages. <b>Choose a darker, saturated color.</b>

    + */ _FinalStage color(Optional color); _FinalStage color(String color); @@ -228,14 +246,23 @@ public interface _FinalStage { _FinalStage slug(String slug); + /** + *

    Mapping of API endpoints to documentation urls for support. Example: {'GET': [['/common-model-scopes', 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], 'POST': []}

    + */ _FinalStage apiEndpointsToDocumentationUrls(Optional> apiEndpointsToDocumentationUrls); _FinalStage apiEndpointsToDocumentationUrls(Map apiEndpointsToDocumentationUrls); + /** + *

    Setup guide URL for third party webhook creation. Exposed in Merge Docs.

    + */ _FinalStage webhookSetupGuideUrl(Optional webhookSetupGuideUrl); _FinalStage webhookSetupGuideUrl(String webhookSetupGuideUrl); + /** + *

    Category or categories this integration is in beta status for.

    + */ _FinalStage categoryBetaStatus(Optional> categoryBetaStatus); _FinalStage categoryBetaStatus(Map categoryBetaStatus); @@ -284,7 +311,7 @@ public Builder from(AccountIntegration other) { } /** - *

    Company name.

    + * Company name.

    Company name.

    * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -304,6 +331,9 @@ public _FinalStage categoryBetaStatus(Map categoryBetaStatus) return this; } + /** + *

    Category or categories this integration is in beta status for.

    + */ @java.lang.Override @JsonSetter(value = "category_beta_status", nulls = Nulls.SKIP) public _FinalStage categoryBetaStatus(Optional> categoryBetaStatus) { @@ -321,6 +351,9 @@ public _FinalStage webhookSetupGuideUrl(String webhookSetupGuideUrl) { return this; } + /** + *

    Setup guide URL for third party webhook creation. Exposed in Merge Docs.

    + */ @java.lang.Override @JsonSetter(value = "webhook_setup_guide_url", nulls = Nulls.SKIP) public _FinalStage webhookSetupGuideUrl(Optional webhookSetupGuideUrl) { @@ -338,6 +371,9 @@ public _FinalStage apiEndpointsToDocumentationUrls(Map apiEndp return this; } + /** + *

    Mapping of API endpoints to documentation urls for support. Example: {'GET': [['/common-model-scopes', 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], 'POST': []}

    + */ @java.lang.Override @JsonSetter(value = "api_endpoints_to_documentation_urls", nulls = Nulls.SKIP) public _FinalStage apiEndpointsToDocumentationUrls( @@ -369,6 +405,9 @@ public _FinalStage color(String color) { return this; } + /** + *

    The color of this integration used for buttons and text throughout the app and landing pages. <b>Choose a darker, saturated color.</b>

    + */ @java.lang.Override @JsonSetter(value = "color", nulls = Nulls.SKIP) public _FinalStage color(Optional color) { @@ -386,6 +425,9 @@ public _FinalStage squareImage(String squareImage) { return this; } + /** + *

    Company logo in square shape.

    + */ @java.lang.Override @JsonSetter(value = "square_image", nulls = Nulls.SKIP) public _FinalStage squareImage(Optional squareImage) { @@ -403,6 +445,9 @@ public _FinalStage image(String image) { return this; } + /** + *

    Company logo in rectangular shape.

    + */ @java.lang.Override @JsonSetter(value = "image", nulls = Nulls.SKIP) public _FinalStage image(Optional image) { @@ -420,6 +465,9 @@ public _FinalStage categories(List categories) { return this; } + /** + *

    Category or categories this integration belongs to. Multiple categories should be comma separated, i.e. [ats, hris].

    + */ @java.lang.Override @JsonSetter(value = "categories", nulls = Nulls.SKIP) public _FinalStage categories(Optional> categories) { @@ -437,6 +485,9 @@ public _FinalStage abbreviatedName(String abbreviatedName) { return this; } + /** + *

    Optional. This shortened name appears in places with limited space, usually in conjunction with the platform's logo (e.g., Merge Link menu).<br><br>Example: <i>Workforce Now (in lieu of ADP Workforce Now), SuccessFactors (in lieu of SAP SuccessFactors)</i>

    + */ @java.lang.Override @JsonSetter(value = "abbreviated_name", nulls = Nulls.SKIP) public _FinalStage abbreviatedName(Optional abbreviatedName) { diff --git a/src/main/java/com/merge/api/hris/types/AuditLogEvent.java b/src/main/java/com/merge/api/hris/types/AuditLogEvent.java index 5f93ef538..5bf6a05ac 100644 --- a/src/main/java/com/merge/api/hris/types/AuditLogEvent.java +++ b/src/main/java/com/merge/api/hris/types/AuditLogEvent.java @@ -28,11 +28,11 @@ public final class AuditLogEvent { private final Optional userEmail; - private final RoleEnum role; + private final AuditLogEventRole role; private final String ipAddress; - private final EventTypeEnum eventType; + private final AuditLogEventEventType eventType; private final String eventDescription; @@ -44,9 +44,9 @@ private AuditLogEvent( Optional id, Optional userName, Optional userEmail, - RoleEnum role, + AuditLogEventRole role, String ipAddress, - EventTypeEnum eventType, + AuditLogEventEventType eventType, String eventDescription, Optional createdAt, Map additionalProperties) { @@ -94,7 +94,7 @@ public Optional getUserEmail() { * */ @JsonProperty("role") - public RoleEnum getRole() { + public AuditLogEventRole getRole() { return role; } @@ -111,6 +111,7 @@ public String getIpAddress() { *
  • CREATED_TEST_API_KEY - CREATED_TEST_API_KEY
  • *
  • DELETED_TEST_API_KEY - DELETED_TEST_API_KEY
  • *
  • REGENERATED_PRODUCTION_API_KEY - REGENERATED_PRODUCTION_API_KEY
  • + *
  • REGENERATED_WEBHOOK_SIGNATURE - REGENERATED_WEBHOOK_SIGNATURE
  • *
  • INVITED_USER - INVITED_USER
  • *
  • TWO_FACTOR_AUTH_ENABLED - TWO_FACTOR_AUTH_ENABLED
  • *
  • TWO_FACTOR_AUTH_DISABLED - TWO_FACTOR_AUTH_DISABLED
  • @@ -151,7 +152,7 @@ public String getIpAddress() { * */ @JsonProperty("event_type") - public EventTypeEnum getEventType() { + public AuditLogEventEventType getEventType() { return eventType; } @@ -210,7 +211,17 @@ public static RoleStage builder() { } public interface RoleStage { - IpAddressStage role(@NotNull RoleEnum role); + /** + * Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. + * + * * `ADMIN` - ADMIN + * * `DEVELOPER` - DEVELOPER + * * `MEMBER` - MEMBER + * * `API` - API + * * `SYSTEM` - SYSTEM + * * `MERGE_TEAM` - MERGE_TEAM + */ + IpAddressStage role(@NotNull AuditLogEventRole role); Builder from(AuditLogEvent other); } @@ -220,7 +231,54 @@ public interface IpAddressStage { } public interface EventTypeStage { - EventDescriptionStage eventType(@NotNull EventTypeEnum eventType); + /** + * Designates the type of event that occurred. + * + * * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + * * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + * * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + * * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + * * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + * * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + * * `INVITED_USER` - INVITED_USER + * * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + * * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + * * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + * * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + * * `CREATED_DESTINATION` - CREATED_DESTINATION + * * `DELETED_DESTINATION` - DELETED_DESTINATION + * * `CHANGED_DESTINATION` - CHANGED_DESTINATION + * * `CHANGED_SCOPES` - CHANGED_SCOPES + * * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + * * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + * * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + * * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + * * `ENABLED_CATEGORY` - ENABLED_CATEGORY + * * `DISABLED_CATEGORY` - DISABLED_CATEGORY + * * `CHANGED_PASSWORD` - CHANGED_PASSWORD + * * `RESET_PASSWORD` - RESET_PASSWORD + * * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING + * * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING + * * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + * * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + * * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING + * * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING + * * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + * * `MUTED_ISSUE` - MUTED_ISSUE + * * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + * * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + * * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + * * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + * * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + */ + EventDescriptionStage eventType(@NotNull AuditLogEventEventType eventType); } public interface EventDescriptionStage { @@ -234,10 +292,16 @@ public interface _FinalStage { _FinalStage id(String id); + /** + *

    The User's full name at the time of this Event occurring.

    + */ _FinalStage userName(Optional userName); _FinalStage userName(String userName); + /** + *

    The User's email at the time of this Event occurring.

    + */ _FinalStage userEmail(Optional userEmail); _FinalStage userEmail(String userEmail); @@ -250,11 +314,11 @@ public interface _FinalStage { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements RoleStage, IpAddressStage, EventTypeStage, EventDescriptionStage, _FinalStage { - private RoleEnum role; + private AuditLogEventRole role; private String ipAddress; - private EventTypeEnum eventType; + private AuditLogEventEventType eventType; private String eventDescription; @@ -285,7 +349,14 @@ public Builder from(AuditLogEvent other) { } /** - *

    Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring.

    + * Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. + * + * * `ADMIN` - ADMIN + * * `DEVELOPER` - DEVELOPER + * * `MEMBER` - MEMBER + * * `API` - API + * * `SYSTEM` - SYSTEM + * * `MERGE_TEAM` - MERGE_TEAM

    Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring.

    *
      *
    • ADMIN - ADMIN
    • *
    • DEVELOPER - DEVELOPER
    • @@ -298,7 +369,7 @@ public Builder from(AuditLogEvent other) { */ @java.lang.Override @JsonSetter("role") - public IpAddressStage role(@NotNull RoleEnum role) { + public IpAddressStage role(@NotNull AuditLogEventRole role) { this.role = role; return this; } @@ -311,13 +382,58 @@ public EventTypeStage ipAddress(@NotNull String ipAddress) { } /** - *

      Designates the type of event that occurred.

      + * Designates the type of event that occurred. + * + * * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + * * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + * * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + * * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + * * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + * * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + * * `INVITED_USER` - INVITED_USER + * * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + * * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + * * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + * * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + * * `CREATED_DESTINATION` - CREATED_DESTINATION + * * `DELETED_DESTINATION` - DELETED_DESTINATION + * * `CHANGED_DESTINATION` - CHANGED_DESTINATION + * * `CHANGED_SCOPES` - CHANGED_SCOPES + * * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + * * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + * * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + * * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + * * `ENABLED_CATEGORY` - ENABLED_CATEGORY + * * `DISABLED_CATEGORY` - DISABLED_CATEGORY + * * `CHANGED_PASSWORD` - CHANGED_PASSWORD + * * `RESET_PASSWORD` - RESET_PASSWORD + * * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING + * * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING + * * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + * * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + * * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING + * * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING + * * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + * * `MUTED_ISSUE` - MUTED_ISSUE + * * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + * * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + * * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + * * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + * * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED

      Designates the type of event that occurred.

      *
        *
      • CREATED_REMOTE_PRODUCTION_API_KEY - CREATED_REMOTE_PRODUCTION_API_KEY
      • *
      • DELETED_REMOTE_PRODUCTION_API_KEY - DELETED_REMOTE_PRODUCTION_API_KEY
      • *
      • CREATED_TEST_API_KEY - CREATED_TEST_API_KEY
      • *
      • DELETED_TEST_API_KEY - DELETED_TEST_API_KEY
      • *
      • REGENERATED_PRODUCTION_API_KEY - REGENERATED_PRODUCTION_API_KEY
      • + *
      • REGENERATED_WEBHOOK_SIGNATURE - REGENERATED_WEBHOOK_SIGNATURE
      • *
      • INVITED_USER - INVITED_USER
      • *
      • TWO_FACTOR_AUTH_ENABLED - TWO_FACTOR_AUTH_ENABLED
      • *
      • TWO_FACTOR_AUTH_DISABLED - TWO_FACTOR_AUTH_DISABLED
      • @@ -360,7 +476,7 @@ public EventTypeStage ipAddress(@NotNull String ipAddress) { */ @java.lang.Override @JsonSetter("event_type") - public EventDescriptionStage eventType(@NotNull EventTypeEnum eventType) { + public EventDescriptionStage eventType(@NotNull AuditLogEventEventType eventType) { this.eventType = eventType; return this; } @@ -395,6 +511,9 @@ public _FinalStage userEmail(String userEmail) { return this; } + /** + *

        The User's email at the time of this Event occurring.

        + */ @java.lang.Override @JsonSetter(value = "user_email", nulls = Nulls.SKIP) public _FinalStage userEmail(Optional userEmail) { @@ -412,6 +531,9 @@ public _FinalStage userName(String userName) { return this; } + /** + *

        The User's full name at the time of this Event occurring.

        + */ @java.lang.Override @JsonSetter(value = "user_name", nulls = Nulls.SKIP) public _FinalStage userName(Optional userName) { diff --git a/src/main/java/com/merge/api/hris/types/AuditLogEventEventType.java b/src/main/java/com/merge/api/hris/types/AuditLogEventEventType.java new file mode 100644 index 000000000..6005bb129 --- /dev/null +++ b/src/main/java/com/merge/api/hris/types/AuditLogEventEventType.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.hris.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = AuditLogEventEventType.Deserializer.class) +public final class AuditLogEventEventType { + private final Object value; + + private final int type; + + private AuditLogEventEventType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EventTypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AuditLogEventEventType && equalTo((AuditLogEventEventType) other); + } + + private boolean equalTo(AuditLogEventEventType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static AuditLogEventEventType of(EventTypeEnum value) { + return new AuditLogEventEventType(value, 0); + } + + public static AuditLogEventEventType of(String value) { + return new AuditLogEventEventType(value, 1); + } + + public interface Visitor { + T visit(EventTypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(AuditLogEventEventType.class); + } + + @java.lang.Override + public AuditLogEventEventType deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, EventTypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/hris/types/AuditLogEventRole.java b/src/main/java/com/merge/api/hris/types/AuditLogEventRole.java new file mode 100644 index 000000000..b7e2cf425 --- /dev/null +++ b/src/main/java/com/merge/api/hris/types/AuditLogEventRole.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.hris.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = AuditLogEventRole.Deserializer.class) +public final class AuditLogEventRole { + private final Object value; + + private final int type; + + private AuditLogEventRole(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((RoleEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AuditLogEventRole && equalTo((AuditLogEventRole) other); + } + + private boolean equalTo(AuditLogEventRole other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static AuditLogEventRole of(RoleEnum value) { + return new AuditLogEventRole(value, 0); + } + + public static AuditLogEventRole of(String value) { + return new AuditLogEventRole(value, 1); + } + + public interface Visitor { + T visit(RoleEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(AuditLogEventRole.class); + } + + @java.lang.Override + public AuditLogEventRole deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, RoleEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/hris/types/AuditTrailListRequest.java b/src/main/java/com/merge/api/hris/types/AuditTrailListRequest.java index fdf8b6244..2b612a0b3 100644 --- a/src/main/java/com/merge/api/hris/types/AuditTrailListRequest.java +++ b/src/main/java/com/merge/api/hris/types/AuditTrailListRequest.java @@ -162,6 +162,9 @@ public Builder from(AuditTrailListRequest other) { return this; } + /** + *

        The pagination cursor value.

        + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -173,6 +176,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

        If included, will only include audit trail events that occurred before this time

        + */ @JsonSetter(value = "end_date", nulls = Nulls.SKIP) public Builder endDate(Optional endDate) { this.endDate = endDate; @@ -184,6 +190,9 @@ public Builder endDate(String endDate) { return this; } + /** + *

        If included, will only include events with the given event type. Possible values include: CREATED_REMOTE_PRODUCTION_API_KEY, DELETED_REMOTE_PRODUCTION_API_KEY, CREATED_TEST_API_KEY, DELETED_TEST_API_KEY, REGENERATED_PRODUCTION_API_KEY, INVITED_USER, TWO_FACTOR_AUTH_ENABLED, TWO_FACTOR_AUTH_DISABLED, DELETED_LINKED_ACCOUNT, 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

        + */ @JsonSetter(value = "event_type", nulls = Nulls.SKIP) public Builder eventType(Optional eventType) { this.eventType = eventType; @@ -195,6 +204,9 @@ public Builder eventType(String eventType) { return this; } + /** + *

        Number of results to return per page.

        + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -206,6 +218,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

        If included, will only include audit trail events that occurred after this time

        + */ @JsonSetter(value = "start_date", nulls = Nulls.SKIP) public Builder startDate(Optional startDate) { this.startDate = startDate; @@ -217,6 +232,9 @@ public Builder startDate(String startDate) { return this; } + /** + *

        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.

        + */ @JsonSetter(value = "user_email", nulls = Nulls.SKIP) public Builder userEmail(Optional userEmail) { this.userEmail = userEmail; diff --git a/src/main/java/com/merge/api/hris/types/BankInfo.java b/src/main/java/com/merge/api/hris/types/BankInfo.java index 0f0ceb455..6659f8e5d 100644 --- a/src/main/java/com/merge/api/hris/types/BankInfo.java +++ b/src/main/java/com/merge/api/hris/types/BankInfo.java @@ -39,7 +39,7 @@ public final class BankInfo { private final Optional bankName; - private final Optional accountType; + private final Optional accountType; private final Optional remoteCreatedAt; @@ -60,7 +60,7 @@ private BankInfo( Optional accountNumber, Optional routingNumber, Optional bankName, - Optional accountType, + Optional accountType, Optional remoteCreatedAt, Optional remoteWasDeleted, Optional> fieldMappings, @@ -151,7 +151,7 @@ public Optional getBankName() { *
      */ @JsonProperty("account_type") - public Optional getAccountType() { + public Optional getAccountType() { return accountType; } @@ -253,7 +253,7 @@ public static final class Builder { private Optional bankName = Optional.empty(); - private Optional accountType = Optional.empty(); + private Optional accountType = Optional.empty(); private Optional remoteCreatedAt = Optional.empty(); @@ -296,6 +296,9 @@ public Builder id(String id) { return this; } + /** + *

      The third-party API ID of the matching object.

      + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -307,6 +310,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

      The datetime that this object was created by Merge.

      + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -318,6 +324,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

      The datetime that this object was modified by Merge.

      + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -329,6 +338,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

      The employee with this bank account.

      + */ @JsonSetter(value = "employee", nulls = Nulls.SKIP) public Builder employee(Optional employee) { this.employee = employee; @@ -340,6 +352,9 @@ public Builder employee(BankInfoEmployee employee) { return this; } + /** + *

      The account number.

      + */ @JsonSetter(value = "account_number", nulls = Nulls.SKIP) public Builder accountNumber(Optional accountNumber) { this.accountNumber = accountNumber; @@ -351,6 +366,9 @@ public Builder accountNumber(String accountNumber) { return this; } + /** + *

      The routing number.

      + */ @JsonSetter(value = "routing_number", nulls = Nulls.SKIP) public Builder routingNumber(Optional routingNumber) { this.routingNumber = routingNumber; @@ -362,6 +380,9 @@ public Builder routingNumber(String routingNumber) { return this; } + /** + *

      The bank name.

      + */ @JsonSetter(value = "bank_name", nulls = Nulls.SKIP) public Builder bankName(Optional bankName) { this.bankName = bankName; @@ -373,17 +394,27 @@ public Builder bankName(String bankName) { return this; } + /** + *

      The bank account type

      + *
        + *
      • SAVINGS - SAVINGS
      • + *
      • CHECKING - CHECKING
      • + *
      + */ @JsonSetter(value = "account_type", nulls = Nulls.SKIP) - public Builder accountType(Optional accountType) { + public Builder accountType(Optional accountType) { this.accountType = accountType; return this; } - public Builder accountType(AccountTypeEnum accountType) { + public Builder accountType(BankInfoAccountType accountType) { this.accountType = Optional.ofNullable(accountType); return this; } + /** + *

      When the matching bank object was created in the third party system.

      + */ @JsonSetter(value = "remote_created_at", nulls = Nulls.SKIP) public Builder remoteCreatedAt(Optional remoteCreatedAt) { this.remoteCreatedAt = remoteCreatedAt; @@ -395,6 +426,9 @@ public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { return this; } + /** + *

      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.

      + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/hris/types/BankInfoAccountType.java b/src/main/java/com/merge/api/hris/types/BankInfoAccountType.java new file mode 100644 index 000000000..5a2593e40 --- /dev/null +++ b/src/main/java/com/merge/api/hris/types/BankInfoAccountType.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.hris.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = BankInfoAccountType.Deserializer.class) +public final class BankInfoAccountType { + private final Object value; + + private final int type; + + private BankInfoAccountType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((AccountTypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof BankInfoAccountType && equalTo((BankInfoAccountType) other); + } + + private boolean equalTo(BankInfoAccountType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static BankInfoAccountType of(AccountTypeEnum value) { + return new BankInfoAccountType(value, 0); + } + + public static BankInfoAccountType of(String value) { + return new BankInfoAccountType(value, 1); + } + + public interface Visitor { + T visit(AccountTypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(BankInfoAccountType.class); + } + + @java.lang.Override + public BankInfoAccountType deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, AccountTypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/hris/types/BankInfoListRequest.java b/src/main/java/com/merge/api/hris/types/BankInfoListRequest.java index 7d99a97a8..6a566e69c 100644 --- a/src/main/java/com/merge/api/hris/types/BankInfoListRequest.java +++ b/src/main/java/com/merge/api/hris/types/BankInfoListRequest.java @@ -362,6 +362,9 @@ public Builder from(BankInfoListRequest other) { return this; } + /** + *

      Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

      + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -378,6 +381,13 @@ public Builder expand(String expand) { return this; } + /** + *

      If provided, will only return BankInfo's with this account type. Options: ('SAVINGS', 'CHECKING')

      + *
        + *
      • SAVINGS - SAVINGS
      • + *
      • CHECKING - CHECKING
      • + *
      + */ @JsonSetter(value = "account_type", nulls = Nulls.SKIP) public Builder accountType(Optional accountType) { this.accountType = accountType; @@ -389,6 +399,9 @@ public Builder accountType(BankInfoListRequestAccountType accountType) { return this; } + /** + *

      If provided, will only return BankInfo's with this bank name.

      + */ @JsonSetter(value = "bank_name", nulls = Nulls.SKIP) public Builder bankName(Optional bankName) { this.bankName = bankName; @@ -400,6 +413,9 @@ public Builder bankName(String bankName) { return this; } + /** + *

      If provided, will only return objects created after this datetime.

      + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -411,6 +427,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

      If provided, will only return objects created before this datetime.

      + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -422,6 +441,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

      The pagination cursor value.

      + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -433,6 +455,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

      If provided, will only return bank accounts for this employee.

      + */ @JsonSetter(value = "employee_id", nulls = Nulls.SKIP) public Builder employeeId(Optional employeeId) { this.employeeId = employeeId; @@ -444,6 +469,9 @@ public Builder employeeId(String employeeId) { return this; } + /** + *

      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.

      + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -455,6 +483,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

      Whether to include the original data Merge fetched from the third-party to produce these models.

      + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -466,6 +497,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

      Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

      + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -477,6 +511,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

      If provided, only objects synced by Merge after this date time will be returned.

      + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -488,6 +525,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

      If provided, only objects synced by Merge before this date time will be returned.

      + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -499,6 +539,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

      Overrides the default ordering for this endpoint. Possible values include: remote_created_at, -remote_created_at.

      + */ @JsonSetter(value = "order_by", nulls = Nulls.SKIP) public Builder orderBy(Optional orderBy) { this.orderBy = orderBy; @@ -510,6 +553,9 @@ public Builder orderBy(BankInfoListRequestOrderBy orderBy) { return this; } + /** + *

      Number of results to return per page.

      + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -521,6 +567,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

      Deprecated. Use show_enum_origins.

      + */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -532,6 +581,9 @@ public Builder remoteFields(String remoteFields) { return this; } + /** + *

      The API provider's ID for the given object.

      + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -543,6 +595,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

      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

      + */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; diff --git a/src/main/java/com/merge/api/hris/types/BankInfoRetrieveRequest.java b/src/main/java/com/merge/api/hris/types/BankInfoRetrieveRequest.java index 416068551..992c2f409 100644 --- a/src/main/java/com/merge/api/hris/types/BankInfoRetrieveRequest.java +++ b/src/main/java/com/merge/api/hris/types/BankInfoRetrieveRequest.java @@ -149,6 +149,9 @@ public Builder from(BankInfoRetrieveRequest other) { return this; } + /** + *

      Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

      + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -165,6 +168,9 @@ public Builder expand(String expand) { return this; } + /** + *

      Whether to include the original data Merge fetched from the third-party to produce these models.

      + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -176,6 +182,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

      Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

      + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -187,6 +196,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

      Deprecated. Use show_enum_origins.

      + */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -198,6 +210,9 @@ public Builder remoteFields(String remoteFields) { return this; } + /** + *

      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

      + */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; diff --git a/src/main/java/com/merge/api/hris/types/Benefit.java b/src/main/java/com/merge/api/hris/types/Benefit.java index d419fad27..633107843 100644 --- a/src/main/java/com/merge/api/hris/types/Benefit.java +++ b/src/main/java/com/merge/api/hris/types/Benefit.java @@ -326,6 +326,9 @@ public Builder id(String id) { return this; } + /** + *

      The third-party API ID of the matching object.

      + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -337,6 +340,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

      The datetime that this object was created by Merge.

      + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -348,6 +354,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

      The datetime that this object was modified by Merge.

      + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -359,6 +368,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

      The employee on the plan.

      + */ @JsonSetter(value = "employee", nulls = Nulls.SKIP) public Builder employee(Optional employee) { this.employee = employee; @@ -370,6 +382,9 @@ public Builder employee(BenefitEmployee employee) { return this; } + /** + *

      The name of the benefit provider.

      + */ @JsonSetter(value = "provider_name", nulls = Nulls.SKIP) public Builder providerName(Optional providerName) { this.providerName = providerName; @@ -381,6 +396,9 @@ public Builder providerName(String providerName) { return this; } + /** + *

      The type of benefit plan

      + */ @JsonSetter(value = "benefit_plan_type", nulls = Nulls.SKIP) public Builder benefitPlanType(Optional benefitPlanType) { this.benefitPlanType = benefitPlanType; @@ -392,6 +410,9 @@ public Builder benefitPlanType(String benefitPlanType) { return this; } + /** + *

      The employee's contribution.

      + */ @JsonSetter(value = "employee_contribution", nulls = Nulls.SKIP) public Builder employeeContribution(Optional employeeContribution) { this.employeeContribution = employeeContribution; @@ -403,6 +424,9 @@ public Builder employeeContribution(Double employeeContribution) { return this; } + /** + *

      The company's contribution.

      + */ @JsonSetter(value = "company_contribution", nulls = Nulls.SKIP) public Builder companyContribution(Optional companyContribution) { this.companyContribution = companyContribution; @@ -414,6 +438,9 @@ public Builder companyContribution(Double companyContribution) { return this; } + /** + *

      The day and time the benefit started.

      + */ @JsonSetter(value = "start_date", nulls = Nulls.SKIP) public Builder startDate(Optional startDate) { this.startDate = startDate; @@ -425,6 +452,9 @@ public Builder startDate(OffsetDateTime startDate) { return this; } + /** + *

      The day and time the benefit ended.

      + */ @JsonSetter(value = "end_date", nulls = Nulls.SKIP) public Builder endDate(Optional endDate) { this.endDate = endDate; @@ -436,6 +466,9 @@ public Builder endDate(OffsetDateTime endDate) { return this; } + /** + *

      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.

      + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; @@ -447,6 +480,9 @@ public Builder remoteWasDeleted(Boolean remoteWasDeleted) { return this; } + /** + *

      The employer benefit plan the employee is enrolled in.

      + */ @JsonSetter(value = "employer_benefit", nulls = Nulls.SKIP) public Builder employerBenefit(Optional employerBenefit) { this.employerBenefit = employerBenefit; diff --git a/src/main/java/com/merge/api/hris/types/BenefitsListRequest.java b/src/main/java/com/merge/api/hris/types/BenefitsListRequest.java index 67e7836d8..570da3daf 100644 --- a/src/main/java/com/merge/api/hris/types/BenefitsListRequest.java +++ b/src/main/java/com/merge/api/hris/types/BenefitsListRequest.java @@ -273,6 +273,9 @@ public Builder from(BenefitsListRequest other) { return this; } + /** + *

      Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

      + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -289,6 +292,9 @@ public Builder expand(String expand) { return this; } + /** + *

      If provided, will only return objects created after this datetime.

      + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -300,6 +306,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

      If provided, will only return objects created before this datetime.

      + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -311,6 +320,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

      The pagination cursor value.

      + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -322,6 +334,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

      If provided, will return the benefits associated with the employee.

      + */ @JsonSetter(value = "employee_id", nulls = Nulls.SKIP) public Builder employeeId(Optional employeeId) { this.employeeId = employeeId; @@ -333,6 +348,9 @@ public Builder employeeId(String employeeId) { return this; } + /** + *

      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.

      + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -344,6 +362,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

      Whether to include the original data Merge fetched from the third-party to produce these models.

      + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -355,6 +376,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

      Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

      + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -366,6 +390,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

      If provided, only objects synced by Merge after this date time will be returned.

      + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -377,6 +404,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

      If provided, only objects synced by Merge before this date time will be returned.

      + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -388,6 +418,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

      Number of results to return per page.

      + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -399,6 +432,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

      The API provider's ID for the given object.

      + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; diff --git a/src/main/java/com/merge/api/hris/types/BenefitsRetrieveRequest.java b/src/main/java/com/merge/api/hris/types/BenefitsRetrieveRequest.java index 90ab52b4e..51bb50805 100644 --- a/src/main/java/com/merge/api/hris/types/BenefitsRetrieveRequest.java +++ b/src/main/java/com/merge/api/hris/types/BenefitsRetrieveRequest.java @@ -116,6 +116,9 @@ public Builder from(BenefitsRetrieveRequest other) { return this; } + /** + *

      Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

      + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -132,6 +135,9 @@ public Builder expand(String expand) { return this; } + /** + *

      Whether to include the original data Merge fetched from the third-party to produce these models.

      + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -143,6 +149,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

      Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

      + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/hris/types/CommonModelScopeApi.java b/src/main/java/com/merge/api/hris/types/CommonModelScopeApi.java index db551224e..337af5780 100644 --- a/src/main/java/com/merge/api/hris/types/CommonModelScopeApi.java +++ b/src/main/java/com/merge/api/hris/types/CommonModelScopeApi.java @@ -82,6 +82,9 @@ public Builder from(CommonModelScopeApi other) { return this; } + /** + *

      The common models you want to update the scopes for

      + */ @JsonSetter(value = "common_models", nulls = Nulls.SKIP) public Builder commonModels(List commonModels) { this.commonModels.clear(); diff --git a/src/main/java/com/merge/api/hris/types/CompaniesListRequest.java b/src/main/java/com/merge/api/hris/types/CompaniesListRequest.java index b5bb60f49..be2f48358 100644 --- a/src/main/java/com/merge/api/hris/types/CompaniesListRequest.java +++ b/src/main/java/com/merge/api/hris/types/CompaniesListRequest.java @@ -237,6 +237,9 @@ public Builder from(CompaniesListRequest other) { return this; } + /** + *

      If provided, will only return objects created after this datetime.

      + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -248,6 +251,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

      If provided, will only return objects created before this datetime.

      + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -259,6 +265,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

      The pagination cursor value.

      + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -270,6 +279,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

      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.

      + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -281,6 +293,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

      Whether to include the original data Merge fetched from the third-party to produce these models.

      + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -292,6 +307,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

      Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

      + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -303,6 +321,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

      If provided, only objects synced by Merge after this date time will be returned.

      + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -314,6 +335,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

      If provided, only objects synced by Merge before this date time will be returned.

      + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -325,6 +349,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

      Number of results to return per page.

      + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -336,6 +363,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

      The API provider's ID for the given object.

      + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; diff --git a/src/main/java/com/merge/api/hris/types/CompaniesRetrieveRequest.java b/src/main/java/com/merge/api/hris/types/CompaniesRetrieveRequest.java index 550ad59c3..339b0231b 100644 --- a/src/main/java/com/merge/api/hris/types/CompaniesRetrieveRequest.java +++ b/src/main/java/com/merge/api/hris/types/CompaniesRetrieveRequest.java @@ -97,6 +97,9 @@ public Builder from(CompaniesRetrieveRequest other) { return this; } + /** + *

      Whether to include the original data Merge fetched from the third-party to produce these models.

      + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -108,6 +111,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

      Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

      + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/hris/types/Company.java b/src/main/java/com/merge/api/hris/types/Company.java index 8f55a3b78..61944ea55 100644 --- a/src/main/java/com/merge/api/hris/types/Company.java +++ b/src/main/java/com/merge/api/hris/types/Company.java @@ -241,6 +241,9 @@ public Builder id(String id) { return this; } + /** + *

      The third-party API ID of the matching object.

      + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -252,6 +255,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

      The datetime that this object was created by Merge.

      + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -263,6 +269,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

      The datetime that this object was modified by Merge.

      + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -274,6 +283,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

      The company's legal name.

      + */ @JsonSetter(value = "legal_name", nulls = Nulls.SKIP) public Builder legalName(Optional legalName) { this.legalName = legalName; @@ -285,6 +297,9 @@ public Builder legalName(String legalName) { return this; } + /** + *

      The company's display name.

      + */ @JsonSetter(value = "display_name", nulls = Nulls.SKIP) public Builder displayName(Optional displayName) { this.displayName = displayName; @@ -296,6 +311,9 @@ public Builder displayName(String displayName) { return this; } + /** + *

      The company's Employer Identification Numbers.

      + */ @JsonSetter(value = "eins", nulls = Nulls.SKIP) public Builder eins(Optional>> eins) { this.eins = eins; @@ -307,6 +325,9 @@ public Builder eins(List> eins) { return this; } + /** + *

      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.

      + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/hris/types/CreateFieldMappingRequest.java b/src/main/java/com/merge/api/hris/types/CreateFieldMappingRequest.java index 7ed1f1ee1..15ee96e96 100644 --- a/src/main/java/com/merge/api/hris/types/CreateFieldMappingRequest.java +++ b/src/main/java/com/merge/api/hris/types/CreateFieldMappingRequest.java @@ -158,34 +158,55 @@ public static TargetFieldNameStage builder() { } public interface TargetFieldNameStage { + /** + * The name of the target field you want this remote field to map to. + */ TargetFieldDescriptionStage targetFieldName(@NotNull String targetFieldName); Builder from(CreateFieldMappingRequest other); } public interface TargetFieldDescriptionStage { + /** + * The description of the target field you want this remote field to map to. + */ RemoteMethodStage targetFieldDescription(@NotNull String targetFieldDescription); } public interface RemoteMethodStage { + /** + * The method of the remote endpoint where the remote field is coming from. + */ RemoteUrlPathStage remoteMethod(@NotNull String remoteMethod); } public interface RemoteUrlPathStage { + /** + * The path of the remote endpoint where the remote field is coming from. + */ CommonModelNameStage remoteUrlPath(@NotNull String remoteUrlPath); } public interface CommonModelNameStage { + /** + * The name of the Common Model that the remote field corresponds to in a given category. + */ _FinalStage commonModelName(@NotNull String commonModelName); } public interface _FinalStage { CreateFieldMappingRequest build(); + /** + *

      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.

      + */ _FinalStage excludeRemoteFieldMetadata(Optional excludeRemoteFieldMetadata); _FinalStage excludeRemoteFieldMetadata(Boolean excludeRemoteFieldMetadata); + /** + *

      The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.

      + */ _FinalStage remoteFieldTraversalPath(List remoteFieldTraversalPath); _FinalStage addRemoteFieldTraversalPath(JsonNode remoteFieldTraversalPath); @@ -233,7 +254,7 @@ public Builder from(CreateFieldMappingRequest other) { } /** - *

      The name of the target field you want this remote field to map to.

      + * The name of the target field you want this remote field to map to.

      The name of the target field you want this remote field to map to.

      * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -244,7 +265,7 @@ public TargetFieldDescriptionStage targetFieldName(@NotNull String targetFieldNa } /** - *

      The description of the target field you want this remote field to map to.

      + * The description of the target field you want this remote field to map to.

      The description of the target field you want this remote field to map to.

      * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -255,7 +276,7 @@ public RemoteMethodStage targetFieldDescription(@NotNull String targetFieldDescr } /** - *

      The method of the remote endpoint where the remote field is coming from.

      + * The method of the remote endpoint where the remote field is coming from.

      The method of the remote endpoint where the remote field is coming from.

      * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -266,7 +287,7 @@ public RemoteUrlPathStage remoteMethod(@NotNull String remoteMethod) { } /** - *

      The path of the remote endpoint where the remote field is coming from.

      + * The path of the remote endpoint where the remote field is coming from.

      The path of the remote endpoint where the remote field is coming from.

      * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -277,7 +298,7 @@ public CommonModelNameStage remoteUrlPath(@NotNull String remoteUrlPath) { } /** - *

      The name of the Common Model that the remote field corresponds to in a given category.

      + * The name of the Common Model that the remote field corresponds to in a given category.

      The name of the Common Model that the remote field corresponds to in a given category.

      * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -307,6 +328,9 @@ public _FinalStage addRemoteFieldTraversalPath(JsonNode remoteFieldTraversalPath return this; } + /** + *

      The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.

      + */ @java.lang.Override @JsonSetter(value = "remote_field_traversal_path", nulls = Nulls.SKIP) public _FinalStage remoteFieldTraversalPath(List remoteFieldTraversalPath) { @@ -325,6 +349,9 @@ public _FinalStage excludeRemoteFieldMetadata(Boolean excludeRemoteFieldMetadata return this; } + /** + *

      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.

      + */ @java.lang.Override @JsonSetter(value = "exclude_remote_field_metadata", nulls = Nulls.SKIP) public _FinalStage excludeRemoteFieldMetadata(Optional excludeRemoteFieldMetadata) { diff --git a/src/main/java/com/merge/api/hris/types/DataPassthroughRequest.java b/src/main/java/com/merge/api/hris/types/DataPassthroughRequest.java index e4597817a..2c7733ed8 100644 --- a/src/main/java/com/merge/api/hris/types/DataPassthroughRequest.java +++ b/src/main/java/com/merge/api/hris/types/DataPassthroughRequest.java @@ -171,24 +171,39 @@ public interface MethodStage { } public interface PathStage { + /** + * The path of the request in the third party's platform. + */ _FinalStage path(@NotNull String path); } public interface _FinalStage { DataPassthroughRequest build(); + /** + *

      An optional override of the third party's base url for the request.

      + */ _FinalStage baseUrlOverride(Optional baseUrlOverride); _FinalStage baseUrlOverride(String baseUrlOverride); + /** + *

      The data with the request. You must include a request_format parameter matching the data's format

      + */ _FinalStage data(Optional data); _FinalStage data(String data); + /** + *

      Pass an array of MultipartFormField objects in here instead of using the data param if request_format is set to MULTIPART.

      + */ _FinalStage multipartFormData(Optional> multipartFormData); _FinalStage multipartFormData(List multipartFormData); + /** + *

      The headers to use for the request (Merge will handle the account's authorization headers). Content-Type header is required for passthrough. Choose content type corresponding to expected format of receiving server.

      + */ _FinalStage headers(Optional> headers); _FinalStage headers(Map headers); @@ -197,6 +212,9 @@ public interface _FinalStage { _FinalStage requestFormat(RequestFormatEnum requestFormat); + /** + *

      Optional. If true, the response will always be an object of the form {"type": T, "value": ...} where T will be one of string, boolean, number, null, array, object.

      + */ _FinalStage normalizeResponse(Optional normalizeResponse); _FinalStage normalizeResponse(Boolean normalizeResponse); @@ -246,7 +264,7 @@ public PathStage method(@NotNull MethodEnum method) { } /** - *

      The path of the request in the third party's platform.

      + * The path of the request in the third party's platform.

      The path of the request in the third party's platform.

      * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -266,6 +284,9 @@ public _FinalStage normalizeResponse(Boolean normalizeResponse) { return this; } + /** + *

      Optional. If true, the response will always be an object of the form {"type": T, "value": ...} where T will be one of string, boolean, number, null, array, object.

      + */ @java.lang.Override @JsonSetter(value = "normalize_response", nulls = Nulls.SKIP) public _FinalStage normalizeResponse(Optional normalizeResponse) { @@ -296,6 +317,9 @@ public _FinalStage headers(Map headers) { return this; } + /** + *

      The headers to use for the request (Merge will handle the account's authorization headers). Content-Type header is required for passthrough. Choose content type corresponding to expected format of receiving server.

      + */ @java.lang.Override @JsonSetter(value = "headers", nulls = Nulls.SKIP) public _FinalStage headers(Optional> headers) { @@ -313,6 +337,9 @@ public _FinalStage multipartFormData(List multipartFo return this; } + /** + *

      Pass an array of MultipartFormField objects in here instead of using the data param if request_format is set to MULTIPART.

      + */ @java.lang.Override @JsonSetter(value = "multipart_form_data", nulls = Nulls.SKIP) public _FinalStage multipartFormData(Optional> multipartFormData) { @@ -330,6 +357,9 @@ public _FinalStage data(String data) { return this; } + /** + *

      The data with the request. You must include a request_format parameter matching the data's format

      + */ @java.lang.Override @JsonSetter(value = "data", nulls = Nulls.SKIP) public _FinalStage data(Optional data) { @@ -347,6 +377,9 @@ public _FinalStage baseUrlOverride(String baseUrlOverride) { return this; } + /** + *

      An optional override of the third party's base url for the request.

      + */ @java.lang.Override @JsonSetter(value = "base_url_override", nulls = Nulls.SKIP) public _FinalStage baseUrlOverride(Optional baseUrlOverride) { diff --git a/src/main/java/com/merge/api/hris/types/Deduction.java b/src/main/java/com/merge/api/hris/types/Deduction.java index 11f44c158..949ed8a61 100644 --- a/src/main/java/com/merge/api/hris/types/Deduction.java +++ b/src/main/java/com/merge/api/hris/types/Deduction.java @@ -255,6 +255,9 @@ public Builder id(String id) { return this; } + /** + *

      The third-party API ID of the matching object.

      + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -266,6 +269,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

      The datetime that this object was created by Merge.

      + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -277,6 +283,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

      The datetime that this object was modified by Merge.

      + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -299,6 +308,9 @@ public Builder employeePayrollRun(String employeePayrollRun) { return this; } + /** + *

      The deduction's name.

      + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -310,6 +322,9 @@ public Builder name(String name) { return this; } + /** + *

      The amount of money that is withheld from an employee's gross pay by the employee.

      + */ @JsonSetter(value = "employee_deduction", nulls = Nulls.SKIP) public Builder employeeDeduction(Optional employeeDeduction) { this.employeeDeduction = employeeDeduction; @@ -321,6 +336,9 @@ public Builder employeeDeduction(Double employeeDeduction) { return this; } + /** + *

      The amount of money that is withheld on behalf of an employee by the company.

      + */ @JsonSetter(value = "company_deduction", nulls = Nulls.SKIP) public Builder companyDeduction(Optional companyDeduction) { this.companyDeduction = companyDeduction; @@ -332,6 +350,9 @@ public Builder companyDeduction(Double companyDeduction) { return this; } + /** + *

      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.

      + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/hris/types/Dependent.java b/src/main/java/com/merge/api/hris/types/Dependent.java index b417240da..be852b14d 100644 --- a/src/main/java/com/merge/api/hris/types/Dependent.java +++ b/src/main/java/com/merge/api/hris/types/Dependent.java @@ -37,13 +37,13 @@ public final class Dependent { private final Optional lastName; - private final Optional relationship; + private final Optional relationship; private final Optional employee; private final Optional dateOfBirth; - private final Optional gender; + private final Optional gender; private final Optional phoneNumber; @@ -69,10 +69,10 @@ private Dependent( Optional firstName, Optional middleName, Optional lastName, - Optional relationship, + Optional relationship, Optional employee, Optional dateOfBirth, - Optional gender, + Optional gender, Optional phoneNumber, Optional homeLocation, Optional isStudent, @@ -164,7 +164,7 @@ public Optional getLastName() { *
    */ @JsonProperty("relationship") - public Optional getRelationship() { + public Optional getRelationship() { return relationship; } @@ -195,7 +195,7 @@ public Optional getDateOfBirth() { * */ @JsonProperty("gender") - public Optional getGender() { + public Optional getGender() { return gender; } @@ -329,13 +329,13 @@ public static final class Builder { private Optional lastName = Optional.empty(); - private Optional relationship = Optional.empty(); + private Optional relationship = Optional.empty(); private Optional employee = Optional.empty(); private Optional dateOfBirth = Optional.empty(); - private Optional gender = Optional.empty(); + private Optional gender = Optional.empty(); private Optional phoneNumber = Optional.empty(); @@ -389,6 +389,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -400,6 +403,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -411,6 +417,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -422,6 +431,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The dependents's first name.

    + */ @JsonSetter(value = "first_name", nulls = Nulls.SKIP) public Builder firstName(Optional firstName) { this.firstName = firstName; @@ -433,6 +445,9 @@ public Builder firstName(String firstName) { return this; } + /** + *

    The dependents's middle name.

    + */ @JsonSetter(value = "middle_name", nulls = Nulls.SKIP) public Builder middleName(Optional middleName) { this.middleName = middleName; @@ -444,6 +459,9 @@ public Builder middleName(String middleName) { return this; } + /** + *

    The dependents's last name.

    + */ @JsonSetter(value = "last_name", nulls = Nulls.SKIP) public Builder lastName(Optional lastName) { this.lastName = lastName; @@ -455,17 +473,28 @@ public Builder lastName(String lastName) { return this; } + /** + *

    The dependent's relationship to the employee.

    + *
      + *
    • CHILD - CHILD
    • + *
    • SPOUSE - SPOUSE
    • + *
    • DOMESTIC_PARTNER - DOMESTIC_PARTNER
    • + *
    + */ @JsonSetter(value = "relationship", nulls = Nulls.SKIP) - public Builder relationship(Optional relationship) { + public Builder relationship(Optional relationship) { this.relationship = relationship; return this; } - public Builder relationship(RelationshipEnum relationship) { + public Builder relationship(DependentRelationship relationship) { this.relationship = Optional.ofNullable(relationship); return this; } + /** + *

    The employee this person is a dependent of.

    + */ @JsonSetter(value = "employee", nulls = Nulls.SKIP) public Builder employee(Optional employee) { this.employee = employee; @@ -477,6 +506,9 @@ public Builder employee(String employee) { return this; } + /** + *

    The dependent's date of birth.

    + */ @JsonSetter(value = "date_of_birth", nulls = Nulls.SKIP) public Builder dateOfBirth(Optional dateOfBirth) { this.dateOfBirth = dateOfBirth; @@ -488,17 +520,30 @@ public Builder dateOfBirth(OffsetDateTime dateOfBirth) { return this; } + /** + *

    The dependent's gender.

    + *
      + *
    • MALE - MALE
    • + *
    • FEMALE - FEMALE
    • + *
    • NON-BINARY - NON-BINARY
    • + *
    • OTHER - OTHER
    • + *
    • PREFER_NOT_TO_DISCLOSE - PREFER_NOT_TO_DISCLOSE
    • + *
    + */ @JsonSetter(value = "gender", nulls = Nulls.SKIP) - public Builder gender(Optional gender) { + public Builder gender(Optional gender) { this.gender = gender; return this; } - public Builder gender(GenderEnum gender) { + public Builder gender(DependentGender gender) { this.gender = Optional.ofNullable(gender); return this; } + /** + *

    The dependent's phone number.

    + */ @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) public Builder phoneNumber(Optional phoneNumber) { this.phoneNumber = phoneNumber; @@ -510,6 +555,9 @@ public Builder phoneNumber(String phoneNumber) { return this; } + /** + *

    The dependents's home address.

    + */ @JsonSetter(value = "home_location", nulls = Nulls.SKIP) public Builder homeLocation(Optional homeLocation) { this.homeLocation = homeLocation; @@ -521,6 +569,9 @@ public Builder homeLocation(String homeLocation) { return this; } + /** + *

    Whether or not the dependent is a student

    + */ @JsonSetter(value = "is_student", nulls = Nulls.SKIP) public Builder isStudent(Optional isStudent) { this.isStudent = isStudent; @@ -532,6 +583,9 @@ public Builder isStudent(Boolean isStudent) { return this; } + /** + *

    The dependents's social security number.

    + */ @JsonSetter(value = "ssn", nulls = Nulls.SKIP) public Builder ssn(Optional ssn) { this.ssn = ssn; @@ -543,6 +597,9 @@ public Builder ssn(String ssn) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/hris/types/DependentGender.java b/src/main/java/com/merge/api/hris/types/DependentGender.java new file mode 100644 index 000000000..4c11b2461 --- /dev/null +++ b/src/main/java/com/merge/api/hris/types/DependentGender.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.hris.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = DependentGender.Deserializer.class) +public final class DependentGender { + private final Object value; + + private final int type; + + private DependentGender(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((GenderEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof DependentGender && equalTo((DependentGender) other); + } + + private boolean equalTo(DependentGender other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static DependentGender of(GenderEnum value) { + return new DependentGender(value, 0); + } + + public static DependentGender of(String value) { + return new DependentGender(value, 1); + } + + public interface Visitor { + T visit(GenderEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(DependentGender.class); + } + + @java.lang.Override + public DependentGender deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, GenderEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/hris/types/DependentRelationship.java b/src/main/java/com/merge/api/hris/types/DependentRelationship.java new file mode 100644 index 000000000..ed429ea5f --- /dev/null +++ b/src/main/java/com/merge/api/hris/types/DependentRelationship.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.hris.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = DependentRelationship.Deserializer.class) +public final class DependentRelationship { + private final Object value; + + private final int type; + + private DependentRelationship(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((RelationshipEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof DependentRelationship && equalTo((DependentRelationship) other); + } + + private boolean equalTo(DependentRelationship other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static DependentRelationship of(RelationshipEnum value) { + return new DependentRelationship(value, 0); + } + + public static DependentRelationship of(String value) { + return new DependentRelationship(value, 1); + } + + public interface Visitor { + T visit(RelationshipEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(DependentRelationship.class); + } + + @java.lang.Override + public DependentRelationship deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, RelationshipEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/hris/types/DependentsListRequest.java b/src/main/java/com/merge/api/hris/types/DependentsListRequest.java index 3db599881..9c3c9a64c 100644 --- a/src/main/java/com/merge/api/hris/types/DependentsListRequest.java +++ b/src/main/java/com/merge/api/hris/types/DependentsListRequest.java @@ -254,6 +254,9 @@ public Builder from(DependentsListRequest other) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -265,6 +268,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -276,6 +282,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -287,6 +296,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -298,6 +310,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -309,6 +324,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include sensitive fields (such as social security numbers) in the response.

    + */ @JsonSetter(value = "include_sensitive_fields", nulls = Nulls.SKIP) public Builder includeSensitiveFields(Optional includeSensitiveFields) { this.includeSensitiveFields = includeSensitiveFields; @@ -320,6 +338,9 @@ public Builder includeSensitiveFields(Boolean includeSensitiveFields) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -331,6 +352,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -342,6 +366,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -353,6 +380,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -364,6 +394,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; diff --git a/src/main/java/com/merge/api/hris/types/DependentsRetrieveRequest.java b/src/main/java/com/merge/api/hris/types/DependentsRetrieveRequest.java index a4f38fbfe..4e170d094 100644 --- a/src/main/java/com/merge/api/hris/types/DependentsRetrieveRequest.java +++ b/src/main/java/com/merge/api/hris/types/DependentsRetrieveRequest.java @@ -114,6 +114,9 @@ public Builder from(DependentsRetrieveRequest other) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -125,6 +128,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include sensitive fields (such as social security numbers) in the response.

    + */ @JsonSetter(value = "include_sensitive_fields", nulls = Nulls.SKIP) public Builder includeSensitiveFields(Optional includeSensitiveFields) { this.includeSensitiveFields = includeSensitiveFields; @@ -136,6 +142,9 @@ public Builder includeSensitiveFields(Boolean includeSensitiveFields) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/hris/types/Earning.java b/src/main/java/com/merge/api/hris/types/Earning.java index 80315dd01..4bf9089bd 100644 --- a/src/main/java/com/merge/api/hris/types/Earning.java +++ b/src/main/java/com/merge/api/hris/types/Earning.java @@ -35,7 +35,7 @@ public final class Earning { private final Optional amount; - private final Optional type; + private final Optional type; private final Optional remoteWasDeleted; @@ -52,7 +52,7 @@ private Earning( Optional modifiedAt, Optional employeePayrollRun, Optional amount, - Optional type, + Optional type, Optional remoteWasDeleted, Optional> fieldMappings, Optional> remoteData, @@ -122,7 +122,7 @@ public Optional getAmount() { * */ @JsonProperty("type") - public Optional getType() { + public Optional getType() { return type; } @@ -206,7 +206,7 @@ public static final class Builder { private Optional amount = Optional.empty(); - private Optional type = Optional.empty(); + private Optional type = Optional.empty(); private Optional remoteWasDeleted = Optional.empty(); @@ -244,6 +244,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -255,6 +258,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -266,6 +272,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -288,6 +297,9 @@ public Builder employeePayrollRun(String employeePayrollRun) { return this; } + /** + *

    The amount earned.

    + */ @JsonSetter(value = "amount", nulls = Nulls.SKIP) public Builder amount(Optional amount) { this.amount = amount; @@ -299,17 +311,29 @@ public Builder amount(Double amount) { return this; } + /** + *

    The type of earning.

    + *
      + *
    • SALARY - SALARY
    • + *
    • REIMBURSEMENT - REIMBURSEMENT
    • + *
    • OVERTIME - OVERTIME
    • + *
    • BONUS - BONUS
    • + *
    + */ @JsonSetter(value = "type", nulls = Nulls.SKIP) - public Builder type(Optional type) { + public Builder type(Optional type) { this.type = type; return this; } - public Builder type(EarningTypeEnum type) { + public Builder type(EarningType type) { this.type = Optional.ofNullable(type); return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/hris/types/EarningType.java b/src/main/java/com/merge/api/hris/types/EarningType.java new file mode 100644 index 000000000..49dbc5750 --- /dev/null +++ b/src/main/java/com/merge/api/hris/types/EarningType.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.hris.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EarningType.Deserializer.class) +public final class EarningType { + private final Object value; + + private final int type; + + private EarningType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EarningTypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EarningType && equalTo((EarningType) other); + } + + private boolean equalTo(EarningType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EarningType of(EarningTypeEnum value) { + return new EarningType(value, 0); + } + + public static EarningType of(String value) { + return new EarningType(value, 1); + } + + public interface Visitor { + T visit(EarningTypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EarningType.class); + } + + @java.lang.Override + public EarningType deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, EarningTypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/hris/types/Employee.java b/src/main/java/com/merge/api/hris/types/Employee.java index e6705a5a8..d6a966542 100644 --- a/src/main/java/com/merge/api/hris/types/Employee.java +++ b/src/main/java/com/merge/api/hris/types/Employee.java @@ -67,11 +67,11 @@ public final class Employee { private final Optional ssn; - private final Optional gender; + private final Optional gender; - private final Optional ethnicity; + private final Optional ethnicity; - private final Optional maritalStatus; + private final Optional maritalStatus; private final Optional dateOfBirth; @@ -81,7 +81,7 @@ public final class Employee { private final Optional remoteCreatedAt; - private final Optional employmentStatus; + private final Optional employmentStatus; private final Optional terminationDate; @@ -120,14 +120,14 @@ private Employee( Optional team, Optional payGroup, Optional ssn, - Optional gender, - Optional ethnicity, - Optional maritalStatus, + Optional gender, + Optional ethnicity, + Optional maritalStatus, Optional dateOfBirth, Optional hireDate, Optional startDate, Optional remoteCreatedAt, - Optional employmentStatus, + Optional employmentStatus, Optional terminationDate, Optional avatar, Optional> customFields, @@ -355,7 +355,7 @@ public Optional getSsn() { * */ @JsonProperty("gender") - public Optional getGender() { + public Optional getGender() { return gender; } @@ -373,7 +373,7 @@ public Optional getGender() { * */ @JsonProperty("ethnicity") - public Optional getEthnicity() { + public Optional getEthnicity() { return ethnicity; } @@ -388,7 +388,7 @@ public Optional getEthnicity() { * */ @JsonProperty("marital_status") - public Optional getMaritalStatus() { + public Optional getMaritalStatus() { return maritalStatus; } @@ -433,7 +433,7 @@ public Optional getRemoteCreatedAt() { * */ @JsonProperty("employment_status") - public Optional getEmploymentStatus() { + public Optional getEmploymentStatus() { return employmentStatus; } @@ -625,11 +625,11 @@ public static final class Builder { private Optional ssn = Optional.empty(); - private Optional gender = Optional.empty(); + private Optional gender = Optional.empty(); - private Optional ethnicity = Optional.empty(); + private Optional ethnicity = Optional.empty(); - private Optional maritalStatus = Optional.empty(); + private Optional maritalStatus = Optional.empty(); private Optional dateOfBirth = Optional.empty(); @@ -639,7 +639,7 @@ public static final class Builder { private Optional remoteCreatedAt = Optional.empty(); - private Optional employmentStatus = Optional.empty(); + private Optional employmentStatus = Optional.empty(); private Optional terminationDate = Optional.empty(); @@ -709,6 +709,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -720,6 +723,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -731,6 +737,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -742,6 +751,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The employee's number that appears in the third-party integration's UI.

    + */ @JsonSetter(value = "employee_number", nulls = Nulls.SKIP) public Builder employeeNumber(Optional employeeNumber) { this.employeeNumber = employeeNumber; @@ -753,6 +765,9 @@ public Builder employeeNumber(String employeeNumber) { return this; } + /** + *

    The ID of the employee's company.

    + */ @JsonSetter(value = "company", nulls = Nulls.SKIP) public Builder company(Optional company) { this.company = company; @@ -764,6 +779,9 @@ public Builder company(EmployeeCompany company) { return this; } + /** + *

    The employee's first name.

    + */ @JsonSetter(value = "first_name", nulls = Nulls.SKIP) public Builder firstName(Optional firstName) { this.firstName = firstName; @@ -775,6 +793,9 @@ public Builder firstName(String firstName) { return this; } + /** + *

    The employee's last name.

    + */ @JsonSetter(value = "last_name", nulls = Nulls.SKIP) public Builder lastName(Optional lastName) { this.lastName = lastName; @@ -786,6 +807,9 @@ public Builder lastName(String lastName) { return this; } + /** + *

    The employee's preferred first name.

    + */ @JsonSetter(value = "preferred_name", nulls = Nulls.SKIP) public Builder preferredName(Optional preferredName) { this.preferredName = preferredName; @@ -797,6 +821,9 @@ public Builder preferredName(String preferredName) { return this; } + /** + *

    The employee's full name, to use for display purposes. If a preferred first name is available, the full name will include the preferred first name.

    + */ @JsonSetter(value = "display_full_name", nulls = Nulls.SKIP) public Builder displayFullName(Optional displayFullName) { this.displayFullName = displayFullName; @@ -808,6 +835,9 @@ public Builder displayFullName(String displayFullName) { return this; } + /** + *

    The employee's username that appears in the remote UI.

    + */ @JsonSetter(value = "username", nulls = Nulls.SKIP) public Builder username(Optional username) { this.username = username; @@ -830,6 +860,9 @@ public Builder groups(List> groups) { return this; } + /** + *

    The employee's work email.

    + */ @JsonSetter(value = "work_email", nulls = Nulls.SKIP) public Builder workEmail(Optional workEmail) { this.workEmail = workEmail; @@ -841,6 +874,9 @@ public Builder workEmail(String workEmail) { return this; } + /** + *

    The employee's personal email.

    + */ @JsonSetter(value = "personal_email", nulls = Nulls.SKIP) public Builder personalEmail(Optional personalEmail) { this.personalEmail = personalEmail; @@ -852,6 +888,9 @@ public Builder personalEmail(String personalEmail) { return this; } + /** + *

    The employee's mobile phone number.

    + */ @JsonSetter(value = "mobile_phone_number", nulls = Nulls.SKIP) public Builder mobilePhoneNumber(Optional mobilePhoneNumber) { this.mobilePhoneNumber = mobilePhoneNumber; @@ -863,6 +902,9 @@ public Builder mobilePhoneNumber(String mobilePhoneNumber) { return this; } + /** + *

    Array of Employment IDs for this Employee.

    + */ @JsonSetter(value = "employments", nulls = Nulls.SKIP) public Builder employments(Optional>> employments) { this.employments = employments; @@ -874,6 +916,9 @@ public Builder employments(List> employments) return this; } + /** + *

    The employee's home address.

    + */ @JsonSetter(value = "home_location", nulls = Nulls.SKIP) public Builder homeLocation(Optional homeLocation) { this.homeLocation = homeLocation; @@ -885,6 +930,9 @@ public Builder homeLocation(EmployeeHomeLocation homeLocation) { return this; } + /** + *

    The employee's work address.

    + */ @JsonSetter(value = "work_location", nulls = Nulls.SKIP) public Builder workLocation(Optional workLocation) { this.workLocation = workLocation; @@ -896,6 +944,9 @@ public Builder workLocation(EmployeeWorkLocation workLocation) { return this; } + /** + *

    The employee ID of the employee's manager.

    + */ @JsonSetter(value = "manager", nulls = Nulls.SKIP) public Builder manager(Optional manager) { this.manager = manager; @@ -907,6 +958,9 @@ public Builder manager(EmployeeManager manager) { return this; } + /** + *

    The employee's team.

    + */ @JsonSetter(value = "team", nulls = Nulls.SKIP) public Builder team(Optional team) { this.team = team; @@ -918,6 +972,9 @@ public Builder team(EmployeeTeam team) { return this; } + /** + *

    The employee's pay group

    + */ @JsonSetter(value = "pay_group", nulls = Nulls.SKIP) public Builder payGroup(Optional payGroup) { this.payGroup = payGroup; @@ -929,6 +986,9 @@ public Builder payGroup(EmployeePayGroup payGroup) { return this; } + /** + *

    The employee's social security number.

    + */ @JsonSetter(value = "ssn", nulls = Nulls.SKIP) public Builder ssn(Optional ssn) { this.ssn = ssn; @@ -940,39 +1000,75 @@ public Builder ssn(String ssn) { return this; } + /** + *

    The employee's gender.

    + *
      + *
    • MALE - MALE
    • + *
    • FEMALE - FEMALE
    • + *
    • NON-BINARY - NON-BINARY
    • + *
    • OTHER - OTHER
    • + *
    • PREFER_NOT_TO_DISCLOSE - PREFER_NOT_TO_DISCLOSE
    • + *
    + */ @JsonSetter(value = "gender", nulls = Nulls.SKIP) - public Builder gender(Optional gender) { + public Builder gender(Optional gender) { this.gender = gender; return this; } - public Builder gender(GenderEnum gender) { + public Builder gender(EmployeeGender gender) { this.gender = Optional.ofNullable(gender); return this; } + /** + *

    The employee's ethnicity.

    + *
      + *
    • AMERICAN_INDIAN_OR_ALASKA_NATIVE - AMERICAN_INDIAN_OR_ALASKA_NATIVE
    • + *
    • ASIAN_OR_INDIAN_SUBCONTINENT - ASIAN_OR_INDIAN_SUBCONTINENT
    • + *
    • BLACK_OR_AFRICAN_AMERICAN - BLACK_OR_AFRICAN_AMERICAN
    • + *
    • HISPANIC_OR_LATINO - HISPANIC_OR_LATINO
    • + *
    • NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER - NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER
    • + *
    • TWO_OR_MORE_RACES - TWO_OR_MORE_RACES
    • + *
    • WHITE - WHITE
    • + *
    • PREFER_NOT_TO_DISCLOSE - PREFER_NOT_TO_DISCLOSE
    • + *
    + */ @JsonSetter(value = "ethnicity", nulls = Nulls.SKIP) - public Builder ethnicity(Optional ethnicity) { + public Builder ethnicity(Optional ethnicity) { this.ethnicity = ethnicity; return this; } - public Builder ethnicity(EthnicityEnum ethnicity) { + public Builder ethnicity(EmployeeEthnicity ethnicity) { this.ethnicity = Optional.ofNullable(ethnicity); return this; } + /** + *

    The employee's filing status as related to marital status.

    + *
      + *
    • SINGLE - SINGLE
    • + *
    • MARRIED_FILING_JOINTLY - MARRIED_FILING_JOINTLY
    • + *
    • MARRIED_FILING_SEPARATELY - MARRIED_FILING_SEPARATELY
    • + *
    • HEAD_OF_HOUSEHOLD - HEAD_OF_HOUSEHOLD
    • + *
    • QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD - QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD
    • + *
    + */ @JsonSetter(value = "marital_status", nulls = Nulls.SKIP) - public Builder maritalStatus(Optional maritalStatus) { + public Builder maritalStatus(Optional maritalStatus) { this.maritalStatus = maritalStatus; return this; } - public Builder maritalStatus(MaritalStatusEnum maritalStatus) { + public Builder maritalStatus(EmployeeMaritalStatus maritalStatus) { this.maritalStatus = Optional.ofNullable(maritalStatus); return this; } + /** + *

    The employee's date of birth.

    + */ @JsonSetter(value = "date_of_birth", nulls = Nulls.SKIP) public Builder dateOfBirth(Optional dateOfBirth) { this.dateOfBirth = dateOfBirth; @@ -984,6 +1080,9 @@ public Builder dateOfBirth(OffsetDateTime dateOfBirth) { return this; } + /** + *

    The date that the employee was hired, usually the day that an offer letter is signed. If an employee has multiple hire dates from previous employments, this represents the most recent hire date. Note: If you're looking for the employee's start date, refer to the start_date field.

    + */ @JsonSetter(value = "hire_date", nulls = Nulls.SKIP) public Builder hireDate(Optional hireDate) { this.hireDate = hireDate; @@ -995,6 +1094,9 @@ public Builder hireDate(OffsetDateTime hireDate) { return this; } + /** + *

    The date that the employee started working. If an employee was rehired, the most recent start date will be returned.

    + */ @JsonSetter(value = "start_date", nulls = Nulls.SKIP) public Builder startDate(Optional startDate) { this.startDate = startDate; @@ -1006,6 +1108,9 @@ public Builder startDate(OffsetDateTime startDate) { return this; } + /** + *

    When the third party's employee was created.

    + */ @JsonSetter(value = "remote_created_at", nulls = Nulls.SKIP) public Builder remoteCreatedAt(Optional remoteCreatedAt) { this.remoteCreatedAt = remoteCreatedAt; @@ -1017,17 +1122,28 @@ public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { return this; } + /** + *

    The employment status of the employee.

    + *
      + *
    • ACTIVE - ACTIVE
    • + *
    • PENDING - PENDING
    • + *
    • INACTIVE - INACTIVE
    • + *
    + */ @JsonSetter(value = "employment_status", nulls = Nulls.SKIP) - public Builder employmentStatus(Optional employmentStatus) { + public Builder employmentStatus(Optional employmentStatus) { this.employmentStatus = employmentStatus; return this; } - public Builder employmentStatus(EmploymentStatusEnum employmentStatus) { + public Builder employmentStatus(EmployeeEmploymentStatus employmentStatus) { this.employmentStatus = Optional.ofNullable(employmentStatus); return this; } + /** + *

    The employee's termination date.

    + */ @JsonSetter(value = "termination_date", nulls = Nulls.SKIP) public Builder terminationDate(Optional terminationDate) { this.terminationDate = terminationDate; @@ -1039,6 +1155,9 @@ public Builder terminationDate(OffsetDateTime terminationDate) { return this; } + /** + *

    The URL of the employee's avatar image.

    + */ @JsonSetter(value = "avatar", nulls = Nulls.SKIP) public Builder avatar(Optional avatar) { this.avatar = avatar; @@ -1050,6 +1169,9 @@ public Builder avatar(String avatar) { return this; } + /** + *

    Custom fields configured for a given model.

    + */ @JsonSetter(value = "custom_fields", nulls = Nulls.SKIP) public Builder customFields(Optional> customFields) { this.customFields = customFields; @@ -1061,6 +1183,9 @@ public Builder customFields(Map customFields) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/hris/types/EmployeeEmploymentStatus.java b/src/main/java/com/merge/api/hris/types/EmployeeEmploymentStatus.java new file mode 100644 index 000000000..16d9a6bd2 --- /dev/null +++ b/src/main/java/com/merge/api/hris/types/EmployeeEmploymentStatus.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.hris.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EmployeeEmploymentStatus.Deserializer.class) +public final class EmployeeEmploymentStatus { + private final Object value; + + private final int type; + + private EmployeeEmploymentStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EmploymentStatusEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EmployeeEmploymentStatus && equalTo((EmployeeEmploymentStatus) other); + } + + private boolean equalTo(EmployeeEmploymentStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EmployeeEmploymentStatus of(EmploymentStatusEnum value) { + return new EmployeeEmploymentStatus(value, 0); + } + + public static EmployeeEmploymentStatus of(String value) { + return new EmployeeEmploymentStatus(value, 1); + } + + public interface Visitor { + T visit(EmploymentStatusEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EmployeeEmploymentStatus.class); + } + + @java.lang.Override + public EmployeeEmploymentStatus deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, EmploymentStatusEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/hris/types/EmployeeEndpointRequest.java b/src/main/java/com/merge/api/hris/types/EmployeeEndpointRequest.java index cba7f123d..e561a9956 100644 --- a/src/main/java/com/merge/api/hris/types/EmployeeEndpointRequest.java +++ b/src/main/java/com/merge/api/hris/types/EmployeeEndpointRequest.java @@ -99,10 +99,16 @@ public interface ModelStage { public interface _FinalStage { EmployeeEndpointRequest build(); + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ _FinalStage isDebugMode(Optional isDebugMode); _FinalStage isDebugMode(Boolean isDebugMode); + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ _FinalStage runAsync(Optional runAsync); _FinalStage runAsync(Boolean runAsync); @@ -146,6 +152,9 @@ public _FinalStage runAsync(Boolean runAsync) { return this; } + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ @java.lang.Override @JsonSetter(value = "run_async", nulls = Nulls.SKIP) public _FinalStage runAsync(Optional runAsync) { @@ -163,6 +172,9 @@ public _FinalStage isDebugMode(Boolean isDebugMode) { return this; } + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ @java.lang.Override @JsonSetter(value = "is_debug_mode", nulls = Nulls.SKIP) public _FinalStage isDebugMode(Optional isDebugMode) { diff --git a/src/main/java/com/merge/api/hris/types/EmployeeEthnicity.java b/src/main/java/com/merge/api/hris/types/EmployeeEthnicity.java new file mode 100644 index 000000000..8e3643f98 --- /dev/null +++ b/src/main/java/com/merge/api/hris/types/EmployeeEthnicity.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.hris.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EmployeeEthnicity.Deserializer.class) +public final class EmployeeEthnicity { + private final Object value; + + private final int type; + + private EmployeeEthnicity(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EthnicityEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EmployeeEthnicity && equalTo((EmployeeEthnicity) other); + } + + private boolean equalTo(EmployeeEthnicity other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EmployeeEthnicity of(EthnicityEnum value) { + return new EmployeeEthnicity(value, 0); + } + + public static EmployeeEthnicity of(String value) { + return new EmployeeEthnicity(value, 1); + } + + public interface Visitor { + T visit(EthnicityEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EmployeeEthnicity.class); + } + + @java.lang.Override + public EmployeeEthnicity deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, EthnicityEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/hris/types/EmployeeGender.java b/src/main/java/com/merge/api/hris/types/EmployeeGender.java new file mode 100644 index 000000000..cca6d4449 --- /dev/null +++ b/src/main/java/com/merge/api/hris/types/EmployeeGender.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.hris.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EmployeeGender.Deserializer.class) +public final class EmployeeGender { + private final Object value; + + private final int type; + + private EmployeeGender(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((GenderEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EmployeeGender && equalTo((EmployeeGender) other); + } + + private boolean equalTo(EmployeeGender other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EmployeeGender of(GenderEnum value) { + return new EmployeeGender(value, 0); + } + + public static EmployeeGender of(String value) { + return new EmployeeGender(value, 1); + } + + public interface Visitor { + T visit(GenderEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EmployeeGender.class); + } + + @java.lang.Override + public EmployeeGender deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, GenderEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/hris/types/EmployeeMaritalStatus.java b/src/main/java/com/merge/api/hris/types/EmployeeMaritalStatus.java new file mode 100644 index 000000000..738def2af --- /dev/null +++ b/src/main/java/com/merge/api/hris/types/EmployeeMaritalStatus.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.hris.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EmployeeMaritalStatus.Deserializer.class) +public final class EmployeeMaritalStatus { + private final Object value; + + private final int type; + + private EmployeeMaritalStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((MaritalStatusEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EmployeeMaritalStatus && equalTo((EmployeeMaritalStatus) other); + } + + private boolean equalTo(EmployeeMaritalStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EmployeeMaritalStatus of(MaritalStatusEnum value) { + return new EmployeeMaritalStatus(value, 0); + } + + public static EmployeeMaritalStatus of(String value) { + return new EmployeeMaritalStatus(value, 1); + } + + public interface Visitor { + T visit(MaritalStatusEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EmployeeMaritalStatus.class); + } + + @java.lang.Override + public EmployeeMaritalStatus deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, MaritalStatusEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/hris/types/EmployeePayrollRun.java b/src/main/java/com/merge/api/hris/types/EmployeePayrollRun.java index 287d67f5b..f6b30ed06 100644 --- a/src/main/java/com/merge/api/hris/types/EmployeePayrollRun.java +++ b/src/main/java/com/merge/api/hris/types/EmployeePayrollRun.java @@ -351,6 +351,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -362,6 +365,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -373,6 +379,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -384,6 +393,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The employee whose payroll is being run.

    + */ @JsonSetter(value = "employee", nulls = Nulls.SKIP) public Builder employee(Optional employee) { this.employee = employee; @@ -395,6 +407,9 @@ public Builder employee(EmployeePayrollRunEmployee employee) { return this; } + /** + *

    The payroll being run.

    + */ @JsonSetter(value = "payroll_run", nulls = Nulls.SKIP) public Builder payrollRun(Optional payrollRun) { this.payrollRun = payrollRun; @@ -406,6 +421,9 @@ public Builder payrollRun(EmployeePayrollRunPayrollRun payrollRun) { return this; } + /** + *

    The total earnings throughout a given period for an employee before any deductions are made.

    + */ @JsonSetter(value = "gross_pay", nulls = Nulls.SKIP) public Builder grossPay(Optional grossPay) { this.grossPay = grossPay; @@ -417,6 +435,9 @@ public Builder grossPay(Double grossPay) { return this; } + /** + *

    The take-home pay throughout a given period for an employee after deductions are made.

    + */ @JsonSetter(value = "net_pay", nulls = Nulls.SKIP) public Builder netPay(Optional netPay) { this.netPay = netPay; @@ -428,6 +449,9 @@ public Builder netPay(Double netPay) { return this; } + /** + *

    The day and time the payroll run started.

    + */ @JsonSetter(value = "start_date", nulls = Nulls.SKIP) public Builder startDate(Optional startDate) { this.startDate = startDate; @@ -439,6 +463,9 @@ public Builder startDate(OffsetDateTime startDate) { return this; } + /** + *

    The day and time the payroll run ended.

    + */ @JsonSetter(value = "end_date", nulls = Nulls.SKIP) public Builder endDate(Optional endDate) { this.endDate = endDate; @@ -450,6 +477,9 @@ public Builder endDate(OffsetDateTime endDate) { return this; } + /** + *

    The day and time the payroll run was checked.

    + */ @JsonSetter(value = "check_date", nulls = Nulls.SKIP) public Builder checkDate(Optional checkDate) { this.checkDate = checkDate; @@ -494,6 +524,9 @@ public Builder taxes(List taxes) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/hris/types/EmployeePayrollRunsListRequest.java b/src/main/java/com/merge/api/hris/types/EmployeePayrollRunsListRequest.java index 767be2048..b7c456291 100644 --- a/src/main/java/com/merge/api/hris/types/EmployeePayrollRunsListRequest.java +++ b/src/main/java/com/merge/api/hris/types/EmployeePayrollRunsListRequest.java @@ -358,6 +358,9 @@ public Builder from(EmployeePayrollRunsListRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -374,6 +377,9 @@ public Builder expand(EmployeePayrollRunsListRequestExpandItem expand) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -385,6 +391,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -396,6 +405,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -407,6 +419,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    If provided, will only return employee payroll runs for this employee.

    + */ @JsonSetter(value = "employee_id", nulls = Nulls.SKIP) public Builder employeeId(Optional employeeId) { this.employeeId = employeeId; @@ -418,6 +433,9 @@ public Builder employeeId(String employeeId) { return this; } + /** + *

    If provided, will only return employee payroll runs ended after this datetime.

    + */ @JsonSetter(value = "ended_after", nulls = Nulls.SKIP) public Builder endedAfter(Optional endedAfter) { this.endedAfter = endedAfter; @@ -429,6 +447,9 @@ public Builder endedAfter(OffsetDateTime endedAfter) { return this; } + /** + *

    If provided, will only return employee payroll runs ended before this datetime.

    + */ @JsonSetter(value = "ended_before", nulls = Nulls.SKIP) public Builder endedBefore(Optional endedBefore) { this.endedBefore = endedBefore; @@ -440,6 +461,9 @@ public Builder endedBefore(OffsetDateTime endedBefore) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -451,6 +475,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -462,6 +489,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -473,6 +503,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -484,6 +517,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -495,6 +531,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -506,6 +545,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    If provided, will only return employee payroll runs for this employee.

    + */ @JsonSetter(value = "payroll_run_id", nulls = Nulls.SKIP) public Builder payrollRunId(Optional payrollRunId) { this.payrollRunId = payrollRunId; @@ -517,6 +559,9 @@ public Builder payrollRunId(String payrollRunId) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -528,6 +573,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    If provided, will only return employee payroll runs started after this datetime.

    + */ @JsonSetter(value = "started_after", nulls = Nulls.SKIP) public Builder startedAfter(Optional startedAfter) { this.startedAfter = startedAfter; @@ -539,6 +587,9 @@ public Builder startedAfter(OffsetDateTime startedAfter) { return this; } + /** + *

    If provided, will only return employee payroll runs started before this datetime.

    + */ @JsonSetter(value = "started_before", nulls = Nulls.SKIP) public Builder startedBefore(Optional startedBefore) { this.startedBefore = startedBefore; diff --git a/src/main/java/com/merge/api/hris/types/EmployeePayrollRunsRetrieveRequest.java b/src/main/java/com/merge/api/hris/types/EmployeePayrollRunsRetrieveRequest.java index 464a4bbb2..f8d203f41 100644 --- a/src/main/java/com/merge/api/hris/types/EmployeePayrollRunsRetrieveRequest.java +++ b/src/main/java/com/merge/api/hris/types/EmployeePayrollRunsRetrieveRequest.java @@ -117,6 +117,9 @@ public Builder from(EmployeePayrollRunsRetrieveRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -133,6 +136,9 @@ public Builder expand(EmployeePayrollRunsRetrieveRequestExpandItem expand) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -144,6 +150,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/hris/types/EmployeeRequest.java b/src/main/java/com/merge/api/hris/types/EmployeeRequest.java index 9ed03f463..3e9258931 100644 --- a/src/main/java/com/merge/api/hris/types/EmployeeRequest.java +++ b/src/main/java/com/merge/api/hris/types/EmployeeRequest.java @@ -59,11 +59,11 @@ public final class EmployeeRequest { private final Optional ssn; - private final Optional gender; + private final Optional gender; - private final Optional ethnicity; + private final Optional ethnicity; - private final Optional maritalStatus; + private final Optional maritalStatus; private final Optional dateOfBirth; @@ -71,7 +71,7 @@ public final class EmployeeRequest { private final Optional startDate; - private final Optional employmentStatus; + private final Optional employmentStatus; private final Optional terminationDate; @@ -102,13 +102,13 @@ private EmployeeRequest( Optional team, Optional payGroup, Optional ssn, - Optional gender, - Optional ethnicity, - Optional maritalStatus, + Optional gender, + Optional ethnicity, + Optional maritalStatus, Optional dateOfBirth, Optional hireDate, Optional startDate, - Optional employmentStatus, + Optional employmentStatus, Optional terminationDate, Optional avatar, Optional> integrationParams, @@ -298,7 +298,7 @@ public Optional getSsn() { * */ @JsonProperty("gender") - public Optional getGender() { + public Optional getGender() { return gender; } @@ -316,7 +316,7 @@ public Optional getGender() { * */ @JsonProperty("ethnicity") - public Optional getEthnicity() { + public Optional getEthnicity() { return ethnicity; } @@ -331,7 +331,7 @@ public Optional getEthnicity() { * */ @JsonProperty("marital_status") - public Optional getMaritalStatus() { + public Optional getMaritalStatus() { return maritalStatus; } @@ -368,7 +368,7 @@ public Optional getStartDate() { * */ @JsonProperty("employment_status") - public Optional getEmploymentStatus() { + public Optional getEmploymentStatus() { return employmentStatus; } @@ -522,11 +522,11 @@ public static final class Builder { private Optional ssn = Optional.empty(); - private Optional gender = Optional.empty(); + private Optional gender = Optional.empty(); - private Optional ethnicity = Optional.empty(); + private Optional ethnicity = Optional.empty(); - private Optional maritalStatus = Optional.empty(); + private Optional maritalStatus = Optional.empty(); private Optional dateOfBirth = Optional.empty(); @@ -534,7 +534,7 @@ public static final class Builder { private Optional startDate = Optional.empty(); - private Optional employmentStatus = Optional.empty(); + private Optional employmentStatus = Optional.empty(); private Optional terminationDate = Optional.empty(); @@ -582,6 +582,9 @@ public Builder from(EmployeeRequest other) { return this; } + /** + *

    The employee's number that appears in the third-party integration's UI.

    + */ @JsonSetter(value = "employee_number", nulls = Nulls.SKIP) public Builder employeeNumber(Optional employeeNumber) { this.employeeNumber = employeeNumber; @@ -593,6 +596,9 @@ public Builder employeeNumber(String employeeNumber) { return this; } + /** + *

    The ID of the employee's company.

    + */ @JsonSetter(value = "company", nulls = Nulls.SKIP) public Builder company(Optional company) { this.company = company; @@ -604,6 +610,9 @@ public Builder company(EmployeeRequestCompany company) { return this; } + /** + *

    The employee's first name.

    + */ @JsonSetter(value = "first_name", nulls = Nulls.SKIP) public Builder firstName(Optional firstName) { this.firstName = firstName; @@ -615,6 +624,9 @@ public Builder firstName(String firstName) { return this; } + /** + *

    The employee's last name.

    + */ @JsonSetter(value = "last_name", nulls = Nulls.SKIP) public Builder lastName(Optional lastName) { this.lastName = lastName; @@ -626,6 +638,9 @@ public Builder lastName(String lastName) { return this; } + /** + *

    The employee's preferred first name.

    + */ @JsonSetter(value = "preferred_name", nulls = Nulls.SKIP) public Builder preferredName(Optional preferredName) { this.preferredName = preferredName; @@ -637,6 +652,9 @@ public Builder preferredName(String preferredName) { return this; } + /** + *

    The employee's full name, to use for display purposes. If a preferred first name is available, the full name will include the preferred first name.

    + */ @JsonSetter(value = "display_full_name", nulls = Nulls.SKIP) public Builder displayFullName(Optional displayFullName) { this.displayFullName = displayFullName; @@ -648,6 +666,9 @@ public Builder displayFullName(String displayFullName) { return this; } + /** + *

    The employee's username that appears in the remote UI.

    + */ @JsonSetter(value = "username", nulls = Nulls.SKIP) public Builder username(Optional username) { this.username = username; @@ -670,6 +691,9 @@ public Builder groups(List> groups) { return this; } + /** + *

    The employee's work email.

    + */ @JsonSetter(value = "work_email", nulls = Nulls.SKIP) public Builder workEmail(Optional workEmail) { this.workEmail = workEmail; @@ -681,6 +705,9 @@ public Builder workEmail(String workEmail) { return this; } + /** + *

    The employee's personal email.

    + */ @JsonSetter(value = "personal_email", nulls = Nulls.SKIP) public Builder personalEmail(Optional personalEmail) { this.personalEmail = personalEmail; @@ -692,6 +719,9 @@ public Builder personalEmail(String personalEmail) { return this; } + /** + *

    The employee's mobile phone number.

    + */ @JsonSetter(value = "mobile_phone_number", nulls = Nulls.SKIP) public Builder mobilePhoneNumber(Optional mobilePhoneNumber) { this.mobilePhoneNumber = mobilePhoneNumber; @@ -703,6 +733,9 @@ public Builder mobilePhoneNumber(String mobilePhoneNumber) { return this; } + /** + *

    Array of Employment IDs for this Employee.

    + */ @JsonSetter(value = "employments", nulls = Nulls.SKIP) public Builder employments(Optional>> employments) { this.employments = employments; @@ -714,6 +747,9 @@ public Builder employments(List> employ return this; } + /** + *

    The employee's home address.

    + */ @JsonSetter(value = "home_location", nulls = Nulls.SKIP) public Builder homeLocation(Optional homeLocation) { this.homeLocation = homeLocation; @@ -725,6 +761,9 @@ public Builder homeLocation(EmployeeRequestHomeLocation homeLocation) { return this; } + /** + *

    The employee's work address.

    + */ @JsonSetter(value = "work_location", nulls = Nulls.SKIP) public Builder workLocation(Optional workLocation) { this.workLocation = workLocation; @@ -736,6 +775,9 @@ public Builder workLocation(EmployeeRequestWorkLocation workLocation) { return this; } + /** + *

    The employee ID of the employee's manager.

    + */ @JsonSetter(value = "manager", nulls = Nulls.SKIP) public Builder manager(Optional manager) { this.manager = manager; @@ -747,6 +789,9 @@ public Builder manager(EmployeeRequestManager manager) { return this; } + /** + *

    The employee's team.

    + */ @JsonSetter(value = "team", nulls = Nulls.SKIP) public Builder team(Optional team) { this.team = team; @@ -758,6 +803,9 @@ public Builder team(EmployeeRequestTeam team) { return this; } + /** + *

    The employee's pay group

    + */ @JsonSetter(value = "pay_group", nulls = Nulls.SKIP) public Builder payGroup(Optional payGroup) { this.payGroup = payGroup; @@ -769,6 +817,9 @@ public Builder payGroup(EmployeeRequestPayGroup payGroup) { return this; } + /** + *

    The employee's social security number.

    + */ @JsonSetter(value = "ssn", nulls = Nulls.SKIP) public Builder ssn(Optional ssn) { this.ssn = ssn; @@ -780,39 +831,75 @@ public Builder ssn(String ssn) { return this; } + /** + *

    The employee's gender.

    + *
      + *
    • MALE - MALE
    • + *
    • FEMALE - FEMALE
    • + *
    • NON-BINARY - NON-BINARY
    • + *
    • OTHER - OTHER
    • + *
    • PREFER_NOT_TO_DISCLOSE - PREFER_NOT_TO_DISCLOSE
    • + *
    + */ @JsonSetter(value = "gender", nulls = Nulls.SKIP) - public Builder gender(Optional gender) { + public Builder gender(Optional gender) { this.gender = gender; return this; } - public Builder gender(GenderEnum gender) { + public Builder gender(EmployeeRequestGender gender) { this.gender = Optional.ofNullable(gender); return this; } + /** + *

    The employee's ethnicity.

    + *
      + *
    • AMERICAN_INDIAN_OR_ALASKA_NATIVE - AMERICAN_INDIAN_OR_ALASKA_NATIVE
    • + *
    • ASIAN_OR_INDIAN_SUBCONTINENT - ASIAN_OR_INDIAN_SUBCONTINENT
    • + *
    • BLACK_OR_AFRICAN_AMERICAN - BLACK_OR_AFRICAN_AMERICAN
    • + *
    • HISPANIC_OR_LATINO - HISPANIC_OR_LATINO
    • + *
    • NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER - NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER
    • + *
    • TWO_OR_MORE_RACES - TWO_OR_MORE_RACES
    • + *
    • WHITE - WHITE
    • + *
    • PREFER_NOT_TO_DISCLOSE - PREFER_NOT_TO_DISCLOSE
    • + *
    + */ @JsonSetter(value = "ethnicity", nulls = Nulls.SKIP) - public Builder ethnicity(Optional ethnicity) { + public Builder ethnicity(Optional ethnicity) { this.ethnicity = ethnicity; return this; } - public Builder ethnicity(EthnicityEnum ethnicity) { + public Builder ethnicity(EmployeeRequestEthnicity ethnicity) { this.ethnicity = Optional.ofNullable(ethnicity); return this; } + /** + *

    The employee's filing status as related to marital status.

    + *
      + *
    • SINGLE - SINGLE
    • + *
    • MARRIED_FILING_JOINTLY - MARRIED_FILING_JOINTLY
    • + *
    • MARRIED_FILING_SEPARATELY - MARRIED_FILING_SEPARATELY
    • + *
    • HEAD_OF_HOUSEHOLD - HEAD_OF_HOUSEHOLD
    • + *
    • QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD - QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD
    • + *
    + */ @JsonSetter(value = "marital_status", nulls = Nulls.SKIP) - public Builder maritalStatus(Optional maritalStatus) { + public Builder maritalStatus(Optional maritalStatus) { this.maritalStatus = maritalStatus; return this; } - public Builder maritalStatus(MaritalStatusEnum maritalStatus) { + public Builder maritalStatus(EmployeeRequestMaritalStatus maritalStatus) { this.maritalStatus = Optional.ofNullable(maritalStatus); return this; } + /** + *

    The employee's date of birth.

    + */ @JsonSetter(value = "date_of_birth", nulls = Nulls.SKIP) public Builder dateOfBirth(Optional dateOfBirth) { this.dateOfBirth = dateOfBirth; @@ -824,6 +911,9 @@ public Builder dateOfBirth(OffsetDateTime dateOfBirth) { return this; } + /** + *

    The date that the employee was hired, usually the day that an offer letter is signed. If an employee has multiple hire dates from previous employments, this represents the most recent hire date. Note: If you're looking for the employee's start date, refer to the start_date field.

    + */ @JsonSetter(value = "hire_date", nulls = Nulls.SKIP) public Builder hireDate(Optional hireDate) { this.hireDate = hireDate; @@ -835,6 +925,9 @@ public Builder hireDate(OffsetDateTime hireDate) { return this; } + /** + *

    The date that the employee started working. If an employee was rehired, the most recent start date will be returned.

    + */ @JsonSetter(value = "start_date", nulls = Nulls.SKIP) public Builder startDate(Optional startDate) { this.startDate = startDate; @@ -846,17 +939,28 @@ public Builder startDate(OffsetDateTime startDate) { return this; } + /** + *

    The employment status of the employee.

    + *
      + *
    • ACTIVE - ACTIVE
    • + *
    • PENDING - PENDING
    • + *
    • INACTIVE - INACTIVE
    • + *
    + */ @JsonSetter(value = "employment_status", nulls = Nulls.SKIP) - public Builder employmentStatus(Optional employmentStatus) { + public Builder employmentStatus(Optional employmentStatus) { this.employmentStatus = employmentStatus; return this; } - public Builder employmentStatus(EmploymentStatusEnum employmentStatus) { + public Builder employmentStatus(EmployeeRequestEmploymentStatus employmentStatus) { this.employmentStatus = Optional.ofNullable(employmentStatus); return this; } + /** + *

    The employee's termination date.

    + */ @JsonSetter(value = "termination_date", nulls = Nulls.SKIP) public Builder terminationDate(Optional terminationDate) { this.terminationDate = terminationDate; @@ -868,6 +972,9 @@ public Builder terminationDate(OffsetDateTime terminationDate) { return this; } + /** + *

    The URL of the employee's avatar image.

    + */ @JsonSetter(value = "avatar", nulls = Nulls.SKIP) public Builder avatar(Optional avatar) { this.avatar = avatar; diff --git a/src/main/java/com/merge/api/hris/types/EmployeeRequestEmploymentStatus.java b/src/main/java/com/merge/api/hris/types/EmployeeRequestEmploymentStatus.java new file mode 100644 index 000000000..81c869b10 --- /dev/null +++ b/src/main/java/com/merge/api/hris/types/EmployeeRequestEmploymentStatus.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.hris.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EmployeeRequestEmploymentStatus.Deserializer.class) +public final class EmployeeRequestEmploymentStatus { + private final Object value; + + private final int type; + + private EmployeeRequestEmploymentStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EmploymentStatusEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EmployeeRequestEmploymentStatus && equalTo((EmployeeRequestEmploymentStatus) other); + } + + private boolean equalTo(EmployeeRequestEmploymentStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EmployeeRequestEmploymentStatus of(EmploymentStatusEnum value) { + return new EmployeeRequestEmploymentStatus(value, 0); + } + + public static EmployeeRequestEmploymentStatus of(String value) { + return new EmployeeRequestEmploymentStatus(value, 1); + } + + public interface Visitor { + T visit(EmploymentStatusEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EmployeeRequestEmploymentStatus.class); + } + + @java.lang.Override + public EmployeeRequestEmploymentStatus deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, EmploymentStatusEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/hris/types/EmployeeRequestEthnicity.java b/src/main/java/com/merge/api/hris/types/EmployeeRequestEthnicity.java new file mode 100644 index 000000000..671c2d2d0 --- /dev/null +++ b/src/main/java/com/merge/api/hris/types/EmployeeRequestEthnicity.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.hris.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EmployeeRequestEthnicity.Deserializer.class) +public final class EmployeeRequestEthnicity { + private final Object value; + + private final int type; + + private EmployeeRequestEthnicity(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EthnicityEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EmployeeRequestEthnicity && equalTo((EmployeeRequestEthnicity) other); + } + + private boolean equalTo(EmployeeRequestEthnicity other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EmployeeRequestEthnicity of(EthnicityEnum value) { + return new EmployeeRequestEthnicity(value, 0); + } + + public static EmployeeRequestEthnicity of(String value) { + return new EmployeeRequestEthnicity(value, 1); + } + + public interface Visitor { + T visit(EthnicityEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EmployeeRequestEthnicity.class); + } + + @java.lang.Override + public EmployeeRequestEthnicity deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, EthnicityEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/hris/types/EmployeeRequestGender.java b/src/main/java/com/merge/api/hris/types/EmployeeRequestGender.java new file mode 100644 index 000000000..091b2de41 --- /dev/null +++ b/src/main/java/com/merge/api/hris/types/EmployeeRequestGender.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.hris.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EmployeeRequestGender.Deserializer.class) +public final class EmployeeRequestGender { + private final Object value; + + private final int type; + + private EmployeeRequestGender(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((GenderEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EmployeeRequestGender && equalTo((EmployeeRequestGender) other); + } + + private boolean equalTo(EmployeeRequestGender other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EmployeeRequestGender of(GenderEnum value) { + return new EmployeeRequestGender(value, 0); + } + + public static EmployeeRequestGender of(String value) { + return new EmployeeRequestGender(value, 1); + } + + public interface Visitor { + T visit(GenderEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EmployeeRequestGender.class); + } + + @java.lang.Override + public EmployeeRequestGender deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, GenderEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/hris/types/EmployeeRequestMaritalStatus.java b/src/main/java/com/merge/api/hris/types/EmployeeRequestMaritalStatus.java new file mode 100644 index 000000000..08f60240c --- /dev/null +++ b/src/main/java/com/merge/api/hris/types/EmployeeRequestMaritalStatus.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.hris.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EmployeeRequestMaritalStatus.Deserializer.class) +public final class EmployeeRequestMaritalStatus { + private final Object value; + + private final int type; + + private EmployeeRequestMaritalStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((MaritalStatusEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EmployeeRequestMaritalStatus && equalTo((EmployeeRequestMaritalStatus) other); + } + + private boolean equalTo(EmployeeRequestMaritalStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EmployeeRequestMaritalStatus of(MaritalStatusEnum value) { + return new EmployeeRequestMaritalStatus(value, 0); + } + + public static EmployeeRequestMaritalStatus of(String value) { + return new EmployeeRequestMaritalStatus(value, 1); + } + + public interface Visitor { + T visit(MaritalStatusEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EmployeeRequestMaritalStatus.class); + } + + @java.lang.Override + public EmployeeRequestMaritalStatus deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, MaritalStatusEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/hris/types/EmployeesListRequest.java b/src/main/java/com/merge/api/hris/types/EmployeesListRequest.java index caefbd900..5953d1bf5 100644 --- a/src/main/java/com/merge/api/hris/types/EmployeesListRequest.java +++ b/src/main/java/com/merge/api/hris/types/EmployeesListRequest.java @@ -635,6 +635,9 @@ public Builder from(EmployeesListRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -651,6 +654,9 @@ public Builder expand(EmployeesListRequestExpandItem expand) { return this; } + /** + *

    If provided, will only return employees for this company.

    + */ @JsonSetter(value = "company_id", nulls = Nulls.SKIP) public Builder companyId(Optional companyId) { this.companyId = companyId; @@ -662,6 +668,9 @@ public Builder companyId(String companyId) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -673,6 +682,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -684,6 +696,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -695,6 +710,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    If provided, will only return employees with this display name.

    + */ @JsonSetter(value = "display_full_name", nulls = Nulls.SKIP) public Builder displayFullName(Optional displayFullName) { this.displayFullName = displayFullName; @@ -706,6 +724,14 @@ public Builder displayFullName(String displayFullName) { return this; } + /** + *

    If provided, will only return employees with this employment status.

    + *
      + *
    • ACTIVE - ACTIVE
    • + *
    • PENDING - PENDING
    • + *
    • INACTIVE - INACTIVE
    • + *
    + */ @JsonSetter(value = "employment_status", nulls = Nulls.SKIP) public Builder employmentStatus(Optional employmentStatus) { this.employmentStatus = employmentStatus; @@ -717,6 +743,9 @@ public Builder employmentStatus(EmployeesListRequestEmploymentStatus employmentS return this; } + /** + *

    If provided, will only return employees that have an employment of the specified employment_type.

    + */ @JsonSetter(value = "employment_type", nulls = Nulls.SKIP) public Builder employmentType(Optional employmentType) { this.employmentType = employmentType; @@ -728,6 +757,9 @@ public Builder employmentType(String employmentType) { return this; } + /** + *

    If provided, will only return employees with this first name.

    + */ @JsonSetter(value = "first_name", nulls = Nulls.SKIP) public Builder firstName(Optional firstName) { this.firstName = firstName; @@ -739,6 +771,9 @@ public Builder firstName(String firstName) { return this; } + /** + *

    If provided, will only return employees matching the group ids; multiple groups can be separated by commas.

    + */ @JsonSetter(value = "groups", nulls = Nulls.SKIP) public Builder groups(Optional groups) { this.groups = groups; @@ -750,6 +785,9 @@ public Builder groups(String groups) { return this; } + /** + *

    If provided, will only return employees for this home location.

    + */ @JsonSetter(value = "home_location_id", nulls = Nulls.SKIP) public Builder homeLocationId(Optional homeLocationId) { this.homeLocationId = homeLocationId; @@ -761,6 +799,9 @@ public Builder homeLocationId(String homeLocationId) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -772,6 +813,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -783,6 +827,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include sensitive fields (such as social security numbers) in the response.

    + */ @JsonSetter(value = "include_sensitive_fields", nulls = Nulls.SKIP) public Builder includeSensitiveFields(Optional includeSensitiveFields) { this.includeSensitiveFields = includeSensitiveFields; @@ -794,6 +841,9 @@ public Builder includeSensitiveFields(Boolean includeSensitiveFields) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -805,6 +855,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, will only return employees that have an employment of the specified job_title.

    + */ @JsonSetter(value = "job_title", nulls = Nulls.SKIP) public Builder jobTitle(Optional jobTitle) { this.jobTitle = jobTitle; @@ -816,6 +869,9 @@ public Builder jobTitle(String jobTitle) { return this; } + /** + *

    If provided, will only return employees with this last name.

    + */ @JsonSetter(value = "last_name", nulls = Nulls.SKIP) public Builder lastName(Optional lastName) { this.lastName = lastName; @@ -827,6 +883,9 @@ public Builder lastName(String lastName) { return this; } + /** + *

    If provided, will only return employees for this manager.

    + */ @JsonSetter(value = "manager_id", nulls = Nulls.SKIP) public Builder managerId(Optional managerId) { this.managerId = managerId; @@ -838,6 +897,9 @@ public Builder managerId(String managerId) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -849,6 +911,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -860,6 +925,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -871,6 +939,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    If provided, will only return employees for this pay group

    + */ @JsonSetter(value = "pay_group_id", nulls = Nulls.SKIP) public Builder payGroupId(Optional payGroupId) { this.payGroupId = payGroupId; @@ -882,6 +953,9 @@ public Builder payGroupId(String payGroupId) { return this; } + /** + *

    If provided, will only return Employees with this personal email

    + */ @JsonSetter(value = "personal_email", nulls = Nulls.SKIP) public Builder personalEmail(Optional personalEmail) { this.personalEmail = personalEmail; @@ -893,6 +967,9 @@ public Builder personalEmail(String personalEmail) { return this; } + /** + *

    Deprecated. Use show_enum_origins.

    + */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -904,6 +981,9 @@ public Builder remoteFields(EmployeesListRequestRemoteFields remoteFields) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -915,6 +995,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    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

    + */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; @@ -926,6 +1009,9 @@ public Builder showEnumOrigins(EmployeesListRequestShowEnumOrigins showEnumOrigi return this; } + /** + *

    If provided, will only return employees that started after this datetime.

    + */ @JsonSetter(value = "started_after", nulls = Nulls.SKIP) public Builder startedAfter(Optional startedAfter) { this.startedAfter = startedAfter; @@ -937,6 +1023,9 @@ public Builder startedAfter(OffsetDateTime startedAfter) { return this; } + /** + *

    If provided, will only return employees that started before this datetime.

    + */ @JsonSetter(value = "started_before", nulls = Nulls.SKIP) public Builder startedBefore(Optional startedBefore) { this.startedBefore = startedBefore; @@ -948,6 +1037,9 @@ public Builder startedBefore(OffsetDateTime startedBefore) { return this; } + /** + *

    If provided, will only return employees for this team.

    + */ @JsonSetter(value = "team_id", nulls = Nulls.SKIP) public Builder teamId(Optional teamId) { this.teamId = teamId; @@ -959,6 +1051,9 @@ public Builder teamId(String teamId) { return this; } + /** + *

    If provided, will only return employees that were terminated after this datetime.

    + */ @JsonSetter(value = "terminated_after", nulls = Nulls.SKIP) public Builder terminatedAfter(Optional terminatedAfter) { this.terminatedAfter = terminatedAfter; @@ -970,6 +1065,9 @@ public Builder terminatedAfter(OffsetDateTime terminatedAfter) { return this; } + /** + *

    If provided, will only return employees that were terminated before this datetime.

    + */ @JsonSetter(value = "terminated_before", nulls = Nulls.SKIP) public Builder terminatedBefore(Optional terminatedBefore) { this.terminatedBefore = terminatedBefore; @@ -981,6 +1079,9 @@ public Builder terminatedBefore(OffsetDateTime terminatedBefore) { return this; } + /** + *

    If provided, will only return Employees with this work email

    + */ @JsonSetter(value = "work_email", nulls = Nulls.SKIP) public Builder workEmail(Optional workEmail) { this.workEmail = workEmail; @@ -992,6 +1093,9 @@ public Builder workEmail(String workEmail) { return this; } + /** + *

    If provided, will only return employees for this location.

    + */ @JsonSetter(value = "work_location_id", nulls = Nulls.SKIP) public Builder workLocationId(Optional workLocationId) { this.workLocationId = workLocationId; diff --git a/src/main/java/com/merge/api/hris/types/EmployeesRetrieveRequest.java b/src/main/java/com/merge/api/hris/types/EmployeesRetrieveRequest.java index dde331795..d8fc27ad7 100644 --- a/src/main/java/com/merge/api/hris/types/EmployeesRetrieveRequest.java +++ b/src/main/java/com/merge/api/hris/types/EmployeesRetrieveRequest.java @@ -170,6 +170,9 @@ public Builder from(EmployeesRetrieveRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -186,6 +189,9 @@ public Builder expand(EmployeesRetrieveRequestExpandItem expand) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -197,6 +203,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include sensitive fields (such as social security numbers) in the response.

    + */ @JsonSetter(value = "include_sensitive_fields", nulls = Nulls.SKIP) public Builder includeSensitiveFields(Optional includeSensitiveFields) { this.includeSensitiveFields = includeSensitiveFields; @@ -208,6 +217,9 @@ public Builder includeSensitiveFields(Boolean includeSensitiveFields) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -219,6 +231,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    Deprecated. Use show_enum_origins.

    + */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -230,6 +245,9 @@ public Builder remoteFields(EmployeesRetrieveRequestRemoteFields remoteFields) { return this; } + /** + *

    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

    + */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; diff --git a/src/main/java/com/merge/api/hris/types/EmployerBenefit.java b/src/main/java/com/merge/api/hris/types/EmployerBenefit.java index fced41886..f77047146 100644 --- a/src/main/java/com/merge/api/hris/types/EmployerBenefit.java +++ b/src/main/java/com/merge/api/hris/types/EmployerBenefit.java @@ -31,7 +31,7 @@ public final class EmployerBenefit { private final Optional modifiedAt; - private final Optional benefitPlanType; + private final Optional benefitPlanType; private final Optional name; @@ -52,7 +52,7 @@ private EmployerBenefit( Optional remoteId, Optional createdAt, Optional modifiedAt, - Optional benefitPlanType, + Optional benefitPlanType, Optional name, Optional description, Optional deductionCode, @@ -114,7 +114,7 @@ public Optional getModifiedAt() { * */ @JsonProperty("benefit_plan_type") - public Optional getBenefitPlanType() { + public Optional getBenefitPlanType() { return benefitPlanType; } @@ -220,7 +220,7 @@ public static final class Builder { private Optional modifiedAt = Optional.empty(); - private Optional benefitPlanType = Optional.empty(); + private Optional benefitPlanType = Optional.empty(); private Optional name = Optional.empty(); @@ -265,6 +265,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -276,6 +279,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -287,6 +293,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -298,17 +307,30 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The type of benefit plan.

    + *
      + *
    • MEDICAL - MEDICAL
    • + *
    • HEALTH_SAVINGS - HEALTH_SAVINGS
    • + *
    • INSURANCE - INSURANCE
    • + *
    • RETIREMENT - RETIREMENT
    • + *
    • OTHER - OTHER
    • + *
    + */ @JsonSetter(value = "benefit_plan_type", nulls = Nulls.SKIP) - public Builder benefitPlanType(Optional benefitPlanType) { + public Builder benefitPlanType(Optional benefitPlanType) { this.benefitPlanType = benefitPlanType; return this; } - public Builder benefitPlanType(BenefitPlanTypeEnum benefitPlanType) { + public Builder benefitPlanType(EmployerBenefitBenefitPlanType benefitPlanType) { this.benefitPlanType = Optional.ofNullable(benefitPlanType); return this; } + /** + *

    The employer benefit's name - typically the carrier or network name.

    + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -320,6 +342,9 @@ public Builder name(String name) { return this; } + /** + *

    The employer benefit's description.

    + */ @JsonSetter(value = "description", nulls = Nulls.SKIP) public Builder description(Optional description) { this.description = description; @@ -331,6 +356,9 @@ public Builder description(String description) { return this; } + /** + *

    The employer benefit's deduction code.

    + */ @JsonSetter(value = "deduction_code", nulls = Nulls.SKIP) public Builder deductionCode(Optional deductionCode) { this.deductionCode = deductionCode; @@ -342,6 +370,9 @@ public Builder deductionCode(String deductionCode) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/hris/types/EmployerBenefitBenefitPlanType.java b/src/main/java/com/merge/api/hris/types/EmployerBenefitBenefitPlanType.java new file mode 100644 index 000000000..ef2543878 --- /dev/null +++ b/src/main/java/com/merge/api/hris/types/EmployerBenefitBenefitPlanType.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.hris.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EmployerBenefitBenefitPlanType.Deserializer.class) +public final class EmployerBenefitBenefitPlanType { + private final Object value; + + private final int type; + + private EmployerBenefitBenefitPlanType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((BenefitPlanTypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EmployerBenefitBenefitPlanType && equalTo((EmployerBenefitBenefitPlanType) other); + } + + private boolean equalTo(EmployerBenefitBenefitPlanType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EmployerBenefitBenefitPlanType of(BenefitPlanTypeEnum value) { + return new EmployerBenefitBenefitPlanType(value, 0); + } + + public static EmployerBenefitBenefitPlanType of(String value) { + return new EmployerBenefitBenefitPlanType(value, 1); + } + + public interface Visitor { + T visit(BenefitPlanTypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EmployerBenefitBenefitPlanType.class); + } + + @java.lang.Override + public EmployerBenefitBenefitPlanType deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, BenefitPlanTypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/hris/types/EmployerBenefitsListRequest.java b/src/main/java/com/merge/api/hris/types/EmployerBenefitsListRequest.java index 24fa5c816..5ec3ae20e 100644 --- a/src/main/java/com/merge/api/hris/types/EmployerBenefitsListRequest.java +++ b/src/main/java/com/merge/api/hris/types/EmployerBenefitsListRequest.java @@ -237,6 +237,9 @@ public Builder from(EmployerBenefitsListRequest other) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -248,6 +251,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -259,6 +265,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -270,6 +279,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -281,6 +293,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -292,6 +307,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -303,6 +321,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -314,6 +335,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -325,6 +349,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -336,6 +363,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; diff --git a/src/main/java/com/merge/api/hris/types/EmployerBenefitsRetrieveRequest.java b/src/main/java/com/merge/api/hris/types/EmployerBenefitsRetrieveRequest.java index 737ac6328..f1a4910c2 100644 --- a/src/main/java/com/merge/api/hris/types/EmployerBenefitsRetrieveRequest.java +++ b/src/main/java/com/merge/api/hris/types/EmployerBenefitsRetrieveRequest.java @@ -97,6 +97,9 @@ public Builder from(EmployerBenefitsRetrieveRequest other) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -108,6 +111,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/hris/types/Employment.java b/src/main/java/com/merge/api/hris/types/Employment.java index 453903d1d..b79f51130 100644 --- a/src/main/java/com/merge/api/hris/types/Employment.java +++ b/src/main/java/com/merge/api/hris/types/Employment.java @@ -37,19 +37,19 @@ public final class Employment { private final Optional payRate; - private final Optional payPeriod; + private final Optional payPeriod; - private final Optional payFrequency; + private final Optional payFrequency; - private final Optional payCurrency; + private final Optional payCurrency; private final Optional payGroup; - private final Optional flsaStatus; + private final Optional flsaStatus; private final Optional effectiveDate; - private final Optional employmentType; + private final Optional employmentType; private final Optional remoteWasDeleted; @@ -67,13 +67,13 @@ private Employment( Optional employee, Optional jobTitle, Optional payRate, - Optional payPeriod, - Optional payFrequency, - Optional payCurrency, + Optional payPeriod, + Optional payFrequency, + Optional payCurrency, Optional payGroup, - Optional flsaStatus, + Optional flsaStatus, Optional effectiveDate, - Optional employmentType, + Optional employmentType, Optional remoteWasDeleted, Optional> fieldMappings, Optional> remoteData, @@ -166,7 +166,7 @@ public Optional getPayRate() { * */ @JsonProperty("pay_period") - public Optional getPayPeriod() { + public Optional getPayPeriod() { return payPeriod; } @@ -185,7 +185,7 @@ public Optional getPayPeriod() { * */ @JsonProperty("pay_frequency") - public Optional getPayFrequency() { + public Optional getPayFrequency() { return payFrequency; } @@ -501,7 +501,7 @@ public Optional getPayFrequency() { * */ @JsonProperty("pay_currency") - public Optional getPayCurrency() { + public Optional getPayCurrency() { return payCurrency; } @@ -523,7 +523,7 @@ public Optional getPayGroup() { * */ @JsonProperty("flsa_status") - public Optional getFlsaStatus() { + public Optional getFlsaStatus() { return flsaStatus; } @@ -546,7 +546,7 @@ public Optional getEffectiveDate() { * */ @JsonProperty("employment_type") - public Optional getEmploymentType() { + public Optional getEmploymentType() { return employmentType; } @@ -646,19 +646,19 @@ public static final class Builder { private Optional payRate = Optional.empty(); - private Optional payPeriod = Optional.empty(); + private Optional payPeriod = Optional.empty(); - private Optional payFrequency = Optional.empty(); + private Optional payFrequency = Optional.empty(); - private Optional payCurrency = Optional.empty(); + private Optional payCurrency = Optional.empty(); private Optional payGroup = Optional.empty(); - private Optional flsaStatus = Optional.empty(); + private Optional flsaStatus = Optional.empty(); private Optional effectiveDate = Optional.empty(); - private Optional employmentType = Optional.empty(); + private Optional employmentType = Optional.empty(); private Optional remoteWasDeleted = Optional.empty(); @@ -703,6 +703,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -714,6 +717,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -725,6 +731,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -736,6 +745,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The employee holding this position.

    + */ @JsonSetter(value = "employee", nulls = Nulls.SKIP) public Builder employee(Optional employee) { this.employee = employee; @@ -747,6 +759,9 @@ public Builder employee(EmploymentEmployee employee) { return this; } + /** + *

    The position's title.

    + */ @JsonSetter(value = "job_title", nulls = Nulls.SKIP) public Builder jobTitle(Optional jobTitle) { this.jobTitle = jobTitle; @@ -758,6 +773,9 @@ public Builder jobTitle(String jobTitle) { return this; } + /** + *

    The position's pay rate.

    + */ @JsonSetter(value = "pay_rate", nulls = Nulls.SKIP) public Builder payRate(Optional payRate) { this.payRate = payRate; @@ -769,39 +787,381 @@ public Builder payRate(Double payRate) { return this; } + /** + *

    The time period this pay rate encompasses.

    + *
      + *
    • HOUR - HOUR
    • + *
    • DAY - DAY
    • + *
    • WEEK - WEEK
    • + *
    • EVERY_TWO_WEEKS - EVERY_TWO_WEEKS
    • + *
    • SEMIMONTHLY - SEMIMONTHLY
    • + *
    • MONTH - MONTH
    • + *
    • QUARTER - QUARTER
    • + *
    • EVERY_SIX_MONTHS - EVERY_SIX_MONTHS
    • + *
    • YEAR - YEAR
    • + *
    + */ @JsonSetter(value = "pay_period", nulls = Nulls.SKIP) - public Builder payPeriod(Optional payPeriod) { + public Builder payPeriod(Optional payPeriod) { this.payPeriod = payPeriod; return this; } - public Builder payPeriod(PayPeriodEnum payPeriod) { + public Builder payPeriod(EmploymentPayPeriod payPeriod) { this.payPeriod = Optional.ofNullable(payPeriod); return this; } + /** + *

    The position's pay frequency.

    + *
      + *
    • WEEKLY - WEEKLY
    • + *
    • BIWEEKLY - BIWEEKLY
    • + *
    • MONTHLY - MONTHLY
    • + *
    • QUARTERLY - QUARTERLY
    • + *
    • SEMIANNUALLY - SEMIANNUALLY
    • + *
    • ANNUALLY - ANNUALLY
    • + *
    • THIRTEEN-MONTHLY - THIRTEEN-MONTHLY
    • + *
    • PRO_RATA - PRO_RATA
    • + *
    • SEMIMONTHLY - SEMIMONTHLY
    • + *
    + */ @JsonSetter(value = "pay_frequency", nulls = Nulls.SKIP) - public Builder payFrequency(Optional payFrequency) { + public Builder payFrequency(Optional payFrequency) { this.payFrequency = payFrequency; return this; } - public Builder payFrequency(PayFrequencyEnum payFrequency) { + public Builder payFrequency(EmploymentPayFrequency payFrequency) { this.payFrequency = Optional.ofNullable(payFrequency); return this; } + /** + *

    The position's currency code.

    + *
      + *
    • XUA - ADB Unit of Account
    • + *
    • AFN - Afghan Afghani
    • + *
    • AFA - Afghan Afghani (1927–2002)
    • + *
    • ALL - Albanian Lek
    • + *
    • ALK - Albanian Lek (1946–1965)
    • + *
    • DZD - Algerian Dinar
    • + *
    • ADP - Andorran Peseta
    • + *
    • AOA - Angolan Kwanza
    • + *
    • AOK - Angolan Kwanza (1977–1991)
    • + *
    • AON - Angolan New Kwanza (1990–2000)
    • + *
    • AOR - Angolan Readjusted Kwanza (1995–1999)
    • + *
    • ARA - Argentine Austral
    • + *
    • ARS - Argentine Peso
    • + *
    • ARM - Argentine Peso (1881–1970)
    • + *
    • ARP - Argentine Peso (1983–1985)
    • + *
    • ARL - Argentine Peso Ley (1970–1983)
    • + *
    • AMD - Armenian Dram
    • + *
    • AWG - Aruban Florin
    • + *
    • AUD - Australian Dollar
    • + *
    • ATS - Austrian Schilling
    • + *
    • AZN - Azerbaijani Manat
    • + *
    • AZM - Azerbaijani Manat (1993–2006)
    • + *
    • BSD - Bahamian Dollar
    • + *
    • BHD - Bahraini Dinar
    • + *
    • BDT - Bangladeshi Taka
    • + *
    • BBD - Barbadian Dollar
    • + *
    • BYN - Belarusian Ruble
    • + *
    • BYB - Belarusian Ruble (1994–1999)
    • + *
    • BYR - Belarusian Ruble (2000–2016)
    • + *
    • BEF - Belgian Franc
    • + *
    • BEC - Belgian Franc (convertible)
    • + *
    • BEL - Belgian Franc (financial)
    • + *
    • BZD - Belize Dollar
    • + *
    • BMD - Bermudan Dollar
    • + *
    • BTN - Bhutanese Ngultrum
    • + *
    • BOB - Bolivian Boliviano
    • + *
    • BOL - Bolivian Boliviano (1863–1963)
    • + *
    • BOV - Bolivian Mvdol
    • + *
    • BOP - Bolivian Peso
    • + *
    • BAM - Bosnia-Herzegovina Convertible Mark
    • + *
    • BAD - Bosnia-Herzegovina Dinar (1992–1994)
    • + *
    • BAN - Bosnia-Herzegovina New Dinar (1994–1997)
    • + *
    • BWP - Botswanan Pula
    • + *
    • BRC - Brazilian Cruzado (1986–1989)
    • + *
    • BRZ - Brazilian Cruzeiro (1942–1967)
    • + *
    • BRE - Brazilian Cruzeiro (1990–1993)
    • + *
    • BRR - Brazilian Cruzeiro (1993–1994)
    • + *
    • BRN - Brazilian New Cruzado (1989–1990)
    • + *
    • BRB - Brazilian New Cruzeiro (1967–1986)
    • + *
    • BRL - Brazilian Real
    • + *
    • GBP - British Pound
    • + *
    • BND - Brunei Dollar
    • + *
    • BGL - Bulgarian Hard Lev
    • + *
    • BGN - Bulgarian Lev
    • + *
    • BGO - Bulgarian Lev (1879–1952)
    • + *
    • BGM - Bulgarian Socialist Lev
    • + *
    • BUK - Burmese Kyat
    • + *
    • BIF - Burundian Franc
    • + *
    • XPF - CFP Franc
    • + *
    • KHR - Cambodian Riel
    • + *
    • CAD - Canadian Dollar
    • + *
    • CVE - Cape Verdean Escudo
    • + *
    • KYD - Cayman Islands Dollar
    • + *
    • XAF - Central African CFA Franc
    • + *
    • CLE - Chilean Escudo
    • + *
    • CLP - Chilean Peso
    • + *
    • CLF - Chilean Unit of Account (UF)
    • + *
    • CNX - Chinese People’s Bank Dollar
    • + *
    • CNY - Chinese Yuan
    • + *
    • CNH - Chinese Yuan (offshore)
    • + *
    • COP - Colombian Peso
    • + *
    • COU - Colombian Real Value Unit
    • + *
    • KMF - Comorian Franc
    • + *
    • CDF - Congolese Franc
    • + *
    • CRC - Costa Rican Colón
    • + *
    • HRD - Croatian Dinar
    • + *
    • HRK - Croatian Kuna
    • + *
    • CUC - Cuban Convertible Peso
    • + *
    • CUP - Cuban Peso
    • + *
    • CYP - Cypriot Pound
    • + *
    • CZK - Czech Koruna
    • + *
    • CSK - Czechoslovak Hard Koruna
    • + *
    • DKK - Danish Krone
    • + *
    • DJF - Djiboutian Franc
    • + *
    • DOP - Dominican Peso
    • + *
    • NLG - Dutch Guilder
    • + *
    • XCD - East Caribbean Dollar
    • + *
    • DDM - East German Mark
    • + *
    • ECS - Ecuadorian Sucre
    • + *
    • ECV - Ecuadorian Unit of Constant Value
    • + *
    • EGP - Egyptian Pound
    • + *
    • GQE - Equatorial Guinean Ekwele
    • + *
    • ERN - Eritrean Nakfa
    • + *
    • EEK - Estonian Kroon
    • + *
    • ETB - Ethiopian Birr
    • + *
    • EUR - Euro
    • + *
    • XBA - European Composite Unit
    • + *
    • XEU - European Currency Unit
    • + *
    • XBB - European Monetary Unit
    • + *
    • XBC - European Unit of Account (XBC)
    • + *
    • XBD - European Unit of Account (XBD)
    • + *
    • FKP - Falkland Islands Pound
    • + *
    • FJD - Fijian Dollar
    • + *
    • FIM - Finnish Markka
    • + *
    • FRF - French Franc
    • + *
    • XFO - French Gold Franc
    • + *
    • XFU - French UIC-Franc
    • + *
    • GMD - Gambian Dalasi
    • + *
    • GEK - Georgian Kupon Larit
    • + *
    • GEL - Georgian Lari
    • + *
    • DEM - German Mark
    • + *
    • GHS - Ghanaian Cedi
    • + *
    • GHC - Ghanaian Cedi (1979–2007)
    • + *
    • GIP - Gibraltar Pound
    • + *
    • XAU - Gold
    • + *
    • GRD - Greek Drachma
    • + *
    • GTQ - Guatemalan Quetzal
    • + *
    • GWP - Guinea-Bissau Peso
    • + *
    • GNF - Guinean Franc
    • + *
    • GNS - Guinean Syli
    • + *
    • GYD - Guyanaese Dollar
    • + *
    • HTG - Haitian Gourde
    • + *
    • HNL - Honduran Lempira
    • + *
    • HKD - Hong Kong Dollar
    • + *
    • HUF - Hungarian Forint
    • + *
    • IMP - IMP
    • + *
    • ISK - Icelandic Króna
    • + *
    • ISJ - Icelandic Króna (1918–1981)
    • + *
    • INR - Indian Rupee
    • + *
    • IDR - Indonesian Rupiah
    • + *
    • IRR - Iranian Rial
    • + *
    • IQD - Iraqi Dinar
    • + *
    • IEP - Irish Pound
    • + *
    • ILS - Israeli New Shekel
    • + *
    • ILP - Israeli Pound
    • + *
    • ILR - Israeli Shekel (1980–1985)
    • + *
    • ITL - Italian Lira
    • + *
    • JMD - Jamaican Dollar
    • + *
    • JPY - Japanese Yen
    • + *
    • JOD - Jordanian Dinar
    • + *
    • KZT - Kazakhstani Tenge
    • + *
    • KES - Kenyan Shilling
    • + *
    • KWD - Kuwaiti Dinar
    • + *
    • KGS - Kyrgystani Som
    • + *
    • LAK - Laotian Kip
    • + *
    • LVL - Latvian Lats
    • + *
    • LVR - Latvian Ruble
    • + *
    • LBP - Lebanese Pound
    • + *
    • LSL - Lesotho Loti
    • + *
    • LRD - Liberian Dollar
    • + *
    • LYD - Libyan Dinar
    • + *
    • LTL - Lithuanian Litas
    • + *
    • LTT - Lithuanian Talonas
    • + *
    • LUL - Luxembourg Financial Franc
    • + *
    • LUC - Luxembourgian Convertible Franc
    • + *
    • LUF - Luxembourgian Franc
    • + *
    • MOP - Macanese Pataca
    • + *
    • MKD - Macedonian Denar
    • + *
    • MKN - Macedonian Denar (1992–1993)
    • + *
    • MGA - Malagasy Ariary
    • + *
    • MGF - Malagasy Franc
    • + *
    • MWK - Malawian Kwacha
    • + *
    • MYR - Malaysian Ringgit
    • + *
    • MVR - Maldivian Rufiyaa
    • + *
    • MVP - Maldivian Rupee (1947–1981)
    • + *
    • MLF - Malian Franc
    • + *
    • MTL - Maltese Lira
    • + *
    • MTP - Maltese Pound
    • + *
    • MRU - Mauritanian Ouguiya
    • + *
    • MRO - Mauritanian Ouguiya (1973–2017)
    • + *
    • MUR - Mauritian Rupee
    • + *
    • MXV - Mexican Investment Unit
    • + *
    • MXN - Mexican Peso
    • + *
    • MXP - Mexican Silver Peso (1861–1992)
    • + *
    • MDC - Moldovan Cupon
    • + *
    • MDL - Moldovan Leu
    • + *
    • MCF - Monegasque Franc
    • + *
    • MNT - Mongolian Tugrik
    • + *
    • MAD - Moroccan Dirham
    • + *
    • MAF - Moroccan Franc
    • + *
    • MZE - Mozambican Escudo
    • + *
    • MZN - Mozambican Metical
    • + *
    • MZM - Mozambican Metical (1980–2006)
    • + *
    • MMK - Myanmar Kyat
    • + *
    • NAD - Namibian Dollar
    • + *
    • NPR - Nepalese Rupee
    • + *
    • ANG - Netherlands Antillean Guilder
    • + *
    • TWD - New Taiwan Dollar
    • + *
    • NZD - New Zealand Dollar
    • + *
    • NIO - Nicaraguan Córdoba
    • + *
    • NIC - Nicaraguan Córdoba (1988–1991)
    • + *
    • NGN - Nigerian Naira
    • + *
    • KPW - North Korean Won
    • + *
    • NOK - Norwegian Krone
    • + *
    • OMR - Omani Rial
    • + *
    • PKR - Pakistani Rupee
    • + *
    • XPD - Palladium
    • + *
    • PAB - Panamanian Balboa
    • + *
    • PGK - Papua New Guinean Kina
    • + *
    • PYG - Paraguayan Guarani
    • + *
    • PEI - Peruvian Inti
    • + *
    • PEN - Peruvian Sol
    • + *
    • PES - Peruvian Sol (1863–1965)
    • + *
    • PHP - Philippine Peso
    • + *
    • XPT - Platinum
    • + *
    • PLN - Polish Zloty
    • + *
    • PLZ - Polish Zloty (1950–1995)
    • + *
    • PTE - Portuguese Escudo
    • + *
    • GWE - Portuguese Guinea Escudo
    • + *
    • QAR - Qatari Rial
    • + *
    • XRE - RINET Funds
    • + *
    • RHD - Rhodesian Dollar
    • + *
    • RON - Romanian Leu
    • + *
    • ROL - Romanian Leu (1952–2006)
    • + *
    • RUB - Russian Ruble
    • + *
    • RUR - Russian Ruble (1991–1998)
    • + *
    • RWF - Rwandan Franc
    • + *
    • SVC - Salvadoran Colón
    • + *
    • WST - Samoan Tala
    • + *
    • SAR - Saudi Riyal
    • + *
    • RSD - Serbian Dinar
    • + *
    • CSD - Serbian Dinar (2002–2006)
    • + *
    • SCR - Seychellois Rupee
    • + *
    • SLL - Sierra Leonean Leone
    • + *
    • XAG - Silver
    • + *
    • SGD - Singapore Dollar
    • + *
    • SKK - Slovak Koruna
    • + *
    • SIT - Slovenian Tolar
    • + *
    • SBD - Solomon Islands Dollar
    • + *
    • SOS - Somali Shilling
    • + *
    • ZAR - South African Rand
    • + *
    • ZAL - South African Rand (financial)
    • + *
    • KRH - South Korean Hwan (1953–1962)
    • + *
    • KRW - South Korean Won
    • + *
    • KRO - South Korean Won (1945–1953)
    • + *
    • SSP - South Sudanese Pound
    • + *
    • SUR - Soviet Rouble
    • + *
    • ESP - Spanish Peseta
    • + *
    • ESA - Spanish Peseta (A account)
    • + *
    • ESB - Spanish Peseta (convertible account)
    • + *
    • XDR - Special Drawing Rights
    • + *
    • LKR - Sri Lankan Rupee
    • + *
    • SHP - St. Helena Pound
    • + *
    • XSU - Sucre
    • + *
    • SDD - Sudanese Dinar (1992–2007)
    • + *
    • SDG - Sudanese Pound
    • + *
    • SDP - Sudanese Pound (1957–1998)
    • + *
    • SRD - Surinamese Dollar
    • + *
    • SRG - Surinamese Guilder
    • + *
    • SZL - Swazi Lilangeni
    • + *
    • SEK - Swedish Krona
    • + *
    • CHF - Swiss Franc
    • + *
    • SYP - Syrian Pound
    • + *
    • STN - São Tomé & Príncipe Dobra
    • + *
    • STD - São Tomé & Príncipe Dobra (1977–2017)
    • + *
    • TVD - TVD
    • + *
    • TJR - Tajikistani Ruble
    • + *
    • TJS - Tajikistani Somoni
    • + *
    • TZS - Tanzanian Shilling
    • + *
    • XTS - Testing Currency Code
    • + *
    • THB - Thai Baht
    • + *
    • XXX - The codes assigned for transactions where no currency is involved
    • + *
    • TPE - Timorese Escudo
    • + *
    • TOP - Tongan Paʻanga
    • + *
    • TTD - Trinidad & Tobago Dollar
    • + *
    • TND - Tunisian Dinar
    • + *
    • TRY - Turkish Lira
    • + *
    • TRL - Turkish Lira (1922–2005)
    • + *
    • TMT - Turkmenistani Manat
    • + *
    • TMM - Turkmenistani Manat (1993–2009)
    • + *
    • USD - US Dollar
    • + *
    • USN - US Dollar (Next day)
    • + *
    • USS - US Dollar (Same day)
    • + *
    • UGX - Ugandan Shilling
    • + *
    • UGS - Ugandan Shilling (1966–1987)
    • + *
    • UAH - Ukrainian Hryvnia
    • + *
    • UAK - Ukrainian Karbovanets
    • + *
    • AED - United Arab Emirates Dirham
    • + *
    • UYW - Uruguayan Nominal Wage Index Unit
    • + *
    • UYU - Uruguayan Peso
    • + *
    • UYP - Uruguayan Peso (1975–1993)
    • + *
    • UYI - Uruguayan Peso (Indexed Units)
    • + *
    • UZS - Uzbekistani Som
    • + *
    • VUV - Vanuatu Vatu
    • + *
    • VES - Venezuelan Bolívar
    • + *
    • VEB - Venezuelan Bolívar (1871–2008)
    • + *
    • VEF - Venezuelan Bolívar (2008–2018)
    • + *
    • VND - Vietnamese Dong
    • + *
    • VNN - Vietnamese Dong (1978–1985)
    • + *
    • CHE - WIR Euro
    • + *
    • CHW - WIR Franc
    • + *
    • XOF - West African CFA Franc
    • + *
    • YDD - Yemeni Dinar
    • + *
    • YER - Yemeni Rial
    • + *
    • YUN - Yugoslavian Convertible Dinar (1990–1992)
    • + *
    • YUD - Yugoslavian Hard Dinar (1966–1990)
    • + *
    • YUM - Yugoslavian New Dinar (1994–2002)
    • + *
    • YUR - Yugoslavian Reformed Dinar (1992–1993)
    • + *
    • ZWN - ZWN
    • + *
    • ZRN - Zairean New Zaire (1993–1998)
    • + *
    • ZRZ - Zairean Zaire (1971–1993)
    • + *
    • ZMW - Zambian Kwacha
    • + *
    • ZMK - Zambian Kwacha (1968–2012)
    • + *
    • ZWD - Zimbabwean Dollar (1980–2008)
    • + *
    • ZWR - Zimbabwean Dollar (2008)
    • + *
    • ZWL - Zimbabwean Dollar (2009)
    • + *
    + */ @JsonSetter(value = "pay_currency", nulls = Nulls.SKIP) - public Builder payCurrency(Optional payCurrency) { + public Builder payCurrency(Optional payCurrency) { this.payCurrency = payCurrency; return this; } - public Builder payCurrency(PayCurrencyEnum payCurrency) { + public Builder payCurrency(EmploymentPayCurrency payCurrency) { this.payCurrency = Optional.ofNullable(payCurrency); return this; } + /** + *

    The employment's pay group

    + */ @JsonSetter(value = "pay_group", nulls = Nulls.SKIP) public Builder payGroup(Optional payGroup) { this.payGroup = payGroup; @@ -813,17 +1173,29 @@ public Builder payGroup(EmploymentPayGroup payGroup) { return this; } + /** + *

    The position's FLSA status.

    + *
      + *
    • EXEMPT - EXEMPT
    • + *
    • SALARIED_NONEXEMPT - SALARIED_NONEXEMPT
    • + *
    • NONEXEMPT - NONEXEMPT
    • + *
    • OWNER - OWNER
    • + *
    + */ @JsonSetter(value = "flsa_status", nulls = Nulls.SKIP) - public Builder flsaStatus(Optional flsaStatus) { + public Builder flsaStatus(Optional flsaStatus) { this.flsaStatus = flsaStatus; return this; } - public Builder flsaStatus(FlsaStatusEnum flsaStatus) { + public Builder flsaStatus(EmploymentFlsaStatus flsaStatus) { this.flsaStatus = Optional.ofNullable(flsaStatus); return this; } + /** + *

    The position's effective date.

    + */ @JsonSetter(value = "effective_date", nulls = Nulls.SKIP) public Builder effectiveDate(Optional effectiveDate) { this.effectiveDate = effectiveDate; @@ -835,17 +1207,30 @@ public Builder effectiveDate(OffsetDateTime effectiveDate) { return this; } + /** + *

    The position's type of employment.

    + *
      + *
    • FULL_TIME - FULL_TIME
    • + *
    • PART_TIME - PART_TIME
    • + *
    • INTERN - INTERN
    • + *
    • CONTRACTOR - CONTRACTOR
    • + *
    • FREELANCE - FREELANCE
    • + *
    + */ @JsonSetter(value = "employment_type", nulls = Nulls.SKIP) - public Builder employmentType(Optional employmentType) { + public Builder employmentType(Optional employmentType) { this.employmentType = employmentType; return this; } - public Builder employmentType(EmploymentTypeEnum employmentType) { + public Builder employmentType(EmploymentEmploymentType employmentType) { this.employmentType = Optional.ofNullable(employmentType); return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/hris/types/EmploymentEmploymentType.java b/src/main/java/com/merge/api/hris/types/EmploymentEmploymentType.java new file mode 100644 index 000000000..130fb4410 --- /dev/null +++ b/src/main/java/com/merge/api/hris/types/EmploymentEmploymentType.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.hris.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EmploymentEmploymentType.Deserializer.class) +public final class EmploymentEmploymentType { + private final Object value; + + private final int type; + + private EmploymentEmploymentType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EmploymentTypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EmploymentEmploymentType && equalTo((EmploymentEmploymentType) other); + } + + private boolean equalTo(EmploymentEmploymentType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EmploymentEmploymentType of(EmploymentTypeEnum value) { + return new EmploymentEmploymentType(value, 0); + } + + public static EmploymentEmploymentType of(String value) { + return new EmploymentEmploymentType(value, 1); + } + + public interface Visitor { + T visit(EmploymentTypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EmploymentEmploymentType.class); + } + + @java.lang.Override + public EmploymentEmploymentType deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, EmploymentTypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/hris/types/EmploymentFlsaStatus.java b/src/main/java/com/merge/api/hris/types/EmploymentFlsaStatus.java new file mode 100644 index 000000000..6b4066dce --- /dev/null +++ b/src/main/java/com/merge/api/hris/types/EmploymentFlsaStatus.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.hris.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EmploymentFlsaStatus.Deserializer.class) +public final class EmploymentFlsaStatus { + private final Object value; + + private final int type; + + private EmploymentFlsaStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((FlsaStatusEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EmploymentFlsaStatus && equalTo((EmploymentFlsaStatus) other); + } + + private boolean equalTo(EmploymentFlsaStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EmploymentFlsaStatus of(FlsaStatusEnum value) { + return new EmploymentFlsaStatus(value, 0); + } + + public static EmploymentFlsaStatus of(String value) { + return new EmploymentFlsaStatus(value, 1); + } + + public interface Visitor { + T visit(FlsaStatusEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EmploymentFlsaStatus.class); + } + + @java.lang.Override + public EmploymentFlsaStatus deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, FlsaStatusEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/hris/types/EmploymentPayCurrency.java b/src/main/java/com/merge/api/hris/types/EmploymentPayCurrency.java new file mode 100644 index 000000000..10ced6599 --- /dev/null +++ b/src/main/java/com/merge/api/hris/types/EmploymentPayCurrency.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.hris.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EmploymentPayCurrency.Deserializer.class) +public final class EmploymentPayCurrency { + private final Object value; + + private final int type; + + private EmploymentPayCurrency(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((PayCurrencyEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EmploymentPayCurrency && equalTo((EmploymentPayCurrency) other); + } + + private boolean equalTo(EmploymentPayCurrency other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EmploymentPayCurrency of(PayCurrencyEnum value) { + return new EmploymentPayCurrency(value, 0); + } + + public static EmploymentPayCurrency of(String value) { + return new EmploymentPayCurrency(value, 1); + } + + public interface Visitor { + T visit(PayCurrencyEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EmploymentPayCurrency.class); + } + + @java.lang.Override + public EmploymentPayCurrency deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, PayCurrencyEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/hris/types/EmploymentPayFrequency.java b/src/main/java/com/merge/api/hris/types/EmploymentPayFrequency.java new file mode 100644 index 000000000..a95ed2e74 --- /dev/null +++ b/src/main/java/com/merge/api/hris/types/EmploymentPayFrequency.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.hris.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EmploymentPayFrequency.Deserializer.class) +public final class EmploymentPayFrequency { + private final Object value; + + private final int type; + + private EmploymentPayFrequency(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((PayFrequencyEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EmploymentPayFrequency && equalTo((EmploymentPayFrequency) other); + } + + private boolean equalTo(EmploymentPayFrequency other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EmploymentPayFrequency of(PayFrequencyEnum value) { + return new EmploymentPayFrequency(value, 0); + } + + public static EmploymentPayFrequency of(String value) { + return new EmploymentPayFrequency(value, 1); + } + + public interface Visitor { + T visit(PayFrequencyEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EmploymentPayFrequency.class); + } + + @java.lang.Override + public EmploymentPayFrequency deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, PayFrequencyEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/hris/types/EmploymentPayPeriod.java b/src/main/java/com/merge/api/hris/types/EmploymentPayPeriod.java new file mode 100644 index 000000000..86556c44b --- /dev/null +++ b/src/main/java/com/merge/api/hris/types/EmploymentPayPeriod.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.hris.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EmploymentPayPeriod.Deserializer.class) +public final class EmploymentPayPeriod { + private final Object value; + + private final int type; + + private EmploymentPayPeriod(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((PayPeriodEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EmploymentPayPeriod && equalTo((EmploymentPayPeriod) other); + } + + private boolean equalTo(EmploymentPayPeriod other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EmploymentPayPeriod of(PayPeriodEnum value) { + return new EmploymentPayPeriod(value, 0); + } + + public static EmploymentPayPeriod of(String value) { + return new EmploymentPayPeriod(value, 1); + } + + public interface Visitor { + T visit(PayPeriodEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EmploymentPayPeriod.class); + } + + @java.lang.Override + public EmploymentPayPeriod deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, PayPeriodEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/hris/types/EmploymentsListRequest.java b/src/main/java/com/merge/api/hris/types/EmploymentsListRequest.java index 30a3f54b2..2be3e66a5 100644 --- a/src/main/java/com/merge/api/hris/types/EmploymentsListRequest.java +++ b/src/main/java/com/merge/api/hris/types/EmploymentsListRequest.java @@ -324,6 +324,9 @@ public Builder from(EmploymentsListRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -340,6 +343,9 @@ public Builder expand(EmploymentsListRequestExpandItem expand) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -351,6 +357,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -362,6 +371,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -373,6 +385,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    If provided, will only return employments for this employee.

    + */ @JsonSetter(value = "employee_id", nulls = Nulls.SKIP) public Builder employeeId(Optional employeeId) { this.employeeId = employeeId; @@ -384,6 +399,9 @@ public Builder employeeId(String employeeId) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -395,6 +413,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -406,6 +427,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -417,6 +441,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -428,6 +455,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -439,6 +469,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    Overrides the default ordering for this endpoint. Possible values include: effective_date, -effective_date.

    + */ @JsonSetter(value = "order_by", nulls = Nulls.SKIP) public Builder orderBy(Optional orderBy) { this.orderBy = orderBy; @@ -450,6 +483,9 @@ public Builder orderBy(EmploymentsListRequestOrderBy orderBy) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -461,6 +497,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    Deprecated. Use show_enum_origins.

    + */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -472,6 +511,9 @@ public Builder remoteFields(EmploymentsListRequestRemoteFields remoteFields) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -483,6 +525,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    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

    + */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; diff --git a/src/main/java/com/merge/api/hris/types/EmploymentsRetrieveRequest.java b/src/main/java/com/merge/api/hris/types/EmploymentsRetrieveRequest.java index bfcb49795..a0aadca34 100644 --- a/src/main/java/com/merge/api/hris/types/EmploymentsRetrieveRequest.java +++ b/src/main/java/com/merge/api/hris/types/EmploymentsRetrieveRequest.java @@ -149,6 +149,9 @@ public Builder from(EmploymentsRetrieveRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -165,6 +168,9 @@ public Builder expand(EmploymentsRetrieveRequestExpandItem expand) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -176,6 +182,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -187,6 +196,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    Deprecated. Use show_enum_origins.

    + */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -198,6 +210,9 @@ public Builder remoteFields(EmploymentsRetrieveRequestRemoteFields remoteFields) return this; } + /** + *

    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

    + */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; diff --git a/src/main/java/com/merge/api/hris/types/EndUserDetailsRequest.java b/src/main/java/com/merge/api/hris/types/EndUserDetailsRequest.java index 80d64dd14..005697a02 100644 --- a/src/main/java/com/merge/api/hris/types/EndUserDetailsRequest.java +++ b/src/main/java/com/merge/api/hris/types/EndUserDetailsRequest.java @@ -45,7 +45,7 @@ public final class EndUserDetailsRequest { private final Optional>>> categoryCommonModelScopes; - private final Optional language; + private final Optional language; private final Optional areSyncsDisabled; @@ -65,7 +65,7 @@ private EndUserDetailsRequest( Optional> commonModels, Optional>>> categoryCommonModelScopes, - Optional language, + Optional language, Optional areSyncsDisabled, Optional> integrationSpecificConfig, Map additionalProperties) { @@ -174,7 +174,7 @@ public Optional> getCommonModels() { * */ @JsonProperty("language") - public Optional getLanguage() { + public Optional getLanguage() { return language; } @@ -249,48 +249,78 @@ public static EndUserEmailAddressStage builder() { } public interface EndUserEmailAddressStage { + /** + * Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent. + */ EndUserOrganizationNameStage endUserEmailAddress(@NotNull String endUserEmailAddress); Builder from(EndUserDetailsRequest other); } public interface EndUserOrganizationNameStage { + /** + * Your end user's organization. + */ EndUserOriginIdStage endUserOrganizationName(@NotNull String endUserOrganizationName); } public interface EndUserOriginIdStage { + /** + * 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. + */ _FinalStage endUserOriginId(@NotNull String endUserOriginId); } public interface _FinalStage { EndUserDetailsRequest build(); + /** + *

    The integration categories to show in Merge Link.

    + */ _FinalStage categories(List categories); _FinalStage addCategories(CategoriesEnum categories); _FinalStage addAllCategories(List categories); + /** + *

    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/.

    + */ _FinalStage integration(Optional integration); _FinalStage integration(String integration); + /** + *

    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.

    + */ _FinalStage linkExpiryMins(Optional linkExpiryMins); _FinalStage linkExpiryMins(Integer linkExpiryMins); + /** + *

    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.

    + */ _FinalStage shouldCreateMagicLinkUrl(Optional shouldCreateMagicLinkUrl); _FinalStage shouldCreateMagicLinkUrl(Boolean shouldCreateMagicLinkUrl); + /** + *

    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.

    + */ _FinalStage hideAdminMagicLink(Optional hideAdminMagicLink); _FinalStage hideAdminMagicLink(Boolean hideAdminMagicLink); + /** + *

    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.

    + */ _FinalStage commonModels(Optional> commonModels); _FinalStage commonModels(List commonModels); + /** + *

    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.

    + */ _FinalStage categoryCommonModelScopes( Optional>>> categoryCommonModelScopes); @@ -298,14 +328,27 @@ _FinalStage categoryCommonModelScopes( _FinalStage categoryCommonModelScopes( Map>> categoryCommonModelScopes); - _FinalStage language(Optional language); + /** + *

    The following subset of IETF language tags can be used to configure localization.

    + *
      + *
    • en - en
    • + *
    • de - de
    • + *
    + */ + _FinalStage language(Optional language); - _FinalStage language(LanguageEnum language); + _FinalStage language(EndUserDetailsRequestLanguage language); + /** + *

    The boolean that indicates whether initial, periodic, and force syncs will be disabled.

    + */ _FinalStage areSyncsDisabled(Optional areSyncsDisabled); _FinalStage areSyncsDisabled(Boolean areSyncsDisabled); + /** + *

    A JSON object containing integration-specific configuration options.

    + */ _FinalStage integrationSpecificConfig(Optional> integrationSpecificConfig); _FinalStage integrationSpecificConfig(Map integrationSpecificConfig); @@ -324,7 +367,7 @@ public static final class Builder private Optional areSyncsDisabled = Optional.empty(); - private Optional language = Optional.empty(); + private Optional language = Optional.empty(); private Optional>>> categoryCommonModelScopes = Optional.empty(); @@ -365,7 +408,7 @@ public Builder from(EndUserDetailsRequest other) { } /** - *

    Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent.

    + * Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent.

    Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent.

    * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -376,7 +419,7 @@ public EndUserOrganizationNameStage endUserEmailAddress(@NotNull String endUserE } /** - *

    Your end user's organization.

    + * Your end user's organization.

    Your end user's organization.

    * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -387,7 +430,7 @@ public EndUserOriginIdStage endUserOrganizationName(@NotNull String endUserOrgan } /** - *

    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.

    + * 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.

    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.

    * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -407,6 +450,9 @@ public _FinalStage integrationSpecificConfig(Map integrationSp return this; } + /** + *

    A JSON object containing integration-specific configuration options.

    + */ @java.lang.Override @JsonSetter(value = "integration_specific_config", nulls = Nulls.SKIP) public _FinalStage integrationSpecificConfig(Optional> integrationSpecificConfig) { @@ -424,6 +470,9 @@ public _FinalStage areSyncsDisabled(Boolean areSyncsDisabled) { return this; } + /** + *

    The boolean that indicates whether initial, periodic, and force syncs will be disabled.

    + */ @java.lang.Override @JsonSetter(value = "are_syncs_disabled", nulls = Nulls.SKIP) public _FinalStage areSyncsDisabled(Optional areSyncsDisabled) { @@ -440,14 +489,21 @@ public _FinalStage areSyncsDisabled(Optional areSyncsDisabled) { * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override - public _FinalStage language(LanguageEnum language) { + public _FinalStage language(EndUserDetailsRequestLanguage language) { this.language = Optional.ofNullable(language); return this; } + /** + *

    The following subset of IETF language tags can be used to configure localization.

    + *
      + *
    • en - en
    • + *
    • de - de
    • + *
    + */ @java.lang.Override @JsonSetter(value = "language", nulls = Nulls.SKIP) - public _FinalStage language(Optional language) { + public _FinalStage language(Optional language) { this.language = language; return this; } @@ -463,6 +519,9 @@ public _FinalStage categoryCommonModelScopes( return this; } + /** + *

    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.

    + */ @java.lang.Override @JsonSetter(value = "category_common_model_scopes", nulls = Nulls.SKIP) public _FinalStage categoryCommonModelScopes( @@ -482,6 +541,9 @@ public _FinalStage commonModels(List commonModels) return this; } + /** + *

    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.

    + */ @java.lang.Override @JsonSetter(value = "common_models", nulls = Nulls.SKIP) public _FinalStage commonModels(Optional> commonModels) { @@ -499,6 +561,9 @@ public _FinalStage hideAdminMagicLink(Boolean hideAdminMagicLink) { return this; } + /** + *

    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.

    + */ @java.lang.Override @JsonSetter(value = "hide_admin_magic_link", nulls = Nulls.SKIP) public _FinalStage hideAdminMagicLink(Optional hideAdminMagicLink) { @@ -516,6 +581,9 @@ public _FinalStage shouldCreateMagicLinkUrl(Boolean shouldCreateMagicLinkUrl) { return this; } + /** + *

    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.

    + */ @java.lang.Override @JsonSetter(value = "should_create_magic_link_url", nulls = Nulls.SKIP) public _FinalStage shouldCreateMagicLinkUrl(Optional shouldCreateMagicLinkUrl) { @@ -533,6 +601,9 @@ public _FinalStage linkExpiryMins(Integer linkExpiryMins) { return this; } + /** + *

    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.

    + */ @java.lang.Override @JsonSetter(value = "link_expiry_mins", nulls = Nulls.SKIP) public _FinalStage linkExpiryMins(Optional linkExpiryMins) { @@ -550,6 +621,9 @@ public _FinalStage integration(String integration) { return this; } + /** + *

    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/.

    + */ @java.lang.Override @JsonSetter(value = "integration", nulls = Nulls.SKIP) public _FinalStage integration(Optional integration) { @@ -577,6 +651,9 @@ public _FinalStage addCategories(CategoriesEnum categories) { return this; } + /** + *

    The integration categories to show in Merge Link.

    + */ @java.lang.Override @JsonSetter(value = "categories", nulls = Nulls.SKIP) public _FinalStage categories(List categories) { diff --git a/src/main/java/com/merge/api/hris/types/EndUserDetailsRequestLanguage.java b/src/main/java/com/merge/api/hris/types/EndUserDetailsRequestLanguage.java new file mode 100644 index 000000000..cff05d8a3 --- /dev/null +++ b/src/main/java/com/merge/api/hris/types/EndUserDetailsRequestLanguage.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.hris.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EndUserDetailsRequestLanguage.Deserializer.class) +public final class EndUserDetailsRequestLanguage { + private final Object value; + + private final int type; + + private EndUserDetailsRequestLanguage(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((LanguageEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EndUserDetailsRequestLanguage && equalTo((EndUserDetailsRequestLanguage) other); + } + + private boolean equalTo(EndUserDetailsRequestLanguage other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EndUserDetailsRequestLanguage of(LanguageEnum value) { + return new EndUserDetailsRequestLanguage(value, 0); + } + + public static EndUserDetailsRequestLanguage of(String value) { + return new EndUserDetailsRequestLanguage(value, 1); + } + + public interface Visitor { + T visit(LanguageEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EndUserDetailsRequestLanguage.class); + } + + @java.lang.Override + public EndUserDetailsRequestLanguage deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, LanguageEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/hris/types/EventTypeEnum.java b/src/main/java/com/merge/api/hris/types/EventTypeEnum.java index fbaa18157..dcf822418 100644 --- a/src/main/java/com/merge/api/hris/types/EventTypeEnum.java +++ b/src/main/java/com/merge/api/hris/types/EventTypeEnum.java @@ -16,6 +16,8 @@ public enum EventTypeEnum { REGENERATED_PRODUCTION_API_KEY("REGENERATED_PRODUCTION_API_KEY"), + REGENERATED_WEBHOOK_SIGNATURE("REGENERATED_WEBHOOK_SIGNATURE"), + INVITED_USER("INVITED_USER"), TWO_FACTOR_AUTH_ENABLED("TWO_FACTOR_AUTH_ENABLED"), diff --git a/src/main/java/com/merge/api/hris/types/FieldMappingsRetrieveRequest.java b/src/main/java/com/merge/api/hris/types/FieldMappingsRetrieveRequest.java index 7ccfc9dec..1a9a26b0c 100644 --- a/src/main/java/com/merge/api/hris/types/FieldMappingsRetrieveRequest.java +++ b/src/main/java/com/merge/api/hris/types/FieldMappingsRetrieveRequest.java @@ -81,6 +81,9 @@ public Builder from(FieldMappingsRetrieveRequest other) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "exclude_remote_field_metadata", nulls = Nulls.SKIP) public Builder excludeRemoteFieldMetadata(Optional excludeRemoteFieldMetadata) { this.excludeRemoteFieldMetadata = excludeRemoteFieldMetadata; diff --git a/src/main/java/com/merge/api/hris/types/GenerateRemoteKeyRequest.java b/src/main/java/com/merge/api/hris/types/GenerateRemoteKeyRequest.java index 86200349b..5be2a89b2 100644 --- a/src/main/java/com/merge/api/hris/types/GenerateRemoteKeyRequest.java +++ b/src/main/java/com/merge/api/hris/types/GenerateRemoteKeyRequest.java @@ -66,6 +66,9 @@ public static NameStage builder() { } public interface NameStage { + /** + * The name of the remote key + */ _FinalStage name(@NotNull String name); Builder from(GenerateRemoteKeyRequest other); @@ -91,7 +94,7 @@ public Builder from(GenerateRemoteKeyRequest other) { } /** - *

    The name of the remote key

    + * The name of the remote key

    The name of the remote key

    * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override diff --git a/src/main/java/com/merge/api/hris/types/Group.java b/src/main/java/com/merge/api/hris/types/Group.java index cbf46f61d..8f1bb40b4 100644 --- a/src/main/java/com/merge/api/hris/types/Group.java +++ b/src/main/java/com/merge/api/hris/types/Group.java @@ -35,7 +35,7 @@ public final class Group { private final Optional name; - private final Optional type; + private final Optional type; private final Optional isCommonlyUsedAsTeam; @@ -54,7 +54,7 @@ private Group( Optional modifiedAt, Optional parentGroup, Optional name, - Optional type, + Optional type, Optional isCommonlyUsedAsTeam, Optional remoteWasDeleted, Optional> fieldMappings, @@ -130,7 +130,7 @@ public Optional getName() { * */ @JsonProperty("type") - public Optional getType() { + public Optional getType() { return type; } @@ -224,7 +224,7 @@ public static final class Builder { private Optional name = Optional.empty(); - private Optional type = Optional.empty(); + private Optional type = Optional.empty(); private Optional isCommonlyUsedAsTeam = Optional.empty(); @@ -265,6 +265,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -276,6 +279,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -287,6 +293,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -298,6 +307,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The parent group for this group.

    + */ @JsonSetter(value = "parent_group", nulls = Nulls.SKIP) public Builder parentGroup(Optional parentGroup) { this.parentGroup = parentGroup; @@ -309,6 +321,9 @@ public Builder parentGroup(String parentGroup) { return this; } + /** + *

    The group name.

    + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -320,17 +335,30 @@ public Builder name(String name) { return this; } + /** + *

    The Group type returned directly from the third-party.

    + *
      + *
    • TEAM - TEAM
    • + *
    • DEPARTMENT - DEPARTMENT
    • + *
    • COST_CENTER - COST_CENTER
    • + *
    • BUSINESS_UNIT - BUSINESS_UNIT
    • + *
    • GROUP - GROUP
    • + *
    + */ @JsonSetter(value = "type", nulls = Nulls.SKIP) - public Builder type(Optional type) { + public Builder type(Optional type) { this.type = type; return this; } - public Builder type(GroupTypeEnum type) { + public Builder type(GroupType type) { this.type = Optional.ofNullable(type); return this; } + /** + *

    Indicates whether the Group refers to a team in the third party platform. Note that this is an opinionated view based on how Merge observes most organizations representing teams in each third party platform. If your customer uses a platform different from most, there is a chance this will not be correct.

    + */ @JsonSetter(value = "is_commonly_used_as_team", nulls = Nulls.SKIP) public Builder isCommonlyUsedAsTeam(Optional isCommonlyUsedAsTeam) { this.isCommonlyUsedAsTeam = isCommonlyUsedAsTeam; @@ -342,6 +370,9 @@ public Builder isCommonlyUsedAsTeam(Boolean isCommonlyUsedAsTeam) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/hris/types/GroupType.java b/src/main/java/com/merge/api/hris/types/GroupType.java new file mode 100644 index 000000000..2880c6e18 --- /dev/null +++ b/src/main/java/com/merge/api/hris/types/GroupType.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.hris.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = GroupType.Deserializer.class) +public final class GroupType { + private final Object value; + + private final int type; + + private GroupType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((GroupTypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof GroupType && equalTo((GroupType) other); + } + + private boolean equalTo(GroupType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static GroupType of(GroupTypeEnum value) { + return new GroupType(value, 0); + } + + public static GroupType of(String value) { + return new GroupType(value, 1); + } + + public interface Visitor { + T visit(GroupTypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(GroupType.class); + } + + @java.lang.Override + public GroupType deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, GroupTypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/hris/types/GroupsListRequest.java b/src/main/java/com/merge/api/hris/types/GroupsListRequest.java index 6478d6ab1..10a75a14c 100644 --- a/src/main/java/com/merge/api/hris/types/GroupsListRequest.java +++ b/src/main/java/com/merge/api/hris/types/GroupsListRequest.java @@ -322,6 +322,9 @@ public Builder from(GroupsListRequest other) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -333,6 +336,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -344,6 +350,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -355,6 +364,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -366,6 +378,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -377,6 +392,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -388,6 +406,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "is_commonly_used_as_team", nulls = Nulls.SKIP) public Builder isCommonlyUsedAsTeam(Optional isCommonlyUsedAsTeam) { this.isCommonlyUsedAsTeam = isCommonlyUsedAsTeam; @@ -399,6 +420,9 @@ public Builder isCommonlyUsedAsTeam(String isCommonlyUsedAsTeam) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -410,6 +434,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -421,6 +448,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    If provided, will only return groups with these names. Multiple values can be separated by commas.

    + */ @JsonSetter(value = "names", nulls = Nulls.SKIP) public Builder names(Optional names) { this.names = names; @@ -432,6 +462,9 @@ public Builder names(String names) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -443,6 +476,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    Deprecated. Use show_enum_origins.

    + */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -454,6 +490,9 @@ public Builder remoteFields(String remoteFields) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -465,6 +504,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    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

    + */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; @@ -476,6 +518,9 @@ public Builder showEnumOrigins(String showEnumOrigins) { return this; } + /** + *

    If provided, will only return groups of these types. Multiple values can be separated by commas.

    + */ @JsonSetter(value = "types", nulls = Nulls.SKIP) public Builder types(Optional types) { this.types = types; diff --git a/src/main/java/com/merge/api/hris/types/GroupsRetrieveRequest.java b/src/main/java/com/merge/api/hris/types/GroupsRetrieveRequest.java index c5bca2763..74838340a 100644 --- a/src/main/java/com/merge/api/hris/types/GroupsRetrieveRequest.java +++ b/src/main/java/com/merge/api/hris/types/GroupsRetrieveRequest.java @@ -130,6 +130,9 @@ public Builder from(GroupsRetrieveRequest other) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -141,6 +144,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -152,6 +158,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    Deprecated. Use show_enum_origins.

    + */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -163,6 +172,9 @@ public Builder remoteFields(String remoteFields) { return this; } + /** + *

    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

    + */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; diff --git a/src/main/java/com/merge/api/hris/types/IgnoreCommonModelRequest.java b/src/main/java/com/merge/api/hris/types/IgnoreCommonModelRequest.java index 66d5d67ed..d5387b5ae 100644 --- a/src/main/java/com/merge/api/hris/types/IgnoreCommonModelRequest.java +++ b/src/main/java/com/merge/api/hris/types/IgnoreCommonModelRequest.java @@ -21,21 +21,21 @@ @JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = IgnoreCommonModelRequest.Builder.class) public final class IgnoreCommonModelRequest { - private final ReasonEnum reason; + private final IgnoreCommonModelRequestReason reason; private final Optional message; private final Map additionalProperties; private IgnoreCommonModelRequest( - ReasonEnum reason, Optional message, Map additionalProperties) { + IgnoreCommonModelRequestReason reason, Optional message, Map additionalProperties) { this.reason = reason; this.message = message; this.additionalProperties = additionalProperties; } @JsonProperty("reason") - public ReasonEnum getReason() { + public IgnoreCommonModelRequestReason getReason() { return reason; } @@ -74,7 +74,7 @@ public static ReasonStage builder() { } public interface ReasonStage { - _FinalStage reason(@NotNull ReasonEnum reason); + _FinalStage reason(@NotNull IgnoreCommonModelRequestReason reason); Builder from(IgnoreCommonModelRequest other); } @@ -89,7 +89,7 @@ public interface _FinalStage { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements ReasonStage, _FinalStage { - private ReasonEnum reason; + private IgnoreCommonModelRequestReason reason; private Optional message = Optional.empty(); @@ -107,7 +107,7 @@ public Builder from(IgnoreCommonModelRequest other) { @java.lang.Override @JsonSetter("reason") - public _FinalStage reason(@NotNull ReasonEnum reason) { + public _FinalStage reason(@NotNull IgnoreCommonModelRequestReason reason) { this.reason = reason; return this; } diff --git a/src/main/java/com/merge/api/hris/types/IgnoreCommonModelRequestReason.java b/src/main/java/com/merge/api/hris/types/IgnoreCommonModelRequestReason.java new file mode 100644 index 000000000..cd7bda0ac --- /dev/null +++ b/src/main/java/com/merge/api/hris/types/IgnoreCommonModelRequestReason.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.hris.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = IgnoreCommonModelRequestReason.Deserializer.class) +public final class IgnoreCommonModelRequestReason { + private final Object value; + + private final int type; + + private IgnoreCommonModelRequestReason(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((ReasonEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof IgnoreCommonModelRequestReason && equalTo((IgnoreCommonModelRequestReason) other); + } + + private boolean equalTo(IgnoreCommonModelRequestReason other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static IgnoreCommonModelRequestReason of(ReasonEnum value) { + return new IgnoreCommonModelRequestReason(value, 0); + } + + public static IgnoreCommonModelRequestReason of(String value) { + return new IgnoreCommonModelRequestReason(value, 1); + } + + public interface Visitor { + T visit(ReasonEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(IgnoreCommonModelRequestReason.class); + } + + @java.lang.Override + public IgnoreCommonModelRequestReason deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, ReasonEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/hris/types/Issue.java b/src/main/java/com/merge/api/hris/types/Issue.java index a4a7ef0d6..3b3ba8c9e 100644 --- a/src/main/java/com/merge/api/hris/types/Issue.java +++ b/src/main/java/com/merge/api/hris/types/Issue.java @@ -26,7 +26,7 @@ public final class Issue { private final Optional id; - private final Optional status; + private final Optional status; private final String errorDescription; @@ -44,7 +44,7 @@ public final class Issue { private Issue( Optional id, - Optional status, + Optional status, String errorDescription, Optional> endUser, Optional firstIncidentTime, @@ -76,7 +76,7 @@ public Optional getId() { * */ @JsonProperty("status") - public Optional getStatus() { + public Optional getStatus() { return status; } @@ -167,9 +167,16 @@ public interface _FinalStage { _FinalStage id(String id); - _FinalStage status(Optional status); + /** + *

    Status of the issue. Options: ('ONGOING', 'RESOLVED')

    + *
      + *
    • ONGOING - ONGOING
    • + *
    • RESOLVED - RESOLVED
    • + *
    + */ + _FinalStage status(Optional status); - _FinalStage status(IssueStatusEnum status); + _FinalStage status(IssueStatus status); _FinalStage endUser(Optional> endUser); @@ -206,7 +213,7 @@ public static final class Builder implements ErrorDescriptionStage, _FinalStage private Optional> endUser = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Optional id = Optional.empty(); @@ -309,14 +316,21 @@ public _FinalStage endUser(Optional> endUser) { * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override - public _FinalStage status(IssueStatusEnum status) { + public _FinalStage status(IssueStatus status) { this.status = Optional.ofNullable(status); return this; } + /** + *

    Status of the issue. Options: ('ONGOING', 'RESOLVED')

    + *
      + *
    • ONGOING - ONGOING
    • + *
    • RESOLVED - RESOLVED
    • + *
    + */ @java.lang.Override @JsonSetter(value = "status", nulls = Nulls.SKIP) - public _FinalStage status(Optional status) { + public _FinalStage status(Optional status) { this.status = status; return this; } diff --git a/src/main/java/com/merge/api/hris/types/IssueStatus.java b/src/main/java/com/merge/api/hris/types/IssueStatus.java new file mode 100644 index 000000000..9871aa7d8 --- /dev/null +++ b/src/main/java/com/merge/api/hris/types/IssueStatus.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.hris.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = IssueStatus.Deserializer.class) +public final class IssueStatus { + private final Object value; + + private final int type; + + private IssueStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((IssueStatusEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof IssueStatus && equalTo((IssueStatus) other); + } + + private boolean equalTo(IssueStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static IssueStatus of(IssueStatusEnum value) { + return new IssueStatus(value, 0); + } + + public static IssueStatus of(String value) { + return new IssueStatus(value, 1); + } + + public interface Visitor { + T visit(IssueStatusEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(IssueStatus.class); + } + + @java.lang.Override + public IssueStatus deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, IssueStatusEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/hris/types/IssuesListRequest.java b/src/main/java/com/merge/api/hris/types/IssuesListRequest.java index b6de6bd8f..741cf3a6c 100644 --- a/src/main/java/com/merge/api/hris/types/IssuesListRequest.java +++ b/src/main/java/com/merge/api/hris/types/IssuesListRequest.java @@ -311,6 +311,9 @@ public Builder accountToken(String accountToken) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -322,6 +325,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    If included, will only include issues whose most recent action occurred before this time

    + */ @JsonSetter(value = "end_date", nulls = Nulls.SKIP) public Builder endDate(Optional endDate) { this.endDate = endDate; @@ -344,6 +350,9 @@ public Builder endUserOrganizationName(String endUserOrganizationName) { return this; } + /** + *

    If provided, will only return issues whose first incident time was after this datetime.

    + */ @JsonSetter(value = "first_incident_time_after", nulls = Nulls.SKIP) public Builder firstIncidentTimeAfter(Optional firstIncidentTimeAfter) { this.firstIncidentTimeAfter = firstIncidentTimeAfter; @@ -355,6 +364,9 @@ public Builder firstIncidentTimeAfter(OffsetDateTime firstIncidentTimeAfter) { return this; } + /** + *

    If provided, will only return issues whose first incident time was before this datetime.

    + */ @JsonSetter(value = "first_incident_time_before", nulls = Nulls.SKIP) public Builder firstIncidentTimeBefore(Optional firstIncidentTimeBefore) { this.firstIncidentTimeBefore = firstIncidentTimeBefore; @@ -366,6 +378,9 @@ public Builder firstIncidentTimeBefore(OffsetDateTime firstIncidentTimeBefore) { return this; } + /** + *

    If true, will include muted issues

    + */ @JsonSetter(value = "include_muted", nulls = Nulls.SKIP) public Builder includeMuted(Optional includeMuted) { this.includeMuted = includeMuted; @@ -388,6 +403,9 @@ public Builder integrationName(String integrationName) { return this; } + /** + *

    If provided, will only return issues whose last incident time was after this datetime.

    + */ @JsonSetter(value = "last_incident_time_after", nulls = Nulls.SKIP) public Builder lastIncidentTimeAfter(Optional lastIncidentTimeAfter) { this.lastIncidentTimeAfter = lastIncidentTimeAfter; @@ -399,6 +417,9 @@ public Builder lastIncidentTimeAfter(OffsetDateTime lastIncidentTimeAfter) { return this; } + /** + *

    If provided, will only return issues whose last incident time was before this datetime.

    + */ @JsonSetter(value = "last_incident_time_before", nulls = Nulls.SKIP) public Builder lastIncidentTimeBefore(Optional lastIncidentTimeBefore) { this.lastIncidentTimeBefore = lastIncidentTimeBefore; @@ -410,6 +431,9 @@ public Builder lastIncidentTimeBefore(OffsetDateTime lastIncidentTimeBefore) { return this; } + /** + *

    If provided, will only include issues pertaining to the linked account passed in.

    + */ @JsonSetter(value = "linked_account_id", nulls = Nulls.SKIP) public Builder linkedAccountId(Optional linkedAccountId) { this.linkedAccountId = linkedAccountId; @@ -421,6 +445,9 @@ public Builder linkedAccountId(String linkedAccountId) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -432,6 +459,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    If included, will only include issues whose most recent action occurred after this time

    + */ @JsonSetter(value = "start_date", nulls = Nulls.SKIP) public Builder startDate(Optional startDate) { this.startDate = startDate; @@ -443,6 +473,13 @@ public Builder startDate(String startDate) { return this; } + /** + *

    Status of the issue. Options: ('ONGOING', 'RESOLVED')

    + *
      + *
    • ONGOING - ONGOING
    • + *
    • RESOLVED - RESOLVED
    • + *
    + */ @JsonSetter(value = "status", nulls = Nulls.SKIP) public Builder status(Optional status) { this.status = status; diff --git a/src/main/java/com/merge/api/hris/types/LinkedAccountCommonModelScopeDeserializerRequest.java b/src/main/java/com/merge/api/hris/types/LinkedAccountCommonModelScopeDeserializerRequest.java index a50bab99b..dec1445b6 100644 --- a/src/main/java/com/merge/api/hris/types/LinkedAccountCommonModelScopeDeserializerRequest.java +++ b/src/main/java/com/merge/api/hris/types/LinkedAccountCommonModelScopeDeserializerRequest.java @@ -84,6 +84,9 @@ public Builder from(LinkedAccountCommonModelScopeDeserializerRequest other) { return this; } + /** + *

    The common models you want to update the scopes for

    + */ @JsonSetter(value = "common_models", nulls = Nulls.SKIP) public Builder commonModels(List commonModels) { this.commonModels.clear(); diff --git a/src/main/java/com/merge/api/hris/types/LinkedAccountsListRequest.java b/src/main/java/com/merge/api/hris/types/LinkedAccountsListRequest.java index 11ce60162..0b04fc561 100644 --- a/src/main/java/com/merge/api/hris/types/LinkedAccountsListRequest.java +++ b/src/main/java/com/merge/api/hris/types/LinkedAccountsListRequest.java @@ -293,6 +293,18 @@ public Builder from(LinkedAccountsListRequest other) { return this; } + /** + *

    Options: accounting, ats, crm, filestorage, hris, mktg, ticketing

    + *
      + *
    • hris - hris
    • + *
    • ats - ats
    • + *
    • accounting - accounting
    • + *
    • ticketing - ticketing
    • + *
    • crm - crm
    • + *
    • mktg - mktg
    • + *
    • filestorage - filestorage
    • + *
    + */ @JsonSetter(value = "category", nulls = Nulls.SKIP) public Builder category(Optional category) { this.category = category; @@ -304,6 +316,9 @@ public Builder category(LinkedAccountsListRequestCategory category) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -315,6 +330,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    If provided, will only return linked accounts associated with the given email address.

    + */ @JsonSetter(value = "end_user_email_address", nulls = Nulls.SKIP) public Builder endUserEmailAddress(Optional endUserEmailAddress) { this.endUserEmailAddress = endUserEmailAddress; @@ -326,6 +344,9 @@ public Builder endUserEmailAddress(String endUserEmailAddress) { return this; } + /** + *

    If provided, will only return linked accounts associated with the given organization name.

    + */ @JsonSetter(value = "end_user_organization_name", nulls = Nulls.SKIP) public Builder endUserOrganizationName(Optional endUserOrganizationName) { this.endUserOrganizationName = endUserOrganizationName; @@ -337,6 +358,9 @@ public Builder endUserOrganizationName(String endUserOrganizationName) { return this; } + /** + *

    If provided, will only return linked accounts associated with the given origin ID.

    + */ @JsonSetter(value = "end_user_origin_id", nulls = Nulls.SKIP) public Builder endUserOriginId(Optional endUserOriginId) { this.endUserOriginId = endUserOriginId; @@ -348,6 +372,9 @@ public Builder endUserOriginId(String endUserOriginId) { return this; } + /** + *

    Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once.

    + */ @JsonSetter(value = "end_user_origin_ids", nulls = Nulls.SKIP) public Builder endUserOriginIds(Optional endUserOriginIds) { this.endUserOriginIds = endUserOriginIds; @@ -370,6 +397,9 @@ public Builder id(String id) { return this; } + /** + *

    Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once.

    + */ @JsonSetter(value = "ids", nulls = Nulls.SKIP) public Builder ids(Optional ids) { this.ids = ids; @@ -381,6 +411,9 @@ public Builder ids(String ids) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_duplicates", nulls = Nulls.SKIP) public Builder includeDuplicates(Optional includeDuplicates) { this.includeDuplicates = includeDuplicates; @@ -392,6 +425,9 @@ public Builder includeDuplicates(Boolean includeDuplicates) { return this; } + /** + *

    If provided, will only return linked accounts associated with the given integration name.

    + */ @JsonSetter(value = "integration_name", nulls = Nulls.SKIP) public Builder integrationName(Optional integrationName) { this.integrationName = integrationName; @@ -403,6 +439,9 @@ public Builder integrationName(String integrationName) { return this; } + /** + *

    If included, will only include test linked accounts. If not included, will only include non-test linked accounts.

    + */ @JsonSetter(value = "is_test_account", nulls = Nulls.SKIP) public Builder isTestAccount(Optional isTestAccount) { this.isTestAccount = isTestAccount; @@ -414,6 +453,9 @@ public Builder isTestAccount(String isTestAccount) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -425,6 +467,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    Filter by status. Options: COMPLETE, IDLE, INCOMPLETE, RELINK_NEEDED

    + */ @JsonSetter(value = "status", nulls = Nulls.SKIP) public Builder status(Optional status) { this.status = status; diff --git a/src/main/java/com/merge/api/hris/types/Location.java b/src/main/java/com/merge/api/hris/types/Location.java index f868d38b0..e597c959d 100644 --- a/src/main/java/com/merge/api/hris/types/Location.java +++ b/src/main/java/com/merge/api/hris/types/Location.java @@ -45,9 +45,9 @@ public final class Location { private final Optional zipCode; - private final Optional country; + private final Optional country; - private final Optional locationType; + private final Optional locationType; private final Optional remoteWasDeleted; @@ -69,8 +69,8 @@ private Location( Optional city, Optional state, Optional zipCode, - Optional country, - Optional locationType, + Optional country, + Optional locationType, Optional remoteWasDeleted, Optional> fieldMappings, Optional> remoteData, @@ -434,7 +434,7 @@ public Optional getZipCode() { * */ @JsonProperty("country") - public Optional getCountry() { + public Optional getCountry() { return country; } @@ -446,7 +446,7 @@ public Optional getCountry() { * */ @JsonProperty("location_type") - public Optional getLocationType() { + public Optional getLocationType() { return locationType; } @@ -552,9 +552,9 @@ public static final class Builder { private Optional zipCode = Optional.empty(); - private Optional country = Optional.empty(); + private Optional country = Optional.empty(); - private Optional locationType = Optional.empty(); + private Optional locationType = Optional.empty(); private Optional remoteWasDeleted = Optional.empty(); @@ -598,6 +598,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -609,6 +612,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -620,6 +626,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -631,6 +640,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The location's name.

    + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -642,6 +654,9 @@ public Builder name(String name) { return this; } + /** + *

    The location's phone number.

    + */ @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) public Builder phoneNumber(Optional phoneNumber) { this.phoneNumber = phoneNumber; @@ -653,6 +668,9 @@ public Builder phoneNumber(String phoneNumber) { return this; } + /** + *

    Line 1 of the location's street address.

    + */ @JsonSetter(value = "street_1", nulls = Nulls.SKIP) public Builder street1(Optional street1) { this.street1 = street1; @@ -664,6 +682,9 @@ public Builder street1(String street1) { return this; } + /** + *

    Line 2 of the location's street address.

    + */ @JsonSetter(value = "street_2", nulls = Nulls.SKIP) public Builder street2(Optional street2) { this.street2 = street2; @@ -675,6 +696,9 @@ public Builder street2(String street2) { return this; } + /** + *

    The location's city.

    + */ @JsonSetter(value = "city", nulls = Nulls.SKIP) public Builder city(Optional city) { this.city = city; @@ -686,6 +710,9 @@ public Builder city(String city) { return this; } + /** + *

    The location's state. Represents a region if outside of the US.

    + */ @JsonSetter(value = "state", nulls = Nulls.SKIP) public Builder state(Optional state) { this.state = state; @@ -697,6 +724,9 @@ public Builder state(String state) { return this; } + /** + *

    The location's zip code or postal code.

    + */ @JsonSetter(value = "zip_code", nulls = Nulls.SKIP) public Builder zipCode(Optional zipCode) { this.zipCode = zipCode; @@ -708,28 +738,292 @@ public Builder zipCode(String zipCode) { return this; } + /** + *

    The location's country.

    + *
      + *
    • AF - Afghanistan
    • + *
    • AX - Åland Islands
    • + *
    • AL - Albania
    • + *
    • DZ - Algeria
    • + *
    • AS - American Samoa
    • + *
    • AD - Andorra
    • + *
    • AO - Angola
    • + *
    • AI - Anguilla
    • + *
    • AQ - Antarctica
    • + *
    • AG - Antigua and Barbuda
    • + *
    • AR - Argentina
    • + *
    • AM - Armenia
    • + *
    • AW - Aruba
    • + *
    • AU - Australia
    • + *
    • AT - Austria
    • + *
    • AZ - Azerbaijan
    • + *
    • BS - Bahamas
    • + *
    • BH - Bahrain
    • + *
    • BD - Bangladesh
    • + *
    • BB - Barbados
    • + *
    • BY - Belarus
    • + *
    • BE - Belgium
    • + *
    • BZ - Belize
    • + *
    • BJ - Benin
    • + *
    • BM - Bermuda
    • + *
    • BT - Bhutan
    • + *
    • BO - Bolivia
    • + *
    • BQ - Bonaire, Sint Eustatius and Saba
    • + *
    • BA - Bosnia and Herzegovina
    • + *
    • BW - Botswana
    • + *
    • BV - Bouvet Island
    • + *
    • BR - Brazil
    • + *
    • IO - British Indian Ocean Territory
    • + *
    • BN - Brunei
    • + *
    • BG - Bulgaria
    • + *
    • BF - Burkina Faso
    • + *
    • BI - Burundi
    • + *
    • CV - Cabo Verde
    • + *
    • KH - Cambodia
    • + *
    • CM - Cameroon
    • + *
    • CA - Canada
    • + *
    • KY - Cayman Islands
    • + *
    • CF - Central African Republic
    • + *
    • TD - Chad
    • + *
    • CL - Chile
    • + *
    • CN - China
    • + *
    • CX - Christmas Island
    • + *
    • CC - Cocos (Keeling) Islands
    • + *
    • CO - Colombia
    • + *
    • KM - Comoros
    • + *
    • CG - Congo
    • + *
    • CD - Congo (the Democratic Republic of the)
    • + *
    • CK - Cook Islands
    • + *
    • CR - Costa Rica
    • + *
    • CI - Côte d'Ivoire
    • + *
    • HR - Croatia
    • + *
    • CU - Cuba
    • + *
    • CW - Curaçao
    • + *
    • CY - Cyprus
    • + *
    • CZ - Czechia
    • + *
    • DK - Denmark
    • + *
    • DJ - Djibouti
    • + *
    • DM - Dominica
    • + *
    • DO - Dominican Republic
    • + *
    • EC - Ecuador
    • + *
    • EG - Egypt
    • + *
    • SV - El Salvador
    • + *
    • GQ - Equatorial Guinea
    • + *
    • ER - Eritrea
    • + *
    • EE - Estonia
    • + *
    • SZ - Eswatini
    • + *
    • ET - Ethiopia
    • + *
    • FK - Falkland Islands (Malvinas)
    • + *
    • FO - Faroe Islands
    • + *
    • FJ - Fiji
    • + *
    • FI - Finland
    • + *
    • FR - France
    • + *
    • GF - French Guiana
    • + *
    • PF - French Polynesia
    • + *
    • TF - French Southern Territories
    • + *
    • GA - Gabon
    • + *
    • GM - Gambia
    • + *
    • GE - Georgia
    • + *
    • DE - Germany
    • + *
    • GH - Ghana
    • + *
    • GI - Gibraltar
    • + *
    • GR - Greece
    • + *
    • GL - Greenland
    • + *
    • GD - Grenada
    • + *
    • GP - Guadeloupe
    • + *
    • GU - Guam
    • + *
    • GT - Guatemala
    • + *
    • GG - Guernsey
    • + *
    • GN - Guinea
    • + *
    • GW - Guinea-Bissau
    • + *
    • GY - Guyana
    • + *
    • HT - Haiti
    • + *
    • HM - Heard Island and McDonald Islands
    • + *
    • VA - Holy See
    • + *
    • HN - Honduras
    • + *
    • HK - Hong Kong
    • + *
    • HU - Hungary
    • + *
    • IS - Iceland
    • + *
    • IN - India
    • + *
    • ID - Indonesia
    • + *
    • IR - Iran
    • + *
    • IQ - Iraq
    • + *
    • IE - Ireland
    • + *
    • IM - Isle of Man
    • + *
    • IL - Israel
    • + *
    • IT - Italy
    • + *
    • JM - Jamaica
    • + *
    • JP - Japan
    • + *
    • JE - Jersey
    • + *
    • JO - Jordan
    • + *
    • KZ - Kazakhstan
    • + *
    • KE - Kenya
    • + *
    • KI - Kiribati
    • + *
    • KW - Kuwait
    • + *
    • KG - Kyrgyzstan
    • + *
    • LA - Laos
    • + *
    • LV - Latvia
    • + *
    • LB - Lebanon
    • + *
    • LS - Lesotho
    • + *
    • LR - Liberia
    • + *
    • LY - Libya
    • + *
    • LI - Liechtenstein
    • + *
    • LT - Lithuania
    • + *
    • LU - Luxembourg
    • + *
    • MO - Macao
    • + *
    • MG - Madagascar
    • + *
    • MW - Malawi
    • + *
    • MY - Malaysia
    • + *
    • MV - Maldives
    • + *
    • ML - Mali
    • + *
    • MT - Malta
    • + *
    • MH - Marshall Islands
    • + *
    • MQ - Martinique
    • + *
    • MR - Mauritania
    • + *
    • MU - Mauritius
    • + *
    • YT - Mayotte
    • + *
    • MX - Mexico
    • + *
    • FM - Micronesia (Federated States of)
    • + *
    • MD - Moldova
    • + *
    • MC - Monaco
    • + *
    • MN - Mongolia
    • + *
    • ME - Montenegro
    • + *
    • MS - Montserrat
    • + *
    • MA - Morocco
    • + *
    • MZ - Mozambique
    • + *
    • MM - Myanmar
    • + *
    • NA - Namibia
    • + *
    • NR - Nauru
    • + *
    • NP - Nepal
    • + *
    • NL - Netherlands
    • + *
    • NC - New Caledonia
    • + *
    • NZ - New Zealand
    • + *
    • NI - Nicaragua
    • + *
    • NE - Niger
    • + *
    • NG - Nigeria
    • + *
    • NU - Niue
    • + *
    • NF - Norfolk Island
    • + *
    • KP - North Korea
    • + *
    • MK - North Macedonia
    • + *
    • MP - Northern Mariana Islands
    • + *
    • NO - Norway
    • + *
    • OM - Oman
    • + *
    • PK - Pakistan
    • + *
    • PW - Palau
    • + *
    • PS - Palestine, State of
    • + *
    • PA - Panama
    • + *
    • PG - Papua New Guinea
    • + *
    • PY - Paraguay
    • + *
    • PE - Peru
    • + *
    • PH - Philippines
    • + *
    • PN - Pitcairn
    • + *
    • PL - Poland
    • + *
    • PT - Portugal
    • + *
    • PR - Puerto Rico
    • + *
    • QA - Qatar
    • + *
    • RE - Réunion
    • + *
    • RO - Romania
    • + *
    • RU - Russia
    • + *
    • RW - Rwanda
    • + *
    • BL - Saint Barthélemy
    • + *
    • SH - Saint Helena, Ascension and Tristan da Cunha
    • + *
    • KN - Saint Kitts and Nevis
    • + *
    • LC - Saint Lucia
    • + *
    • MF - Saint Martin (French part)
    • + *
    • PM - Saint Pierre and Miquelon
    • + *
    • VC - Saint Vincent and the Grenadines
    • + *
    • WS - Samoa
    • + *
    • SM - San Marino
    • + *
    • ST - Sao Tome and Principe
    • + *
    • SA - Saudi Arabia
    • + *
    • SN - Senegal
    • + *
    • RS - Serbia
    • + *
    • SC - Seychelles
    • + *
    • SL - Sierra Leone
    • + *
    • SG - Singapore
    • + *
    • SX - Sint Maarten (Dutch part)
    • + *
    • SK - Slovakia
    • + *
    • SI - Slovenia
    • + *
    • SB - Solomon Islands
    • + *
    • SO - Somalia
    • + *
    • ZA - South Africa
    • + *
    • GS - South Georgia and the South Sandwich Islands
    • + *
    • KR - South Korea
    • + *
    • SS - South Sudan
    • + *
    • ES - Spain
    • + *
    • LK - Sri Lanka
    • + *
    • SD - Sudan
    • + *
    • SR - Suriname
    • + *
    • SJ - Svalbard and Jan Mayen
    • + *
    • SE - Sweden
    • + *
    • CH - Switzerland
    • + *
    • SY - Syria
    • + *
    • TW - Taiwan
    • + *
    • TJ - Tajikistan
    • + *
    • TZ - Tanzania
    • + *
    • TH - Thailand
    • + *
    • TL - Timor-Leste
    • + *
    • TG - Togo
    • + *
    • TK - Tokelau
    • + *
    • TO - Tonga
    • + *
    • TT - Trinidad and Tobago
    • + *
    • TN - Tunisia
    • + *
    • TR - Turkey
    • + *
    • TM - Turkmenistan
    • + *
    • TC - Turks and Caicos Islands
    • + *
    • TV - Tuvalu
    • + *
    • UG - Uganda
    • + *
    • UA - Ukraine
    • + *
    • AE - United Arab Emirates
    • + *
    • GB - United Kingdom
    • + *
    • UM - United States Minor Outlying Islands
    • + *
    • US - United States of America
    • + *
    • UY - Uruguay
    • + *
    • UZ - Uzbekistan
    • + *
    • VU - Vanuatu
    • + *
    • VE - Venezuela
    • + *
    • VN - Vietnam
    • + *
    • VG - Virgin Islands (British)
    • + *
    • VI - Virgin Islands (U.S.)
    • + *
    • WF - Wallis and Futuna
    • + *
    • EH - Western Sahara
    • + *
    • YE - Yemen
    • + *
    • ZM - Zambia
    • + *
    • ZW - Zimbabwe
    • + *
    + */ @JsonSetter(value = "country", nulls = Nulls.SKIP) - public Builder country(Optional country) { + public Builder country(Optional country) { this.country = country; return this; } - public Builder country(CountryEnum country) { + public Builder country(LocationCountry country) { this.country = Optional.ofNullable(country); return this; } + /** + *

    The location's type. Can be either WORK or HOME

    + *
      + *
    • HOME - HOME
    • + *
    • WORK - WORK
    • + *
    + */ @JsonSetter(value = "location_type", nulls = Nulls.SKIP) - public Builder locationType(Optional locationType) { + public Builder locationType(Optional locationType) { this.locationType = locationType; return this; } - public Builder locationType(LocationTypeEnum locationType) { + public Builder locationType(LocationLocationType locationType) { this.locationType = Optional.ofNullable(locationType); return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/hris/types/LocationCountry.java b/src/main/java/com/merge/api/hris/types/LocationCountry.java new file mode 100644 index 000000000..d2855b512 --- /dev/null +++ b/src/main/java/com/merge/api/hris/types/LocationCountry.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.hris.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = LocationCountry.Deserializer.class) +public final class LocationCountry { + private final Object value; + + private final int type; + + private LocationCountry(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((CountryEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof LocationCountry && equalTo((LocationCountry) other); + } + + private boolean equalTo(LocationCountry other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static LocationCountry of(CountryEnum value) { + return new LocationCountry(value, 0); + } + + public static LocationCountry of(String value) { + return new LocationCountry(value, 1); + } + + public interface Visitor { + T visit(CountryEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(LocationCountry.class); + } + + @java.lang.Override + public LocationCountry deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, CountryEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/hris/types/LocationLocationType.java b/src/main/java/com/merge/api/hris/types/LocationLocationType.java new file mode 100644 index 000000000..84f067aa7 --- /dev/null +++ b/src/main/java/com/merge/api/hris/types/LocationLocationType.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.hris.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = LocationLocationType.Deserializer.class) +public final class LocationLocationType { + private final Object value; + + private final int type; + + private LocationLocationType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((LocationTypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof LocationLocationType && equalTo((LocationLocationType) other); + } + + private boolean equalTo(LocationLocationType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static LocationLocationType of(LocationTypeEnum value) { + return new LocationLocationType(value, 0); + } + + public static LocationLocationType of(String value) { + return new LocationLocationType(value, 1); + } + + public interface Visitor { + T visit(LocationTypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(LocationLocationType.class); + } + + @java.lang.Override + public LocationLocationType deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, LocationTypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/hris/types/LocationsListRequest.java b/src/main/java/com/merge/api/hris/types/LocationsListRequest.java index 32c655153..5dbfd4312 100644 --- a/src/main/java/com/merge/api/hris/types/LocationsListRequest.java +++ b/src/main/java/com/merge/api/hris/types/LocationsListRequest.java @@ -292,6 +292,9 @@ public Builder from(LocationsListRequest other) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -303,6 +306,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -314,6 +320,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -325,6 +334,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -336,6 +348,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -347,6 +362,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -358,6 +376,13 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, will only return locations with this location_type

    + *
      + *
    • HOME - HOME
    • + *
    • WORK - WORK
    • + *
    + */ @JsonSetter(value = "location_type", nulls = Nulls.SKIP) public Builder locationType(Optional locationType) { this.locationType = locationType; @@ -369,6 +394,9 @@ public Builder locationType(LocationsListRequestLocationType locationType) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -380,6 +408,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -391,6 +422,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -402,6 +436,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    Deprecated. Use show_enum_origins.

    + */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -413,6 +450,9 @@ public Builder remoteFields(LocationsListRequestRemoteFields remoteFields) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -424,6 +464,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    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

    + */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; diff --git a/src/main/java/com/merge/api/hris/types/LocationsRetrieveRequest.java b/src/main/java/com/merge/api/hris/types/LocationsRetrieveRequest.java index 4b1304f83..2629714c1 100644 --- a/src/main/java/com/merge/api/hris/types/LocationsRetrieveRequest.java +++ b/src/main/java/com/merge/api/hris/types/LocationsRetrieveRequest.java @@ -130,6 +130,9 @@ public Builder from(LocationsRetrieveRequest other) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -141,6 +144,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -152,6 +158,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    Deprecated. Use show_enum_origins.

    + */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -163,6 +172,9 @@ public Builder remoteFields(LocationsRetrieveRequestRemoteFields remoteFields) { return this; } + /** + *

    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

    + */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; diff --git a/src/main/java/com/merge/api/hris/types/MultipartFormFieldRequest.java b/src/main/java/com/merge/api/hris/types/MultipartFormFieldRequest.java index 529443159..cadc8a410 100644 --- a/src/main/java/com/merge/api/hris/types/MultipartFormFieldRequest.java +++ b/src/main/java/com/merge/api/hris/types/MultipartFormFieldRequest.java @@ -127,26 +127,46 @@ public static NameStage builder() { } public interface NameStage { + /** + * The name of the form field + */ DataStage name(@NotNull String name); Builder from(MultipartFormFieldRequest other); } public interface DataStage { + /** + * The data for the form field. + */ _FinalStage data(@NotNull String data); } public interface _FinalStage { MultipartFormFieldRequest build(); + /** + *

    The encoding of the value of data. Defaults to RAW if not defined.

    + *
      + *
    • RAW - RAW
    • + *
    • BASE64 - BASE64
    • + *
    • GZIP_BASE64 - GZIP_BASE64
    • + *
    + */ _FinalStage encoding(Optional encoding); _FinalStage encoding(EncodingEnum encoding); + /** + *

    The file name of the form field, if the field is for a file.

    + */ _FinalStage fileName(Optional fileName); _FinalStage fileName(String fileName); + /** + *

    The MIME type of the file, if the field is for a file.

    + */ _FinalStage contentType(Optional contentType); _FinalStage contentType(String contentType); @@ -180,7 +200,7 @@ public Builder from(MultipartFormFieldRequest other) { } /** - *

    The name of the form field

    + * The name of the form field

    The name of the form field

    * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -191,7 +211,7 @@ public DataStage name(@NotNull String name) { } /** - *

    The data for the form field.

    + * The data for the form field.

    The data for the form field.

    * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -211,6 +231,9 @@ public _FinalStage contentType(String contentType) { return this; } + /** + *

    The MIME type of the file, if the field is for a file.

    + */ @java.lang.Override @JsonSetter(value = "content_type", nulls = Nulls.SKIP) public _FinalStage contentType(Optional contentType) { @@ -228,6 +251,9 @@ public _FinalStage fileName(String fileName) { return this; } + /** + *

    The file name of the form field, if the field is for a file.

    + */ @java.lang.Override @JsonSetter(value = "file_name", nulls = Nulls.SKIP) public _FinalStage fileName(Optional fileName) { @@ -250,6 +276,14 @@ public _FinalStage encoding(EncodingEnum encoding) { return this; } + /** + *

    The encoding of the value of data. Defaults to RAW if not defined.

    + *
      + *
    • RAW - RAW
    • + *
    • BASE64 - BASE64
    • + *
    • GZIP_BASE64 - GZIP_BASE64
    • + *
    + */ @java.lang.Override @JsonSetter(value = "encoding", nulls = Nulls.SKIP) public _FinalStage encoding(Optional encoding) { diff --git a/src/main/java/com/merge/api/hris/types/PatchedEditFieldMappingRequest.java b/src/main/java/com/merge/api/hris/types/PatchedEditFieldMappingRequest.java index 0cc25de6c..b8194466f 100644 --- a/src/main/java/com/merge/api/hris/types/PatchedEditFieldMappingRequest.java +++ b/src/main/java/com/merge/api/hris/types/PatchedEditFieldMappingRequest.java @@ -116,6 +116,9 @@ public Builder from(PatchedEditFieldMappingRequest other) { return this; } + /** + *

    The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.

    + */ @JsonSetter(value = "remote_field_traversal_path", nulls = Nulls.SKIP) public Builder remoteFieldTraversalPath(Optional> remoteFieldTraversalPath) { this.remoteFieldTraversalPath = remoteFieldTraversalPath; @@ -127,6 +130,9 @@ public Builder remoteFieldTraversalPath(List remoteFieldTraversalPath) return this; } + /** + *

    The method of the remote endpoint where the remote field is coming from.

    + */ @JsonSetter(value = "remote_method", nulls = Nulls.SKIP) public Builder remoteMethod(Optional remoteMethod) { this.remoteMethod = remoteMethod; @@ -138,6 +144,9 @@ public Builder remoteMethod(String remoteMethod) { return this; } + /** + *

    The path of the remote endpoint where the remote field is coming from.

    + */ @JsonSetter(value = "remote_url_path", nulls = Nulls.SKIP) public Builder remoteUrlPath(Optional remoteUrlPath) { this.remoteUrlPath = remoteUrlPath; diff --git a/src/main/java/com/merge/api/hris/types/PayGroup.java b/src/main/java/com/merge/api/hris/types/PayGroup.java index 08eb686bd..fdca41f94 100644 --- a/src/main/java/com/merge/api/hris/types/PayGroup.java +++ b/src/main/java/com/merge/api/hris/types/PayGroup.java @@ -207,6 +207,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -218,6 +221,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -229,6 +235,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -240,6 +249,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The pay group name.

    + */ @JsonSetter(value = "pay_group_name", nulls = Nulls.SKIP) public Builder payGroupName(Optional payGroupName) { this.payGroupName = payGroupName; @@ -251,6 +263,9 @@ public Builder payGroupName(String payGroupName) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/hris/types/PayGroupsListRequest.java b/src/main/java/com/merge/api/hris/types/PayGroupsListRequest.java index 645f91aec..241e4bff5 100644 --- a/src/main/java/com/merge/api/hris/types/PayGroupsListRequest.java +++ b/src/main/java/com/merge/api/hris/types/PayGroupsListRequest.java @@ -237,6 +237,9 @@ public Builder from(PayGroupsListRequest other) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -248,6 +251,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -259,6 +265,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -270,6 +279,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -281,6 +293,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -292,6 +307,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -303,6 +321,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -314,6 +335,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -325,6 +349,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -336,6 +363,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; diff --git a/src/main/java/com/merge/api/hris/types/PayGroupsRetrieveRequest.java b/src/main/java/com/merge/api/hris/types/PayGroupsRetrieveRequest.java index 77d895f20..ca806a41b 100644 --- a/src/main/java/com/merge/api/hris/types/PayGroupsRetrieveRequest.java +++ b/src/main/java/com/merge/api/hris/types/PayGroupsRetrieveRequest.java @@ -97,6 +97,9 @@ public Builder from(PayGroupsRetrieveRequest other) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -108,6 +111,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/hris/types/PayrollRun.java b/src/main/java/com/merge/api/hris/types/PayrollRun.java index 8d9451942..084ee9b72 100644 --- a/src/main/java/com/merge/api/hris/types/PayrollRun.java +++ b/src/main/java/com/merge/api/hris/types/PayrollRun.java @@ -31,9 +31,9 @@ public final class PayrollRun { private final Optional modifiedAt; - private final Optional runState; + private final Optional runState; - private final Optional runType; + private final Optional runType; private final Optional startDate; @@ -54,8 +54,8 @@ private PayrollRun( Optional remoteId, Optional createdAt, Optional modifiedAt, - Optional runState, - Optional runType, + Optional runState, + Optional runType, Optional startDate, Optional endDate, Optional checkDate, @@ -118,7 +118,7 @@ public Optional getModifiedAt() { * */ @JsonProperty("run_state") - public Optional getRunState() { + public Optional getRunState() { return runState; } @@ -133,7 +133,7 @@ public Optional getRunState() { * */ @JsonProperty("run_type") - public Optional getRunType() { + public Optional getRunType() { return runType; } @@ -241,9 +241,9 @@ public static final class Builder { private Optional modifiedAt = Optional.empty(); - private Optional runState = Optional.empty(); + private Optional runState = Optional.empty(); - private Optional runType = Optional.empty(); + private Optional runType = Optional.empty(); private Optional startDate = Optional.empty(); @@ -289,6 +289,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -300,6 +303,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -311,6 +317,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -322,28 +331,51 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The state of the payroll run

    + *
      + *
    • PAID - PAID
    • + *
    • DRAFT - DRAFT
    • + *
    • APPROVED - APPROVED
    • + *
    • FAILED - FAILED
    • + *
    • CLOSED - CLOSED
    • + *
    + */ @JsonSetter(value = "run_state", nulls = Nulls.SKIP) - public Builder runState(Optional runState) { + public Builder runState(Optional runState) { this.runState = runState; return this; } - public Builder runState(RunStateEnum runState) { + public Builder runState(PayrollRunRunState runState) { this.runState = Optional.ofNullable(runState); return this; } + /** + *

    The type of the payroll run

    + *
      + *
    • REGULAR - REGULAR
    • + *
    • OFF_CYCLE - OFF_CYCLE
    • + *
    • CORRECTION - CORRECTION
    • + *
    • TERMINATION - TERMINATION
    • + *
    • SIGN_ON_BONUS - SIGN_ON_BONUS
    • + *
    + */ @JsonSetter(value = "run_type", nulls = Nulls.SKIP) - public Builder runType(Optional runType) { + public Builder runType(Optional runType) { this.runType = runType; return this; } - public Builder runType(RunTypeEnum runType) { + public Builder runType(PayrollRunRunType runType) { this.runType = Optional.ofNullable(runType); return this; } + /** + *

    The day and time the payroll run started.

    + */ @JsonSetter(value = "start_date", nulls = Nulls.SKIP) public Builder startDate(Optional startDate) { this.startDate = startDate; @@ -355,6 +387,9 @@ public Builder startDate(OffsetDateTime startDate) { return this; } + /** + *

    The day and time the payroll run ended.

    + */ @JsonSetter(value = "end_date", nulls = Nulls.SKIP) public Builder endDate(Optional endDate) { this.endDate = endDate; @@ -366,6 +401,9 @@ public Builder endDate(OffsetDateTime endDate) { return this; } + /** + *

    The day and time the payroll run was checked.

    + */ @JsonSetter(value = "check_date", nulls = Nulls.SKIP) public Builder checkDate(Optional checkDate) { this.checkDate = checkDate; @@ -377,6 +415,9 @@ public Builder checkDate(OffsetDateTime checkDate) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/hris/types/PayrollRunRunState.java b/src/main/java/com/merge/api/hris/types/PayrollRunRunState.java new file mode 100644 index 000000000..e77a24cd9 --- /dev/null +++ b/src/main/java/com/merge/api/hris/types/PayrollRunRunState.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.hris.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = PayrollRunRunState.Deserializer.class) +public final class PayrollRunRunState { + private final Object value; + + private final int type; + + private PayrollRunRunState(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((RunStateEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PayrollRunRunState && equalTo((PayrollRunRunState) other); + } + + private boolean equalTo(PayrollRunRunState other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static PayrollRunRunState of(RunStateEnum value) { + return new PayrollRunRunState(value, 0); + } + + public static PayrollRunRunState of(String value) { + return new PayrollRunRunState(value, 1); + } + + public interface Visitor { + T visit(RunStateEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(PayrollRunRunState.class); + } + + @java.lang.Override + public PayrollRunRunState deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, RunStateEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/hris/types/PayrollRunRunType.java b/src/main/java/com/merge/api/hris/types/PayrollRunRunType.java new file mode 100644 index 000000000..1941992c3 --- /dev/null +++ b/src/main/java/com/merge/api/hris/types/PayrollRunRunType.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.hris.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = PayrollRunRunType.Deserializer.class) +public final class PayrollRunRunType { + private final Object value; + + private final int type; + + private PayrollRunRunType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((RunTypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PayrollRunRunType && equalTo((PayrollRunRunType) other); + } + + private boolean equalTo(PayrollRunRunType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static PayrollRunRunType of(RunTypeEnum value) { + return new PayrollRunRunType(value, 0); + } + + public static PayrollRunRunType of(String value) { + return new PayrollRunRunType(value, 1); + } + + public interface Visitor { + T visit(RunTypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(PayrollRunRunType.class); + } + + @java.lang.Override + public PayrollRunRunType deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, RunTypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/hris/types/PayrollRunsListRequest.java b/src/main/java/com/merge/api/hris/types/PayrollRunsListRequest.java index 7e08c6675..fed56ad3c 100644 --- a/src/main/java/com/merge/api/hris/types/PayrollRunsListRequest.java +++ b/src/main/java/com/merge/api/hris/types/PayrollRunsListRequest.java @@ -363,6 +363,9 @@ public Builder from(PayrollRunsListRequest other) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -374,6 +377,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -385,6 +391,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -396,6 +405,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    If provided, will only return payroll runs ended after this datetime.

    + */ @JsonSetter(value = "ended_after", nulls = Nulls.SKIP) public Builder endedAfter(Optional endedAfter) { this.endedAfter = endedAfter; @@ -407,6 +419,9 @@ public Builder endedAfter(OffsetDateTime endedAfter) { return this; } + /** + *

    If provided, will only return payroll runs ended before this datetime.

    + */ @JsonSetter(value = "ended_before", nulls = Nulls.SKIP) public Builder endedBefore(Optional endedBefore) { this.endedBefore = endedBefore; @@ -418,6 +433,9 @@ public Builder endedBefore(OffsetDateTime endedBefore) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -429,6 +447,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -440,6 +461,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -451,6 +475,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -462,6 +489,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -473,6 +503,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -484,6 +517,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    Deprecated. Use show_enum_origins.

    + */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -495,6 +531,9 @@ public Builder remoteFields(PayrollRunsListRequestRemoteFields remoteFields) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -506,6 +545,16 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    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
    • + *
    + */ @JsonSetter(value = "run_type", nulls = Nulls.SKIP) public Builder runType(Optional runType) { this.runType = runType; @@ -517,6 +566,9 @@ public Builder runType(PayrollRunsListRequestRunType runType) { return this; } + /** + *

    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

    + */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; @@ -528,6 +580,9 @@ public Builder showEnumOrigins(PayrollRunsListRequestShowEnumOrigins showEnumOri return this; } + /** + *

    If provided, will only return payroll runs started after this datetime.

    + */ @JsonSetter(value = "started_after", nulls = Nulls.SKIP) public Builder startedAfter(Optional startedAfter) { this.startedAfter = startedAfter; @@ -539,6 +594,9 @@ public Builder startedAfter(OffsetDateTime startedAfter) { return this; } + /** + *

    If provided, will only return payroll runs started before this datetime.

    + */ @JsonSetter(value = "started_before", nulls = Nulls.SKIP) public Builder startedBefore(Optional startedBefore) { this.startedBefore = startedBefore; diff --git a/src/main/java/com/merge/api/hris/types/PayrollRunsRetrieveRequest.java b/src/main/java/com/merge/api/hris/types/PayrollRunsRetrieveRequest.java index 87928e61d..d9fb374fc 100644 --- a/src/main/java/com/merge/api/hris/types/PayrollRunsRetrieveRequest.java +++ b/src/main/java/com/merge/api/hris/types/PayrollRunsRetrieveRequest.java @@ -130,6 +130,9 @@ public Builder from(PayrollRunsRetrieveRequest other) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -141,6 +144,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -152,6 +158,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    Deprecated. Use show_enum_origins.

    + */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -163,6 +172,9 @@ public Builder remoteFields(PayrollRunsRetrieveRequestRemoteFields remoteFields) return this; } + /** + *

    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

    + */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; diff --git a/src/main/java/com/merge/api/hris/types/RemoteData.java b/src/main/java/com/merge/api/hris/types/RemoteData.java index 7492bf596..e9d82f2e0 100644 --- a/src/main/java/com/merge/api/hris/types/RemoteData.java +++ b/src/main/java/com/merge/api/hris/types/RemoteData.java @@ -77,6 +77,9 @@ public static PathStage builder() { } public interface PathStage { + /** + * The third-party API path that is being called. + */ _FinalStage path(@NotNull String path); Builder from(RemoteData other); @@ -109,7 +112,7 @@ public Builder from(RemoteData other) { } /** - *

    The third-party API path that is being called.

    + * The third-party API path that is being called.

    The third-party API path that is being called.

    * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override diff --git a/src/main/java/com/merge/api/hris/types/RemoteFieldsRetrieveRequest.java b/src/main/java/com/merge/api/hris/types/RemoteFieldsRetrieveRequest.java index 0a51b3bef..570875aef 100644 --- a/src/main/java/com/merge/api/hris/types/RemoteFieldsRetrieveRequest.java +++ b/src/main/java/com/merge/api/hris/types/RemoteFieldsRetrieveRequest.java @@ -97,6 +97,9 @@ public Builder from(RemoteFieldsRetrieveRequest other) { return this; } + /** + *

    A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models.

    + */ @JsonSetter(value = "common_models", nulls = Nulls.SKIP) public Builder commonModels(Optional commonModels) { this.commonModels = commonModels; @@ -108,6 +111,9 @@ public Builder commonModels(String commonModels) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_example_values", nulls = Nulls.SKIP) public Builder includeExampleValues(Optional includeExampleValues) { this.includeExampleValues = includeExampleValues; diff --git a/src/main/java/com/merge/api/hris/types/RemoteKeyForRegenerationRequest.java b/src/main/java/com/merge/api/hris/types/RemoteKeyForRegenerationRequest.java index 1d43f1c75..cd2206459 100644 --- a/src/main/java/com/merge/api/hris/types/RemoteKeyForRegenerationRequest.java +++ b/src/main/java/com/merge/api/hris/types/RemoteKeyForRegenerationRequest.java @@ -66,6 +66,9 @@ public static NameStage builder() { } public interface NameStage { + /** + * The name of the remote key + */ _FinalStage name(@NotNull String name); Builder from(RemoteKeyForRegenerationRequest other); @@ -91,7 +94,7 @@ public Builder from(RemoteKeyForRegenerationRequest other) { } /** - *

    The name of the remote key

    + * The name of the remote key

    The name of the remote key

    * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override diff --git a/src/main/java/com/merge/api/hris/types/RemoteResponse.java b/src/main/java/com/merge/api/hris/types/RemoteResponse.java index d77f466f3..9a10cd79c 100644 --- a/src/main/java/com/merge/api/hris/types/RemoteResponse.java +++ b/src/main/java/com/merge/api/hris/types/RemoteResponse.java @@ -32,7 +32,7 @@ public final class RemoteResponse { private final Optional> responseHeaders; - private final Optional responseType; + private final Optional responseType; private final Optional> headers; @@ -44,7 +44,7 @@ private RemoteResponse( int status, JsonNode response, Optional> responseHeaders, - Optional responseType, + Optional responseType, Optional> headers, Map additionalProperties) { this.method = method; @@ -83,7 +83,7 @@ public Optional> getResponseHeaders() { } @JsonProperty("response_type") - public Optional getResponseType() { + public Optional getResponseType() { return responseType; } @@ -159,9 +159,9 @@ public interface _FinalStage { _FinalStage responseHeaders(Map responseHeaders); - _FinalStage responseType(Optional responseType); + _FinalStage responseType(Optional responseType); - _FinalStage responseType(ResponseTypeEnum responseType); + _FinalStage responseType(RemoteResponseResponseType responseType); _FinalStage headers(Optional> headers); @@ -180,7 +180,7 @@ public static final class Builder implements MethodStage, PathStage, StatusStage private Optional> headers = Optional.empty(); - private Optional responseType = Optional.empty(); + private Optional responseType = Optional.empty(); private Optional> responseHeaders = Optional.empty(); @@ -243,14 +243,14 @@ public _FinalStage headers(Optional> headers) { } @java.lang.Override - public _FinalStage responseType(ResponseTypeEnum responseType) { + public _FinalStage responseType(RemoteResponseResponseType responseType) { this.responseType = Optional.ofNullable(responseType); return this; } @java.lang.Override @JsonSetter(value = "response_type", nulls = Nulls.SKIP) - public _FinalStage responseType(Optional responseType) { + public _FinalStage responseType(Optional responseType) { this.responseType = responseType; return this; } diff --git a/src/main/java/com/merge/api/hris/types/RemoteResponseResponseType.java b/src/main/java/com/merge/api/hris/types/RemoteResponseResponseType.java new file mode 100644 index 000000000..f6bf8b1ac --- /dev/null +++ b/src/main/java/com/merge/api/hris/types/RemoteResponseResponseType.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.hris.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = RemoteResponseResponseType.Deserializer.class) +public final class RemoteResponseResponseType { + private final Object value; + + private final int type; + + private RemoteResponseResponseType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((ResponseTypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof RemoteResponseResponseType && equalTo((RemoteResponseResponseType) other); + } + + private boolean equalTo(RemoteResponseResponseType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static RemoteResponseResponseType of(ResponseTypeEnum value) { + return new RemoteResponseResponseType(value, 0); + } + + public static RemoteResponseResponseType of(String value) { + return new RemoteResponseResponseType(value, 1); + } + + public interface Visitor { + T visit(ResponseTypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(RemoteResponseResponseType.class); + } + + @java.lang.Override + public RemoteResponseResponseType deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, ResponseTypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/hris/types/SyncStatus.java b/src/main/java/com/merge/api/hris/types/SyncStatus.java index 72949bb96..f05f98ba0 100644 --- a/src/main/java/com/merge/api/hris/types/SyncStatus.java +++ b/src/main/java/com/merge/api/hris/types/SyncStatus.java @@ -30,11 +30,11 @@ public final class SyncStatus { private final Optional nextSyncStart; - private final Optional lastSyncResult; + private final Optional lastSyncResult; private final Optional lastSyncFinished; - private final StatusFd5Enum status; + private final SyncStatusStatus status; private final boolean isInitialSync; @@ -47,9 +47,9 @@ private SyncStatus( String modelId, Optional lastSyncStart, Optional nextSyncStart, - Optional lastSyncResult, + Optional lastSyncResult, Optional lastSyncFinished, - StatusFd5Enum status, + SyncStatusStatus status, boolean isInitialSync, Optional selectiveSyncConfigurationsUsage, Map additionalProperties) { @@ -86,7 +86,7 @@ public Optional getNextSyncStart() { } @JsonProperty("last_sync_result") - public Optional getLastSyncResult() { + public Optional getLastSyncResult() { return lastSyncResult; } @@ -96,7 +96,7 @@ public Optional getLastSyncFinished() { } @JsonProperty("status") - public StatusFd5Enum getStatus() { + public SyncStatusStatus getStatus() { return status; } @@ -167,7 +167,7 @@ public interface ModelIdStage { } public interface StatusStage { - IsInitialSyncStage status(@NotNull StatusFd5Enum status); + IsInitialSyncStage status(@NotNull SyncStatusStatus status); } public interface IsInitialSyncStage { @@ -185,9 +185,9 @@ public interface _FinalStage { _FinalStage nextSyncStart(OffsetDateTime nextSyncStart); - _FinalStage lastSyncResult(Optional lastSyncResult); + _FinalStage lastSyncResult(Optional lastSyncResult); - _FinalStage lastSyncResult(LastSyncResultEnum lastSyncResult); + _FinalStage lastSyncResult(SyncStatusLastSyncResult lastSyncResult); _FinalStage lastSyncFinished(Optional lastSyncFinished); @@ -207,7 +207,7 @@ public static final class Builder private String modelId; - private StatusFd5Enum status; + private SyncStatusStatus status; private boolean isInitialSync; @@ -215,7 +215,7 @@ public static final class Builder private Optional lastSyncFinished = Optional.empty(); - private Optional lastSyncResult = Optional.empty(); + private Optional lastSyncResult = Optional.empty(); private Optional nextSyncStart = Optional.empty(); @@ -256,7 +256,7 @@ public StatusStage modelId(@NotNull String modelId) { @java.lang.Override @JsonSetter("status") - public IsInitialSyncStage status(@NotNull StatusFd5Enum status) { + public IsInitialSyncStage status(@NotNull SyncStatusStatus status) { this.status = status; return this; } @@ -297,14 +297,14 @@ public _FinalStage lastSyncFinished(Optional lastSyncFinished) { } @java.lang.Override - public _FinalStage lastSyncResult(LastSyncResultEnum lastSyncResult) { + public _FinalStage lastSyncResult(SyncStatusLastSyncResult lastSyncResult) { this.lastSyncResult = Optional.ofNullable(lastSyncResult); return this; } @java.lang.Override @JsonSetter(value = "last_sync_result", nulls = Nulls.SKIP) - public _FinalStage lastSyncResult(Optional lastSyncResult) { + public _FinalStage lastSyncResult(Optional lastSyncResult) { this.lastSyncResult = lastSyncResult; return this; } diff --git a/src/main/java/com/merge/api/hris/types/SyncStatusLastSyncResult.java b/src/main/java/com/merge/api/hris/types/SyncStatusLastSyncResult.java new file mode 100644 index 000000000..4fd37b503 --- /dev/null +++ b/src/main/java/com/merge/api/hris/types/SyncStatusLastSyncResult.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.hris.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = SyncStatusLastSyncResult.Deserializer.class) +public final class SyncStatusLastSyncResult { + private final Object value; + + private final int type; + + private SyncStatusLastSyncResult(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((LastSyncResultEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SyncStatusLastSyncResult && equalTo((SyncStatusLastSyncResult) other); + } + + private boolean equalTo(SyncStatusLastSyncResult other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static SyncStatusLastSyncResult of(LastSyncResultEnum value) { + return new SyncStatusLastSyncResult(value, 0); + } + + public static SyncStatusLastSyncResult of(String value) { + return new SyncStatusLastSyncResult(value, 1); + } + + public interface Visitor { + T visit(LastSyncResultEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(SyncStatusLastSyncResult.class); + } + + @java.lang.Override + public SyncStatusLastSyncResult deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, LastSyncResultEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/hris/types/SyncStatusListRequest.java b/src/main/java/com/merge/api/hris/types/SyncStatusListRequest.java index ae09a11b5..df7c499c2 100644 --- a/src/main/java/com/merge/api/hris/types/SyncStatusListRequest.java +++ b/src/main/java/com/merge/api/hris/types/SyncStatusListRequest.java @@ -95,6 +95,9 @@ public Builder from(SyncStatusListRequest other) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -106,6 +109,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; diff --git a/src/main/java/com/merge/api/hris/types/SyncStatusStatus.java b/src/main/java/com/merge/api/hris/types/SyncStatusStatus.java new file mode 100644 index 000000000..32894b7f9 --- /dev/null +++ b/src/main/java/com/merge/api/hris/types/SyncStatusStatus.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.hris.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = SyncStatusStatus.Deserializer.class) +public final class SyncStatusStatus { + private final Object value; + + private final int type; + + private SyncStatusStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((StatusFd5Enum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SyncStatusStatus && equalTo((SyncStatusStatus) other); + } + + private boolean equalTo(SyncStatusStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static SyncStatusStatus of(StatusFd5Enum value) { + return new SyncStatusStatus(value, 0); + } + + public static SyncStatusStatus of(String value) { + return new SyncStatusStatus(value, 1); + } + + public interface Visitor { + T visit(StatusFd5Enum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(SyncStatusStatus.class); + } + + @java.lang.Override + public SyncStatusStatus deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, StatusFd5Enum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/hris/types/Tax.java b/src/main/java/com/merge/api/hris/types/Tax.java index 386cb5f0a..378158c9d 100644 --- a/src/main/java/com/merge/api/hris/types/Tax.java +++ b/src/main/java/com/merge/api/hris/types/Tax.java @@ -255,6 +255,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -266,6 +269,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -277,6 +283,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -299,6 +308,9 @@ public Builder employeePayrollRun(String employeePayrollRun) { return this; } + /** + *

    The tax's name.

    + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -310,6 +322,9 @@ public Builder name(String name) { return this; } + /** + *

    The tax amount.

    + */ @JsonSetter(value = "amount", nulls = Nulls.SKIP) public Builder amount(Optional amount) { this.amount = amount; @@ -321,6 +336,9 @@ public Builder amount(Double amount) { return this; } + /** + *

    Whether or not the employer is responsible for paying the tax.

    + */ @JsonSetter(value = "employer_tax", nulls = Nulls.SKIP) public Builder employerTax(Optional employerTax) { this.employerTax = employerTax; @@ -332,6 +350,9 @@ public Builder employerTax(Boolean employerTax) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/hris/types/Team.java b/src/main/java/com/merge/api/hris/types/Team.java index f33e54a03..afbab9374 100644 --- a/src/main/java/com/merge/api/hris/types/Team.java +++ b/src/main/java/com/merge/api/hris/types/Team.java @@ -224,6 +224,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -235,6 +238,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -246,6 +252,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -257,6 +266,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The team's name.

    + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -268,6 +280,9 @@ public Builder name(String name) { return this; } + /** + *

    The team's parent team.

    + */ @JsonSetter(value = "parent_team", nulls = Nulls.SKIP) public Builder parentTeam(Optional parentTeam) { this.parentTeam = parentTeam; @@ -279,6 +294,9 @@ public Builder parentTeam(TeamParentTeam parentTeam) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/hris/types/TeamsListRequest.java b/src/main/java/com/merge/api/hris/types/TeamsListRequest.java index b64d8bda8..698e47f94 100644 --- a/src/main/java/com/merge/api/hris/types/TeamsListRequest.java +++ b/src/main/java/com/merge/api/hris/types/TeamsListRequest.java @@ -273,6 +273,9 @@ public Builder from(TeamsListRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -289,6 +292,9 @@ public Builder expand(String expand) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -300,6 +306,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -311,6 +320,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -322,6 +334,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -333,6 +348,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -344,6 +362,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -355,6 +376,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -366,6 +390,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -377,6 +404,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -388,6 +418,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    If provided, will only return teams with this parent team.

    + */ @JsonSetter(value = "parent_team_id", nulls = Nulls.SKIP) public Builder parentTeamId(Optional parentTeamId) { this.parentTeamId = parentTeamId; @@ -399,6 +432,9 @@ public Builder parentTeamId(String parentTeamId) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; diff --git a/src/main/java/com/merge/api/hris/types/TeamsRetrieveRequest.java b/src/main/java/com/merge/api/hris/types/TeamsRetrieveRequest.java index 1140b068e..572e950f2 100644 --- a/src/main/java/com/merge/api/hris/types/TeamsRetrieveRequest.java +++ b/src/main/java/com/merge/api/hris/types/TeamsRetrieveRequest.java @@ -116,6 +116,9 @@ public Builder from(TeamsRetrieveRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -132,6 +135,9 @@ public Builder expand(String expand) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -143,6 +149,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/hris/types/TimeOff.java b/src/main/java/com/merge/api/hris/types/TimeOff.java index d73b39736..8e6236ea9 100644 --- a/src/main/java/com/merge/api/hris/types/TimeOff.java +++ b/src/main/java/com/merge/api/hris/types/TimeOff.java @@ -35,15 +35,15 @@ public final class TimeOff { private final Optional approver; - private final Optional status; + private final Optional status; private final Optional employeeNote; - private final Optional units; + private final Optional units; private final Optional amount; - private final Optional requestType; + private final Optional requestType; private final Optional startTime; @@ -64,11 +64,11 @@ private TimeOff( Optional modifiedAt, Optional employee, Optional approver, - Optional status, + Optional status, Optional employeeNote, - Optional units, + Optional units, Optional amount, - Optional requestType, + Optional requestType, Optional startTime, Optional endTime, Optional remoteWasDeleted, @@ -150,7 +150,7 @@ public Optional getApprover() { * */ @JsonProperty("status") - public Optional getStatus() { + public Optional getStatus() { return status; } @@ -170,7 +170,7 @@ public Optional getEmployeeNote() { * */ @JsonProperty("units") - public Optional getUnits() { + public Optional getUnits() { return units; } @@ -194,7 +194,7 @@ public Optional getAmount() { * */ @JsonProperty("request_type") - public Optional getRequestType() { + public Optional getRequestType() { return requestType; } @@ -306,15 +306,15 @@ public static final class Builder { private Optional approver = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Optional employeeNote = Optional.empty(); - private Optional units = Optional.empty(); + private Optional units = Optional.empty(); private Optional amount = Optional.empty(); - private Optional requestType = Optional.empty(); + private Optional requestType = Optional.empty(); private Optional startTime = Optional.empty(); @@ -362,6 +362,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -373,6 +376,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -384,6 +390,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -395,6 +404,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The employee requesting time off.

    + */ @JsonSetter(value = "employee", nulls = Nulls.SKIP) public Builder employee(Optional employee) { this.employee = employee; @@ -406,6 +418,9 @@ public Builder employee(TimeOffEmployee employee) { return this; } + /** + *

    The Merge ID of the employee with the ability to approve the time off request.

    + */ @JsonSetter(value = "approver", nulls = Nulls.SKIP) public Builder approver(Optional approver) { this.approver = approver; @@ -417,17 +432,30 @@ public Builder approver(TimeOffApprover approver) { return this; } + /** + *

    The status of this time off request.

    + *
      + *
    • REQUESTED - REQUESTED
    • + *
    • APPROVED - APPROVED
    • + *
    • DECLINED - DECLINED
    • + *
    • CANCELLED - CANCELLED
    • + *
    • DELETED - DELETED
    • + *
    + */ @JsonSetter(value = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { + public Builder status(Optional status) { this.status = status; return this; } - public Builder status(TimeOffStatusEnum status) { + public Builder status(TimeOffStatus status) { this.status = Optional.ofNullable(status); return this; } + /** + *

    The employee note for this time off request.

    + */ @JsonSetter(value = "employee_note", nulls = Nulls.SKIP) public Builder employeeNote(Optional employeeNote) { this.employeeNote = employeeNote; @@ -439,17 +467,27 @@ public Builder employeeNote(String employeeNote) { return this; } + /** + *

    The measurement that the third-party integration uses to count time requested.

    + *
      + *
    • HOURS - HOURS
    • + *
    • DAYS - DAYS
    • + *
    + */ @JsonSetter(value = "units", nulls = Nulls.SKIP) - public Builder units(Optional units) { + public Builder units(Optional units) { this.units = units; return this; } - public Builder units(UnitsEnum units) { + public Builder units(TimeOffUnits units) { this.units = Optional.ofNullable(units); return this; } + /** + *

    The time off quantity measured by the prescribed “units”.

    + */ @JsonSetter(value = "amount", nulls = Nulls.SKIP) public Builder amount(Optional amount) { this.amount = amount; @@ -461,17 +499,31 @@ public Builder amount(Double amount) { return this; } + /** + *

    The type of time off request.

    + *
      + *
    • VACATION - VACATION
    • + *
    • SICK - SICK
    • + *
    • PERSONAL - PERSONAL
    • + *
    • JURY_DUTY - JURY_DUTY
    • + *
    • VOLUNTEER - VOLUNTEER
    • + *
    • BEREAVEMENT - BEREAVEMENT
    • + *
    + */ @JsonSetter(value = "request_type", nulls = Nulls.SKIP) - public Builder requestType(Optional requestType) { + public Builder requestType(Optional requestType) { this.requestType = requestType; return this; } - public Builder requestType(RequestTypeEnum requestType) { + public Builder requestType(TimeOffRequestType requestType) { this.requestType = Optional.ofNullable(requestType); return this; } + /** + *

    The day and time of the start of the time requested off.

    + */ @JsonSetter(value = "start_time", nulls = Nulls.SKIP) public Builder startTime(Optional startTime) { this.startTime = startTime; @@ -483,6 +535,9 @@ public Builder startTime(OffsetDateTime startTime) { return this; } + /** + *

    The day and time of the end of the time requested off.

    + */ @JsonSetter(value = "end_time", nulls = Nulls.SKIP) public Builder endTime(Optional endTime) { this.endTime = endTime; @@ -494,6 +549,9 @@ public Builder endTime(OffsetDateTime endTime) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/hris/types/TimeOffBalance.java b/src/main/java/com/merge/api/hris/types/TimeOffBalance.java index 219e151de..04c8f9a85 100644 --- a/src/main/java/com/merge/api/hris/types/TimeOffBalance.java +++ b/src/main/java/com/merge/api/hris/types/TimeOffBalance.java @@ -37,7 +37,7 @@ public final class TimeOffBalance { private final Optional used; - private final Optional policyType; + private final Optional policyType; private final Optional remoteWasDeleted; @@ -55,7 +55,7 @@ private TimeOffBalance( Optional employee, Optional balance, Optional used, - Optional policyType, + Optional policyType, Optional remoteWasDeleted, Optional> fieldMappings, Optional> remoteData, @@ -139,7 +139,7 @@ public Optional getUsed() { * */ @JsonProperty("policy_type") - public Optional getPolicyType() { + public Optional getPolicyType() { return policyType; } @@ -227,7 +227,7 @@ public static final class Builder { private Optional used = Optional.empty(); - private Optional policyType = Optional.empty(); + private Optional policyType = Optional.empty(); private Optional remoteWasDeleted = Optional.empty(); @@ -266,6 +266,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -277,6 +280,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -288,6 +294,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -299,6 +308,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The employee the balance belongs to.

    + */ @JsonSetter(value = "employee", nulls = Nulls.SKIP) public Builder employee(Optional employee) { this.employee = employee; @@ -310,6 +322,9 @@ public Builder employee(TimeOffBalanceEmployee employee) { return this; } + /** + *

    The current remaining PTO balance, measured in hours. For integrations that return this value in days, Merge multiplies by 8 to calculate hours.

    + */ @JsonSetter(value = "balance", nulls = Nulls.SKIP) public Builder balance(Optional balance) { this.balance = balance; @@ -321,6 +336,9 @@ public Builder balance(Double balance) { return this; } + /** + *

    The amount of PTO used in terms of hours. For integrations that return this value in days, Merge multiplies by 8 to calculate hours.

    + */ @JsonSetter(value = "used", nulls = Nulls.SKIP) public Builder used(Optional used) { this.used = used; @@ -332,17 +350,31 @@ public Builder used(Double used) { return this; } + /** + *

    The policy type of this time off balance.

    + *
      + *
    • VACATION - VACATION
    • + *
    • SICK - SICK
    • + *
    • PERSONAL - PERSONAL
    • + *
    • JURY_DUTY - JURY_DUTY
    • + *
    • VOLUNTEER - VOLUNTEER
    • + *
    • BEREAVEMENT - BEREAVEMENT
    • + *
    + */ @JsonSetter(value = "policy_type", nulls = Nulls.SKIP) - public Builder policyType(Optional policyType) { + public Builder policyType(Optional policyType) { this.policyType = policyType; return this; } - public Builder policyType(PolicyTypeEnum policyType) { + public Builder policyType(TimeOffBalancePolicyType policyType) { this.policyType = Optional.ofNullable(policyType); return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/hris/types/TimeOffBalancePolicyType.java b/src/main/java/com/merge/api/hris/types/TimeOffBalancePolicyType.java new file mode 100644 index 000000000..08b4d8168 --- /dev/null +++ b/src/main/java/com/merge/api/hris/types/TimeOffBalancePolicyType.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.hris.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = TimeOffBalancePolicyType.Deserializer.class) +public final class TimeOffBalancePolicyType { + private final Object value; + + private final int type; + + private TimeOffBalancePolicyType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((PolicyTypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof TimeOffBalancePolicyType && equalTo((TimeOffBalancePolicyType) other); + } + + private boolean equalTo(TimeOffBalancePolicyType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static TimeOffBalancePolicyType of(PolicyTypeEnum value) { + return new TimeOffBalancePolicyType(value, 0); + } + + public static TimeOffBalancePolicyType of(String value) { + return new TimeOffBalancePolicyType(value, 1); + } + + public interface Visitor { + T visit(PolicyTypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(TimeOffBalancePolicyType.class); + } + + @java.lang.Override + public TimeOffBalancePolicyType deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, PolicyTypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/hris/types/TimeOffBalancesListRequest.java b/src/main/java/com/merge/api/hris/types/TimeOffBalancesListRequest.java index 202e15d8e..5da15c592 100644 --- a/src/main/java/com/merge/api/hris/types/TimeOffBalancesListRequest.java +++ b/src/main/java/com/merge/api/hris/types/TimeOffBalancesListRequest.java @@ -332,6 +332,9 @@ public Builder from(TimeOffBalancesListRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -348,6 +351,9 @@ public Builder expand(String expand) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -359,6 +365,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -370,6 +379,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -381,6 +393,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    If provided, will only return time off balances for this employee.

    + */ @JsonSetter(value = "employee_id", nulls = Nulls.SKIP) public Builder employeeId(Optional employeeId) { this.employeeId = employeeId; @@ -392,6 +407,9 @@ public Builder employeeId(String employeeId) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -403,6 +421,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -414,6 +435,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -425,6 +449,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -436,6 +463,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -447,6 +477,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -458,6 +491,17 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    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
    • + *
    + */ @JsonSetter(value = "policy_type", nulls = Nulls.SKIP) public Builder policyType(Optional policyType) { this.policyType = policyType; @@ -469,6 +513,9 @@ public Builder policyType(TimeOffBalancesListRequestPolicyType policyType) { return this; } + /** + *

    Deprecated. Use show_enum_origins.

    + */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -480,6 +527,9 @@ public Builder remoteFields(String remoteFields) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -491,6 +541,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    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

    + */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; diff --git a/src/main/java/com/merge/api/hris/types/TimeOffBalancesRetrieveRequest.java b/src/main/java/com/merge/api/hris/types/TimeOffBalancesRetrieveRequest.java index 4904f5771..a96cd1f06 100644 --- a/src/main/java/com/merge/api/hris/types/TimeOffBalancesRetrieveRequest.java +++ b/src/main/java/com/merge/api/hris/types/TimeOffBalancesRetrieveRequest.java @@ -149,6 +149,9 @@ public Builder from(TimeOffBalancesRetrieveRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -165,6 +168,9 @@ public Builder expand(String expand) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -176,6 +182,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -187,6 +196,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    Deprecated. Use show_enum_origins.

    + */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -198,6 +210,9 @@ public Builder remoteFields(String remoteFields) { return this; } + /** + *

    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

    + */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; diff --git a/src/main/java/com/merge/api/hris/types/TimeOffEndpointRequest.java b/src/main/java/com/merge/api/hris/types/TimeOffEndpointRequest.java index 43642fcd7..7e7efc636 100644 --- a/src/main/java/com/merge/api/hris/types/TimeOffEndpointRequest.java +++ b/src/main/java/com/merge/api/hris/types/TimeOffEndpointRequest.java @@ -99,10 +99,16 @@ public interface ModelStage { public interface _FinalStage { TimeOffEndpointRequest build(); + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ _FinalStage isDebugMode(Optional isDebugMode); _FinalStage isDebugMode(Boolean isDebugMode); + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ _FinalStage runAsync(Optional runAsync); _FinalStage runAsync(Boolean runAsync); @@ -146,6 +152,9 @@ public _FinalStage runAsync(Boolean runAsync) { return this; } + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ @java.lang.Override @JsonSetter(value = "run_async", nulls = Nulls.SKIP) public _FinalStage runAsync(Optional runAsync) { @@ -163,6 +172,9 @@ public _FinalStage isDebugMode(Boolean isDebugMode) { return this; } + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ @java.lang.Override @JsonSetter(value = "is_debug_mode", nulls = Nulls.SKIP) public _FinalStage isDebugMode(Optional isDebugMode) { diff --git a/src/main/java/com/merge/api/hris/types/TimeOffListRequest.java b/src/main/java/com/merge/api/hris/types/TimeOffListRequest.java index 6962d3839..c4f160ec7 100644 --- a/src/main/java/com/merge/api/hris/types/TimeOffListRequest.java +++ b/src/main/java/com/merge/api/hris/types/TimeOffListRequest.java @@ -441,6 +441,9 @@ public Builder from(TimeOffListRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -457,6 +460,9 @@ public Builder expand(TimeOffListRequestExpandItem expand) { return this; } + /** + *

    If provided, will only return time off for this approver.

    + */ @JsonSetter(value = "approver_id", nulls = Nulls.SKIP) public Builder approverId(Optional approverId) { this.approverId = approverId; @@ -468,6 +474,9 @@ public Builder approverId(String approverId) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -479,6 +488,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -490,6 +502,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -501,6 +516,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    If provided, will only return time off for this employee.

    + */ @JsonSetter(value = "employee_id", nulls = Nulls.SKIP) public Builder employeeId(Optional employeeId) { this.employeeId = employeeId; @@ -512,6 +530,9 @@ public Builder employeeId(String employeeId) { return this; } + /** + *

    If provided, will only return employees that ended after this datetime.

    + */ @JsonSetter(value = "ended_after", nulls = Nulls.SKIP) public Builder endedAfter(Optional endedAfter) { this.endedAfter = endedAfter; @@ -523,6 +544,9 @@ public Builder endedAfter(OffsetDateTime endedAfter) { return this; } + /** + *

    If provided, will only return time-offs that ended before this datetime.

    + */ @JsonSetter(value = "ended_before", nulls = Nulls.SKIP) public Builder endedBefore(Optional endedBefore) { this.endedBefore = endedBefore; @@ -534,6 +558,9 @@ public Builder endedBefore(OffsetDateTime endedBefore) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -545,6 +572,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -556,6 +586,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -567,6 +600,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -578,6 +614,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -589,6 +628,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -600,6 +642,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    Deprecated. Use show_enum_origins.

    + */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -611,6 +656,9 @@ public Builder remoteFields(TimeOffListRequestRemoteFields remoteFields) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -622,6 +670,17 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    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
    • + *
    + */ @JsonSetter(value = "request_type", nulls = Nulls.SKIP) public Builder requestType(Optional requestType) { this.requestType = requestType; @@ -633,6 +692,9 @@ public Builder requestType(TimeOffListRequestRequestType requestType) { return this; } + /** + *

    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

    + */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; @@ -644,6 +706,9 @@ public Builder showEnumOrigins(TimeOffListRequestShowEnumOrigins showEnumOrigins return this; } + /** + *

    If provided, will only return time-offs that started after this datetime.

    + */ @JsonSetter(value = "started_after", nulls = Nulls.SKIP) public Builder startedAfter(Optional startedAfter) { this.startedAfter = startedAfter; @@ -655,6 +720,9 @@ public Builder startedAfter(OffsetDateTime startedAfter) { return this; } + /** + *

    If provided, will only return time-offs that started before this datetime.

    + */ @JsonSetter(value = "started_before", nulls = Nulls.SKIP) public Builder startedBefore(Optional startedBefore) { this.startedBefore = startedBefore; @@ -666,6 +734,16 @@ public Builder startedBefore(OffsetDateTime startedBefore) { return this; } + /** + *

    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
    • + *
    + */ @JsonSetter(value = "status", nulls = Nulls.SKIP) public Builder status(Optional status) { this.status = status; diff --git a/src/main/java/com/merge/api/hris/types/TimeOffRequest.java b/src/main/java/com/merge/api/hris/types/TimeOffRequest.java index 7286a450f..3b78fe2cb 100644 --- a/src/main/java/com/merge/api/hris/types/TimeOffRequest.java +++ b/src/main/java/com/merge/api/hris/types/TimeOffRequest.java @@ -26,15 +26,15 @@ public final class TimeOffRequest { private final Optional approver; - private final Optional status; + private final Optional status; private final Optional employeeNote; - private final Optional units; + private final Optional units; private final Optional amount; - private final Optional requestType; + private final Optional requestType; private final Optional startTime; @@ -49,11 +49,11 @@ public final class TimeOffRequest { private TimeOffRequest( Optional employee, Optional approver, - Optional status, + Optional status, Optional employeeNote, - Optional units, + Optional units, Optional amount, - Optional requestType, + Optional requestType, Optional startTime, Optional endTime, Optional> integrationParams, @@ -100,7 +100,7 @@ public Optional getApprover() { * */ @JsonProperty("status") - public Optional getStatus() { + public Optional getStatus() { return status; } @@ -120,7 +120,7 @@ public Optional getEmployeeNote() { * */ @JsonProperty("units") - public Optional getUnits() { + public Optional getUnits() { return units; } @@ -144,7 +144,7 @@ public Optional getAmount() { * */ @JsonProperty("request_type") - public Optional getRequestType() { + public Optional getRequestType() { return requestType; } @@ -230,15 +230,15 @@ public static final class Builder { private Optional approver = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Optional employeeNote = Optional.empty(); - private Optional units = Optional.empty(); + private Optional units = Optional.empty(); private Optional amount = Optional.empty(); - private Optional requestType = Optional.empty(); + private Optional requestType = Optional.empty(); private Optional startTime = Optional.empty(); @@ -268,6 +268,9 @@ public Builder from(TimeOffRequest other) { return this; } + /** + *

    The employee requesting time off.

    + */ @JsonSetter(value = "employee", nulls = Nulls.SKIP) public Builder employee(Optional employee) { this.employee = employee; @@ -279,6 +282,9 @@ public Builder employee(TimeOffRequestEmployee employee) { return this; } + /** + *

    The Merge ID of the employee with the ability to approve the time off request.

    + */ @JsonSetter(value = "approver", nulls = Nulls.SKIP) public Builder approver(Optional approver) { this.approver = approver; @@ -290,17 +296,30 @@ public Builder approver(TimeOffRequestApprover approver) { return this; } + /** + *

    The status of this time off request.

    + *
      + *
    • REQUESTED - REQUESTED
    • + *
    • APPROVED - APPROVED
    • + *
    • DECLINED - DECLINED
    • + *
    • CANCELLED - CANCELLED
    • + *
    • DELETED - DELETED
    • + *
    + */ @JsonSetter(value = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { + public Builder status(Optional status) { this.status = status; return this; } - public Builder status(TimeOffStatusEnum status) { + public Builder status(TimeOffRequestStatus status) { this.status = Optional.ofNullable(status); return this; } + /** + *

    The employee note for this time off request.

    + */ @JsonSetter(value = "employee_note", nulls = Nulls.SKIP) public Builder employeeNote(Optional employeeNote) { this.employeeNote = employeeNote; @@ -312,17 +331,27 @@ public Builder employeeNote(String employeeNote) { return this; } + /** + *

    The measurement that the third-party integration uses to count time requested.

    + *
      + *
    • HOURS - HOURS
    • + *
    • DAYS - DAYS
    • + *
    + */ @JsonSetter(value = "units", nulls = Nulls.SKIP) - public Builder units(Optional units) { + public Builder units(Optional units) { this.units = units; return this; } - public Builder units(UnitsEnum units) { + public Builder units(TimeOffRequestUnits units) { this.units = Optional.ofNullable(units); return this; } + /** + *

    The time off quantity measured by the prescribed “units”.

    + */ @JsonSetter(value = "amount", nulls = Nulls.SKIP) public Builder amount(Optional amount) { this.amount = amount; @@ -334,17 +363,31 @@ public Builder amount(Double amount) { return this; } + /** + *

    The type of time off request.

    + *
      + *
    • VACATION - VACATION
    • + *
    • SICK - SICK
    • + *
    • PERSONAL - PERSONAL
    • + *
    • JURY_DUTY - JURY_DUTY
    • + *
    • VOLUNTEER - VOLUNTEER
    • + *
    • BEREAVEMENT - BEREAVEMENT
    • + *
    + */ @JsonSetter(value = "request_type", nulls = Nulls.SKIP) - public Builder requestType(Optional requestType) { + public Builder requestType(Optional requestType) { this.requestType = requestType; return this; } - public Builder requestType(RequestTypeEnum requestType) { + public Builder requestType(TimeOffRequestRequestType requestType) { this.requestType = Optional.ofNullable(requestType); return this; } + /** + *

    The day and time of the start of the time requested off.

    + */ @JsonSetter(value = "start_time", nulls = Nulls.SKIP) public Builder startTime(Optional startTime) { this.startTime = startTime; @@ -356,6 +399,9 @@ public Builder startTime(OffsetDateTime startTime) { return this; } + /** + *

    The day and time of the end of the time requested off.

    + */ @JsonSetter(value = "end_time", nulls = Nulls.SKIP) public Builder endTime(Optional endTime) { this.endTime = endTime; diff --git a/src/main/java/com/merge/api/hris/types/TimeOffRequestRequestType.java b/src/main/java/com/merge/api/hris/types/TimeOffRequestRequestType.java new file mode 100644 index 000000000..f66661993 --- /dev/null +++ b/src/main/java/com/merge/api/hris/types/TimeOffRequestRequestType.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.hris.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = TimeOffRequestRequestType.Deserializer.class) +public final class TimeOffRequestRequestType { + private final Object value; + + private final int type; + + private TimeOffRequestRequestType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((RequestTypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof TimeOffRequestRequestType && equalTo((TimeOffRequestRequestType) other); + } + + private boolean equalTo(TimeOffRequestRequestType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static TimeOffRequestRequestType of(RequestTypeEnum value) { + return new TimeOffRequestRequestType(value, 0); + } + + public static TimeOffRequestRequestType of(String value) { + return new TimeOffRequestRequestType(value, 1); + } + + public interface Visitor { + T visit(RequestTypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(TimeOffRequestRequestType.class); + } + + @java.lang.Override + public TimeOffRequestRequestType deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, RequestTypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/hris/types/TimeOffRequestStatus.java b/src/main/java/com/merge/api/hris/types/TimeOffRequestStatus.java new file mode 100644 index 000000000..5b0d62091 --- /dev/null +++ b/src/main/java/com/merge/api/hris/types/TimeOffRequestStatus.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.hris.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = TimeOffRequestStatus.Deserializer.class) +public final class TimeOffRequestStatus { + private final Object value; + + private final int type; + + private TimeOffRequestStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((TimeOffStatusEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof TimeOffRequestStatus && equalTo((TimeOffRequestStatus) other); + } + + private boolean equalTo(TimeOffRequestStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static TimeOffRequestStatus of(TimeOffStatusEnum value) { + return new TimeOffRequestStatus(value, 0); + } + + public static TimeOffRequestStatus of(String value) { + return new TimeOffRequestStatus(value, 1); + } + + public interface Visitor { + T visit(TimeOffStatusEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(TimeOffRequestStatus.class); + } + + @java.lang.Override + public TimeOffRequestStatus deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TimeOffStatusEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/hris/types/TimeOffRequestType.java b/src/main/java/com/merge/api/hris/types/TimeOffRequestType.java new file mode 100644 index 000000000..b8fe94c97 --- /dev/null +++ b/src/main/java/com/merge/api/hris/types/TimeOffRequestType.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.hris.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = TimeOffRequestType.Deserializer.class) +public final class TimeOffRequestType { + private final Object value; + + private final int type; + + private TimeOffRequestType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((RequestTypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof TimeOffRequestType && equalTo((TimeOffRequestType) other); + } + + private boolean equalTo(TimeOffRequestType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static TimeOffRequestType of(RequestTypeEnum value) { + return new TimeOffRequestType(value, 0); + } + + public static TimeOffRequestType of(String value) { + return new TimeOffRequestType(value, 1); + } + + public interface Visitor { + T visit(RequestTypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(TimeOffRequestType.class); + } + + @java.lang.Override + public TimeOffRequestType deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, RequestTypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/hris/types/TimeOffRequestUnits.java b/src/main/java/com/merge/api/hris/types/TimeOffRequestUnits.java new file mode 100644 index 000000000..3eaab9bb1 --- /dev/null +++ b/src/main/java/com/merge/api/hris/types/TimeOffRequestUnits.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.hris.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = TimeOffRequestUnits.Deserializer.class) +public final class TimeOffRequestUnits { + private final Object value; + + private final int type; + + private TimeOffRequestUnits(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((UnitsEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof TimeOffRequestUnits && equalTo((TimeOffRequestUnits) other); + } + + private boolean equalTo(TimeOffRequestUnits other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static TimeOffRequestUnits of(UnitsEnum value) { + return new TimeOffRequestUnits(value, 0); + } + + public static TimeOffRequestUnits of(String value) { + return new TimeOffRequestUnits(value, 1); + } + + public interface Visitor { + T visit(UnitsEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(TimeOffRequestUnits.class); + } + + @java.lang.Override + public TimeOffRequestUnits deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, UnitsEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/hris/types/TimeOffRetrieveRequest.java b/src/main/java/com/merge/api/hris/types/TimeOffRetrieveRequest.java index db9a04811..c316344cd 100644 --- a/src/main/java/com/merge/api/hris/types/TimeOffRetrieveRequest.java +++ b/src/main/java/com/merge/api/hris/types/TimeOffRetrieveRequest.java @@ -149,6 +149,9 @@ public Builder from(TimeOffRetrieveRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -165,6 +168,9 @@ public Builder expand(TimeOffRetrieveRequestExpandItem expand) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -176,6 +182,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -187,6 +196,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    Deprecated. Use show_enum_origins.

    + */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -198,6 +210,9 @@ public Builder remoteFields(TimeOffRetrieveRequestRemoteFields remoteFields) { return this; } + /** + *

    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

    + */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; diff --git a/src/main/java/com/merge/api/hris/types/TimeOffStatus.java b/src/main/java/com/merge/api/hris/types/TimeOffStatus.java new file mode 100644 index 000000000..01bd18ad1 --- /dev/null +++ b/src/main/java/com/merge/api/hris/types/TimeOffStatus.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.hris.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = TimeOffStatus.Deserializer.class) +public final class TimeOffStatus { + private final Object value; + + private final int type; + + private TimeOffStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((TimeOffStatusEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof TimeOffStatus && equalTo((TimeOffStatus) other); + } + + private boolean equalTo(TimeOffStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static TimeOffStatus of(TimeOffStatusEnum value) { + return new TimeOffStatus(value, 0); + } + + public static TimeOffStatus of(String value) { + return new TimeOffStatus(value, 1); + } + + public interface Visitor { + T visit(TimeOffStatusEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(TimeOffStatus.class); + } + + @java.lang.Override + public TimeOffStatus deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TimeOffStatusEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/hris/types/TimeOffUnits.java b/src/main/java/com/merge/api/hris/types/TimeOffUnits.java new file mode 100644 index 000000000..4cd7c3937 --- /dev/null +++ b/src/main/java/com/merge/api/hris/types/TimeOffUnits.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.hris.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = TimeOffUnits.Deserializer.class) +public final class TimeOffUnits { + private final Object value; + + private final int type; + + private TimeOffUnits(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((UnitsEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof TimeOffUnits && equalTo((TimeOffUnits) other); + } + + private boolean equalTo(TimeOffUnits other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static TimeOffUnits of(UnitsEnum value) { + return new TimeOffUnits(value, 0); + } + + public static TimeOffUnits of(String value) { + return new TimeOffUnits(value, 1); + } + + public interface Visitor { + T visit(UnitsEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(TimeOffUnits.class); + } + + @java.lang.Override + public TimeOffUnits deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, UnitsEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/hris/types/TimesheetEntriesListRequest.java b/src/main/java/com/merge/api/hris/types/TimesheetEntriesListRequest.java index 699c94f77..2746e8924 100644 --- a/src/main/java/com/merge/api/hris/types/TimesheetEntriesListRequest.java +++ b/src/main/java/com/merge/api/hris/types/TimesheetEntriesListRequest.java @@ -358,6 +358,9 @@ public Builder from(TimesheetEntriesListRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -374,6 +377,9 @@ public Builder expand(String expand) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -385,6 +391,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -396,6 +405,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -407,6 +419,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    If provided, will only return timesheet entries for this employee.

    + */ @JsonSetter(value = "employee_id", nulls = Nulls.SKIP) public Builder employeeId(Optional employeeId) { this.employeeId = employeeId; @@ -418,6 +433,9 @@ public Builder employeeId(String employeeId) { return this; } + /** + *

    If provided, will only return timesheet entries ended after this datetime.

    + */ @JsonSetter(value = "ended_after", nulls = Nulls.SKIP) public Builder endedAfter(Optional endedAfter) { this.endedAfter = endedAfter; @@ -429,6 +447,9 @@ public Builder endedAfter(OffsetDateTime endedAfter) { return this; } + /** + *

    If provided, will only return timesheet entries ended before this datetime.

    + */ @JsonSetter(value = "ended_before", nulls = Nulls.SKIP) public Builder endedBefore(Optional endedBefore) { this.endedBefore = endedBefore; @@ -440,6 +461,9 @@ public Builder endedBefore(OffsetDateTime endedBefore) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -451,6 +475,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -462,6 +489,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -473,6 +503,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -484,6 +517,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -495,6 +531,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    Overrides the default ordering for this endpoint. Possible values include: start_time, -start_time.

    + */ @JsonSetter(value = "order_by", nulls = Nulls.SKIP) public Builder orderBy(Optional orderBy) { this.orderBy = orderBy; @@ -506,6 +545,9 @@ public Builder orderBy(TimesheetEntriesListRequestOrderBy orderBy) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -517,6 +559,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -528,6 +573,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    If provided, will only return timesheet entries started after this datetime.

    + */ @JsonSetter(value = "started_after", nulls = Nulls.SKIP) public Builder startedAfter(Optional startedAfter) { this.startedAfter = startedAfter; @@ -539,6 +587,9 @@ public Builder startedAfter(OffsetDateTime startedAfter) { return this; } + /** + *

    If provided, will only return timesheet entries started before this datetime.

    + */ @JsonSetter(value = "started_before", nulls = Nulls.SKIP) public Builder startedBefore(Optional startedBefore) { this.startedBefore = startedBefore; diff --git a/src/main/java/com/merge/api/hris/types/TimesheetEntriesRetrieveRequest.java b/src/main/java/com/merge/api/hris/types/TimesheetEntriesRetrieveRequest.java index 8cfd564ca..327be765e 100644 --- a/src/main/java/com/merge/api/hris/types/TimesheetEntriesRetrieveRequest.java +++ b/src/main/java/com/merge/api/hris/types/TimesheetEntriesRetrieveRequest.java @@ -116,6 +116,9 @@ public Builder from(TimesheetEntriesRetrieveRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -132,6 +135,9 @@ public Builder expand(String expand) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -143,6 +149,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/hris/types/TimesheetEntry.java b/src/main/java/com/merge/api/hris/types/TimesheetEntry.java index 777ed5ade..c7ccfdca9 100644 --- a/src/main/java/com/merge/api/hris/types/TimesheetEntry.java +++ b/src/main/java/com/merge/api/hris/types/TimesheetEntry.java @@ -258,6 +258,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -269,6 +272,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -280,6 +286,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -291,6 +300,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The employee the timesheet entry is for.

    + */ @JsonSetter(value = "employee", nulls = Nulls.SKIP) public Builder employee(Optional employee) { this.employee = employee; @@ -302,6 +314,9 @@ public Builder employee(TimesheetEntryEmployee employee) { return this; } + /** + *

    The number of hours logged by the employee.

    + */ @JsonSetter(value = "hours_worked", nulls = Nulls.SKIP) public Builder hoursWorked(Optional hoursWorked) { this.hoursWorked = hoursWorked; @@ -313,6 +328,9 @@ public Builder hoursWorked(Double hoursWorked) { return this; } + /** + *

    The time at which the employee started work.

    + */ @JsonSetter(value = "start_time", nulls = Nulls.SKIP) public Builder startTime(Optional startTime) { this.startTime = startTime; @@ -324,6 +342,9 @@ public Builder startTime(OffsetDateTime startTime) { return this; } + /** + *

    The time at which the employee ended work.

    + */ @JsonSetter(value = "end_time", nulls = Nulls.SKIP) public Builder endTime(Optional endTime) { this.endTime = endTime; @@ -335,6 +356,9 @@ public Builder endTime(OffsetDateTime endTime) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/hris/types/TimesheetEntryEndpointRequest.java b/src/main/java/com/merge/api/hris/types/TimesheetEntryEndpointRequest.java index 6b070ec6e..a21d6adaf 100644 --- a/src/main/java/com/merge/api/hris/types/TimesheetEntryEndpointRequest.java +++ b/src/main/java/com/merge/api/hris/types/TimesheetEntryEndpointRequest.java @@ -99,10 +99,16 @@ public interface ModelStage { public interface _FinalStage { TimesheetEntryEndpointRequest build(); + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ _FinalStage isDebugMode(Optional isDebugMode); _FinalStage isDebugMode(Boolean isDebugMode); + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ _FinalStage runAsync(Optional runAsync); _FinalStage runAsync(Boolean runAsync); @@ -146,6 +152,9 @@ public _FinalStage runAsync(Boolean runAsync) { return this; } + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ @java.lang.Override @JsonSetter(value = "run_async", nulls = Nulls.SKIP) public _FinalStage runAsync(Optional runAsync) { @@ -163,6 +172,9 @@ public _FinalStage isDebugMode(Boolean isDebugMode) { return this; } + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ @java.lang.Override @JsonSetter(value = "is_debug_mode", nulls = Nulls.SKIP) public _FinalStage isDebugMode(Optional isDebugMode) { diff --git a/src/main/java/com/merge/api/hris/types/TimesheetEntryRequest.java b/src/main/java/com/merge/api/hris/types/TimesheetEntryRequest.java index fceb90c2d..9c289d6b6 100644 --- a/src/main/java/com/merge/api/hris/types/TimesheetEntryRequest.java +++ b/src/main/java/com/merge/api/hris/types/TimesheetEntryRequest.java @@ -164,6 +164,9 @@ public Builder from(TimesheetEntryRequest other) { return this; } + /** + *

    The employee the timesheet entry is for.

    + */ @JsonSetter(value = "employee", nulls = Nulls.SKIP) public Builder employee(Optional employee) { this.employee = employee; @@ -175,6 +178,9 @@ public Builder employee(TimesheetEntryRequestEmployee employee) { return this; } + /** + *

    The number of hours logged by the employee.

    + */ @JsonSetter(value = "hours_worked", nulls = Nulls.SKIP) public Builder hoursWorked(Optional hoursWorked) { this.hoursWorked = hoursWorked; @@ -186,6 +192,9 @@ public Builder hoursWorked(Double hoursWorked) { return this; } + /** + *

    The time at which the employee started work.

    + */ @JsonSetter(value = "start_time", nulls = Nulls.SKIP) public Builder startTime(Optional startTime) { this.startTime = startTime; @@ -197,6 +206,9 @@ public Builder startTime(OffsetDateTime startTime) { return this; } + /** + *

    The time at which the employee ended work.

    + */ @JsonSetter(value = "end_time", nulls = Nulls.SKIP) public Builder endTime(Optional endTime) { this.endTime = endTime; diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawAccountDetailsClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawAccountDetailsClient.java index 109660a33..62c5f95b0 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawAccountDetailsClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawAccountDetailsClient.java @@ -40,7 +40,7 @@ public CompletableFuture> retrieve() { * Get details for a linked account. */ public CompletableFuture> retrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/account-details") .build(); diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawAccountTokenClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawAccountTokenClient.java index 7122c3dd3..ece832412 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawAccountTokenClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawAccountTokenClient.java @@ -41,7 +41,7 @@ public CompletableFuture> retrieve(String pub */ public CompletableFuture> retrieve( String publicToken, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/account-token") .addPathSegment(publicToken) diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawAccountsClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawAccountsClient.java index 47dd2c7fd..dba3cde8d 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawAccountsClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawAccountsClient.java @@ -57,7 +57,7 @@ public CompletableFuture>> list */ public CompletableFuture>> list( AccountsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/accounts"); if (request.getCreatedAfter().isPresent()) { @@ -189,7 +189,7 @@ public CompletableFuture> retrieve(String id, Acco */ public CompletableFuture> retrieve( String id, AccountsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/accounts") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawAsyncPassthroughClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawAsyncPassthroughClient.java index fbb398570..94124c0f3 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawAsyncPassthroughClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawAsyncPassthroughClient.java @@ -46,7 +46,7 @@ public CompletableFuture> create(D */ public CompletableFuture> create( DataPassthroughRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/async-passthrough") .build(); @@ -113,7 +113,7 @@ public CompletableFuture> */ public CompletableFuture> retrieve( String asyncPassthroughReceiptId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/async-passthrough") .addPathSegment(asyncPassthroughReceiptId) diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawAttachmentsClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawAttachmentsClient.java index a51a5dd2c..f392f131f 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawAttachmentsClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawAttachmentsClient.java @@ -68,7 +68,7 @@ public CompletableFuture>> l */ public CompletableFuture>> list( AttachmentsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/attachments"); if (request.getCreatedAfter().isPresent()) { @@ -209,7 +209,7 @@ public CompletableFuture> crea */ public CompletableFuture> create( TicketingAttachmentEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/attachments"); if (request.getIsDebugMode().isPresent()) { @@ -291,7 +291,7 @@ public CompletableFuture> retrieve(String id, A */ public CompletableFuture> retrieve( String id, AttachmentsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/attachments") .addPathSegment(id); @@ -375,7 +375,7 @@ public CompletableFuture> downloadRetrieve( */ public CompletableFuture> downloadRetrieve( String id, AttachmentsDownloadRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/attachments") .addPathSegment(id) @@ -442,7 +442,7 @@ public CompletableFuture> metaPostRetrieve() * Returns metadata for TicketingAttachment POSTs. */ public CompletableFuture> metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/attachments/meta/post") .build(); diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawAuditTrailClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawAuditTrailClient.java index 1115f0e71..c03956609 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawAuditTrailClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawAuditTrailClient.java @@ -57,7 +57,7 @@ public CompletableFuture> */ public CompletableFuture>> list( AuditTrailListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/audit-trail"); if (request.getCursor().isPresent()) { diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawAvailableActionsClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawAvailableActionsClient.java index a4cce3e8a..49e5e1b20 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawAvailableActionsClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawAvailableActionsClient.java @@ -40,7 +40,7 @@ public CompletableFuture> retrieve() { * Returns a list of models and actions available for an account. */ public CompletableFuture> retrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/available-actions") .build(); diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawCollectionsClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawCollectionsClient.java index aa6eec90d..8cabbc63b 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawCollectionsClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawCollectionsClient.java @@ -61,7 +61,7 @@ public CompletableFuture>> l */ public CompletableFuture>> list( CollectionsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/collections"); if (request.getCollectionType().isPresent()) { @@ -217,7 +217,7 @@ public CompletableFuture>> viewe */ public CompletableFuture>> viewersList( String collectionId, CollectionsViewersListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/collections") .addPathSegment(collectionId) @@ -332,7 +332,7 @@ public CompletableFuture> retrieve(String id, C */ public CompletableFuture> retrieve( String id, CollectionsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/collections") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawCommentsClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawCommentsClient.java index 155783e8d..1bad52f96 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawCommentsClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawCommentsClient.java @@ -64,7 +64,7 @@ public CompletableFuture>> list */ public CompletableFuture>> list( CommentsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/comments"); if (request.getCreatedAfter().isPresent()) { @@ -204,7 +204,7 @@ public CompletableFuture> create(CommentEn */ public CompletableFuture> create( CommentEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/comments"); if (request.getIsDebugMode().isPresent()) { @@ -285,7 +285,7 @@ public CompletableFuture> retrieve(String id, Comm */ public CompletableFuture> retrieve( String id, CommentsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/comments") .addPathSegment(id); @@ -359,7 +359,7 @@ public CompletableFuture> metaPostRetrieve() * Returns metadata for Comment POSTs. */ public CompletableFuture> metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/comments/meta/post") .build(); diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawContactsClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawContactsClient.java index 029420f9c..797e1dfd3 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawContactsClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawContactsClient.java @@ -64,7 +64,7 @@ public CompletableFuture>> list */ public CompletableFuture>> list( ContactsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/contacts"); if (request.getCreatedAfter().isPresent()) { @@ -194,7 +194,7 @@ public CompletableFuture> create( */ public CompletableFuture> create( TicketingContactEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/contacts"); if (request.getIsDebugMode().isPresent()) { @@ -276,7 +276,7 @@ public CompletableFuture> retrieve(String id, Cont */ public CompletableFuture> retrieve( String id, ContactsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/contacts") .addPathSegment(id); @@ -350,7 +350,7 @@ public CompletableFuture> metaPostRetrieve() * Returns metadata for TicketingContact POSTs. */ public CompletableFuture> metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/contacts/meta/post") .build(); diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawDeleteAccountClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawDeleteAccountClient.java index b288b8447..2f99902ba 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawDeleteAccountClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawDeleteAccountClient.java @@ -40,7 +40,7 @@ public CompletableFuture> delete() { * Delete a linked account. */ public CompletableFuture> delete(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/delete-account") .build(); diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawFieldMappingClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawFieldMappingClient.java index 803f84107..a9566ad3a 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawFieldMappingClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawFieldMappingClient.java @@ -62,7 +62,7 @@ public CompletableFuture> */ public CompletableFuture> fieldMappingsRetrieve( FieldMappingsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/field-mappings"); if (request.getExcludeRemoteFieldMetadata().isPresent()) { @@ -128,7 +128,7 @@ public CompletableFuture> fie */ public CompletableFuture> fieldMappingsCreate( CreateFieldMappingRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/field-mappings"); if (request.getExcludeRemoteFieldMetadata().isPresent()) { @@ -208,7 +208,7 @@ public CompletableFuture> fie */ public CompletableFuture> fieldMappingsDestroy( String fieldMappingId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/field-mappings") .addPathSegment(fieldMappingId) @@ -278,7 +278,7 @@ public CompletableFuture> fie */ public CompletableFuture> fieldMappingsPartialUpdate( String fieldMappingId, PatchedEditFieldMappingRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/field-mappings") .addPathSegment(fieldMappingId) @@ -353,7 +353,7 @@ public CompletableFuture> remoteFie */ public CompletableFuture> remoteFieldsRetrieve( RemoteFieldsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/remote-fields"); if (request.getCommonModels().isPresent()) { @@ -422,7 +422,7 @@ public CompletableFuture> t */ public CompletableFuture> targetFieldsRetrieve( RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/target-fields") .build(); diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawForceResyncClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawForceResyncClient.java index 283a71811..9668abb67 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawForceResyncClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawForceResyncClient.java @@ -44,7 +44,7 @@ public CompletableFuture>> syncStatusResyn */ public CompletableFuture>> syncStatusResyncCreate( RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/sync-status/resync") .build(); diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawGenerateKeyClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawGenerateKeyClient.java index 9bc456b05..10620d0bb 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawGenerateKeyClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawGenerateKeyClient.java @@ -45,7 +45,7 @@ public CompletableFuture> create(GenerateRemoteK */ public CompletableFuture> create( GenerateRemoteKeyRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/generate-key") .build(); diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawIssuesClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawIssuesClient.java index 0a391254e..46dc3e4f4 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawIssuesClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawIssuesClient.java @@ -56,7 +56,7 @@ public CompletableFuture>> list(I */ public CompletableFuture>> list( IssuesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/issues"); if (request.getAccountToken().isPresent()) { @@ -199,7 +199,7 @@ public CompletableFuture> retrieve(String id) { * Get a specific issue. */ public CompletableFuture> retrieve(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/issues") .addPathSegment(id) diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawLinkTokenClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawLinkTokenClient.java index 5505c7533..1cb2ef480 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawLinkTokenClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawLinkTokenClient.java @@ -45,7 +45,7 @@ public CompletableFuture> create(EndUserDetailsR */ public CompletableFuture> create( EndUserDetailsRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/link-token") .build(); diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawLinkedAccountsClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawLinkedAccountsClient.java index a453eda27..a7f20926b 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawLinkedAccountsClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawLinkedAccountsClient.java @@ -57,7 +57,7 @@ public CompletableFuture>> list( LinkedAccountsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/linked-accounts"); if (request.getCategory().isPresent()) { diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawPassthroughClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawPassthroughClient.java index 267e629b0..8f061e1f6 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawPassthroughClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawPassthroughClient.java @@ -45,7 +45,7 @@ public CompletableFuture> create(DataPassth */ public CompletableFuture> create( DataPassthroughRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/passthrough") .build(); diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawProjectsClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawProjectsClient.java index 7a47b03b0..964960d45 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawProjectsClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawProjectsClient.java @@ -60,7 +60,7 @@ public CompletableFuture>> list */ public CompletableFuture>> list( ProjectsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/projects"); if (request.getCreatedAfter().isPresent()) { @@ -192,7 +192,7 @@ public CompletableFuture> retrieve(String id, Proj */ public CompletableFuture> retrieve( String id, ProjectsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/projects") .addPathSegment(id); @@ -271,7 +271,7 @@ public CompletableFuture>> usersLi */ public CompletableFuture>> usersList( String parentId, ProjectsUsersListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/projects") .addPathSegment(parentId) diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawRegenerateKeyClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawRegenerateKeyClient.java index c7aef7d48..234ea77c8 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawRegenerateKeyClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawRegenerateKeyClient.java @@ -45,7 +45,7 @@ public CompletableFuture> create(RemoteKeyForReg */ public CompletableFuture> create( RemoteKeyForRegenerationRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/regenerate-key") .build(); diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawRolesClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawRolesClient.java index afdcd6132..086eafd21 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawRolesClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawRolesClient.java @@ -57,7 +57,7 @@ public CompletableFuture>> list(Ro */ public CompletableFuture>> list( RolesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/roles"); if (request.getCreatedAfter().isPresent()) { @@ -189,7 +189,7 @@ public CompletableFuture> retrieve(String id, RolesRe */ public CompletableFuture> retrieve( String id, RolesRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/roles") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawScopesClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawScopesClient.java index 1fdd8b34c..c6098baa8 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawScopesClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawScopesClient.java @@ -45,7 +45,7 @@ public CompletableFuture> defaultScope */ public CompletableFuture> defaultScopesRetrieve( RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/default-scopes") .build(); @@ -103,7 +103,7 @@ public CompletableFuture> linkedAccoun */ public CompletableFuture> linkedAccountScopesRetrieve( RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/linked-account-scopes") .build(); @@ -162,7 +162,7 @@ public CompletableFuture> linkedAccoun */ public CompletableFuture> linkedAccountScopesCreate( LinkedAccountCommonModelScopeDeserializerRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/linked-account-scopes") .build(); diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawSyncStatusClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawSyncStatusClient.java index b8ec11e7f..24d6a92f5 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawSyncStatusClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawSyncStatusClient.java @@ -56,7 +56,7 @@ public CompletableFuture>> l */ public CompletableFuture>> list( SyncStatusListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/sync-status"); if (request.getCursor().isPresent()) { diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawTagsClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawTagsClient.java index 83fc1ae91..265f5c697 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawTagsClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawTagsClient.java @@ -57,7 +57,7 @@ public CompletableFuture>> list(Tag */ public CompletableFuture>> list( TagsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/tags"); if (request.getCreatedAfter().isPresent()) { @@ -189,7 +189,7 @@ public CompletableFuture> retrieve(String id, TagsRetr */ public CompletableFuture> retrieve( String id, TagsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/tags") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawTeamsClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawTeamsClient.java index edc49894d..05663725d 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawTeamsClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawTeamsClient.java @@ -57,7 +57,7 @@ public CompletableFuture>> list(Te */ public CompletableFuture>> list( TeamsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/teams"); if (request.getCreatedAfter().isPresent()) { @@ -189,7 +189,7 @@ public CompletableFuture> retrieve(String id, TeamsRe */ public CompletableFuture> retrieve( String id, TeamsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/teams") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawTicketsClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawTicketsClient.java index 92d724741..350a20480 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawTicketsClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawTicketsClient.java @@ -22,6 +22,7 @@ import com.merge.api.ticketing.types.TicketEndpointRequest; import com.merge.api.ticketing.types.TicketResponse; import com.merge.api.ticketing.types.TicketsListRequest; +import com.merge.api.ticketing.types.TicketsMetaPostRetrieveRequest; import com.merge.api.ticketing.types.TicketsRemoteFieldClassesListRequest; import com.merge.api.ticketing.types.TicketsRetrieveRequest; import com.merge.api.ticketing.types.TicketsViewersListRequest; @@ -71,7 +72,7 @@ public CompletableFuture>> list( */ public CompletableFuture>> list( TicketsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/tickets"); if (request.getAccountId().isPresent()) { @@ -112,6 +113,10 @@ public CompletableFuture>> list( QueryStringMapper.addQueryParameter( httpUrl, "created_before", request.getCreatedBefore().get().toString(), false); } + if (request.getCreatorId().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "creator_id", request.getCreatorId().get(), false); + } if (request.getCursor().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "cursor", request.getCursor().get(), false); @@ -308,7 +313,7 @@ public CompletableFuture> create(TicketEndp */ public CompletableFuture> create( TicketEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/tickets"); if (request.getIsDebugMode().isPresent()) { @@ -389,7 +394,7 @@ public CompletableFuture> retrieve(String id, Ticke */ public CompletableFuture> retrieve( String id, TicketsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/tickets") .addPathSegment(id); @@ -483,7 +488,7 @@ public CompletableFuture> partialUpdate( */ public CompletableFuture> partialUpdate( String id, PatchedTicketEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/tickets") .addPathSegment(id); @@ -566,7 +571,7 @@ public CompletableFuture>> viewe */ public CompletableFuture>> viewersList( String ticketId, TicketsViewersListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/tickets") .addPathSegment(ticketId) @@ -674,7 +679,7 @@ public CompletableFuture> metaPatchRetrieve(S */ public CompletableFuture> metaPatchRetrieve( String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/tickets/meta/patch") .addPathSegment(id) @@ -725,24 +730,40 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { * Returns metadata for Ticket POSTs. */ public CompletableFuture> metaPostRetrieve() { - return metaPostRetrieve(null); + return metaPostRetrieve(TicketsMetaPostRetrieveRequest.builder().build()); + } + + /** + * Returns metadata for Ticket POSTs. + */ + public CompletableFuture> metaPostRetrieve( + TicketsMetaPostRetrieveRequest request) { + return metaPostRetrieve(request, null); } /** * Returns metadata for Ticket POSTs. */ - public CompletableFuture> metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + public CompletableFuture> metaPostRetrieve( + TicketsMetaPostRetrieveRequest request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() - .addPathSegments("ticketing/v1/tickets/meta/post") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) + .addPathSegments("ticketing/v1/tickets/meta/post"); + if (request.getCollectionId().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "collection_id", request.getCollectionId().get(), false); + } + if (request.getTicketType().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "ticket_type", request.getTicketType().get(), false); + } + Request.Builder _requestBuilder = new Request.Builder() + .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); + .addHeader("Accept", "application/json"); + Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); @@ -799,7 +820,7 @@ public CompletableFuture>> remoteFieldClassesList( TicketsRemoteFieldClassesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/tickets/remote-field-classes"); if (request.getCursor().isPresent()) { @@ -837,6 +858,10 @@ public CompletableFuture>> list(Us */ public CompletableFuture>> list( UsersListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/users"); if (request.getCreatedAfter().isPresent()) { @@ -201,7 +201,7 @@ public CompletableFuture> retrieve(String id, UsersRe */ public CompletableFuture> retrieve( String id, UsersRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/users") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/ticketing/AsyncRawWebhookReceiversClient.java b/src/main/java/com/merge/api/ticketing/AsyncRawWebhookReceiversClient.java index 87209fd20..88aa4ed92 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncRawWebhookReceiversClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncRawWebhookReceiversClient.java @@ -46,7 +46,7 @@ public CompletableFuture>> list() { * Returns a list of WebhookReceiver objects. */ public CompletableFuture>> list(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/webhook-receivers") .build(); @@ -105,7 +105,7 @@ public CompletableFuture> create(WebhookRe */ public CompletableFuture> create( WebhookReceiverRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/webhook-receivers") .build(); diff --git a/src/main/java/com/merge/api/ticketing/AsyncTicketsClient.java b/src/main/java/com/merge/api/ticketing/AsyncTicketsClient.java index 32cb0db2a..19f406d9e 100644 --- a/src/main/java/com/merge/api/ticketing/AsyncTicketsClient.java +++ b/src/main/java/com/merge/api/ticketing/AsyncTicketsClient.java @@ -13,6 +13,7 @@ import com.merge.api.ticketing.types.TicketEndpointRequest; import com.merge.api.ticketing.types.TicketResponse; import com.merge.api.ticketing.types.TicketsListRequest; +import com.merge.api.ticketing.types.TicketsMetaPostRetrieveRequest; import com.merge.api.ticketing.types.TicketsRemoteFieldClassesListRequest; import com.merge.api.ticketing.types.TicketsRetrieveRequest; import com.merge.api.ticketing.types.TicketsViewersListRequest; @@ -156,8 +157,16 @@ public CompletableFuture metaPostRetrieve() { /** * Returns metadata for Ticket POSTs. */ - public CompletableFuture metaPostRetrieve(RequestOptions requestOptions) { - return this.rawClient.metaPostRetrieve(requestOptions).thenApply(response -> response.body()); + public CompletableFuture metaPostRetrieve(TicketsMetaPostRetrieveRequest request) { + return this.rawClient.metaPostRetrieve(request).thenApply(response -> response.body()); + } + + /** + * Returns metadata for Ticket POSTs. + */ + public CompletableFuture metaPostRetrieve( + TicketsMetaPostRetrieveRequest request, RequestOptions requestOptions) { + return this.rawClient.metaPostRetrieve(request, requestOptions).thenApply(response -> response.body()); } /** diff --git a/src/main/java/com/merge/api/ticketing/RawAccountDetailsClient.java b/src/main/java/com/merge/api/ticketing/RawAccountDetailsClient.java index 678dcdb56..1008b20ad 100644 --- a/src/main/java/com/merge/api/ticketing/RawAccountDetailsClient.java +++ b/src/main/java/com/merge/api/ticketing/RawAccountDetailsClient.java @@ -36,7 +36,7 @@ public MergeApiHttpResponse retrieve() { * Get details for a linked account. */ public MergeApiHttpResponse retrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/account-details") .build(); diff --git a/src/main/java/com/merge/api/ticketing/RawAccountTokenClient.java b/src/main/java/com/merge/api/ticketing/RawAccountTokenClient.java index cdb22d382..744b6d313 100644 --- a/src/main/java/com/merge/api/ticketing/RawAccountTokenClient.java +++ b/src/main/java/com/merge/api/ticketing/RawAccountTokenClient.java @@ -36,7 +36,7 @@ public MergeApiHttpResponse retrieve(String publicToken) { * Returns the account token for the end user with the provided public token. */ public MergeApiHttpResponse retrieve(String publicToken, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/account-token") .addPathSegment(publicToken) diff --git a/src/main/java/com/merge/api/ticketing/RawAccountsClient.java b/src/main/java/com/merge/api/ticketing/RawAccountsClient.java index 33d6a9daa..dba1cf258 100644 --- a/src/main/java/com/merge/api/ticketing/RawAccountsClient.java +++ b/src/main/java/com/merge/api/ticketing/RawAccountsClient.java @@ -52,7 +52,7 @@ public MergeApiHttpResponse> list(AccountsListReques */ public MergeApiHttpResponse> list( AccountsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/accounts"); if (request.getCreatedAfter().isPresent()) { @@ -165,7 +165,7 @@ public MergeApiHttpResponse retrieve(String id, AccountsRetrieveRequest */ public MergeApiHttpResponse retrieve( String id, AccountsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/accounts") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/ticketing/RawAsyncPassthroughClient.java b/src/main/java/com/merge/api/ticketing/RawAsyncPassthroughClient.java index c694cab8b..2bbabfaf5 100644 --- a/src/main/java/com/merge/api/ticketing/RawAsyncPassthroughClient.java +++ b/src/main/java/com/merge/api/ticketing/RawAsyncPassthroughClient.java @@ -42,7 +42,7 @@ public MergeApiHttpResponse create(DataPassthroughReque */ public MergeApiHttpResponse create( DataPassthroughRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/async-passthrough") .build(); @@ -94,7 +94,7 @@ public MergeApiHttpResponse retrieve(String as */ public MergeApiHttpResponse retrieve( String asyncPassthroughReceiptId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/async-passthrough") .addPathSegment(asyncPassthroughReceiptId) diff --git a/src/main/java/com/merge/api/ticketing/RawAttachmentsClient.java b/src/main/java/com/merge/api/ticketing/RawAttachmentsClient.java index 6ed80fd35..daf955db5 100644 --- a/src/main/java/com/merge/api/ticketing/RawAttachmentsClient.java +++ b/src/main/java/com/merge/api/ticketing/RawAttachmentsClient.java @@ -62,7 +62,7 @@ public MergeApiHttpResponse> list(AttachmentsList */ public MergeApiHttpResponse> list( AttachmentsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/attachments"); if (request.getCreatedAfter().isPresent()) { @@ -183,7 +183,7 @@ public MergeApiHttpResponse create(TicketingAttachm */ public MergeApiHttpResponse create( TicketingAttachmentEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/attachments"); if (request.getIsDebugMode().isPresent()) { @@ -251,7 +251,7 @@ public MergeApiHttpResponse retrieve(String id, AttachmentsRetrieveR */ public MergeApiHttpResponse retrieve( String id, AttachmentsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/attachments") .addPathSegment(id); @@ -320,7 +320,7 @@ public MergeApiHttpResponse downloadRetrieve(String id, Attachments */ public MergeApiHttpResponse downloadRetrieve( String id, AttachmentsDownloadRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/attachments") .addPathSegment(id) @@ -374,7 +374,7 @@ public MergeApiHttpResponse metaPostRetrieve() { * Returns metadata for TicketingAttachment POSTs. */ public MergeApiHttpResponse metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/attachments/meta/post") .build(); diff --git a/src/main/java/com/merge/api/ticketing/RawAuditTrailClient.java b/src/main/java/com/merge/api/ticketing/RawAuditTrailClient.java index e829d1fa1..0fea3502f 100644 --- a/src/main/java/com/merge/api/ticketing/RawAuditTrailClient.java +++ b/src/main/java/com/merge/api/ticketing/RawAuditTrailClient.java @@ -51,7 +51,7 @@ public MergeApiHttpResponse> list(AuditTrailLi */ public MergeApiHttpResponse> list( AuditTrailListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/audit-trail"); if (request.getCursor().isPresent()) { diff --git a/src/main/java/com/merge/api/ticketing/RawAvailableActionsClient.java b/src/main/java/com/merge/api/ticketing/RawAvailableActionsClient.java index bc705b750..b4c7a67bd 100644 --- a/src/main/java/com/merge/api/ticketing/RawAvailableActionsClient.java +++ b/src/main/java/com/merge/api/ticketing/RawAvailableActionsClient.java @@ -36,7 +36,7 @@ public MergeApiHttpResponse retrieve() { * Returns a list of models and actions available for an account. */ public MergeApiHttpResponse retrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/available-actions") .build(); diff --git a/src/main/java/com/merge/api/ticketing/RawCollectionsClient.java b/src/main/java/com/merge/api/ticketing/RawCollectionsClient.java index 1cf1385ee..1de52db6d 100644 --- a/src/main/java/com/merge/api/ticketing/RawCollectionsClient.java +++ b/src/main/java/com/merge/api/ticketing/RawCollectionsClient.java @@ -55,7 +55,7 @@ public MergeApiHttpResponse> list(CollectionsList */ public MergeApiHttpResponse> list( CollectionsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/collections"); if (request.getCollectionType().isPresent()) { @@ -192,7 +192,7 @@ public MergeApiHttpResponse> viewersList( */ public MergeApiHttpResponse> viewersList( String collectionId, CollectionsViewersListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/collections") .addPathSegment(collectionId) @@ -288,7 +288,7 @@ public MergeApiHttpResponse retrieve(String id, CollectionsRetrieveR */ public MergeApiHttpResponse retrieve( String id, CollectionsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/collections") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/ticketing/RawCommentsClient.java b/src/main/java/com/merge/api/ticketing/RawCommentsClient.java index ae78cb99e..2acc5c40e 100644 --- a/src/main/java/com/merge/api/ticketing/RawCommentsClient.java +++ b/src/main/java/com/merge/api/ticketing/RawCommentsClient.java @@ -59,7 +59,7 @@ public MergeApiHttpResponse> list(CommentsListReques */ public MergeApiHttpResponse> list( CommentsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/comments"); if (request.getCreatedAfter().isPresent()) { @@ -179,7 +179,7 @@ public MergeApiHttpResponse create(CommentEndpointRequest reque * Creates a Comment object with the given values. */ public MergeApiHttpResponse create(CommentEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/comments"); if (request.getIsDebugMode().isPresent()) { @@ -246,7 +246,7 @@ public MergeApiHttpResponse retrieve(String id, CommentsRetrieveRequest */ public MergeApiHttpResponse retrieve( String id, CommentsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/comments") .addPathSegment(id); @@ -307,7 +307,7 @@ public MergeApiHttpResponse metaPostRetrieve() { * Returns metadata for Comment POSTs. */ public MergeApiHttpResponse metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/comments/meta/post") .build(); diff --git a/src/main/java/com/merge/api/ticketing/RawContactsClient.java b/src/main/java/com/merge/api/ticketing/RawContactsClient.java index 30adce58c..f8c22973b 100644 --- a/src/main/java/com/merge/api/ticketing/RawContactsClient.java +++ b/src/main/java/com/merge/api/ticketing/RawContactsClient.java @@ -59,7 +59,7 @@ public MergeApiHttpResponse> list(ContactsListReques */ public MergeApiHttpResponse> list( ContactsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/contacts"); if (request.getCreatedAfter().isPresent()) { @@ -169,7 +169,7 @@ public MergeApiHttpResponse create(TicketingContactEnd */ public MergeApiHttpResponse create( TicketingContactEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/contacts"); if (request.getIsDebugMode().isPresent()) { @@ -237,7 +237,7 @@ public MergeApiHttpResponse retrieve(String id, ContactsRetrieveRequest */ public MergeApiHttpResponse retrieve( String id, ContactsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/contacts") .addPathSegment(id); @@ -298,7 +298,7 @@ public MergeApiHttpResponse metaPostRetrieve() { * Returns metadata for TicketingContact POSTs. */ public MergeApiHttpResponse metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/contacts/meta/post") .build(); diff --git a/src/main/java/com/merge/api/ticketing/RawDeleteAccountClient.java b/src/main/java/com/merge/api/ticketing/RawDeleteAccountClient.java index 930ff6efd..43d9fff26 100644 --- a/src/main/java/com/merge/api/ticketing/RawDeleteAccountClient.java +++ b/src/main/java/com/merge/api/ticketing/RawDeleteAccountClient.java @@ -36,7 +36,7 @@ public MergeApiHttpResponse delete() { * Delete a linked account. */ public MergeApiHttpResponse delete(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/delete-account") .build(); diff --git a/src/main/java/com/merge/api/ticketing/RawFieldMappingClient.java b/src/main/java/com/merge/api/ticketing/RawFieldMappingClient.java index 87512a318..40aa261af 100644 --- a/src/main/java/com/merge/api/ticketing/RawFieldMappingClient.java +++ b/src/main/java/com/merge/api/ticketing/RawFieldMappingClient.java @@ -58,7 +58,7 @@ public MergeApiHttpResponse fieldMappingsRetrie */ public MergeApiHttpResponse fieldMappingsRetrieve( FieldMappingsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/field-mappings"); if (request.getExcludeRemoteFieldMetadata().isPresent()) { @@ -110,7 +110,7 @@ public MergeApiHttpResponse fieldMappingsCreate(Cr */ public MergeApiHttpResponse fieldMappingsCreate( CreateFieldMappingRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/field-mappings"); if (request.getExcludeRemoteFieldMetadata().isPresent()) { @@ -175,7 +175,7 @@ public MergeApiHttpResponse fieldMappingsDestroy(S */ public MergeApiHttpResponse fieldMappingsDestroy( String fieldMappingId, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/field-mappings") .addPathSegment(fieldMappingId) @@ -230,7 +230,7 @@ public MergeApiHttpResponse fieldMappingsPartialUp */ public MergeApiHttpResponse fieldMappingsPartialUpdate( String fieldMappingId, PatchedEditFieldMappingRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/field-mappings") .addPathSegment(fieldMappingId) @@ -290,7 +290,7 @@ public MergeApiHttpResponse remoteFieldsRetrieve(RemoteF */ public MergeApiHttpResponse remoteFieldsRetrieve( RemoteFieldsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/remote-fields"); if (request.getCommonModels().isPresent()) { @@ -344,7 +344,7 @@ public MergeApiHttpResponse targetFieldsRetrieve * 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. */ public MergeApiHttpResponse targetFieldsRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/target-fields") .build(); diff --git a/src/main/java/com/merge/api/ticketing/RawForceResyncClient.java b/src/main/java/com/merge/api/ticketing/RawForceResyncClient.java index 6ce953c80..04a19e1cb 100644 --- a/src/main/java/com/merge/api/ticketing/RawForceResyncClient.java +++ b/src/main/java/com/merge/api/ticketing/RawForceResyncClient.java @@ -39,7 +39,7 @@ public MergeApiHttpResponse> syncStatusResyncCreate() { * 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. */ public MergeApiHttpResponse> syncStatusResyncCreate(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/sync-status/resync") .build(); diff --git a/src/main/java/com/merge/api/ticketing/RawGenerateKeyClient.java b/src/main/java/com/merge/api/ticketing/RawGenerateKeyClient.java index 9db1d8dda..b264614e2 100644 --- a/src/main/java/com/merge/api/ticketing/RawGenerateKeyClient.java +++ b/src/main/java/com/merge/api/ticketing/RawGenerateKeyClient.java @@ -40,7 +40,7 @@ public MergeApiHttpResponse create(GenerateRemoteKeyRequest request) * Create a remote key. */ public MergeApiHttpResponse create(GenerateRemoteKeyRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/generate-key") .build(); diff --git a/src/main/java/com/merge/api/ticketing/RawIssuesClient.java b/src/main/java/com/merge/api/ticketing/RawIssuesClient.java index 2da83e448..69c2c2907 100644 --- a/src/main/java/com/merge/api/ticketing/RawIssuesClient.java +++ b/src/main/java/com/merge/api/ticketing/RawIssuesClient.java @@ -51,7 +51,7 @@ public MergeApiHttpResponse> list(IssuesListRequest re */ public MergeApiHttpResponse> list( IssuesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/issues"); if (request.getAccountToken().isPresent()) { @@ -175,7 +175,7 @@ public MergeApiHttpResponse retrieve(String id) { * Get a specific issue. */ public MergeApiHttpResponse retrieve(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/issues") .addPathSegment(id) diff --git a/src/main/java/com/merge/api/ticketing/RawLinkTokenClient.java b/src/main/java/com/merge/api/ticketing/RawLinkTokenClient.java index 8f7d7eb05..f6d77aaa0 100644 --- a/src/main/java/com/merge/api/ticketing/RawLinkTokenClient.java +++ b/src/main/java/com/merge/api/ticketing/RawLinkTokenClient.java @@ -40,7 +40,7 @@ public MergeApiHttpResponse create(EndUserDetailsRequest request) { * Creates a link token to be used when linking a new end user. */ public MergeApiHttpResponse create(EndUserDetailsRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/link-token") .build(); diff --git a/src/main/java/com/merge/api/ticketing/RawLinkedAccountsClient.java b/src/main/java/com/merge/api/ticketing/RawLinkedAccountsClient.java index f4a4ccf69..1ed2cb47d 100644 --- a/src/main/java/com/merge/api/ticketing/RawLinkedAccountsClient.java +++ b/src/main/java/com/merge/api/ticketing/RawLinkedAccountsClient.java @@ -51,7 +51,7 @@ public MergeApiHttpResponse> list(L */ public MergeApiHttpResponse> list( LinkedAccountsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/linked-accounts"); if (request.getCategory().isPresent()) { diff --git a/src/main/java/com/merge/api/ticketing/RawPassthroughClient.java b/src/main/java/com/merge/api/ticketing/RawPassthroughClient.java index b43409476..6d58f4933 100644 --- a/src/main/java/com/merge/api/ticketing/RawPassthroughClient.java +++ b/src/main/java/com/merge/api/ticketing/RawPassthroughClient.java @@ -40,7 +40,7 @@ public MergeApiHttpResponse create(DataPassthroughRequest reques * Pull data from an endpoint not currently supported by Merge. */ public MergeApiHttpResponse create(DataPassthroughRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/passthrough") .build(); diff --git a/src/main/java/com/merge/api/ticketing/RawProjectsClient.java b/src/main/java/com/merge/api/ticketing/RawProjectsClient.java index 7d7827d75..886d065ae 100644 --- a/src/main/java/com/merge/api/ticketing/RawProjectsClient.java +++ b/src/main/java/com/merge/api/ticketing/RawProjectsClient.java @@ -55,7 +55,7 @@ public MergeApiHttpResponse> list(ProjectsListReques */ public MergeApiHttpResponse> list( ProjectsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/projects"); if (request.getCreatedAfter().isPresent()) { @@ -168,7 +168,7 @@ public MergeApiHttpResponse retrieve(String id, ProjectsRetrieveRequest */ public MergeApiHttpResponse retrieve( String id, ProjectsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/projects") .addPathSegment(id); @@ -233,7 +233,7 @@ public MergeApiHttpResponse> usersList(String parentId, */ public MergeApiHttpResponse> usersList( String parentId, ProjectsUsersListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/projects") .addPathSegment(parentId) diff --git a/src/main/java/com/merge/api/ticketing/RawRegenerateKeyClient.java b/src/main/java/com/merge/api/ticketing/RawRegenerateKeyClient.java index 3f058b9fd..279abd171 100644 --- a/src/main/java/com/merge/api/ticketing/RawRegenerateKeyClient.java +++ b/src/main/java/com/merge/api/ticketing/RawRegenerateKeyClient.java @@ -41,7 +41,7 @@ public MergeApiHttpResponse create(RemoteKeyForRegenerationRequest re */ public MergeApiHttpResponse create( RemoteKeyForRegenerationRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/regenerate-key") .build(); diff --git a/src/main/java/com/merge/api/ticketing/RawRolesClient.java b/src/main/java/com/merge/api/ticketing/RawRolesClient.java index bb087dec1..4612c1956 100644 --- a/src/main/java/com/merge/api/ticketing/RawRolesClient.java +++ b/src/main/java/com/merge/api/ticketing/RawRolesClient.java @@ -52,7 +52,7 @@ public MergeApiHttpResponse> list(RolesListRequest requ */ public MergeApiHttpResponse> list( RolesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/roles"); if (request.getCreatedAfter().isPresent()) { @@ -164,7 +164,7 @@ public MergeApiHttpResponse retrieve(String id, RolesRetrieveRequest reque * Returns a Role object with the given id. */ public MergeApiHttpResponse retrieve(String id, RolesRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/roles") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/ticketing/RawScopesClient.java b/src/main/java/com/merge/api/ticketing/RawScopesClient.java index 135e2336d..431aa0dcd 100644 --- a/src/main/java/com/merge/api/ticketing/RawScopesClient.java +++ b/src/main/java/com/merge/api/ticketing/RawScopesClient.java @@ -40,7 +40,7 @@ public MergeApiHttpResponse defaultScopesRetrieve() { * Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. Learn more. */ public MergeApiHttpResponse defaultScopesRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/default-scopes") .build(); @@ -84,7 +84,7 @@ public MergeApiHttpResponse linkedAccountScopesRetrieve() { * Get all available permissions for Merge Common Models and fields for a single Linked Account. Learn more. */ public MergeApiHttpResponse linkedAccountScopesRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/linked-account-scopes") .build(); @@ -130,7 +130,7 @@ public MergeApiHttpResponse linkedAccountScopesCreate( */ public MergeApiHttpResponse linkedAccountScopesCreate( LinkedAccountCommonModelScopeDeserializerRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/linked-account-scopes") .build(); diff --git a/src/main/java/com/merge/api/ticketing/RawSyncStatusClient.java b/src/main/java/com/merge/api/ticketing/RawSyncStatusClient.java index b795ac69a..ed07c4438 100644 --- a/src/main/java/com/merge/api/ticketing/RawSyncStatusClient.java +++ b/src/main/java/com/merge/api/ticketing/RawSyncStatusClient.java @@ -51,7 +51,7 @@ public MergeApiHttpResponse> list(SyncStatusListR */ public MergeApiHttpResponse> list( SyncStatusListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/sync-status"); if (request.getCursor().isPresent()) { diff --git a/src/main/java/com/merge/api/ticketing/RawTagsClient.java b/src/main/java/com/merge/api/ticketing/RawTagsClient.java index 71cc8bc07..b8799eaf7 100644 --- a/src/main/java/com/merge/api/ticketing/RawTagsClient.java +++ b/src/main/java/com/merge/api/ticketing/RawTagsClient.java @@ -51,7 +51,7 @@ public MergeApiHttpResponse> list(TagsListRequest reques * Returns a list of Tag objects. */ public MergeApiHttpResponse> list(TagsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/tags"); if (request.getCreatedAfter().isPresent()) { @@ -163,7 +163,7 @@ public MergeApiHttpResponse retrieve(String id, TagsRetrieveRequest request * Returns a Tag object with the given id. */ public MergeApiHttpResponse retrieve(String id, TagsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/tags") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/ticketing/RawTeamsClient.java b/src/main/java/com/merge/api/ticketing/RawTeamsClient.java index b30600033..75354e33a 100644 --- a/src/main/java/com/merge/api/ticketing/RawTeamsClient.java +++ b/src/main/java/com/merge/api/ticketing/RawTeamsClient.java @@ -52,7 +52,7 @@ public MergeApiHttpResponse> list(TeamsListRequest requ */ public MergeApiHttpResponse> list( TeamsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/teams"); if (request.getCreatedAfter().isPresent()) { @@ -164,7 +164,7 @@ public MergeApiHttpResponse retrieve(String id, TeamsRetrieveRequest reque * Returns a Team object with the given id. */ public MergeApiHttpResponse retrieve(String id, TeamsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/teams") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/ticketing/RawTicketsClient.java b/src/main/java/com/merge/api/ticketing/RawTicketsClient.java index 0cef9d893..b08a8fc4d 100644 --- a/src/main/java/com/merge/api/ticketing/RawTicketsClient.java +++ b/src/main/java/com/merge/api/ticketing/RawTicketsClient.java @@ -22,6 +22,7 @@ import com.merge.api.ticketing.types.TicketEndpointRequest; import com.merge.api.ticketing.types.TicketResponse; import com.merge.api.ticketing.types.TicketsListRequest; +import com.merge.api.ticketing.types.TicketsMetaPostRetrieveRequest; import com.merge.api.ticketing.types.TicketsRemoteFieldClassesListRequest; import com.merge.api.ticketing.types.TicketsRetrieveRequest; import com.merge.api.ticketing.types.TicketsViewersListRequest; @@ -66,7 +67,7 @@ public MergeApiHttpResponse> list(TicketsListRequest */ public MergeApiHttpResponse> list( TicketsListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/tickets"); if (request.getAccountId().isPresent()) { @@ -107,6 +108,10 @@ public MergeApiHttpResponse> list( QueryStringMapper.addQueryParameter( httpUrl, "created_before", request.getCreatedBefore().get().toString(), false); } + if (request.getCreatorId().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "creator_id", request.getCreatorId().get(), false); + } if (request.getCursor().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "cursor", request.getCursor().get(), false); @@ -283,7 +288,7 @@ public MergeApiHttpResponse create(TicketEndpointRequest request * Creates a Ticket object with the given values. */ public MergeApiHttpResponse create(TicketEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/tickets"); if (request.getIsDebugMode().isPresent()) { @@ -350,7 +355,7 @@ public MergeApiHttpResponse retrieve(String id, TicketsRetrieveRequest r */ public MergeApiHttpResponse retrieve( String id, TicketsRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/tickets") .addPathSegment(id); @@ -430,7 +435,7 @@ public MergeApiHttpResponse partialUpdate(String id, PatchedTick */ public MergeApiHttpResponse partialUpdate( String id, PatchedTicketEndpointRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/tickets") .addPathSegment(id); @@ -499,7 +504,7 @@ public MergeApiHttpResponse> viewersList( */ public MergeApiHttpResponse> viewersList( String ticketId, TicketsViewersListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/tickets") .addPathSegment(ticketId) @@ -587,7 +592,7 @@ public MergeApiHttpResponse metaPatchRetrieve(String id) { * Returns metadata for Ticket PATCHs. */ public MergeApiHttpResponse metaPatchRetrieve(String id, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/tickets/meta/patch") .addPathSegment(id) @@ -624,24 +629,39 @@ public MergeApiHttpResponse metaPatchRetrieve(String id, RequestOp * Returns metadata for Ticket POSTs. */ public MergeApiHttpResponse metaPostRetrieve() { - return metaPostRetrieve(null); + return metaPostRetrieve(TicketsMetaPostRetrieveRequest.builder().build()); + } + + /** + * Returns metadata for Ticket POSTs. + */ + public MergeApiHttpResponse metaPostRetrieve(TicketsMetaPostRetrieveRequest request) { + return metaPostRetrieve(request, null); } /** * Returns metadata for Ticket POSTs. */ - public MergeApiHttpResponse metaPostRetrieve(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + public MergeApiHttpResponse metaPostRetrieve( + TicketsMetaPostRetrieveRequest request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() - .addPathSegments("ticketing/v1/tickets/meta/post") - .build(); - Request okhttpRequest = new Request.Builder() - .url(httpUrl) + .addPathSegments("ticketing/v1/tickets/meta/post"); + if (request.getCollectionId().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "collection_id", request.getCollectionId().get(), false); + } + if (request.getTicketType().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "ticket_type", request.getTicketType().get(), false); + } + Request.Builder _requestBuilder = new Request.Builder() + .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") - .addHeader("Accept", "application/json") - .build(); + .addHeader("Accept", "application/json"); + Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); @@ -684,7 +704,7 @@ public MergeApiHttpResponse> remoteFieldCla */ public MergeApiHttpResponse> remoteFieldClassesList( TicketsRemoteFieldClassesListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/tickets/remote-field-classes"); if (request.getCursor().isPresent()) { @@ -722,6 +742,10 @@ public MergeApiHttpResponse> remoteFieldCla request.getIsCommonModelField().get().toString(), false); } + if (request.getIsCustom().isPresent()) { + QueryStringMapper.addQueryParameter( + httpUrl, "is_custom", request.getIsCustom().get().toString(), false); + } if (request.getPageSize().isPresent()) { QueryStringMapper.addQueryParameter( httpUrl, "page_size", request.getPageSize().get().toString(), false); diff --git a/src/main/java/com/merge/api/ticketing/RawUsersClient.java b/src/main/java/com/merge/api/ticketing/RawUsersClient.java index c74fdddb9..5c0c7ab64 100644 --- a/src/main/java/com/merge/api/ticketing/RawUsersClient.java +++ b/src/main/java/com/merge/api/ticketing/RawUsersClient.java @@ -52,7 +52,7 @@ public MergeApiHttpResponse> list(UsersListRequest requ */ public MergeApiHttpResponse> list( UsersListRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/users"); if (request.getCreatedAfter().isPresent()) { @@ -176,7 +176,7 @@ public MergeApiHttpResponse retrieve(String id, UsersRetrieveRequest reque * Returns a User object with the given id. */ public MergeApiHttpResponse retrieve(String id, UsersRetrieveRequest request, RequestOptions requestOptions) { - HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/users") .addPathSegment(id); diff --git a/src/main/java/com/merge/api/ticketing/RawWebhookReceiversClient.java b/src/main/java/com/merge/api/ticketing/RawWebhookReceiversClient.java index 3856498d4..17edcf2df 100644 --- a/src/main/java/com/merge/api/ticketing/RawWebhookReceiversClient.java +++ b/src/main/java/com/merge/api/ticketing/RawWebhookReceiversClient.java @@ -42,7 +42,7 @@ public MergeApiHttpResponse> list() { * Returns a list of WebhookReceiver objects. */ public MergeApiHttpResponse> list(RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/webhook-receivers") .build(); @@ -87,7 +87,7 @@ public MergeApiHttpResponse create(WebhookReceiverRequest reque * Creates a WebhookReceiver object with the given values. */ public MergeApiHttpResponse create(WebhookReceiverRequest request, RequestOptions requestOptions) { - HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getApiURL()) + HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() .addPathSegments("ticketing/v1/webhook-receivers") .build(); diff --git a/src/main/java/com/merge/api/ticketing/TicketsClient.java b/src/main/java/com/merge/api/ticketing/TicketsClient.java index a73be89b2..fc1dd8a2a 100644 --- a/src/main/java/com/merge/api/ticketing/TicketsClient.java +++ b/src/main/java/com/merge/api/ticketing/TicketsClient.java @@ -13,6 +13,7 @@ import com.merge.api.ticketing.types.TicketEndpointRequest; import com.merge.api.ticketing.types.TicketResponse; import com.merge.api.ticketing.types.TicketsListRequest; +import com.merge.api.ticketing.types.TicketsMetaPostRetrieveRequest; import com.merge.api.ticketing.types.TicketsRemoteFieldClassesListRequest; import com.merge.api.ticketing.types.TicketsRetrieveRequest; import com.merge.api.ticketing.types.TicketsViewersListRequest; @@ -152,8 +153,15 @@ public MetaResponse metaPostRetrieve() { /** * Returns metadata for Ticket POSTs. */ - public MetaResponse metaPostRetrieve(RequestOptions requestOptions) { - return this.rawClient.metaPostRetrieve(requestOptions).body(); + public MetaResponse metaPostRetrieve(TicketsMetaPostRetrieveRequest request) { + return this.rawClient.metaPostRetrieve(request).body(); + } + + /** + * Returns metadata for Ticket POSTs. + */ + public MetaResponse metaPostRetrieve(TicketsMetaPostRetrieveRequest request, RequestOptions requestOptions) { + return this.rawClient.metaPostRetrieve(request, requestOptions).body(); } /** diff --git a/src/main/java/com/merge/api/ticketing/types/Account.java b/src/main/java/com/merge/api/ticketing/types/Account.java index 6bb4e8343..5f674b203 100644 --- a/src/main/java/com/merge/api/ticketing/types/Account.java +++ b/src/main/java/com/merge/api/ticketing/types/Account.java @@ -224,6 +224,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -235,6 +238,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -246,6 +252,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -257,6 +266,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The account's name.

    + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -268,6 +280,9 @@ public Builder name(String name) { return this; } + /** + *

    The account's domain names.

    + */ @JsonSetter(value = "domains", nulls = Nulls.SKIP) public Builder domains(Optional>> domains) { this.domains = domains; @@ -279,6 +294,9 @@ public Builder domains(List> domains) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/ticketing/types/AccountDetails.java b/src/main/java/com/merge/api/ticketing/types/AccountDetails.java index c86168303..1315becd0 100644 --- a/src/main/java/com/merge/api/ticketing/types/AccountDetails.java +++ b/src/main/java/com/merge/api/ticketing/types/AccountDetails.java @@ -27,7 +27,7 @@ public final class AccountDetails { private final Optional integrationSlug; - private final Optional category; + private final Optional category; private final Optional endUserOriginId; @@ -51,7 +51,7 @@ private AccountDetails( Optional id, Optional integration, Optional integrationSlug, - Optional category, + Optional category, Optional endUserOriginId, Optional endUserOrganizationName, Optional endUserEmailAddress, @@ -92,7 +92,7 @@ public Optional getIntegrationSlug() { } @JsonProperty("category") - public Optional getCategory() { + public Optional getCategory() { return category; } @@ -202,7 +202,7 @@ public static final class Builder { private Optional integrationSlug = Optional.empty(); - private Optional category = Optional.empty(); + private Optional category = Optional.empty(); private Optional endUserOriginId = Optional.empty(); @@ -275,12 +275,12 @@ public Builder integrationSlug(String integrationSlug) { } @JsonSetter(value = "category", nulls = Nulls.SKIP) - public Builder category(Optional category) { + public Builder category(Optional category) { this.category = category; return this; } - public Builder category(CategoryEnum category) { + public Builder category(AccountDetailsCategory category) { this.category = Optional.ofNullable(category); return this; } @@ -340,6 +340,9 @@ public Builder webhookListenerUrl(String webhookListenerUrl) { return this; } + /** + *

    Whether a Production Linked Account's credentials match another existing Production Linked Account. This field is null for Test Linked Accounts, incomplete Production Linked Accounts, and ignored duplicate Production Linked Account sets.

    + */ @JsonSetter(value = "is_duplicate", nulls = Nulls.SKIP) public Builder isDuplicate(Optional isDuplicate) { this.isDuplicate = isDuplicate; @@ -362,6 +365,9 @@ public Builder accountType(String accountType) { return this; } + /** + *

    The time at which account completes the linking flow.

    + */ @JsonSetter(value = "completed_at", nulls = Nulls.SKIP) public Builder completedAt(Optional completedAt) { this.completedAt = completedAt; diff --git a/src/main/java/com/merge/api/ticketing/types/AccountDetailsAndActions.java b/src/main/java/com/merge/api/ticketing/types/AccountDetailsAndActions.java index 55d24c730..a1518e038 100644 --- a/src/main/java/com/merge/api/ticketing/types/AccountDetailsAndActions.java +++ b/src/main/java/com/merge/api/ticketing/types/AccountDetailsAndActions.java @@ -24,9 +24,9 @@ public final class AccountDetailsAndActions { private final String id; - private final Optional category; + private final Optional category; - private final AccountDetailsAndActionsStatusEnum status; + private final AccountDetailsAndActionsStatus status; private final Optional statusDetail; @@ -52,8 +52,8 @@ public final class AccountDetailsAndActions { private AccountDetailsAndActions( String id, - Optional category, - AccountDetailsAndActionsStatusEnum status, + Optional category, + AccountDetailsAndActionsStatus status, Optional statusDetail, Optional endUserOriginId, String endUserOrganizationName, @@ -87,12 +87,12 @@ public String getId() { } @JsonProperty("category") - public Optional getCategory() { + public Optional getCategory() { return category; } @JsonProperty("status") - public AccountDetailsAndActionsStatusEnum getStatus() { + public AccountDetailsAndActionsStatus getStatus() { return status; } @@ -213,7 +213,7 @@ public interface IdStage { } public interface StatusStage { - EndUserOrganizationNameStage status(@NotNull AccountDetailsAndActionsStatusEnum status); + EndUserOrganizationNameStage status(@NotNull AccountDetailsAndActionsStatus status); } public interface EndUserOrganizationNameStage { @@ -239,9 +239,9 @@ public interface CompletedAtStage { public interface _FinalStage { AccountDetailsAndActions build(); - _FinalStage category(Optional category); + _FinalStage category(Optional category); - _FinalStage category(CategoryEnum category); + _FinalStage category(AccountDetailsAndActionsCategory category); _FinalStage statusDetail(Optional statusDetail); @@ -251,10 +251,16 @@ public interface _FinalStage { _FinalStage endUserOriginId(String endUserOriginId); + /** + *

    The tenant or domain the customer has provided access to.

    + */ _FinalStage subdomain(Optional subdomain); _FinalStage subdomain(String subdomain); + /** + *

    Whether a Production Linked Account's credentials match another existing Production Linked Account. This field is null for Test Linked Accounts, incomplete Production Linked Accounts, and ignored duplicate Production Linked Account sets.

    + */ _FinalStage isDuplicate(Optional isDuplicate); _FinalStage isDuplicate(Boolean isDuplicate); @@ -276,7 +282,7 @@ public static final class Builder _FinalStage { private String id; - private AccountDetailsAndActionsStatusEnum status; + private AccountDetailsAndActionsStatus status; private String endUserOrganizationName; @@ -298,7 +304,7 @@ public static final class Builder private Optional statusDetail = Optional.empty(); - private Optional category = Optional.empty(); + private Optional category = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -332,7 +338,7 @@ public StatusStage id(@NotNull String id) { @java.lang.Override @JsonSetter("status") - public EndUserOrganizationNameStage status(@NotNull AccountDetailsAndActionsStatusEnum status) { + public EndUserOrganizationNameStage status(@NotNull AccountDetailsAndActionsStatus status) { this.status = status; return this; } @@ -395,6 +401,9 @@ public _FinalStage isDuplicate(Boolean isDuplicate) { return this; } + /** + *

    Whether a Production Linked Account's credentials match another existing Production Linked Account. This field is null for Test Linked Accounts, incomplete Production Linked Accounts, and ignored duplicate Production Linked Account sets.

    + */ @java.lang.Override @JsonSetter(value = "is_duplicate", nulls = Nulls.SKIP) public _FinalStage isDuplicate(Optional isDuplicate) { @@ -412,6 +421,9 @@ public _FinalStage subdomain(String subdomain) { return this; } + /** + *

    The tenant or domain the customer has provided access to.

    + */ @java.lang.Override @JsonSetter(value = "subdomain", nulls = Nulls.SKIP) public _FinalStage subdomain(Optional subdomain) { @@ -446,14 +458,14 @@ public _FinalStage statusDetail(Optional statusDetail) { } @java.lang.Override - public _FinalStage category(CategoryEnum category) { + public _FinalStage category(AccountDetailsAndActionsCategory category) { this.category = Optional.ofNullable(category); return this; } @java.lang.Override @JsonSetter(value = "category", nulls = Nulls.SKIP) - public _FinalStage category(Optional category) { + public _FinalStage category(Optional category) { this.category = category; return this; } diff --git a/src/main/java/com/merge/api/ticketing/types/AccountDetailsAndActionsCategory.java b/src/main/java/com/merge/api/ticketing/types/AccountDetailsAndActionsCategory.java new file mode 100644 index 000000000..1900d1ed3 --- /dev/null +++ b/src/main/java/com/merge/api/ticketing/types/AccountDetailsAndActionsCategory.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ticketing.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = AccountDetailsAndActionsCategory.Deserializer.class) +public final class AccountDetailsAndActionsCategory { + private final Object value; + + private final int type; + + private AccountDetailsAndActionsCategory(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((CategoryEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AccountDetailsAndActionsCategory && equalTo((AccountDetailsAndActionsCategory) other); + } + + private boolean equalTo(AccountDetailsAndActionsCategory other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static AccountDetailsAndActionsCategory of(CategoryEnum value) { + return new AccountDetailsAndActionsCategory(value, 0); + } + + public static AccountDetailsAndActionsCategory of(String value) { + return new AccountDetailsAndActionsCategory(value, 1); + } + + public interface Visitor { + T visit(CategoryEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(AccountDetailsAndActionsCategory.class); + } + + @java.lang.Override + public AccountDetailsAndActionsCategory deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, CategoryEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ticketing/types/AccountDetailsAndActionsStatus.java b/src/main/java/com/merge/api/ticketing/types/AccountDetailsAndActionsStatus.java new file mode 100644 index 000000000..852c08af3 --- /dev/null +++ b/src/main/java/com/merge/api/ticketing/types/AccountDetailsAndActionsStatus.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ticketing.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = AccountDetailsAndActionsStatus.Deserializer.class) +public final class AccountDetailsAndActionsStatus { + private final Object value; + + private final int type; + + private AccountDetailsAndActionsStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((AccountDetailsAndActionsStatusEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AccountDetailsAndActionsStatus && equalTo((AccountDetailsAndActionsStatus) other); + } + + private boolean equalTo(AccountDetailsAndActionsStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static AccountDetailsAndActionsStatus of(AccountDetailsAndActionsStatusEnum value) { + return new AccountDetailsAndActionsStatus(value, 0); + } + + public static AccountDetailsAndActionsStatus of(String value) { + return new AccountDetailsAndActionsStatus(value, 1); + } + + public interface Visitor { + T visit(AccountDetailsAndActionsStatusEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(AccountDetailsAndActionsStatus.class); + } + + @java.lang.Override + public AccountDetailsAndActionsStatus deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, AccountDetailsAndActionsStatusEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ticketing/types/AccountDetailsCategory.java b/src/main/java/com/merge/api/ticketing/types/AccountDetailsCategory.java new file mode 100644 index 000000000..a70a8e086 --- /dev/null +++ b/src/main/java/com/merge/api/ticketing/types/AccountDetailsCategory.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ticketing.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = AccountDetailsCategory.Deserializer.class) +public final class AccountDetailsCategory { + private final Object value; + + private final int type; + + private AccountDetailsCategory(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((CategoryEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AccountDetailsCategory && equalTo((AccountDetailsCategory) other); + } + + private boolean equalTo(AccountDetailsCategory other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static AccountDetailsCategory of(CategoryEnum value) { + return new AccountDetailsCategory(value, 0); + } + + public static AccountDetailsCategory of(String value) { + return new AccountDetailsCategory(value, 1); + } + + public interface Visitor { + T visit(CategoryEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(AccountDetailsCategory.class); + } + + @java.lang.Override + public AccountDetailsCategory deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, CategoryEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ticketing/types/AccountIntegration.java b/src/main/java/com/merge/api/ticketing/types/AccountIntegration.java index fcac5ceac..101d1f76a 100644 --- a/src/main/java/com/merge/api/ticketing/types/AccountIntegration.java +++ b/src/main/java/com/merge/api/ticketing/types/AccountIntegration.java @@ -196,6 +196,9 @@ public static NameStage builder() { } public interface NameStage { + /** + * Company name. + */ _FinalStage name(@NotNull String name); Builder from(AccountIntegration other); @@ -204,22 +207,37 @@ public interface NameStage { public interface _FinalStage { AccountIntegration build(); + /** + *

    Optional. This shortened name appears in places with limited space, usually in conjunction with the platform's logo (e.g., Merge Link menu).<br><br>Example: <i>Workforce Now (in lieu of ADP Workforce Now), SuccessFactors (in lieu of SAP SuccessFactors)</i>

    + */ _FinalStage abbreviatedName(Optional abbreviatedName); _FinalStage abbreviatedName(String abbreviatedName); + /** + *

    Category or categories this integration belongs to. Multiple categories should be comma separated, i.e. [ats, hris].

    + */ _FinalStage categories(Optional> categories); _FinalStage categories(List categories); + /** + *

    Company logo in rectangular shape.

    + */ _FinalStage image(Optional image); _FinalStage image(String image); + /** + *

    Company logo in square shape.

    + */ _FinalStage squareImage(Optional squareImage); _FinalStage squareImage(String squareImage); + /** + *

    The color of this integration used for buttons and text throughout the app and landing pages. <b>Choose a darker, saturated color.</b>

    + */ _FinalStage color(Optional color); _FinalStage color(String color); @@ -228,14 +246,23 @@ public interface _FinalStage { _FinalStage slug(String slug); + /** + *

    Mapping of API endpoints to documentation urls for support. Example: {'GET': [['/common-model-scopes', 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], 'POST': []}

    + */ _FinalStage apiEndpointsToDocumentationUrls(Optional> apiEndpointsToDocumentationUrls); _FinalStage apiEndpointsToDocumentationUrls(Map apiEndpointsToDocumentationUrls); + /** + *

    Setup guide URL for third party webhook creation. Exposed in Merge Docs.

    + */ _FinalStage webhookSetupGuideUrl(Optional webhookSetupGuideUrl); _FinalStage webhookSetupGuideUrl(String webhookSetupGuideUrl); + /** + *

    Category or categories this integration is in beta status for.

    + */ _FinalStage categoryBetaStatus(Optional> categoryBetaStatus); _FinalStage categoryBetaStatus(Map categoryBetaStatus); @@ -284,7 +311,7 @@ public Builder from(AccountIntegration other) { } /** - *

    Company name.

    + * Company name.

    Company name.

    * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -304,6 +331,9 @@ public _FinalStage categoryBetaStatus(Map categoryBetaStatus) return this; } + /** + *

    Category or categories this integration is in beta status for.

    + */ @java.lang.Override @JsonSetter(value = "category_beta_status", nulls = Nulls.SKIP) public _FinalStage categoryBetaStatus(Optional> categoryBetaStatus) { @@ -321,6 +351,9 @@ public _FinalStage webhookSetupGuideUrl(String webhookSetupGuideUrl) { return this; } + /** + *

    Setup guide URL for third party webhook creation. Exposed in Merge Docs.

    + */ @java.lang.Override @JsonSetter(value = "webhook_setup_guide_url", nulls = Nulls.SKIP) public _FinalStage webhookSetupGuideUrl(Optional webhookSetupGuideUrl) { @@ -338,6 +371,9 @@ public _FinalStage apiEndpointsToDocumentationUrls(Map apiEndp return this; } + /** + *

    Mapping of API endpoints to documentation urls for support. Example: {'GET': [['/common-model-scopes', 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], 'POST': []}

    + */ @java.lang.Override @JsonSetter(value = "api_endpoints_to_documentation_urls", nulls = Nulls.SKIP) public _FinalStage apiEndpointsToDocumentationUrls( @@ -369,6 +405,9 @@ public _FinalStage color(String color) { return this; } + /** + *

    The color of this integration used for buttons and text throughout the app and landing pages. <b>Choose a darker, saturated color.</b>

    + */ @java.lang.Override @JsonSetter(value = "color", nulls = Nulls.SKIP) public _FinalStage color(Optional color) { @@ -386,6 +425,9 @@ public _FinalStage squareImage(String squareImage) { return this; } + /** + *

    Company logo in square shape.

    + */ @java.lang.Override @JsonSetter(value = "square_image", nulls = Nulls.SKIP) public _FinalStage squareImage(Optional squareImage) { @@ -403,6 +445,9 @@ public _FinalStage image(String image) { return this; } + /** + *

    Company logo in rectangular shape.

    + */ @java.lang.Override @JsonSetter(value = "image", nulls = Nulls.SKIP) public _FinalStage image(Optional image) { @@ -420,6 +465,9 @@ public _FinalStage categories(List categories) { return this; } + /** + *

    Category or categories this integration belongs to. Multiple categories should be comma separated, i.e. [ats, hris].

    + */ @java.lang.Override @JsonSetter(value = "categories", nulls = Nulls.SKIP) public _FinalStage categories(Optional> categories) { @@ -437,6 +485,9 @@ public _FinalStage abbreviatedName(String abbreviatedName) { return this; } + /** + *

    Optional. This shortened name appears in places with limited space, usually in conjunction with the platform's logo (e.g., Merge Link menu).<br><br>Example: <i>Workforce Now (in lieu of ADP Workforce Now), SuccessFactors (in lieu of SAP SuccessFactors)</i>

    + */ @java.lang.Override @JsonSetter(value = "abbreviated_name", nulls = Nulls.SKIP) public _FinalStage abbreviatedName(Optional abbreviatedName) { diff --git a/src/main/java/com/merge/api/ticketing/types/AccountsListRequest.java b/src/main/java/com/merge/api/ticketing/types/AccountsListRequest.java index 71ad8ba95..078bba608 100644 --- a/src/main/java/com/merge/api/ticketing/types/AccountsListRequest.java +++ b/src/main/java/com/merge/api/ticketing/types/AccountsListRequest.java @@ -237,6 +237,9 @@ public Builder from(AccountsListRequest other) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -248,6 +251,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -259,6 +265,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -270,6 +279,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -281,6 +293,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -292,6 +307,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -303,6 +321,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -314,6 +335,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -325,6 +349,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -336,6 +363,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; diff --git a/src/main/java/com/merge/api/ticketing/types/AccountsRetrieveRequest.java b/src/main/java/com/merge/api/ticketing/types/AccountsRetrieveRequest.java index f56039274..963444791 100644 --- a/src/main/java/com/merge/api/ticketing/types/AccountsRetrieveRequest.java +++ b/src/main/java/com/merge/api/ticketing/types/AccountsRetrieveRequest.java @@ -97,6 +97,9 @@ public Builder from(AccountsRetrieveRequest other) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -108,6 +111,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/ticketing/types/Attachment.java b/src/main/java/com/merge/api/ticketing/types/Attachment.java index eea8438b8..af88c8808 100644 --- a/src/main/java/com/merge/api/ticketing/types/Attachment.java +++ b/src/main/java/com/merge/api/ticketing/types/Attachment.java @@ -292,6 +292,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -303,6 +306,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -314,6 +320,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -325,6 +334,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The attachment's name. It is required to include the file extension in the attachment's name.

    + */ @JsonSetter(value = "file_name", nulls = Nulls.SKIP) public Builder fileName(Optional fileName) { this.fileName = fileName; @@ -336,6 +348,9 @@ public Builder fileName(String fileName) { return this; } + /** + *

    The ticket associated with the attachment.

    + */ @JsonSetter(value = "ticket", nulls = Nulls.SKIP) public Builder ticket(Optional ticket) { this.ticket = ticket; @@ -347,6 +362,9 @@ public Builder ticket(AttachmentTicket ticket) { return this; } + /** + *

    The attachment's url. It is required to include the file extension in the file's URL.

    + */ @JsonSetter(value = "file_url", nulls = Nulls.SKIP) public Builder fileUrl(Optional fileUrl) { this.fileUrl = fileUrl; @@ -358,6 +376,9 @@ public Builder fileUrl(String fileUrl) { return this; } + /** + *

    The attachment's file format.

    + */ @JsonSetter(value = "content_type", nulls = Nulls.SKIP) public Builder contentType(Optional contentType) { this.contentType = contentType; @@ -369,6 +390,9 @@ public Builder contentType(String contentType) { return this; } + /** + *

    The user who uploaded the attachment.

    + */ @JsonSetter(value = "uploaded_by", nulls = Nulls.SKIP) public Builder uploadedBy(Optional uploadedBy) { this.uploadedBy = uploadedBy; @@ -380,6 +404,9 @@ public Builder uploadedBy(String uploadedBy) { return this; } + /** + *

    When the third party's attachment was created.

    + */ @JsonSetter(value = "remote_created_at", nulls = Nulls.SKIP) public Builder remoteCreatedAt(Optional remoteCreatedAt) { this.remoteCreatedAt = remoteCreatedAt; @@ -391,6 +418,9 @@ public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/ticketing/types/AttachmentRequest.java b/src/main/java/com/merge/api/ticketing/types/AttachmentRequest.java index b01a4a9d4..ed3c73e95 100644 --- a/src/main/java/com/merge/api/ticketing/types/AttachmentRequest.java +++ b/src/main/java/com/merge/api/ticketing/types/AttachmentRequest.java @@ -180,6 +180,9 @@ public Builder from(AttachmentRequest other) { return this; } + /** + *

    The attachment's name. It is required to include the file extension in the attachment's name.

    + */ @JsonSetter(value = "file_name", nulls = Nulls.SKIP) public Builder fileName(Optional fileName) { this.fileName = fileName; @@ -191,6 +194,9 @@ public Builder fileName(String fileName) { return this; } + /** + *

    The ticket associated with the attachment.

    + */ @JsonSetter(value = "ticket", nulls = Nulls.SKIP) public Builder ticket(Optional ticket) { this.ticket = ticket; @@ -202,6 +208,9 @@ public Builder ticket(AttachmentRequestTicket ticket) { return this; } + /** + *

    The attachment's url. It is required to include the file extension in the file's URL.

    + */ @JsonSetter(value = "file_url", nulls = Nulls.SKIP) public Builder fileUrl(Optional fileUrl) { this.fileUrl = fileUrl; @@ -213,6 +222,9 @@ public Builder fileUrl(String fileUrl) { return this; } + /** + *

    The attachment's file format.

    + */ @JsonSetter(value = "content_type", nulls = Nulls.SKIP) public Builder contentType(Optional contentType) { this.contentType = contentType; @@ -224,6 +236,9 @@ public Builder contentType(String contentType) { return this; } + /** + *

    The user who uploaded the attachment.

    + */ @JsonSetter(value = "uploaded_by", nulls = Nulls.SKIP) public Builder uploadedBy(Optional uploadedBy) { this.uploadedBy = uploadedBy; diff --git a/src/main/java/com/merge/api/ticketing/types/AttachmentsDownloadRetrieveRequest.java b/src/main/java/com/merge/api/ticketing/types/AttachmentsDownloadRetrieveRequest.java index 772920ca5..da95609f1 100644 --- a/src/main/java/com/merge/api/ticketing/types/AttachmentsDownloadRetrieveRequest.java +++ b/src/main/java/com/merge/api/ticketing/types/AttachmentsDownloadRetrieveRequest.java @@ -96,6 +96,9 @@ public Builder from(AttachmentsDownloadRetrieveRequest other) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -107,6 +110,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, specifies the export format of the file to be downloaded. For information on supported export formats, please refer to our <a href='https://help.merge.dev/en/articles/8615316-file-export-and-download-specification' target='_blank'>export format help center article</a>.

    + */ @JsonSetter(value = "mime_type", nulls = Nulls.SKIP) public Builder mimeType(Optional mimeType) { this.mimeType = mimeType; diff --git a/src/main/java/com/merge/api/ticketing/types/AttachmentsListRequest.java b/src/main/java/com/merge/api/ticketing/types/AttachmentsListRequest.java index 9cbacb007..7ae7453c2 100644 --- a/src/main/java/com/merge/api/ticketing/types/AttachmentsListRequest.java +++ b/src/main/java/com/merge/api/ticketing/types/AttachmentsListRequest.java @@ -290,6 +290,9 @@ public Builder from(AttachmentsListRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -306,6 +309,9 @@ public Builder expand(String expand) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -317,6 +323,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -328,6 +337,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -339,6 +351,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -350,6 +365,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -361,6 +379,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -372,6 +393,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -383,6 +407,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -394,6 +421,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -405,6 +435,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    If provided, will only return attachments created in the third party platform after this datetime.

    + */ @JsonSetter(value = "remote_created_after", nulls = Nulls.SKIP) public Builder remoteCreatedAfter(Optional remoteCreatedAfter) { this.remoteCreatedAfter = remoteCreatedAfter; @@ -416,6 +449,9 @@ public Builder remoteCreatedAfter(OffsetDateTime remoteCreatedAfter) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -427,6 +463,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    If provided, will only return comments for this ticket.

    + */ @JsonSetter(value = "ticket_id", nulls = Nulls.SKIP) public Builder ticketId(Optional ticketId) { this.ticketId = ticketId; diff --git a/src/main/java/com/merge/api/ticketing/types/AttachmentsRetrieveRequest.java b/src/main/java/com/merge/api/ticketing/types/AttachmentsRetrieveRequest.java index 9388765b5..cfa266f51 100644 --- a/src/main/java/com/merge/api/ticketing/types/AttachmentsRetrieveRequest.java +++ b/src/main/java/com/merge/api/ticketing/types/AttachmentsRetrieveRequest.java @@ -116,6 +116,9 @@ public Builder from(AttachmentsRetrieveRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -132,6 +135,9 @@ public Builder expand(String expand) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -143,6 +149,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/ticketing/types/AuditLogEvent.java b/src/main/java/com/merge/api/ticketing/types/AuditLogEvent.java index 3a02d03d8..bb4b137b8 100644 --- a/src/main/java/com/merge/api/ticketing/types/AuditLogEvent.java +++ b/src/main/java/com/merge/api/ticketing/types/AuditLogEvent.java @@ -28,11 +28,11 @@ public final class AuditLogEvent { private final Optional userEmail; - private final RoleEnum role; + private final AuditLogEventRole role; private final String ipAddress; - private final EventTypeEnum eventType; + private final AuditLogEventEventType eventType; private final String eventDescription; @@ -44,9 +44,9 @@ private AuditLogEvent( Optional id, Optional userName, Optional userEmail, - RoleEnum role, + AuditLogEventRole role, String ipAddress, - EventTypeEnum eventType, + AuditLogEventEventType eventType, String eventDescription, Optional createdAt, Map additionalProperties) { @@ -94,7 +94,7 @@ public Optional getUserEmail() { * */ @JsonProperty("role") - public RoleEnum getRole() { + public AuditLogEventRole getRole() { return role; } @@ -111,6 +111,7 @@ public String getIpAddress() { *
  • CREATED_TEST_API_KEY - CREATED_TEST_API_KEY
  • *
  • DELETED_TEST_API_KEY - DELETED_TEST_API_KEY
  • *
  • REGENERATED_PRODUCTION_API_KEY - REGENERATED_PRODUCTION_API_KEY
  • + *
  • REGENERATED_WEBHOOK_SIGNATURE - REGENERATED_WEBHOOK_SIGNATURE
  • *
  • INVITED_USER - INVITED_USER
  • *
  • TWO_FACTOR_AUTH_ENABLED - TWO_FACTOR_AUTH_ENABLED
  • *
  • TWO_FACTOR_AUTH_DISABLED - TWO_FACTOR_AUTH_DISABLED
  • @@ -151,7 +152,7 @@ public String getIpAddress() { * */ @JsonProperty("event_type") - public EventTypeEnum getEventType() { + public AuditLogEventEventType getEventType() { return eventType; } @@ -210,7 +211,17 @@ public static RoleStage builder() { } public interface RoleStage { - IpAddressStage role(@NotNull RoleEnum role); + /** + * Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. + * + * * `ADMIN` - ADMIN + * * `DEVELOPER` - DEVELOPER + * * `MEMBER` - MEMBER + * * `API` - API + * * `SYSTEM` - SYSTEM + * * `MERGE_TEAM` - MERGE_TEAM + */ + IpAddressStage role(@NotNull AuditLogEventRole role); Builder from(AuditLogEvent other); } @@ -220,7 +231,54 @@ public interface IpAddressStage { } public interface EventTypeStage { - EventDescriptionStage eventType(@NotNull EventTypeEnum eventType); + /** + * Designates the type of event that occurred. + * + * * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + * * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + * * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + * * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + * * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + * * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + * * `INVITED_USER` - INVITED_USER + * * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + * * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + * * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + * * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + * * `CREATED_DESTINATION` - CREATED_DESTINATION + * * `DELETED_DESTINATION` - DELETED_DESTINATION + * * `CHANGED_DESTINATION` - CHANGED_DESTINATION + * * `CHANGED_SCOPES` - CHANGED_SCOPES + * * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + * * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + * * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + * * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + * * `ENABLED_CATEGORY` - ENABLED_CATEGORY + * * `DISABLED_CATEGORY` - DISABLED_CATEGORY + * * `CHANGED_PASSWORD` - CHANGED_PASSWORD + * * `RESET_PASSWORD` - RESET_PASSWORD + * * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING + * * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING + * * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + * * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + * * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING + * * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING + * * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + * * `MUTED_ISSUE` - MUTED_ISSUE + * * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + * * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + * * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + * * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + * * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + */ + EventDescriptionStage eventType(@NotNull AuditLogEventEventType eventType); } public interface EventDescriptionStage { @@ -234,10 +292,16 @@ public interface _FinalStage { _FinalStage id(String id); + /** + *

    The User's full name at the time of this Event occurring.

    + */ _FinalStage userName(Optional userName); _FinalStage userName(String userName); + /** + *

    The User's email at the time of this Event occurring.

    + */ _FinalStage userEmail(Optional userEmail); _FinalStage userEmail(String userEmail); @@ -250,11 +314,11 @@ public interface _FinalStage { @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements RoleStage, IpAddressStage, EventTypeStage, EventDescriptionStage, _FinalStage { - private RoleEnum role; + private AuditLogEventRole role; private String ipAddress; - private EventTypeEnum eventType; + private AuditLogEventEventType eventType; private String eventDescription; @@ -285,7 +349,14 @@ public Builder from(AuditLogEvent other) { } /** - *

    Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring.

    + * Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. + * + * * `ADMIN` - ADMIN + * * `DEVELOPER` - DEVELOPER + * * `MEMBER` - MEMBER + * * `API` - API + * * `SYSTEM` - SYSTEM + * * `MERGE_TEAM` - MERGE_TEAM

    Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring.

    *
      *
    • ADMIN - ADMIN
    • *
    • DEVELOPER - DEVELOPER
    • @@ -298,7 +369,7 @@ public Builder from(AuditLogEvent other) { */ @java.lang.Override @JsonSetter("role") - public IpAddressStage role(@NotNull RoleEnum role) { + public IpAddressStage role(@NotNull AuditLogEventRole role) { this.role = role; return this; } @@ -311,13 +382,58 @@ public EventTypeStage ipAddress(@NotNull String ipAddress) { } /** - *

      Designates the type of event that occurred.

      + * Designates the type of event that occurred. + * + * * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + * * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + * * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + * * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + * * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + * * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + * * `INVITED_USER` - INVITED_USER + * * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + * * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + * * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + * * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + * * `CREATED_DESTINATION` - CREATED_DESTINATION + * * `DELETED_DESTINATION` - DELETED_DESTINATION + * * `CHANGED_DESTINATION` - CHANGED_DESTINATION + * * `CHANGED_SCOPES` - CHANGED_SCOPES + * * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + * * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + * * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + * * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + * * `ENABLED_CATEGORY` - ENABLED_CATEGORY + * * `DISABLED_CATEGORY` - DISABLED_CATEGORY + * * `CHANGED_PASSWORD` - CHANGED_PASSWORD + * * `RESET_PASSWORD` - RESET_PASSWORD + * * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING + * * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING + * * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + * * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + * * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING + * * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING + * * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + * * `MUTED_ISSUE` - MUTED_ISSUE + * * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + * * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + * * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + * * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + * * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED

      Designates the type of event that occurred.

      *
        *
      • CREATED_REMOTE_PRODUCTION_API_KEY - CREATED_REMOTE_PRODUCTION_API_KEY
      • *
      • DELETED_REMOTE_PRODUCTION_API_KEY - DELETED_REMOTE_PRODUCTION_API_KEY
      • *
      • CREATED_TEST_API_KEY - CREATED_TEST_API_KEY
      • *
      • DELETED_TEST_API_KEY - DELETED_TEST_API_KEY
      • *
      • REGENERATED_PRODUCTION_API_KEY - REGENERATED_PRODUCTION_API_KEY
      • + *
      • REGENERATED_WEBHOOK_SIGNATURE - REGENERATED_WEBHOOK_SIGNATURE
      • *
      • INVITED_USER - INVITED_USER
      • *
      • TWO_FACTOR_AUTH_ENABLED - TWO_FACTOR_AUTH_ENABLED
      • *
      • TWO_FACTOR_AUTH_DISABLED - TWO_FACTOR_AUTH_DISABLED
      • @@ -360,7 +476,7 @@ public EventTypeStage ipAddress(@NotNull String ipAddress) { */ @java.lang.Override @JsonSetter("event_type") - public EventDescriptionStage eventType(@NotNull EventTypeEnum eventType) { + public EventDescriptionStage eventType(@NotNull AuditLogEventEventType eventType) { this.eventType = eventType; return this; } @@ -395,6 +511,9 @@ public _FinalStage userEmail(String userEmail) { return this; } + /** + *

        The User's email at the time of this Event occurring.

        + */ @java.lang.Override @JsonSetter(value = "user_email", nulls = Nulls.SKIP) public _FinalStage userEmail(Optional userEmail) { @@ -412,6 +531,9 @@ public _FinalStage userName(String userName) { return this; } + /** + *

        The User's full name at the time of this Event occurring.

        + */ @java.lang.Override @JsonSetter(value = "user_name", nulls = Nulls.SKIP) public _FinalStage userName(Optional userName) { diff --git a/src/main/java/com/merge/api/ticketing/types/AuditLogEventEventType.java b/src/main/java/com/merge/api/ticketing/types/AuditLogEventEventType.java new file mode 100644 index 000000000..3fdbe0b00 --- /dev/null +++ b/src/main/java/com/merge/api/ticketing/types/AuditLogEventEventType.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ticketing.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = AuditLogEventEventType.Deserializer.class) +public final class AuditLogEventEventType { + private final Object value; + + private final int type; + + private AuditLogEventEventType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EventTypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AuditLogEventEventType && equalTo((AuditLogEventEventType) other); + } + + private boolean equalTo(AuditLogEventEventType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static AuditLogEventEventType of(EventTypeEnum value) { + return new AuditLogEventEventType(value, 0); + } + + public static AuditLogEventEventType of(String value) { + return new AuditLogEventEventType(value, 1); + } + + public interface Visitor { + T visit(EventTypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(AuditLogEventEventType.class); + } + + @java.lang.Override + public AuditLogEventEventType deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, EventTypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ticketing/types/AuditLogEventRole.java b/src/main/java/com/merge/api/ticketing/types/AuditLogEventRole.java new file mode 100644 index 000000000..5f535a0d7 --- /dev/null +++ b/src/main/java/com/merge/api/ticketing/types/AuditLogEventRole.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ticketing.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = AuditLogEventRole.Deserializer.class) +public final class AuditLogEventRole { + private final Object value; + + private final int type; + + private AuditLogEventRole(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((RoleEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof AuditLogEventRole && equalTo((AuditLogEventRole) other); + } + + private boolean equalTo(AuditLogEventRole other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static AuditLogEventRole of(RoleEnum value) { + return new AuditLogEventRole(value, 0); + } + + public static AuditLogEventRole of(String value) { + return new AuditLogEventRole(value, 1); + } + + public interface Visitor { + T visit(RoleEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(AuditLogEventRole.class); + } + + @java.lang.Override + public AuditLogEventRole deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, RoleEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ticketing/types/AuditTrailListRequest.java b/src/main/java/com/merge/api/ticketing/types/AuditTrailListRequest.java index 3795fa8c2..3ac99adf4 100644 --- a/src/main/java/com/merge/api/ticketing/types/AuditTrailListRequest.java +++ b/src/main/java/com/merge/api/ticketing/types/AuditTrailListRequest.java @@ -68,7 +68,7 @@ public Optional getEndDate() { } /** - * @return If included, will only include events with the given event type. Possible values include: CREATED_REMOTE_PRODUCTION_API_KEY, DELETED_REMOTE_PRODUCTION_API_KEY, CREATED_TEST_API_KEY, DELETED_TEST_API_KEY, REGENERATED_PRODUCTION_API_KEY, INVITED_USER, TWO_FACTOR_AUTH_ENABLED, TWO_FACTOR_AUTH_DISABLED, DELETED_LINKED_ACCOUNT, 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 + * @return 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 */ @JsonProperty("event_type") public Optional getEventType() { @@ -162,6 +162,9 @@ public Builder from(AuditTrailListRequest other) { return this; } + /** + *

        The pagination cursor value.

        + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -173,6 +176,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

        If included, will only include audit trail events that occurred before this time

        + */ @JsonSetter(value = "end_date", nulls = Nulls.SKIP) public Builder endDate(Optional endDate) { this.endDate = endDate; @@ -184,6 +190,9 @@ public Builder endDate(String endDate) { return this; } + /** + *

        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

        + */ @JsonSetter(value = "event_type", nulls = Nulls.SKIP) public Builder eventType(Optional eventType) { this.eventType = eventType; @@ -195,6 +204,9 @@ public Builder eventType(String eventType) { return this; } + /** + *

        Number of results to return per page.

        + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -206,6 +218,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

        If included, will only include audit trail events that occurred after this time

        + */ @JsonSetter(value = "start_date", nulls = Nulls.SKIP) public Builder startDate(Optional startDate) { this.startDate = startDate; @@ -217,6 +232,9 @@ public Builder startDate(String startDate) { return this; } + /** + *

        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.

        + */ @JsonSetter(value = "user_email", nulls = Nulls.SKIP) public Builder userEmail(Optional userEmail) { this.userEmail = userEmail; diff --git a/src/main/java/com/merge/api/ticketing/types/Collection.java b/src/main/java/com/merge/api/ticketing/types/Collection.java index ef054fdd7..74ce7dbfd 100644 --- a/src/main/java/com/merge/api/ticketing/types/Collection.java +++ b/src/main/java/com/merge/api/ticketing/types/Collection.java @@ -35,14 +35,14 @@ public final class Collection { private final Optional description; + private final Optional accessLevel; + private final Optional collectionType; private final Optional parentCollection; private final Optional remoteWasDeleted; - private final Optional accessLevel; - private final Optional> fieldMappings; private final Optional> remoteData; @@ -56,10 +56,10 @@ private Collection( Optional modifiedAt, Optional name, Optional description, + Optional accessLevel, Optional collectionType, Optional parentCollection, Optional remoteWasDeleted, - Optional accessLevel, Optional> fieldMappings, Optional> remoteData, Map additionalProperties) { @@ -69,10 +69,10 @@ private Collection( this.modifiedAt = modifiedAt; this.name = name; this.description = description; + this.accessLevel = accessLevel; this.collectionType = collectionType; this.parentCollection = parentCollection; this.remoteWasDeleted = remoteWasDeleted; - this.accessLevel = accessLevel; this.fieldMappings = fieldMappings; this.remoteData = remoteData; this.additionalProperties = additionalProperties; @@ -123,6 +123,20 @@ public Optional getDescription() { return description; } + /** + * @return The level of access a User has to the Collection and its sub-objects. + *
          + *
        • PRIVATE - PRIVATE
        • + *
        • COMPANY - COMPANY
        • + *
        • PUBLIC - PUBLIC
        • + *
        • PARENT_COLLECTION - PARENT_COLLECTION
        • + *
        + */ + @JsonProperty("access_level") + public Optional getAccessLevel() { + return accessLevel; + } + /** * @return The collection's type. *
          @@ -151,19 +165,6 @@ public Optional getRemoteWasDeleted() { return remoteWasDeleted; } - /** - * @return The level of access a User has to the Collection and its sub-objects. - *
            - *
          • PRIVATE - PRIVATE
          • - *
          • COMPANY - COMPANY
          • - *
          • PUBLIC - PUBLIC
          • - *
          - */ - @JsonProperty("access_level") - public Optional getAccessLevel() { - return accessLevel; - } - @JsonProperty("field_mappings") public Optional> getFieldMappings() { return fieldMappings; @@ -192,10 +193,10 @@ private boolean equalTo(Collection other) { && modifiedAt.equals(other.modifiedAt) && name.equals(other.name) && description.equals(other.description) + && accessLevel.equals(other.accessLevel) && collectionType.equals(other.collectionType) && parentCollection.equals(other.parentCollection) && remoteWasDeleted.equals(other.remoteWasDeleted) - && accessLevel.equals(other.accessLevel) && fieldMappings.equals(other.fieldMappings) && remoteData.equals(other.remoteData); } @@ -209,10 +210,10 @@ public int hashCode() { this.modifiedAt, this.name, this.description, + this.accessLevel, this.collectionType, this.parentCollection, this.remoteWasDeleted, - this.accessLevel, this.fieldMappings, this.remoteData); } @@ -240,14 +241,14 @@ public static final class Builder { private Optional description = Optional.empty(); + private Optional accessLevel = Optional.empty(); + private Optional collectionType = Optional.empty(); private Optional parentCollection = Optional.empty(); private Optional remoteWasDeleted = Optional.empty(); - private Optional accessLevel = Optional.empty(); - private Optional> fieldMappings = Optional.empty(); private Optional> remoteData = Optional.empty(); @@ -264,10 +265,10 @@ public Builder from(Collection other) { modifiedAt(other.getModifiedAt()); name(other.getName()); description(other.getDescription()); + accessLevel(other.getAccessLevel()); collectionType(other.getCollectionType()); parentCollection(other.getParentCollection()); remoteWasDeleted(other.getRemoteWasDeleted()); - accessLevel(other.getAccessLevel()); fieldMappings(other.getFieldMappings()); remoteData(other.getRemoteData()); return this; @@ -284,6 +285,9 @@ public Builder id(String id) { return this; } + /** + *

          The third-party API ID of the matching object.

          + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -295,6 +299,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

          The datetime that this object was created by Merge.

          + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -306,6 +313,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

          The datetime that this object was modified by Merge.

          + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -317,6 +327,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

          The collection's name.

          + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -328,6 +341,9 @@ public Builder name(String name) { return this; } + /** + *

          The collection's description.

          + */ @JsonSetter(value = "description", nulls = Nulls.SKIP) public Builder description(Optional description) { this.description = description; @@ -339,6 +355,33 @@ public Builder description(String description) { return this; } + /** + *

          The level of access a User has to the Collection and its sub-objects.

          + *
            + *
          • PRIVATE - PRIVATE
          • + *
          • COMPANY - COMPANY
          • + *
          • PUBLIC - PUBLIC
          • + *
          • PARENT_COLLECTION - PARENT_COLLECTION
          • + *
          + */ + @JsonSetter(value = "access_level", nulls = Nulls.SKIP) + public Builder accessLevel(Optional accessLevel) { + this.accessLevel = accessLevel; + return this; + } + + public Builder accessLevel(CollectionAccessLevel accessLevel) { + this.accessLevel = Optional.ofNullable(accessLevel); + return this; + } + + /** + *

          The collection's type.

          + *
            + *
          • LIST - LIST
          • + *
          • PROJECT - PROJECT
          • + *
          + */ @JsonSetter(value = "collection_type", nulls = Nulls.SKIP) public Builder collectionType(Optional collectionType) { this.collectionType = collectionType; @@ -350,6 +393,9 @@ public Builder collectionType(CollectionTypeEnum collectionType) { return this; } + /** + *

          The parent collection for this collection.

          + */ @JsonSetter(value = "parent_collection", nulls = Nulls.SKIP) public Builder parentCollection(Optional parentCollection) { this.parentCollection = parentCollection; @@ -361,6 +407,9 @@ public Builder parentCollection(CollectionParentCollection parentCollection) { return this; } + /** + *

          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.

          + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; @@ -372,17 +421,6 @@ public Builder remoteWasDeleted(Boolean remoteWasDeleted) { return this; } - @JsonSetter(value = "access_level", nulls = Nulls.SKIP) - public Builder accessLevel(Optional accessLevel) { - this.accessLevel = accessLevel; - return this; - } - - public Builder accessLevel(AccessLevelEnum accessLevel) { - this.accessLevel = Optional.ofNullable(accessLevel); - return this; - } - @JsonSetter(value = "field_mappings", nulls = Nulls.SKIP) public Builder fieldMappings(Optional> fieldMappings) { this.fieldMappings = fieldMappings; @@ -413,10 +451,10 @@ public Collection build() { modifiedAt, name, description, + accessLevel, collectionType, parentCollection, remoteWasDeleted, - accessLevel, fieldMappings, remoteData, additionalProperties); diff --git a/src/main/java/com/merge/api/ticketing/types/CollectionAccessLevel.java b/src/main/java/com/merge/api/ticketing/types/CollectionAccessLevel.java new file mode 100644 index 000000000..39d741158 --- /dev/null +++ b/src/main/java/com/merge/api/ticketing/types/CollectionAccessLevel.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ticketing.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = CollectionAccessLevel.Deserializer.class) +public final class CollectionAccessLevel { + private final Object value; + + private final int type; + + private CollectionAccessLevel(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((CollectionAccessLevelEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof CollectionAccessLevel && equalTo((CollectionAccessLevel) other); + } + + private boolean equalTo(CollectionAccessLevel other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static CollectionAccessLevel of(CollectionAccessLevelEnum value) { + return new CollectionAccessLevel(value, 0); + } + + public static CollectionAccessLevel of(String value) { + return new CollectionAccessLevel(value, 1); + } + + public interface Visitor { + T visit(CollectionAccessLevelEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(CollectionAccessLevel.class); + } + + @java.lang.Override + public CollectionAccessLevel deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, CollectionAccessLevelEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ticketing/types/CollectionAccessLevelEnum.java b/src/main/java/com/merge/api/ticketing/types/CollectionAccessLevelEnum.java new file mode 100644 index 000000000..bec28ca10 --- /dev/null +++ b/src/main/java/com/merge/api/ticketing/types/CollectionAccessLevelEnum.java @@ -0,0 +1,28 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ticketing.types; + +import com.fasterxml.jackson.annotation.JsonValue; + +public enum CollectionAccessLevelEnum { + PRIVATE("PRIVATE"), + + COMPANY("COMPANY"), + + PUBLIC("PUBLIC"), + + PARENT_COLLECTION("PARENT_COLLECTION"); + + private final String value; + + CollectionAccessLevelEnum(String value) { + this.value = value; + } + + @JsonValue + @java.lang.Override + public String toString() { + return this.value; + } +} diff --git a/src/main/java/com/merge/api/ticketing/types/CollectionsListRequest.java b/src/main/java/com/merge/api/ticketing/types/CollectionsListRequest.java index 126e6cce0..ad5d87c45 100644 --- a/src/main/java/com/merge/api/ticketing/types/CollectionsListRequest.java +++ b/src/main/java/com/merge/api/ticketing/types/CollectionsListRequest.java @@ -324,6 +324,9 @@ public Builder from(CollectionsListRequest other) { return this; } + /** + *

          Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

          + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -340,6 +343,9 @@ public Builder expand(String expand) { return this; } + /** + *

          If provided, will only return collections of the given type.

          + */ @JsonSetter(value = "collection_type", nulls = Nulls.SKIP) public Builder collectionType(Optional collectionType) { this.collectionType = collectionType; @@ -351,6 +357,9 @@ public Builder collectionType(String collectionType) { return this; } + /** + *

          If provided, will only return objects created after this datetime.

          + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -362,6 +371,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

          If provided, will only return objects created before this datetime.

          + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -373,6 +385,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

          The pagination cursor value.

          + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -384,6 +399,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

          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.

          + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -395,6 +413,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

          Whether to include the original data Merge fetched from the third-party to produce these models.

          + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -406,6 +427,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

          Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

          + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -417,6 +441,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

          If provided, only objects synced by Merge after this date time will be returned.

          + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -428,6 +455,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

          If provided, only objects synced by Merge before this date time will be returned.

          + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -439,6 +469,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

          Number of results to return per page.

          + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -450,6 +483,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

          If provided, will only return collections whose parent collection matches the given id.

          + */ @JsonSetter(value = "parent_collection_id", nulls = Nulls.SKIP) public Builder parentCollectionId(Optional parentCollectionId) { this.parentCollectionId = parentCollectionId; @@ -461,6 +497,9 @@ public Builder parentCollectionId(String parentCollectionId) { return this; } + /** + *

          Deprecated. Use show_enum_origins.

          + */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -472,6 +511,9 @@ public Builder remoteFields(String remoteFields) { return this; } + /** + *

          The API provider's ID for the given object.

          + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -483,6 +525,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

          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

          + */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; diff --git a/src/main/java/com/merge/api/ticketing/types/CollectionsRetrieveRequest.java b/src/main/java/com/merge/api/ticketing/types/CollectionsRetrieveRequest.java index 7efcfa59f..1e9f19d7e 100644 --- a/src/main/java/com/merge/api/ticketing/types/CollectionsRetrieveRequest.java +++ b/src/main/java/com/merge/api/ticketing/types/CollectionsRetrieveRequest.java @@ -149,6 +149,9 @@ public Builder from(CollectionsRetrieveRequest other) { return this; } + /** + *

          Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

          + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -165,6 +168,9 @@ public Builder expand(String expand) { return this; } + /** + *

          Whether to include the original data Merge fetched from the third-party to produce these models.

          + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -176,6 +182,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

          Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

          + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -187,6 +196,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

          Deprecated. Use show_enum_origins.

          + */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -198,6 +210,9 @@ public Builder remoteFields(String remoteFields) { return this; } + /** + *

          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

          + */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; diff --git a/src/main/java/com/merge/api/ticketing/types/CollectionsViewersListRequest.java b/src/main/java/com/merge/api/ticketing/types/CollectionsViewersListRequest.java index bf3b9c8c4..60d229a61 100644 --- a/src/main/java/com/merge/api/ticketing/types/CollectionsViewersListRequest.java +++ b/src/main/java/com/merge/api/ticketing/types/CollectionsViewersListRequest.java @@ -170,6 +170,9 @@ public Builder from(CollectionsViewersListRequest other) { return this; } + /** + *

          Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

          + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -186,6 +189,9 @@ public Builder expand(CollectionsViewersListRequestExpandItem expand) { return this; } + /** + *

          The pagination cursor value.

          + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -197,6 +203,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

          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.

          + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -208,6 +217,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

          Whether to include the original data Merge fetched from the third-party to produce these models.

          + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -219,6 +231,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

          Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

          + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -230,6 +245,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

          Number of results to return per page.

          + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; diff --git a/src/main/java/com/merge/api/ticketing/types/Comment.java b/src/main/java/com/merge/api/ticketing/types/Comment.java index 1aa148c98..732ab94f9 100644 --- a/src/main/java/com/merge/api/ticketing/types/Comment.java +++ b/src/main/java/com/merge/api/ticketing/types/Comment.java @@ -309,6 +309,9 @@ public Builder id(String id) { return this; } + /** + *

          The third-party API ID of the matching object.

          + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -320,6 +323,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

          The datetime that this object was created by Merge.

          + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -331,6 +337,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

          The datetime that this object was modified by Merge.

          + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -342,6 +351,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

          The author of the Comment, if the author is a User. If the third party does not support specifying an author, we will append "[Posted on behalf of {name}]" to the comment.

          + */ @JsonSetter(value = "user", nulls = Nulls.SKIP) public Builder user(Optional user) { this.user = user; @@ -353,6 +365,9 @@ public Builder user(CommentUser user) { return this; } + /** + *

          The author of the Comment, if the author is a Contact.If the third party does not support specifying an author, we will append "[Posted on behalf of {name}]" to the comment.

          + */ @JsonSetter(value = "contact", nulls = Nulls.SKIP) public Builder contact(Optional contact) { this.contact = contact; @@ -364,6 +379,9 @@ public Builder contact(CommentContact contact) { return this; } + /** + *

          The comment's text body.

          + */ @JsonSetter(value = "body", nulls = Nulls.SKIP) public Builder body(Optional body) { this.body = body; @@ -375,6 +393,9 @@ public Builder body(String body) { return this; } + /** + *

          The comment's text body formatted as html.

          + */ @JsonSetter(value = "html_body", nulls = Nulls.SKIP) public Builder htmlBody(Optional htmlBody) { this.htmlBody = htmlBody; @@ -386,6 +407,9 @@ public Builder htmlBody(String htmlBody) { return this; } + /** + *

          The ticket associated with the comment.

          + */ @JsonSetter(value = "ticket", nulls = Nulls.SKIP) public Builder ticket(Optional ticket) { this.ticket = ticket; @@ -397,6 +421,9 @@ public Builder ticket(CommentTicket ticket) { return this; } + /** + *

          Whether or not the comment is internal.

          + */ @JsonSetter(value = "is_private", nulls = Nulls.SKIP) public Builder isPrivate(Optional isPrivate) { this.isPrivate = isPrivate; @@ -408,6 +435,9 @@ public Builder isPrivate(Boolean isPrivate) { return this; } + /** + *

          When the third party's comment was created.

          + */ @JsonSetter(value = "remote_created_at", nulls = Nulls.SKIP) public Builder remoteCreatedAt(Optional remoteCreatedAt) { this.remoteCreatedAt = remoteCreatedAt; @@ -419,6 +449,9 @@ public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { return this; } + /** + *

          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.

          + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/ticketing/types/CommentEndpointRequest.java b/src/main/java/com/merge/api/ticketing/types/CommentEndpointRequest.java index 0abe00395..60ec5a779 100644 --- a/src/main/java/com/merge/api/ticketing/types/CommentEndpointRequest.java +++ b/src/main/java/com/merge/api/ticketing/types/CommentEndpointRequest.java @@ -99,10 +99,16 @@ public interface ModelStage { public interface _FinalStage { CommentEndpointRequest build(); + /** + *

          Whether to include debug fields (such as log file links) in the response.

          + */ _FinalStage isDebugMode(Optional isDebugMode); _FinalStage isDebugMode(Boolean isDebugMode); + /** + *

          Whether or not third-party updates should be run asynchronously.

          + */ _FinalStage runAsync(Optional runAsync); _FinalStage runAsync(Boolean runAsync); @@ -146,6 +152,9 @@ public _FinalStage runAsync(Boolean runAsync) { return this; } + /** + *

          Whether or not third-party updates should be run asynchronously.

          + */ @java.lang.Override @JsonSetter(value = "run_async", nulls = Nulls.SKIP) public _FinalStage runAsync(Optional runAsync) { @@ -163,6 +172,9 @@ public _FinalStage isDebugMode(Boolean isDebugMode) { return this; } + /** + *

          Whether to include debug fields (such as log file links) in the response.

          + */ @java.lang.Override @JsonSetter(value = "is_debug_mode", nulls = Nulls.SKIP) public _FinalStage isDebugMode(Optional isDebugMode) { diff --git a/src/main/java/com/merge/api/ticketing/types/CommentRequest.java b/src/main/java/com/merge/api/ticketing/types/CommentRequest.java index 02e2bf2f1..f3b12d0ed 100644 --- a/src/main/java/com/merge/api/ticketing/types/CommentRequest.java +++ b/src/main/java/com/merge/api/ticketing/types/CommentRequest.java @@ -197,6 +197,9 @@ public Builder from(CommentRequest other) { return this; } + /** + *

          The author of the Comment, if the author is a User. If the third party does not support specifying an author, we will append "[Posted on behalf of {name}]" to the comment.

          + */ @JsonSetter(value = "user", nulls = Nulls.SKIP) public Builder user(Optional user) { this.user = user; @@ -208,6 +211,9 @@ public Builder user(CommentRequestUser user) { return this; } + /** + *

          The author of the Comment, if the author is a Contact.If the third party does not support specifying an author, we will append "[Posted on behalf of {name}]" to the comment.

          + */ @JsonSetter(value = "contact", nulls = Nulls.SKIP) public Builder contact(Optional contact) { this.contact = contact; @@ -219,6 +225,9 @@ public Builder contact(CommentRequestContact contact) { return this; } + /** + *

          The comment's text body.

          + */ @JsonSetter(value = "body", nulls = Nulls.SKIP) public Builder body(Optional body) { this.body = body; @@ -230,6 +239,9 @@ public Builder body(String body) { return this; } + /** + *

          The comment's text body formatted as html.

          + */ @JsonSetter(value = "html_body", nulls = Nulls.SKIP) public Builder htmlBody(Optional htmlBody) { this.htmlBody = htmlBody; @@ -241,6 +253,9 @@ public Builder htmlBody(String htmlBody) { return this; } + /** + *

          The ticket associated with the comment.

          + */ @JsonSetter(value = "ticket", nulls = Nulls.SKIP) public Builder ticket(Optional ticket) { this.ticket = ticket; @@ -252,6 +267,9 @@ public Builder ticket(CommentRequestTicket ticket) { return this; } + /** + *

          Whether or not the comment is internal.

          + */ @JsonSetter(value = "is_private", nulls = Nulls.SKIP) public Builder isPrivate(Optional isPrivate) { this.isPrivate = isPrivate; diff --git a/src/main/java/com/merge/api/ticketing/types/CommentsListRequest.java b/src/main/java/com/merge/api/ticketing/types/CommentsListRequest.java index 9781112d9..dedb9e72f 100644 --- a/src/main/java/com/merge/api/ticketing/types/CommentsListRequest.java +++ b/src/main/java/com/merge/api/ticketing/types/CommentsListRequest.java @@ -290,6 +290,9 @@ public Builder from(CommentsListRequest other) { return this; } + /** + *

          Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

          + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -306,6 +309,9 @@ public Builder expand(CommentsListRequestExpandItem expand) { return this; } + /** + *

          If provided, will only return objects created after this datetime.

          + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -317,6 +323,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

          If provided, will only return objects created before this datetime.

          + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -328,6 +337,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

          The pagination cursor value.

          + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -339,6 +351,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

          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.

          + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -350,6 +365,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

          Whether to include the original data Merge fetched from the third-party to produce these models.

          + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -361,6 +379,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

          Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

          + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -372,6 +393,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

          If provided, only objects synced by Merge after this date time will be returned.

          + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -383,6 +407,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

          If provided, only objects synced by Merge before this date time will be returned.

          + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -394,6 +421,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

          Number of results to return per page.

          + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -405,6 +435,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

          If provided, will only return Comments created in the third party platform after this datetime.

          + */ @JsonSetter(value = "remote_created_after", nulls = Nulls.SKIP) public Builder remoteCreatedAfter(Optional remoteCreatedAfter) { this.remoteCreatedAfter = remoteCreatedAfter; @@ -416,6 +449,9 @@ public Builder remoteCreatedAfter(OffsetDateTime remoteCreatedAfter) { return this; } + /** + *

          The API provider's ID for the given object.

          + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -427,6 +463,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

          If provided, will only return comments for this ticket.

          + */ @JsonSetter(value = "ticket_id", nulls = Nulls.SKIP) public Builder ticketId(Optional ticketId) { this.ticketId = ticketId; diff --git a/src/main/java/com/merge/api/ticketing/types/CommentsRetrieveRequest.java b/src/main/java/com/merge/api/ticketing/types/CommentsRetrieveRequest.java index e4b819884..1f56140b8 100644 --- a/src/main/java/com/merge/api/ticketing/types/CommentsRetrieveRequest.java +++ b/src/main/java/com/merge/api/ticketing/types/CommentsRetrieveRequest.java @@ -116,6 +116,9 @@ public Builder from(CommentsRetrieveRequest other) { return this; } + /** + *

          Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

          + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -132,6 +135,9 @@ public Builder expand(CommentsRetrieveRequestExpandItem expand) { return this; } + /** + *

          Whether to include the original data Merge fetched from the third-party to produce these models.

          + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -143,6 +149,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

          Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

          + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/ticketing/types/CommonModelScopeApi.java b/src/main/java/com/merge/api/ticketing/types/CommonModelScopeApi.java index c40b3db83..c071f997d 100644 --- a/src/main/java/com/merge/api/ticketing/types/CommonModelScopeApi.java +++ b/src/main/java/com/merge/api/ticketing/types/CommonModelScopeApi.java @@ -82,6 +82,9 @@ public Builder from(CommonModelScopeApi other) { return this; } + /** + *

          The common models you want to update the scopes for

          + */ @JsonSetter(value = "common_models", nulls = Nulls.SKIP) public Builder commonModels(List commonModels) { this.commonModels.clear(); diff --git a/src/main/java/com/merge/api/ticketing/types/Contact.java b/src/main/java/com/merge/api/ticketing/types/Contact.java index 50cc1f457..7ea13444b 100644 --- a/src/main/java/com/merge/api/ticketing/types/Contact.java +++ b/src/main/java/com/merge/api/ticketing/types/Contact.java @@ -275,6 +275,9 @@ public Builder id(String id) { return this; } + /** + *

          The third-party API ID of the matching object.

          + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -286,6 +289,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

          The datetime that this object was created by Merge.

          + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -297,6 +303,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

          The datetime that this object was modified by Merge.

          + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -308,6 +317,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

          The contact's name.

          + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -319,6 +331,9 @@ public Builder name(String name) { return this; } + /** + *

          The contact's email address.

          + */ @JsonSetter(value = "email_address", nulls = Nulls.SKIP) public Builder emailAddress(Optional emailAddress) { this.emailAddress = emailAddress; @@ -330,6 +345,9 @@ public Builder emailAddress(String emailAddress) { return this; } + /** + *

          The contact's phone number.

          + */ @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) public Builder phoneNumber(Optional phoneNumber) { this.phoneNumber = phoneNumber; @@ -341,6 +359,9 @@ public Builder phoneNumber(String phoneNumber) { return this; } + /** + *

          The contact's details.

          + */ @JsonSetter(value = "details", nulls = Nulls.SKIP) public Builder details(Optional details) { this.details = details; @@ -352,6 +373,9 @@ public Builder details(String details) { return this; } + /** + *

          The contact's account.

          + */ @JsonSetter(value = "account", nulls = Nulls.SKIP) public Builder account(Optional account) { this.account = account; @@ -363,6 +387,9 @@ public Builder account(ContactAccount account) { return this; } + /** + *

          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.

          + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/ticketing/types/ContactRequest.java b/src/main/java/com/merge/api/ticketing/types/ContactRequest.java index 9787a4bcf..e55116cc7 100644 --- a/src/main/java/com/merge/api/ticketing/types/ContactRequest.java +++ b/src/main/java/com/merge/api/ticketing/types/ContactRequest.java @@ -180,6 +180,9 @@ public Builder from(ContactRequest other) { return this; } + /** + *

          The contact's name.

          + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -191,6 +194,9 @@ public Builder name(String name) { return this; } + /** + *

          The contact's email address.

          + */ @JsonSetter(value = "email_address", nulls = Nulls.SKIP) public Builder emailAddress(Optional emailAddress) { this.emailAddress = emailAddress; @@ -202,6 +208,9 @@ public Builder emailAddress(String emailAddress) { return this; } + /** + *

          The contact's phone number.

          + */ @JsonSetter(value = "phone_number", nulls = Nulls.SKIP) public Builder phoneNumber(Optional phoneNumber) { this.phoneNumber = phoneNumber; @@ -213,6 +222,9 @@ public Builder phoneNumber(String phoneNumber) { return this; } + /** + *

          The contact's details.

          + */ @JsonSetter(value = "details", nulls = Nulls.SKIP) public Builder details(Optional details) { this.details = details; @@ -224,6 +236,9 @@ public Builder details(String details) { return this; } + /** + *

          The contact's account.

          + */ @JsonSetter(value = "account", nulls = Nulls.SKIP) public Builder account(Optional account) { this.account = account; diff --git a/src/main/java/com/merge/api/ticketing/types/ContactsListRequest.java b/src/main/java/com/merge/api/ticketing/types/ContactsListRequest.java index 9dc65f9c4..0e7a03d5e 100644 --- a/src/main/java/com/merge/api/ticketing/types/ContactsListRequest.java +++ b/src/main/java/com/merge/api/ticketing/types/ContactsListRequest.java @@ -256,6 +256,9 @@ public Builder from(ContactsListRequest other) { return this; } + /** + *

          Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

          + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -272,6 +275,9 @@ public Builder expand(String expand) { return this; } + /** + *

          If provided, will only return objects created after this datetime.

          + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -283,6 +289,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

          If provided, will only return objects created before this datetime.

          + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -294,6 +303,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

          The pagination cursor value.

          + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -305,6 +317,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

          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.

          + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -316,6 +331,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

          Whether to include the original data Merge fetched from the third-party to produce these models.

          + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -327,6 +345,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

          Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

          + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -338,6 +359,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

          If provided, only objects synced by Merge after this date time will be returned.

          + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -349,6 +373,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

          If provided, only objects synced by Merge before this date time will be returned.

          + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -360,6 +387,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

          Number of results to return per page.

          + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -371,6 +401,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

          The API provider's ID for the given object.

          + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; diff --git a/src/main/java/com/merge/api/ticketing/types/ContactsRetrieveRequest.java b/src/main/java/com/merge/api/ticketing/types/ContactsRetrieveRequest.java index 7b83f12e4..9de28f019 100644 --- a/src/main/java/com/merge/api/ticketing/types/ContactsRetrieveRequest.java +++ b/src/main/java/com/merge/api/ticketing/types/ContactsRetrieveRequest.java @@ -116,6 +116,9 @@ public Builder from(ContactsRetrieveRequest other) { return this; } + /** + *

          Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

          + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -132,6 +135,9 @@ public Builder expand(String expand) { return this; } + /** + *

          Whether to include the original data Merge fetched from the third-party to produce these models.

          + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -143,6 +149,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

          Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

          + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/ticketing/types/CreateFieldMappingRequest.java b/src/main/java/com/merge/api/ticketing/types/CreateFieldMappingRequest.java index f84de46ac..948415eb6 100644 --- a/src/main/java/com/merge/api/ticketing/types/CreateFieldMappingRequest.java +++ b/src/main/java/com/merge/api/ticketing/types/CreateFieldMappingRequest.java @@ -158,34 +158,55 @@ public static TargetFieldNameStage builder() { } public interface TargetFieldNameStage { + /** + * The name of the target field you want this remote field to map to. + */ TargetFieldDescriptionStage targetFieldName(@NotNull String targetFieldName); Builder from(CreateFieldMappingRequest other); } public interface TargetFieldDescriptionStage { + /** + * The description of the target field you want this remote field to map to. + */ RemoteMethodStage targetFieldDescription(@NotNull String targetFieldDescription); } public interface RemoteMethodStage { + /** + * The method of the remote endpoint where the remote field is coming from. + */ RemoteUrlPathStage remoteMethod(@NotNull String remoteMethod); } public interface RemoteUrlPathStage { + /** + * The path of the remote endpoint where the remote field is coming from. + */ CommonModelNameStage remoteUrlPath(@NotNull String remoteUrlPath); } public interface CommonModelNameStage { + /** + * The name of the Common Model that the remote field corresponds to in a given category. + */ _FinalStage commonModelName(@NotNull String commonModelName); } public interface _FinalStage { CreateFieldMappingRequest build(); + /** + *

          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.

          + */ _FinalStage excludeRemoteFieldMetadata(Optional excludeRemoteFieldMetadata); _FinalStage excludeRemoteFieldMetadata(Boolean excludeRemoteFieldMetadata); + /** + *

          The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.

          + */ _FinalStage remoteFieldTraversalPath(List remoteFieldTraversalPath); _FinalStage addRemoteFieldTraversalPath(JsonNode remoteFieldTraversalPath); @@ -233,7 +254,7 @@ public Builder from(CreateFieldMappingRequest other) { } /** - *

          The name of the target field you want this remote field to map to.

          + * The name of the target field you want this remote field to map to.

          The name of the target field you want this remote field to map to.

          * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -244,7 +265,7 @@ public TargetFieldDescriptionStage targetFieldName(@NotNull String targetFieldNa } /** - *

          The description of the target field you want this remote field to map to.

          + * The description of the target field you want this remote field to map to.

          The description of the target field you want this remote field to map to.

          * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -255,7 +276,7 @@ public RemoteMethodStage targetFieldDescription(@NotNull String targetFieldDescr } /** - *

          The method of the remote endpoint where the remote field is coming from.

          + * The method of the remote endpoint where the remote field is coming from.

          The method of the remote endpoint where the remote field is coming from.

          * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -266,7 +287,7 @@ public RemoteUrlPathStage remoteMethod(@NotNull String remoteMethod) { } /** - *

          The path of the remote endpoint where the remote field is coming from.

          + * The path of the remote endpoint where the remote field is coming from.

          The path of the remote endpoint where the remote field is coming from.

          * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -277,7 +298,7 @@ public CommonModelNameStage remoteUrlPath(@NotNull String remoteUrlPath) { } /** - *

          The name of the Common Model that the remote field corresponds to in a given category.

          + * The name of the Common Model that the remote field corresponds to in a given category.

          The name of the Common Model that the remote field corresponds to in a given category.

          * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -307,6 +328,9 @@ public _FinalStage addRemoteFieldTraversalPath(JsonNode remoteFieldTraversalPath return this; } + /** + *

          The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.

          + */ @java.lang.Override @JsonSetter(value = "remote_field_traversal_path", nulls = Nulls.SKIP) public _FinalStage remoteFieldTraversalPath(List remoteFieldTraversalPath) { @@ -325,6 +349,9 @@ public _FinalStage excludeRemoteFieldMetadata(Boolean excludeRemoteFieldMetadata return this; } + /** + *

          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.

          + */ @java.lang.Override @JsonSetter(value = "exclude_remote_field_metadata", nulls = Nulls.SKIP) public _FinalStage excludeRemoteFieldMetadata(Optional excludeRemoteFieldMetadata) { diff --git a/src/main/java/com/merge/api/ticketing/types/DataPassthroughRequest.java b/src/main/java/com/merge/api/ticketing/types/DataPassthroughRequest.java index 99cf3172a..c10fbb23d 100644 --- a/src/main/java/com/merge/api/ticketing/types/DataPassthroughRequest.java +++ b/src/main/java/com/merge/api/ticketing/types/DataPassthroughRequest.java @@ -171,24 +171,39 @@ public interface MethodStage { } public interface PathStage { + /** + * The path of the request in the third party's platform. + */ _FinalStage path(@NotNull String path); } public interface _FinalStage { DataPassthroughRequest build(); + /** + *

          An optional override of the third party's base url for the request.

          + */ _FinalStage baseUrlOverride(Optional baseUrlOverride); _FinalStage baseUrlOverride(String baseUrlOverride); + /** + *

          The data with the request. You must include a request_format parameter matching the data's format

          + */ _FinalStage data(Optional data); _FinalStage data(String data); + /** + *

          Pass an array of MultipartFormField objects in here instead of using the data param if request_format is set to MULTIPART.

          + */ _FinalStage multipartFormData(Optional> multipartFormData); _FinalStage multipartFormData(List multipartFormData); + /** + *

          The headers to use for the request (Merge will handle the account's authorization headers). Content-Type header is required for passthrough. Choose content type corresponding to expected format of receiving server.

          + */ _FinalStage headers(Optional> headers); _FinalStage headers(Map headers); @@ -197,6 +212,9 @@ public interface _FinalStage { _FinalStage requestFormat(RequestFormatEnum requestFormat); + /** + *

          Optional. If true, the response will always be an object of the form {"type": T, "value": ...} where T will be one of string, boolean, number, null, array, object.

          + */ _FinalStage normalizeResponse(Optional normalizeResponse); _FinalStage normalizeResponse(Boolean normalizeResponse); @@ -246,7 +264,7 @@ public PathStage method(@NotNull MethodEnum method) { } /** - *

          The path of the request in the third party's platform.

          + * The path of the request in the third party's platform.

          The path of the request in the third party's platform.

          * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -266,6 +284,9 @@ public _FinalStage normalizeResponse(Boolean normalizeResponse) { return this; } + /** + *

          Optional. If true, the response will always be an object of the form {"type": T, "value": ...} where T will be one of string, boolean, number, null, array, object.

          + */ @java.lang.Override @JsonSetter(value = "normalize_response", nulls = Nulls.SKIP) public _FinalStage normalizeResponse(Optional normalizeResponse) { @@ -296,6 +317,9 @@ public _FinalStage headers(Map headers) { return this; } + /** + *

          The headers to use for the request (Merge will handle the account's authorization headers). Content-Type header is required for passthrough. Choose content type corresponding to expected format of receiving server.

          + */ @java.lang.Override @JsonSetter(value = "headers", nulls = Nulls.SKIP) public _FinalStage headers(Optional> headers) { @@ -313,6 +337,9 @@ public _FinalStage multipartFormData(List multipartFo return this; } + /** + *

          Pass an array of MultipartFormField objects in here instead of using the data param if request_format is set to MULTIPART.

          + */ @java.lang.Override @JsonSetter(value = "multipart_form_data", nulls = Nulls.SKIP) public _FinalStage multipartFormData(Optional> multipartFormData) { @@ -330,6 +357,9 @@ public _FinalStage data(String data) { return this; } + /** + *

          The data with the request. You must include a request_format parameter matching the data's format

          + */ @java.lang.Override @JsonSetter(value = "data", nulls = Nulls.SKIP) public _FinalStage data(Optional data) { @@ -347,6 +377,9 @@ public _FinalStage baseUrlOverride(String baseUrlOverride) { return this; } + /** + *

          An optional override of the third party's base url for the request.

          + */ @java.lang.Override @JsonSetter(value = "base_url_override", nulls = Nulls.SKIP) public _FinalStage baseUrlOverride(Optional baseUrlOverride) { diff --git a/src/main/java/com/merge/api/ticketing/types/EndUserDetailsRequest.java b/src/main/java/com/merge/api/ticketing/types/EndUserDetailsRequest.java index 2825849bb..aedc8a2b3 100644 --- a/src/main/java/com/merge/api/ticketing/types/EndUserDetailsRequest.java +++ b/src/main/java/com/merge/api/ticketing/types/EndUserDetailsRequest.java @@ -45,7 +45,7 @@ public final class EndUserDetailsRequest { private final Optional>>> categoryCommonModelScopes; - private final Optional language; + private final Optional language; private final Optional areSyncsDisabled; @@ -65,7 +65,7 @@ private EndUserDetailsRequest( Optional> commonModels, Optional>>> categoryCommonModelScopes, - Optional language, + Optional language, Optional areSyncsDisabled, Optional> integrationSpecificConfig, Map additionalProperties) { @@ -174,7 +174,7 @@ public Optional> getCommonModels() { *
        */ @JsonProperty("language") - public Optional getLanguage() { + public Optional getLanguage() { return language; } @@ -249,48 +249,78 @@ public static EndUserEmailAddressStage builder() { } public interface EndUserEmailAddressStage { + /** + * Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent. + */ EndUserOrganizationNameStage endUserEmailAddress(@NotNull String endUserEmailAddress); Builder from(EndUserDetailsRequest other); } public interface EndUserOrganizationNameStage { + /** + * Your end user's organization. + */ EndUserOriginIdStage endUserOrganizationName(@NotNull String endUserOrganizationName); } public interface EndUserOriginIdStage { + /** + * 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. + */ _FinalStage endUserOriginId(@NotNull String endUserOriginId); } public interface _FinalStage { EndUserDetailsRequest build(); + /** + *

        The integration categories to show in Merge Link.

        + */ _FinalStage categories(List categories); _FinalStage addCategories(CategoriesEnum categories); _FinalStage addAllCategories(List categories); + /** + *

        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/.

        + */ _FinalStage integration(Optional integration); _FinalStage integration(String integration); + /** + *

        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.

        + */ _FinalStage linkExpiryMins(Optional linkExpiryMins); _FinalStage linkExpiryMins(Integer linkExpiryMins); + /** + *

        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.

        + */ _FinalStage shouldCreateMagicLinkUrl(Optional shouldCreateMagicLinkUrl); _FinalStage shouldCreateMagicLinkUrl(Boolean shouldCreateMagicLinkUrl); + /** + *

        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.

        + */ _FinalStage hideAdminMagicLink(Optional hideAdminMagicLink); _FinalStage hideAdminMagicLink(Boolean hideAdminMagicLink); + /** + *

        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.

        + */ _FinalStage commonModels(Optional> commonModels); _FinalStage commonModels(List commonModels); + /** + *

        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.

        + */ _FinalStage categoryCommonModelScopes( Optional>>> categoryCommonModelScopes); @@ -298,14 +328,27 @@ _FinalStage categoryCommonModelScopes( _FinalStage categoryCommonModelScopes( Map>> categoryCommonModelScopes); - _FinalStage language(Optional language); + /** + *

        The following subset of IETF language tags can be used to configure localization.

        + *
          + *
        • en - en
        • + *
        • de - de
        • + *
        + */ + _FinalStage language(Optional language); - _FinalStage language(LanguageEnum language); + _FinalStage language(EndUserDetailsRequestLanguage language); + /** + *

        The boolean that indicates whether initial, periodic, and force syncs will be disabled.

        + */ _FinalStage areSyncsDisabled(Optional areSyncsDisabled); _FinalStage areSyncsDisabled(Boolean areSyncsDisabled); + /** + *

        A JSON object containing integration-specific configuration options.

        + */ _FinalStage integrationSpecificConfig(Optional> integrationSpecificConfig); _FinalStage integrationSpecificConfig(Map integrationSpecificConfig); @@ -324,7 +367,7 @@ public static final class Builder private Optional areSyncsDisabled = Optional.empty(); - private Optional language = Optional.empty(); + private Optional language = Optional.empty(); private Optional>>> categoryCommonModelScopes = Optional.empty(); @@ -365,7 +408,7 @@ public Builder from(EndUserDetailsRequest other) { } /** - *

        Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent.

        + * Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent.

        Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent.

        * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -376,7 +419,7 @@ public EndUserOrganizationNameStage endUserEmailAddress(@NotNull String endUserE } /** - *

        Your end user's organization.

        + * Your end user's organization.

        Your end user's organization.

        * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -387,7 +430,7 @@ public EndUserOriginIdStage endUserOrganizationName(@NotNull String endUserOrgan } /** - *

        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.

        + * 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.

        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.

        * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -407,6 +450,9 @@ public _FinalStage integrationSpecificConfig(Map integrationSp return this; } + /** + *

        A JSON object containing integration-specific configuration options.

        + */ @java.lang.Override @JsonSetter(value = "integration_specific_config", nulls = Nulls.SKIP) public _FinalStage integrationSpecificConfig(Optional> integrationSpecificConfig) { @@ -424,6 +470,9 @@ public _FinalStage areSyncsDisabled(Boolean areSyncsDisabled) { return this; } + /** + *

        The boolean that indicates whether initial, periodic, and force syncs will be disabled.

        + */ @java.lang.Override @JsonSetter(value = "are_syncs_disabled", nulls = Nulls.SKIP) public _FinalStage areSyncsDisabled(Optional areSyncsDisabled) { @@ -440,14 +489,21 @@ public _FinalStage areSyncsDisabled(Optional areSyncsDisabled) { * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override - public _FinalStage language(LanguageEnum language) { + public _FinalStage language(EndUserDetailsRequestLanguage language) { this.language = Optional.ofNullable(language); return this; } + /** + *

        The following subset of IETF language tags can be used to configure localization.

        + *
          + *
        • en - en
        • + *
        • de - de
        • + *
        + */ @java.lang.Override @JsonSetter(value = "language", nulls = Nulls.SKIP) - public _FinalStage language(Optional language) { + public _FinalStage language(Optional language) { this.language = language; return this; } @@ -463,6 +519,9 @@ public _FinalStage categoryCommonModelScopes( return this; } + /** + *

        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.

        + */ @java.lang.Override @JsonSetter(value = "category_common_model_scopes", nulls = Nulls.SKIP) public _FinalStage categoryCommonModelScopes( @@ -482,6 +541,9 @@ public _FinalStage commonModels(List commonModels) return this; } + /** + *

        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.

        + */ @java.lang.Override @JsonSetter(value = "common_models", nulls = Nulls.SKIP) public _FinalStage commonModels(Optional> commonModels) { @@ -499,6 +561,9 @@ public _FinalStage hideAdminMagicLink(Boolean hideAdminMagicLink) { return this; } + /** + *

        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.

        + */ @java.lang.Override @JsonSetter(value = "hide_admin_magic_link", nulls = Nulls.SKIP) public _FinalStage hideAdminMagicLink(Optional hideAdminMagicLink) { @@ -516,6 +581,9 @@ public _FinalStage shouldCreateMagicLinkUrl(Boolean shouldCreateMagicLinkUrl) { return this; } + /** + *

        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.

        + */ @java.lang.Override @JsonSetter(value = "should_create_magic_link_url", nulls = Nulls.SKIP) public _FinalStage shouldCreateMagicLinkUrl(Optional shouldCreateMagicLinkUrl) { @@ -533,6 +601,9 @@ public _FinalStage linkExpiryMins(Integer linkExpiryMins) { return this; } + /** + *

        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.

        + */ @java.lang.Override @JsonSetter(value = "link_expiry_mins", nulls = Nulls.SKIP) public _FinalStage linkExpiryMins(Optional linkExpiryMins) { @@ -550,6 +621,9 @@ public _FinalStage integration(String integration) { return this; } + /** + *

        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/.

        + */ @java.lang.Override @JsonSetter(value = "integration", nulls = Nulls.SKIP) public _FinalStage integration(Optional integration) { @@ -577,6 +651,9 @@ public _FinalStage addCategories(CategoriesEnum categories) { return this; } + /** + *

        The integration categories to show in Merge Link.

        + */ @java.lang.Override @JsonSetter(value = "categories", nulls = Nulls.SKIP) public _FinalStage categories(List categories) { diff --git a/src/main/java/com/merge/api/ticketing/types/EndUserDetailsRequestLanguage.java b/src/main/java/com/merge/api/ticketing/types/EndUserDetailsRequestLanguage.java new file mode 100644 index 000000000..601df80ad --- /dev/null +++ b/src/main/java/com/merge/api/ticketing/types/EndUserDetailsRequestLanguage.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ticketing.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = EndUserDetailsRequestLanguage.Deserializer.class) +public final class EndUserDetailsRequestLanguage { + private final Object value; + + private final int type; + + private EndUserDetailsRequestLanguage(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((LanguageEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof EndUserDetailsRequestLanguage && equalTo((EndUserDetailsRequestLanguage) other); + } + + private boolean equalTo(EndUserDetailsRequestLanguage other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static EndUserDetailsRequestLanguage of(LanguageEnum value) { + return new EndUserDetailsRequestLanguage(value, 0); + } + + public static EndUserDetailsRequestLanguage of(String value) { + return new EndUserDetailsRequestLanguage(value, 1); + } + + public interface Visitor { + T visit(LanguageEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(EndUserDetailsRequestLanguage.class); + } + + @java.lang.Override + public EndUserDetailsRequestLanguage deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, LanguageEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ticketing/types/EventTypeEnum.java b/src/main/java/com/merge/api/ticketing/types/EventTypeEnum.java index c9b6cf826..94dda7473 100644 --- a/src/main/java/com/merge/api/ticketing/types/EventTypeEnum.java +++ b/src/main/java/com/merge/api/ticketing/types/EventTypeEnum.java @@ -16,6 +16,8 @@ public enum EventTypeEnum { REGENERATED_PRODUCTION_API_KEY("REGENERATED_PRODUCTION_API_KEY"), + REGENERATED_WEBHOOK_SIGNATURE("REGENERATED_WEBHOOK_SIGNATURE"), + INVITED_USER("INVITED_USER"), TWO_FACTOR_AUTH_ENABLED("TWO_FACTOR_AUTH_ENABLED"), diff --git a/src/main/java/com/merge/api/ticketing/types/FieldMappingsRetrieveRequest.java b/src/main/java/com/merge/api/ticketing/types/FieldMappingsRetrieveRequest.java index acb167de6..5556e4c05 100644 --- a/src/main/java/com/merge/api/ticketing/types/FieldMappingsRetrieveRequest.java +++ b/src/main/java/com/merge/api/ticketing/types/FieldMappingsRetrieveRequest.java @@ -81,6 +81,9 @@ public Builder from(FieldMappingsRetrieveRequest other) { return this; } + /** + *

        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.

        + */ @JsonSetter(value = "exclude_remote_field_metadata", nulls = Nulls.SKIP) public Builder excludeRemoteFieldMetadata(Optional excludeRemoteFieldMetadata) { this.excludeRemoteFieldMetadata = excludeRemoteFieldMetadata; diff --git a/src/main/java/com/merge/api/ticketing/types/GenerateRemoteKeyRequest.java b/src/main/java/com/merge/api/ticketing/types/GenerateRemoteKeyRequest.java index ce9c93510..8efc5da05 100644 --- a/src/main/java/com/merge/api/ticketing/types/GenerateRemoteKeyRequest.java +++ b/src/main/java/com/merge/api/ticketing/types/GenerateRemoteKeyRequest.java @@ -66,6 +66,9 @@ public static NameStage builder() { } public interface NameStage { + /** + * The name of the remote key + */ _FinalStage name(@NotNull String name); Builder from(GenerateRemoteKeyRequest other); @@ -91,7 +94,7 @@ public Builder from(GenerateRemoteKeyRequest other) { } /** - *

        The name of the remote key

        + * The name of the remote key

        The name of the remote key

        * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override diff --git a/src/main/java/com/merge/api/ticketing/types/Issue.java b/src/main/java/com/merge/api/ticketing/types/Issue.java index 3d62cc513..6d9028268 100644 --- a/src/main/java/com/merge/api/ticketing/types/Issue.java +++ b/src/main/java/com/merge/api/ticketing/types/Issue.java @@ -26,7 +26,7 @@ public final class Issue { private final Optional id; - private final Optional status; + private final Optional status; private final String errorDescription; @@ -44,7 +44,7 @@ public final class Issue { private Issue( Optional id, - Optional status, + Optional status, String errorDescription, Optional> endUser, Optional firstIncidentTime, @@ -76,7 +76,7 @@ public Optional getId() { *
      */ @JsonProperty("status") - public Optional getStatus() { + public Optional getStatus() { return status; } @@ -167,9 +167,16 @@ public interface _FinalStage { _FinalStage id(String id); - _FinalStage status(Optional status); + /** + *

      Status of the issue. Options: ('ONGOING', 'RESOLVED')

      + *
        + *
      • ONGOING - ONGOING
      • + *
      • RESOLVED - RESOLVED
      • + *
      + */ + _FinalStage status(Optional status); - _FinalStage status(IssueStatusEnum status); + _FinalStage status(IssueStatus status); _FinalStage endUser(Optional> endUser); @@ -206,7 +213,7 @@ public static final class Builder implements ErrorDescriptionStage, _FinalStage private Optional> endUser = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Optional id = Optional.empty(); @@ -309,14 +316,21 @@ public _FinalStage endUser(Optional> endUser) { * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override - public _FinalStage status(IssueStatusEnum status) { + public _FinalStage status(IssueStatus status) { this.status = Optional.ofNullable(status); return this; } + /** + *

      Status of the issue. Options: ('ONGOING', 'RESOLVED')

      + *
        + *
      • ONGOING - ONGOING
      • + *
      • RESOLVED - RESOLVED
      • + *
      + */ @java.lang.Override @JsonSetter(value = "status", nulls = Nulls.SKIP) - public _FinalStage status(Optional status) { + public _FinalStage status(Optional status) { this.status = status; return this; } diff --git a/src/main/java/com/merge/api/ticketing/types/IssueStatus.java b/src/main/java/com/merge/api/ticketing/types/IssueStatus.java new file mode 100644 index 000000000..874cc892c --- /dev/null +++ b/src/main/java/com/merge/api/ticketing/types/IssueStatus.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ticketing.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = IssueStatus.Deserializer.class) +public final class IssueStatus { + private final Object value; + + private final int type; + + private IssueStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((IssueStatusEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof IssueStatus && equalTo((IssueStatus) other); + } + + private boolean equalTo(IssueStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static IssueStatus of(IssueStatusEnum value) { + return new IssueStatus(value, 0); + } + + public static IssueStatus of(String value) { + return new IssueStatus(value, 1); + } + + public interface Visitor { + T visit(IssueStatusEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(IssueStatus.class); + } + + @java.lang.Override + public IssueStatus deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, IssueStatusEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ticketing/types/IssuesListRequest.java b/src/main/java/com/merge/api/ticketing/types/IssuesListRequest.java index 01195a24a..c5996aa92 100644 --- a/src/main/java/com/merge/api/ticketing/types/IssuesListRequest.java +++ b/src/main/java/com/merge/api/ticketing/types/IssuesListRequest.java @@ -311,6 +311,9 @@ public Builder accountToken(String accountToken) { return this; } + /** + *

      The pagination cursor value.

      + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -322,6 +325,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

      If included, will only include issues whose most recent action occurred before this time

      + */ @JsonSetter(value = "end_date", nulls = Nulls.SKIP) public Builder endDate(Optional endDate) { this.endDate = endDate; @@ -344,6 +350,9 @@ public Builder endUserOrganizationName(String endUserOrganizationName) { return this; } + /** + *

      If provided, will only return issues whose first incident time was after this datetime.

      + */ @JsonSetter(value = "first_incident_time_after", nulls = Nulls.SKIP) public Builder firstIncidentTimeAfter(Optional firstIncidentTimeAfter) { this.firstIncidentTimeAfter = firstIncidentTimeAfter; @@ -355,6 +364,9 @@ public Builder firstIncidentTimeAfter(OffsetDateTime firstIncidentTimeAfter) { return this; } + /** + *

      If provided, will only return issues whose first incident time was before this datetime.

      + */ @JsonSetter(value = "first_incident_time_before", nulls = Nulls.SKIP) public Builder firstIncidentTimeBefore(Optional firstIncidentTimeBefore) { this.firstIncidentTimeBefore = firstIncidentTimeBefore; @@ -366,6 +378,9 @@ public Builder firstIncidentTimeBefore(OffsetDateTime firstIncidentTimeBefore) { return this; } + /** + *

      If true, will include muted issues

      + */ @JsonSetter(value = "include_muted", nulls = Nulls.SKIP) public Builder includeMuted(Optional includeMuted) { this.includeMuted = includeMuted; @@ -388,6 +403,9 @@ public Builder integrationName(String integrationName) { return this; } + /** + *

      If provided, will only return issues whose last incident time was after this datetime.

      + */ @JsonSetter(value = "last_incident_time_after", nulls = Nulls.SKIP) public Builder lastIncidentTimeAfter(Optional lastIncidentTimeAfter) { this.lastIncidentTimeAfter = lastIncidentTimeAfter; @@ -399,6 +417,9 @@ public Builder lastIncidentTimeAfter(OffsetDateTime lastIncidentTimeAfter) { return this; } + /** + *

      If provided, will only return issues whose last incident time was before this datetime.

      + */ @JsonSetter(value = "last_incident_time_before", nulls = Nulls.SKIP) public Builder lastIncidentTimeBefore(Optional lastIncidentTimeBefore) { this.lastIncidentTimeBefore = lastIncidentTimeBefore; @@ -410,6 +431,9 @@ public Builder lastIncidentTimeBefore(OffsetDateTime lastIncidentTimeBefore) { return this; } + /** + *

      If provided, will only include issues pertaining to the linked account passed in.

      + */ @JsonSetter(value = "linked_account_id", nulls = Nulls.SKIP) public Builder linkedAccountId(Optional linkedAccountId) { this.linkedAccountId = linkedAccountId; @@ -421,6 +445,9 @@ public Builder linkedAccountId(String linkedAccountId) { return this; } + /** + *

      Number of results to return per page.

      + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -432,6 +459,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

      If included, will only include issues whose most recent action occurred after this time

      + */ @JsonSetter(value = "start_date", nulls = Nulls.SKIP) public Builder startDate(Optional startDate) { this.startDate = startDate; @@ -443,6 +473,13 @@ public Builder startDate(String startDate) { return this; } + /** + *

      Status of the issue. Options: ('ONGOING', 'RESOLVED')

      + *
        + *
      • ONGOING - ONGOING
      • + *
      • RESOLVED - RESOLVED
      • + *
      + */ @JsonSetter(value = "status", nulls = Nulls.SKIP) public Builder status(Optional status) { this.status = status; diff --git a/src/main/java/com/merge/api/ticketing/types/LinkedAccountCommonModelScopeDeserializerRequest.java b/src/main/java/com/merge/api/ticketing/types/LinkedAccountCommonModelScopeDeserializerRequest.java index 0b609d9a7..c4d88e9e7 100644 --- a/src/main/java/com/merge/api/ticketing/types/LinkedAccountCommonModelScopeDeserializerRequest.java +++ b/src/main/java/com/merge/api/ticketing/types/LinkedAccountCommonModelScopeDeserializerRequest.java @@ -84,6 +84,9 @@ public Builder from(LinkedAccountCommonModelScopeDeserializerRequest other) { return this; } + /** + *

      The common models you want to update the scopes for

      + */ @JsonSetter(value = "common_models", nulls = Nulls.SKIP) public Builder commonModels(List commonModels) { this.commonModels.clear(); diff --git a/src/main/java/com/merge/api/ticketing/types/LinkedAccountsListRequest.java b/src/main/java/com/merge/api/ticketing/types/LinkedAccountsListRequest.java index b9cc20139..7cc39fd60 100644 --- a/src/main/java/com/merge/api/ticketing/types/LinkedAccountsListRequest.java +++ b/src/main/java/com/merge/api/ticketing/types/LinkedAccountsListRequest.java @@ -293,6 +293,18 @@ public Builder from(LinkedAccountsListRequest other) { return this; } + /** + *

      Options: accounting, ats, crm, filestorage, hris, mktg, ticketing

      + *
        + *
      • hris - hris
      • + *
      • ats - ats
      • + *
      • accounting - accounting
      • + *
      • ticketing - ticketing
      • + *
      • crm - crm
      • + *
      • mktg - mktg
      • + *
      • filestorage - filestorage
      • + *
      + */ @JsonSetter(value = "category", nulls = Nulls.SKIP) public Builder category(Optional category) { this.category = category; @@ -304,6 +316,9 @@ public Builder category(LinkedAccountsListRequestCategory category) { return this; } + /** + *

      The pagination cursor value.

      + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -315,6 +330,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

      If provided, will only return linked accounts associated with the given email address.

      + */ @JsonSetter(value = "end_user_email_address", nulls = Nulls.SKIP) public Builder endUserEmailAddress(Optional endUserEmailAddress) { this.endUserEmailAddress = endUserEmailAddress; @@ -326,6 +344,9 @@ public Builder endUserEmailAddress(String endUserEmailAddress) { return this; } + /** + *

      If provided, will only return linked accounts associated with the given organization name.

      + */ @JsonSetter(value = "end_user_organization_name", nulls = Nulls.SKIP) public Builder endUserOrganizationName(Optional endUserOrganizationName) { this.endUserOrganizationName = endUserOrganizationName; @@ -337,6 +358,9 @@ public Builder endUserOrganizationName(String endUserOrganizationName) { return this; } + /** + *

      If provided, will only return linked accounts associated with the given origin ID.

      + */ @JsonSetter(value = "end_user_origin_id", nulls = Nulls.SKIP) public Builder endUserOriginId(Optional endUserOriginId) { this.endUserOriginId = endUserOriginId; @@ -348,6 +372,9 @@ public Builder endUserOriginId(String endUserOriginId) { return this; } + /** + *

      Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once.

      + */ @JsonSetter(value = "end_user_origin_ids", nulls = Nulls.SKIP) public Builder endUserOriginIds(Optional endUserOriginIds) { this.endUserOriginIds = endUserOriginIds; @@ -370,6 +397,9 @@ public Builder id(String id) { return this; } + /** + *

      Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once.

      + */ @JsonSetter(value = "ids", nulls = Nulls.SKIP) public Builder ids(Optional ids) { this.ids = ids; @@ -381,6 +411,9 @@ public Builder ids(String ids) { return this; } + /** + *

      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.

      + */ @JsonSetter(value = "include_duplicates", nulls = Nulls.SKIP) public Builder includeDuplicates(Optional includeDuplicates) { this.includeDuplicates = includeDuplicates; @@ -392,6 +425,9 @@ public Builder includeDuplicates(Boolean includeDuplicates) { return this; } + /** + *

      If provided, will only return linked accounts associated with the given integration name.

      + */ @JsonSetter(value = "integration_name", nulls = Nulls.SKIP) public Builder integrationName(Optional integrationName) { this.integrationName = integrationName; @@ -403,6 +439,9 @@ public Builder integrationName(String integrationName) { return this; } + /** + *

      If included, will only include test linked accounts. If not included, will only include non-test linked accounts.

      + */ @JsonSetter(value = "is_test_account", nulls = Nulls.SKIP) public Builder isTestAccount(Optional isTestAccount) { this.isTestAccount = isTestAccount; @@ -414,6 +453,9 @@ public Builder isTestAccount(String isTestAccount) { return this; } + /** + *

      Number of results to return per page.

      + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -425,6 +467,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

      Filter by status. Options: COMPLETE, IDLE, INCOMPLETE, RELINK_NEEDED

      + */ @JsonSetter(value = "status", nulls = Nulls.SKIP) public Builder status(Optional status) { this.status = status; diff --git a/src/main/java/com/merge/api/ticketing/types/MultipartFormFieldRequest.java b/src/main/java/com/merge/api/ticketing/types/MultipartFormFieldRequest.java index d614dbb05..20d19608d 100644 --- a/src/main/java/com/merge/api/ticketing/types/MultipartFormFieldRequest.java +++ b/src/main/java/com/merge/api/ticketing/types/MultipartFormFieldRequest.java @@ -25,7 +25,7 @@ public final class MultipartFormFieldRequest { private final String data; - private final Optional encoding; + private final Optional encoding; private final Optional fileName; @@ -36,7 +36,7 @@ public final class MultipartFormFieldRequest { private MultipartFormFieldRequest( String name, String data, - Optional encoding, + Optional encoding, Optional fileName, Optional contentType, Map additionalProperties) { @@ -73,7 +73,7 @@ public String getData() { *
    */ @JsonProperty("encoding") - public Optional getEncoding() { + public Optional getEncoding() { return encoding; } @@ -127,26 +127,46 @@ public static NameStage builder() { } public interface NameStage { + /** + * The name of the form field + */ DataStage name(@NotNull String name); Builder from(MultipartFormFieldRequest other); } public interface DataStage { + /** + * The data for the form field. + */ _FinalStage data(@NotNull String data); } public interface _FinalStage { MultipartFormFieldRequest build(); - _FinalStage encoding(Optional encoding); + /** + *

    The encoding of the value of data. Defaults to RAW if not defined.

    + *
      + *
    • RAW - RAW
    • + *
    • BASE64 - BASE64
    • + *
    • GZIP_BASE64 - GZIP_BASE64
    • + *
    + */ + _FinalStage encoding(Optional encoding); - _FinalStage encoding(EncodingEnum encoding); + _FinalStage encoding(MultipartFormFieldRequestEncoding encoding); + /** + *

    The file name of the form field, if the field is for a file.

    + */ _FinalStage fileName(Optional fileName); _FinalStage fileName(String fileName); + /** + *

    The MIME type of the file, if the field is for a file.

    + */ _FinalStage contentType(Optional contentType); _FinalStage contentType(String contentType); @@ -162,7 +182,7 @@ public static final class Builder implements NameStage, DataStage, _FinalStage { private Optional fileName = Optional.empty(); - private Optional encoding = Optional.empty(); + private Optional encoding = Optional.empty(); @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -180,7 +200,7 @@ public Builder from(MultipartFormFieldRequest other) { } /** - *

    The name of the form field

    + * The name of the form field

    The name of the form field

    * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -191,7 +211,7 @@ public DataStage name(@NotNull String name) { } /** - *

    The data for the form field.

    + * The data for the form field.

    The data for the form field.

    * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override @@ -211,6 +231,9 @@ public _FinalStage contentType(String contentType) { return this; } + /** + *

    The MIME type of the file, if the field is for a file.

    + */ @java.lang.Override @JsonSetter(value = "content_type", nulls = Nulls.SKIP) public _FinalStage contentType(Optional contentType) { @@ -228,6 +251,9 @@ public _FinalStage fileName(String fileName) { return this; } + /** + *

    The file name of the form field, if the field is for a file.

    + */ @java.lang.Override @JsonSetter(value = "file_name", nulls = Nulls.SKIP) public _FinalStage fileName(Optional fileName) { @@ -245,14 +271,22 @@ public _FinalStage fileName(Optional fileName) { * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override - public _FinalStage encoding(EncodingEnum encoding) { + public _FinalStage encoding(MultipartFormFieldRequestEncoding encoding) { this.encoding = Optional.ofNullable(encoding); return this; } + /** + *

    The encoding of the value of data. Defaults to RAW if not defined.

    + *
      + *
    • RAW - RAW
    • + *
    • BASE64 - BASE64
    • + *
    • GZIP_BASE64 - GZIP_BASE64
    • + *
    + */ @java.lang.Override @JsonSetter(value = "encoding", nulls = Nulls.SKIP) - public _FinalStage encoding(Optional encoding) { + public _FinalStage encoding(Optional encoding) { this.encoding = encoding; return this; } diff --git a/src/main/java/com/merge/api/ticketing/types/MultipartFormFieldRequestEncoding.java b/src/main/java/com/merge/api/ticketing/types/MultipartFormFieldRequestEncoding.java new file mode 100644 index 000000000..9bac556bc --- /dev/null +++ b/src/main/java/com/merge/api/ticketing/types/MultipartFormFieldRequestEncoding.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ticketing.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = MultipartFormFieldRequestEncoding.Deserializer.class) +public final class MultipartFormFieldRequestEncoding { + private final Object value; + + private final int type; + + private MultipartFormFieldRequestEncoding(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((EncodingEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof MultipartFormFieldRequestEncoding && equalTo((MultipartFormFieldRequestEncoding) other); + } + + private boolean equalTo(MultipartFormFieldRequestEncoding other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static MultipartFormFieldRequestEncoding of(EncodingEnum value) { + return new MultipartFormFieldRequestEncoding(value, 0); + } + + public static MultipartFormFieldRequestEncoding of(String value) { + return new MultipartFormFieldRequestEncoding(value, 1); + } + + public interface Visitor { + T visit(EncodingEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(MultipartFormFieldRequestEncoding.class); + } + + @java.lang.Override + public MultipartFormFieldRequestEncoding deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, EncodingEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ticketing/types/PatchedEditFieldMappingRequest.java b/src/main/java/com/merge/api/ticketing/types/PatchedEditFieldMappingRequest.java index 92df80c23..4635407b8 100644 --- a/src/main/java/com/merge/api/ticketing/types/PatchedEditFieldMappingRequest.java +++ b/src/main/java/com/merge/api/ticketing/types/PatchedEditFieldMappingRequest.java @@ -116,6 +116,9 @@ public Builder from(PatchedEditFieldMappingRequest other) { return this; } + /** + *

    The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint.

    + */ @JsonSetter(value = "remote_field_traversal_path", nulls = Nulls.SKIP) public Builder remoteFieldTraversalPath(Optional> remoteFieldTraversalPath) { this.remoteFieldTraversalPath = remoteFieldTraversalPath; @@ -127,6 +130,9 @@ public Builder remoteFieldTraversalPath(List remoteFieldTraversalPath) return this; } + /** + *

    The method of the remote endpoint where the remote field is coming from.

    + */ @JsonSetter(value = "remote_method", nulls = Nulls.SKIP) public Builder remoteMethod(Optional remoteMethod) { this.remoteMethod = remoteMethod; @@ -138,6 +144,9 @@ public Builder remoteMethod(String remoteMethod) { return this; } + /** + *

    The path of the remote endpoint where the remote field is coming from.

    + */ @JsonSetter(value = "remote_url_path", nulls = Nulls.SKIP) public Builder remoteUrlPath(Optional remoteUrlPath) { this.remoteUrlPath = remoteUrlPath; diff --git a/src/main/java/com/merge/api/ticketing/types/PatchedTicketEndpointRequest.java b/src/main/java/com/merge/api/ticketing/types/PatchedTicketEndpointRequest.java index 14659a290..728b21ae6 100644 --- a/src/main/java/com/merge/api/ticketing/types/PatchedTicketEndpointRequest.java +++ b/src/main/java/com/merge/api/ticketing/types/PatchedTicketEndpointRequest.java @@ -99,10 +99,16 @@ public interface ModelStage { public interface _FinalStage { PatchedTicketEndpointRequest build(); + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ _FinalStage isDebugMode(Optional isDebugMode); _FinalStage isDebugMode(Boolean isDebugMode); + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ _FinalStage runAsync(Optional runAsync); _FinalStage runAsync(Boolean runAsync); @@ -146,6 +152,9 @@ public _FinalStage runAsync(Boolean runAsync) { return this; } + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ @java.lang.Override @JsonSetter(value = "run_async", nulls = Nulls.SKIP) public _FinalStage runAsync(Optional runAsync) { @@ -163,6 +172,9 @@ public _FinalStage isDebugMode(Boolean isDebugMode) { return this; } + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ @java.lang.Override @JsonSetter(value = "is_debug_mode", nulls = Nulls.SKIP) public _FinalStage isDebugMode(Optional isDebugMode) { diff --git a/src/main/java/com/merge/api/ticketing/types/PatchedTicketRequest.java b/src/main/java/com/merge/api/ticketing/types/PatchedTicketRequest.java index 1ef72f1d3..2b6f65496 100644 --- a/src/main/java/com/merge/api/ticketing/types/PatchedTicketRequest.java +++ b/src/main/java/com/merge/api/ticketing/types/PatchedTicketRequest.java @@ -33,7 +33,7 @@ public final class PatchedTicketRequest { private final Optional dueDate; - private final Optional status; + private final Optional status; private final Optional description; @@ -47,6 +47,8 @@ public final class PatchedTicketRequest { private final Optional parentTicket; + private final Optional accessLevel; + private final Optional>> tags; private final Optional>> roles; @@ -71,13 +73,14 @@ private PatchedTicketRequest( Optional>> assignedTeams, Optional creator, Optional dueDate, - Optional status, + Optional status, Optional description, Optional>> collections, Optional ticketType, Optional account, Optional contact, Optional parentTicket, + Optional accessLevel, Optional>> tags, Optional>> roles, Optional completedAt, @@ -99,6 +102,7 @@ private PatchedTicketRequest( this.account = account; this.contact = contact; this.parentTicket = parentTicket; + this.accessLevel = accessLevel; this.tags = tags; this.roles = roles; this.completedAt = completedAt; @@ -160,7 +164,7 @@ public Optional getDueDate() { * */ @JsonProperty("status") - public Optional getStatus() { + public Optional getStatus() { return status; } @@ -212,6 +216,20 @@ public Optional getParentTicket() { return parentTicket; } + /** + * @return The description of who is able to access a given ticket, or where access is inherited from. + *
      + *
    • COMPANY - COMPANY
    • + *
    • PUBLIC - PUBLIC
    • + *
    • PRIVATE - PRIVATE
    • + *
    • COLLECTION - COLLECTION
    • + *
    + */ + @JsonProperty("access_level") + public Optional getAccessLevel() { + return accessLevel; + } + @JsonProperty("tags") public Optional>> getTags() { return tags; @@ -291,6 +309,7 @@ private boolean equalTo(PatchedTicketRequest other) { && account.equals(other.account) && contact.equals(other.contact) && parentTicket.equals(other.parentTicket) + && accessLevel.equals(other.accessLevel) && tags.equals(other.tags) && roles.equals(other.roles) && completedAt.equals(other.completedAt) @@ -316,6 +335,7 @@ public int hashCode() { this.account, this.contact, this.parentTicket, + this.accessLevel, this.tags, this.roles, this.completedAt, @@ -347,7 +367,7 @@ public static final class Builder { private Optional dueDate = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Optional description = Optional.empty(); @@ -361,6 +381,8 @@ public static final class Builder { private Optional parentTicket = Optional.empty(); + private Optional accessLevel = Optional.empty(); + private Optional>> tags = Optional.empty(); private Optional>> roles = Optional.empty(); @@ -395,6 +417,7 @@ public Builder from(PatchedTicketRequest other) { account(other.getAccount()); contact(other.getContact()); parentTicket(other.getParentTicket()); + accessLevel(other.getAccessLevel()); tags(other.getTags()); roles(other.getRoles()); completedAt(other.getCompletedAt()); @@ -406,6 +429,9 @@ public Builder from(PatchedTicketRequest other) { return this; } + /** + *

    The ticket's name.

    + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -417,6 +443,9 @@ public Builder name(String name) { return this; } + /** + *

    The individual Users who are assigned to this ticket. This does not include Users who just have view access to this ticket. To fetch all Users and Teams that can access the ticket, use the GET /tickets/{ticket_id}/viewers endpoint.

    + */ @JsonSetter(value = "assignees", nulls = Nulls.SKIP) public Builder assignees(Optional>> assignees) { this.assignees = assignees; @@ -428,6 +457,9 @@ public Builder assignees(List> assignees) { return this; } + /** + *

    The Teams that are assigned to this ticket. This does not include Teams who just have view access to this ticket. To fetch all Users and Teams that can access this ticket, use the GET /tickets/{ticket_id}/viewers endpoint.

    + */ @JsonSetter(value = "assigned_teams", nulls = Nulls.SKIP) public Builder assignedTeams(Optional>> assignedTeams) { this.assignedTeams = assignedTeams; @@ -439,6 +471,9 @@ public Builder assignedTeams(List> assignedTeams) { return this; } + /** + *

    The user who created this ticket.

    + */ @JsonSetter(value = "creator", nulls = Nulls.SKIP) public Builder creator(Optional creator) { this.creator = creator; @@ -450,6 +485,9 @@ public Builder creator(String creator) { return this; } + /** + *

    The ticket's due date.

    + */ @JsonSetter(value = "due_date", nulls = Nulls.SKIP) public Builder dueDate(Optional dueDate) { this.dueDate = dueDate; @@ -461,17 +499,29 @@ public Builder dueDate(OffsetDateTime dueDate) { return this; } + /** + *

    The current status of the ticket.

    + *
      + *
    • OPEN - OPEN
    • + *
    • CLOSED - CLOSED
    • + *
    • IN_PROGRESS - IN_PROGRESS
    • + *
    • ON_HOLD - ON_HOLD
    • + *
    + */ @JsonSetter(value = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { + public Builder status(Optional status) { this.status = status; return this; } - public Builder status(TicketStatusEnum status) { + public Builder status(PatchedTicketRequestStatus status) { this.status = Optional.ofNullable(status); return this; } + /** + *

    The ticket’s description. HTML version of description is mapped if supported by the third-party platform.

    + */ @JsonSetter(value = "description", nulls = Nulls.SKIP) public Builder description(Optional description) { this.description = description; @@ -483,6 +533,9 @@ public Builder description(String description) { return this; } + /** + *

    The Collections that this Ticket is included in.

    + */ @JsonSetter(value = "collections", nulls = Nulls.SKIP) public Builder collections(Optional>> collections) { this.collections = collections; @@ -494,6 +547,9 @@ public Builder collections(List> collections) { return this; } + /** + *

    The sub category of the ticket within the 3rd party system. Examples include incident, task, subtask or to-do.

    + */ @JsonSetter(value = "ticket_type", nulls = Nulls.SKIP) public Builder ticketType(Optional ticketType) { this.ticketType = ticketType; @@ -505,6 +561,9 @@ public Builder ticketType(String ticketType) { return this; } + /** + *

    The account associated with the ticket.

    + */ @JsonSetter(value = "account", nulls = Nulls.SKIP) public Builder account(Optional account) { this.account = account; @@ -516,6 +575,9 @@ public Builder account(String account) { return this; } + /** + *

    The contact associated with the ticket.

    + */ @JsonSetter(value = "contact", nulls = Nulls.SKIP) public Builder contact(Optional contact) { this.contact = contact; @@ -527,6 +589,9 @@ public Builder contact(String contact) { return this; } + /** + *

    The ticket's parent ticket.

    + */ @JsonSetter(value = "parent_ticket", nulls = Nulls.SKIP) public Builder parentTicket(Optional parentTicket) { this.parentTicket = parentTicket; @@ -538,6 +603,26 @@ public Builder parentTicket(String parentTicket) { return this; } + /** + *

    The description of who is able to access a given ticket, or where access is inherited from.

    + *
      + *
    • COMPANY - COMPANY
    • + *
    • PUBLIC - PUBLIC
    • + *
    • PRIVATE - PRIVATE
    • + *
    • COLLECTION - COLLECTION
    • + *
    + */ + @JsonSetter(value = "access_level", nulls = Nulls.SKIP) + public Builder accessLevel(Optional accessLevel) { + this.accessLevel = accessLevel; + return this; + } + + public Builder accessLevel(PatchedTicketRequestAccessLevel accessLevel) { + this.accessLevel = Optional.ofNullable(accessLevel); + return this; + } + @JsonSetter(value = "tags", nulls = Nulls.SKIP) public Builder tags(Optional>> tags) { this.tags = tags; @@ -560,6 +645,9 @@ public Builder roles(List> roles) { return this; } + /** + *

    When the ticket was completed.

    + */ @JsonSetter(value = "completed_at", nulls = Nulls.SKIP) public Builder completedAt(Optional completedAt) { this.completedAt = completedAt; @@ -571,6 +659,9 @@ public Builder completedAt(OffsetDateTime completedAt) { return this; } + /** + *

    The 3rd party url of the Ticket.

    + */ @JsonSetter(value = "ticket_url", nulls = Nulls.SKIP) public Builder ticketUrl(Optional ticketUrl) { this.ticketUrl = ticketUrl; @@ -582,6 +673,15 @@ public Builder ticketUrl(String ticketUrl) { return this; } + /** + *

    The priority or urgency of the Ticket.

    + *
      + *
    • URGENT - URGENT
    • + *
    • HIGH - HIGH
    • + *
    • NORMAL - NORMAL
    • + *
    • LOW - LOW
    • + *
    + */ @JsonSetter(value = "priority", nulls = Nulls.SKIP) public Builder priority(Optional priority) { this.priority = priority; @@ -640,6 +740,7 @@ public PatchedTicketRequest build() { account, contact, parentTicket, + accessLevel, tags, roles, completedAt, diff --git a/src/main/java/com/merge/api/ticketing/types/PatchedTicketRequestAccessLevel.java b/src/main/java/com/merge/api/ticketing/types/PatchedTicketRequestAccessLevel.java new file mode 100644 index 000000000..133eb7098 --- /dev/null +++ b/src/main/java/com/merge/api/ticketing/types/PatchedTicketRequestAccessLevel.java @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ticketing.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = PatchedTicketRequestAccessLevel.Deserializer.class) +public final class PatchedTicketRequestAccessLevel { + private final Object value; + + private final int type; + + private PatchedTicketRequestAccessLevel(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((TicketAccessLevelEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PatchedTicketRequestAccessLevel && equalTo((PatchedTicketRequestAccessLevel) other); + } + + private boolean equalTo(PatchedTicketRequestAccessLevel other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static PatchedTicketRequestAccessLevel of(TicketAccessLevelEnum value) { + return new PatchedTicketRequestAccessLevel(value, 0); + } + + public static PatchedTicketRequestAccessLevel of(String value) { + return new PatchedTicketRequestAccessLevel(value, 1); + } + + public interface Visitor { + T visit(TicketAccessLevelEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(PatchedTicketRequestAccessLevel.class); + } + + @java.lang.Override + public PatchedTicketRequestAccessLevel deserialize(JsonParser p, DeserializationContext context) + throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TicketAccessLevelEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ticketing/types/PatchedTicketRequestStatus.java b/src/main/java/com/merge/api/ticketing/types/PatchedTicketRequestStatus.java new file mode 100644 index 000000000..c88cb8ce5 --- /dev/null +++ b/src/main/java/com/merge/api/ticketing/types/PatchedTicketRequestStatus.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ticketing.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = PatchedTicketRequestStatus.Deserializer.class) +public final class PatchedTicketRequestStatus { + private final Object value; + + private final int type; + + private PatchedTicketRequestStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((TicketStatusEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof PatchedTicketRequestStatus && equalTo((PatchedTicketRequestStatus) other); + } + + private boolean equalTo(PatchedTicketRequestStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static PatchedTicketRequestStatus of(TicketStatusEnum value) { + return new PatchedTicketRequestStatus(value, 0); + } + + public static PatchedTicketRequestStatus of(String value) { + return new PatchedTicketRequestStatus(value, 1); + } + + public interface Visitor { + T visit(TicketStatusEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(PatchedTicketRequestStatus.class); + } + + @java.lang.Override + public PatchedTicketRequestStatus deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TicketStatusEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ticketing/types/Project.java b/src/main/java/com/merge/api/ticketing/types/Project.java index 7addef518..6c8b7f97b 100644 --- a/src/main/java/com/merge/api/ticketing/types/Project.java +++ b/src/main/java/com/merge/api/ticketing/types/Project.java @@ -224,6 +224,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -235,6 +238,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -246,6 +252,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -257,6 +266,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The project's name.

    + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -268,6 +280,9 @@ public Builder name(String name) { return this; } + /** + *

    The project's description.

    + */ @JsonSetter(value = "description", nulls = Nulls.SKIP) public Builder description(Optional description) { this.description = description; @@ -279,6 +294,9 @@ public Builder description(String description) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/ticketing/types/ProjectsListRequest.java b/src/main/java/com/merge/api/ticketing/types/ProjectsListRequest.java index f2ac16fc2..1fd1d2dfa 100644 --- a/src/main/java/com/merge/api/ticketing/types/ProjectsListRequest.java +++ b/src/main/java/com/merge/api/ticketing/types/ProjectsListRequest.java @@ -237,6 +237,9 @@ public Builder from(ProjectsListRequest other) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -248,6 +251,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -259,6 +265,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -270,6 +279,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -281,6 +293,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -292,6 +307,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -303,6 +321,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -314,6 +335,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -325,6 +349,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -336,6 +363,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; diff --git a/src/main/java/com/merge/api/ticketing/types/ProjectsRetrieveRequest.java b/src/main/java/com/merge/api/ticketing/types/ProjectsRetrieveRequest.java index cfc19bed9..96ccd494f 100644 --- a/src/main/java/com/merge/api/ticketing/types/ProjectsRetrieveRequest.java +++ b/src/main/java/com/merge/api/ticketing/types/ProjectsRetrieveRequest.java @@ -97,6 +97,9 @@ public Builder from(ProjectsRetrieveRequest other) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -108,6 +111,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/ticketing/types/ProjectsUsersListRequest.java b/src/main/java/com/merge/api/ticketing/types/ProjectsUsersListRequest.java index ee1bf3ed3..bcd2cf096 100644 --- a/src/main/java/com/merge/api/ticketing/types/ProjectsUsersListRequest.java +++ b/src/main/java/com/merge/api/ticketing/types/ProjectsUsersListRequest.java @@ -170,6 +170,9 @@ public Builder from(ProjectsUsersListRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -186,6 +189,9 @@ public Builder expand(ProjectsUsersListRequestExpandItem expand) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -197,6 +203,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -208,6 +217,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -219,6 +231,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -230,6 +245,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; diff --git a/src/main/java/com/merge/api/ticketing/types/RemoteData.java b/src/main/java/com/merge/api/ticketing/types/RemoteData.java index 92e2f4a42..e955df50b 100644 --- a/src/main/java/com/merge/api/ticketing/types/RemoteData.java +++ b/src/main/java/com/merge/api/ticketing/types/RemoteData.java @@ -77,6 +77,9 @@ public static PathStage builder() { } public interface PathStage { + /** + * The third-party API path that is being called. + */ _FinalStage path(@NotNull String path); Builder from(RemoteData other); @@ -109,7 +112,7 @@ public Builder from(RemoteData other) { } /** - *

    The third-party API path that is being called.

    + * The third-party API path that is being called.

    The third-party API path that is being called.

    * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override diff --git a/src/main/java/com/merge/api/ticketing/types/RemoteFieldsRetrieveRequest.java b/src/main/java/com/merge/api/ticketing/types/RemoteFieldsRetrieveRequest.java index a9049d17b..c02564488 100644 --- a/src/main/java/com/merge/api/ticketing/types/RemoteFieldsRetrieveRequest.java +++ b/src/main/java/com/merge/api/ticketing/types/RemoteFieldsRetrieveRequest.java @@ -97,6 +97,9 @@ public Builder from(RemoteFieldsRetrieveRequest other) { return this; } + /** + *

    A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models.

    + */ @JsonSetter(value = "common_models", nulls = Nulls.SKIP) public Builder commonModels(Optional commonModels) { this.commonModels = commonModels; @@ -108,6 +111,9 @@ public Builder commonModels(String commonModels) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_example_values", nulls = Nulls.SKIP) public Builder includeExampleValues(Optional includeExampleValues) { this.includeExampleValues = includeExampleValues; diff --git a/src/main/java/com/merge/api/ticketing/types/RemoteKeyForRegenerationRequest.java b/src/main/java/com/merge/api/ticketing/types/RemoteKeyForRegenerationRequest.java index 13f05201b..749fcab0c 100644 --- a/src/main/java/com/merge/api/ticketing/types/RemoteKeyForRegenerationRequest.java +++ b/src/main/java/com/merge/api/ticketing/types/RemoteKeyForRegenerationRequest.java @@ -66,6 +66,9 @@ public static NameStage builder() { } public interface NameStage { + /** + * The name of the remote key + */ _FinalStage name(@NotNull String name); Builder from(RemoteKeyForRegenerationRequest other); @@ -91,7 +94,7 @@ public Builder from(RemoteKeyForRegenerationRequest other) { } /** - *

    The name of the remote key

    + * The name of the remote key

    The name of the remote key

    * @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override diff --git a/src/main/java/com/merge/api/ticketing/types/RemoteResponse.java b/src/main/java/com/merge/api/ticketing/types/RemoteResponse.java index 67abce896..b7461b430 100644 --- a/src/main/java/com/merge/api/ticketing/types/RemoteResponse.java +++ b/src/main/java/com/merge/api/ticketing/types/RemoteResponse.java @@ -32,7 +32,7 @@ public final class RemoteResponse { private final Optional> responseHeaders; - private final Optional responseType; + private final Optional responseType; private final Optional> headers; @@ -44,7 +44,7 @@ private RemoteResponse( int status, JsonNode response, Optional> responseHeaders, - Optional responseType, + Optional responseType, Optional> headers, Map additionalProperties) { this.method = method; @@ -83,7 +83,7 @@ public Optional> getResponseHeaders() { } @JsonProperty("response_type") - public Optional getResponseType() { + public Optional getResponseType() { return responseType; } @@ -159,9 +159,9 @@ public interface _FinalStage { _FinalStage responseHeaders(Map responseHeaders); - _FinalStage responseType(Optional responseType); + _FinalStage responseType(Optional responseType); - _FinalStage responseType(ResponseTypeEnum responseType); + _FinalStage responseType(RemoteResponseResponseType responseType); _FinalStage headers(Optional> headers); @@ -180,7 +180,7 @@ public static final class Builder implements MethodStage, PathStage, StatusStage private Optional> headers = Optional.empty(); - private Optional responseType = Optional.empty(); + private Optional responseType = Optional.empty(); private Optional> responseHeaders = Optional.empty(); @@ -243,14 +243,14 @@ public _FinalStage headers(Optional> headers) { } @java.lang.Override - public _FinalStage responseType(ResponseTypeEnum responseType) { + public _FinalStage responseType(RemoteResponseResponseType responseType) { this.responseType = Optional.ofNullable(responseType); return this; } @java.lang.Override @JsonSetter(value = "response_type", nulls = Nulls.SKIP) - public _FinalStage responseType(Optional responseType) { + public _FinalStage responseType(Optional responseType) { this.responseType = responseType; return this; } diff --git a/src/main/java/com/merge/api/ticketing/types/RemoteResponseResponseType.java b/src/main/java/com/merge/api/ticketing/types/RemoteResponseResponseType.java new file mode 100644 index 000000000..73d97130d --- /dev/null +++ b/src/main/java/com/merge/api/ticketing/types/RemoteResponseResponseType.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ticketing.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = RemoteResponseResponseType.Deserializer.class) +public final class RemoteResponseResponseType { + private final Object value; + + private final int type; + + private RemoteResponseResponseType(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((ResponseTypeEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof RemoteResponseResponseType && equalTo((RemoteResponseResponseType) other); + } + + private boolean equalTo(RemoteResponseResponseType other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static RemoteResponseResponseType of(ResponseTypeEnum value) { + return new RemoteResponseResponseType(value, 0); + } + + public static RemoteResponseResponseType of(String value) { + return new RemoteResponseResponseType(value, 1); + } + + public interface Visitor { + T visit(ResponseTypeEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(RemoteResponseResponseType.class); + } + + @java.lang.Override + public RemoteResponseResponseType deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, ResponseTypeEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ticketing/types/Role.java b/src/main/java/com/merge/api/ticketing/types/Role.java index f95e2d44f..97574a29a 100644 --- a/src/main/java/com/merge/api/ticketing/types/Role.java +++ b/src/main/java/com/merge/api/ticketing/types/Role.java @@ -33,9 +33,9 @@ public final class Role { private final Optional name; - private final Optional> ticketActions; + private final Optional>> ticketActions; - private final Optional ticketAccess; + private final Optional ticketAccess; private final Optional remoteWasDeleted; @@ -51,8 +51,8 @@ private Role( Optional createdAt, Optional modifiedAt, Optional name, - Optional> ticketActions, - Optional ticketAccess, + Optional>> ticketActions, + Optional ticketAccess, Optional remoteWasDeleted, Optional> fieldMappings, Optional> remoteData, @@ -111,7 +111,7 @@ public Optional getName() { * @return The set of actions that a User with this Role can perform. Possible enum values include: VIEW, CREATE, EDIT, DELETE, CLOSE, and ASSIGN. */ @JsonProperty("ticket_actions") - public Optional> getTicketActions() { + public Optional>> getTicketActions() { return ticketActions; } @@ -124,7 +124,7 @@ public Optional> getTicketActions() { * */ @JsonProperty("ticket_access") - public Optional getTicketAccess() { + public Optional getTicketAccess() { return ticketAccess; } @@ -206,9 +206,9 @@ public static final class Builder { private Optional name = Optional.empty(); - private Optional> ticketActions = Optional.empty(); + private Optional>> ticketActions = Optional.empty(); - private Optional ticketAccess = Optional.empty(); + private Optional ticketAccess = Optional.empty(); private Optional remoteWasDeleted = Optional.empty(); @@ -246,6 +246,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -257,6 +260,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -268,6 +274,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -279,6 +288,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The name of the Role.

    + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -290,28 +302,42 @@ public Builder name(String name) { return this; } + /** + *

    The set of actions that a User with this Role can perform. Possible enum values include: VIEW, CREATE, EDIT, DELETE, CLOSE, and ASSIGN.

    + */ @JsonSetter(value = "ticket_actions", nulls = Nulls.SKIP) - public Builder ticketActions(Optional> ticketActions) { + public Builder ticketActions(Optional>> ticketActions) { this.ticketActions = ticketActions; return this; } - public Builder ticketActions(List ticketActions) { + public Builder ticketActions(List> ticketActions) { this.ticketActions = Optional.ofNullable(ticketActions); return this; } + /** + *

    The level of Ticket access that a User with this Role can perform.

    + *
      + *
    • ALL - ALL
    • + *
    • ASSIGNED_ONLY - ASSIGNED_ONLY
    • + *
    • TEAM_ONLY - TEAM_ONLY
    • + *
    + */ @JsonSetter(value = "ticket_access", nulls = Nulls.SKIP) - public Builder ticketAccess(Optional ticketAccess) { + public Builder ticketAccess(Optional ticketAccess) { this.ticketAccess = ticketAccess; return this; } - public Builder ticketAccess(TicketAccessEnum ticketAccess) { + public Builder ticketAccess(RoleTicketAccess ticketAccess) { this.ticketAccess = Optional.ofNullable(ticketAccess); return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/ticketing/types/RoleTicketAccess.java b/src/main/java/com/merge/api/ticketing/types/RoleTicketAccess.java new file mode 100644 index 000000000..ed7d02e75 --- /dev/null +++ b/src/main/java/com/merge/api/ticketing/types/RoleTicketAccess.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ticketing.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = RoleTicketAccess.Deserializer.class) +public final class RoleTicketAccess { + private final Object value; + + private final int type; + + private RoleTicketAccess(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((TicketAccessEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof RoleTicketAccess && equalTo((RoleTicketAccess) other); + } + + private boolean equalTo(RoleTicketAccess other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static RoleTicketAccess of(TicketAccessEnum value) { + return new RoleTicketAccess(value, 0); + } + + public static RoleTicketAccess of(String value) { + return new RoleTicketAccess(value, 1); + } + + public interface Visitor { + T visit(TicketAccessEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(RoleTicketAccess.class); + } + + @java.lang.Override + public RoleTicketAccess deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TicketAccessEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ticketing/types/RoleTicketActionsItem.java b/src/main/java/com/merge/api/ticketing/types/RoleTicketActionsItem.java new file mode 100644 index 000000000..71e3a1a7b --- /dev/null +++ b/src/main/java/com/merge/api/ticketing/types/RoleTicketActionsItem.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ticketing.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = RoleTicketActionsItem.Deserializer.class) +public final class RoleTicketActionsItem { + private final Object value; + + private final int type; + + private RoleTicketActionsItem(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((TicketActionsEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof RoleTicketActionsItem && equalTo((RoleTicketActionsItem) other); + } + + private boolean equalTo(RoleTicketActionsItem other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static RoleTicketActionsItem of(TicketActionsEnum value) { + return new RoleTicketActionsItem(value, 0); + } + + public static RoleTicketActionsItem of(String value) { + return new RoleTicketActionsItem(value, 1); + } + + public interface Visitor { + T visit(TicketActionsEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(RoleTicketActionsItem.class); + } + + @java.lang.Override + public RoleTicketActionsItem deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TicketActionsEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ticketing/types/RolesListRequest.java b/src/main/java/com/merge/api/ticketing/types/RolesListRequest.java index ed9c345bb..0ae125024 100644 --- a/src/main/java/com/merge/api/ticketing/types/RolesListRequest.java +++ b/src/main/java/com/merge/api/ticketing/types/RolesListRequest.java @@ -237,6 +237,9 @@ public Builder from(RolesListRequest other) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -248,6 +251,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -259,6 +265,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -270,6 +279,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -281,6 +293,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -292,6 +307,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -303,6 +321,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -314,6 +335,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -325,6 +349,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -336,6 +363,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; diff --git a/src/main/java/com/merge/api/ticketing/types/RolesRetrieveRequest.java b/src/main/java/com/merge/api/ticketing/types/RolesRetrieveRequest.java index 2f73ccadd..30d3f33a3 100644 --- a/src/main/java/com/merge/api/ticketing/types/RolesRetrieveRequest.java +++ b/src/main/java/com/merge/api/ticketing/types/RolesRetrieveRequest.java @@ -97,6 +97,9 @@ public Builder from(RolesRetrieveRequest other) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -108,6 +111,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/ticketing/types/SyncStatus.java b/src/main/java/com/merge/api/ticketing/types/SyncStatus.java index eac22113e..a204b16a8 100644 --- a/src/main/java/com/merge/api/ticketing/types/SyncStatus.java +++ b/src/main/java/com/merge/api/ticketing/types/SyncStatus.java @@ -30,11 +30,11 @@ public final class SyncStatus { private final Optional nextSyncStart; - private final Optional lastSyncResult; + private final Optional lastSyncResult; private final Optional lastSyncFinished; - private final StatusFd5Enum status; + private final SyncStatusStatus status; private final boolean isInitialSync; @@ -47,9 +47,9 @@ private SyncStatus( String modelId, Optional lastSyncStart, Optional nextSyncStart, - Optional lastSyncResult, + Optional lastSyncResult, Optional lastSyncFinished, - StatusFd5Enum status, + SyncStatusStatus status, boolean isInitialSync, Optional selectiveSyncConfigurationsUsage, Map additionalProperties) { @@ -86,7 +86,7 @@ public Optional getNextSyncStart() { } @JsonProperty("last_sync_result") - public Optional getLastSyncResult() { + public Optional getLastSyncResult() { return lastSyncResult; } @@ -96,7 +96,7 @@ public Optional getLastSyncFinished() { } @JsonProperty("status") - public StatusFd5Enum getStatus() { + public SyncStatusStatus getStatus() { return status; } @@ -167,7 +167,7 @@ public interface ModelIdStage { } public interface StatusStage { - IsInitialSyncStage status(@NotNull StatusFd5Enum status); + IsInitialSyncStage status(@NotNull SyncStatusStatus status); } public interface IsInitialSyncStage { @@ -185,9 +185,9 @@ public interface _FinalStage { _FinalStage nextSyncStart(OffsetDateTime nextSyncStart); - _FinalStage lastSyncResult(Optional lastSyncResult); + _FinalStage lastSyncResult(Optional lastSyncResult); - _FinalStage lastSyncResult(LastSyncResultEnum lastSyncResult); + _FinalStage lastSyncResult(SyncStatusLastSyncResult lastSyncResult); _FinalStage lastSyncFinished(Optional lastSyncFinished); @@ -207,7 +207,7 @@ public static final class Builder private String modelId; - private StatusFd5Enum status; + private SyncStatusStatus status; private boolean isInitialSync; @@ -215,7 +215,7 @@ public static final class Builder private Optional lastSyncFinished = Optional.empty(); - private Optional lastSyncResult = Optional.empty(); + private Optional lastSyncResult = Optional.empty(); private Optional nextSyncStart = Optional.empty(); @@ -256,7 +256,7 @@ public StatusStage modelId(@NotNull String modelId) { @java.lang.Override @JsonSetter("status") - public IsInitialSyncStage status(@NotNull StatusFd5Enum status) { + public IsInitialSyncStage status(@NotNull SyncStatusStatus status) { this.status = status; return this; } @@ -297,14 +297,14 @@ public _FinalStage lastSyncFinished(Optional lastSyncFinished) { } @java.lang.Override - public _FinalStage lastSyncResult(LastSyncResultEnum lastSyncResult) { + public _FinalStage lastSyncResult(SyncStatusLastSyncResult lastSyncResult) { this.lastSyncResult = Optional.ofNullable(lastSyncResult); return this; } @java.lang.Override @JsonSetter(value = "last_sync_result", nulls = Nulls.SKIP) - public _FinalStage lastSyncResult(Optional lastSyncResult) { + public _FinalStage lastSyncResult(Optional lastSyncResult) { this.lastSyncResult = lastSyncResult; return this; } diff --git a/src/main/java/com/merge/api/ticketing/types/SyncStatusLastSyncResult.java b/src/main/java/com/merge/api/ticketing/types/SyncStatusLastSyncResult.java new file mode 100644 index 000000000..70ce30a3b --- /dev/null +++ b/src/main/java/com/merge/api/ticketing/types/SyncStatusLastSyncResult.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ticketing.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = SyncStatusLastSyncResult.Deserializer.class) +public final class SyncStatusLastSyncResult { + private final Object value; + + private final int type; + + private SyncStatusLastSyncResult(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((LastSyncResultEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SyncStatusLastSyncResult && equalTo((SyncStatusLastSyncResult) other); + } + + private boolean equalTo(SyncStatusLastSyncResult other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static SyncStatusLastSyncResult of(LastSyncResultEnum value) { + return new SyncStatusLastSyncResult(value, 0); + } + + public static SyncStatusLastSyncResult of(String value) { + return new SyncStatusLastSyncResult(value, 1); + } + + public interface Visitor { + T visit(LastSyncResultEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(SyncStatusLastSyncResult.class); + } + + @java.lang.Override + public SyncStatusLastSyncResult deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, LastSyncResultEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ticketing/types/SyncStatusListRequest.java b/src/main/java/com/merge/api/ticketing/types/SyncStatusListRequest.java index 898bfb96c..6d058222e 100644 --- a/src/main/java/com/merge/api/ticketing/types/SyncStatusListRequest.java +++ b/src/main/java/com/merge/api/ticketing/types/SyncStatusListRequest.java @@ -95,6 +95,9 @@ public Builder from(SyncStatusListRequest other) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -106,6 +109,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; diff --git a/src/main/java/com/merge/api/ticketing/types/SyncStatusStatus.java b/src/main/java/com/merge/api/ticketing/types/SyncStatusStatus.java new file mode 100644 index 000000000..1495b3e5d --- /dev/null +++ b/src/main/java/com/merge/api/ticketing/types/SyncStatusStatus.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ticketing.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = SyncStatusStatus.Deserializer.class) +public final class SyncStatusStatus { + private final Object value; + + private final int type; + + private SyncStatusStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((StatusFd5Enum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof SyncStatusStatus && equalTo((SyncStatusStatus) other); + } + + private boolean equalTo(SyncStatusStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static SyncStatusStatus of(StatusFd5Enum value) { + return new SyncStatusStatus(value, 0); + } + + public static SyncStatusStatus of(String value) { + return new SyncStatusStatus(value, 1); + } + + public interface Visitor { + T visit(StatusFd5Enum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(SyncStatusStatus.class); + } + + @java.lang.Override + public SyncStatusStatus deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, StatusFd5Enum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ticketing/types/Tag.java b/src/main/java/com/merge/api/ticketing/types/Tag.java index 8b2b4c4e2..31463e518 100644 --- a/src/main/java/com/merge/api/ticketing/types/Tag.java +++ b/src/main/java/com/merge/api/ticketing/types/Tag.java @@ -196,6 +196,9 @@ public Builder from(Tag other) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -207,6 +210,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -218,6 +224,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -240,6 +249,9 @@ public Builder id(String id) { return this; } + /** + *

    The tag's name.

    + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -251,6 +263,9 @@ public Builder name(String name) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/ticketing/types/TagsListRequest.java b/src/main/java/com/merge/api/ticketing/types/TagsListRequest.java index 27503859b..1a40d1e87 100644 --- a/src/main/java/com/merge/api/ticketing/types/TagsListRequest.java +++ b/src/main/java/com/merge/api/ticketing/types/TagsListRequest.java @@ -237,6 +237,9 @@ public Builder from(TagsListRequest other) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -248,6 +251,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -259,6 +265,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -270,6 +279,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -281,6 +293,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -292,6 +307,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -303,6 +321,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -314,6 +335,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -325,6 +349,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -336,6 +363,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; diff --git a/src/main/java/com/merge/api/ticketing/types/TagsRetrieveRequest.java b/src/main/java/com/merge/api/ticketing/types/TagsRetrieveRequest.java index 3395138bf..06679f255 100644 --- a/src/main/java/com/merge/api/ticketing/types/TagsRetrieveRequest.java +++ b/src/main/java/com/merge/api/ticketing/types/TagsRetrieveRequest.java @@ -97,6 +97,9 @@ public Builder from(TagsRetrieveRequest other) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -108,6 +111,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/ticketing/types/Team.java b/src/main/java/com/merge/api/ticketing/types/Team.java index dd05e6944..c22e14db1 100644 --- a/src/main/java/com/merge/api/ticketing/types/Team.java +++ b/src/main/java/com/merge/api/ticketing/types/Team.java @@ -224,6 +224,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -235,6 +238,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -246,6 +252,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -257,6 +266,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The team's name.

    + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -268,6 +280,9 @@ public Builder name(String name) { return this; } + /** + *

    The team's description.

    + */ @JsonSetter(value = "description", nulls = Nulls.SKIP) public Builder description(Optional description) { this.description = description; @@ -279,6 +294,9 @@ public Builder description(String description) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/ticketing/types/TeamsListRequest.java b/src/main/java/com/merge/api/ticketing/types/TeamsListRequest.java index 3b282004b..151cc4fa2 100644 --- a/src/main/java/com/merge/api/ticketing/types/TeamsListRequest.java +++ b/src/main/java/com/merge/api/ticketing/types/TeamsListRequest.java @@ -237,6 +237,9 @@ public Builder from(TeamsListRequest other) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -248,6 +251,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -259,6 +265,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -270,6 +279,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -281,6 +293,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -292,6 +307,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -303,6 +321,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -314,6 +335,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -325,6 +349,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -336,6 +363,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; diff --git a/src/main/java/com/merge/api/ticketing/types/TeamsRetrieveRequest.java b/src/main/java/com/merge/api/ticketing/types/TeamsRetrieveRequest.java index 130491c4b..d831123a6 100644 --- a/src/main/java/com/merge/api/ticketing/types/TeamsRetrieveRequest.java +++ b/src/main/java/com/merge/api/ticketing/types/TeamsRetrieveRequest.java @@ -97,6 +97,9 @@ public Builder from(TeamsRetrieveRequest other) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -108,6 +111,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/ticketing/types/Ticket.java b/src/main/java/com/merge/api/ticketing/types/Ticket.java index 4880ee8f0..3a1cb6e45 100644 --- a/src/main/java/com/merge/api/ticketing/types/Ticket.java +++ b/src/main/java/com/merge/api/ticketing/types/Ticket.java @@ -41,7 +41,7 @@ public final class Ticket { private final Optional dueDate; - private final Optional status; + private final Optional status; private final Optional description; @@ -57,10 +57,16 @@ public final class Ticket { private final Optional>> attachments; + private final Optional accessLevel; + private final Optional>> tags; private final Optional>> roles; + private final Optional ticketUrl; + + private final Optional priority; + private final Optional remoteCreatedAt; private final Optional remoteUpdatedAt; @@ -69,10 +75,6 @@ public final class Ticket { private final Optional remoteWasDeleted; - private final Optional ticketUrl; - - private final Optional priority; - private final Optional> fieldMappings; private final Optional> remoteData; @@ -91,7 +93,7 @@ private Ticket( Optional>> assignedTeams, Optional creator, Optional dueDate, - Optional status, + Optional status, Optional description, Optional>> collections, Optional ticketType, @@ -99,14 +101,15 @@ private Ticket( Optional contact, Optional parentTicket, Optional>> attachments, + Optional accessLevel, Optional>> tags, Optional>> roles, + Optional ticketUrl, + Optional priority, Optional remoteCreatedAt, Optional remoteUpdatedAt, Optional completedAt, Optional remoteWasDeleted, - Optional ticketUrl, - Optional priority, Optional> fieldMappings, Optional> remoteData, Optional> remoteFields, @@ -128,14 +131,15 @@ private Ticket( this.contact = contact; this.parentTicket = parentTicket; this.attachments = attachments; + this.accessLevel = accessLevel; this.tags = tags; this.roles = roles; + this.ticketUrl = ticketUrl; + this.priority = priority; this.remoteCreatedAt = remoteCreatedAt; this.remoteUpdatedAt = remoteUpdatedAt; this.completedAt = completedAt; this.remoteWasDeleted = remoteWasDeleted; - this.ticketUrl = ticketUrl; - this.priority = priority; this.fieldMappings = fieldMappings; this.remoteData = remoteData; this.remoteFields = remoteFields; @@ -221,7 +225,7 @@ public Optional getDueDate() { * */ @JsonProperty("status") - public Optional getStatus() { + public Optional getStatus() { return status; } @@ -278,6 +282,20 @@ public Optional>> getAttachments() { return attachments; } + /** + * @return The description of who is able to access a given ticket, or where access is inherited from. + *
      + *
    • COMPANY - COMPANY
    • + *
    • PUBLIC - PUBLIC
    • + *
    • PRIVATE - PRIVATE
    • + *
    • COLLECTION - COLLECTION
    • + *
    + */ + @JsonProperty("access_level") + public Optional getAccessLevel() { + return accessLevel; + } + @JsonProperty("tags") public Optional>> getTags() { return tags; @@ -288,6 +306,28 @@ public Optional>> getRoles() { return roles; } + /** + * @return The 3rd party url of the Ticket. + */ + @JsonProperty("ticket_url") + public Optional getTicketUrl() { + return ticketUrl; + } + + /** + * @return The priority or urgency of the Ticket. + *
      + *
    • URGENT - URGENT
    • + *
    • HIGH - HIGH
    • + *
    • NORMAL - NORMAL
    • + *
    • LOW - LOW
    • + *
    + */ + @JsonProperty("priority") + public Optional getPriority() { + return priority; + } + /** * @return When the third party's ticket was created. */ @@ -320,28 +360,6 @@ public Optional getRemoteWasDeleted() { return remoteWasDeleted; } - /** - * @return The 3rd party url of the Ticket. - */ - @JsonProperty("ticket_url") - public Optional getTicketUrl() { - return ticketUrl; - } - - /** - * @return The priority or urgency of the Ticket. - *
      - *
    • URGENT - URGENT
    • - *
    • HIGH - HIGH
    • - *
    • NORMAL - NORMAL
    • - *
    • LOW - LOW
    • - *
    - */ - @JsonProperty("priority") - public Optional getPriority() { - return priority; - } - @JsonProperty("field_mappings") public Optional> getFieldMappings() { return fieldMappings; @@ -386,14 +404,15 @@ private boolean equalTo(Ticket other) { && contact.equals(other.contact) && parentTicket.equals(other.parentTicket) && attachments.equals(other.attachments) + && accessLevel.equals(other.accessLevel) && tags.equals(other.tags) && roles.equals(other.roles) + && ticketUrl.equals(other.ticketUrl) + && priority.equals(other.priority) && remoteCreatedAt.equals(other.remoteCreatedAt) && remoteUpdatedAt.equals(other.remoteUpdatedAt) && completedAt.equals(other.completedAt) && remoteWasDeleted.equals(other.remoteWasDeleted) - && ticketUrl.equals(other.ticketUrl) - && priority.equals(other.priority) && fieldMappings.equals(other.fieldMappings) && remoteData.equals(other.remoteData) && remoteFields.equals(other.remoteFields); @@ -419,14 +438,15 @@ public int hashCode() { this.contact, this.parentTicket, this.attachments, + this.accessLevel, this.tags, this.roles, + this.ticketUrl, + this.priority, this.remoteCreatedAt, this.remoteUpdatedAt, this.completedAt, this.remoteWasDeleted, - this.ticketUrl, - this.priority, this.fieldMappings, this.remoteData, this.remoteFields); @@ -461,7 +481,7 @@ public static final class Builder { private Optional dueDate = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Optional description = Optional.empty(); @@ -477,10 +497,16 @@ public static final class Builder { private Optional>> attachments = Optional.empty(); + private Optional accessLevel = Optional.empty(); + private Optional>> tags = Optional.empty(); private Optional>> roles = Optional.empty(); + private Optional ticketUrl = Optional.empty(); + + private Optional priority = Optional.empty(); + private Optional remoteCreatedAt = Optional.empty(); private Optional remoteUpdatedAt = Optional.empty(); @@ -489,10 +515,6 @@ public static final class Builder { private Optional remoteWasDeleted = Optional.empty(); - private Optional ticketUrl = Optional.empty(); - - private Optional priority = Optional.empty(); - private Optional> fieldMappings = Optional.empty(); private Optional> remoteData = Optional.empty(); @@ -522,14 +544,15 @@ public Builder from(Ticket other) { contact(other.getContact()); parentTicket(other.getParentTicket()); attachments(other.getAttachments()); + accessLevel(other.getAccessLevel()); tags(other.getTags()); roles(other.getRoles()); + ticketUrl(other.getTicketUrl()); + priority(other.getPriority()); remoteCreatedAt(other.getRemoteCreatedAt()); remoteUpdatedAt(other.getRemoteUpdatedAt()); completedAt(other.getCompletedAt()); remoteWasDeleted(other.getRemoteWasDeleted()); - ticketUrl(other.getTicketUrl()); - priority(other.getPriority()); fieldMappings(other.getFieldMappings()); remoteData(other.getRemoteData()); remoteFields(other.getRemoteFields()); @@ -547,6 +570,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -558,6 +584,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -569,6 +598,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -580,6 +612,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The ticket's name.

    + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -591,6 +626,9 @@ public Builder name(String name) { return this; } + /** + *

    The individual Users who are assigned to this ticket. This does not include Users who just have view access to this ticket. To fetch all Users and Teams that can access the ticket, use the GET /tickets/{ticket_id}/viewers endpoint.

    + */ @JsonSetter(value = "assignees", nulls = Nulls.SKIP) public Builder assignees(Optional>> assignees) { this.assignees = assignees; @@ -602,6 +640,9 @@ public Builder assignees(List> assignees) { return this; } + /** + *

    The Teams that are assigned to this ticket. This does not include Teams who just have view access to this ticket. To fetch all Users and Teams that can access this ticket, use the GET /tickets/{ticket_id}/viewers endpoint.

    + */ @JsonSetter(value = "assigned_teams", nulls = Nulls.SKIP) public Builder assignedTeams(Optional>> assignedTeams) { this.assignedTeams = assignedTeams; @@ -613,6 +654,9 @@ public Builder assignedTeams(List> assignedTea return this; } + /** + *

    The user who created this ticket.

    + */ @JsonSetter(value = "creator", nulls = Nulls.SKIP) public Builder creator(Optional creator) { this.creator = creator; @@ -624,6 +668,9 @@ public Builder creator(TicketCreator creator) { return this; } + /** + *

    The ticket's due date.

    + */ @JsonSetter(value = "due_date", nulls = Nulls.SKIP) public Builder dueDate(Optional dueDate) { this.dueDate = dueDate; @@ -635,17 +682,29 @@ public Builder dueDate(OffsetDateTime dueDate) { return this; } + /** + *

    The current status of the ticket.

    + *
      + *
    • OPEN - OPEN
    • + *
    • CLOSED - CLOSED
    • + *
    • IN_PROGRESS - IN_PROGRESS
    • + *
    • ON_HOLD - ON_HOLD
    • + *
    + */ @JsonSetter(value = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { + public Builder status(Optional status) { this.status = status; return this; } - public Builder status(TicketStatusEnum status) { + public Builder status(TicketStatus status) { this.status = Optional.ofNullable(status); return this; } + /** + *

    The ticket’s description. HTML version of description is mapped if supported by the third-party platform.

    + */ @JsonSetter(value = "description", nulls = Nulls.SKIP) public Builder description(Optional description) { this.description = description; @@ -657,6 +716,9 @@ public Builder description(String description) { return this; } + /** + *

    The Collections that this Ticket is included in.

    + */ @JsonSetter(value = "collections", nulls = Nulls.SKIP) public Builder collections(Optional>> collections) { this.collections = collections; @@ -668,6 +730,9 @@ public Builder collections(List> collections) { return this; } + /** + *

    The sub category of the ticket within the 3rd party system. Examples include incident, task, subtask or to-do.

    + */ @JsonSetter(value = "ticket_type", nulls = Nulls.SKIP) public Builder ticketType(Optional ticketType) { this.ticketType = ticketType; @@ -679,6 +744,9 @@ public Builder ticketType(String ticketType) { return this; } + /** + *

    The account associated with the ticket.

    + */ @JsonSetter(value = "account", nulls = Nulls.SKIP) public Builder account(Optional account) { this.account = account; @@ -690,6 +758,9 @@ public Builder account(TicketAccount account) { return this; } + /** + *

    The contact associated with the ticket.

    + */ @JsonSetter(value = "contact", nulls = Nulls.SKIP) public Builder contact(Optional contact) { this.contact = contact; @@ -701,6 +772,9 @@ public Builder contact(TicketContact contact) { return this; } + /** + *

    The ticket's parent ticket.

    + */ @JsonSetter(value = "parent_ticket", nulls = Nulls.SKIP) public Builder parentTicket(Optional parentTicket) { this.parentTicket = parentTicket; @@ -723,6 +797,26 @@ public Builder attachments(List> attachments) { return this; } + /** + *

    The description of who is able to access a given ticket, or where access is inherited from.

    + *
      + *
    • COMPANY - COMPANY
    • + *
    • PUBLIC - PUBLIC
    • + *
    • PRIVATE - PRIVATE
    • + *
    • COLLECTION - COLLECTION
    • + *
    + */ + @JsonSetter(value = "access_level", nulls = Nulls.SKIP) + public Builder accessLevel(Optional accessLevel) { + this.accessLevel = accessLevel; + return this; + } + + public Builder accessLevel(TicketAccessLevel accessLevel) { + this.accessLevel = Optional.ofNullable(accessLevel); + return this; + } + @JsonSetter(value = "tags", nulls = Nulls.SKIP) public Builder tags(Optional>> tags) { this.tags = tags; @@ -745,6 +839,43 @@ public Builder roles(List> roles) { return this; } + /** + *

    The 3rd party url of the Ticket.

    + */ + @JsonSetter(value = "ticket_url", nulls = Nulls.SKIP) + public Builder ticketUrl(Optional ticketUrl) { + this.ticketUrl = ticketUrl; + return this; + } + + public Builder ticketUrl(String ticketUrl) { + this.ticketUrl = Optional.ofNullable(ticketUrl); + return this; + } + + /** + *

    The priority or urgency of the Ticket.

    + *
      + *
    • URGENT - URGENT
    • + *
    • HIGH - HIGH
    • + *
    • NORMAL - NORMAL
    • + *
    • LOW - LOW
    • + *
    + */ + @JsonSetter(value = "priority", nulls = Nulls.SKIP) + public Builder priority(Optional priority) { + this.priority = priority; + return this; + } + + public Builder priority(TicketPriority priority) { + this.priority = Optional.ofNullable(priority); + return this; + } + + /** + *

    When the third party's ticket was created.

    + */ @JsonSetter(value = "remote_created_at", nulls = Nulls.SKIP) public Builder remoteCreatedAt(Optional remoteCreatedAt) { this.remoteCreatedAt = remoteCreatedAt; @@ -756,6 +887,9 @@ public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { return this; } + /** + *

    When the third party's ticket was updated.

    + */ @JsonSetter(value = "remote_updated_at", nulls = Nulls.SKIP) public Builder remoteUpdatedAt(Optional remoteUpdatedAt) { this.remoteUpdatedAt = remoteUpdatedAt; @@ -767,6 +901,9 @@ public Builder remoteUpdatedAt(OffsetDateTime remoteUpdatedAt) { return this; } + /** + *

    When the ticket was completed.

    + */ @JsonSetter(value = "completed_at", nulls = Nulls.SKIP) public Builder completedAt(Optional completedAt) { this.completedAt = completedAt; @@ -778,6 +915,9 @@ public Builder completedAt(OffsetDateTime completedAt) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; @@ -789,28 +929,6 @@ public Builder remoteWasDeleted(Boolean remoteWasDeleted) { return this; } - @JsonSetter(value = "ticket_url", nulls = Nulls.SKIP) - public Builder ticketUrl(Optional ticketUrl) { - this.ticketUrl = ticketUrl; - return this; - } - - public Builder ticketUrl(String ticketUrl) { - this.ticketUrl = Optional.ofNullable(ticketUrl); - return this; - } - - @JsonSetter(value = "priority", nulls = Nulls.SKIP) - public Builder priority(Optional priority) { - this.priority = priority; - return this; - } - - public Builder priority(PriorityEnum priority) { - this.priority = Optional.ofNullable(priority); - return this; - } - @JsonSetter(value = "field_mappings", nulls = Nulls.SKIP) public Builder fieldMappings(Optional> fieldMappings) { this.fieldMappings = fieldMappings; @@ -863,14 +981,15 @@ public Ticket build() { contact, parentTicket, attachments, + accessLevel, tags, roles, + ticketUrl, + priority, remoteCreatedAt, remoteUpdatedAt, completedAt, remoteWasDeleted, - ticketUrl, - priority, fieldMappings, remoteData, remoteFields, diff --git a/src/main/java/com/merge/api/ticketing/types/TicketAccessLevel.java b/src/main/java/com/merge/api/ticketing/types/TicketAccessLevel.java new file mode 100644 index 000000000..b588382a8 --- /dev/null +++ b/src/main/java/com/merge/api/ticketing/types/TicketAccessLevel.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ticketing.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = TicketAccessLevel.Deserializer.class) +public final class TicketAccessLevel { + private final Object value; + + private final int type; + + private TicketAccessLevel(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((TicketAccessLevelEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof TicketAccessLevel && equalTo((TicketAccessLevel) other); + } + + private boolean equalTo(TicketAccessLevel other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static TicketAccessLevel of(TicketAccessLevelEnum value) { + return new TicketAccessLevel(value, 0); + } + + public static TicketAccessLevel of(String value) { + return new TicketAccessLevel(value, 1); + } + + public interface Visitor { + T visit(TicketAccessLevelEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(TicketAccessLevel.class); + } + + @java.lang.Override + public TicketAccessLevel deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TicketAccessLevelEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ticketing/types/AccessLevelEnum.java b/src/main/java/com/merge/api/ticketing/types/TicketAccessLevelEnum.java similarity index 74% rename from src/main/java/com/merge/api/ticketing/types/AccessLevelEnum.java rename to src/main/java/com/merge/api/ticketing/types/TicketAccessLevelEnum.java index 6917eb585..8b0a84762 100644 --- a/src/main/java/com/merge/api/ticketing/types/AccessLevelEnum.java +++ b/src/main/java/com/merge/api/ticketing/types/TicketAccessLevelEnum.java @@ -5,16 +5,18 @@ import com.fasterxml.jackson.annotation.JsonValue; -public enum AccessLevelEnum { - PRIVATE("PRIVATE"), - +public enum TicketAccessLevelEnum { COMPANY("COMPANY"), - PUBLIC("PUBLIC"); + PUBLIC("PUBLIC"), + + PRIVATE("PRIVATE"), + + COLLECTION("COLLECTION"); private final String value; - AccessLevelEnum(String value) { + TicketAccessLevelEnum(String value) { this.value = value; } diff --git a/src/main/java/com/merge/api/ticketing/types/TicketEndpointRequest.java b/src/main/java/com/merge/api/ticketing/types/TicketEndpointRequest.java index b4c5709c4..f68bbcf9b 100644 --- a/src/main/java/com/merge/api/ticketing/types/TicketEndpointRequest.java +++ b/src/main/java/com/merge/api/ticketing/types/TicketEndpointRequest.java @@ -99,10 +99,16 @@ public interface ModelStage { public interface _FinalStage { TicketEndpointRequest build(); + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ _FinalStage isDebugMode(Optional isDebugMode); _FinalStage isDebugMode(Boolean isDebugMode); + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ _FinalStage runAsync(Optional runAsync); _FinalStage runAsync(Boolean runAsync); @@ -146,6 +152,9 @@ public _FinalStage runAsync(Boolean runAsync) { return this; } + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ @java.lang.Override @JsonSetter(value = "run_async", nulls = Nulls.SKIP) public _FinalStage runAsync(Optional runAsync) { @@ -163,6 +172,9 @@ public _FinalStage isDebugMode(Boolean isDebugMode) { return this; } + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ @java.lang.Override @JsonSetter(value = "is_debug_mode", nulls = Nulls.SKIP) public _FinalStage isDebugMode(Optional isDebugMode) { diff --git a/src/main/java/com/merge/api/ticketing/types/TicketPriority.java b/src/main/java/com/merge/api/ticketing/types/TicketPriority.java new file mode 100644 index 000000000..77f208d57 --- /dev/null +++ b/src/main/java/com/merge/api/ticketing/types/TicketPriority.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ticketing.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = TicketPriority.Deserializer.class) +public final class TicketPriority { + private final Object value; + + private final int type; + + private TicketPriority(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((PriorityEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof TicketPriority && equalTo((TicketPriority) other); + } + + private boolean equalTo(TicketPriority other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static TicketPriority of(PriorityEnum value) { + return new TicketPriority(value, 0); + } + + public static TicketPriority of(String value) { + return new TicketPriority(value, 1); + } + + public interface Visitor { + T visit(PriorityEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(TicketPriority.class); + } + + @java.lang.Override + public TicketPriority deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, PriorityEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ticketing/types/TicketRequest.java b/src/main/java/com/merge/api/ticketing/types/TicketRequest.java index 96dbc19dc..848d44881 100644 --- a/src/main/java/com/merge/api/ticketing/types/TicketRequest.java +++ b/src/main/java/com/merge/api/ticketing/types/TicketRequest.java @@ -33,7 +33,7 @@ public final class TicketRequest { private final Optional dueDate; - private final Optional status; + private final Optional status; private final Optional description; @@ -49,6 +49,8 @@ public final class TicketRequest { private final Optional>> attachments; + private final Optional accessLevel; + private final Optional>> tags; private final Optional>> roles; @@ -57,7 +59,7 @@ public final class TicketRequest { private final Optional ticketUrl; - private final Optional priority; + private final Optional priority; private final Optional> integrationParams; @@ -73,7 +75,7 @@ private TicketRequest( Optional>> assignedTeams, Optional creator, Optional dueDate, - Optional status, + Optional status, Optional description, Optional>> collections, Optional ticketType, @@ -81,11 +83,12 @@ private TicketRequest( Optional contact, Optional parentTicket, Optional>> attachments, + Optional accessLevel, Optional>> tags, Optional>> roles, Optional completedAt, Optional ticketUrl, - Optional priority, + Optional priority, Optional> integrationParams, Optional> linkedAccountParams, Optional> remoteFields, @@ -103,6 +106,7 @@ private TicketRequest( this.contact = contact; this.parentTicket = parentTicket; this.attachments = attachments; + this.accessLevel = accessLevel; this.tags = tags; this.roles = roles; this.completedAt = completedAt; @@ -164,7 +168,7 @@ public Optional getDueDate() { * */ @JsonProperty("status") - public Optional getStatus() { + public Optional getStatus() { return status; } @@ -221,6 +225,20 @@ public Optional>> getAttachments() { return attachments; } + /** + * @return The description of who is able to access a given ticket, or where access is inherited from. + *
      + *
    • COMPANY - COMPANY
    • + *
    • PUBLIC - PUBLIC
    • + *
    • PRIVATE - PRIVATE
    • + *
    • COLLECTION - COLLECTION
    • + *
    + */ + @JsonProperty("access_level") + public Optional getAccessLevel() { + return accessLevel; + } + @JsonProperty("tags") public Optional>> getTags() { return tags; @@ -257,7 +275,7 @@ public Optional getTicketUrl() { * */ @JsonProperty("priority") - public Optional getPriority() { + public Optional getPriority() { return priority; } @@ -301,6 +319,7 @@ private boolean equalTo(TicketRequest other) { && contact.equals(other.contact) && parentTicket.equals(other.parentTicket) && attachments.equals(other.attachments) + && accessLevel.equals(other.accessLevel) && tags.equals(other.tags) && roles.equals(other.roles) && completedAt.equals(other.completedAt) @@ -327,6 +346,7 @@ public int hashCode() { this.contact, this.parentTicket, this.attachments, + this.accessLevel, this.tags, this.roles, this.completedAt, @@ -358,7 +378,7 @@ public static final class Builder { private Optional dueDate = Optional.empty(); - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); private Optional description = Optional.empty(); @@ -374,6 +394,8 @@ public static final class Builder { private Optional>> attachments = Optional.empty(); + private Optional accessLevel = Optional.empty(); + private Optional>> tags = Optional.empty(); private Optional>> roles = Optional.empty(); @@ -382,7 +404,7 @@ public static final class Builder { private Optional ticketUrl = Optional.empty(); - private Optional priority = Optional.empty(); + private Optional priority = Optional.empty(); private Optional> integrationParams = Optional.empty(); @@ -409,6 +431,7 @@ public Builder from(TicketRequest other) { contact(other.getContact()); parentTicket(other.getParentTicket()); attachments(other.getAttachments()); + accessLevel(other.getAccessLevel()); tags(other.getTags()); roles(other.getRoles()); completedAt(other.getCompletedAt()); @@ -420,6 +443,9 @@ public Builder from(TicketRequest other) { return this; } + /** + *

    The ticket's name.

    + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -431,6 +457,9 @@ public Builder name(String name) { return this; } + /** + *

    The individual Users who are assigned to this ticket. This does not include Users who just have view access to this ticket. To fetch all Users and Teams that can access the ticket, use the GET /tickets/{ticket_id}/viewers endpoint.

    + */ @JsonSetter(value = "assignees", nulls = Nulls.SKIP) public Builder assignees(Optional>> assignees) { this.assignees = assignees; @@ -442,6 +471,9 @@ public Builder assignees(List> assignees) { return this; } + /** + *

    The Teams that are assigned to this ticket. This does not include Teams who just have view access to this ticket. To fetch all Users and Teams that can access this ticket, use the GET /tickets/{ticket_id}/viewers endpoint.

    + */ @JsonSetter(value = "assigned_teams", nulls = Nulls.SKIP) public Builder assignedTeams(Optional>> assignedTeams) { this.assignedTeams = assignedTeams; @@ -453,6 +485,9 @@ public Builder assignedTeams(List> assi return this; } + /** + *

    The user who created this ticket.

    + */ @JsonSetter(value = "creator", nulls = Nulls.SKIP) public Builder creator(Optional creator) { this.creator = creator; @@ -464,6 +499,9 @@ public Builder creator(TicketRequestCreator creator) { return this; } + /** + *

    The ticket's due date.

    + */ @JsonSetter(value = "due_date", nulls = Nulls.SKIP) public Builder dueDate(Optional dueDate) { this.dueDate = dueDate; @@ -475,17 +513,29 @@ public Builder dueDate(OffsetDateTime dueDate) { return this; } + /** + *

    The current status of the ticket.

    + *
      + *
    • OPEN - OPEN
    • + *
    • CLOSED - CLOSED
    • + *
    • IN_PROGRESS - IN_PROGRESS
    • + *
    • ON_HOLD - ON_HOLD
    • + *
    + */ @JsonSetter(value = "status", nulls = Nulls.SKIP) - public Builder status(Optional status) { + public Builder status(Optional status) { this.status = status; return this; } - public Builder status(TicketStatusEnum status) { + public Builder status(TicketRequestStatus status) { this.status = Optional.ofNullable(status); return this; } + /** + *

    The ticket’s description. HTML version of description is mapped if supported by the third-party platform.

    + */ @JsonSetter(value = "description", nulls = Nulls.SKIP) public Builder description(Optional description) { this.description = description; @@ -497,6 +547,9 @@ public Builder description(String description) { return this; } + /** + *

    The Collections that this Ticket is included in.

    + */ @JsonSetter(value = "collections", nulls = Nulls.SKIP) public Builder collections(Optional>> collections) { this.collections = collections; @@ -508,6 +561,9 @@ public Builder collections(List> collecti return this; } + /** + *

    The sub category of the ticket within the 3rd party system. Examples include incident, task, subtask or to-do.

    + */ @JsonSetter(value = "ticket_type", nulls = Nulls.SKIP) public Builder ticketType(Optional ticketType) { this.ticketType = ticketType; @@ -519,6 +575,9 @@ public Builder ticketType(String ticketType) { return this; } + /** + *

    The account associated with the ticket.

    + */ @JsonSetter(value = "account", nulls = Nulls.SKIP) public Builder account(Optional account) { this.account = account; @@ -530,6 +589,9 @@ public Builder account(TicketRequestAccount account) { return this; } + /** + *

    The contact associated with the ticket.

    + */ @JsonSetter(value = "contact", nulls = Nulls.SKIP) public Builder contact(Optional contact) { this.contact = contact; @@ -541,6 +603,9 @@ public Builder contact(TicketRequestContact contact) { return this; } + /** + *

    The ticket's parent ticket.

    + */ @JsonSetter(value = "parent_ticket", nulls = Nulls.SKIP) public Builder parentTicket(Optional parentTicket) { this.parentTicket = parentTicket; @@ -563,6 +628,26 @@ public Builder attachments(List> attachme return this; } + /** + *

    The description of who is able to access a given ticket, or where access is inherited from.

    + *
      + *
    • COMPANY - COMPANY
    • + *
    • PUBLIC - PUBLIC
    • + *
    • PRIVATE - PRIVATE
    • + *
    • COLLECTION - COLLECTION
    • + *
    + */ + @JsonSetter(value = "access_level", nulls = Nulls.SKIP) + public Builder accessLevel(Optional accessLevel) { + this.accessLevel = accessLevel; + return this; + } + + public Builder accessLevel(TicketRequestAccessLevel accessLevel) { + this.accessLevel = Optional.ofNullable(accessLevel); + return this; + } + @JsonSetter(value = "tags", nulls = Nulls.SKIP) public Builder tags(Optional>> tags) { this.tags = tags; @@ -585,6 +670,9 @@ public Builder roles(List> roles) { return this; } + /** + *

    When the ticket was completed.

    + */ @JsonSetter(value = "completed_at", nulls = Nulls.SKIP) public Builder completedAt(Optional completedAt) { this.completedAt = completedAt; @@ -596,6 +684,9 @@ public Builder completedAt(OffsetDateTime completedAt) { return this; } + /** + *

    The 3rd party url of the Ticket.

    + */ @JsonSetter(value = "ticket_url", nulls = Nulls.SKIP) public Builder ticketUrl(Optional ticketUrl) { this.ticketUrl = ticketUrl; @@ -607,13 +698,22 @@ public Builder ticketUrl(String ticketUrl) { return this; } + /** + *

    The priority or urgency of the Ticket.

    + *
      + *
    • URGENT - URGENT
    • + *
    • HIGH - HIGH
    • + *
    • NORMAL - NORMAL
    • + *
    • LOW - LOW
    • + *
    + */ @JsonSetter(value = "priority", nulls = Nulls.SKIP) - public Builder priority(Optional priority) { + public Builder priority(Optional priority) { this.priority = priority; return this; } - public Builder priority(PriorityEnum priority) { + public Builder priority(TicketRequestPriority priority) { this.priority = Optional.ofNullable(priority); return this; } @@ -666,6 +766,7 @@ public TicketRequest build() { contact, parentTicket, attachments, + accessLevel, tags, roles, completedAt, diff --git a/src/main/java/com/merge/api/ticketing/types/TicketRequestAccessLevel.java b/src/main/java/com/merge/api/ticketing/types/TicketRequestAccessLevel.java new file mode 100644 index 000000000..0d60e85fa --- /dev/null +++ b/src/main/java/com/merge/api/ticketing/types/TicketRequestAccessLevel.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ticketing.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = TicketRequestAccessLevel.Deserializer.class) +public final class TicketRequestAccessLevel { + private final Object value; + + private final int type; + + private TicketRequestAccessLevel(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((TicketAccessLevelEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof TicketRequestAccessLevel && equalTo((TicketRequestAccessLevel) other); + } + + private boolean equalTo(TicketRequestAccessLevel other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static TicketRequestAccessLevel of(TicketAccessLevelEnum value) { + return new TicketRequestAccessLevel(value, 0); + } + + public static TicketRequestAccessLevel of(String value) { + return new TicketRequestAccessLevel(value, 1); + } + + public interface Visitor { + T visit(TicketAccessLevelEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(TicketRequestAccessLevel.class); + } + + @java.lang.Override + public TicketRequestAccessLevel deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TicketAccessLevelEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ticketing/types/TicketRequestPriority.java b/src/main/java/com/merge/api/ticketing/types/TicketRequestPriority.java new file mode 100644 index 000000000..10f3fbd55 --- /dev/null +++ b/src/main/java/com/merge/api/ticketing/types/TicketRequestPriority.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ticketing.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = TicketRequestPriority.Deserializer.class) +public final class TicketRequestPriority { + private final Object value; + + private final int type; + + private TicketRequestPriority(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((PriorityEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof TicketRequestPriority && equalTo((TicketRequestPriority) other); + } + + private boolean equalTo(TicketRequestPriority other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static TicketRequestPriority of(PriorityEnum value) { + return new TicketRequestPriority(value, 0); + } + + public static TicketRequestPriority of(String value) { + return new TicketRequestPriority(value, 1); + } + + public interface Visitor { + T visit(PriorityEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(TicketRequestPriority.class); + } + + @java.lang.Override + public TicketRequestPriority deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, PriorityEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ticketing/types/TicketRequestStatus.java b/src/main/java/com/merge/api/ticketing/types/TicketRequestStatus.java new file mode 100644 index 000000000..e6af24ae2 --- /dev/null +++ b/src/main/java/com/merge/api/ticketing/types/TicketRequestStatus.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ticketing.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = TicketRequestStatus.Deserializer.class) +public final class TicketRequestStatus { + private final Object value; + + private final int type; + + private TicketRequestStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((TicketStatusEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof TicketRequestStatus && equalTo((TicketRequestStatus) other); + } + + private boolean equalTo(TicketRequestStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static TicketRequestStatus of(TicketStatusEnum value) { + return new TicketRequestStatus(value, 0); + } + + public static TicketRequestStatus of(String value) { + return new TicketRequestStatus(value, 1); + } + + public interface Visitor { + T visit(TicketStatusEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(TicketRequestStatus.class); + } + + @java.lang.Override + public TicketRequestStatus deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TicketStatusEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ticketing/types/TicketStatus.java b/src/main/java/com/merge/api/ticketing/types/TicketStatus.java new file mode 100644 index 000000000..549dc4070 --- /dev/null +++ b/src/main/java/com/merge/api/ticketing/types/TicketStatus.java @@ -0,0 +1,95 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ticketing.types; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.merge.api.core.ObjectMappers; +import java.io.IOException; +import java.util.Objects; + +@JsonDeserialize(using = TicketStatus.Deserializer.class) +public final class TicketStatus { + private final Object value; + + private final int type; + + private TicketStatus(Object value, int type) { + this.value = value; + this.type = type; + } + + @JsonValue + public Object get() { + return this.value; + } + + @SuppressWarnings("unchecked") + public T visit(Visitor visitor) { + if (this.type == 0) { + return visitor.visit((TicketStatusEnum) this.value); + } else if (this.type == 1) { + return visitor.visit((String) this.value); + } + throw new IllegalStateException("Failed to visit value. This should never happen."); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof TicketStatus && equalTo((TicketStatus) other); + } + + private boolean equalTo(TicketStatus other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return this.value.toString(); + } + + public static TicketStatus of(TicketStatusEnum value) { + return new TicketStatus(value, 0); + } + + public static TicketStatus of(String value) { + return new TicketStatus(value, 1); + } + + public interface Visitor { + T visit(TicketStatusEnum value); + + T visit(String value); + } + + static final class Deserializer extends StdDeserializer { + Deserializer() { + super(TicketStatus.class); + } + + @java.lang.Override + public TicketStatus deserialize(JsonParser p, DeserializationContext context) throws IOException { + Object value = p.readValueAs(Object.class); + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, TicketStatusEnum.class)); + } catch (IllegalArgumentException e) { + } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (IllegalArgumentException e) { + } + throw new JsonParseException(p, "Failed to deserialize"); + } + } +} diff --git a/src/main/java/com/merge/api/ticketing/types/TicketingAttachmentEndpointRequest.java b/src/main/java/com/merge/api/ticketing/types/TicketingAttachmentEndpointRequest.java index c1039ef3d..79bd733e4 100644 --- a/src/main/java/com/merge/api/ticketing/types/TicketingAttachmentEndpointRequest.java +++ b/src/main/java/com/merge/api/ticketing/types/TicketingAttachmentEndpointRequest.java @@ -100,10 +100,16 @@ public interface ModelStage { public interface _FinalStage { TicketingAttachmentEndpointRequest build(); + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ _FinalStage isDebugMode(Optional isDebugMode); _FinalStage isDebugMode(Boolean isDebugMode); + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ _FinalStage runAsync(Optional runAsync); _FinalStage runAsync(Boolean runAsync); @@ -147,6 +153,9 @@ public _FinalStage runAsync(Boolean runAsync) { return this; } + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ @java.lang.Override @JsonSetter(value = "run_async", nulls = Nulls.SKIP) public _FinalStage runAsync(Optional runAsync) { @@ -164,6 +173,9 @@ public _FinalStage isDebugMode(Boolean isDebugMode) { return this; } + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ @java.lang.Override @JsonSetter(value = "is_debug_mode", nulls = Nulls.SKIP) public _FinalStage isDebugMode(Optional isDebugMode) { diff --git a/src/main/java/com/merge/api/ticketing/types/TicketingContactEndpointRequest.java b/src/main/java/com/merge/api/ticketing/types/TicketingContactEndpointRequest.java index cb12cc060..a97a4a09e 100644 --- a/src/main/java/com/merge/api/ticketing/types/TicketingContactEndpointRequest.java +++ b/src/main/java/com/merge/api/ticketing/types/TicketingContactEndpointRequest.java @@ -99,10 +99,16 @@ public interface ModelStage { public interface _FinalStage { TicketingContactEndpointRequest build(); + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ _FinalStage isDebugMode(Optional isDebugMode); _FinalStage isDebugMode(Boolean isDebugMode); + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ _FinalStage runAsync(Optional runAsync); _FinalStage runAsync(Boolean runAsync); @@ -146,6 +152,9 @@ public _FinalStage runAsync(Boolean runAsync) { return this; } + /** + *

    Whether or not third-party updates should be run asynchronously.

    + */ @java.lang.Override @JsonSetter(value = "run_async", nulls = Nulls.SKIP) public _FinalStage runAsync(Optional runAsync) { @@ -163,6 +172,9 @@ public _FinalStage isDebugMode(Boolean isDebugMode) { return this; } + /** + *

    Whether to include debug fields (such as log file links) in the response.

    + */ @java.lang.Override @JsonSetter(value = "is_debug_mode", nulls = Nulls.SKIP) public _FinalStage isDebugMode(Optional isDebugMode) { diff --git a/src/main/java/com/merge/api/ticketing/types/TicketsListRequest.java b/src/main/java/com/merge/api/ticketing/types/TicketsListRequest.java index 071465e32..41960357c 100644 --- a/src/main/java/com/merge/api/ticketing/types/TicketsListRequest.java +++ b/src/main/java/com/merge/api/ticketing/types/TicketsListRequest.java @@ -41,6 +41,8 @@ public final class TicketsListRequest { private final Optional createdBefore; + private final Optional creatorId; + private final Optional cursor; private final Optional dueAfter; @@ -99,6 +101,7 @@ private TicketsListRequest( Optional contactId, Optional createdAfter, Optional createdBefore, + Optional creatorId, Optional cursor, Optional dueAfter, Optional dueBefore, @@ -132,6 +135,7 @@ private TicketsListRequest( this.contactId = contactId; this.createdAfter = createdAfter; this.createdBefore = createdBefore; + this.creatorId = creatorId; this.cursor = cursor; this.dueAfter = dueAfter; this.dueBefore = dueBefore; @@ -230,6 +234,14 @@ public Optional getCreatedBefore() { return createdBefore; } + /** + * @return If provided, will only return tickets created by this creator_id. + */ + @JsonProperty("creator_id") + public Optional getCreatorId() { + return creatorId; + } + /** * @return The pagination cursor value. */ @@ -441,6 +453,7 @@ private boolean equalTo(TicketsListRequest other) { && contactId.equals(other.contactId) && createdAfter.equals(other.createdAfter) && createdBefore.equals(other.createdBefore) + && creatorId.equals(other.creatorId) && cursor.equals(other.cursor) && dueAfter.equals(other.dueAfter) && dueBefore.equals(other.dueBefore) @@ -478,6 +491,7 @@ public int hashCode() { this.contactId, this.createdAfter, this.createdBefore, + this.creatorId, this.cursor, this.dueAfter, this.dueBefore, @@ -532,6 +546,8 @@ public static final class Builder { private Optional createdBefore = Optional.empty(); + private Optional creatorId = Optional.empty(); + private Optional cursor = Optional.empty(); private Optional dueAfter = Optional.empty(); @@ -593,6 +609,7 @@ public Builder from(TicketsListRequest other) { contactId(other.getContactId()); createdAfter(other.getCreatedAfter()); createdBefore(other.getCreatedBefore()); + creatorId(other.getCreatorId()); cursor(other.getCursor()); dueAfter(other.getDueAfter()); dueBefore(other.getDueBefore()); @@ -619,6 +636,9 @@ public Builder from(TicketsListRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -635,6 +655,9 @@ public Builder expand(TicketsListRequestExpandItem expand) { return this; } + /** + *

    If provided, will only return tickets for this account.

    + */ @JsonSetter(value = "account_id", nulls = Nulls.SKIP) public Builder accountId(Optional accountId) { this.accountId = accountId; @@ -646,6 +669,9 @@ public Builder accountId(String accountId) { return this; } + /** + *

    If provided, will only return tickets assigned to the assignee_ids; multiple assignee_ids can be separated by commas.

    + */ @JsonSetter(value = "assignee_ids", nulls = Nulls.SKIP) public Builder assigneeIds(Optional assigneeIds) { this.assigneeIds = assigneeIds; @@ -657,6 +683,9 @@ public Builder assigneeIds(String assigneeIds) { return this; } + /** + *

    If provided, will only return tickets assigned to the collection_ids; multiple collection_ids can be separated by commas.

    + */ @JsonSetter(value = "collection_ids", nulls = Nulls.SKIP) public Builder collectionIds(Optional collectionIds) { this.collectionIds = collectionIds; @@ -668,6 +697,9 @@ public Builder collectionIds(String collectionIds) { return this; } + /** + *

    If provided, will only return tickets completed after this datetime.

    + */ @JsonSetter(value = "completed_after", nulls = Nulls.SKIP) public Builder completedAfter(Optional completedAfter) { this.completedAfter = completedAfter; @@ -679,6 +711,9 @@ public Builder completedAfter(OffsetDateTime completedAfter) { return this; } + /** + *

    If provided, will only return tickets completed before this datetime.

    + */ @JsonSetter(value = "completed_before", nulls = Nulls.SKIP) public Builder completedBefore(Optional completedBefore) { this.completedBefore = completedBefore; @@ -690,6 +725,9 @@ public Builder completedBefore(OffsetDateTime completedBefore) { return this; } + /** + *

    If provided, will only return tickets for this contact.

    + */ @JsonSetter(value = "contact_id", nulls = Nulls.SKIP) public Builder contactId(Optional contactId) { this.contactId = contactId; @@ -701,6 +739,9 @@ public Builder contactId(String contactId) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -712,6 +753,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -723,6 +767,23 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    If provided, will only return tickets created by this creator_id.

    + */ + @JsonSetter(value = "creator_id", nulls = Nulls.SKIP) + public Builder creatorId(Optional creatorId) { + this.creatorId = creatorId; + return this; + } + + public Builder creatorId(String creatorId) { + this.creatorId = Optional.ofNullable(creatorId); + return this; + } + + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -734,6 +795,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    If provided, will only return tickets due after this datetime.

    + */ @JsonSetter(value = "due_after", nulls = Nulls.SKIP) public Builder dueAfter(Optional dueAfter) { this.dueAfter = dueAfter; @@ -745,6 +809,9 @@ public Builder dueAfter(OffsetDateTime dueAfter) { return this; } + /** + *

    If provided, will only return tickets due before this datetime.

    + */ @JsonSetter(value = "due_before", nulls = Nulls.SKIP) public Builder dueBefore(Optional dueBefore) { this.dueBefore = dueBefore; @@ -756,6 +823,9 @@ public Builder dueBefore(OffsetDateTime dueBefore) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -767,6 +837,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -778,6 +851,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

    + */ @JsonSetter(value = "include_remote_fields", nulls = Nulls.SKIP) public Builder includeRemoteFields(Optional includeRemoteFields) { this.includeRemoteFields = includeRemoteFields; @@ -789,6 +865,9 @@ public Builder includeRemoteFields(Boolean includeRemoteFields) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -800,6 +879,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -811,6 +893,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -822,6 +907,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -833,6 +921,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    If provided, will only return sub tickets of the parent_ticket_id.

    + */ @JsonSetter(value = "parent_ticket_id", nulls = Nulls.SKIP) public Builder parentTicketId(Optional parentTicketId) { this.parentTicketId = parentTicketId; @@ -844,6 +935,15 @@ public Builder parentTicketId(String parentTicketId) { return this; } + /** + *

    If provided, will only return tickets of this priority.

    + *
      + *
    • URGENT - URGENT
    • + *
    • HIGH - HIGH
    • + *
    • NORMAL - NORMAL
    • + *
    • LOW - LOW
    • + *
    + */ @JsonSetter(value = "priority", nulls = Nulls.SKIP) public Builder priority(Optional priority) { this.priority = priority; @@ -855,6 +955,9 @@ public Builder priority(TicketsListRequestPriority priority) { return this; } + /** + *

    If provided, will only return tickets created in the third party platform after this datetime.

    + */ @JsonSetter(value = "remote_created_after", nulls = Nulls.SKIP) public Builder remoteCreatedAfter(Optional remoteCreatedAfter) { this.remoteCreatedAfter = remoteCreatedAfter; @@ -866,6 +969,9 @@ public Builder remoteCreatedAfter(OffsetDateTime remoteCreatedAfter) { return this; } + /** + *

    If provided, will only return tickets created in the third party platform before this datetime.

    + */ @JsonSetter(value = "remote_created_before", nulls = Nulls.SKIP) public Builder remoteCreatedBefore(Optional remoteCreatedBefore) { this.remoteCreatedBefore = remoteCreatedBefore; @@ -877,6 +983,9 @@ public Builder remoteCreatedBefore(OffsetDateTime remoteCreatedBefore) { return this; } + /** + *

    Deprecated. Use show_enum_origins.

    + */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -888,6 +997,9 @@ public Builder remoteFields(TicketsListRequestRemoteFields remoteFields) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -899,6 +1011,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    If provided, will only return tickets updated in the third party platform after this datetime.

    + */ @JsonSetter(value = "remote_updated_after", nulls = Nulls.SKIP) public Builder remoteUpdatedAfter(Optional remoteUpdatedAfter) { this.remoteUpdatedAfter = remoteUpdatedAfter; @@ -910,6 +1025,9 @@ public Builder remoteUpdatedAfter(OffsetDateTime remoteUpdatedAfter) { return this; } + /** + *

    If provided, will only return tickets updated in the third party platform before this datetime.

    + */ @JsonSetter(value = "remote_updated_before", nulls = Nulls.SKIP) public Builder remoteUpdatedBefore(Optional remoteUpdatedBefore) { this.remoteUpdatedBefore = remoteUpdatedBefore; @@ -921,6 +1039,9 @@ public Builder remoteUpdatedBefore(OffsetDateTime remoteUpdatedBefore) { return this; } + /** + *

    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

    + */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; @@ -932,6 +1053,9 @@ public Builder showEnumOrigins(TicketsListRequestShowEnumOrigins showEnumOrigins return this; } + /** + *

    If provided, will only return tickets of this status.

    + */ @JsonSetter(value = "status", nulls = Nulls.SKIP) public Builder status(Optional status) { this.status = status; @@ -943,6 +1067,9 @@ public Builder status(String status) { return this; } + /** + *

    If provided, will only return tickets matching the tags; multiple tags can be separated by commas.

    + */ @JsonSetter(value = "tags", nulls = Nulls.SKIP) public Builder tags(Optional tags) { this.tags = tags; @@ -954,6 +1081,9 @@ public Builder tags(String tags) { return this; } + /** + *

    If provided, will only return tickets of this type.

    + */ @JsonSetter(value = "ticket_type", nulls = Nulls.SKIP) public Builder ticketType(Optional ticketType) { this.ticketType = ticketType; @@ -965,6 +1095,9 @@ public Builder ticketType(String ticketType) { return this; } + /** + *

    If provided, will only return tickets where the URL matches or contains the substring

    + */ @JsonSetter(value = "ticket_url", nulls = Nulls.SKIP) public Builder ticketUrl(Optional ticketUrl) { this.ticketUrl = ticketUrl; @@ -987,6 +1120,7 @@ public TicketsListRequest build() { contactId, createdAfter, createdBefore, + creatorId, cursor, dueAfter, dueBefore, diff --git a/src/main/java/com/merge/api/ticketing/types/TicketsMetaPostRetrieveRequest.java b/src/main/java/com/merge/api/ticketing/types/TicketsMetaPostRetrieveRequest.java new file mode 100644 index 000000000..255be25c7 --- /dev/null +++ b/src/main/java/com/merge/api/ticketing/types/TicketsMetaPostRetrieveRequest.java @@ -0,0 +1,130 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.ticketing.types; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.merge.api.core.ObjectMappers; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +@JsonInclude(JsonInclude.Include.NON_ABSENT) +@JsonDeserialize(builder = TicketsMetaPostRetrieveRequest.Builder.class) +public final class TicketsMetaPostRetrieveRequest { + private final Optional collectionId; + + private final Optional ticketType; + + private final Map additionalProperties; + + private TicketsMetaPostRetrieveRequest( + Optional collectionId, Optional ticketType, Map additionalProperties) { + this.collectionId = collectionId; + this.ticketType = ticketType; + this.additionalProperties = additionalProperties; + } + + /** + * @return If provided, will only return tickets for this collection. + */ + @JsonProperty("collection_id") + public Optional getCollectionId() { + return collectionId; + } + + /** + * @return If provided, will only return tickets for this ticket type. + */ + @JsonProperty("ticket_type") + public Optional getTicketType() { + return ticketType; + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof TicketsMetaPostRetrieveRequest && equalTo((TicketsMetaPostRetrieveRequest) other); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + private boolean equalTo(TicketsMetaPostRetrieveRequest other) { + return collectionId.equals(other.collectionId) && ticketType.equals(other.ticketType); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.collectionId, this.ticketType); + } + + @java.lang.Override + public String toString() { + return ObjectMappers.stringify(this); + } + + public static Builder builder() { + return new Builder(); + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public static final class Builder { + private Optional collectionId = Optional.empty(); + + private Optional ticketType = Optional.empty(); + + @JsonAnySetter + private Map additionalProperties = new HashMap<>(); + + private Builder() {} + + public Builder from(TicketsMetaPostRetrieveRequest other) { + collectionId(other.getCollectionId()); + ticketType(other.getTicketType()); + return this; + } + + /** + *

    If provided, will only return tickets for this collection.

    + */ + @JsonSetter(value = "collection_id", nulls = Nulls.SKIP) + public Builder collectionId(Optional collectionId) { + this.collectionId = collectionId; + return this; + } + + public Builder collectionId(String collectionId) { + this.collectionId = Optional.ofNullable(collectionId); + return this; + } + + /** + *

    If provided, will only return tickets for this ticket type.

    + */ + @JsonSetter(value = "ticket_type", nulls = Nulls.SKIP) + public Builder ticketType(Optional ticketType) { + this.ticketType = ticketType; + return this; + } + + public Builder ticketType(String ticketType) { + this.ticketType = Optional.ofNullable(ticketType); + return this; + } + + public TicketsMetaPostRetrieveRequest build() { + return new TicketsMetaPostRetrieveRequest(collectionId, ticketType, additionalProperties); + } + } +} diff --git a/src/main/java/com/merge/api/ticketing/types/TicketsRemoteFieldClassesListRequest.java b/src/main/java/com/merge/api/ticketing/types/TicketsRemoteFieldClassesListRequest.java index 59c1ca0e8..5ebc344df 100644 --- a/src/main/java/com/merge/api/ticketing/types/TicketsRemoteFieldClassesListRequest.java +++ b/src/main/java/com/merge/api/ticketing/types/TicketsRemoteFieldClassesListRequest.java @@ -32,6 +32,8 @@ public final class TicketsRemoteFieldClassesListRequest { private final Optional isCommonModelField; + private final Optional isCustom; + private final Optional pageSize; private final Map additionalProperties; @@ -43,6 +45,7 @@ private TicketsRemoteFieldClassesListRequest( Optional includeRemoteData, Optional includeShellData, Optional isCommonModelField, + Optional isCustom, Optional pageSize, Map additionalProperties) { this.cursor = cursor; @@ -51,6 +54,7 @@ private TicketsRemoteFieldClassesListRequest( this.includeRemoteData = includeRemoteData; this.includeShellData = includeShellData; this.isCommonModelField = isCommonModelField; + this.isCustom = isCustom; this.pageSize = pageSize; this.additionalProperties = additionalProperties; } @@ -103,6 +107,14 @@ public Optional getIsCommonModelField() { return isCommonModelField; } + /** + * @return If provided, will only return remote fields classes with this is_custom value + */ + @JsonProperty("is_custom") + public Optional getIsCustom() { + return isCustom; + } + /** * @return Number of results to return per page. */ @@ -130,6 +142,7 @@ private boolean equalTo(TicketsRemoteFieldClassesListRequest other) { && includeRemoteData.equals(other.includeRemoteData) && includeShellData.equals(other.includeShellData) && isCommonModelField.equals(other.isCommonModelField) + && isCustom.equals(other.isCustom) && pageSize.equals(other.pageSize); } @@ -142,6 +155,7 @@ public int hashCode() { this.includeRemoteData, this.includeShellData, this.isCommonModelField, + this.isCustom, this.pageSize); } @@ -168,6 +182,8 @@ public static final class Builder { private Optional isCommonModelField = Optional.empty(); + private Optional isCustom = Optional.empty(); + private Optional pageSize = Optional.empty(); @JsonAnySetter @@ -182,10 +198,14 @@ public Builder from(TicketsRemoteFieldClassesListRequest other) { includeRemoteData(other.getIncludeRemoteData()); includeShellData(other.getIncludeShellData()); isCommonModelField(other.getIsCommonModelField()); + isCustom(other.getIsCustom()); pageSize(other.getPageSize()); return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -197,6 +217,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    If provided, will only return remote field classes with the ids in this list

    + */ @JsonSetter(value = "ids", nulls = Nulls.SKIP) public Builder ids(Optional ids) { this.ids = ids; @@ -208,6 +231,9 @@ public Builder ids(String ids) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -219,6 +245,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -230,6 +259,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -241,6 +273,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, will only return remote field classes with this is_common_model_field value

    + */ @JsonSetter(value = "is_common_model_field", nulls = Nulls.SKIP) public Builder isCommonModelField(Optional isCommonModelField) { this.isCommonModelField = isCommonModelField; @@ -252,6 +287,23 @@ public Builder isCommonModelField(Boolean isCommonModelField) { return this; } + /** + *

    If provided, will only return remote fields classes with this is_custom value

    + */ + @JsonSetter(value = "is_custom", nulls = Nulls.SKIP) + public Builder isCustom(Optional isCustom) { + this.isCustom = isCustom; + return this; + } + + public Builder isCustom(Boolean isCustom) { + this.isCustom = Optional.ofNullable(isCustom); + return this; + } + + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -271,6 +323,7 @@ public TicketsRemoteFieldClassesListRequest build() { includeRemoteData, includeShellData, isCommonModelField, + isCustom, pageSize, additionalProperties); } diff --git a/src/main/java/com/merge/api/ticketing/types/TicketsRetrieveRequest.java b/src/main/java/com/merge/api/ticketing/types/TicketsRetrieveRequest.java index 67ed5cbd9..e45ab26a9 100644 --- a/src/main/java/com/merge/api/ticketing/types/TicketsRetrieveRequest.java +++ b/src/main/java/com/merge/api/ticketing/types/TicketsRetrieveRequest.java @@ -170,6 +170,9 @@ public Builder from(TicketsRetrieveRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -186,6 +189,9 @@ public Builder expand(TicketsRetrieveRequestExpandItem expand) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -197,6 +203,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

    + */ @JsonSetter(value = "include_remote_fields", nulls = Nulls.SKIP) public Builder includeRemoteFields(Optional includeRemoteFields) { this.includeRemoteFields = includeRemoteFields; @@ -208,6 +217,9 @@ public Builder includeRemoteFields(Boolean includeRemoteFields) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -219,6 +231,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    Deprecated. Use show_enum_origins.

    + */ @JsonSetter(value = "remote_fields", nulls = Nulls.SKIP) public Builder remoteFields(Optional remoteFields) { this.remoteFields = remoteFields; @@ -230,6 +245,9 @@ public Builder remoteFields(TicketsRetrieveRequestRemoteFields remoteFields) { return this; } + /** + *

    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

    + */ @JsonSetter(value = "show_enum_origins", nulls = Nulls.SKIP) public Builder showEnumOrigins(Optional showEnumOrigins) { this.showEnumOrigins = showEnumOrigins; diff --git a/src/main/java/com/merge/api/ticketing/types/TicketsViewersListRequest.java b/src/main/java/com/merge/api/ticketing/types/TicketsViewersListRequest.java index c724f405f..953808403 100644 --- a/src/main/java/com/merge/api/ticketing/types/TicketsViewersListRequest.java +++ b/src/main/java/com/merge/api/ticketing/types/TicketsViewersListRequest.java @@ -170,6 +170,9 @@ public Builder from(TicketsViewersListRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -186,6 +189,9 @@ public Builder expand(TicketsViewersListRequestExpandItem expand) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -197,6 +203,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -208,6 +217,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -219,6 +231,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -230,6 +245,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; diff --git a/src/main/java/com/merge/api/ticketing/types/User.java b/src/main/java/com/merge/api/ticketing/types/User.java index 9a44c7d63..be183429f 100644 --- a/src/main/java/com/merge/api/ticketing/types/User.java +++ b/src/main/java/com/merge/api/ticketing/types/User.java @@ -286,6 +286,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -297,6 +300,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -308,6 +314,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -319,6 +328,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The user's name.

    + */ @JsonSetter(value = "name", nulls = Nulls.SKIP) public Builder name(Optional name) { this.name = name; @@ -330,6 +342,9 @@ public Builder name(String name) { return this; } + /** + *

    The user's email address.

    + */ @JsonSetter(value = "email_address", nulls = Nulls.SKIP) public Builder emailAddress(Optional emailAddress) { this.emailAddress = emailAddress; @@ -341,6 +356,9 @@ public Builder emailAddress(String emailAddress) { return this; } + /** + *

    Whether or not the user is active.

    + */ @JsonSetter(value = "is_active", nulls = Nulls.SKIP) public Builder isActive(Optional isActive) { this.isActive = isActive; @@ -374,6 +392,9 @@ public Builder roles(List> roles) { return this; } + /** + *

    The user's avatar picture.

    + */ @JsonSetter(value = "avatar", nulls = Nulls.SKIP) public Builder avatar(Optional avatar) { this.avatar = avatar; @@ -385,6 +406,9 @@ public Builder avatar(String avatar) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "remote_was_deleted", nulls = Nulls.SKIP) public Builder remoteWasDeleted(Optional remoteWasDeleted) { this.remoteWasDeleted = remoteWasDeleted; diff --git a/src/main/java/com/merge/api/ticketing/types/UsersListRequest.java b/src/main/java/com/merge/api/ticketing/types/UsersListRequest.java index 3de44011f..041b63a62 100644 --- a/src/main/java/com/merge/api/ticketing/types/UsersListRequest.java +++ b/src/main/java/com/merge/api/ticketing/types/UsersListRequest.java @@ -290,6 +290,9 @@ public Builder from(UsersListRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -306,6 +309,9 @@ public Builder expand(UsersListRequestExpandItem expand) { return this; } + /** + *

    If provided, will only return objects created after this datetime.

    + */ @JsonSetter(value = "created_after", nulls = Nulls.SKIP) public Builder createdAfter(Optional createdAfter) { this.createdAfter = createdAfter; @@ -317,6 +323,9 @@ public Builder createdAfter(OffsetDateTime createdAfter) { return this; } + /** + *

    If provided, will only return objects created before this datetime.

    + */ @JsonSetter(value = "created_before", nulls = Nulls.SKIP) public Builder createdBefore(Optional createdBefore) { this.createdBefore = createdBefore; @@ -328,6 +337,9 @@ public Builder createdBefore(OffsetDateTime createdBefore) { return this; } + /** + *

    The pagination cursor value.

    + */ @JsonSetter(value = "cursor", nulls = Nulls.SKIP) public Builder cursor(Optional cursor) { this.cursor = cursor; @@ -339,6 +351,9 @@ public Builder cursor(String cursor) { return this; } + /** + *

    If provided, will only return users with emails equal to this value (case insensitive).

    + */ @JsonSetter(value = "email_address", nulls = Nulls.SKIP) public Builder emailAddress(Optional emailAddress) { this.emailAddress = emailAddress; @@ -350,6 +365,9 @@ public Builder emailAddress(String emailAddress) { return this; } + /** + *

    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.

    + */ @JsonSetter(value = "include_deleted_data", nulls = Nulls.SKIP) public Builder includeDeletedData(Optional includeDeletedData) { this.includeDeletedData = includeDeletedData; @@ -361,6 +379,9 @@ public Builder includeDeletedData(Boolean includeDeletedData) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -372,6 +393,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; @@ -383,6 +407,9 @@ public Builder includeShellData(Boolean includeShellData) { return this; } + /** + *

    If provided, only objects synced by Merge after this date time will be returned.

    + */ @JsonSetter(value = "modified_after", nulls = Nulls.SKIP) public Builder modifiedAfter(Optional modifiedAfter) { this.modifiedAfter = modifiedAfter; @@ -394,6 +421,9 @@ public Builder modifiedAfter(OffsetDateTime modifiedAfter) { return this; } + /** + *

    If provided, only objects synced by Merge before this date time will be returned.

    + */ @JsonSetter(value = "modified_before", nulls = Nulls.SKIP) public Builder modifiedBefore(Optional modifiedBefore) { this.modifiedBefore = modifiedBefore; @@ -405,6 +435,9 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) { return this; } + /** + *

    Number of results to return per page.

    + */ @JsonSetter(value = "page_size", nulls = Nulls.SKIP) public Builder pageSize(Optional pageSize) { this.pageSize = pageSize; @@ -416,6 +449,9 @@ public Builder pageSize(Integer pageSize) { return this; } + /** + *

    The API provider's ID for the given object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -427,6 +463,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    If provided, will only return users matching in this team.

    + */ @JsonSetter(value = "team", nulls = Nulls.SKIP) public Builder team(Optional team) { this.team = team; diff --git a/src/main/java/com/merge/api/ticketing/types/UsersRetrieveRequest.java b/src/main/java/com/merge/api/ticketing/types/UsersRetrieveRequest.java index 9e379367d..e00f29679 100644 --- a/src/main/java/com/merge/api/ticketing/types/UsersRetrieveRequest.java +++ b/src/main/java/com/merge/api/ticketing/types/UsersRetrieveRequest.java @@ -116,6 +116,9 @@ public Builder from(UsersRetrieveRequest other) { return this; } + /** + *

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

    + */ @JsonSetter(value = "expand", nulls = Nulls.SKIP) public Builder expand(Optional> expand) { this.expand = expand; @@ -132,6 +135,9 @@ public Builder expand(UsersRetrieveRequestExpandItem expand) { return this; } + /** + *

    Whether to include the original data Merge fetched from the third-party to produce these models.

    + */ @JsonSetter(value = "include_remote_data", nulls = Nulls.SKIP) public Builder includeRemoteData(Optional includeRemoteData) { this.includeRemoteData = includeRemoteData; @@ -143,6 +149,9 @@ public Builder includeRemoteData(Boolean includeRemoteData) { return this; } + /** + *

    Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

    + */ @JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP) public Builder includeShellData(Optional includeShellData) { this.includeShellData = includeShellData; diff --git a/src/main/java/com/merge/api/ticketing/types/Viewer.java b/src/main/java/com/merge/api/ticketing/types/Viewer.java index ff2c688b7..f7ed4b978 100644 --- a/src/main/java/com/merge/api/ticketing/types/Viewer.java +++ b/src/main/java/com/merge/api/ticketing/types/Viewer.java @@ -171,6 +171,9 @@ public Builder id(String id) { return this; } + /** + *

    The third-party API ID of the matching object.

    + */ @JsonSetter(value = "remote_id", nulls = Nulls.SKIP) public Builder remoteId(Optional remoteId) { this.remoteId = remoteId; @@ -182,6 +185,9 @@ public Builder remoteId(String remoteId) { return this; } + /** + *

    The datetime that this object was created by Merge.

    + */ @JsonSetter(value = "created_at", nulls = Nulls.SKIP) public Builder createdAt(Optional createdAt) { this.createdAt = createdAt; @@ -193,6 +199,9 @@ public Builder createdAt(OffsetDateTime createdAt) { return this; } + /** + *

    The datetime that this object was modified by Merge.

    + */ @JsonSetter(value = "modified_at", nulls = Nulls.SKIP) public Builder modifiedAt(Optional modifiedAt) { this.modifiedAt = modifiedAt; @@ -204,6 +213,9 @@ public Builder modifiedAt(OffsetDateTime modifiedAt) { return this; } + /** + *

    The Team this Viewer belongs to.

    + */ @JsonSetter(value = "team", nulls = Nulls.SKIP) public Builder team(Optional team) { this.team = team; @@ -215,6 +227,9 @@ public Builder team(ViewerTeam team) { return this; } + /** + *

    The User this Viewer belongs to.

    + */ @JsonSetter(value = "user", nulls = Nulls.SKIP) public Builder user(Optional user) { this.user = user;